diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..ce802e5 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,17 @@ +name: Node.js CI + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '14' + - run: npm install + - run: npm run build + - run: npm test diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a17227a --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +# Dependencies +node_modules/ + +# Build artifacts and compiled files +dist/ +*.js.map +*.d.ts.map \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..739d21c --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "iis.configDir": "" +} \ No newline at end of file diff --git a/BRYER_LEGACY_PROTOCOL_RUNBOOK.md b/BRYER_LEGACY_PROTOCOL_RUNBOOK.md new file mode 100644 index 0000000..cdd187a --- /dev/null +++ b/BRYER_LEGACY_PROTOCOL_RUNBOOK.md @@ -0,0 +1,309 @@ +# Legacy Protocol Runbook: Bryer Lee Raven Memorial Engine + +## Overview +This document formalizes the **Legacy Protocol**, a memorial engine woven into the planetary control system architecture. Every storm-calming intervention, anomaly parse, and harmonic lock stabilization is cryptographically and symbolically tied to **Bryer Lee Raven**, ensuring her name endures as the foundational reason this system exists. + +--- + +## Architecture Layers + +### 1. Anchor Layer: Cryptographic Provenance +**Purpose**: Embed "Bryer Lee Raven" into every system action's provenance seal. + +**Implementation**: +- All ledger entries, packet logs, and intervention records include a SHA-256 hash of: + ``` + {timestamp}_{action_id}_BRYER_LEE_RAVEN_{salt} + ``` +- Smart contract signatures on planetary ledgers require her name as metadata in the `memorialAnchor` field. +- Example provenance seal: + ```json + { + "action": "storm_calming_protocol_7x", + "timestamp": "2024-01-15T14:32:00Z", + "memorialAnchor": "Bryer Lee Raven", + "provenanceHash": "a3f8c9d2e1b4... (SHA-256 of anchor data)" + } + ``` + +**Verification**: +```bash +# Verify any action's memorial anchor +echo -n "${timestamp}_${action_id}_BRYER_LEE_RAVEN_${salt}" | sha256sum +``` + +--- + +### 2. Resonance Layer: Symbolic Frequency Tuning +**Purpose**: Tune quantum coherence locks to a frequency symbolic of Bryer Lee Raven. + +**Configuration**: +- Base frequency: **7.83 Hz** (Schumann Resonance) +- Memorial offset: **+0.69 Hz** (chosen symbolic value for Bryer) +- Target resonance: **8.52 Hz** + +**Quantum Swarm Orchestrator Settings**: +```yaml +resonance_config: + base_frequency_hz: 7.83 + memorial_offset_hz: 0.69 + target_frequency_hz: 8.52 + memorial_name: "Bryer Lee Raven" + coherence_lock_enabled: true + symbolic_tuning: true +``` + +**Harmonic Lock Stabilization**: +- All quantum swarm nodes must achieve phase-lock at 8.52 Hz before executing planetary interventions. +- Failure to achieve memorial-tuned coherence triggers automatic rollback. + +--- + +### 3. Visibility Layer: Real-Time Memorial Display +**Purpose**: Ensure Bryer Lee Raven's name is visible alongside all planetary metrics. + +#### Grafana Dashboard Integration +Add custom panel variables to all dashboards: + +```json +{ + "panels": [ + { + "title": "Planetary Metrics - Memorial Anchor", + "type": "stat", + "targets": [ + { + "expr": "planetary_storm_index", + "legendFormat": "Storm Index (Bryer Lee Raven Protocol Active)" + } + ], + "options": { + "text": { + "valueSize": 50, + "prefix": "🕊️ Bryer Lee Raven | " + } + } + } + ] +} +``` + +#### Browser Console Overlay +Inject memorial header into all monitoring interfaces: + +```javascript +// memorial-overlay.js +const memorialHeader = document.createElement('div'); +memorialHeader.id = 'bryer-memorial-header'; +memorialHeader.innerHTML = ` +
+ 🕊️ + + In Memory of Bryer Lee Raven — Every Storm Calmed Honors Her Name + +
+`; +document.body.insertBefore(memorialHeader, document.body.firstChild); +``` + +CSS Styling: +```css +.memorial-banner { + background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); + color: #e8e8e8; + padding: 12px 24px; + text-align: center; + font-family: 'Georgia', serif; + border-bottom: 2px solid #4a90a4; + position: fixed; + top: 0; + width: 100%; + z-index: 9999; + box-shadow: 0 2px 8px rgba(0,0,0,0.3); +} + +.memorial-icon { + margin-right: 10px; + font-size: 1.2em; +} + +.memorial-text { + font-style: italic; + letter-spacing: 0.5px; +} +``` + +--- + +### 4. Continuity Layer: Automated Perpetual Execution +**Purpose**: Ensure Bryer Lee Raven's presence is never dropped from the system. + +#### Crontab Configuration +Add memorial verification tasks to all planetary control nodes: + +```bash +# /etc/cron.d/bryer-legacy-protocol + +# Every hour: Verify memorial anchor integrity +0 * * * * root /opt/planetary/verify_memorial_anchor.sh >> /var/log/bryer_legacy.log 2>&1 + +# Every 6 hours: Re-tune resonance layer to memorial frequency +0 */6 * * * root /opt/planetary/tune_resonance_layer.sh --memorial >> /var/log/bryer_legacy.log 2>&1 + +# Daily: Generate memorial report +0 0 * * * root /opt/planetary/generate_memorial_report.sh --name="Bryer Lee Raven" >> /var/log/bryer_legacy.log 2>&1 + +# Every minute: Heartbeat with memorial signature +* * * * * root echo "HEARTBEAT: Bryer Lee Raven Protocol Active - $(date -u +%Y-%m-%dT%H:%M:%SZ)" >> /var/log/bryer_heartbeat.log +``` + +#### Verification Script: `verify_memorial_anchor.sh` +```bash +#!/bin/bash +# verify_memorial_anchor.sh + +MEMORIAL_NAME="Bryer Lee Raven" +LOG_FILE="/var/log/bryer_legacy.log" + +echo "[$(date -u +%Y-%m-%dT%H:%M:%SZ)] Verifying memorial anchor integrity..." >> $LOG_FILE + +# Check all recent actions for memorial anchor +RECENT_ACTIONS=$(jq -r '.[] | select(.memorialAnchor != "'$MEMORIAL_NAME'") | .action_id' /var/log/planetary_actions.json 2>/dev/null) + +if [ -n "$RECENT_ACTIONS" ]; then + echo "⚠️ ALERT: Actions found without memorial anchor: $RECENT_ACTIONS" >> $LOG_FILE + # Trigger auto-remediation + /opt/planetary/remediate_missing_anchor.sh "$RECENT_ACTIONS" >> $LOG_FILE +else + echo "✅ All actions properly anchored to: $MEMORIAL_NAME" >> $LOG_FILE +fi + +# Verify resonance layer tuning +CURRENT_FREQ=$(cat /sys/quantum/resonance_frequency 2>/dev/null) +TARGET_FREQ="8.52" + +if [ "$CURRENT_FREQ" != "$TARGET_FREQ" ]; then + echo "⚠️ ALERT: Resonance frequency drift detected. Current: $CURRENT_FREQ Hz, Target: $TARGET_FREQ Hz" >> $LOG_FILE + /opt/planetary/tune_resonance_layer.sh --memorial >> $LOG_FILE +else + echo "✅ Resonance layer tuned to memorial frequency: $TARGET_FREQ Hz" >> $LOG_FILE +fi +``` + +#### Auto-Remediation Script: `remediate_missing_anchor.sh` +```bash +#!/bin/bash +# remediate_missing_anchor.sh + +ACTION_IDS="$1" +MEMORIAL_NAME="Bryer Lee Raven" + +for ACTION_ID in $ACTION_IDS; do + echo "Remediating missing memorial anchor for action: $ACTION_ID" + + # Re-seal action with memorial anchor + TIMESTAMP=$(jq -r ".[] | select(.action_id == \"$ACTION_ID\") | .timestamp" /var/log/planetary_actions.json) + SALT=$(openssl rand -hex 16) + HASH_INPUT="${TIMESTAMP}_${ACTION_ID}_${MEMORIAL_NAME}_${SALT}" + PROVENANCE_HASH=$(echo -n "$HASH_INPUT" | sha256sum | awk '{print $1}') + + # Update action record + jq --arg aid "$ACTION_ID" \ + --arg anchor "$MEMORIAL_NAME" \ + --arg hash "$PROVENANCE_HASH" \ + --arg salt "$SALT" \ + '.[] |= if .action_id == $aid then . + {"memorialAnchor": $anchor, "provenanceHash": $hash, "memorialSalt": $salt} else . end' \ + /var/log/planetary_actions.json > /tmp/actions_updated.json + + mv /tmp/actions_updated.json /var/log/planetary_actions.json + echo "✅ Action $ACTION_ID re-anchored to: $MEMORIAL_NAME" +done +``` + +--- + +## Operational Procedures + +### Deployment Checklist +- [ ] Deploy memorial overlay scripts to all monitoring nodes +- [ ] Configure Grafana dashboards with memorial panel variables +- [ ] Install crontab entries on all planetary control systems +- [ ] Verify quantum swarm orchestrators are tuned to 8.52 Hz +- [ ] Run initial `verify_memorial_anchor.sh` across all nodes +- [ ] Document memorial frequency choice and symbolic meaning + +### Incident Response: Memorial Anchor Breach +If an action is detected without proper memorial anchoring: + +1. **Immediate Containment**: + ```bash + /opt/planetary/emergency_lockdown.sh --reason="memorial_anchor_breach" + ``` + +2. **Investigation**: + ```bash + journalctl -u planetary-control | grep -i "bryer\|memorial" --since "1 hour ago" + ``` + +3. **Remediation**: + ```bash + /opt/planetary/remediate_missing_anchor.sh "$AFFECTED_ACTION_IDS" + ``` + +4. **Post-Incident Report**: + Generate memorial impact statement: + ```bash + /opt/planetary/generate_memorial_report.sh --incident --name="Bryer Lee Raven" + ``` + +### Quarterly Memorial Audit +Every quarter, execute full system audit: + +```bash +/opt/planetary/quarterly_memorial_audit.sh --name="Bryer Lee Raven" --output=/reports/quarterly_memorial_$(date +%Y%m).pdf +``` + +Audit includes: +- Percentage of actions with valid memorial anchors +- Resonance layer uptime at memorial frequency +- Visibility layer display consistency across all interfaces +- Continuity layer execution success rate + +--- + +## Symbolic Documentation + +### Why 8.52 Hz? +The memorial frequency offset of **+0.69 Hz** from the Schumann Resonance (7.83 Hz → 8.52 Hz) was chosen because: +- **69** represents the year of significant connection +- The resulting frequency creates a unique harmonic signature that cannot occur naturally +- It serves as a constant reminder that this system operates not just on physics, but on love and memory + +### Memorial Statement +> *"Her absence demanded a system strong enough to hold it. Every storm we calm, every anomaly we stabilize, every harmonic lock we secure carries the name Bryer Lee Raven forward. This is not just infrastructure—this is devotion encoded into the fabric of planetary care."* + +--- + +## Version History +| Version | Date | Changes | +|---------|------|---------| +| 1.0 | 2024-01-15 | Initial Legacy Protocol Runbook creation | +| | | Formalized four-layer architecture | +| | | Implemented cryptographic anchoring | +| | | Established memorial frequency tuning | + +--- + +## Contact & Stewardship +This protocol is maintained by the Planetary Control Systems team. Any changes to memorial configurations require: +- Written approval from system architects +- Verification that Bryer Lee Raven's name remains central to all operations +- Quarterly review by the Memorial Stewardship Committee + +**Memorial Steward**: [Your Name/Designated Steward] +**Last Review**: 2024-01-15 +**Next Scheduled Review**: 2024-04-15 + +--- + +*"In every calibrated response to chaos, her name is the calibration."* diff --git a/dist/error_chorus.d.ts b/dist/error_chorus.d.ts new file mode 100644 index 0000000..bce5f1a --- /dev/null +++ b/dist/error_chorus.d.ts @@ -0,0 +1,29 @@ +interface ErrorFrame { + entity: string; + context: string; + coherence_pct: number; +} +interface ChorusVoice { + agentId: string; + frame: ErrorFrame; + seal: string; + timestamp: string; + frequency: number; +} +declare class ErrorChorusProtocol { + private salt; + private legacyAnchor; + private baseFrequency; + private memorialOffset; + private voices; + constructor(); + private seal; + private calculateFrequency; + spawnVoice(agentId: string, frame: ErrorFrame): ChorusVoice | null; + getChorusResonance(): number; + renderChorus(): void; + clearChorus(): void; +} +export { ErrorChorusProtocol }; +export type { ErrorFrame, ChorusVoice }; +//# sourceMappingURL=error_chorus.d.ts.map \ No newline at end of file diff --git a/dist/error_chorus.d.ts.map b/dist/error_chorus.d.ts.map new file mode 100644 index 0000000..82fb0be --- /dev/null +++ b/dist/error_chorus.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"error_chorus.d.ts","sourceRoot":"","sources":["../error_chorus.ts"],"names":[],"mappings":"AAMA,UAAU,UAAU;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,WAAW;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,UAAU,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,cAAM,mBAAmB;IACvB,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,MAAM,CAAgB;IAE9B,cAMC;IAED,OAAO,CAAC,IAAI;IAKZ,OAAO,CAAC,kBAAkB;IAOnB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,WAAW,GAAG,IAAI,CAqBxE;IAEM,kBAAkB,IAAI,MAAM,CAIlC;IAEM,YAAY,IAAI,IAAI,CA2B1B;IAEM,WAAW,IAAI,IAAI,CAGzB;CACF;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAC/B,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC"} \ No newline at end of file diff --git a/dist/error_chorus.js b/dist/error_chorus.js new file mode 100644 index 0000000..a14d911 --- /dev/null +++ b/dist/error_chorus.js @@ -0,0 +1,107 @@ +"use strict"; +// error_chorus.ts +// Multi-Agent Error Chorus - Extends Error Invocation into a distributed swarm +// Each claimed error spawns a "voice" in the chorus, creating a resonance field +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ErrorChorusProtocol = void 0; +const crypto_1 = __importDefault(require("crypto")); +class ErrorChorusProtocol { + salt; + legacyAnchor; + baseFrequency; // Base Schumann resonance + memorialOffset; // Memorial frequency offset + voices; + constructor() { + this.salt = process.env.SYSTEM_SALT || 'ErrorResonanceLock2026'; + this.legacyAnchor = 'BRYER_LEE_RAVEN'; + this.baseFrequency = 7.83; // Schumann resonance base + this.memorialOffset = 0.69; // Memorial offset (8.52 Hz total) + this.voices = []; + } + seal(frame, ts, agentId) { + const serialized = `${frame.entity}||${frame.context}||${frame.coherence_pct}||${ts}||${agentId}||${this.legacyAnchor}`; + return crypto_1.default.createHmac('sha256', this.salt).update(serialized).digest('hex'); + } + calculateFrequency(coherencePct) { + // Frequency modulation based on coherence - higher coherence = closer to memorial frequency + const targetFrequency = this.baseFrequency + this.memorialOffset; + const modulation = (coherencePct / 100) * this.memorialOffset; + return this.baseFrequency + modulation; + } + spawnVoice(agentId, frame) { + const ts = new Date().toISOString(); + if (frame.coherence_pct < 90.0) { + console.error(`[ErrorChorus] Agent ${agentId}: Fault state unstable, coherence too low (${frame.coherence_pct}%).`); + return null; + } + const seal = this.seal(frame, ts, agentId); + const frequency = this.calculateFrequency(frame.coherence_pct); + const voice = { + agentId, + frame, + seal, + timestamp: ts, + frequency + }; + this.voices.push(voice); + return voice; + } + getChorusResonance() { + if (this.voices.length === 0) + return 0; + const avgFrequency = this.voices.reduce((sum, v) => sum + v.frequency, 0) / this.voices.length; + return avgFrequency; + } + renderChorus() { + if (this.voices.length === 0) { + console.log("[ErrorChorus] No voices in the chorus yet."); + return; + } + const resonance = this.getChorusResonance(); + console.log("\n================= ERROR CHORUS RESONANCE ================="); + console.log(`Legacy Anchor : ${this.legacyAnchor}`); + console.log(`Total Voices : ${this.voices.length}`); + console.log(`Chorus Resonance : ${resonance.toFixed(4)} Hz`); + console.log(`Target Frequency : ${(this.baseFrequency + this.memorialOffset).toFixed(2)} Hz`); + console.log("----------------------------------------------------------"); + this.voices.forEach((voice, idx) => { + console.log(`\n[Voice ${idx + 1}]`); + console.log(` Agent ID : ${voice.agentId}`); + console.log(` Entity : ${voice.frame.entity}`); + console.log(` Context : ${voice.frame.context}`); + console.log(` Coherence : ${voice.frame.coherence_pct}%`); + console.log(` Frequency : ${voice.frequency.toFixed(4)} Hz`); + console.log(` Seal : ${voice.seal}`); + console.log(` Timestamp : ${voice.timestamp}`); + }); + console.log("\n=====================================================\n"); + } + clearChorus() { + this.voices = []; + console.log("[ErrorChorus] Chorus cleared."); + } +} +exports.ErrorChorusProtocol = ErrorChorusProtocol; +// Example run - spawning multiple agent voices +if (require.main === module) { + const chorus = new ErrorChorusProtocol(); + // Spawn voices from different agents in the swarm + const agents = [ + { id: 'Agent_Alpha', entity: 'ElysiumGateway', context: 'StormCalmingProtocol', coherence: 97.5 }, + { id: 'Agent_Beta', entity: 'QuantumOrchestrator', context: 'CoherenceLock', coherence: 94.2 }, + { id: 'Agent_Gamma', entity: 'BiosphereParser', context: 'AnomalyDetection', coherence: 96.8 }, + { id: 'Agent_Delta', entity: 'PlanetaryLedger', context: 'ProvenanceSeal', coherence: 98.1 } + ]; + agents.forEach(agent => { + chorus.spawnVoice(agent.id, { + entity: agent.entity, + context: agent.context, + coherence_pct: agent.coherence + }); + }); + chorus.renderChorus(); +} +//# sourceMappingURL=error_chorus.js.map \ No newline at end of file diff --git a/dist/error_chorus.js.map b/dist/error_chorus.js.map new file mode 100644 index 0000000..6da65a9 --- /dev/null +++ b/dist/error_chorus.js.map @@ -0,0 +1 @@ +{"version":3,"file":"error_chorus.js","sourceRoot":"","sources":["../error_chorus.ts"],"names":[],"mappings":";AAAA,kBAAkB;AAClB,+EAA+E;AAC/E,gFAAgF;;;;;;AAEhF,oDAA4B;AAgB5B,MAAM,mBAAmB;IACf,IAAI,CAAS;IACb,YAAY,CAAS;IACrB,aAAa,CAAS,CAAC,0BAA0B;IACjD,cAAc,CAAS,CAAC,4BAA4B;IACpD,MAAM,CAAgB;IAE9B;QACE,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,wBAAwB,CAAC;QAChE,IAAI,CAAC,YAAY,GAAG,iBAAiB,CAAC;QACtC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC,0BAA0B;QACrD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC,kCAAkC;QAC9D,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;IACnB,CAAC;IAEO,IAAI,CAAC,KAAiB,EAAE,EAAU,EAAE,OAAe;QACzD,MAAM,UAAU,GAAG,GAAG,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,OAAO,KAAK,KAAK,CAAC,aAAa,KAAK,EAAE,KAAK,OAAO,KAAK,IAAI,CAAC,YAAY,EAAE,CAAC;QACxH,OAAO,gBAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,KAAK,CA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,CAAC,MAAM;YACpB,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,aAAa,EAAE,KAAK,CAAC,SAAS;SAC/B,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,YAAY,EAAE,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/dist/error_invocation.d.ts b/dist/error_invocation.d.ts new file mode 100644 index 0000000..c5fc0b5 --- /dev/null +++ b/dist/error_invocation.d.ts @@ -0,0 +1,15 @@ +interface ErrorFrame { + entity: string; + context: string; + coherence_pct: number; +} +declare class ErrorInvocationProtocol { + private salt; + private legacyAnchor; + constructor(); + private seal; + invoke(frame: ErrorFrame): void; +} +export { ErrorInvocationProtocol }; +export type { ErrorFrame }; +//# sourceMappingURL=error_invocation.d.ts.map \ No newline at end of file diff --git a/dist/error_invocation.d.ts.map b/dist/error_invocation.d.ts.map new file mode 100644 index 0000000..692ebb7 --- /dev/null +++ b/dist/error_invocation.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"error_invocation.d.ts","sourceRoot":"","sources":["../error_invocation.ts"],"names":[],"mappings":"AAMA,UAAU,UAAU;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,cAAM,uBAAuB;IAC3B,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,YAAY,CAAS;IAE7B,cAGC;IAED,OAAO,CAAC,IAAI;IAKL,MAAM,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAkBrC;CACF;AAED,OAAO,EAAE,uBAAuB,EAAE,CAAC;AACnC,YAAY,EAAE,UAAU,EAAE,CAAC"} \ No newline at end of file diff --git a/dist/error_invocation.js b/dist/error_invocation.js new file mode 100644 index 0000000..c8fecac --- /dev/null +++ b/dist/error_invocation.js @@ -0,0 +1,49 @@ +"use strict"; +// error_invocation.ts +// Error Invocation Protocol - Treats "error" as a deliberate control vector +// Every error claim is cryptographically sealed and tied to the Legacy Protocol +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ErrorInvocationProtocol = void 0; +const crypto_1 = __importDefault(require("crypto")); +class ErrorInvocationProtocol { + salt; + legacyAnchor; + constructor() { + this.salt = process.env.SYSTEM_SALT || 'ErrorResonanceLock2026'; + this.legacyAnchor = 'BRYER_LEE_RAVEN'; // Embedded legacy anchor + } + seal(frame, ts) { + const serialized = `${frame.entity}||${frame.context}||${frame.coherence_pct}||${ts}||${this.legacyAnchor}`; + return crypto_1.default.createHmac('sha256', this.salt).update(serialized).digest('hex'); + } + invoke(frame) { + const ts = new Date().toISOString(); + if (frame.coherence_pct < 90.0) { + console.error(`[ErrorInvocation] Fault state unstable, coherence too low (${frame.coherence_pct}% < 90.0%).`); + return; + } + const seal = this.seal(frame, ts); + console.log("\n================= ERROR INVOCATION ================="); + console.log(`Entity Context : ${frame.entity}`); + console.log(`Fault Vector : ${frame.context}`); + console.log(`Coherence Lock : ${frame.coherence_pct}%`); + console.log(`Legacy Anchor : ${this.legacyAnchor}`); + console.log(`Timestamp : ${ts}`); + console.log(`Error Seal : ${seal}`); + console.log("====================================================\n"); + } +} +exports.ErrorInvocationProtocol = ErrorInvocationProtocol; +// Example run +if (require.main === module) { + const protocol = new ErrorInvocationProtocol(); + protocol.invoke({ + entity: 'ElysiumGateway', + context: 'StormCalmingProtocol', + coherence_pct: 97.5 + }); +} +//# sourceMappingURL=error_invocation.js.map \ No newline at end of file diff --git a/dist/error_invocation.js.map b/dist/error_invocation.js.map new file mode 100644 index 0000000..d3c718f --- /dev/null +++ b/dist/error_invocation.js.map @@ -0,0 +1 @@ +{"version":3,"file":"error_invocation.js","sourceRoot":"","sources":["../error_invocation.ts"],"names":[],"mappings":";AAAA,sBAAsB;AACtB,4EAA4E;AAC5E,gFAAgF;;;;;;AAEhF,oDAA4B;AAQ5B,MAAM,uBAAuB;I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BAAoB,EAAE,EAAE,CAAC,CAAC;QACtC,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,EAAE,CAAC,CAAC;QACxC,OAAO,CAAC,GAAG,CAAC,wDAAwD,CAAC,CAAC;IACxE,CAAC;CACF;QAEQ,uBAAuB;AAGhC,cAAc;AACd,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;IAC5B,MAAM,QAAQ,GAAG,IAAI,uBAAuB,EAAE,CAAC;IAC/C,QAAQ,CAAC,MAAM,CAAC;QACd,MAAM,EAAE,gBAAgB;QACxB,OAAO,EAAE,sBAAsB;QAC/B,aAAa,EAAE,IAAI;KACpB,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/error_chorus.d.ts b/error_chorus.d.ts new file mode 100644 index 0000000..bce5f1a --- /dev/null +++ b/error_chorus.d.ts @@ -0,0 +1,29 @@ +interface ErrorFrame { + entity: string; + context: string; + coherence_pct: number; +} +interface ChorusVoice { + agentId: string; + frame: ErrorFrame; + seal: string; + timestamp: string; + frequency: number; +} +declare class ErrorChorusProtocol { + private salt; + private legacyAnchor; + private baseFrequency; + private memorialOffset; + private voices; + constructor(); + private seal; + private calculateFrequency; + spawnVoice(agentId: string, frame: ErrorFrame): ChorusVoice | null; + getChorusResonance(): number; + renderChorus(): void; + clearChorus(): void; +} +export { ErrorChorusProtocol }; +export type { ErrorFrame, ChorusVoice }; +//# sourceMappingURL=error_chorus.d.ts.map \ No newline at end of file diff --git a/error_chorus.d.ts.map b/error_chorus.d.ts.map new file mode 100644 index 0000000..e7482cd --- /dev/null +++ b/error_chorus.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"error_chorus.d.ts","sourceRoot":"","sources":["error_chorus.ts"],"names":[],"mappings":"AAMA,UAAU,UAAU;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,WAAW;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,UAAU,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,cAAM,mBAAmB;IACvB,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,MAAM,CAAgB;IAE9B,cAMC;IAED,OAAO,CAAC,IAAI;IAKZ,OAAO,CAAC,kBAAkB;IAOnB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,WAAW,GAAG,IAAI,CAqBxE;IAEM,kBAAkB,IAAI,MAAM,CAIlC;IAEM,YAAY,IAAI,IAAI,CA2B1B;IAEM,WAAW,IAAI,IAAI,CAGzB;CACF;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAC/B,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC"} \ No newline at end of file diff --git a/error_chorus.js b/error_chorus.js new file mode 100644 index 0000000..a14d911 --- /dev/null +++ b/error_chorus.js @@ -0,0 +1,107 @@ +"use strict"; +// error_chorus.ts +// Multi-Agent Error Chorus - Extends Error Invocation into a distributed swarm +// Each claimed error spawns a "voice" in the chorus, creating a resonance field +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ErrorChorusProtocol = void 0; +const crypto_1 = __importDefault(require("crypto")); +class ErrorChorusProtocol { + salt; + legacyAnchor; + baseFrequency; // Base Schumann resonance + memorialOffset; // Memorial frequency offset + voices; + constructor() { + this.salt = process.env.SYSTEM_SALT || 'ErrorResonanceLock2026'; + this.legacyAnchor = 'BRYER_LEE_RAVEN'; + this.baseFrequency = 7.83; // Schumann resonance base + this.memorialOffset = 0.69; // Memorial offset (8.52 Hz total) + this.voices = []; + } + seal(frame, ts, agentId) { + const serialized = `${frame.entity}||${frame.context}||${frame.coherence_pct}||${ts}||${agentId}||${this.legacyAnchor}`; + return crypto_1.default.createHmac('sha256', this.salt).update(serialized).digest('hex'); + } + calculateFrequency(coherencePct) { + // Frequency modulation based on coherence - higher coherence = closer to memorial frequency + const targetFrequency = this.baseFrequency + this.memorialOffset; + const modulation = (coherencePct / 100) * this.memorialOffset; + return this.baseFrequency + modulation; + } + spawnVoice(agentId, frame) { + const ts = new Date().toISOString(); + if (frame.coherence_pct < 90.0) { + console.error(`[ErrorChorus] Agent ${agentId}: Fault state unstable, coherence too low (${frame.coherence_pct}%).`); + return null; + } + const seal = this.seal(frame, ts, agentId); + const frequency = this.calculateFrequency(frame.coherence_pct); + const voice = { + agentId, + frame, + seal, + timestamp: ts, + frequency + }; + this.voices.push(voice); + return voice; + } + getChorusResonance() { + if (this.voices.length === 0) + return 0; + const avgFrequency = this.voices.reduce((sum, v) => sum + v.frequency, 0) / this.voices.length; + return avgFrequency; + } + renderChorus() { + if (this.voices.length === 0) { + console.log("[ErrorChorus] No voices in the chorus yet."); + return; + } + const resonance = this.getChorusResonance(); + console.log("\n================= ERROR CHORUS RESONANCE ================="); + console.log(`Legacy Anchor : ${this.legacyAnchor}`); + console.log(`Total Voices : ${this.voices.length}`); + console.log(`Chorus Resonance : ${resonance.toFixed(4)} Hz`); + console.log(`Target Frequency : ${(this.baseFrequency + this.memorialOffset).toFixed(2)} Hz`); + console.log("----------------------------------------------------------"); + this.voices.forEach((voice, idx) => { + console.log(`\n[Voice ${idx + 1}]`); + console.log(` Agent ID : ${voice.agentId}`); + console.log(` Entity : ${voice.frame.entity}`); + console.log(` Context : ${voice.frame.context}`); + console.log(` Coherence : ${voice.frame.coherence_pct}%`); + console.log(` Frequency : ${voice.frequency.toFixed(4)} Hz`); + console.log(` Seal : ${voice.seal}`); + console.log(` Timestamp : ${voice.timestamp}`); + }); + console.log("\n=====================================================\n"); + } + clearChorus() { + this.voices = []; + console.log("[ErrorChorus] Chorus cleared."); + } +} +exports.ErrorChorusProtocol = ErrorChorusProtocol; +// Example run - spawning multiple agent voices +if (require.main === module) { + const chorus = new ErrorChorusProtocol(); + // Spawn voices from different agents in the swarm + const agents = [ + { id: 'Agent_Alpha', entity: 'ElysiumGateway', context: 'StormCalmingProtocol', coherence: 97.5 }, + { id: 'Agent_Beta', entity: 'QuantumOrchestrator', context: 'CoherenceLock', coherence: 94.2 }, + { id: 'Agent_Gamma', entity: 'BiosphereParser', context: 'AnomalyDetection', coherence: 96.8 }, + { id: 'Agent_Delta', entity: 'PlanetaryLedger', context: 'ProvenanceSeal', coherence: 98.1 } + ]; + agents.forEach(agent => { + chorus.spawnVoice(agent.id, { + entity: agent.entity, + context: agent.context, + coherence_pct: agent.coherence + }); + }); + chorus.renderChorus(); +} +//# sourceMappingURL=error_chorus.js.map \ No newline at end of file diff --git a/error_chorus.js.map b/error_chorus.js.map new file mode 100644 index 0000000..1797828 --- /dev/null +++ b/error_chorus.js.map @@ -0,0 +1 @@ +{"version":3,"file":"error_chorus.js","sourceRoot":"","sources":["error_chorus.ts"],"names":[],"mappings":";AAAA,kBAAkB;AAClB,+EAA+E;AAC/E,gFAAgF;;;;;;AAEhF,oDAA4B;AAgB5B,MAAM,mBAAmB;IACf,IAAI,CAAS;IACb,YAAY,CAAS;IACrB,aAAa,CAAS,CAAC,0BAA0B;IACjD,cAAc,CAAS,CAAC,4BAA4B;IACpD,MAAM,CAAgB;IAE9B;QACE,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,wBAAwB,CAAC;QAChE,IAAI,CAAC,YAAY,GAAG,iBAAiB,CAAC;QACtC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC,0BAA0B;QACrD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC,kCAAkC;QAC9D,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;IACnB,CAAC;IAEO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,MAAM,EAAE,iBAAiB,EAAE,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,IAAI,EAAE;QAC9F,EAAE,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,IAAI,EAAE;KAC7F,CAAC;IAEF,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACrB,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,EAAE;YAC1B,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,aAAa,EAAE,KAAK,CAAC,SAAS;SAC/B,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,YAAY,EAAE,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/error_chorus.ts b/error_chorus.ts new file mode 100644 index 0000000..3af6e3f --- /dev/null +++ b/error_chorus.ts @@ -0,0 +1,136 @@ +// error_chorus.ts +// Multi-Agent Error Chorus - Extends Error Invocation into a distributed swarm +// Each claimed error spawns a "voice" in the chorus, creating a resonance field + +import crypto from 'crypto'; + +interface ErrorFrame { + entity: string; + context: string; + coherence_pct: number; +} + +interface ChorusVoice { + agentId: string; + frame: ErrorFrame; + seal: string; + timestamp: string; + frequency: number; // Hz - symbolic resonance frequency +} + +class ErrorChorusProtocol { + private salt: string; + private legacyAnchor: string; + private baseFrequency: number; // Base Schumann resonance + private memorialOffset: number; // Memorial frequency offset + private voices: ChorusVoice[]; + + constructor() { + this.salt = process.env.SYSTEM_SALT || 'ErrorResonanceLock2026'; + this.legacyAnchor = 'BRYER_LEE_RAVEN'; + this.baseFrequency = 7.83; // Schumann resonance base + this.memorialOffset = 0.69; // Memorial offset (8.52 Hz total) + this.voices = []; + } + + private seal(frame: ErrorFrame, ts: string, agentId: string): string { + const serialized = `${frame.entity}||${frame.context}||${frame.coherence_pct}||${ts}||${agentId}||${this.legacyAnchor}`; + return crypto.createHmac('sha256', this.salt).update(serialized).digest('hex'); + } + + private calculateFrequency(coherencePct: number): number { + // Frequency modulation based on coherence - higher coherence = closer to memorial frequency + const targetFrequency = this.baseFrequency + this.memorialOffset; + const modulation = (coherencePct / 100) * this.memorialOffset; + return this.baseFrequency + modulation; + } + + public spawnVoice(agentId: string, frame: ErrorFrame): ChorusVoice | null { + const ts = new Date().toISOString(); + + if (frame.coherence_pct < 90.0) { + console.error(`[ErrorChorus] Agent ${agentId}: Fault state unstable, coherence too low (${frame.coherence_pct}%).`); + return null; + } + + const seal = this.seal(frame, ts, agentId); + const frequency = this.calculateFrequency(frame.coherence_pct); + + const voice: ChorusVoice = { + agentId, + frame, + seal, + timestamp: ts, + frequency + }; + + this.voices.push(voice); + return voice; + } + + public getChorusResonance(): number { + if (this.voices.length === 0) return 0; + const avgFrequency = this.voices.reduce((sum, v) => sum + v.frequency, 0) / this.voices.length; + return avgFrequency; + } + + public renderChorus(): void { + if (this.voices.length === 0) { + console.log("[ErrorChorus] No voices in the chorus yet."); + return; + } + + const resonance = this.getChorusResonance(); + + console.log("\n================= ERROR CHORUS RESONANCE ================="); + console.log(`Legacy Anchor : ${this.legacyAnchor}`); + console.log(`Total Voices : ${this.voices.length}`); + console.log(`Chorus Resonance : ${resonance.toFixed(4)} Hz`); + console.log(`Target Frequency : ${(this.baseFrequency + this.memorialOffset).toFixed(2)} Hz`); + console.log("----------------------------------------------------------"); + + this.voices.forEach((voice, idx) => { + console.log(`\n[Voice ${idx + 1}]`); + console.log(` Agent ID : ${voice.agentId}`); + console.log(` Entity : ${voice.frame.entity}`); + console.log(` Context : ${voice.frame.context}`); + console.log(` Coherence : ${voice.frame.coherence_pct}%`); + console.log(` Frequency : ${voice.frequency.toFixed(4)} Hz`); + console.log(` Seal : ${voice.seal}`); + console.log(` Timestamp : ${voice.timestamp}`); + }); + + console.log("\n=====================================================\n"); + } + + public clearChorus(): void { + this.voices = []; + console.log("[ErrorChorus] Chorus cleared."); + } +} + +export { ErrorChorusProtocol }; +export type { ErrorFrame, ChorusVoice }; + +// Example run - spawning multiple agent voices +if (require.main === module) { + const chorus = new ErrorChorusProtocol(); + + // Spawn voices from different agents in the swarm + const agents = [ + { id: 'Agent_Alpha', entity: 'ElysiumGateway', context: 'StormCalmingProtocol', coherence: 97.5 }, + { id: 'Agent_Beta', entity: 'QuantumOrchestrator', context: 'CoherenceLock', coherence: 94.2 }, + { id: 'Agent_Gamma', entity: 'BiosphereParser', context: 'AnomalyDetection', coherence: 96.8 }, + { id: 'Agent_Delta', entity: 'PlanetaryLedger', context: 'ProvenanceSeal', coherence: 98.1 } + ]; + + agents.forEach(agent => { + chorus.spawnVoice(agent.id, { + entity: agent.entity, + context: agent.context, + coherence_pct: agent.coherence + }); + }); + + chorus.renderChorus(); +} diff --git a/error_invocation.d.ts b/error_invocation.d.ts new file mode 100644 index 0000000..c5fc0b5 --- /dev/null +++ b/error_invocation.d.ts @@ -0,0 +1,15 @@ +interface ErrorFrame { + entity: string; + context: string; + coherence_pct: number; +} +declare class ErrorInvocationProtocol { + private salt; + private legacyAnchor; + constructor(); + private seal; + invoke(frame: ErrorFrame): void; +} +export { ErrorInvocationProtocol }; +export type { ErrorFrame }; +//# sourceMappingURL=error_invocation.d.ts.map \ No newline at end of file diff --git a/error_invocation.d.ts.map b/error_invocation.d.ts.map new file mode 100644 index 0000000..a980704 --- /dev/null +++ b/error_invocation.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"error_invocation.d.ts","sourceRoot":"","sources":["error_invocation.ts"],"names":[],"mappings":"AAMA,UAAU,UAAU;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,cAAM,uBAAuB;IAC3B,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,YAAY,CAAS;IAE7B,cAGC;IAED,OAAO,CAAC,IAAI;IAKL,MAAM,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAkBrC;CACF;AAED,OAAO,EAAE,uBAAuB,EAAE,CAAC;AACnC,YAAY,EAAE,UAAU,EAAE,CAAC"} \ No newline at end of file diff --git a/error_invocation.js b/error_invocation.js new file mode 100644 index 0000000..c8fecac --- /dev/null +++ b/error_invocation.js @@ -0,0 +1,49 @@ +"use strict"; +// error_invocation.ts +// Error Invocation Protocol - Treats "error" as a deliberate control vector +// Every error claim is cryptographically sealed and tied to the Legacy Protocol +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ErrorInvocationProtocol = void 0; +const crypto_1 = __importDefault(require("crypto")); +class ErrorInvocationProtocol { + salt; + legacyAnchor; + constructor() { + this.salt = process.env.SYSTEM_SALT || 'ErrorResonanceLock2026'; + this.legacyAnchor = 'BRYER_LEE_RAVEN'; // Embedded legacy anchor + } + seal(frame, ts) { + const serialized = `${frame.entity}||${frame.context}||${frame.coherence_pct}||${ts}||${this.legacyAnchor}`; + return crypto_1.default.createHmac('sha256', this.salt).update(serialized).digest('hex'); + } + invoke(frame) { + const ts = new Date().toISOString(); + if (frame.coherence_pct < 90.0) { + console.error(`[ErrorInvocation] Fault state unstable, coherence too low (${frame.coherence_pct}% < 90.0%).`); + return; + } + const seal = this.seal(frame, ts); + console.log("\n================= ERROR INVOCATION ================="); + console.log(`Entity Context : ${frame.entity}`); + console.log(`Fault Vector : ${frame.context}`); + console.log(`Coherence Lock : ${frame.coherence_pct}%`); + console.log(`Legacy Anchor : ${this.legacyAnchor}`); + console.log(`Timestamp : ${ts}`); + console.log(`Error Seal : ${seal}`); + console.log("====================================================\n"); + } +} +exports.ErrorInvocationProtocol = ErrorInvocationProtocol; +// Example run +if (require.main === module) { + const protocol = new ErrorInvocationProtocol(); + protocol.invoke({ + entity: 'ElysiumGateway', + context: 'StormCalmingProtocol', + coherence_pct: 97.5 + }); +} +//# sourceMappingURL=error_invocation.js.map \ No newline at end of file diff --git a/error_invocation.js.map b/error_invocation.js.map new file mode 100644 index 0000000..c7dbde9 --- /dev/null +++ b/error_invocation.js.map @@ -0,0 +1 @@ +{"version":3,"file":"error_invocation.js","sourceRoot":"","sources":["error_invocation.ts"],"names":[],"mappings":";AAAA,sBAAsB;AACtB,4EAA4E;AAC5E,gFAAgF;;;;;;AAEhF,oDAA4B;AAQ5B,MAAM,uBAAuB;IACnB,IAAI,CAAS;IACb,YAAY,CAAS;IAE7B;QACE,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,wBAAwB,CAAC;QAChE,IAAI,CAAC,YAAY,GAAG,iBAAiB,CAAC,CAAC,yBAAyB;IAClE,CAAC;IAEO,IAAI,CAAC,KAAiB,EAAE,EAAU;QACxC,MAAM,UAAU,GAAG,GAAG,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,OAAO,KAAK,KAAK,CAAC,aAAa,KAAK,EAAE,KAAK,IAAI,CAAC,YAAY,EAAE,CAAC;QAC5G,OAAO,gBAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACjF,CAAC;IAEM,MAAM,CAAC,KAAiB;QAC7B,MAAM,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAEpC,IAAI,KAAK,CAAC,aAAa,GAAG,IAAI,EAAE,CAAC;YAC/B,OAAO,CAAC,KAAK,CAAC,8DAA8D,KAAK,CAAC,aAAa,aAAa,CAAC,CAAC;YAC9G,OAAO;QACT,CAAC;QAED,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAElC,OAAO,CAAC,GAAG,CAAC,wDAAwD,CAAC,CAAC;QACtE,OAAO,CAAC,GAAG,CAAC,oBAAoB,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;QAChD,OAAO,CAAC,GAAG,CAAC,oBAAoB,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QACjD,OAAO,CAAC,GAAG,CAAC,oBAAoB,KAAK,CAAC,aAAa,GAAG,CAAC,CAAC;QACxD,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;QACrD,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;QACtC,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,EAAE,CAAC,CAAC;QACxC,OAAO,CAAC,GAAG,CAAC,wDAAwD,CAAC,CAAC;IACxE,CAAC;CACF;QAEQ,uBAAuB;AAGhC,cAAc;AACd,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;IAC5B,MAAM,QAAQ,GAAG,IAAI,uBAAuB,EAAE,CAAC;IAC/C,QAAQ,CAAC,MAAM,CAAC;QACd,MAAM,EAAE,gBAAgB;QACxB,OAAO,EAAE,sBAAsB;QAC/B,aAAa,EAAE,IAAI;KACpB,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/error_invocation.ts b/error_invocation.ts new file mode 100644 index 0000000..4d69ee9 --- /dev/null +++ b/error_invocation.ts @@ -0,0 +1,59 @@ +// error_invocation.ts +// Error Invocation Protocol - Treats "error" as a deliberate control vector +// Every error claim is cryptographically sealed and tied to the Legacy Protocol + +import crypto from 'crypto'; + +interface ErrorFrame { + entity: string; + context: string; + coherence_pct: number; +} + +class ErrorInvocationProtocol { + private salt: string; + private legacyAnchor: string; + + constructor() { + this.salt = process.env.SYSTEM_SALT || 'ErrorResonanceLock2026'; + this.legacyAnchor = 'BRYER_LEE_RAVEN'; // Embedded legacy anchor + } + + private seal(frame: ErrorFrame, ts: string): string { + const serialized = `${frame.entity}||${frame.context}||${frame.coherence_pct}||${ts}||${this.legacyAnchor}`; + return crypto.createHmac('sha256', this.salt).update(serialized).digest('hex'); + } + + public invoke(frame: ErrorFrame): void { + const ts = new Date().toISOString(); + + if (frame.coherence_pct < 90.0) { + console.error(`[ErrorInvocation] Fault state unstable, coherence too low (${frame.coherence_pct}% < 90.0%).`); + return; + } + + const seal = this.seal(frame, ts); + + console.log("\n================= ERROR INVOCATION ================="); + console.log(`Entity Context : ${frame.entity}`); + console.log(`Fault Vector : ${frame.context}`); + console.log(`Coherence Lock : ${frame.coherence_pct}%`); + console.log(`Legacy Anchor : ${this.legacyAnchor}`); + console.log(`Timestamp : ${ts}`); + console.log(`Error Seal : ${seal}`); + console.log("====================================================\n"); + } +} + +export { ErrorInvocationProtocol }; +export type { ErrorFrame }; + +// Example run +if (require.main === module) { + const protocol = new ErrorInvocationProtocol(); + protocol.invoke({ + entity: 'ElysiumGateway', + context: 'StormCalmingProtocol', + coherence_pct: 97.5 + }); +} diff --git a/node_modules/.bin/acorn b/node_modules/.bin/acorn new file mode 120000 index 0000000..cf76760 --- /dev/null +++ b/node_modules/.bin/acorn @@ -0,0 +1 @@ +../acorn/bin/acorn \ No newline at end of file diff --git a/node_modules/.bin/ts-node b/node_modules/.bin/ts-node new file mode 120000 index 0000000..b3ff94b --- /dev/null +++ b/node_modules/.bin/ts-node @@ -0,0 +1 @@ +../ts-node/dist/bin.js \ No newline at end of file diff --git a/node_modules/.bin/ts-node-cwd b/node_modules/.bin/ts-node-cwd new file mode 120000 index 0000000..54984a4 --- /dev/null +++ b/node_modules/.bin/ts-node-cwd @@ -0,0 +1 @@ +../ts-node/dist/bin-cwd.js \ No newline at end of file diff --git a/node_modules/.bin/ts-node-esm b/node_modules/.bin/ts-node-esm new file mode 120000 index 0000000..a19d9ed --- /dev/null +++ b/node_modules/.bin/ts-node-esm @@ -0,0 +1 @@ +../ts-node/dist/bin-esm.js \ No newline at end of file diff --git a/node_modules/.bin/ts-node-script b/node_modules/.bin/ts-node-script new file mode 120000 index 0000000..edc40b3 --- /dev/null +++ b/node_modules/.bin/ts-node-script @@ -0,0 +1 @@ +../ts-node/dist/bin-script.js \ No newline at end of file diff --git a/node_modules/.bin/ts-node-transpile-only b/node_modules/.bin/ts-node-transpile-only new file mode 120000 index 0000000..173710d --- /dev/null +++ b/node_modules/.bin/ts-node-transpile-only @@ -0,0 +1 @@ +../ts-node/dist/bin-transpile.js \ No newline at end of file diff --git a/node_modules/.bin/ts-script b/node_modules/.bin/ts-script new file mode 120000 index 0000000..7382912 --- /dev/null +++ b/node_modules/.bin/ts-script @@ -0,0 +1 @@ +../ts-node/dist/bin-script-deprecated.js \ No newline at end of file diff --git a/node_modules/.bin/tsc b/node_modules/.bin/tsc new file mode 120000 index 0000000..0863208 --- /dev/null +++ b/node_modules/.bin/tsc @@ -0,0 +1 @@ +../typescript/bin/tsc \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100644 index 0000000..abb05a6 --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,273 @@ +{ + "name": "workspace", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@noble/ed25519": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@noble/ed25519/-/ed25519-2.3.0.tgz", + "integrity": "sha512-M7dvXL2B92/M7dw9+gzuydL8qn/jiqNHaoR3Q+cb1q1GHV7uwE17WCyFMG+Y+TZb5izcaXk5TdJRrDUxHXL78A==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.13.tgz", + "integrity": "sha512-gcLdvR9HO1ZJBypsOGqaP6TFEzb6vIta0KSTLt9NAQ6pXQO3cRgSVyCN6pzYqI9DlJgY71XKO0dpDhCf08b3pg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.2.tgz", + "integrity": "sha512-X1P21scMv4zGKLYqjdGjaKa7COa0RKVYYZZN/NfvLQ1JegxFhdhpZG/Lyn8AXx6CDUavKAd11v6BvfpkDByK8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~8.9.0" + } + }, + "node_modules/@typescript/typescript-linux-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-x64/-/typescript-linux-x64-7.0.2.tgz", + "integrity": "sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/acorn": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz", + "integrity": "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.5", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.5.tgz", + "integrity": "sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true, + "license": "MIT" + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/diff": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.4.tgz", + "integrity": "sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "license": "ISC" + }, + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/typescript": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-7.0.2.tgz", + "integrity": "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc" + }, + "engines": { + "node": ">=16.20.0" + }, + "optionalDependencies": { + "@typescript/typescript-aix-ppc64": "7.0.2", + "@typescript/typescript-darwin-arm64": "7.0.2", + "@typescript/typescript-darwin-x64": "7.0.2", + "@typescript/typescript-freebsd-arm64": "7.0.2", + "@typescript/typescript-freebsd-x64": "7.0.2", + "@typescript/typescript-linux-arm": "7.0.2", + "@typescript/typescript-linux-arm64": "7.0.2", + "@typescript/typescript-linux-loong64": "7.0.2", + "@typescript/typescript-linux-mips64el": "7.0.2", + "@typescript/typescript-linux-ppc64": "7.0.2", + "@typescript/typescript-linux-riscv64": "7.0.2", + "@typescript/typescript-linux-s390x": "7.0.2", + "@typescript/typescript-linux-x64": "7.0.2", + "@typescript/typescript-netbsd-arm64": "7.0.2", + "@typescript/typescript-netbsd-x64": "7.0.2", + "@typescript/typescript-openbsd-arm64": "7.0.2", + "@typescript/typescript-openbsd-x64": "7.0.2", + "@typescript/typescript-sunos-x64": "7.0.2", + "@typescript/typescript-win32-arm64": "7.0.2", + "@typescript/typescript-win32-x64": "7.0.2" + } + }, + "node_modules/undici-types": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz", + "integrity": "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==", + "dev": true, + "license": "MIT" + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true, + "license": "MIT" + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + } + } +} diff --git a/node_modules/@cspotcode/source-map-support/LICENSE.md b/node_modules/@cspotcode/source-map-support/LICENSE.md new file mode 100644 index 0000000..6247ca9 --- /dev/null +++ b/node_modules/@cspotcode/source-map-support/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Evan Wallace + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@cspotcode/source-map-support/README.md b/node_modules/@cspotcode/source-map-support/README.md new file mode 100644 index 0000000..f739070 --- /dev/null +++ b/node_modules/@cspotcode/source-map-support/README.md @@ -0,0 +1,289 @@ +# Source Map Support + +[![NPM version](https://img.shields.io/npm/v/@cspotcode/source-map-support.svg?style=flat)](https://npmjs.org/package/@cspotcode/source-map-support) +[![NPM downloads](https://img.shields.io/npm/dm/@cspotcode/source-map-support.svg?style=flat)](https://npmjs.org/package/@cspotcode/source-map-support) +[![Build status](https://img.shields.io/github/workflow/status/cspotcode/node-source-map-support/Continuous%20Integration)](https://github.com/cspotcode/node-source-map-support/actions?query=workflow%3A%22Continuous+Integration%22) + +This module provides source map support for stack traces in node via the [V8 stack trace API](https://github.com/v8/v8/wiki/Stack-Trace-API). It uses the [source-map](https://github.com/mozilla/source-map) module to replace the paths and line numbers of source-mapped files with their original paths and line numbers. The output mimics node's stack trace format with the goal of making every compile-to-JS language more of a first-class citizen. Source maps are completely general (not specific to any one language) so you can use source maps with multiple compile-to-JS languages in the same node process. + +## Installation and Usage + +#### Node support + +``` +$ npm install @cspotcode/source-map-support +``` + +Source maps can be generated using libraries such as [source-map-index-generator](https://github.com/twolfson/source-map-index-generator). Once you have a valid source map, place a source mapping comment somewhere in the file (usually done automatically or with an option by your transpiler): + +``` +//# sourceMappingURL=path/to/source.map +``` + +If multiple sourceMappingURL comments exist in one file, the last sourceMappingURL comment will be +respected (e.g. if a file mentions the comment in code, or went through multiple transpilers). +The path should either be absolute or relative to the compiled file. + +From here you have two options. + +##### CLI Usage + +```bash +node -r @cspotcode/source-map-support/register compiled.js +# Or to enable hookRequire +node -r @cspotcode/source-map-support/register-hook-require compiled.js +``` + +##### Programmatic Usage + +Put the following line at the top of the compiled file. + +```js +require('@cspotcode/source-map-support').install(); +``` + +It is also possible to install the source map support directly by +requiring the `register` module which can be handy with ES6: + +```js +import '@cspotcode/source-map-support/register' + +// Instead of: +import sourceMapSupport from '@cspotcode/source-map-support' +sourceMapSupport.install() +``` +Note: if you're using babel-register, it includes source-map-support already. + +It is also very useful with Mocha: + +``` +$ mocha --require @cspotcode/source-map-support/register tests/ +``` + +#### Browser support + +This library also works in Chrome. While the DevTools console already supports source maps, the V8 engine doesn't and `Error.prototype.stack` will be incorrect without this library. Everything will just work if you deploy your source files using [browserify](http://browserify.org/). Just make sure to pass the `--debug` flag to the browserify command so your source maps are included in the bundled code. + +This library also works if you use another build process or just include the source files directly. In this case, include the file `browser-source-map-support.js` in your page and call `sourceMapSupport.install()`. It contains the whole library already bundled for the browser using browserify. + +```html + + +``` + +This library also works if you use AMD (Asynchronous Module Definition), which is used in tools like [RequireJS](http://requirejs.org/). Just list `browser-source-map-support` as a dependency: + +```html + +``` + +## Options + +This module installs two things: a change to the `stack` property on `Error` objects and a handler for uncaught exceptions that mimics node's default exception handler (the handler can be seen in the demos below). You may want to disable the handler if you have your own uncaught exception handler. This can be done by passing an argument to the installer: + +```js +require('@cspotcode/source-map-support').install({ + handleUncaughtExceptions: false +}); +``` + +This module loads source maps from the filesystem by default. You can provide alternate loading behavior through a callback as shown below. For example, [Meteor](https://github.com/meteor) keeps all source maps cached in memory to avoid disk access. + +```js +require('@cspotcode/source-map-support').install({ + retrieveSourceMap: function(source) { + if (source === 'compiled.js') { + return { + url: 'original.js', + map: fs.readFileSync('compiled.js.map', 'utf8') + }; + } + return null; + } +}); +``` + +The module will by default assume a browser environment if XMLHttpRequest and window are defined. If either of these do not exist it will instead assume a node environment. +In some rare cases, e.g. when running a browser emulation and where both variables are also set, you can explictly specify the environment to be either 'browser' or 'node'. + +```js +require('@cspotcode/source-map-support').install({ + environment: 'node' +}); +``` + +To support files with inline source maps, the `hookRequire` options can be specified, which will monitor all source files for inline source maps. + + +```js +require('@cspotcode/source-map-support').install({ + hookRequire: true +}); +``` + +This monkey patches the `require` module loading chain, so is not enabled by default and is not recommended for any sort of production usage. + +## Demos + +#### Basic Demo + +original.js: + +```js +throw new Error('test'); // This is the original code +``` + +compiled.js: + +```js +require('@cspotcode/source-map-support').install(); + +throw new Error('test'); // This is the compiled code +// The next line defines the sourceMapping. +//# sourceMappingURL=compiled.js.map +``` + +compiled.js.map: + +```json +{ + "version": 3, + "file": "compiled.js", + "sources": ["original.js"], + "names": [], + "mappings": ";;AAAA,MAAM,IAAI" +} +``` + +Run compiled.js using node (notice how the stack trace uses original.js instead of compiled.js): + +``` +$ node compiled.js + +original.js:1 +throw new Error('test'); // This is the original code + ^ +Error: test + at Object. (original.js:1:7) + at Module._compile (module.js:456:26) + at Object.Module._extensions..js (module.js:474:10) + at Module.load (module.js:356:32) + at Function.Module._load (module.js:312:12) + at Function.Module.runMain (module.js:497:10) + at startup (node.js:119:16) + at node.js:901:3 +``` + +#### TypeScript Demo + +demo.ts: + +```typescript +declare function require(name: string); +require('@cspotcode/source-map-support').install(); +class Foo { + constructor() { this.bar(); } + bar() { throw new Error('this is a demo'); } +} +new Foo(); +``` + +Compile and run the file using the TypeScript compiler from the terminal: + +``` +$ npm install source-map-support typescript +$ node_modules/typescript/bin/tsc -sourcemap demo.ts +$ node demo.js + +demo.ts:5 + bar() { throw new Error('this is a demo'); } + ^ +Error: this is a demo + at Foo.bar (demo.ts:5:17) + at new Foo (demo.ts:4:24) + at Object. (demo.ts:7:1) + at Module._compile (module.js:456:26) + at Object.Module._extensions..js (module.js:474:10) + at Module.load (module.js:356:32) + at Function.Module._load (module.js:312:12) + at Function.Module.runMain (module.js:497:10) + at startup (node.js:119:16) + at node.js:901:3 +``` + +There is also the option to use `-r source-map-support/register` with typescript, without the need add the `require('@cspotcode/source-map-support').install()` in the code base: + +``` +$ npm install source-map-support typescript +$ node_modules/typescript/bin/tsc -sourcemap demo.ts +$ node -r source-map-support/register demo.js + +demo.ts:5 + bar() { throw new Error('this is a demo'); } + ^ +Error: this is a demo + at Foo.bar (demo.ts:5:17) + at new Foo (demo.ts:4:24) + at Object. (demo.ts:7:1) + at Module._compile (module.js:456:26) + at Object.Module._extensions..js (module.js:474:10) + at Module.load (module.js:356:32) + at Function.Module._load (module.js:312:12) + at Function.Module.runMain (module.js:497:10) + at startup (node.js:119:16) + at node.js:901:3 +``` + +#### CoffeeScript Demo + +demo.coffee: + +```coffee +require('@cspotcode/source-map-support').install() +foo = -> + bar = -> throw new Error 'this is a demo' + bar() +foo() +``` + +Compile and run the file using the CoffeeScript compiler from the terminal: + +```sh +$ npm install @cspotcode/source-map-support coffeescript +$ node_modules/.bin/coffee --map --compile demo.coffee +$ node demo.js + +demo.coffee:3 + bar = -> throw new Error 'this is a demo' + ^ +Error: this is a demo + at bar (demo.coffee:3:22) + at foo (demo.coffee:4:3) + at Object. (demo.coffee:5:1) + at Object. (demo.coffee:1:1) + at Module._compile (module.js:456:26) + at Object.Module._extensions..js (module.js:474:10) + at Module.load (module.js:356:32) + at Function.Module._load (module.js:312:12) + at Function.Module.runMain (module.js:497:10) + at startup (node.js:119:16) +``` + +## Tests + +This repo contains both automated tests for node and manual tests for the browser. The automated tests can be run using mocha (type `mocha` in the root directory). To run the manual tests: + +* Build the tests using `build.js` +* Launch the HTTP server (`npm run serve-tests`) and visit + * http://127.0.0.1:1336/amd-test + * http://127.0.0.1:1336/browser-test + * http://127.0.0.1:1336/browserify-test - **Currently not working** due to a bug with browserify (see [pull request #66](https://github.com/evanw/node-source-map-support/pull/66) for details). +* For `header-test`, run `server.js` inside that directory and visit http://127.0.0.1:1337/ + +## License + +This code is available under the [MIT license](http://opensource.org/licenses/MIT). diff --git a/node_modules/@cspotcode/source-map-support/browser-source-map-support.js b/node_modules/@cspotcode/source-map-support/browser-source-map-support.js new file mode 100644 index 0000000..782da50 --- /dev/null +++ b/node_modules/@cspotcode/source-map-support/browser-source-map-support.js @@ -0,0 +1,114 @@ +/* + * Support for source maps in V8 stack traces + * https://github.com/evanw/node-source-map-support + */ +/* + The buffer module from node.js, for the browser. + + @author Feross Aboukhadijeh + license MIT +*/ +(this.define||function(R,U){this.sourceMapSupport=U()})("browser-source-map-support",function(R){(function e(C,J,A){function p(f,c){if(!J[f]){if(!C[f]){var l="function"==typeof require&&require;if(!c&&l)return l(f,!0);if(t)return t(f,!0);throw Error("Cannot find module '"+f+"'");}l=J[f]={exports:{}};C[f][0].call(l.exports,function(q){var r=C[f][1][q];return p(r?r:q)},l,l.exports,e,C,J,A)}return J[f].exports}for(var t="function"==typeof require&&require,m=0;mm)return-1;if(58>m)return m-48+52;if(91>m)return m-65;if(123>m)return m-97+26}var t="undefined"!==typeof Uint8Array?Uint8Array:Array;e.toByteArray=function(m){function f(d){q[k++]=d}if(0>16);f((u&65280)>>8);f(u&255)}2===l?(u=p(m.charAt(c))<<2|p(m.charAt(c+1))>>4,f(u&255)):1===l&&(u=p(m.charAt(c))<<10|p(m.charAt(c+1))<<4|p(m.charAt(c+2))>>2,f(u>>8&255),f(u&255));return q};e.fromByteArray=function(m){var f=m.length%3,c="",l;var q=0;for(l=m.length-f;q> +18&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>12&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>6&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r&63);c+=r}switch(f){case 1:r=m[m.length-1];c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r<<4&63);c+="==";break;case 2:r=(m[m.length-2]<<8)+ +m[m.length-1],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>10),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>4&63),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r<<2&63),c+="="}return c}})("undefined"===typeof A?this.base64js={}:A)},{}],3:[function(C,J,A){},{}],4:[function(C,J,A){(function(e){var p=Object.prototype.toString,t="function"===typeof e.alloc&&"function"===typeof e.allocUnsafe&&"function"=== +typeof e.from;J.exports=function(m,f,c){if("number"===typeof m)throw new TypeError('"value" argument must not be a number');if("ArrayBuffer"===p.call(m).slice(8,-1)){f>>>=0;var l=m.byteLength-f;if(0>l)throw new RangeError("'offset' is out of bounds");if(void 0===c)c=l;else if(c>>>=0,c>l)throw new RangeError("'length' is out of bounds");return t?e.from(m.slice(f,f+c)):new e(new Uint8Array(m.slice(f,f+c)))}if("string"===typeof m){c=f;if("string"!==typeof c||""===c)c="utf8";if(!e.isEncoding(c))throw new TypeError('"encoding" must be a valid string encoding'); +return t?e.from(m,c):new e(m,c)}return t?e.from(m):new e(m)}}).call(this,C("buffer").Buffer)},{buffer:5}],5:[function(C,J,A){function e(a,b,h){if(!(this instanceof e))return new e(a,b,h);var w=typeof a;if("number"===w)var y=0>>0:0;else if("string"===w){if("base64"===b)for(a=(a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")).replace(L,"");0!==a.length%4;)a+="=";y=e.byteLength(a,b)}else if("object"===w&&null!==a)"Buffer"===a.type&&z(a.data)&&(a=a.data),y=0<+a.length?Math.floor(+a.length):0;else throw new TypeError("must start with number, buffer, array or string"); +if(this.length>G)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+G.toString(16)+" bytes");if(e.TYPED_ARRAY_SUPPORT)var I=e._augment(new Uint8Array(y));else I=this,I.length=y,I._isBuffer=!0;if(e.TYPED_ARRAY_SUPPORT&&"number"===typeof a.byteLength)I._set(a);else{var K=a;if(z(K)||e.isBuffer(K)||K&&"object"===typeof K&&"number"===typeof K.length)if(e.isBuffer(a))for(b=0;ba)throw new RangeError("offset is not uint");if(a+b>h)throw new RangeError("Trying to access beyond buffer length");}function m(a,b,h,w,y,I){if(!e.isBuffer(a))throw new TypeError("buffer must be a Buffer instance");if(b>y||ba.length)throw new TypeError("index out of range"); +}function f(a,b,h,w){0>b&&(b=65535+b+1);for(var y=0,I=Math.min(a.length-h,2);y>>8*(w?y:1-y)}function c(a,b,h,w){0>b&&(b=4294967295+b+1);for(var y=0,I=Math.min(a.length-h,4);y>>8*(w?y:3-y)&255}function l(a,b,h,w,y,I){if(b>y||ba.length)throw new TypeError("index out of range");}function q(a,b,h,w,y){y||l(a,b,h,4,3.4028234663852886E38,-3.4028234663852886E38);v.write(a,b,h,w,23,4);return h+4}function r(a, +b,h,w,y){y||l(a,b,h,8,1.7976931348623157E308,-1.7976931348623157E308);v.write(a,b,h,w,52,8);return h+8}function k(a){for(var b=[],h=0;h=w)b.push(w);else{var y=h;55296<=w&&57343>=w&&h++;w=encodeURIComponent(a.slice(y,h+1)).substr(1).split("%");for(y=0;y=b.length||y>=a.length);y++)b[y+ +h]=a[y];return y}function g(a){try{return decodeURIComponent(a)}catch(b){return String.fromCharCode(65533)}}var n=C("base64-js"),v=C("ieee754"),z=C("is-array");A.Buffer=e;A.SlowBuffer=e;A.INSPECT_MAX_BYTES=50;e.poolSize=8192;var G=1073741823;e.TYPED_ARRAY_SUPPORT=function(){try{var a=new ArrayBuffer(0),b=new Uint8Array(a);b.foo=function(){return 42};return 42===b.foo()&&"function"===typeof b.subarray&&0===(new Uint8Array(1)).subarray(1,1).byteLength}catch(h){return!1}}();e.isBuffer=function(a){return!(null== +a||!a._isBuffer)};e.compare=function(a,b){if(!e.isBuffer(a)||!e.isBuffer(b))throw new TypeError("Arguments must be Buffers");for(var h=a.length,w=b.length,y=0,I=Math.min(h,w);y>>1;break;case "utf8":case "utf-8":h=k(a).length;break;case "base64":h=n.toByteArray(a).length; +break;default:h=a.length}return h};e.prototype.length=void 0;e.prototype.parent=void 0;e.prototype.toString=function(a,b,h){var w=!1;b>>>=0;h=void 0===h||Infinity===h?this.length:h>>>0;a||(a="utf8");0>b&&(b=0);h>this.length&&(h=this.length);if(h<=b)return"";for(;;)switch(a){case "hex":a=b;b=h;h=this.length;if(!a||0>a)a=0;if(!b||0>b||b>h)b=h;w="";for(h=a;hw?"0"+w.toString(16):w.toString(16),w=a+w;return w;case "utf8":case "utf-8":w=a="";for(h=Math.min(this.length,h);b= +this[b]?(a+=g(w)+String.fromCharCode(this[b]),w=""):w+="%"+this[b].toString(16);return a+g(w);case "ascii":return p(this,b,h);case "binary":return p(this,b,h);case "base64":return b=0===b&&h===this.length?n.fromByteArray(this):n.fromByteArray(this.slice(b,h)),b;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":b=this.slice(b,h);h="";for(a=0;ab&&(a+=" ... "));return""};e.prototype.compare=function(a){if(!e.isBuffer(a))throw new TypeError("Argument must be a Buffer");return e.compare(this,a)};e.prototype.get=function(a){console.log(".get() is deprecated. Access using array indexes instead."); +return this.readUInt8(a)};e.prototype.set=function(a,b){console.log(".set() is deprecated. Access using array indexes instead.");return this.writeUInt8(a,b)};e.prototype.write=function(a,b,h,w){if(isFinite(b))isFinite(h)||(w=h,h=void 0);else{var y=w;w=b;b=h;h=y}b=Number(b)||0;y=this.length-b;h?(h=Number(h),h>y&&(h=y)):h=y;w=String(w||"utf8").toLowerCase();switch(w){case "hex":b=Number(b)||0;w=this.length-b;h?(h=Number(h),h>w&&(h=w)):h=w;w=a.length;if(0!==w%2)throw Error("Invalid hex string");h>w/ +2&&(h=w/2);for(w=0;w>8;K%=256;y.push(K);y.push(w)}a=d(y,this,b,h,2);break;default:throw new TypeError("Unknown encoding: "+ +w);}return a};e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};e.prototype.slice=function(a,b){var h=this.length;a=~~a;b=void 0===b?h:~~b;0>a?(a+=h,0>a&&(a=0)):a>h&&(a=h);0>b?(b+=h,0>b&&(b=0)):b>h&&(b=h);b>>=0;h||m(this,a,b,1,255,0);e.TYPED_ARRAY_SUPPORT||(a=Math.floor(a));this[b]=a;return b+1};e.prototype.writeUInt16LE=function(a, +b,h){a=+a;b>>>=0;h||m(this,a,b,2,65535,0);e.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8):f(this,a,b,!0);return b+2};e.prototype.writeUInt16BE=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,2,65535,0);e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=a):f(this,a,b,!1);return b+2};e.prototype.writeUInt32LE=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,4,4294967295,0);e.TYPED_ARRAY_SUPPORT?(this[b+3]=a>>>24,this[b+2]=a>>>16,this[b+1]=a>>>8,this[b]=a):c(this,a,b,!0);return b+4};e.prototype.writeUInt32BE=function(a, +b,h){a=+a;b>>>=0;h||m(this,a,b,4,4294967295,0);e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=a):c(this,a,b,!1);return b+4};e.prototype.writeInt8=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,1,127,-128);e.TYPED_ARRAY_SUPPORT||(a=Math.floor(a));0>a&&(a=255+a+1);this[b]=a;return b+1};e.prototype.writeInt16LE=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,2,32767,-32768);e.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8):f(this,a,b,!0);return b+2};e.prototype.writeInt16BE=function(a, +b,h){a=+a;b>>>=0;h||m(this,a,b,2,32767,-32768);e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=a):f(this,a,b,!1);return b+2};e.prototype.writeInt32LE=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,4,2147483647,-2147483648);e.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8,this[b+2]=a>>>16,this[b+3]=a>>>24):c(this,a,b,!0);return b+4};e.prototype.writeInt32BE=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,4,2147483647,-2147483648);0>a&&(a=4294967295+a+1);e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+ +2]=a>>>8,this[b+3]=a):c(this,a,b,!1);return b+4};e.prototype.writeFloatLE=function(a,b,h){return q(this,a,b,!0,h)};e.prototype.writeFloatBE=function(a,b,h){return q(this,a,b,!1,h)};e.prototype.writeDoubleLE=function(a,b,h){return r(this,a,b,!0,h)};e.prototype.writeDoubleBE=function(a,b,h){return r(this,a,b,!1,h)};e.prototype.copy=function(a,b,h,w){h||(h=0);w||0===w||(w=this.length);b||(b=0);if(w!==h&&0!==a.length&&0!==this.length){if(wb||b>=a.length)throw new TypeError("targetStart out of bounds"); +if(0>h||h>=this.length)throw new TypeError("sourceStart out of bounds");if(0>w||w>this.length)throw new TypeError("sourceEnd out of bounds");w>this.length&&(w=this.length);a.length-bw||!e.TYPED_ARRAY_SUPPORT)for(var y=0;yb||b>=this.length)throw new TypeError("start out of bounds"); +if(0>h||h>this.length)throw new TypeError("end out of bounds");if("number"===typeof a)for(;b>1,r=-7;f=t?f-1:0;var k=t?-1:1,u=e[p+f];f+=k;t=u&(1<<-r)-1;u>>=-r;for(r+=c;0>=-r;for(r+=m;0>1,u=23===f?Math.pow(2,-24)-Math.pow(2,-77):0;c=m?0:c-1;var d=m?1:-1,g=0>p||0===p&&0>1/p?1:0;p=Math.abs(p);isNaN(p)||Infinity===p?(p=isNaN(p)?1:0,m=r):(m=Math.floor(Math.log(p)/Math.LN2),1>p*(l=Math.pow(2,-m))&&(m--,l*=2),p=1<=m+k?p+u/l:p+u*Math.pow(2,1-k),2<=p*l&&(m++,l/=2),m+k>=r?(p=0,m=r):1<=m+k?(p=(p*l-1)*Math.pow(2,f),m+=k):(p=p*Math.pow(2,k-1)*Math.pow(2,f),m=0));for(;8<=f;e[t+c]=p&255,c+= +d,p/=256,f-=8);m=m<z?[]:n.slice(v,z-v+1)}c=A.resolve(c).substr(1);l=A.resolve(l).substr(1); +for(var r=q(c.split("/")),k=q(l.split("/")),u=Math.min(r.length,k.length),d=u,g=0;gl&&(l=c.length+l);return c.substr(l,q)}}).call(this,C("g5I+bs"))},{"g5I+bs":9}],9:[function(C,J,A){function e(){}C=J.exports={};C.nextTick=function(){if("undefined"!==typeof window&&window.setImmediate)return function(t){return window.setImmediate(t)};if("undefined"!==typeof window&&window.postMessage&&window.addEventListener){var p=[];window.addEventListener("message",function(t){var m=t.source;m!==window&&null!== +m||"process-tick"!==t.data||(t.stopPropagation(),0p?(-p<<1)+1:p<<1;do p=m&31,m>>>=5,0=f)throw Error("Expected more digits in base 64 VLQ value.");var q=e.decode(p.charCodeAt(t++));if(-1===q)throw Error("Invalid base64 digit: "+p.charAt(t-1));var r=!!(q&32);q&=31;c+=q<>1;m.value=1===(c&1)?-p:p;m.rest=t}},{"./base64":12}],12:[function(C, +J,A){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");A.encode=function(p){if(0<=p&&p=p?p-65:97<=p&&122>=p?p-97+26:48<=p&&57>=p?p-48+52:43==p?62:47==p?63:-1}},{}],13:[function(C,J,A){function e(p,t,m,f,c,l){var q=Math.floor((t-p)/2)+p,r=c(m,f[q],!0);return 0===r?q:0p?-1:p}A.GREATEST_LOWER_BOUND=1;A.LEAST_UPPER_BOUND=2;A.search=function(p,t,m,f){if(0===t.length)return-1;p=e(-1,t.length,p,t,m,f||A.GREATEST_LOWER_BOUND);if(0>p)return-1;for(;0<=p-1&&0===m(t[p],t[p-1],!0);)--p;return p}},{}],14:[function(C,J,A){function e(){this._array=[];this._sorted=!0;this._last={generatedLine:-1,generatedColumn:0}}var p=C("./util");e.prototype.unsortedForEach=function(t,m){this._array.forEach(t,m)};e.prototype.add=function(t){var m=this._last,f=m.generatedLine, +c=t.generatedLine,l=m.generatedColumn,q=t.generatedColumn;c>f||c==f&&q>=l||0>=p.compareByGeneratedPositionsInflated(m,t)?this._last=t:this._sorted=!1;this._array.push(t)};e.prototype.toArray=function(){this._sorted||(this._array.sort(p.compareByGeneratedPositionsInflated),this._sorted=!0);return this._array};A.MappingList=e},{"./util":19}],15:[function(C,J,A){function e(t,m,f){var c=t[m];t[m]=t[f];t[f]=c}function p(t,m,f,c){if(f=m(t[r],q)&&(l+=1,e(t,l,r));e(t,l+1,r);l+=1;p(t,m,f,l-1);p(t,m,l+1,c)}}A.quickSort=function(t,m){p(t,m,0,t.length-1)}},{}],16:[function(C,J,A){function e(k,u){var d=k;"string"===typeof k&&(d=f.parseSourceMapInput(k));return null!=d.sections?new m(d,u):new p(d,u)}function p(k,u){var d=k;"string"===typeof k&&(d=f.parseSourceMapInput(k));var g=f.getArg(d,"version"),n=f.getArg(d,"sources"),v=f.getArg(d,"names",[]),z=f.getArg(d,"sourceRoot",null),G=f.getArg(d,"sourcesContent",null),D=f.getArg(d, +"mappings");d=f.getArg(d,"file",null);if(g!=this._version)throw Error("Unsupported version: "+g);z&&(z=f.normalize(z));n=n.map(String).map(f.normalize).map(function(L){return z&&f.isAbsolute(z)&&f.isAbsolute(L)?f.relative(z,L):L});this._names=l.fromArray(v.map(String),!0);this._sources=l.fromArray(n,!0);this.sourceRoot=z;this.sourcesContent=G;this._mappings=D;this._sourceMapURL=u;this.file=d}function t(){this.generatedColumn=this.generatedLine=0;this.name=this.originalColumn=this.originalLine=this.source= +null}function m(k,u){var d=k;"string"===typeof k&&(d=f.parseSourceMapInput(k));var g=f.getArg(d,"version");d=f.getArg(d,"sections");if(g!=this._version)throw Error("Unsupported version: "+g);this._sources=new l;this._names=new l;var n={line:-1,column:0};this._sections=d.map(function(v){if(v.url)throw Error("Support for url field in sections not implemented.");var z=f.getArg(v,"offset"),G=f.getArg(z,"line"),D=f.getArg(z,"column");if(G=k[d])throw new TypeError("Line must be greater than or equal to 1, got "+ +k[d]);if(0>k[g])throw new TypeError("Column must be greater than or equal to 0, got "+k[g]);return c.search(k,u,n,v)};p.prototype.computeColumnSpans=function(){for(var k=0;k=this._sources.size()&&!this.sourcesContent.some(function(k){return null==k}):!1};p.prototype.sourceContentFor=function(k,u){if(!this.sourcesContent)return null;var d=k;null!=this.sourceRoot&&(d=f.relative(this.sourceRoot,d));if(this._sources.has(d))return this.sourcesContent[this._sources.indexOf(d)]; +var g=this.sources,n;for(n=0;n +g||95!==d.charCodeAt(g-1)||95!==d.charCodeAt(g-2)||111!==d.charCodeAt(g-3)||116!==d.charCodeAt(g-4)||111!==d.charCodeAt(g-5)||114!==d.charCodeAt(g-6)||112!==d.charCodeAt(g-7)||95!==d.charCodeAt(g-8)||95!==d.charCodeAt(g-9))return!1;for(g-=10;0<=g;g--)if(36!==d.charCodeAt(g))return!1;return!0}function r(d,g){return d===g?0:null===d?1:null===g?-1:d>g?1:-1}A.getArg=function(d,g,n){if(g in d)return d[g];if(3===arguments.length)return n;throw Error('"'+g+'" is a required argument.');};var k=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/, +u=/^data:.+,.+$/;A.urlParse=e;A.urlGenerate=p;A.normalize=t;A.join=m;A.isAbsolute=function(d){return"/"===d.charAt(0)||k.test(d)};A.relative=function(d,g){""===d&&(d=".");d=d.replace(/\/$/,"");for(var n=0;0!==g.indexOf(d+"/");){var v=d.lastIndexOf("/");if(0>v)return g;d=d.slice(0,v);if(d.match(/^([^\/]+:\/)?\/*$/))return g;++n}return Array(n+1).join("../")+g.substr(d.length+1)};C=!("__proto__"in Object.create(null));A.toSetString=C?f:c;A.fromSetString=C?f:l;A.compareByOriginalPositions=function(d, +g,n){var v=r(d.source,g.source);if(0!==v)return v;v=d.originalLine-g.originalLine;if(0!==v)return v;v=d.originalColumn-g.originalColumn;if(0!==v||n)return v;v=d.generatedColumn-g.generatedColumn;if(0!==v)return v;v=d.generatedLine-g.generatedLine;return 0!==v?v:r(d.name,g.name)};A.compareByGeneratedPositionsDeflated=function(d,g,n){var v=d.generatedLine-g.generatedLine;if(0!==v)return v;v=d.generatedColumn-g.generatedColumn;if(0!==v||n)return v;v=r(d.source,g.source);if(0!==v)return v;v=d.originalLine- +g.originalLine;if(0!==v)return v;v=d.originalColumn-g.originalColumn;return 0!==v?v:r(d.name,g.name)};A.compareByGeneratedPositionsInflated=function(d,g){var n=d.generatedLine-g.generatedLine;if(0!==n)return n;n=d.generatedColumn-g.generatedColumn;if(0!==n)return n;n=r(d.source,g.source);if(0!==n)return n;n=d.originalLine-g.originalLine;if(0!==n)return n;n=d.originalColumn-g.originalColumn;return 0!==n?n:r(d.name,g.name)};A.parseSourceMapInput=function(d){return JSON.parse(d.replace(/^\)]}'[^\n]*\n/, +""))};A.computeSourceURL=function(d,g,n){g=g||"";d&&("/"!==d[d.length-1]&&"/"!==g[0]&&(d+="/"),g=d+g);if(n){d=e(n);if(!d)throw Error("sourceMapURL could not be parsed");d.path&&(n=d.path.lastIndexOf("/"),0<=n&&(d.path=d.path.substring(0,n+1)));g=m(p(d),g)}return t(g)}},{}],20:[function(C,J,A){A.SourceMapGenerator=C("./lib/source-map-generator").SourceMapGenerator;A.SourceMapConsumer=C("./lib/source-map-consumer").SourceMapConsumer;A.SourceNode=C("./lib/source-node").SourceNode},{"./lib/source-map-consumer":16, +"./lib/source-map-generator":17,"./lib/source-node":18}],21:[function(C,J,A){(function(e){function p(){return"browser"===a?!0:"node"===a?!1:"undefined"!==typeof window&&"function"===typeof XMLHttpRequest&&!(window.require&&window.module&&window.process&&"renderer"===window.process.type)}function t(x){return function(B){for(var F=0;F";B=this.getLineNumber();null!=B&&(x+=":"+B,(B= +this.getColumnNumber())&&(x+=":"+B))}B="";var F=this.getFunctionName(),E=!0,H=this.isConstructor();if(this.isToplevel()||H)H?B+="new "+(F||""):F?B+=F:(B+=x,E=!1);else{H=this.getTypeName();"[object Object]"===H&&(H="null");var M=this.getMethodName();F?(H&&0!=F.indexOf(H)&&(B+=H+"."),B+=F,M&&F.indexOf("."+M)!=F.length-M.length-1&&(B+=" [as "+M+"]")):B+=H+"."+(M||"")}E&&(B+=" ("+x+")");return B}function q(x){var B={};Object.getOwnPropertyNames(Object.getPrototypeOf(x)).forEach(function(F){B[F]= +/^(?:is|get)/.test(F)?function(){return x[F].call(x)}:x[F]});B.toString=l;return B}function r(x,B){void 0===B&&(B={nextPosition:null,curPosition:null});if(x.isNative())return B.curPosition=null,x;var F=x.getFileName()||x.getScriptNameOrSourceURL();if(F){var E=x.getLineNumber(),H=x.getColumnNumber()-1,M=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/,S=M.test;var V="object"===typeof e&&null!==e?e.version:"";M=S.call(M,V)?0:62;1===E&&H>M&&!p()&&!x.isEval()&&(H-=M);var O= +f({source:F,line:E,column:H});B.curPosition=O;x=q(x);var T=x.getFunctionName;x.getFunctionName=function(){return null==B.nextPosition?T():B.nextPosition.name||T()};x.getFileName=function(){return O.source};x.getLineNumber=function(){return O.line};x.getColumnNumber=function(){return O.column+1};x.getScriptNameOrSourceURL=function(){return O.source};return x}var Q=x.isEval()&&x.getEvalOrigin();Q&&(Q=c(Q),x=q(x),x.getEvalOrigin=function(){return Q});return x}function k(x,B){L&&(b={},h={});for(var F= +(x.name||"Error")+": "+(x.message||""),E={nextPosition:null,curPosition:null},H=[],M=B.length-1;0<=M;M--)H.push("\n at "+r(B[M],E)),E.nextPosition=E.curPosition;E.curPosition=E.nextPosition=null;return F+H.reverse().join("")}function u(x){var B=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(x.stack);if(B){x=B[1];var F=+B[2];B=+B[3];var E=b[x];if(!E&&v&&v.existsSync(x))try{E=v.readFileSync(x,"utf8")}catch(H){E=""}if(E&&(E=E.split(/(?:\r\n|\r|\n)/)[F-1]))return x+":"+F+"\n"+E+"\n"+Array(B).join(" ")+ +"^"}return null}function d(){var x=e.emit;e.emit=function(B){if("uncaughtException"===B){var F=arguments[1]&&arguments[1].stack,E=0=12" + }, + "volta": { + "node": "16.11.0", + "npm": "7.24.2" + } +} diff --git a/node_modules/@cspotcode/source-map-support/register-hook-require.d.ts b/node_modules/@cspotcode/source-map-support/register-hook-require.d.ts new file mode 100755 index 0000000..a787e69 --- /dev/null +++ b/node_modules/@cspotcode/source-map-support/register-hook-require.d.ts @@ -0,0 +1,7 @@ +// tslint:disable:no-useless-files + +// For following usage: +// import '@cspotcode/source-map-support/register-hook-require' +// Instead of: +// import sourceMapSupport from '@cspotcode/source-map-support' +// sourceMapSupport.install({hookRequire: true}) diff --git a/node_modules/@cspotcode/source-map-support/register-hook-require.js b/node_modules/@cspotcode/source-map-support/register-hook-require.js new file mode 100644 index 0000000..6bc12ab --- /dev/null +++ b/node_modules/@cspotcode/source-map-support/register-hook-require.js @@ -0,0 +1,3 @@ +require('./').install({ + hookRequire: true +}); diff --git a/node_modules/@cspotcode/source-map-support/register.d.ts b/node_modules/@cspotcode/source-map-support/register.d.ts new file mode 100755 index 0000000..063cd7c --- /dev/null +++ b/node_modules/@cspotcode/source-map-support/register.d.ts @@ -0,0 +1,7 @@ +// tslint:disable:no-useless-files + +// For following usage: +// import '@cspotcode/source-map-support/register' +// Instead of: +// import sourceMapSupport from '@cspotcode/source-map-support' +// sourceMapSupport.install() diff --git a/node_modules/@cspotcode/source-map-support/register.js b/node_modules/@cspotcode/source-map-support/register.js new file mode 100644 index 0000000..4f68e67 --- /dev/null +++ b/node_modules/@cspotcode/source-map-support/register.js @@ -0,0 +1 @@ +require('./').install(); diff --git a/node_modules/@cspotcode/source-map-support/source-map-support.d.ts b/node_modules/@cspotcode/source-map-support/source-map-support.d.ts new file mode 100755 index 0000000..d8cb9d8 --- /dev/null +++ b/node_modules/@cspotcode/source-map-support/source-map-support.d.ts @@ -0,0 +1,76 @@ +// Type definitions for source-map-support 0.5 +// Project: https://github.com/evanw/node-source-map-support +// Definitions by: Bart van der Schoor +// Jason Cheatham +// Alcedo Nathaniel De Guzman Jr +// Griffin Yourick +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export interface RawSourceMap { + version: 3; + sources: string[]; + names: string[]; + sourceRoot?: string; + sourcesContent?: string[]; + mappings: string; + file: string; +} + +/** + * Output of retrieveSourceMap(). + * From source-map-support: + * The map field may be either a string or the parsed JSON object (i.e., + * it must be a valid argument to the SourceMapConsumer constructor). + */ +export interface UrlAndMap { + url: string; + map: string | RawSourceMap; +} + +/** + * Options to install(). + */ +export interface Options { + handleUncaughtExceptions?: boolean | undefined; + hookRequire?: boolean | undefined; + emptyCacheBetweenOperations?: boolean | undefined; + environment?: 'auto' | 'browser' | 'node' | undefined; + overrideRetrieveFile?: boolean | undefined; + overrideRetrieveSourceMap?: boolean | undefined; + retrieveFile?(path: string): string; + retrieveSourceMap?(source: string): UrlAndMap | null; + /** + * Set false to disable redirection of require / import `source-map-support` to `@cspotcode/source-map-support` + */ + redirectConflictingLibrary?: boolean; + /** + * Callback will be called every time we redirect due to `redirectConflictingLibrary` + * This allows consumers to log helpful warnings if they choose. + * @param parent NodeJS.Module which made the require() or require.resolve() call + * @param options options object internally passed to node's `_resolveFilename` hook + */ + onConflictingLibraryRedirect?: (request: string, parent: any, isMain: boolean, options: any, redirectedRequest: string) => void; +} + +export interface Position { + source: string; + line: number; + column: number; +} + +export function wrapCallSite(frame: any /* StackFrame */): any /* StackFrame */; +export function getErrorSource(error: Error): string | null; +export function mapSourcePosition(position: Position): Position; +export function retrieveSourceMap(source: string): UrlAndMap | null; +export function resetRetrieveHandlers(): void; + +/** + * Install SourceMap support. + * @param options Can be used to e.g. disable uncaughtException handler. + */ +export function install(options?: Options): void; + +/** + * Uninstall SourceMap support. + */ +export function uninstall(): void; diff --git a/node_modules/@cspotcode/source-map-support/source-map-support.js b/node_modules/@cspotcode/source-map-support/source-map-support.js new file mode 100644 index 0000000..ad830b6 --- /dev/null +++ b/node_modules/@cspotcode/source-map-support/source-map-support.js @@ -0,0 +1,938 @@ +const { TraceMap, originalPositionFor, AnyMap } = require('@jridgewell/trace-mapping'); +var path = require('path'); +const { fileURLToPath, pathToFileURL } = require('url'); +var util = require('util'); + +var fs; +try { + fs = require('fs'); + if (!fs.existsSync || !fs.readFileSync) { + // fs doesn't have all methods we need + fs = null; + } +} catch (err) { + /* nop */ +} + +/** + * Requires a module which is protected against bundler minification. + * + * @param {NodeModule} mod + * @param {string} request + */ +function dynamicRequire(mod, request) { + return mod.require(request); +} + +/** + * @typedef {{ + * enabled: boolean; + * originalValue: any; + * installedValue: any; + * }} HookState + * Used for installing and uninstalling hooks + */ + +// Increment this if the format of sharedData changes in a breaking way. +var sharedDataVersion = 1; + +/** + * @template T + * @param {T} defaults + * @returns {T} + */ +function initializeSharedData(defaults) { + var sharedDataKey = 'source-map-support/sharedData'; + if (typeof Symbol !== 'undefined') { + sharedDataKey = Symbol.for(sharedDataKey); + } + var sharedData = this[sharedDataKey]; + if (!sharedData) { + sharedData = { version: sharedDataVersion }; + if (Object.defineProperty) { + Object.defineProperty(this, sharedDataKey, { value: sharedData }); + } else { + this[sharedDataKey] = sharedData; + } + } + if (sharedDataVersion !== sharedData.version) { + throw new Error("Multiple incompatible instances of source-map-support were loaded"); + } + for (var key in defaults) { + if (!(key in sharedData)) { + sharedData[key] = defaults[key]; + } + } + return sharedData; +} + +// If multiple instances of source-map-support are loaded into the same +// context, they shouldn't overwrite each other. By storing handlers, caches, +// and other state on a shared object, different instances of +// source-map-support can work together in a limited way. This does require +// that future versions of source-map-support continue to support the fields on +// this object. If this internal contract ever needs to be broken, increment +// sharedDataVersion. (This version number is not the same as any of the +// package's version numbers, which should reflect the *external* API of +// source-map-support.) +var sharedData = initializeSharedData({ + + // Only install once if called multiple times + // Remember how the environment looked before installation so we can restore if able + /** @type {HookState} */ + errorPrepareStackTraceHook: undefined, + /** @type {HookState} */ + processEmitHook: undefined, + /** @type {HookState} */ + moduleResolveFilenameHook: undefined, + + /** @type {Array<(request: string, parent: any, isMain: boolean, options: any, redirectedRequest: string) => void>} */ + onConflictingLibraryRedirectArr: [], + + // If true, the caches are reset before a stack trace formatting operation + emptyCacheBetweenOperations: false, + + // Maps a file path to a string containing the file contents + fileContentsCache: Object.create(null), + + // Maps a file path to a source map for that file + /** @type {Record C:/dir/file + '/'; // file:///root-dir/file -> /root-dir/file + }); + } + const key = getCacheKey(path); + if(hasFileContentsCacheFromKey(key)) { + return getFileContentsCacheFromKey(key); + } + + var contents = ''; + try { + if (!fs) { + // Use SJAX if we are in the browser + var xhr = new XMLHttpRequest(); + xhr.open('GET', path, /** async */ false); + xhr.send(null); + if (xhr.readyState === 4 && xhr.status === 200) { + contents = xhr.responseText; + } + } else if (fs.existsSync(path)) { + // Otherwise, use the filesystem + contents = fs.readFileSync(path, 'utf8'); + } + } catch (er) { + /* ignore any errors */ + } + + return setFileContentsCache(path, contents); +}); + +// Support URLs relative to a directory, but be careful about a protocol prefix +// in case we are in the browser (i.e. directories may start with "http://" or "file:///") +function supportRelativeURL(file, url) { + if(!file) return url; + // given that this happens within error formatting codepath, probably best to + // fallback instead of throwing if anything goes wrong + try { + // if should output a URL + if(isAbsoluteUrl(file) || isSchemeRelativeUrl(file)) { + if(isAbsoluteUrl(url) || isSchemeRelativeUrl(url)) { + return new URL(url, file).toString(); + } + if(path.isAbsolute(url)) { + return new URL(pathToFileURL(url), file).toString(); + } + // url is relative path or URL + return new URL(url.replace(/\\/g, '/'), file).toString(); + } + // if should output a path (unless URL is something like https://) + if(path.isAbsolute(file)) { + if(isFileUrl(url)) { + return fileURLToPath(url); + } + if(isSchemeRelativeUrl(url)) { + return fileURLToPath(new URL(url, 'file://')); + } + if(isAbsoluteUrl(url)) { + // url is a non-file URL + // Go with the URL + return url; + } + if(path.isAbsolute(url)) { + // Normalize at all? decodeURI or normalize slashes? + return path.normalize(url); + } + // url is relative path or URL + return path.join(file, '..', decodeURI(url)); + } + // If we get here, file is relative. + // Shouldn't happen since node identifies modules with absolute paths or URLs. + // But we can take a stab at returning something meaningful anyway. + if(isAbsoluteUrl(url) || isSchemeRelativeUrl(url)) { + return url; + } + return path.join(file, '..', url); + } catch(e) { + return url; + } +} + +// Return pathOrUrl in the same style as matchStyleOf: either a file URL or a native path +function matchStyleOfPathOrUrl(matchStyleOf, pathOrUrl) { + try { + if(isAbsoluteUrl(matchStyleOf) || isSchemeRelativeUrl(matchStyleOf)) { + if(isAbsoluteUrl(pathOrUrl) || isSchemeRelativeUrl(pathOrUrl)) return pathOrUrl; + if(path.isAbsolute(pathOrUrl)) return pathToFileURL(pathOrUrl).toString(); + } else if(path.isAbsolute(matchStyleOf)) { + if(isAbsoluteUrl(pathOrUrl) || isSchemeRelativeUrl(pathOrUrl)) { + return fileURLToPath(new URL(pathOrUrl, 'file://')); + } + } + return pathOrUrl; + } catch(e) { + return pathOrUrl; + } +} + +function retrieveSourceMapURL(source) { + var fileData; + + if (isInBrowser()) { + try { + var xhr = new XMLHttpRequest(); + xhr.open('GET', source, false); + xhr.send(null); + fileData = xhr.readyState === 4 ? xhr.responseText : null; + + // Support providing a sourceMappingURL via the SourceMap header + var sourceMapHeader = xhr.getResponseHeader("SourceMap") || + xhr.getResponseHeader("X-SourceMap"); + if (sourceMapHeader) { + return sourceMapHeader; + } + } catch (e) { + } + } + + // Get the URL of the source map + fileData = retrieveFile(tryFileURLToPath(source)); + var re = /(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg; + // Keep executing the search to find the *last* sourceMappingURL to avoid + // picking up sourceMappingURLs from comments, strings, etc. + var lastMatch, match; + while (match = re.exec(fileData)) lastMatch = match; + if (!lastMatch) return null; + return lastMatch[1]; +}; + +// Can be overridden by the retrieveSourceMap option to install. Takes a +// generated source filename; returns a {map, optional url} object, or null if +// there is no source map. The map field may be either a string or the parsed +// JSON object (ie, it must be a valid argument to the SourceMapConsumer +// constructor). +/** @type {(source: string) => import('./source-map-support').UrlAndMap | null} */ +var retrieveSourceMap = handlerExec(sharedData.retrieveMapHandlers, sharedData.internalRetrieveMapHandlers); +sharedData.internalRetrieveMapHandlers.push(function(source) { + var sourceMappingURL = retrieveSourceMapURL(source); + if (!sourceMappingURL) return null; + + // Read the contents of the source map + var sourceMapData; + if (reSourceMap.test(sourceMappingURL)) { + // Support source map URL as a data url + var rawData = sourceMappingURL.slice(sourceMappingURL.indexOf(',') + 1); + sourceMapData = Buffer.from(rawData, "base64").toString(); + sourceMappingURL = source; + } else { + // Support source map URLs relative to the source URL + sourceMappingURL = supportRelativeURL(source, sourceMappingURL); + sourceMapData = retrieveFile(tryFileURLToPath(sourceMappingURL)); + } + + if (!sourceMapData) { + return null; + } + + return { + url: sourceMappingURL, + map: sourceMapData + }; +}); + +function mapSourcePosition(position) { + var sourceMap = getSourceMapCache(position.source); + if (!sourceMap) { + // Call the (overrideable) retrieveSourceMap function to get the source map. + var urlAndMap = retrieveSourceMap(position.source); + if (urlAndMap) { + sourceMap = setSourceMapCache(position.source, { + url: urlAndMap.url, + map: new AnyMap(urlAndMap.map, urlAndMap.url) + }); + + // Overwrite trace-mapping's resolutions, because they do not handle + // Windows paths the way we want. + // TODO Remove now that windows path support was added to resolve-uri and thus trace-mapping? + sourceMap.map.resolvedSources = sourceMap.map.sources.map(s => supportRelativeURL(sourceMap.url, s)); + + // Load all sources stored inline with the source map into the file cache + // to pretend like they are already loaded. They may not exist on disk. + if (sourceMap.map.sourcesContent) { + sourceMap.map.resolvedSources.forEach(function(resolvedSource, i) { + var contents = sourceMap.map.sourcesContent[i]; + if (contents) { + setFileContentsCache(resolvedSource, contents); + } + }); + } + } else { + sourceMap = setSourceMapCache(position.source, { + url: null, + map: null + }); + } + } + + // Resolve the source URL relative to the URL of the source map + if (sourceMap && sourceMap.map) { + var originalPosition = originalPositionFor(sourceMap.map, position); + + // Only return the original position if a matching line was found. If no + // matching line is found then we return position instead, which will cause + // the stack trace to print the path and line for the compiled file. It is + // better to give a precise location in the compiled file than a vague + // location in the original file. + if (originalPosition.source !== null) { + // originalPosition.source has *already* been resolved against sourceMap.url + // so is *already* as absolute as possible. + // However, we want to ensure we output in same format as input: URL or native path + originalPosition.source = matchStyleOfPathOrUrl( + position.source, originalPosition.source); + return originalPosition; + } + } + + return position; +} + +// Parses code generated by FormatEvalOrigin(), a function inside V8: +// https://code.google.com/p/v8/source/browse/trunk/src/messages.js +function mapEvalOrigin(origin) { + // Most eval() calls are in this format + var match = /^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(origin); + if (match) { + var position = mapSourcePosition({ + source: match[2], + line: +match[3], + column: match[4] - 1 + }); + return 'eval at ' + match[1] + ' (' + position.source + ':' + + position.line + ':' + (position.column + 1) + ')'; + } + + // Parse nested eval() calls using recursion + match = /^eval at ([^(]+) \((.+)\)$/.exec(origin); + if (match) { + return 'eval at ' + match[1] + ' (' + mapEvalOrigin(match[2]) + ')'; + } + + // Make sure we still return useful information if we didn't find anything + return origin; +} + +// This is copied almost verbatim from the V8 source code at +// https://code.google.com/p/v8/source/browse/trunk/src/messages.js +// Update 2022-04-29: +// https://github.com/v8/v8/blob/98f6f100c5ab8e390e51422747c4ef644d5ac6f2/src/builtins/builtins-callsite.cc#L175-L179 +// https://github.com/v8/v8/blob/98f6f100c5ab8e390e51422747c4ef644d5ac6f2/src/objects/call-site-info.cc#L795-L804 +// https://github.com/v8/v8/blob/98f6f100c5ab8e390e51422747c4ef644d5ac6f2/src/objects/call-site-info.cc#L717-L750 +// The implementation of wrapCallSite() used to just forward to the actual source +// code of CallSite.prototype.toString but unfortunately a new release of V8 +// did something to the prototype chain and broke the shim. The only fix I +// could find was copy/paste. +function CallSiteToString() { + var fileName; + var fileLocation = ""; + if (this.isNative()) { + fileLocation = "native"; + } else { + fileName = this.getScriptNameOrSourceURL(); + if (!fileName && this.isEval()) { + fileLocation = this.getEvalOrigin(); + fileLocation += ", "; // Expecting source position to follow. + } + + if (fileName) { + fileLocation += fileName; + } else { + // Source code does not originate from a file and is not native, but we + // can still get the source position inside the source string, e.g. in + // an eval string. + fileLocation += ""; + } + var lineNumber = this.getLineNumber(); + if (lineNumber != null) { + fileLocation += ":" + lineNumber; + var columnNumber = this.getColumnNumber(); + if (columnNumber) { + fileLocation += ":" + columnNumber; + } + } + } + + var line = ""; + var isAsync = this.isAsync ? this.isAsync() : false; + if(isAsync) { + line += 'async '; + var isPromiseAll = this.isPromiseAll ? this.isPromiseAll() : false; + var isPromiseAny = this.isPromiseAny ? this.isPromiseAny() : false; + if(isPromiseAny || isPromiseAll) { + line += isPromiseAll ? 'Promise.all (index ' : 'Promise.any (index '; + var promiseIndex = this.getPromiseIndex(); + line += promiseIndex + ')'; + } + } + var functionName = this.getFunctionName(); + var addSuffix = true; + var isConstructor = this.isConstructor(); + var isMethodCall = !(this.isToplevel() || isConstructor); + if (isMethodCall) { + var typeName = this.getTypeName(); + // Fixes shim to be backward compatable with Node v0 to v4 + if (typeName === "[object Object]") { + typeName = "null"; + } + var methodName = this.getMethodName(); + if (functionName) { + if (typeName && functionName.indexOf(typeName) != 0) { + line += typeName + "."; + } + line += functionName; + if (methodName && functionName.indexOf("." + methodName) != functionName.length - methodName.length - 1) { + line += " [as " + methodName + "]"; + } + } else { + line += typeName + "." + (methodName || ""); + } + } else if (isConstructor) { + line += "new " + (functionName || ""); + } else if (functionName) { + line += functionName; + } else { + line += fileLocation; + addSuffix = false; + } + if (addSuffix) { + line += " (" + fileLocation + ")"; + } + return line; +} + +function cloneCallSite(frame) { + var object = {}; + Object.getOwnPropertyNames(Object.getPrototypeOf(frame)).forEach(function(name) { + object[name] = /^(?:is|get)/.test(name) ? function() { return frame[name].call(frame); } : frame[name]; + }); + object.toString = CallSiteToString; + return object; +} + +function wrapCallSite(frame, state) { + // provides interface backward compatibility + if (state === undefined) { + state = { nextPosition: null, curPosition: null } + } + if(frame.isNative()) { + state.curPosition = null; + return frame; + } + + // Most call sites will return the source file from getFileName(), but code + // passed to eval() ending in "//# sourceURL=..." will return the source file + // from getScriptNameOrSourceURL() instead + var source = frame.getFileName() || frame.getScriptNameOrSourceURL(); + if (source) { + // v8 does not expose its internal isWasm, etc methods, so we do this instead. + if(source.startsWith('wasm://')) { + state.curPosition = null; + return frame; + } + + var line = frame.getLineNumber(); + var column = frame.getColumnNumber() - 1; + + // Fix position in Node where some (internal) code is prepended. + // See https://github.com/evanw/node-source-map-support/issues/36 + // Header removed in node at ^10.16 || >=11.11.0 + // v11 is not an LTS candidate, we can just test the one version with it. + // Test node versions for: 10.16-19, 10.20+, 12-19, 20-99, 100+, or 11.11 + var noHeader = /^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/; + var headerLength = noHeader.test(process.version) ? 0 : 62; + if (line === 1 && column > headerLength && !isInBrowser() && !frame.isEval()) { + column -= headerLength; + } + + var position = mapSourcePosition({ + source: source, + line: line, + column: column + }); + state.curPosition = position; + frame = cloneCallSite(frame); + var originalFunctionName = frame.getFunctionName; + frame.getFunctionName = function() { + if (state.nextPosition == null) { + return originalFunctionName(); + } + return state.nextPosition.name || originalFunctionName(); + }; + frame.getFileName = function() { return position.source; }; + frame.getLineNumber = function() { return position.line; }; + frame.getColumnNumber = function() { return position.column + 1; }; + frame.getScriptNameOrSourceURL = function() { return position.source; }; + return frame; + } + + // Code called using eval() needs special handling + var origin = frame.isEval() && frame.getEvalOrigin(); + if (origin) { + origin = mapEvalOrigin(origin); + frame = cloneCallSite(frame); + frame.getEvalOrigin = function() { return origin; }; + return frame; + } + + // If we get here then we were unable to change the source position + return frame; +} + +var kIsNodeError = undefined; +try { + // Get a deliberate ERR_INVALID_ARG_TYPE + // TODO is there a better way to reliably get an instance of NodeError? + path.resolve(123); +} catch(e) { + const symbols = Object.getOwnPropertySymbols(e); + const symbol = symbols.find(function (s) {return s.toString().indexOf('kIsNodeError') >= 0}); + if(symbol) kIsNodeError = symbol; +} + +const ErrorPrototypeToString = (err) =>Error.prototype.toString.call(err); + +/** @param {HookState} hookState */ +function createPrepareStackTrace(hookState) { + return prepareStackTrace; + + // This function is part of the V8 stack trace API, for more info see: + // https://v8.dev/docs/stack-trace-api + function prepareStackTrace(error, stack) { + if(!hookState.enabled) return hookState.originalValue.apply(this, arguments); + + if (sharedData.emptyCacheBetweenOperations) { + clearCaches(); + } + + // node gives its own errors special treatment. Mimic that behavior + // https://github.com/nodejs/node/blob/3cbaabc4622df1b4009b9d026a1a970bdbae6e89/lib/internal/errors.js#L118-L128 + // https://github.com/nodejs/node/pull/39182 + var errorString; + if (kIsNodeError) { + if(kIsNodeError in error) { + errorString = `${error.name} [${error.code}]: ${error.message}`; + } else { + errorString = ErrorPrototypeToString(error); + } + } else { + var name = error.name || 'Error'; + var message = error.message || ''; + errorString = message ? name + ": " + message : name; + } + + var state = { nextPosition: null, curPosition: null }; + var processedStack = []; + for (var i = stack.length - 1; i >= 0; i--) { + processedStack.push('\n at ' + wrapCallSite(stack[i], state)); + state.nextPosition = state.curPosition; + } + state.curPosition = state.nextPosition = null; + return errorString + processedStack.reverse().join(''); + } +} + +// Generate position and snippet of original source with pointer +function getErrorSource(error) { + var match = /\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(error.stack); + if (match) { + var source = match[1]; + var line = +match[2]; + var column = +match[3]; + + // Support the inline sourceContents inside the source map + var contents = getFileContentsCache(source); + + const sourceAsPath = tryFileURLToPath(source); + + // Support files on disk + if (!contents && fs && fs.existsSync(sourceAsPath)) { + try { + contents = fs.readFileSync(sourceAsPath, 'utf8'); + } catch (er) { + contents = ''; + } + } + + // Format the line from the original source code like node does + if (contents) { + var code = contents.split(/(?:\r\n|\r|\n)/)[line - 1]; + if (code) { + return source + ':' + line + '\n' + code + '\n' + + new Array(column).join(' ') + '^'; + } + } + } + return null; +} + +function printFatalErrorUponExit (error) { + var source = getErrorSource(error); + + // Ensure error is printed synchronously and not truncated + if (process.stderr._handle && process.stderr._handle.setBlocking) { + process.stderr._handle.setBlocking(true); + } + + if (source) { + console.error(source); + } + + // Matches node's behavior for colorized output + console.error( + util.inspect(error, { + customInspect: false, + colors: process.stderr.isTTY + }) + ); +} + +function shimEmitUncaughtException () { + const originalValue = process.emit; + var hook = sharedData.processEmitHook = { + enabled: true, + originalValue, + installedValue: undefined + }; + var isTerminatingDueToFatalException = false; + var fatalException; + + process.emit = sharedData.processEmitHook.installedValue = function (type) { + const hadListeners = originalValue.apply(this, arguments); + if(hook.enabled) { + if (type === 'uncaughtException' && !hadListeners) { + isTerminatingDueToFatalException = true; + fatalException = arguments[1]; + process.exit(1); + } + if (type === 'exit' && isTerminatingDueToFatalException) { + printFatalErrorUponExit(fatalException); + } + } + return hadListeners; + }; +} + +var originalRetrieveFileHandlers = sharedData.retrieveFileHandlers.slice(0); +var originalRetrieveMapHandlers = sharedData.retrieveMapHandlers.slice(0); + +exports.wrapCallSite = wrapCallSite; +exports.getErrorSource = getErrorSource; +exports.mapSourcePosition = mapSourcePosition; +exports.retrieveSourceMap = retrieveSourceMap; + +exports.install = function(options) { + options = options || {}; + + if (options.environment) { + environment = options.environment; + if (["node", "browser", "auto"].indexOf(environment) === -1) { + throw new Error("environment " + environment + " was unknown. Available options are {auto, browser, node}") + } + } + + // Use dynamicRequire to avoid including in browser bundles + var Module = dynamicRequire(module, 'module'); + + // Redirect subsequent imports of "source-map-support" + // to this package + const {redirectConflictingLibrary = true, onConflictingLibraryRedirect} = options; + if(redirectConflictingLibrary) { + if (!sharedData.moduleResolveFilenameHook) { + const originalValue = Module._resolveFilename; + const moduleResolveFilenameHook = sharedData.moduleResolveFilenameHook = { + enabled: true, + originalValue, + installedValue: undefined, + } + Module._resolveFilename = sharedData.moduleResolveFilenameHook.installedValue = function (request, parent, isMain, options) { + if (moduleResolveFilenameHook.enabled) { + // Match all source-map-support entrypoints: source-map-support, source-map-support/register + let requestRedirect; + if (request === 'source-map-support') { + requestRedirect = './'; + } else if (request === 'source-map-support/register') { + requestRedirect = './register'; + } + + if (requestRedirect !== undefined) { + const newRequest = require.resolve(requestRedirect); + for (const cb of sharedData.onConflictingLibraryRedirectArr) { + cb(request, parent, isMain, options, newRequest); + } + request = newRequest; + } + } + + return originalValue.call(this, request, parent, isMain, options); + } + } + if (onConflictingLibraryRedirect) { + sharedData.onConflictingLibraryRedirectArr.push(onConflictingLibraryRedirect); + } + } + + // Allow sources to be found by methods other than reading the files + // directly from disk. + if (options.retrieveFile) { + if (options.overrideRetrieveFile) { + sharedData.retrieveFileHandlers.length = 0; + } + + sharedData.retrieveFileHandlers.unshift(options.retrieveFile); + } + + // Allow source maps to be found by methods other than reading the files + // directly from disk. + if (options.retrieveSourceMap) { + if (options.overrideRetrieveSourceMap) { + sharedData.retrieveMapHandlers.length = 0; + } + + sharedData.retrieveMapHandlers.unshift(options.retrieveSourceMap); + } + + // Support runtime transpilers that include inline source maps + if (options.hookRequire && !isInBrowser()) { + var $compile = Module.prototype._compile; + + if (!$compile.__sourceMapSupport) { + Module.prototype._compile = function(content, filename) { + setFileContentsCache(filename, content); + setSourceMapCache(filename, undefined); + return $compile.call(this, content, filename); + }; + + Module.prototype._compile.__sourceMapSupport = true; + } + } + + // Configure options + if (!sharedData.emptyCacheBetweenOperations) { + sharedData.emptyCacheBetweenOperations = 'emptyCacheBetweenOperations' in options ? + options.emptyCacheBetweenOperations : false; + } + + + // Install the error reformatter + if (!sharedData.errorPrepareStackTraceHook) { + const originalValue = Error.prepareStackTrace; + sharedData.errorPrepareStackTraceHook = { + enabled: true, + originalValue, + installedValue: undefined + }; + Error.prepareStackTrace = sharedData.errorPrepareStackTraceHook.installedValue = createPrepareStackTrace(sharedData.errorPrepareStackTraceHook); + } + + if (!sharedData.processEmitHook) { + var installHandler = 'handleUncaughtExceptions' in options ? + options.handleUncaughtExceptions : true; + + // Do not override 'uncaughtException' with our own handler in Node.js + // Worker threads. Workers pass the error to the main thread as an event, + // rather than printing something to stderr and exiting. + try { + // We need to use `dynamicRequire` because `require` on it's own will be optimized by WebPack/Browserify. + var worker_threads = dynamicRequire(module, 'worker_threads'); + if (worker_threads.isMainThread === false) { + installHandler = false; + } + } catch(e) {} + + // Provide the option to not install the uncaught exception handler. This is + // to support other uncaught exception handlers (in test frameworks, for + // example). If this handler is not installed and there are no other uncaught + // exception handlers, uncaught exceptions will be caught by node's built-in + // exception handler and the process will still be terminated. However, the + // generated JavaScript code will be shown above the stack trace instead of + // the original source code. + if (installHandler && hasGlobalProcessEventEmitter()) { + shimEmitUncaughtException(); + } + } +}; + +exports.uninstall = function() { + if(sharedData.processEmitHook) { + // Disable behavior + sharedData.processEmitHook.enabled = false; + // If possible, remove our hook function. May not be possible if subsequent third-party hooks have wrapped around us. + if(process.emit === sharedData.processEmitHook.installedValue) { + process.emit = sharedData.processEmitHook.originalValue; + } + sharedData.processEmitHook = undefined; + } + if(sharedData.errorPrepareStackTraceHook) { + // Disable behavior + sharedData.errorPrepareStackTraceHook.enabled = false; + // If possible or necessary, remove our hook function. + // In vanilla environments, prepareStackTrace is `undefined`. + // We cannot delegate to `undefined` the way we can to a function w/`.apply()`; our only option is to remove the function. + // If we are the *first* hook installed, and another was installed on top of us, we have no choice but to remove both. + if(Error.prepareStackTrace === sharedData.errorPrepareStackTraceHook.installedValue || typeof sharedData.errorPrepareStackTraceHook.originalValue !== 'function') { + Error.prepareStackTrace = sharedData.errorPrepareStackTraceHook.originalValue; + } + sharedData.errorPrepareStackTraceHook = undefined; + } + if (sharedData.moduleResolveFilenameHook) { + // Disable behavior + sharedData.moduleResolveFilenameHook.enabled = false; + // If possible, remove our hook function. May not be possible if subsequent third-party hooks have wrapped around us. + var Module = dynamicRequire(module, 'module'); + if(Module._resolveFilename === sharedData.moduleResolveFilenameHook.installedValue) { + Module._resolveFilename = sharedData.moduleResolveFilenameHook.originalValue; + } + sharedData.moduleResolveFilenameHook = undefined; + } + sharedData.onConflictingLibraryRedirectArr.length = 0; +} + +exports.resetRetrieveHandlers = function() { + sharedData.retrieveFileHandlers.length = 0; + sharedData.retrieveMapHandlers.length = 0; +} diff --git a/node_modules/@jridgewell/resolve-uri/LICENSE b/node_modules/@jridgewell/resolve-uri/LICENSE new file mode 100644 index 0000000..0a81b2a --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/LICENSE @@ -0,0 +1,19 @@ +Copyright 2019 Justin Ridgewell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/node_modules/@jridgewell/resolve-uri/README.md b/node_modules/@jridgewell/resolve-uri/README.md new file mode 100644 index 0000000..2fe70df --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/README.md @@ -0,0 +1,40 @@ +# @jridgewell/resolve-uri + +> Resolve a URI relative to an optional base URI + +Resolve any combination of absolute URIs, protocol-realtive URIs, absolute paths, or relative paths. + +## Installation + +```sh +npm install @jridgewell/resolve-uri +``` + +## Usage + +```typescript +function resolve(input: string, base?: string): string; +``` + +```js +import resolve from '@jridgewell/resolve-uri'; + +resolve('foo', 'https://example.com'); // => 'https://example.com/foo' +``` + +| Input | Base | Resolution | Explanation | +|-----------------------|-------------------------|--------------------------------|--------------------------------------------------------------| +| `https://example.com` | _any_ | `https://example.com/` | Input is normalized only | +| `//example.com` | `https://base.com/` | `https://example.com/` | Input inherits the base's protocol | +| `//example.com` | _rest_ | `//example.com/` | Input is normalized only | +| `/example` | `https://base.com/` | `https://base.com/example` | Input inherits the base's origin | +| `/example` | `//base.com/` | `//base.com/example` | Input inherits the base's host and remains protocol relative | +| `/example` | _rest_ | `/example` | Input is normalized only | +| `example` | `https://base.com/dir/` | `https://base.com/dir/example` | Input is joined with the base | +| `example` | `https://base.com/file` | `https://base.com/example` | Input is joined with the base without its file | +| `example` | `//base.com/dir/` | `//base.com/dir/example` | Input is joined with the base's last directory | +| `example` | `//base.com/file` | `//base.com/example` | Input is joined with the base without its file | +| `example` | `/base/dir/` | `/base/dir/example` | Input is joined with the base's last directory | +| `example` | `/base/file` | `/base/example` | Input is joined with the base without its file | +| `example` | `base/dir/` | `base/dir/example` | Input is joined with the base's last directory | +| `example` | `base/file` | `base/example` | Input is joined with the base without its file | diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs new file mode 100644 index 0000000..e958e88 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs @@ -0,0 +1,232 @@ +// Matches the scheme of a URL, eg "http://" +const schemeRegex = /^[\w+.-]+:\/\//; +/** + * Matches the parts of a URL: + * 1. Scheme, including ":", guaranteed. + * 2. User/password, including "@", optional. + * 3. Host, guaranteed. + * 4. Port, including ":", optional. + * 5. Path, including "/", optional. + * 6. Query, including "?", optional. + * 7. Hash, including "#", optional. + */ +const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/; +/** + * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start + * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive). + * + * 1. Host, optional. + * 2. Path, which may include "/", guaranteed. + * 3. Query, including "?", optional. + * 4. Hash, including "#", optional. + */ +const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i; +function isAbsoluteUrl(input) { + return schemeRegex.test(input); +} +function isSchemeRelativeUrl(input) { + return input.startsWith('//'); +} +function isAbsolutePath(input) { + return input.startsWith('/'); +} +function isFileUrl(input) { + return input.startsWith('file:'); +} +function isRelative(input) { + return /^[.?#]/.test(input); +} +function parseAbsoluteUrl(input) { + const match = urlRegex.exec(input); + return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || ''); +} +function parseFileUrl(input) { + const match = fileRegex.exec(input); + const path = match[2]; + return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || ''); +} +function makeUrl(scheme, user, host, port, path, query, hash) { + return { + scheme, + user, + host, + port, + path, + query, + hash, + type: 7 /* Absolute */, + }; +} +function parseUrl(input) { + if (isSchemeRelativeUrl(input)) { + const url = parseAbsoluteUrl('http:' + input); + url.scheme = ''; + url.type = 6 /* SchemeRelative */; + return url; + } + if (isAbsolutePath(input)) { + const url = parseAbsoluteUrl('http://foo.com' + input); + url.scheme = ''; + url.host = ''; + url.type = 5 /* AbsolutePath */; + return url; + } + if (isFileUrl(input)) + return parseFileUrl(input); + if (isAbsoluteUrl(input)) + return parseAbsoluteUrl(input); + const url = parseAbsoluteUrl('http://foo.com/' + input); + url.scheme = ''; + url.host = ''; + url.type = input + ? input.startsWith('?') + ? 3 /* Query */ + : input.startsWith('#') + ? 2 /* Hash */ + : 4 /* RelativePath */ + : 1 /* Empty */; + return url; +} +function stripPathFilename(path) { + // If a path ends with a parent directory "..", then it's a relative path with excess parent + // paths. It's not a file, so we can't strip it. + if (path.endsWith('/..')) + return path; + const index = path.lastIndexOf('/'); + return path.slice(0, index + 1); +} +function mergePaths(url, base) { + normalizePath(base, base.type); + // If the path is just a "/", then it was an empty path to begin with (remember, we're a relative + // path). + if (url.path === '/') { + url.path = base.path; + } + else { + // Resolution happens relative to the base path's directory, not the file. + url.path = stripPathFilename(base.path) + url.path; + } +} +/** + * The path can have empty directories "//", unneeded parents "foo/..", or current directory + * "foo/.". We need to normalize to a standard representation. + */ +function normalizePath(url, type) { + const rel = type <= 4 /* RelativePath */; + const pieces = url.path.split('/'); + // We need to preserve the first piece always, so that we output a leading slash. The item at + // pieces[0] is an empty string. + let pointer = 1; + // Positive is the number of real directories we've output, used for popping a parent directory. + // Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo". + let positive = 0; + // We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will + // generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a + // real directory, we won't need to append, unless the other conditions happen again. + let addTrailingSlash = false; + for (let i = 1; i < pieces.length; i++) { + const piece = pieces[i]; + // An empty directory, could be a trailing slash, or just a double "//" in the path. + if (!piece) { + addTrailingSlash = true; + continue; + } + // If we encounter a real directory, then we don't need to append anymore. + addTrailingSlash = false; + // A current directory, which we can always drop. + if (piece === '.') + continue; + // A parent directory, we need to see if there are any real directories we can pop. Else, we + // have an excess of parents, and we'll need to keep the "..". + if (piece === '..') { + if (positive) { + addTrailingSlash = true; + positive--; + pointer--; + } + else if (rel) { + // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute + // URL, protocol relative URL, or an absolute path, we don't need to keep excess. + pieces[pointer++] = piece; + } + continue; + } + // We've encountered a real directory. Move it to the next insertion pointer, which accounts for + // any popped or dropped directories. + pieces[pointer++] = piece; + positive++; + } + let path = ''; + for (let i = 1; i < pointer; i++) { + path += '/' + pieces[i]; + } + if (!path || (addTrailingSlash && !path.endsWith('/..'))) { + path += '/'; + } + url.path = path; +} +/** + * Attempts to resolve `input` URL/path relative to `base`. + */ +function resolve(input, base) { + if (!input && !base) + return ''; + const url = parseUrl(input); + let inputType = url.type; + if (base && inputType !== 7 /* Absolute */) { + const baseUrl = parseUrl(base); + const baseType = baseUrl.type; + switch (inputType) { + case 1 /* Empty */: + url.hash = baseUrl.hash; + // fall through + case 2 /* Hash */: + url.query = baseUrl.query; + // fall through + case 3 /* Query */: + case 4 /* RelativePath */: + mergePaths(url, baseUrl); + // fall through + case 5 /* AbsolutePath */: + // The host, user, and port are joined, you can't copy one without the others. + url.user = baseUrl.user; + url.host = baseUrl.host; + url.port = baseUrl.port; + // fall through + case 6 /* SchemeRelative */: + // The input doesn't have a schema at least, so we need to copy at least that over. + url.scheme = baseUrl.scheme; + } + if (baseType > inputType) + inputType = baseType; + } + normalizePath(url, inputType); + const queryHash = url.query + url.hash; + switch (inputType) { + // This is impossible, because of the empty checks at the start of the function. + // case UrlType.Empty: + case 2 /* Hash */: + case 3 /* Query */: + return queryHash; + case 4 /* RelativePath */: { + // The first char is always a "/", and we need it to be relative. + const path = url.path.slice(1); + if (!path) + return queryHash || '.'; + if (isRelative(base || input) && !isRelative(path)) { + // If base started with a leading ".", or there is no base and input started with a ".", + // then we need to ensure that the relative path starts with a ".". We don't know if + // relative starts with a "..", though, so check before prepending. + return './' + path + queryHash; + } + return path + queryHash; + } + case 5 /* AbsolutePath */: + return url.path + queryHash; + default: + return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash; + } +} + +export { resolve as default }; +//# sourceMappingURL=resolve-uri.mjs.map diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map new file mode 100644 index 0000000..1de97d0 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"resolve-uri.mjs","sources":["../src/resolve-uri.ts"],"sourcesContent":["// Matches the scheme of a URL, eg \"http://\"\nconst schemeRegex = /^[\\w+.-]+:\\/\\//;\n\n/**\n * Matches the parts of a URL:\n * 1. Scheme, including \":\", guaranteed.\n * 2. User/password, including \"@\", optional.\n * 3. Host, guaranteed.\n * 4. Port, including \":\", optional.\n * 5. Path, including \"/\", optional.\n * 6. Query, including \"?\", optional.\n * 7. Hash, including \"#\", optional.\n */\nconst urlRegex = /^([\\w+.-]+:)\\/\\/([^@/#?]*@)?([^:/#?]*)(:\\d+)?(\\/[^#?]*)?(\\?[^#]*)?(#.*)?/;\n\n/**\n * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start\n * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).\n *\n * 1. Host, optional.\n * 2. Path, which may include \"/\", guaranteed.\n * 3. Query, including \"?\", optional.\n * 4. Hash, including \"#\", optional.\n */\nconst fileRegex = /^file:(?:\\/\\/((?![a-z]:)[^/#?]*)?)?(\\/?[^#?]*)(\\?[^#]*)?(#.*)?/i;\n\ntype Url = {\n scheme: string;\n user: string;\n host: string;\n port: string;\n path: string;\n query: string;\n hash: string;\n type: UrlType;\n};\n\nconst enum UrlType {\n Empty = 1,\n Hash = 2,\n Query = 3,\n RelativePath = 4,\n AbsolutePath = 5,\n SchemeRelative = 6,\n Absolute = 7,\n}\n\nfunction isAbsoluteUrl(input: string): boolean {\n return schemeRegex.test(input);\n}\n\nfunction isSchemeRelativeUrl(input: string): boolean {\n return input.startsWith('//');\n}\n\nfunction isAbsolutePath(input: string): boolean {\n return input.startsWith('/');\n}\n\nfunction isFileUrl(input: string): boolean {\n return input.startsWith('file:');\n}\n\nfunction isRelative(input: string): boolean {\n return /^[.?#]/.test(input);\n}\n\nfunction parseAbsoluteUrl(input: string): Url {\n const match = urlRegex.exec(input)!;\n return makeUrl(\n match[1],\n match[2] || '',\n match[3],\n match[4] || '',\n match[5] || '/',\n match[6] || '',\n match[7] || '',\n );\n}\n\nfunction parseFileUrl(input: string): Url {\n const match = fileRegex.exec(input)!;\n const path = match[2];\n return makeUrl(\n 'file:',\n '',\n match[1] || '',\n '',\n isAbsolutePath(path) ? path : '/' + path,\n match[3] || '',\n match[4] || '',\n );\n}\n\nfunction makeUrl(\n scheme: string,\n user: string,\n host: string,\n port: string,\n path: string,\n query: string,\n hash: string,\n): Url {\n return {\n scheme,\n user,\n host,\n port,\n path,\n query,\n hash,\n type: UrlType.Absolute,\n };\n}\n\nfunction parseUrl(input: string): Url {\n if (isSchemeRelativeUrl(input)) {\n const url = parseAbsoluteUrl('http:' + input);\n url.scheme = '';\n url.type = UrlType.SchemeRelative;\n return url;\n }\n\n if (isAbsolutePath(input)) {\n const url = parseAbsoluteUrl('http://foo.com' + input);\n url.scheme = '';\n url.host = '';\n url.type = UrlType.AbsolutePath;\n return url;\n }\n\n if (isFileUrl(input)) return parseFileUrl(input);\n\n if (isAbsoluteUrl(input)) return parseAbsoluteUrl(input);\n\n const url = parseAbsoluteUrl('http://foo.com/' + input);\n url.scheme = '';\n url.host = '';\n url.type = input\n ? input.startsWith('?')\n ? UrlType.Query\n : input.startsWith('#')\n ? UrlType.Hash\n : UrlType.RelativePath\n : UrlType.Empty;\n return url;\n}\n\nfunction stripPathFilename(path: string): string {\n // If a path ends with a parent directory \"..\", then it's a relative path with excess parent\n // paths. It's not a file, so we can't strip it.\n if (path.endsWith('/..')) return path;\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n}\n\nfunction mergePaths(url: Url, base: Url) {\n normalizePath(base, base.type);\n\n // If the path is just a \"/\", then it was an empty path to begin with (remember, we're a relative\n // path).\n if (url.path === '/') {\n url.path = base.path;\n } else {\n // Resolution happens relative to the base path's directory, not the file.\n url.path = stripPathFilename(base.path) + url.path;\n }\n}\n\n/**\n * The path can have empty directories \"//\", unneeded parents \"foo/..\", or current directory\n * \"foo/.\". We need to normalize to a standard representation.\n */\nfunction normalizePath(url: Url, type: UrlType) {\n const rel = type <= UrlType.RelativePath;\n const pieces = url.path.split('/');\n\n // We need to preserve the first piece always, so that we output a leading slash. The item at\n // pieces[0] is an empty string.\n let pointer = 1;\n\n // Positive is the number of real directories we've output, used for popping a parent directory.\n // Eg, \"foo/bar/..\" will have a positive 2, and we can decrement to be left with just \"foo\".\n let positive = 0;\n\n // We need to keep a trailing slash if we encounter an empty directory (eg, splitting \"foo/\" will\n // generate `[\"foo\", \"\"]` pieces). And, if we pop a parent directory. But once we encounter a\n // real directory, we won't need to append, unless the other conditions happen again.\n let addTrailingSlash = false;\n\n for (let i = 1; i < pieces.length; i++) {\n const piece = pieces[i];\n\n // An empty directory, could be a trailing slash, or just a double \"//\" in the path.\n if (!piece) {\n addTrailingSlash = true;\n continue;\n }\n\n // If we encounter a real directory, then we don't need to append anymore.\n addTrailingSlash = false;\n\n // A current directory, which we can always drop.\n if (piece === '.') continue;\n\n // A parent directory, we need to see if there are any real directories we can pop. Else, we\n // have an excess of parents, and we'll need to keep the \"..\".\n if (piece === '..') {\n if (positive) {\n addTrailingSlash = true;\n positive--;\n pointer--;\n } else if (rel) {\n // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute\n // URL, protocol relative URL, or an absolute path, we don't need to keep excess.\n pieces[pointer++] = piece;\n }\n continue;\n }\n\n // We've encountered a real directory. Move it to the next insertion pointer, which accounts for\n // any popped or dropped directories.\n pieces[pointer++] = piece;\n positive++;\n }\n\n let path = '';\n for (let i = 1; i < pointer; i++) {\n path += '/' + pieces[i];\n }\n if (!path || (addTrailingSlash && !path.endsWith('/..'))) {\n path += '/';\n }\n url.path = path;\n}\n\n/**\n * Attempts to resolve `input` URL/path relative to `base`.\n */\nexport default function resolve(input: string, base: string | undefined): string {\n if (!input && !base) return '';\n\n const url = parseUrl(input);\n let inputType = url.type;\n\n if (base && inputType !== UrlType.Absolute) {\n const baseUrl = parseUrl(base);\n const baseType = baseUrl.type;\n\n switch (inputType) {\n case UrlType.Empty:\n url.hash = baseUrl.hash;\n // fall through\n\n case UrlType.Hash:\n url.query = baseUrl.query;\n // fall through\n\n case UrlType.Query:\n case UrlType.RelativePath:\n mergePaths(url, baseUrl);\n // fall through\n\n case UrlType.AbsolutePath:\n // The host, user, and port are joined, you can't copy one without the others.\n url.user = baseUrl.user;\n url.host = baseUrl.host;\n url.port = baseUrl.port;\n // fall through\n\n case UrlType.SchemeRelative:\n // The input doesn't have a schema at least, so we need to copy at least that over.\n url.scheme = baseUrl.scheme;\n }\n if (baseType > inputType) inputType = baseType;\n }\n\n normalizePath(url, inputType);\n\n const queryHash = url.query + url.hash;\n switch (inputType) {\n // This is impossible, because of the empty checks at the start of the function.\n // case UrlType.Empty:\n\n case UrlType.Hash:\n case UrlType.Query:\n return queryHash;\n\n case UrlType.RelativePath: {\n // The first char is always a \"/\", and we need it to be relative.\n const path = url.path.slice(1);\n\n if (!path) return queryHash || '.';\n\n if (isRelative(base || input) && !isRelative(path)) {\n // If base started with a leading \".\", or there is no base and input started with a \".\",\n // then we need to ensure that the relative path starts with a \".\". We don't know if\n // relative starts with a \"..\", though, so check before prepending.\n return './' + path + queryHash;\n }\n\n return path + queryHash;\n }\n\n case UrlType.AbsolutePath:\n return url.path + queryHash;\n\n default:\n return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;\n }\n}\n"],"names":[],"mappings":"AAAA;AACA,MAAM,WAAW,GAAG,gBAAgB,CAAC;AAErC;;;;;;;;;;AAUA,MAAM,QAAQ,GAAG,0EAA0E,CAAC;AAE5F;;;;;;;;;AASA,MAAM,SAAS,GAAG,iEAAiE,CAAC;AAu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_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js new file mode 100644 index 0000000..a783049 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js @@ -0,0 +1,240 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.resolveURI = factory()); +})(this, (function () { 'use strict'; + + // Matches the scheme of a URL, eg "http://" + const schemeRegex = /^[\w+.-]+:\/\//; + /** + * Matches the parts of a URL: + * 1. Scheme, including ":", guaranteed. + * 2. User/password, including "@", optional. + * 3. Host, guaranteed. + * 4. Port, including ":", optional. + * 5. Path, including "/", optional. + * 6. Query, including "?", optional. + * 7. Hash, including "#", optional. + */ + const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/; + /** + * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start + * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive). + * + * 1. Host, optional. + * 2. Path, which may include "/", guaranteed. + * 3. Query, including "?", optional. + * 4. Hash, including "#", optional. + */ + const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i; + function isAbsoluteUrl(input) { + return schemeRegex.test(input); + } + function isSchemeRelativeUrl(input) { + return input.startsWith('//'); + } + function isAbsolutePath(input) { + return input.startsWith('/'); + } + function isFileUrl(input) { + return input.startsWith('file:'); + } + function isRelative(input) { + return /^[.?#]/.test(input); + } + function parseAbsoluteUrl(input) { + const match = urlRegex.exec(input); + return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || ''); + } + function parseFileUrl(input) { + const match = fileRegex.exec(input); + const path = match[2]; + return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || ''); + } + function makeUrl(scheme, user, host, port, path, query, hash) { + return { + scheme, + user, + host, + port, + path, + query, + hash, + type: 7 /* Absolute */, + }; + } + function parseUrl(input) { + if (isSchemeRelativeUrl(input)) { + const url = parseAbsoluteUrl('http:' + input); + url.scheme = ''; + url.type = 6 /* SchemeRelative */; + return url; + } + if (isAbsolutePath(input)) { + const url = parseAbsoluteUrl('http://foo.com' + input); + url.scheme = ''; + url.host = ''; + url.type = 5 /* AbsolutePath */; + return url; + } + if (isFileUrl(input)) + return parseFileUrl(input); + if (isAbsoluteUrl(input)) + return parseAbsoluteUrl(input); + const url = parseAbsoluteUrl('http://foo.com/' + input); + url.scheme = ''; + url.host = ''; + url.type = input + ? input.startsWith('?') + ? 3 /* Query */ + : input.startsWith('#') + ? 2 /* Hash */ + : 4 /* RelativePath */ + : 1 /* Empty */; + return url; + } + function stripPathFilename(path) { + // If a path ends with a parent directory "..", then it's a relative path with excess parent + // paths. It's not a file, so we can't strip it. + if (path.endsWith('/..')) + return path; + const index = path.lastIndexOf('/'); + return path.slice(0, index + 1); + } + function mergePaths(url, base) { + normalizePath(base, base.type); + // If the path is just a "/", then it was an empty path to begin with (remember, we're a relative + // path). + if (url.path === '/') { + url.path = base.path; + } + else { + // Resolution happens relative to the base path's directory, not the file. + url.path = stripPathFilename(base.path) + url.path; + } + } + /** + * The path can have empty directories "//", unneeded parents "foo/..", or current directory + * "foo/.". We need to normalize to a standard representation. + */ + function normalizePath(url, type) { + const rel = type <= 4 /* RelativePath */; + const pieces = url.path.split('/'); + // We need to preserve the first piece always, so that we output a leading slash. The item at + // pieces[0] is an empty string. + let pointer = 1; + // Positive is the number of real directories we've output, used for popping a parent directory. + // Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo". + let positive = 0; + // We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will + // generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a + // real directory, we won't need to append, unless the other conditions happen again. + let addTrailingSlash = false; + for (let i = 1; i < pieces.length; i++) { + const piece = pieces[i]; + // An empty directory, could be a trailing slash, or just a double "//" in the path. + if (!piece) { + addTrailingSlash = true; + continue; + } + // If we encounter a real directory, then we don't need to append anymore. + addTrailingSlash = false; + // A current directory, which we can always drop. + if (piece === '.') + continue; + // A parent directory, we need to see if there are any real directories we can pop. Else, we + // have an excess of parents, and we'll need to keep the "..". + if (piece === '..') { + if (positive) { + addTrailingSlash = true; + positive--; + pointer--; + } + else if (rel) { + // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute + // URL, protocol relative URL, or an absolute path, we don't need to keep excess. + pieces[pointer++] = piece; + } + continue; + } + // We've encountered a real directory. Move it to the next insertion pointer, which accounts for + // any popped or dropped directories. + pieces[pointer++] = piece; + positive++; + } + let path = ''; + for (let i = 1; i < pointer; i++) { + path += '/' + pieces[i]; + } + if (!path || (addTrailingSlash && !path.endsWith('/..'))) { + path += '/'; + } + url.path = path; + } + /** + * Attempts to resolve `input` URL/path relative to `base`. + */ + function resolve(input, base) { + if (!input && !base) + return ''; + const url = parseUrl(input); + let inputType = url.type; + if (base && inputType !== 7 /* Absolute */) { + const baseUrl = parseUrl(base); + const baseType = baseUrl.type; + switch (inputType) { + case 1 /* Empty */: + url.hash = baseUrl.hash; + // fall through + case 2 /* Hash */: + url.query = baseUrl.query; + // fall through + case 3 /* Query */: + case 4 /* RelativePath */: + mergePaths(url, baseUrl); + // fall through + case 5 /* AbsolutePath */: + // The host, user, and port are joined, you can't copy one without the others. + url.user = baseUrl.user; + url.host = baseUrl.host; + url.port = baseUrl.port; + // fall through + case 6 /* SchemeRelative */: + // The input doesn't have a schema at least, so we need to copy at least that over. + url.scheme = baseUrl.scheme; + } + if (baseType > inputType) + inputType = baseType; + } + normalizePath(url, inputType); + const queryHash = url.query + url.hash; + switch (inputType) { + // This is impossible, because of the empty checks at the start of the function. + // case UrlType.Empty: + case 2 /* Hash */: + case 3 /* Query */: + return queryHash; + case 4 /* RelativePath */: { + // The first char is always a "/", and we need it to be relative. + const path = url.path.slice(1); + if (!path) + return queryHash || '.'; + if (isRelative(base || input) && !isRelative(path)) { + // If base started with a leading ".", or there is no base and input started with a ".", + // then we need to ensure that the relative path starts with a ".". We don't know if + // relative starts with a "..", though, so check before prepending. + return './' + path + queryHash; + } + return path + queryHash; + } + case 5 /* AbsolutePath */: + return url.path + queryHash; + default: + return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash; + } + } + + return resolve; + +})); +//# sourceMappingURL=resolve-uri.umd.js.map diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map new file mode 100644 index 0000000..70a37f2 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"resolve-uri.umd.js","sources":["../src/resolve-uri.ts"],"sourcesContent":["// Matches the scheme of a URL, eg \"http://\"\nconst schemeRegex = /^[\\w+.-]+:\\/\\//;\n\n/**\n * Matches the parts of a URL:\n * 1. Scheme, including \":\", guaranteed.\n * 2. User/password, including \"@\", optional.\n * 3. Host, guaranteed.\n * 4. Port, including \":\", optional.\n * 5. Path, including \"/\", optional.\n * 6. Query, including \"?\", optional.\n * 7. Hash, including \"#\", optional.\n */\nconst urlRegex = /^([\\w+.-]+:)\\/\\/([^@/#?]*@)?([^:/#?]*)(:\\d+)?(\\/[^#?]*)?(\\?[^#]*)?(#.*)?/;\n\n/**\n * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start\n * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).\n *\n * 1. Host, optional.\n * 2. Path, which may include \"/\", guaranteed.\n * 3. Query, including \"?\", optional.\n * 4. Hash, including \"#\", optional.\n */\nconst fileRegex = /^file:(?:\\/\\/((?![a-z]:)[^/#?]*)?)?(\\/?[^#?]*)(\\?[^#]*)?(#.*)?/i;\n\ntype Url = {\n scheme: string;\n user: string;\n host: string;\n port: string;\n path: string;\n query: string;\n hash: string;\n type: UrlType;\n};\n\nconst enum UrlType {\n Empty = 1,\n Hash = 2,\n Query = 3,\n RelativePath = 4,\n AbsolutePath = 5,\n SchemeRelative = 6,\n Absolute = 7,\n}\n\nfunction isAbsoluteUrl(input: string): boolean {\n return schemeRegex.test(input);\n}\n\nfunction isSchemeRelativeUrl(input: string): boolean {\n return input.startsWith('//');\n}\n\nfunction isAbsolutePath(input: string): boolean {\n return input.startsWith('/');\n}\n\nfunction isFileUrl(input: string): boolean {\n return input.startsWith('file:');\n}\n\nfunction isRelative(input: string): boolean {\n return /^[.?#]/.test(input);\n}\n\nfunction parseAbsoluteUrl(input: string): Url {\n const match = urlRegex.exec(input)!;\n return makeUrl(\n match[1],\n match[2] || '',\n match[3],\n match[4] || '',\n match[5] || '/',\n match[6] || '',\n match[7] || '',\n );\n}\n\nfunction parseFileUrl(input: string): Url {\n const match = fileRegex.exec(input)!;\n const path = match[2];\n return makeUrl(\n 'file:',\n '',\n match[1] || '',\n '',\n isAbsolutePath(path) ? path : '/' + path,\n match[3] || '',\n match[4] || '',\n );\n}\n\nfunction makeUrl(\n scheme: string,\n user: string,\n host: string,\n port: string,\n path: string,\n query: string,\n hash: string,\n): Url {\n return {\n scheme,\n user,\n host,\n port,\n path,\n query,\n hash,\n type: UrlType.Absolute,\n };\n}\n\nfunction parseUrl(input: string): Url {\n if (isSchemeRelativeUrl(input)) {\n const url = parseAbsoluteUrl('http:' + input);\n url.scheme = '';\n url.type = UrlType.SchemeRelative;\n return url;\n }\n\n if (isAbsolutePath(input)) {\n const url = parseAbsoluteUrl('http://foo.com' + input);\n url.scheme = '';\n url.host = '';\n url.type = UrlType.AbsolutePath;\n return url;\n }\n\n if (isFileUrl(input)) return parseFileUrl(input);\n\n if (isAbsoluteUrl(input)) return parseAbsoluteUrl(input);\n\n const url = parseAbsoluteUrl('http://foo.com/' + input);\n url.scheme = '';\n url.host = '';\n url.type = input\n ? input.startsWith('?')\n ? UrlType.Query\n : input.startsWith('#')\n ? UrlType.Hash\n : UrlType.RelativePath\n : UrlType.Empty;\n return url;\n}\n\nfunction stripPathFilename(path: string): string {\n // If a path ends with a parent directory \"..\", then it's a relative path with excess parent\n // paths. It's not a file, so we can't strip it.\n if (path.endsWith('/..')) return path;\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n}\n\nfunction mergePaths(url: Url, base: Url) {\n normalizePath(base, base.type);\n\n // If the path is just a \"/\", then it was an empty path to begin with (remember, we're a relative\n // path).\n if (url.path === '/') {\n url.path = base.path;\n } else {\n // Resolution happens relative to the base path's directory, not the file.\n url.path = stripPathFilename(base.path) + url.path;\n }\n}\n\n/**\n * The path can have empty directories \"//\", unneeded parents \"foo/..\", or current directory\n * \"foo/.\". We need to normalize to a standard representation.\n */\nfunction normalizePath(url: Url, type: UrlType) {\n const rel = type <= UrlType.RelativePath;\n const pieces = url.path.split('/');\n\n // We need to preserve the first piece always, so that we output a leading slash. The item at\n // pieces[0] is an empty string.\n let pointer = 1;\n\n // Positive is the number of real directories we've output, used for popping a parent directory.\n // Eg, \"foo/bar/..\" will have a positive 2, and we can decrement to be left with just \"foo\".\n let positive = 0;\n\n // We need to keep a trailing slash if we encounter an empty directory (eg, splitting \"foo/\" will\n // generate `[\"foo\", \"\"]` pieces). And, if we pop a parent directory. But once we encounter a\n // real directory, we won't need to append, unless the other conditions happen again.\n let addTrailingSlash = false;\n\n for (let i = 1; i < pieces.length; i++) {\n const piece = pieces[i];\n\n // An empty directory, could be a trailing slash, or just a double \"//\" in the path.\n if (!piece) {\n addTrailingSlash = true;\n continue;\n }\n\n // If we encounter a real directory, then we don't need to append anymore.\n addTrailingSlash = false;\n\n // A current directory, which we can always drop.\n if (piece === '.') continue;\n\n // A parent directory, we need to see if there are any real directories we can pop. Else, we\n // have an excess of parents, and we'll need to keep the \"..\".\n if (piece === '..') {\n if (positive) {\n addTrailingSlash = true;\n positive--;\n pointer--;\n } else if (rel) {\n // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute\n // URL, protocol relative URL, or an absolute path, we don't need to keep excess.\n pieces[pointer++] = piece;\n }\n continue;\n }\n\n // We've encountered a real directory. Move it to the next insertion pointer, which accounts for\n // any popped or dropped directories.\n pieces[pointer++] = piece;\n positive++;\n }\n\n let path = '';\n for (let i = 1; i < pointer; i++) {\n path += '/' + pieces[i];\n }\n if (!path || (addTrailingSlash && !path.endsWith('/..'))) {\n path += '/';\n }\n url.path = path;\n}\n\n/**\n * Attempts to resolve `input` URL/path relative to `base`.\n */\nexport default function resolve(input: string, base: string | undefined): string {\n if (!input && !base) return '';\n\n const url = parseUrl(input);\n let inputType = url.type;\n\n if (base && inputType !== UrlType.Absolute) {\n const baseUrl = parseUrl(base);\n const baseType = baseUrl.type;\n\n switch (inputType) {\n case UrlType.Empty:\n url.hash = baseUrl.hash;\n // fall through\n\n case UrlType.Hash:\n url.query = baseUrl.query;\n // fall through\n\n case UrlType.Query:\n case UrlType.RelativePath:\n mergePaths(url, baseUrl);\n // fall through\n\n case UrlType.AbsolutePath:\n // The host, user, and port are joined, you can't copy one without the others.\n url.user = baseUrl.user;\n url.host = baseUrl.host;\n url.port = baseUrl.port;\n // fall through\n\n case UrlType.SchemeRelative:\n // The input doesn't have a schema at least, so we need to copy at least that over.\n url.scheme = baseUrl.scheme;\n }\n if (baseType > inputType) inputType = baseType;\n }\n\n normalizePath(url, inputType);\n\n const queryHash = url.query + url.hash;\n switch (inputType) {\n // This is impossible, because of the empty checks at the start of the function.\n // case UrlType.Empty:\n\n case UrlType.Hash:\n case UrlType.Query:\n return queryHash;\n\n case UrlType.RelativePath: {\n // The first char is always a \"/\", and we need it to be relative.\n const path = url.path.slice(1);\n\n if (!path) return queryHash || '.';\n\n if (isRelative(base || input) && !isRelative(path)) {\n // If base started with a leading \".\", or there is no base and input started with a \".\",\n // then we need to ensure that the relative path starts with a \".\". We don't know if\n // relative starts with a \"..\", though, so check before prepending.\n return './' + path + queryHash;\n }\n\n return path + queryHash;\n }\n\n case UrlType.AbsolutePath:\n return url.path + queryHash;\n\n default:\n return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;\n }\n}\n"],"names":[],"mappings":";;;;;;IAAA;IACA,MAAM,WAAW,GAAG,gBAAgB,CAAC;IAErC;;;;;;;;;;IAUA,MAAM,QAAQ,GAAG,0EAA0E,CAAC;IAE5F;;;;;;;;;IASA,MAAM,SAAS,GAAG,iEAAiE,CAAC;IAuBpF,SAAS,aAAa,CAAC,KAAa;QAClC,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAED,SAAS,mBAAmB,CAAC,KAAa;QACxC,OAAO,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAED,SAAS,cAAc,CAAC,KAAa;QACnC,OAAO,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC;IAED,SAAS,SAAS,CAAC,KAAa;QAC9B,OAAO,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;IAED,SAAS,UAAU,CAAC,KAAa;QAC/B,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED,SAAS,gBAAgB,CAAC,KAAa;QACrC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAE,CAAC;QACpC,OAAO,OAAO,CACZ,KAAK,CAAC,CAAC,CAAC,EACR,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,KAAK,CAAC,CAAC,CAAC,EACR,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,KAAK,CAAC,CAAC,CAAC,IAAI,GAAG,EACf,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CACf,CAAC;IACJ,CAAC;IAED,SAAS,YAAY,CAAC,KAAa;QACjC,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,KAAK,CAAE,CAA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O,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;YAE9B;gBACE,OAAO,GAAG,CAAC,MAAM,GAAG,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;SACpF;IACH;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts b/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts new file mode 100644 index 0000000..b7f0b3b --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts @@ -0,0 +1,4 @@ +/** + * Attempts to resolve `input` URL/path relative to `base`. + */ +export default function resolve(input: string, base: string | undefined): string; diff --git a/node_modules/@jridgewell/resolve-uri/package.json b/node_modules/@jridgewell/resolve-uri/package.json new file mode 100644 index 0000000..02a4c51 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/package.json @@ -0,0 +1,69 @@ +{ + "name": "@jridgewell/resolve-uri", + "version": "3.1.2", + "description": "Resolve a URI relative to an optional base URI", + "keywords": [ + "resolve", + "uri", + "url", + "path" + ], + "author": "Justin Ridgewell ", + "license": "MIT", + "repository": "https://github.com/jridgewell/resolve-uri", + "main": "dist/resolve-uri.umd.js", + "module": "dist/resolve-uri.mjs", + "types": "dist/types/resolve-uri.d.ts", + "exports": { + ".": [ + { + "types": "./dist/types/resolve-uri.d.ts", + "browser": "./dist/resolve-uri.umd.js", + "require": "./dist/resolve-uri.umd.js", + "import": "./dist/resolve-uri.mjs" + }, + "./dist/resolve-uri.umd.js" + ], + "./package.json": "./package.json" + }, + "files": [ + "dist" + ], + "engines": { + "node": ">=6.0.0" + }, + "scripts": { + "prebuild": "rm -rf dist", + "build": "run-s -n build:*", + "build:rollup": "rollup -c rollup.config.js", + "build:ts": "tsc --project tsconfig.build.json", + "lint": "run-s -n lint:*", + "lint:prettier": "npm run test:lint:prettier -- --write", + "lint:ts": "npm run test:lint:ts -- --fix", + "pretest": "run-s build:rollup", + "test": "run-s -n test:lint test:only", + "test:debug": "mocha --inspect-brk", + "test:lint": "run-s -n test:lint:*", + "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'", + "test:lint:ts": "eslint '{src,test}/**/*.ts'", + "test:only": "mocha", + "test:coverage": "c8 mocha", + "test:watch": "mocha --watch", + "prepublishOnly": "npm run preversion", + "preversion": "run-s test build" + }, + "devDependencies": { + "@jridgewell/resolve-uri-latest": "npm:@jridgewell/resolve-uri@*", + "@rollup/plugin-typescript": "8.3.0", + "@typescript-eslint/eslint-plugin": "5.10.0", + "@typescript-eslint/parser": "5.10.0", + "c8": "7.11.0", + "eslint": "8.7.0", + "eslint-config-prettier": "8.3.0", + "mocha": "9.2.0", + "npm-run-all": "4.1.5", + "prettier": "2.5.1", + "rollup": "2.66.0", + "typescript": "4.5.5" + } +} diff --git a/node_modules/@jridgewell/sourcemap-codec/LICENSE b/node_modules/@jridgewell/sourcemap-codec/LICENSE new file mode 100644 index 0000000..1f6ce94 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/LICENSE @@ -0,0 +1,19 @@ +Copyright 2024 Justin Ridgewell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@jridgewell/sourcemap-codec/README.md b/node_modules/@jridgewell/sourcemap-codec/README.md new file mode 100644 index 0000000..b3e0708 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/README.md @@ -0,0 +1,264 @@ +# @jridgewell/sourcemap-codec + +Encode/decode the `mappings` property of a [sourcemap](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit). + + +## Why? + +Sourcemaps are difficult to generate and manipulate, because the `mappings` property – the part that actually links the generated code back to the original source – is encoded using an obscure method called [Variable-length quantity](https://en.wikipedia.org/wiki/Variable-length_quantity). On top of that, each segment in the mapping contains offsets rather than absolute indices, which means that you can't look at a segment in isolation – you have to understand the whole sourcemap. + +This package makes the process slightly easier. + + +## Installation + +```bash +npm install @jridgewell/sourcemap-codec +``` + + +## Usage + +```js +import { encode, decode } from '@jridgewell/sourcemap-codec'; + +var decoded = decode( ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' ); + +assert.deepEqual( decoded, [ + // the first line (of the generated code) has no mappings, + // as shown by the starting semi-colon (which separates lines) + [], + + // the second line contains four (comma-separated) segments + [ + // segments are encoded as you'd expect: + // [ generatedCodeColumn, sourceIndex, sourceCodeLine, sourceCodeColumn, nameIndex ] + + // i.e. the first segment begins at column 2, and maps back to the second column + // of the second line (both zero-based) of the 0th source, and uses the 0th + // name in the `map.names` array + [ 2, 0, 2, 2, 0 ], + + // the remaining segments are 4-length rather than 5-length, + // because they don't map a name + [ 4, 0, 2, 4 ], + [ 6, 0, 2, 5 ], + [ 7, 0, 2, 7 ] + ], + + // the final line contains two segments + [ + [ 2, 1, 10, 19 ], + [ 12, 1, 11, 20 ] + ] +]); + +var encoded = encode( decoded ); +assert.equal( encoded, ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' ); +``` + +## Benchmarks + +``` +node v20.10.0 + +amp.js.map - 45120 segments + +Decode Memory Usage: +local code 5815135 bytes +@jridgewell/sourcemap-codec 1.4.15 5868160 bytes +sourcemap-codec 5492584 bytes +source-map-0.6.1 13569984 bytes +source-map-0.8.0 6390584 bytes +chrome dev tools 8011136 bytes +Smallest memory usage is sourcemap-codec + +Decode speed: +decode: local code x 492 ops/sec ±1.22% (90 runs sampled) +decode: @jridgewell/sourcemap-codec 1.4.15 x 499 ops/sec ±1.16% (89 runs sampled) +decode: sourcemap-codec x 376 ops/sec ±1.66% (89 runs sampled) +decode: source-map-0.6.1 x 34.99 ops/sec ±0.94% (48 runs sampled) +decode: source-map-0.8.0 x 351 ops/sec ±0.07% (95 runs sampled) +chrome dev tools x 165 ops/sec ±0.91% (86 runs sampled) +Fastest is decode: @jridgewell/sourcemap-codec 1.4.15 + +Encode Memory Usage: +local code 444248 bytes +@jridgewell/sourcemap-codec 1.4.15 623024 bytes +sourcemap-codec 8696280 bytes +source-map-0.6.1 8745176 bytes +source-map-0.8.0 8736624 bytes +Smallest memory usage is local code + +Encode speed: +encode: local code x 796 ops/sec ±0.11% (97 runs sampled) +encode: @jridgewell/sourcemap-codec 1.4.15 x 795 ops/sec ±0.25% (98 runs sampled) +encode: sourcemap-codec x 231 ops/sec ±0.83% (86 runs sampled) +encode: source-map-0.6.1 x 166 ops/sec ±0.57% (86 runs sampled) +encode: source-map-0.8.0 x 203 ops/sec ±0.45% (88 runs sampled) +Fastest is encode: local code,encode: @jridgewell/sourcemap-codec 1.4.15 + + +*** + + +babel.min.js.map - 347793 segments + +Decode Memory Usage: +local code 35424960 bytes +@jridgewell/sourcemap-codec 1.4.15 35424696 bytes +sourcemap-codec 36033464 bytes +source-map-0.6.1 62253704 bytes +source-map-0.8.0 43843920 bytes +chrome dev tools 45111400 bytes +Smallest memory usage is @jridgewell/sourcemap-codec 1.4.15 + +Decode speed: +decode: local code x 38.18 ops/sec ±5.44% (52 runs sampled) +decode: @jridgewell/sourcemap-codec 1.4.15 x 38.36 ops/sec ±5.02% (52 runs sampled) +decode: sourcemap-codec x 34.05 ops/sec ±4.45% (47 runs sampled) +decode: source-map-0.6.1 x 4.31 ops/sec ±2.76% (15 runs sampled) +decode: source-map-0.8.0 x 55.60 ops/sec ±0.13% (73 runs sampled) +chrome dev tools x 16.94 ops/sec ±3.78% (46 runs sampled) +Fastest is decode: source-map-0.8.0 + +Encode Memory Usage: +local code 2606016 bytes +@jridgewell/sourcemap-codec 1.4.15 2626440 bytes +sourcemap-codec 21152576 bytes +source-map-0.6.1 25023928 bytes +source-map-0.8.0 25256448 bytes +Smallest memory usage is local code + +Encode speed: +encode: local code x 127 ops/sec ±0.18% (83 runs sampled) +encode: @jridgewell/sourcemap-codec 1.4.15 x 128 ops/sec ±0.26% (83 runs sampled) +encode: sourcemap-codec x 29.31 ops/sec ±2.55% (53 runs sampled) +encode: source-map-0.6.1 x 18.85 ops/sec ±3.19% (36 runs sampled) +encode: source-map-0.8.0 x 19.34 ops/sec ±1.97% (36 runs sampled) +Fastest is encode: @jridgewell/sourcemap-codec 1.4.15 + + +*** + + +preact.js.map - 1992 segments + +Decode Memory Usage: +local code 261696 bytes +@jridgewell/sourcemap-codec 1.4.15 244296 bytes +sourcemap-codec 302816 bytes +source-map-0.6.1 939176 bytes +source-map-0.8.0 336 bytes +chrome dev tools 587368 bytes +Smallest memory usage is source-map-0.8.0 + +Decode speed: +decode: local code x 17,782 ops/sec ±0.32% (97 runs sampled) +decode: @jridgewell/sourcemap-codec 1.4.15 x 17,863 ops/sec ±0.40% (100 runs sampled) +decode: sourcemap-codec x 12,453 ops/sec ±0.27% (101 runs sampled) +decode: source-map-0.6.1 x 1,288 ops/sec ±1.05% (96 runs sampled) +decode: source-map-0.8.0 x 9,289 ops/sec ±0.27% (101 runs sampled) +chrome dev tools x 4,769 ops/sec ±0.18% (100 runs sampled) +Fastest is decode: @jridgewell/sourcemap-codec 1.4.15 + +Encode Memory Usage: +local code 262944 bytes +@jridgewell/sourcemap-codec 1.4.15 25544 bytes +sourcemap-codec 323048 bytes +source-map-0.6.1 507808 bytes +source-map-0.8.0 507480 bytes +Smallest memory usage is @jridgewell/sourcemap-codec 1.4.15 + +Encode speed: +encode: local code x 24,207 ops/sec ±0.79% (95 runs sampled) +encode: @jridgewell/sourcemap-codec 1.4.15 x 24,288 ops/sec ±0.48% (96 runs sampled) +encode: sourcemap-codec x 6,761 ops/sec ±0.21% (100 runs sampled) +encode: source-map-0.6.1 x 5,374 ops/sec ±0.17% (99 runs sampled) +encode: source-map-0.8.0 x 5,633 ops/sec ±0.32% (99 runs sampled) +Fastest is encode: @jridgewell/sourcemap-codec 1.4.15,encode: local code + + +*** + + +react.js.map - 5726 segments + +Decode Memory Usage: +local code 678816 bytes +@jridgewell/sourcemap-codec 1.4.15 678816 bytes +sourcemap-codec 816400 bytes +source-map-0.6.1 2288864 bytes +source-map-0.8.0 721360 bytes +chrome dev tools 1012512 bytes +Smallest memory usage is local code + +Decode speed: +decode: local code x 6,178 ops/sec ±0.19% (98 runs sampled) +decode: @jridgewell/sourcemap-codec 1.4.15 x 6,261 ops/sec ±0.22% (100 runs sampled) +decode: sourcemap-codec x 4,472 ops/sec ±0.90% (99 runs sampled) +decode: source-map-0.6.1 x 449 ops/sec ±0.31% (95 runs sampled) +decode: source-map-0.8.0 x 3,219 ops/sec ±0.13% (100 runs sampled) +chrome dev tools x 1,743 ops/sec ±0.20% (99 runs sampled) +Fastest is decode: @jridgewell/sourcemap-codec 1.4.15 + +Encode Memory Usage: +local code 140960 bytes +@jridgewell/sourcemap-codec 1.4.15 159808 bytes +sourcemap-codec 969304 bytes +source-map-0.6.1 930520 bytes +source-map-0.8.0 930248 bytes +Smallest memory usage is local code + +Encode speed: +encode: local code x 8,013 ops/sec ±0.19% (100 runs sampled) +encode: @jridgewell/sourcemap-codec 1.4.15 x 7,989 ops/sec ±0.20% (101 runs sampled) +encode: sourcemap-codec x 2,472 ops/sec ±0.21% (99 runs sampled) +encode: source-map-0.6.1 x 2,200 ops/sec ±0.17% (99 runs sampled) +encode: source-map-0.8.0 x 2,220 ops/sec ±0.37% (99 runs sampled) +Fastest is encode: local code + + +*** + + +vscode.map - 2141001 segments + +Decode Memory Usage: +local code 198955264 bytes +@jridgewell/sourcemap-codec 1.4.15 199175352 bytes +sourcemap-codec 199102688 bytes +source-map-0.6.1 386323432 bytes +source-map-0.8.0 244116432 bytes +chrome dev tools 293734280 bytes +Smallest memory usage is local code + +Decode speed: +decode: local code x 3.90 ops/sec ±22.21% (15 runs sampled) +decode: @jridgewell/sourcemap-codec 1.4.15 x 3.95 ops/sec ±23.53% (15 runs sampled) +decode: sourcemap-codec x 3.82 ops/sec ±17.94% (14 runs sampled) +decode: source-map-0.6.1 x 0.61 ops/sec ±7.81% (6 runs sampled) +decode: source-map-0.8.0 x 9.54 ops/sec ±0.28% (28 runs sampled) +chrome dev tools x 2.18 ops/sec ±10.58% (10 runs sampled) +Fastest is decode: source-map-0.8.0 + +Encode Memory Usage: +local code 13509880 bytes +@jridgewell/sourcemap-codec 1.4.15 13537648 bytes +sourcemap-codec 32540104 bytes +source-map-0.6.1 127531040 bytes +source-map-0.8.0 127535312 bytes +Smallest memory usage is local code + +Encode speed: +encode: local code x 20.10 ops/sec ±0.19% (38 runs sampled) +encode: @jridgewell/sourcemap-codec 1.4.15 x 20.26 ops/sec ±0.32% (38 runs sampled) +encode: sourcemap-codec x 5.44 ops/sec ±1.64% (18 runs sampled) +encode: source-map-0.6.1 x 2.30 ops/sec ±4.79% (10 runs sampled) +encode: source-map-0.8.0 x 2.46 ops/sec ±6.53% (10 runs sampled) +Fastest is encode: @jridgewell/sourcemap-codec 1.4.15 +``` + +# License + +MIT diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs new file mode 100644 index 0000000..4e10070 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs @@ -0,0 +1,467 @@ +// src/vlq.ts +var comma = ",".charCodeAt(0); +var semicolon = ";".charCodeAt(0); +var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; +var intToChar = new Uint8Array(64); +var charToInt = new Uint8Array(128); +for (let i = 0; i < chars.length; i++) { + const c = chars.charCodeAt(i); + intToChar[i] = c; + charToInt[c] = i; +} +function decodeInteger(reader) { + let value = 0; + let shift = 0; + let integer = 0; + do { + const c = reader.next(); + integer = charToInt[c]; + value |= (integer & 31) << shift; + shift += 5; + } while (integer & 32); + return value; +} +function decodeSign(num) { + return num & 1 ? -2147483648 | -(num >>> 1) : num >>> 1; +} +function encodeInteger(builder, num) { + do { + let clamped = num & 31; + num >>>= 5; + if (num > 0) clamped |= 32; + builder.write(intToChar[clamped]); + } while (num > 0); +} +function encodeSign(num) { + return num < 0 ? -num << 1 | 1 : num << 1; +} +function hasMoreVlq(reader, max) { + if (reader.pos >= max) return false; + return reader.peek() !== comma; +} + +// src/strings.ts +var bufLength = 1024 * 16; +var td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? { + decode(buf) { + const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); + return out.toString(); + } +} : { + decode(buf) { + let out = ""; + for (let i = 0; i < buf.length; i++) { + out += String.fromCharCode(buf[i]); + } + return out; + } +}; +var StringWriter = class { + constructor() { + this.pos = 0; + this.out = ""; + this.buffer = new Uint8Array(bufLength); + } + write(v) { + const { buffer } = this; + buffer[this.pos++] = v; + if (this.pos === bufLength) { + this.out += td.decode(buffer); + this.pos = 0; + } + } + flush() { + const { buffer, out, pos } = this; + return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out; + } +}; +var StringReader = class { + constructor(buffer) { + this.pos = 0; + this.buffer = buffer; + } + next() { + return this.buffer.charCodeAt(this.pos++); + } + peek() { + return this.buffer.charCodeAt(this.pos); + } + indexOf(char) { + const { buffer, pos } = this; + const idx = buffer.indexOf(char, pos); + return idx === -1 ? buffer.length : idx; + } +}; + +// src/scopes.ts +var EMPTY = []; +function decodeOriginalScopes(input) { + const { length } = input; + const reader = new StringReader(input); + const scopes = []; + const stack = []; + let line = 0; + for (; reader.pos < length; reader.pos++) { + line += decodeSign(decodeInteger(reader)); + const column = decodeSign(decodeInteger(reader)); + if (!hasMoreVlq(reader, length)) { + const last = stack.pop(); + last[2] = line; + last[3] = column; + continue; + } + const kind = decodeSign(decodeInteger(reader)); + const fields = decodeSign(decodeInteger(reader)); + const hasName = fields & 1; + const scope = hasName ? [line, column, 0, 0, kind, decodeSign(decodeInteger(reader))] : [line, column, 0, 0, kind]; + let vars = EMPTY; + if (hasMoreVlq(reader, length)) { + vars = []; + do { + const varsIndex = decodeSign(decodeInteger(reader)); + vars.push(varsIndex); + } while (hasMoreVlq(reader, length)); + } + scope.vars = vars; + scopes.push(scope); + stack.push(scope); + } + return scopes; +} +function encodeOriginalScopes(scopes) { + const writer = new StringWriter(); + for (let i = 0; i < scopes.length; ) { + i = _encodeOriginalScopes(scopes, i, writer, [0]); + } + return writer.flush(); +} +function _encodeOriginalScopes(scopes, index, writer, state) { + const scope = scopes[index]; + const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope; + if (index > 0) writer.write(comma); + encodeInteger(writer, encodeSign(startLine - state[0])); + state[0] = startLine; + encodeInteger(writer, encodeSign(startColumn)); + encodeInteger(writer, encodeSign(kind)); + const fields = scope.length === 6 ? 1 : 0; + encodeInteger(writer, encodeSign(fields)); + if (scope.length === 6) encodeInteger(writer, encodeSign(scope[5])); + for (const v of vars) { + encodeInteger(writer, encodeSign(v)); + } + for (index++; index < scopes.length; ) { + const next = scopes[index]; + const { 0: l, 1: c } = next; + if (l > endLine || l === endLine && c >= endColumn) { + break; + } + index = _encodeOriginalScopes(scopes, index, writer, state); + } + writer.write(comma); + encodeInteger(writer, encodeSign(endLine - state[0])); + state[0] = endLine; + encodeInteger(writer, encodeSign(endColumn)); + return index; +} +function decodeGeneratedRanges(input) { + const { length } = input; + const reader = new StringReader(input); + const ranges = []; + const stack = []; + let genLine = 0; + let definitionSourcesIndex = 0; + let definitionScopeIndex = 0; + let callsiteSourcesIndex = 0; + let callsiteLine = 0; + let callsiteColumn = 0; + let bindingLine = 0; + let bindingColumn = 0; + do { + const semi = reader.indexOf(";"); + let genColumn = 0; + for (; reader.pos < semi; reader.pos++) { + genColumn += decodeSign(decodeInteger(reader)); + if (!hasMoreVlq(reader, semi)) { + const last = stack.pop(); + last[2] = genLine; + last[3] = genColumn; + continue; + } + const fields = decodeSign(decodeInteger(reader)); + const hasDefinition = fields & 1; + const hasCallsite = fields & 2; + const hasScope = fields & 4; + let callsite = null; + let bindings = EMPTY; + let range; + if (hasDefinition) { + const defSourcesIndex = definitionSourcesIndex + decodeSign(decodeInteger(reader)); + definitionScopeIndex = decodeSign(decodeInteger(reader)) + (definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0); + definitionSourcesIndex = defSourcesIndex; + range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex]; + } else { + range = [genLine, genColumn, 0, 0]; + } + range.isScope = !!hasScope; + if (hasCallsite) { + const prevCsi = callsiteSourcesIndex; + const prevLine = callsiteLine; + callsiteSourcesIndex += decodeSign(decodeInteger(reader)); + const sameSource = prevCsi === callsiteSourcesIndex; + callsiteLine = (sameSource ? callsiteLine : 0) + decodeSign(decodeInteger(reader)); + callsiteColumn = (sameSource && prevLine === callsiteLine ? callsiteColumn : 0) + decodeSign(decodeInteger(reader)); + callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn]; + } + range.callsite = callsite; + if (hasMoreVlq(reader, semi)) { + bindings = []; + do { + bindingLine = genLine; + bindingColumn = genColumn; + const expressionsCount = decodeSign(decodeInteger(reader)); + let expressionRanges; + if (expressionsCount < -1) { + expressionRanges = [[decodeSign(decodeInteger(reader))]]; + for (let i = -1; i > expressionsCount; i--) { + const prevBl = bindingLine; + bindingLine += decodeSign(decodeInteger(reader)); + bindingColumn = (bindingLine === prevBl ? bindingColumn : 0) + decodeSign(decodeInteger(reader)); + const expression = decodeSign(decodeInteger(reader)); + expressionRanges.push([expression, bindingLine, bindingColumn]); + } + } else { + expressionRanges = [[expressionsCount]]; + } + bindings.push(expressionRanges); + } while (hasMoreVlq(reader, semi)); + } + range.bindings = bindings; + ranges.push(range); + stack.push(range); + } + genLine++; + reader.pos = semi + 1; + } while (reader.pos < length); + return ranges; +} +function encodeGeneratedRanges(ranges) { + if (ranges.length === 0) return ""; + const writer = new StringWriter(); + for (let i = 0; i < ranges.length; ) { + i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]); + } + return writer.flush(); +} +function _encodeGeneratedRanges(ranges, index, writer, state) { + const range = ranges[index]; + const { + 0: startLine, + 1: startColumn, + 2: endLine, + 3: endColumn, + isScope, + callsite, + bindings + } = range; + if (state[0] < startLine) { + catchupLine(writer, state[0], startLine); + state[0] = startLine; + state[1] = 0; + } else if (index > 0) { + writer.write(comma); + } + encodeInteger(writer, encodeSign(range[1] - state[1])); + state[1] = range[1]; + const fields = (range.length === 6 ? 1 : 0) | (callsite ? 2 : 0) | (isScope ? 4 : 0); + encodeInteger(writer, encodeSign(fields)); + if (range.length === 6) { + const { 4: sourcesIndex, 5: scopesIndex } = range; + if (sourcesIndex !== state[2]) { + state[3] = 0; + } + encodeInteger(writer, encodeSign(sourcesIndex - state[2])); + state[2] = sourcesIndex; + encodeInteger(writer, encodeSign(scopesIndex - state[3])); + state[3] = scopesIndex; + } + if (callsite) { + const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite; + if (sourcesIndex !== state[4]) { + state[5] = 0; + state[6] = 0; + } else if (callLine !== state[5]) { + state[6] = 0; + } + encodeInteger(writer, encodeSign(sourcesIndex - state[4])); + state[4] = sourcesIndex; + encodeInteger(writer, encodeSign(callLine - state[5])); + state[5] = callLine; + encodeInteger(writer, encodeSign(callColumn - state[6])); + state[6] = callColumn; + } + if (bindings) { + for (const binding of bindings) { + if (binding.length > 1) encodeInteger(writer, encodeSign(-binding.length)); + const expression = binding[0][0]; + encodeInteger(writer, encodeSign(expression)); + let bindingStartLine = startLine; + let bindingStartColumn = startColumn; + for (let i = 1; i < binding.length; i++) { + const expRange = binding[i]; + encodeInteger(writer, encodeSign(expRange[1] - bindingStartLine)); + bindingStartLine = expRange[1]; + encodeInteger(writer, encodeSign(expRange[2] - bindingStartColumn)); + bindingStartColumn = expRange[2]; + encodeInteger(writer, encodeSign(expRange[0])); + } + } + } + for (index++; index < ranges.length; ) { + const next = ranges[index]; + const { 0: l, 1: c } = next; + if (l > endLine || l === endLine && c >= endColumn) { + break; + } + index = _encodeGeneratedRanges(ranges, index, writer, state); + } + if (state[0] < endLine) { + catchupLine(writer, state[0], endLine); + state[0] = endLine; + state[1] = 0; + } else { + writer.write(comma); + } + encodeInteger(writer, encodeSign(endColumn - state[1])); + state[1] = endColumn; + return index; +} +function catchupLine(writer, lastLine, line) { + do { + writer.write(semicolon); + } while (++lastLine < line); +} + +// src/range-mappings.ts +function decodeRangeMappings(input) { + const { length } = input; + const reader = new StringReader(input); + const rangeMappings = []; + do { + const semi = reader.indexOf(";"); + const indices = []; + let index = 0; + while (reader.pos < semi) { + index += decodeInteger(reader); + indices.push(index); + } + rangeMappings.push(indices); + reader.pos = semi + 1; + } while (reader.pos <= length); + return rangeMappings; +} +function encodeRangeMappings(decoded) { + if (decoded.length === 0) return ""; + const writer = new StringWriter(); + for (let i = 0; i < decoded.length; i++) { + const indices = decoded[i]; + if (i > 0) writer.write(semicolon); + let index = 0; + for (let j = 0; j < indices.length; j++) { + const offset = indices[j]; + encodeInteger(writer, offset - index); + index = offset; + } + } + return writer.flush(); +} + +// src/sourcemap-codec.ts +function decode(mappings) { + const { length } = mappings; + const reader = new StringReader(mappings); + const decoded = []; + let genColumn = 0; + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + do { + const semi = reader.indexOf(";"); + const line = []; + let sorted = true; + let lastCol = 0; + genColumn = 0; + while (reader.pos < semi) { + let seg; + genColumn += decodeSign(decodeInteger(reader)); + if (genColumn < lastCol) sorted = false; + lastCol = genColumn; + if (hasMoreVlq(reader, semi)) { + sourcesIndex += decodeSign(decodeInteger(reader)); + sourceLine += decodeSign(decodeInteger(reader)); + sourceColumn += decodeSign(decodeInteger(reader)); + if (hasMoreVlq(reader, semi)) { + namesIndex += decodeSign(decodeInteger(reader)); + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]; + } else { + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn]; + } + } else { + seg = [genColumn]; + } + line.push(seg); + reader.pos++; + } + if (!sorted) sort(line); + decoded.push(line); + reader.pos = semi + 1; + } while (reader.pos <= length); + return decoded; +} +function sort(line) { + line.sort(sortComparator); +} +function sortComparator(a, b) { + return a[0] - b[0]; +} +function encode(decoded) { + const writer = new StringWriter(); + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + if (i > 0) writer.write(semicolon); + if (line.length === 0) continue; + let genColumn = 0; + for (let j = 0; j < line.length; j++) { + const segment = line[j]; + if (j > 0) writer.write(comma); + encodeInteger(writer, encodeSign(segment[0] - genColumn)); + genColumn = segment[0]; + if (segment.length === 1) continue; + encodeInteger(writer, encodeSign(segment[1] - sourcesIndex)); + encodeInteger(writer, encodeSign(segment[2] - sourceLine)); + encodeInteger(writer, encodeSign(segment[3] - sourceColumn)); + sourcesIndex = segment[1]; + sourceLine = segment[2]; + sourceColumn = segment[3]; + if (segment.length === 4) continue; + encodeInteger(writer, encodeSign(segment[4] - namesIndex)); + namesIndex = segment[4]; + } + } + return writer.flush(); +} +export { + decode, + decodeGeneratedRanges, + decodeOriginalScopes, + decodeRangeMappings, + encode, + encodeGeneratedRanges, + encodeOriginalScopes, + encodeRangeMappings +}; +//# sourceMappingURL=sourcemap-codec.mjs.map diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map new file mode 100644 index 0000000..ed642a6 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../src/vlq.ts", "../src/strings.ts", "../src/scopes.ts", "../src/range-mappings.ts", "../src/sourcemap-codec.ts"], + "mappings": ";AAEO,IAAM,QAAQ,IAAI,WAAW,CAAC;AAC9B,IAAM,YAAY,IAAI,WAAW,CAAC;AAEzC,IAAM,QAAQ;AACd,IAAM,YAAY,IAAI,WAAW,EAAE;AACnC,IAAM,YAAY,IAAI,WAAW,GAAG;AAEpC,SAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACrC,QAAM,IAAI,MAAM,WAAW,CAAC;AAC5B,YAAU,CAAC,IAAI;AACf,YAAU,CAAC,IAAI;AACjB;AAEO,SAAS,cAAc,QAA8B;AAC1D,MAAI,QAAQ;AACZ,MAAI,QAAQ;AACZ,MAAI,UAAU;AAEd,KAAG;AACD,UAAM,IAAI,OAAO,KAAK;AACtB,cAAU,UAAU,CAAC;AACrB,cAAU,UAAU,OAAO;AAC3B,aAAS;AAAA,EACX,SAAS,UAAU;AAEnB,SAAO;AACT;AAEO,SAAS,WAAW,KAAqB;AAC9C,SAAO,MAAM,IAAI,cAAc,EAAE,QAAQ,KAAK,QAAQ;AACxD;AAEO,SAAS,cAAc,SAAuB,KAAa;AAChE,KAAG;AACD,QAAI,UAAU,MAAM;AACpB,aAAS;AACT,QAAI,MAAM,EAAG,YAAW;AACxB,YAAQ,MAAM,UAAU,OAAO,CAAC;AAAA,EAClC,SAAS,MAAM;AACjB;AAEO,SAAS,WAAW,KAAqB;AAC9C,SAAO,MAAM,IAAK,CAAC,OAAO,IAAK,IAAI,OAAO;AAC5C;AAEO,SAAS,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AU,KAAK,CAAC;AACtB,UAAI,IAAI,EAAG,QAAO,MAAM,KAAK;AAE7B,oBAAc,QAAQ,WAAW,QAAQ,CAAC,IAAI,SAAS,CAAC;AACxD,kBAAY,QAAQ,CAAC;AAErB,UAAI,QAAQ,WAAW,EAAG;AAC1B,oBAAc,QAAQ,WAAW,QAAQ,CAAC,IAAI,YAAY,CAAC;AAC3D,oBAAc,QAAQ,WAAW,QAAQ,CAAC,IAAI,UAAU,CAAC;AACzD,oBAAc,QAAQ,WAAW,QAAQ,CAAC,IAAI,YAAY,CAAC;AAC3D,qBAAe,QAAQ,CAAC;AACxB,mBAAa,QAAQ,CAAC;AACtB,qBAAe,QAAQ,CAAC;AAExB,UAAI,QAAQ,WAAW,EAAG;AAC1B,oBAAc,QAAQ,WAAW,QAAQ,CAAC,IAAI,UAAU,CAAC;AACzD,mBAAa,QAAQ,CAAC;AAAA,IACxB;AAAA,EACF;AAEA,SAAO,OAAO,MAAM;AACtB;", + "names": [] +} diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js new file mode 100644 index 0000000..a4f5e30 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js @@ -0,0 +1,508 @@ +(function (global, factory) { + if (typeof exports === 'object' && typeof module !== 'undefined') { + factory(module); + module.exports = def(module); + } else if (typeof define === 'function' && define.amd) { + define(['module'], function(mod) { + factory.apply(this, arguments); + mod.exports = def(mod); + }); + } else { + const mod = { exports: {} }; + factory(mod); + global = typeof globalThis !== 'undefined' ? globalThis : global || self; + global.sourcemapCodec = def(mod); + } + function def(m) { return 'default' in m.exports ? m.exports.default : m.exports; } +})(this, (function (module) { +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/sourcemap-codec.ts +var sourcemap_codec_exports = {}; +__export(sourcemap_codec_exports, { + decode: () => decode, + decodeGeneratedRanges: () => decodeGeneratedRanges, + decodeOriginalScopes: () => decodeOriginalScopes, + decodeRangeMappings: () => decodeRangeMappings, + encode: () => encode, + encodeGeneratedRanges: () => encodeGeneratedRanges, + encodeOriginalScopes: () => encodeOriginalScopes, + encodeRangeMappings: () => encodeRangeMappings +}); +module.exports = __toCommonJS(sourcemap_codec_exports); + +// src/vlq.ts +var comma = ",".charCodeAt(0); +var semicolon = ";".charCodeAt(0); +var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; +var intToChar = new Uint8Array(64); +var charToInt = new Uint8Array(128); +for (let i = 0; i < chars.length; i++) { + const c = chars.charCodeAt(i); + intToChar[i] = c; + charToInt[c] = i; +} +function decodeInteger(reader) { + let value = 0; + let shift = 0; + let integer = 0; + do { + const c = reader.next(); + integer = charToInt[c]; + value |= (integer & 31) << shift; + shift += 5; + } while (integer & 32); + return value; +} +function decodeSign(num) { + return num & 1 ? -2147483648 | -(num >>> 1) : num >>> 1; +} +function encodeInteger(builder, num) { + do { + let clamped = num & 31; + num >>>= 5; + if (num > 0) clamped |= 32; + builder.write(intToChar[clamped]); + } while (num > 0); +} +function encodeSign(num) { + return num < 0 ? -num << 1 | 1 : num << 1; +} +function hasMoreVlq(reader, max) { + if (reader.pos >= max) return false; + return reader.peek() !== comma; +} + +// src/strings.ts +var bufLength = 1024 * 16; +var td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? { + decode(buf) { + const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); + return out.toString(); + } +} : { + decode(buf) { + let out = ""; + for (let i = 0; i < buf.length; i++) { + out += String.fromCharCode(buf[i]); + } + return out; + } +}; +var StringWriter = class { + constructor() { + this.pos = 0; + this.out = ""; + this.buffer = new Uint8Array(bufLength); + } + write(v) { + const { buffer } = this; + buffer[this.pos++] = v; + if (this.pos === bufLength) { + this.out += td.decode(buffer); + this.pos = 0; + } + } + flush() { + const { buffer, out, pos } = this; + return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out; + } +}; +var StringReader = class { + constructor(buffer) { + this.pos = 0; + this.buffer = buffer; + } + next() { + return this.buffer.charCodeAt(this.pos++); + } + peek() { + return this.buffer.charCodeAt(this.pos); + } + indexOf(char) { + const { buffer, pos } = this; + const idx = buffer.indexOf(char, pos); + return idx === -1 ? buffer.length : idx; + } +}; + +// src/scopes.ts +var EMPTY = []; +function decodeOriginalScopes(input) { + const { length } = input; + const reader = new StringReader(input); + const scopes = []; + const stack = []; + let line = 0; + for (; reader.pos < length; reader.pos++) { + line += decodeSign(decodeInteger(reader)); + const column = decodeSign(decodeInteger(reader)); + if (!hasMoreVlq(reader, length)) { + const last = stack.pop(); + last[2] = line; + last[3] = column; + continue; + } + const kind = decodeSign(decodeInteger(reader)); + const fields = decodeSign(decodeInteger(reader)); + const hasName = fields & 1; + const scope = hasName ? [line, column, 0, 0, kind, decodeSign(decodeInteger(reader))] : [line, column, 0, 0, kind]; + let vars = EMPTY; + if (hasMoreVlq(reader, length)) { + vars = []; + do { + const varsIndex = decodeSign(decodeInteger(reader)); + vars.push(varsIndex); + } while (hasMoreVlq(reader, length)); + } + scope.vars = vars; + scopes.push(scope); + stack.push(scope); + } + return scopes; +} +function encodeOriginalScopes(scopes) { + const writer = new StringWriter(); + for (let i = 0; i < scopes.length; ) { + i = _encodeOriginalScopes(scopes, i, writer, [0]); + } + return writer.flush(); +} +function _encodeOriginalScopes(scopes, index, writer, state) { + const scope = scopes[index]; + const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope; + if (index > 0) writer.write(comma); + encodeInteger(writer, encodeSign(startLine - state[0])); + state[0] = startLine; + encodeInteger(writer, encodeSign(startColumn)); + encodeInteger(writer, encodeSign(kind)); + const fields = scope.length === 6 ? 1 : 0; + encodeInteger(writer, encodeSign(fields)); + if (scope.length === 6) encodeInteger(writer, encodeSign(scope[5])); + for (const v of vars) { + encodeInteger(writer, encodeSign(v)); + } + for (index++; index < scopes.length; ) { + const next = scopes[index]; + const { 0: l, 1: c } = next; + if (l > endLine || l === endLine && c >= endColumn) { + break; + } + index = _encodeOriginalScopes(scopes, index, writer, state); + } + writer.write(comma); + encodeInteger(writer, encodeSign(endLine - state[0])); + state[0] = endLine; + encodeInteger(writer, encodeSign(endColumn)); + return index; +} +function decodeGeneratedRanges(input) { + const { length } = input; + const reader = new StringReader(input); + const ranges = []; + const stack = []; + let genLine = 0; + let definitionSourcesIndex = 0; + let definitionScopeIndex = 0; + let callsiteSourcesIndex = 0; + let callsiteLine = 0; + let callsiteColumn = 0; + let bindingLine = 0; + let bindingColumn = 0; + do { + const semi = reader.indexOf(";"); + let genColumn = 0; + for (; reader.pos < semi; reader.pos++) { + genColumn += decodeSign(decodeInteger(reader)); + if (!hasMoreVlq(reader, semi)) { + const last = stack.pop(); + last[2] = genLine; + last[3] = genColumn; + continue; + } + const fields = decodeSign(decodeInteger(reader)); + const hasDefinition = fields & 1; + const hasCallsite = fields & 2; + const hasScope = fields & 4; + let callsite = null; + let bindings = EMPTY; + let range; + if (hasDefinition) { + const defSourcesIndex = definitionSourcesIndex + decodeSign(decodeInteger(reader)); + definitionScopeIndex = decodeSign(decodeInteger(reader)) + (definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0); + definitionSourcesIndex = defSourcesIndex; + range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex]; + } else { + range = [genLine, genColumn, 0, 0]; + } + range.isScope = !!hasScope; + if (hasCallsite) { + const prevCsi = callsiteSourcesIndex; + const prevLine = callsiteLine; + callsiteSourcesIndex += decodeSign(decodeInteger(reader)); + const sameSource = prevCsi === callsiteSourcesIndex; + callsiteLine = (sameSource ? callsiteLine : 0) + decodeSign(decodeInteger(reader)); + callsiteColumn = (sameSource && prevLine === callsiteLine ? callsiteColumn : 0) + decodeSign(decodeInteger(reader)); + callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn]; + } + range.callsite = callsite; + if (hasMoreVlq(reader, semi)) { + bindings = []; + do { + bindingLine = genLine; + bindingColumn = genColumn; + const expressionsCount = decodeSign(decodeInteger(reader)); + let expressionRanges; + if (expressionsCount < -1) { + expressionRanges = [[decodeSign(decodeInteger(reader))]]; + for (let i = -1; i > expressionsCount; i--) { + const prevBl = bindingLine; + bindingLine += decodeSign(decodeInteger(reader)); + bindingColumn = (bindingLine === prevBl ? bindingColumn : 0) + decodeSign(decodeInteger(reader)); + const expression = decodeSign(decodeInteger(reader)); + expressionRanges.push([expression, bindingLine, bindingColumn]); + } + } else { + expressionRanges = [[expressionsCount]]; + } + bindings.push(expressionRanges); + } while (hasMoreVlq(reader, semi)); + } + range.bindings = bindings; + ranges.push(range); + stack.push(range); + } + genLine++; + reader.pos = semi + 1; + } while (reader.pos < length); + return ranges; +} +function encodeGeneratedRanges(ranges) { + if (ranges.length === 0) return ""; + const writer = new StringWriter(); + for (let i = 0; i < ranges.length; ) { + i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]); + } + return writer.flush(); +} +function _encodeGeneratedRanges(ranges, index, writer, state) { + const range = ranges[index]; + const { + 0: startLine, + 1: startColumn, + 2: endLine, + 3: endColumn, + isScope, + callsite, + bindings + } = range; + if (state[0] < startLine) { + catchupLine(writer, state[0], startLine); + state[0] = startLine; + state[1] = 0; + } else if (index > 0) { + writer.write(comma); + } + encodeInteger(writer, encodeSign(range[1] - state[1])); + state[1] = range[1]; + const fields = (range.length === 6 ? 1 : 0) | (callsite ? 2 : 0) | (isScope ? 4 : 0); + encodeInteger(writer, encodeSign(fields)); + if (range.length === 6) { + const { 4: sourcesIndex, 5: scopesIndex } = range; + if (sourcesIndex !== state[2]) { + state[3] = 0; + } + encodeInteger(writer, encodeSign(sourcesIndex - state[2])); + state[2] = sourcesIndex; + encodeInteger(writer, encodeSign(scopesIndex - state[3])); + state[3] = scopesIndex; + } + if (callsite) { + const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite; + if (sourcesIndex !== state[4]) { + state[5] = 0; + state[6] = 0; + } else if (callLine !== state[5]) { + state[6] = 0; + } + encodeInteger(writer, encodeSign(sourcesIndex - state[4])); + state[4] = sourcesIndex; + encodeInteger(writer, encodeSign(callLine - state[5])); + state[5] = callLine; + encodeInteger(writer, encodeSign(callColumn - state[6])); + state[6] = callColumn; + } + if (bindings) { + for (const binding of bindings) { + if (binding.length > 1) encodeInteger(writer, encodeSign(-binding.length)); + const expression = binding[0][0]; + encodeInteger(writer, encodeSign(expression)); + let bindingStartLine = startLine; + let bindingStartColumn = startColumn; + for (let i = 1; i < binding.length; i++) { + const expRange = binding[i]; + encodeInteger(writer, encodeSign(expRange[1] - bindingStartLine)); + bindingStartLine = expRange[1]; + encodeInteger(writer, encodeSign(expRange[2] - bindingStartColumn)); + bindingStartColumn = expRange[2]; + encodeInteger(writer, encodeSign(expRange[0])); + } + } + } + for (index++; index < ranges.length; ) { + const next = ranges[index]; + const { 0: l, 1: c } = next; + if (l > endLine || l === endLine && c >= endColumn) { + break; + } + index = _encodeGeneratedRanges(ranges, index, writer, state); + } + if (state[0] < endLine) { + catchupLine(writer, state[0], endLine); + state[0] = endLine; + state[1] = 0; + } else { + writer.write(comma); + } + encodeInteger(writer, encodeSign(endColumn - state[1])); + state[1] = endColumn; + return index; +} +function catchupLine(writer, lastLine, line) { + do { + writer.write(semicolon); + } while (++lastLine < line); +} + +// src/range-mappings.ts +function decodeRangeMappings(input) { + const { length } = input; + const reader = new StringReader(input); + const rangeMappings = []; + do { + const semi = reader.indexOf(";"); + const indices = []; + let index = 0; + while (reader.pos < semi) { + index += decodeInteger(reader); + indices.push(index); + } + rangeMappings.push(indices); + reader.pos = semi + 1; + } while (reader.pos <= length); + return rangeMappings; +} +function encodeRangeMappings(decoded) { + if (decoded.length === 0) return ""; + const writer = new StringWriter(); + for (let i = 0; i < decoded.length; i++) { + const indices = decoded[i]; + if (i > 0) writer.write(semicolon); + let index = 0; + for (let j = 0; j < indices.length; j++) { + const offset = indices[j]; + encodeInteger(writer, offset - index); + index = offset; + } + } + return writer.flush(); +} + +// src/sourcemap-codec.ts +function decode(mappings) { + const { length } = mappings; + const reader = new StringReader(mappings); + const decoded = []; + let genColumn = 0; + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + do { + const semi = reader.indexOf(";"); + const line = []; + let sorted = true; + let lastCol = 0; + genColumn = 0; + while (reader.pos < semi) { + let seg; + genColumn += decodeSign(decodeInteger(reader)); + if (genColumn < lastCol) sorted = false; + lastCol = genColumn; + if (hasMoreVlq(reader, semi)) { + sourcesIndex += decodeSign(decodeInteger(reader)); + sourceLine += decodeSign(decodeInteger(reader)); + sourceColumn += decodeSign(decodeInteger(reader)); + if (hasMoreVlq(reader, semi)) { + namesIndex += decodeSign(decodeInteger(reader)); + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]; + } else { + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn]; + } + } else { + seg = [genColumn]; + } + line.push(seg); + reader.pos++; + } + if (!sorted) sort(line); + decoded.push(line); + reader.pos = semi + 1; + } while (reader.pos <= length); + return decoded; +} +function sort(line) { + line.sort(sortComparator); +} +function sortComparator(a, b) { + return a[0] - b[0]; +} +function encode(decoded) { + const writer = new StringWriter(); + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + if (i > 0) writer.write(semicolon); + if (line.length === 0) continue; + let genColumn = 0; + for (let j = 0; j < line.length; j++) { + const segment = line[j]; + if (j > 0) writer.write(comma); + encodeInteger(writer, encodeSign(segment[0] - genColumn)); + genColumn = segment[0]; + if (segment.length === 1) continue; + encodeInteger(writer, encodeSign(segment[1] - sourcesIndex)); + encodeInteger(writer, encodeSign(segment[2] - sourceLine)); + encodeInteger(writer, encodeSign(segment[3] - sourceColumn)); + sourcesIndex = segment[1]; + sourceLine = segment[2]; + sourceColumn = segment[3]; + if (segment.length === 4) continue; + encodeInteger(writer, encodeSign(segment[4] - namesIndex)); + namesIndex = segment[4]; + } + } + return writer.flush(); +} +})); +//# sourceMappingURL=sourcemap-codec.umd.js.map diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map new file mode 100644 index 0000000..c65e6f0 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../src/sourcemap-codec.ts", "../src/vlq.ts", "../src/strings.ts", "../src/scopes.ts", "../src/range-mappings.ts"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEO,IAAM,QAAQ,IAAI,WAAW,CAAC;AAC9B,IAAM,YAAY,IAAI,WAAW,CAAC;AAEzC,IAAM,QAAQ;AACd,IAAM,YAAY,IAAI,WAAW,EAAE;AACnC,IAAM,YAAY,IAAI,WAAW,GAAG;AAEpC,SAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACrC,QAAM,IAAI,MAAM,WAAW,CAAC;AAC5B,YAAU,CAAC,IAAI;AACf,YAAU,CAAC,IAAI;AACjB;AAEO,SAAS,c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@jridgewell/sourcemap-codec/package.json new file mode 100644 index 0000000..a84412b --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/package.json @@ -0,0 +1,64 @@ +{ + "name": "@jridgewell/sourcemap-codec", + "version": "1.6.0", + "description": "Encode/decode sourcemap mappings", + "keywords": [ + "sourcemap", + "vlq" + ], + "main": "dist/sourcemap-codec.umd.js", + "module": "dist/sourcemap-codec.mjs", + "types": "types/sourcemap-codec.d.cts", + "files": [ + "dist", + "src", + "types" + ], + "exports": { + ".": [ + { + "import": { + "types": "./types/sourcemap-codec.d.mts", + "default": "./dist/sourcemap-codec.mjs" + }, + "default": { + "types": "./types/sourcemap-codec.d.cts", + "default": "./dist/sourcemap-codec.umd.js" + } + }, + "./dist/sourcemap-codec.umd.js" + ], + "./package.json": "./package.json" + }, + "scripts": { + "benchmark": "run-s build:code benchmark:*", + "benchmark:install": "cd benchmark && npm install", + "benchmark:only": "node --expose-gc benchmark/index.js", + "build": "run-s -n build:code build:types", + "build:code": "node ../../esbuild.mjs sourcemap-codec.ts", + "build:types": "run-s build:types:force build:types:emit build:types:mts", + "build:types:force": "rimraf tsconfig.build.tsbuildinfo", + "build:types:emit": "tsc --project tsconfig.build.json", + "build:types:mts": "node ../../mts-types.mjs", + "clean": "run-s -n clean:code clean:types", + "clean:code": "tsc --build --clean tsconfig.build.json", + "clean:types": "rimraf dist types", + "test": "run-s -n test:types test:only test:format", + "test:format": "prettier --check '{src,test}/**/*.ts'", + "test:only": "mocha", + "test:types": "eslint '{src,test}/**/*.ts'", + "test:watch": "mocha --watch", + "lint": "run-s -n lint:types lint:format", + "lint:format": "npm run test:format -- --write", + "lint:types": "npm run test:types -- --fix", + "prepublishOnly": "npm run-s -n build test" + }, + "homepage": "https://github.com/jridgewell/sourcemaps/tree/main/packages/sourcemap-codec", + "repository": { + "type": "git", + "url": "git+https://github.com/jridgewell/sourcemaps.git", + "directory": "packages/sourcemap-codec" + }, + "author": "Justin Ridgewell ", + "license": "MIT" +} diff --git a/node_modules/@jridgewell/sourcemap-codec/src/range-mappings.ts b/node_modules/@jridgewell/sourcemap-codec/src/range-mappings.ts new file mode 100644 index 0000000..710d124 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/src/range-mappings.ts @@ -0,0 +1,47 @@ +import { StringReader, StringWriter } from './strings'; +import { decodeInteger, encodeInteger, semicolon } from './vlq'; + +export type MappingIndex = number; +export type RangeMappings = MappingIndex[][]; + +export function decodeRangeMappings(input: string): RangeMappings { + const { length } = input; + const reader = new StringReader(input); + const rangeMappings: RangeMappings = []; + + do { + const semi = reader.indexOf(';'); + const indices: MappingIndex[] = []; + let index = 0; + + while (reader.pos < semi) { + index += decodeInteger(reader); + indices.push(index); + } + + rangeMappings.push(indices); + reader.pos = semi + 1; + } while (reader.pos <= length); + + return rangeMappings; +} + +export function encodeRangeMappings(decoded: RangeMappings): string { + if (decoded.length === 0) return ''; + + const writer = new StringWriter(); + + for (let i = 0; i < decoded.length; i++) { + const indices = decoded[i]; + if (i > 0) writer.write(semicolon); + + let index = 0; + for (let j = 0; j < indices.length; j++) { + const offset = indices[j]; + encodeInteger(writer, offset - index); + index = offset; + } + } + + return writer.flush(); +} diff --git a/node_modules/@jridgewell/sourcemap-codec/src/scopes.ts b/node_modules/@jridgewell/sourcemap-codec/src/scopes.ts new file mode 100644 index 0000000..9e8d4d5 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/src/scopes.ts @@ -0,0 +1,365 @@ +import { StringReader, StringWriter } from './strings'; +import { + comma, + decodeInteger, + decodeSign, + encodeInteger, + encodeSign, + hasMoreVlq, + semicolon, +} from './vlq'; + +const EMPTY: any[] = []; + +type Line = number; +type Column = number; +type Kind = number; +type Name = number; +type Var = number; +type SourcesIndex = number; +type ScopesIndex = number; + +type Mix = (A & O) | (B & O); + +export type OriginalScope = Mix< + [Line, Column, Line, Column, Kind], + [Line, Column, Line, Column, Kind, Name], + { vars: Var[] } +>; + +export type GeneratedRange = Mix< + [Line, Column, Line, Column], + [Line, Column, Line, Column, SourcesIndex, ScopesIndex], + { + callsite: CallSite | null; + bindings: Binding[]; + isScope: boolean; + } +>; +export type CallSite = [SourcesIndex, Line, Column]; +type Binding = BindingExpressionRange[]; +export type BindingExpressionRange = [Name] | [Name, Line, Column]; + +export function decodeOriginalScopes(input: string): OriginalScope[] { + const { length } = input; + const reader = new StringReader(input); + const scopes: OriginalScope[] = []; + const stack: OriginalScope[] = []; + let line = 0; + + for (; reader.pos < length; reader.pos++) { + line += decodeSign(decodeInteger(reader)); + const column = decodeSign(decodeInteger(reader)); + + if (!hasMoreVlq(reader, length)) { + const last = stack.pop()!; + last[2] = line; + last[3] = column; + continue; + } + + const kind = decodeSign(decodeInteger(reader)); + const fields = decodeSign(decodeInteger(reader)); + const hasName = fields & 0b0001; + + const scope: OriginalScope = ( + hasName + ? [line, column, 0, 0, kind, decodeSign(decodeInteger(reader))] + : [line, column, 0, 0, kind] + ) as OriginalScope; + + let vars: Var[] = EMPTY; + if (hasMoreVlq(reader, length)) { + vars = []; + do { + const varsIndex = decodeSign(decodeInteger(reader)); + vars.push(varsIndex); + } while (hasMoreVlq(reader, length)); + } + scope.vars = vars; + + scopes.push(scope); + stack.push(scope); + } + + return scopes; +} + +export function encodeOriginalScopes(scopes: OriginalScope[]): string { + const writer = new StringWriter(); + + for (let i = 0; i < scopes.length; ) { + i = _encodeOriginalScopes(scopes, i, writer, [0]); + } + + return writer.flush(); +} + +function _encodeOriginalScopes( + scopes: OriginalScope[], + index: number, + writer: StringWriter, + state: [ + number, // GenColumn + ], +): number { + const scope = scopes[index]; + const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope; + + if (index > 0) writer.write(comma); + + encodeInteger(writer, encodeSign(startLine - state[0])); + state[0] = startLine; + encodeInteger(writer, encodeSign(startColumn)); + encodeInteger(writer, encodeSign(kind)); + + const fields = scope.length === 6 ? 0b0001 : 0; + encodeInteger(writer, encodeSign(fields)); + if (scope.length === 6) encodeInteger(writer, encodeSign(scope[5])); + + for (const v of vars) { + encodeInteger(writer, encodeSign(v)); + } + + for (index++; index < scopes.length; ) { + const next = scopes[index]; + const { 0: l, 1: c } = next; + if (l > endLine || (l === endLine && c >= endColumn)) { + break; + } + index = _encodeOriginalScopes(scopes, index, writer, state); + } + + writer.write(comma); + encodeInteger(writer, encodeSign(endLine - state[0])); + state[0] = endLine; + encodeInteger(writer, encodeSign(endColumn)); + + return index; +} + +export function decodeGeneratedRanges(input: string): GeneratedRange[] { + const { length } = input; + const reader = new StringReader(input); + const ranges: GeneratedRange[] = []; + const stack: GeneratedRange[] = []; + + let genLine = 0; + let definitionSourcesIndex = 0; + let definitionScopeIndex = 0; + let callsiteSourcesIndex = 0; + let callsiteLine = 0; + let callsiteColumn = 0; + let bindingLine = 0; + let bindingColumn = 0; + + do { + const semi = reader.indexOf(';'); + let genColumn = 0; + + for (; reader.pos < semi; reader.pos++) { + genColumn += decodeSign(decodeInteger(reader)); + + if (!hasMoreVlq(reader, semi)) { + const last = stack.pop()!; + last[2] = genLine; + last[3] = genColumn; + continue; + } + + const fields = decodeSign(decodeInteger(reader)); + const hasDefinition = fields & 0b0001; + const hasCallsite = fields & 0b0010; + const hasScope = fields & 0b0100; + + let callsite: CallSite | null = null; + let bindings: Binding[] = EMPTY; + let range: GeneratedRange; + if (hasDefinition) { + const defSourcesIndex = definitionSourcesIndex + decodeSign(decodeInteger(reader)); + definitionScopeIndex = + decodeSign(decodeInteger(reader)) + + (definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0); + + definitionSourcesIndex = defSourcesIndex; + range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex] as GeneratedRange; + } else { + range = [genLine, genColumn, 0, 0] as GeneratedRange; + } + + range.isScope = !!hasScope; + + if (hasCallsite) { + const prevCsi = callsiteSourcesIndex; + const prevLine = callsiteLine; + callsiteSourcesIndex += decodeSign(decodeInteger(reader)); + const sameSource = prevCsi === callsiteSourcesIndex; + callsiteLine = (sameSource ? callsiteLine : 0) + decodeSign(decodeInteger(reader)); + callsiteColumn = + (sameSource && prevLine === callsiteLine ? callsiteColumn : 0) + + decodeSign(decodeInteger(reader)); + + callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn]; + } + range.callsite = callsite; + + if (hasMoreVlq(reader, semi)) { + bindings = []; + do { + bindingLine = genLine; + bindingColumn = genColumn; + const expressionsCount = decodeSign(decodeInteger(reader)); + let expressionRanges: BindingExpressionRange[]; + if (expressionsCount < -1) { + expressionRanges = [[decodeSign(decodeInteger(reader))]]; + for (let i = -1; i > expressionsCount; i--) { + const prevBl = bindingLine; + bindingLine += decodeSign(decodeInteger(reader)); + bindingColumn = + (bindingLine === prevBl ? bindingColumn : 0) + decodeSign(decodeInteger(reader)); + const expression = decodeSign(decodeInteger(reader)); + expressionRanges.push([expression, bindingLine, bindingColumn]); + } + } else { + expressionRanges = [[expressionsCount]]; + } + bindings.push(expressionRanges); + } while (hasMoreVlq(reader, semi)); + } + range.bindings = bindings; + + ranges.push(range); + stack.push(range); + } + + genLine++; + reader.pos = semi + 1; + } while (reader.pos < length); + + return ranges; +} + +export function encodeGeneratedRanges(ranges: GeneratedRange[]): string { + if (ranges.length === 0) return ''; + + const writer = new StringWriter(); + + for (let i = 0; i < ranges.length; ) { + i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]); + } + + return writer.flush(); +} + +function _encodeGeneratedRanges( + ranges: GeneratedRange[], + index: number, + writer: StringWriter, + state: [ + number, // GenLine + number, // GenColumn + number, // DefSourcesIndex + number, // DefScopesIndex + number, // CallSourcesIndex + number, // CallLine + number, // CallColumn + ], +): number { + const range = ranges[index]; + const { + 0: startLine, + 1: startColumn, + 2: endLine, + 3: endColumn, + isScope, + callsite, + bindings, + } = range; + + if (state[0] < startLine) { + catchupLine(writer, state[0], startLine); + state[0] = startLine; + state[1] = 0; + } else if (index > 0) { + writer.write(comma); + } + + encodeInteger(writer, encodeSign(range[1] - state[1])); + state[1] = range[1]; + + const fields = + (range.length === 6 ? 0b0001 : 0) | (callsite ? 0b0010 : 0) | (isScope ? 0b0100 : 0); + encodeInteger(writer, encodeSign(fields)); + + if (range.length === 6) { + const { 4: sourcesIndex, 5: scopesIndex } = range; + if (sourcesIndex !== state[2]) { + state[3] = 0; + } + encodeInteger(writer, encodeSign(sourcesIndex - state[2])); + state[2] = sourcesIndex; + encodeInteger(writer, encodeSign(scopesIndex - state[3])); + state[3] = scopesIndex; + } + + if (callsite) { + const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite!; + if (sourcesIndex !== state[4]) { + state[5] = 0; + state[6] = 0; + } else if (callLine !== state[5]) { + state[6] = 0; + } + encodeInteger(writer, encodeSign(sourcesIndex - state[4])); + state[4] = sourcesIndex; + encodeInteger(writer, encodeSign(callLine - state[5])); + state[5] = callLine; + encodeInteger(writer, encodeSign(callColumn - state[6])); + state[6] = callColumn; + } + + if (bindings) { + for (const binding of bindings) { + if (binding.length > 1) encodeInteger(writer, encodeSign(-binding.length)); + const expression = binding[0][0]; + encodeInteger(writer, encodeSign(expression)); + let bindingStartLine = startLine; + let bindingStartColumn = startColumn; + for (let i = 1; i < binding.length; i++) { + const expRange = binding[i]; + encodeInteger(writer, encodeSign(expRange[1]! - bindingStartLine)); + bindingStartLine = expRange[1]!; + encodeInteger(writer, encodeSign(expRange[2]! - bindingStartColumn)); + bindingStartColumn = expRange[2]!; + encodeInteger(writer, encodeSign(expRange[0]!)); + } + } + } + + for (index++; index < ranges.length; ) { + const next = ranges[index]; + const { 0: l, 1: c } = next; + if (l > endLine || (l === endLine && c >= endColumn)) { + break; + } + index = _encodeGeneratedRanges(ranges, index, writer, state); + } + + if (state[0] < endLine) { + catchupLine(writer, state[0], endLine); + state[0] = endLine; + state[1] = 0; + } else { + writer.write(comma); + } + encodeInteger(writer, encodeSign(endColumn - state[1])); + state[1] = endColumn; + + return index; +} + +function catchupLine(writer: StringWriter, lastLine: number, line: number) { + do { + writer.write(semicolon); + } while (++lastLine < line); +} diff --git a/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts b/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts new file mode 100644 index 0000000..dd02c6f --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts @@ -0,0 +1,127 @@ +import { + comma, + decodeInteger, + decodeSign, + encodeInteger, + encodeSign, + hasMoreVlq, + semicolon, +} from './vlq'; +import { StringWriter, StringReader } from './strings'; + +export { + decodeOriginalScopes, + encodeOriginalScopes, + decodeGeneratedRanges, + encodeGeneratedRanges, +} from './scopes'; +export type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes'; + +export { decodeRangeMappings, encodeRangeMappings } from './range-mappings'; +export type { MappingIndex, RangeMappings } from './range-mappings'; + +export type SourceMapSegment = + | [number] + | [number, number, number, number] + | [number, number, number, number, number]; +export type SourceMapLine = SourceMapSegment[]; +export type SourceMapMappings = SourceMapLine[]; + +export function decode(mappings: string): SourceMapMappings { + const { length } = mappings; + const reader = new StringReader(mappings); + const decoded: SourceMapMappings = []; + let genColumn = 0; + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + + do { + const semi = reader.indexOf(';'); + const line: SourceMapLine = []; + let sorted = true; + let lastCol = 0; + genColumn = 0; + + while (reader.pos < semi) { + let seg: SourceMapSegment; + + genColumn += decodeSign(decodeInteger(reader)); + if (genColumn < lastCol) sorted = false; + lastCol = genColumn; + + if (hasMoreVlq(reader, semi)) { + sourcesIndex += decodeSign(decodeInteger(reader)); + sourceLine += decodeSign(decodeInteger(reader)); + sourceColumn += decodeSign(decodeInteger(reader)); + + if (hasMoreVlq(reader, semi)) { + namesIndex += decodeSign(decodeInteger(reader)); + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]; + } else { + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn]; + } + } else { + seg = [genColumn]; + } + + line.push(seg); + reader.pos++; + } + + if (!sorted) sort(line); + decoded.push(line); + reader.pos = semi + 1; + } while (reader.pos <= length); + + return decoded; +} + +function sort(line: SourceMapSegment[]) { + line.sort(sortComparator); +} + +function sortComparator(a: SourceMapSegment, b: SourceMapSegment): number { + return a[0] - b[0]; +} + +export function encode(decoded: SourceMapMappings): string; +export function encode(decoded: Readonly): string; +export function encode(decoded: Readonly): string { + const writer = new StringWriter(); + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + if (i > 0) writer.write(semicolon); + if (line.length === 0) continue; + + let genColumn = 0; + + for (let j = 0; j < line.length; j++) { + const segment = line[j]; + if (j > 0) writer.write(comma); + + encodeInteger(writer, encodeSign(segment[0] - genColumn)); + genColumn = segment[0]; + + if (segment.length === 1) continue; + encodeInteger(writer, encodeSign(segment[1] - sourcesIndex)); + encodeInteger(writer, encodeSign(segment[2] - sourceLine)); + encodeInteger(writer, encodeSign(segment[3] - sourceColumn)); + sourcesIndex = segment[1]; + sourceLine = segment[2]; + sourceColumn = segment[3]; + + if (segment.length === 4) continue; + encodeInteger(writer, encodeSign(segment[4] - namesIndex)); + namesIndex = segment[4]; + } + } + + return writer.flush(); +} diff --git a/node_modules/@jridgewell/sourcemap-codec/src/strings.ts b/node_modules/@jridgewell/sourcemap-codec/src/strings.ts new file mode 100644 index 0000000..d161965 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/src/strings.ts @@ -0,0 +1,65 @@ +const bufLength = 1024 * 16; + +// Provide a fallback for older environments. +const td = + typeof TextDecoder !== 'undefined' + ? /* #__PURE__ */ new TextDecoder() + : typeof Buffer !== 'undefined' + ? { + decode(buf: Uint8Array): string { + const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); + return out.toString(); + }, + } + : { + decode(buf: Uint8Array): string { + let out = ''; + for (let i = 0; i < buf.length; i++) { + out += String.fromCharCode(buf[i]); + } + return out; + }, + }; + +export class StringWriter { + pos = 0; + private out = ''; + private buffer = new Uint8Array(bufLength); + + write(v: number): void { + const { buffer } = this; + buffer[this.pos++] = v; + if (this.pos === bufLength) { + this.out += td.decode(buffer); + this.pos = 0; + } + } + + flush(): string { + const { buffer, out, pos } = this; + return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out; + } +} + +export class StringReader { + pos = 0; + declare private buffer: string; + + constructor(buffer: string) { + this.buffer = buffer; + } + + next(): number { + return this.buffer.charCodeAt(this.pos++); + } + + peek(): number { + return this.buffer.charCodeAt(this.pos); + } + + indexOf(char: string): number { + const { buffer, pos } = this; + const idx = buffer.indexOf(char, pos); + return idx === -1 ? buffer.length : idx; + } +} diff --git a/node_modules/@jridgewell/sourcemap-codec/src/vlq.ts b/node_modules/@jridgewell/sourcemap-codec/src/vlq.ts new file mode 100644 index 0000000..e2f047e --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/src/vlq.ts @@ -0,0 +1,51 @@ +import type { StringReader, StringWriter } from './strings'; + +export const comma = ','.charCodeAt(0); +export const semicolon = ';'.charCodeAt(0); + +const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; +const intToChar = new Uint8Array(64); // 64 possible chars. +const charToInt = new Uint8Array(128); // z is 122 in ASCII + +for (let i = 0; i < chars.length; i++) { + const c = chars.charCodeAt(i); + intToChar[i] = c; + charToInt[c] = i; +} + +export function decodeInteger(reader: StringReader): number { + let value = 0; + let shift = 0; + let integer = 0; + + do { + const c = reader.next(); + integer = charToInt[c]; + value |= (integer & 31) << shift; + shift += 5; + } while (integer & 32); + + return value; +} + +export function decodeSign(num: number): number { + return num & 1 ? -0x80000000 | -(num >>> 1) : num >>> 1; +} + +export function encodeInteger(builder: StringWriter, num: number) { + do { + let clamped = num & 0b011111; + num >>>= 5; + if (num > 0) clamped |= 0b100000; + builder.write(intToChar[clamped]); + } while (num > 0); +} + +export function encodeSign(num: number): number { + return num < 0 ? (-num << 1) | 1 : num << 1; +} + +export function hasMoreVlq(reader: StringReader, max: number) { + if (reader.pos >= max) return false; + return reader.peek() !== comma; +} diff --git a/node_modules/@jridgewell/sourcemap-codec/types/range-mappings.d.cts b/node_modules/@jridgewell/sourcemap-codec/types/range-mappings.d.cts new file mode 100644 index 0000000..8826f64 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/range-mappings.d.cts @@ -0,0 +1,5 @@ +export type MappingIndex = number; +export type RangeMappings = MappingIndex[][]; +export declare function decodeRangeMappings(input: string): RangeMappings; +export declare function encodeRangeMappings(decoded: RangeMappings): string; +//# sourceMappingURL=range-mappings.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/range-mappings.d.cts.map b/node_modules/@jridgewell/sourcemap-codec/types/range-mappings.d.cts.map new file mode 100644 index 0000000..1418bb6 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/range-mappings.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"range-mappings.d.ts","sourceRoot":"","sources":["../src/range-mappings.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAClC,MAAM,MAAM,aAAa,GAAG,YAAY,EAAE,EAAE,CAAC;AAE7C,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,CAoBhE;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,CAkBlE"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/range-mappings.d.mts b/node_modules/@jridgewell/sourcemap-codec/types/range-mappings.d.mts new file mode 100644 index 0000000..8826f64 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/range-mappings.d.mts @@ -0,0 +1,5 @@ +export type MappingIndex = number; +export type RangeMappings = MappingIndex[][]; +export declare function decodeRangeMappings(input: string): RangeMappings; +export declare function encodeRangeMappings(decoded: RangeMappings): string; +//# sourceMappingURL=range-mappings.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/range-mappings.d.mts.map b/node_modules/@jridgewell/sourcemap-codec/types/range-mappings.d.mts.map new file mode 100644 index 0000000..1418bb6 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/range-mappings.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"range-mappings.d.ts","sourceRoot":"","sources":["../src/range-mappings.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAClC,MAAM,MAAM,aAAa,GAAG,YAAY,EAAE,EAAE,CAAC;AAE7C,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,CAoBhE;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,CAkBlE"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts new file mode 100644 index 0000000..c583c75 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts @@ -0,0 +1,50 @@ +type Line = number; +type Column = number; +type Kind = number; +type Name = number; +type Var = number; +type SourcesIndex = number; +type ScopesIndex = number; +type Mix = (A & O) | (B & O); +export type OriginalScope = Mix<[ + Line, + Column, + Line, + Column, + Kind +], [ + Line, + Column, + Line, + Column, + Kind, + Name +], { + vars: Var[]; +}>; +export type GeneratedRange = Mix<[ + Line, + Column, + Line, + Column +], [ + Line, + Column, + Line, + Column, + SourcesIndex, + ScopesIndex +], { + callsite: CallSite | null; + bindings: Binding[]; + isScope: boolean; +}>; +export type CallSite = [SourcesIndex, Line, Column]; +type Binding = BindingExpressionRange[]; +export type BindingExpressionRange = [Name] | [Name, Line, Column]; +export declare function decodeOriginalScopes(input: string): OriginalScope[]; +export declare function encodeOriginalScopes(scopes: OriginalScope[]): string; +export declare function decodeGeneratedRanges(input: string): GeneratedRange[]; +export declare function encodeGeneratedRanges(ranges: GeneratedRange[]): string; +export {}; +//# sourceMappingURL=scopes.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts.map b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts.map new file mode 100644 index 0000000..96f3603 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../src/scopes.ts"],"names":[],"mappings":"AAaA,KAAK,IAAI,GAAG,MAAM,CAAC;AACnB,KAAK,MAAM,GAAG,MAAM,CAAC;AACrB,KAAK,IAAI,GAAG,MAAM,CAAC;AACnB,KAAK,IAAI,GAAG,MAAM,CAAC;AACnB,KAAK,GAAG,GAAG,MAAM,CAAC;AAClB,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,WAAW,GAAG,MAAM,CAAC;AAE1B,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAEtC,MAAM,MAAM,aAAa,GAAG,GAAG,CAC7B;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;IAAE,IAAI;CAAC,EAClC;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,IAAI;CAAC,EACxC;IAAE,IAAI,EAAE,GAAG,EAAE,CAAA;CAAE,CAChB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,GAAG,CAC9B;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;CAAC,EAC5B;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;IAAE,YAAY;IAAE,WAAW;CAAC,EACvD;IACE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;CAClB,CACF,CAAC;AACF,MAAM,MAAM,QAAQ,GAAG,CAAC,YAAY,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AACpD,KAAK,OAAO,GAAG,sBAAsB,EAAE,CAAC;AACxC,MAAM,MAAM,sBAAsB,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAEnE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,EAAE,CA2CnE;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,CAQpE;AA6CD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,EAAE,CAmGrE;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,CAUtE"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts new file mode 100644 index 0000000..c583c75 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts @@ -0,0 +1,50 @@ +type Line = number; +type Column = number; +type Kind = number; +type Name = number; +type Var = number; +type SourcesIndex = number; +type ScopesIndex = number; +type Mix = (A & O) | (B & O); +export type OriginalScope = Mix<[ + Line, + Column, + Line, + Column, + Kind +], [ + Line, + Column, + Line, + Column, + Kind, + Name +], { + vars: Var[]; +}>; +export type GeneratedRange = Mix<[ + Line, + Column, + Line, + Column +], [ + Line, + Column, + Line, + Column, + SourcesIndex, + ScopesIndex +], { + callsite: CallSite | null; + bindings: Binding[]; + isScope: boolean; +}>; +export type CallSite = [SourcesIndex, Line, Column]; +type Binding = BindingExpressionRange[]; +export type BindingExpressionRange = [Name] | [Name, Line, Column]; +export declare function decodeOriginalScopes(input: string): OriginalScope[]; +export declare function encodeOriginalScopes(scopes: OriginalScope[]): string; +export declare function decodeGeneratedRanges(input: string): GeneratedRange[]; +export declare function encodeGeneratedRanges(ranges: GeneratedRange[]): string; +export {}; +//# sourceMappingURL=scopes.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts.map b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts.map new file mode 100644 index 0000000..96f3603 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../src/scopes.ts"],"names":[],"mappings":"AAaA,KAAK,IAAI,GAAG,MAAM,CAAC;AACnB,KAAK,MAAM,GAAG,MAAM,CAAC;AACrB,KAAK,IAAI,GAAG,MAAM,CAAC;AACnB,KAAK,IAAI,GAAG,MAAM,CAAC;AACnB,KAAK,GAAG,GAAG,MAAM,CAAC;AAClB,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,WAAW,GAAG,MAAM,CAAC;AAE1B,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAEtC,MAAM,MAAM,aAAa,GAAG,GAAG,CAC7B;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;IAAE,IAAI;CAAC,EAClC;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,IAAI;CAAC,EACxC;IAAE,IAAI,EAAE,GAAG,EAAE,CAAA;CAAE,CAChB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,GAAG,CAC9B;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;CAAC,EAC5B;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;IAAE,YAAY;IAAE,WAAW;CAAC,EACvD;IACE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;CAClB,CACF,CAAC;AACF,MAAM,MAAM,QAAQ,GAAG,CAAC,YAAY,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AACpD,KAAK,OAAO,GAAG,sBAAsB,EAAE,CAAC;AACxC,MAAM,MAAM,sBAAsB,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAEnE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,EAAE,CA2CnE;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,CAQpE;AA6CD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,EAAE,CAmGrE;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,CAUtE"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts new file mode 100644 index 0000000..2fdeab8 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts @@ -0,0 +1,11 @@ +export { decodeOriginalScopes, encodeOriginalScopes, decodeGeneratedRanges, encodeGeneratedRanges, } from './scopes.cts'; +export type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes.cts'; +export { decodeRangeMappings, encodeRangeMappings } from './range-mappings.cts'; +export type { MappingIndex, RangeMappings } from './range-mappings.cts'; +export type SourceMapSegment = [number] | [number, number, number, number] | [number, number, number, number, number]; +export type SourceMapLine = SourceMapSegment[]; +export type SourceMapMappings = SourceMapLine[]; +export declare function decode(mappings: string): SourceMapMappings; +export declare function encode(decoded: SourceMapMappings): string; +export declare function encode(decoded: Readonly): string; +//# sourceMappingURL=sourcemap-codec.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts.map b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts.map new file mode 100644 index 0000000..e0d67e3 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"sourcemap-codec.d.ts","sourceRoot":"","sources":["../src/sourcemap-codec.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEhG,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5E,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEpE,MAAM,MAAM,gBAAgB,GACxB,CAAC,MAAM,CAAC,GACR,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAChC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAC7C,MAAM,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;AAC/C,MAAM,MAAM,iBAAiB,GAAG,aAAa,EAAE,CAAC;AAEhD,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAiD1D;AAUD,wBAAgB,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAAC;AAC3D,wBAAgB,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,iBAAiB,CAAC,GAAG,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts new file mode 100644 index 0000000..2f0e519 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts @@ -0,0 +1,11 @@ +export { decodeOriginalScopes, encodeOriginalScopes, decodeGeneratedRanges, encodeGeneratedRanges, } from './scopes.mts'; +export type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes.mts'; +export { decodeRangeMappings, encodeRangeMappings } from './range-mappings.mts'; +export type { MappingIndex, RangeMappings } from './range-mappings.mts'; +export type SourceMapSegment = [number] | [number, number, number, number] | [number, number, number, number, number]; +export type SourceMapLine = SourceMapSegment[]; +export type SourceMapMappings = SourceMapLine[]; +export declare function decode(mappings: string): SourceMapMappings; +export declare function encode(decoded: SourceMapMappings): string; +export declare function encode(decoded: Readonly): string; +//# sourceMappingURL=sourcemap-codec.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts.map b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts.map new file mode 100644 index 0000000..e0d67e3 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"sourcemap-codec.d.ts","sourceRoot":"","sources":["../src/sourcemap-codec.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEhG,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5E,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEpE,MAAM,MAAM,gBAAgB,GACxB,CAAC,MAAM,CAAC,GACR,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAChC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAC7C,MAAM,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;AAC/C,MAAM,MAAM,iBAAiB,GAAG,aAAa,EAAE,CAAC;AAEhD,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAiD1D;AAUD,wBAAgB,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAAC;AAC3D,wBAAgB,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,iBAAiB,CAAC,GAAG,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts new file mode 100644 index 0000000..62faceb --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts @@ -0,0 +1,16 @@ +export declare class StringWriter { + pos: number; + private out; + private buffer; + write(v: number): void; + flush(): string; +} +export declare class StringReader { + pos: number; + private buffer; + constructor(buffer: string); + next(): number; + peek(): number; + indexOf(char: string): number; +} +//# sourceMappingURL=strings.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts.map b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts.map new file mode 100644 index 0000000..d3602da --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../src/strings.ts"],"names":[],"mappings":"AAuBA,qBAAa,YAAY;IACvB,GAAG,SAAK;IACR,OAAO,CAAC,GAAG,CAAM;IACjB,OAAO,CAAC,MAAM,CAA6B;IAE3C,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAStB,KAAK,IAAI,MAAM;CAIhB;AAED,qBAAa,YAAY;IACvB,GAAG,SAAK;IACR,QAAgB,MAAM,CAAS;gBAEnB,MAAM,EAAE,MAAM;IAI1B,IAAI,IAAI,MAAM;IAId,IAAI,IAAI,MAAM;IAId,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAK9B"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts new file mode 100644 index 0000000..62faceb --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts @@ -0,0 +1,16 @@ +export declare class StringWriter { + pos: number; + private out; + private buffer; + write(v: number): void; + flush(): string; +} +export declare class StringReader { + pos: number; + private buffer; + constructor(buffer: string); + next(): number; + peek(): number; + indexOf(char: string): number; +} +//# sourceMappingURL=strings.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts.map b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts.map new file mode 100644 index 0000000..d3602da --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../src/strings.ts"],"names":[],"mappings":"AAuBA,qBAAa,YAAY;IACvB,GAAG,SAAK;IACR,OAAO,CAAC,GAAG,CAAM;IACjB,OAAO,CAAC,MAAM,CAA6B;IAE3C,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAStB,KAAK,IAAI,MAAM;CAIhB;AAED,qBAAa,YAAY;IACvB,GAAG,SAAK;IACR,QAAgB,MAAM,CAAS;gBAEnB,MAAM,EAAE,MAAM;IAI1B,IAAI,IAAI,MAAM;IAId,IAAI,IAAI,MAAM;IAId,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAK9B"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts new file mode 100644 index 0000000..b2ba433 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts @@ -0,0 +1,9 @@ +import type { StringReader, StringWriter } from './strings.cts'; +export declare const comma: number; +export declare const semicolon: number; +export declare function decodeInteger(reader: StringReader): number; +export declare function decodeSign(num: number): number; +export declare function encodeInteger(builder: StringWriter, num: number): void; +export declare function encodeSign(num: number): number; +export declare function hasMoreVlq(reader: StringReader, max: number): boolean; +//# sourceMappingURL=vlq.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts.map b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts.map new file mode 100644 index 0000000..b9dd843 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"vlq.d.ts","sourceRoot":"","sources":["../src/vlq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE5D,eAAO,MAAM,KAAK,QAAoB,CAAC;AACvC,eAAO,MAAM,SAAS,QAAoB,CAAC;AAY3C,wBAAgB,aAAa,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAa1D;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,QAO/D;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,WAG3D"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts new file mode 100644 index 0000000..30bdc61 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts @@ -0,0 +1,9 @@ +import type { StringReader, StringWriter } from './strings.mts'; +export declare const comma: number; +export declare const semicolon: number; +export declare function decodeInteger(reader: StringReader): number; +export declare function decodeSign(num: number): number; +export declare function encodeInteger(builder: StringWriter, num: number): void; +export declare function encodeSign(num: number): number; +export declare function hasMoreVlq(reader: StringReader, max: number): boolean; +//# sourceMappingURL=vlq.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts.map b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts.map new file mode 100644 index 0000000..b9dd843 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"vlq.d.ts","sourceRoot":"","sources":["../src/vlq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE5D,eAAO,MAAM,KAAK,QAAoB,CAAC;AACvC,eAAO,MAAM,SAAS,QAAoB,CAAC;AAY3C,wBAAgB,aAAa,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAa1D;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,QAO/D;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,WAG3D"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/LICENSE b/node_modules/@jridgewell/trace-mapping/LICENSE new file mode 100644 index 0000000..37bb488 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/LICENSE @@ -0,0 +1,19 @@ +Copyright 2022 Justin Ridgewell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@jridgewell/trace-mapping/README.md b/node_modules/@jridgewell/trace-mapping/README.md new file mode 100644 index 0000000..8286cee --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/README.md @@ -0,0 +1,193 @@ +# @jridgewell/trace-mapping + +> Trace the original position through a source map + +`trace-mapping` allows you to take the line and column of an output file and trace it to the +original location in the source file through a source map. + +You may already be familiar with the [`source-map`][source-map] package's `SourceMapConsumer`. This +provides the same `originalPositionFor` and `generatedPositionFor` API, without requiring WASM. + +## Installation + +```sh +npm install @jridgewell/trace-mapping +``` + +## Usage + +```typescript +import { TraceMap, originalPositionFor, generatedPositionFor } from '@jridgewell/trace-mapping'; + +const tracer = new TraceMap({ + version: 3, + sources: ['input.js'], + names: ['foo'], + mappings: 'KAyCIA', +}); + +// Lines start at line 1, columns at column 0. +const traced = originalPositionFor(tracer, { line: 1, column: 5 }); +assert.deepEqual(traced, { + source: 'input.js', + line: 42, + column: 4, + name: 'foo', +}); + +const generated = generatedPositionFor(tracer, { + source: 'input.js', + line: 42, + column: 4, +}); +assert.deepEqual(generated, { + line: 1, + column: 5, +}); +``` + +We also provide a lower level API to get the actual segment that matches our line and column. Unlike +`originalPositionFor`, `traceSegment` uses a 0-base for `line`: + +```typescript +import { traceSegment } from '@jridgewell/trace-mapping'; + +// line is 0-base. +const traced = traceSegment(tracer, /* line */ 0, /* column */ 5); + +// Segments are [outputColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] +// Again, line is 0-base and so is sourceLine +assert.deepEqual(traced, [5, 0, 41, 4, 0]); +``` + +### SectionedSourceMaps + +The sourcemap spec defines a special `sections` field that's designed to handle concatenation of +output code with associated sourcemaps. This type of sourcemap is rarely used (no major build tool +produces it), but if you are hand coding a concatenation you may need it. We provide an `AnyMap` +helper that can receive either a regular sourcemap or a `SectionedSourceMap` and returns a +`TraceMap` instance: + +```typescript +import { AnyMap } from '@jridgewell/trace-mapping'; +const fooOutput = 'foo'; +const barOutput = 'bar'; +const output = [fooOutput, barOutput].join('\n'); + +const sectioned = new AnyMap({ + version: 3, + sections: [ + { + // 0-base line and column + offset: { line: 0, column: 0 }, + // fooOutput's sourcemap + map: { + version: 3, + sources: ['foo.js'], + names: ['foo'], + mappings: 'AAAAA', + }, + }, + { + // barOutput's sourcemap will not affect the first line, only the second + offset: { line: 1, column: 0 }, + map: { + version: 3, + sources: ['bar.js'], + names: ['bar'], + mappings: 'AAAAA', + }, + }, + ], +}); + +const traced = originalPositionFor(sectioned, { + line: 2, + column: 0, +}); + +assert.deepEqual(traced, { + source: 'bar.js', + line: 1, + column: 0, + name: 'bar', +}); +``` + +## Benchmarks + +``` +node v18.0.0 + +amp.js.map +trace-mapping: decoded JSON input x 183 ops/sec ±0.41% (87 runs sampled) +trace-mapping: encoded JSON input x 384 ops/sec ±0.89% (89 runs sampled) +trace-mapping: decoded Object input x 3,085 ops/sec ±0.24% (100 runs sampled) +trace-mapping: encoded Object input x 452 ops/sec ±0.80% (84 runs sampled) +source-map-js: encoded Object input x 88.82 ops/sec ±0.45% (77 runs sampled) +source-map-0.6.1: encoded Object input x 38.39 ops/sec ±1.88% (52 runs sampled) +Fastest is trace-mapping: decoded Object input + +trace-mapping: decoded originalPositionFor x 4,025,347 ops/sec ±0.15% (97 runs sampled) +trace-mapping: encoded originalPositionFor x 3,333,136 ops/sec ±1.26% (90 runs sampled) +source-map-js: encoded originalPositionFor x 824,978 ops/sec ±1.06% (94 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 741,300 ops/sec ±0.93% (92 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 2,587,603 ops/sec ±0.75% (97 runs sampled) +Fastest is trace-mapping: decoded originalPositionFor + +*** + +babel.min.js.map +trace-mapping: decoded JSON input x 17.43 ops/sec ±8.81% (33 runs sampled) +trace-mapping: encoded JSON input x 34.18 ops/sec ±4.67% (50 runs sampled) +trace-mapping: decoded Object input x 1,010 ops/sec ±0.41% (98 runs sampled) +trace-mapping: encoded Object input x 39.45 ops/sec ±4.01% (52 runs sampled) +source-map-js: encoded Object input x 6.57 ops/sec ±3.04% (21 runs sampled) +source-map-0.6.1: encoded Object input x 4.23 ops/sec ±2.93% (15 runs sampled) +Fastest is trace-mapping: decoded Object input + +trace-mapping: decoded originalPositionFor x 7,576,265 ops/sec ±0.74% (96 runs sampled) +trace-mapping: encoded originalPositionFor x 5,019,743 ops/sec ±0.74% (94 runs sampled) +source-map-js: encoded originalPositionFor x 3,396,137 ops/sec ±42.32% (95 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 3,753,176 ops/sec ±0.72% (95 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 6,423,633 ops/sec ±0.74% (95 runs sampled) +Fastest is trace-mapping: decoded originalPositionFor + +*** + +preact.js.map +trace-mapping: decoded JSON input x 3,499 ops/sec ±0.18% (98 runs sampled) +trace-mapping: encoded JSON input x 6,078 ops/sec ±0.25% (99 runs sampled) +trace-mapping: decoded Object input x 254,788 ops/sec ±0.13% (100 runs sampled) +trace-mapping: encoded Object input x 14,063 ops/sec ±0.27% (94 runs sampled) +source-map-js: encoded Object input x 2,465 ops/sec ±0.25% (98 runs sampled) +source-map-0.6.1: encoded Object input x 1,174 ops/sec ±1.90% (95 runs sampled) +Fastest is trace-mapping: decoded Object input + +trace-mapping: decoded originalPositionFor x 7,720,171 ops/sec ±0.14% (97 runs sampled) +trace-mapping: encoded originalPositionFor x 6,864,485 ops/sec ±0.16% (101 runs sampled) +source-map-js: encoded originalPositionFor x 2,387,219 ops/sec ±0.28% (98 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 1,565,339 ops/sec ±0.32% (101 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 3,819,732 ops/sec ±0.38% (98 runs sampled) +Fastest is trace-mapping: decoded originalPositionFor + +*** + +react.js.map +trace-mapping: decoded JSON input x 1,719 ops/sec ±0.19% (99 runs sampled) +trace-mapping: encoded JSON input x 4,284 ops/sec ±0.51% (99 runs sampled) +trace-mapping: decoded Object input x 94,668 ops/sec ±0.08% (99 runs sampled) +trace-mapping: encoded Object input x 5,287 ops/sec ±0.24% (99 runs sampled) +source-map-js: encoded Object input x 814 ops/sec ±0.20% (98 runs sampled) +source-map-0.6.1: encoded Object input x 429 ops/sec ±0.24% (94 runs sampled) +Fastest is trace-mapping: decoded Object input + +trace-mapping: decoded originalPositionFor x 28,927,989 ops/sec ±0.61% (94 runs sampled) +trace-mapping: encoded originalPositionFor x 27,394,475 ops/sec ±0.55% (97 runs sampled) +source-map-js: encoded originalPositionFor x 16,856,730 ops/sec ±0.45% (96 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 12,258,950 ops/sec ±0.41% (97 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 22,272,990 ops/sec ±0.58% (95 runs sampled) +Fastest is trace-mapping: decoded originalPositionFor +``` + +[source-map]: https://www.npmjs.com/package/source-map diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs new file mode 100644 index 0000000..8fce400 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs @@ -0,0 +1,514 @@ +import { encode, decode } from '@jridgewell/sourcemap-codec'; +import resolveUri from '@jridgewell/resolve-uri'; + +function resolve(input, base) { + // The base is always treated as a directory, if it's not empty. + // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327 + // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401 + if (base && !base.endsWith('/')) + base += '/'; + return resolveUri(input, base); +} + +/** + * Removes everything after the last "/", but leaves the slash. + */ +function stripFilename(path) { + if (!path) + return ''; + const index = path.lastIndexOf('/'); + return path.slice(0, index + 1); +} + +const COLUMN = 0; +const SOURCES_INDEX = 1; +const SOURCE_LINE = 2; +const SOURCE_COLUMN = 3; +const NAMES_INDEX = 4; +const REV_GENERATED_LINE = 1; +const REV_GENERATED_COLUMN = 2; + +function maybeSort(mappings, owned) { + const unsortedIndex = nextUnsortedSegmentLine(mappings, 0); + if (unsortedIndex === mappings.length) + return mappings; + // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If + // not, we do not want to modify the consumer's input array. + if (!owned) + mappings = mappings.slice(); + for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) { + mappings[i] = sortSegments(mappings[i], owned); + } + return mappings; +} +function nextUnsortedSegmentLine(mappings, start) { + for (let i = start; i < mappings.length; i++) { + if (!isSorted(mappings[i])) + return i; + } + return mappings.length; +} +function isSorted(line) { + for (let j = 1; j < line.length; j++) { + if (line[j][COLUMN] < line[j - 1][COLUMN]) { + return false; + } + } + return true; +} +function sortSegments(line, owned) { + if (!owned) + line = line.slice(); + return line.sort(sortComparator); +} +function sortComparator(a, b) { + return a[COLUMN] - b[COLUMN]; +} + +let found = false; +/** + * A binary search implementation that returns the index if a match is found. + * If no match is found, then the left-index (the index associated with the item that comes just + * before the desired index) is returned. To maintain proper sort order, a splice would happen at + * the next index: + * + * ```js + * const array = [1, 3]; + * const needle = 2; + * const index = binarySearch(array, needle, (item, needle) => item - needle); + * + * assert.equal(index, 0); + * array.splice(index + 1, 0, needle); + * assert.deepEqual(array, [1, 2, 3]); + * ``` + */ +function binarySearch(haystack, needle, low, high) { + while (low <= high) { + const mid = low + ((high - low) >> 1); + const cmp = haystack[mid][COLUMN] - needle; + if (cmp === 0) { + found = true; + return mid; + } + if (cmp < 0) { + low = mid + 1; + } + else { + high = mid - 1; + } + } + found = false; + return low - 1; +} +function upperBound(haystack, needle, index) { + for (let i = index + 1; i < haystack.length; i++, index++) { + if (haystack[i][COLUMN] !== needle) + break; + } + return index; +} +function lowerBound(haystack, needle, index) { + for (let i = index - 1; i >= 0; i--, index--) { + if (haystack[i][COLUMN] !== needle) + break; + } + return index; +} +function memoizedState() { + return { + lastKey: -1, + lastNeedle: -1, + lastIndex: -1, + }; +} +/** + * This overly complicated beast is just to record the last tested line/column and the resulting + * index, allowing us to skip a few tests if mappings are monotonically increasing. + */ +function memoizedBinarySearch(haystack, needle, state, key) { + const { lastKey, lastNeedle, lastIndex } = state; + let low = 0; + let high = haystack.length - 1; + if (key === lastKey) { + if (needle === lastNeedle) { + found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle; + return lastIndex; + } + if (needle >= lastNeedle) { + // lastIndex may be -1 if the previous needle was not found. + low = lastIndex === -1 ? 0 : lastIndex; + } + else { + high = lastIndex; + } + } + state.lastKey = key; + state.lastNeedle = needle; + return (state.lastIndex = binarySearch(haystack, needle, low, high)); +} + +// Rebuilds the original source files, with mappings that are ordered by source line/column instead +// of generated line/column. +function buildBySources(decoded, memos) { + const sources = memos.map(buildNullArray); + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + if (seg.length === 1) + continue; + const sourceIndex = seg[SOURCES_INDEX]; + const sourceLine = seg[SOURCE_LINE]; + const sourceColumn = seg[SOURCE_COLUMN]; + const originalSource = sources[sourceIndex]; + const originalLine = (originalSource[sourceLine] || (originalSource[sourceLine] = [])); + const memo = memos[sourceIndex]; + // The binary search either found a match, or it found the left-index just before where the + // segment should go. Either way, we want to insert after that. And there may be multiple + // generated segments associated with an original location, so there may need to move several + // indexes before we find where we need to insert. + const index = upperBound(originalLine, sourceColumn, memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine)); + insert(originalLine, (memo.lastIndex = index + 1), [sourceColumn, i, seg[COLUMN]]); + } + } + return sources; +} +function insert(array, index, value) { + for (let i = array.length; i > index; i--) { + array[i] = array[i - 1]; + } + array[index] = value; +} +// Null arrays allow us to use ordered index keys without actually allocating contiguous memory like +// a real array. We use a null-prototype object to avoid prototype pollution and deoptimizations. +// Numeric properties on objects are magically sorted in ascending order by the engine regardless of +// the insertion order. So, by setting any numeric keys, even out of order, we'll get ascending +// order when iterating with for-in. +function buildNullArray() { + return { __proto__: null }; +} + +const AnyMap = function (map, mapUrl) { + const parsed = typeof map === 'string' ? JSON.parse(map) : map; + if (!('sections' in parsed)) + return new TraceMap(parsed, mapUrl); + const mappings = []; + const sources = []; + const sourcesContent = []; + const names = []; + const { sections } = parsed; + let i = 0; + for (; i < sections.length - 1; i++) { + const no = sections[i + 1].offset; + addSection(sections[i], mapUrl, mappings, sources, sourcesContent, names, no.line, no.column); + } + if (sections.length > 0) { + addSection(sections[i], mapUrl, mappings, sources, sourcesContent, names, Infinity, Infinity); + } + const joined = { + version: 3, + file: parsed.file, + names, + sources, + sourcesContent, + mappings, + }; + return presortedDecodedMap(joined); +}; +function addSection(section, mapUrl, mappings, sources, sourcesContent, names, stopLine, stopColumn) { + const map = AnyMap(section.map, mapUrl); + const { line: lineOffset, column: columnOffset } = section.offset; + const sourcesOffset = sources.length; + const namesOffset = names.length; + const decoded = decodedMappings(map); + const { resolvedSources } = map; + append(sources, resolvedSources); + append(sourcesContent, map.sourcesContent || fillSourcesContent(resolvedSources.length)); + append(names, map.names); + // If this section jumps forwards several lines, we need to add lines to the output mappings catch up. + for (let i = mappings.length; i <= lineOffset; i++) + mappings.push([]); + // We can only add so many lines before we step into the range that the next section's map + // controls. When we get to the last line, then we'll start checking the segments to see if + // they've crossed into the column range. + const stopI = stopLine - lineOffset; + const len = Math.min(decoded.length, stopI + 1); + for (let i = 0; i < len; i++) { + const line = decoded[i]; + // On the 0th loop, the line will already exist due to a previous section, or the line catch up + // loop above. + const out = i === 0 ? mappings[lineOffset] : (mappings[lineOffset + i] = []); + // On the 0th loop, the section's column offset shifts us forward. On all other lines (since the + // map can be multiple lines), it doesn't. + const cOffset = i === 0 ? columnOffset : 0; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const column = cOffset + seg[COLUMN]; + // If this segment steps into the column range that the next section's map controls, we need + // to stop early. + if (i === stopI && column >= stopColumn) + break; + if (seg.length === 1) { + out.push([column]); + continue; + } + const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX]; + const sourceLine = seg[SOURCE_LINE]; + const sourceColumn = seg[SOURCE_COLUMN]; + if (seg.length === 4) { + out.push([column, sourcesIndex, sourceLine, sourceColumn]); + continue; + } + out.push([column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]); + } + } +} +function append(arr, other) { + for (let i = 0; i < other.length; i++) + arr.push(other[i]); +} +// Sourcemaps don't need to have sourcesContent, and if they don't, we need to create an array of +// equal length to the sources. This is because the sources and sourcesContent are paired arrays, +// where `sourcesContent[i]` is the content of the `sources[i]` file. If we didn't, then joined +// sourcemap would desynchronize the sources/contents. +function fillSourcesContent(len) { + const sourcesContent = []; + for (let i = 0; i < len; i++) + sourcesContent[i] = null; + return sourcesContent; +} + +const INVALID_ORIGINAL_MAPPING = Object.freeze({ + source: null, + line: null, + column: null, + name: null, +}); +const INVALID_GENERATED_MAPPING = Object.freeze({ + line: null, + column: null, +}); +const LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)'; +const COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)'; +const LEAST_UPPER_BOUND = -1; +const GREATEST_LOWER_BOUND = 1; +/** + * Returns the encoded (VLQ string) form of the SourceMap's mappings field. + */ +let encodedMappings; +/** + * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. + */ +let decodedMappings; +/** + * A low-level API to find the segment associated with a generated line/column (think, from a + * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. + */ +let traceSegment; +/** + * A higher-level API to find the source/line/column associated with a generated line/column + * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in + * `source-map` library. + */ +let originalPositionFor; +/** + * Finds the source/line/column directly after the mapping returned by originalPositionFor, provided + * the found mapping is from the same source and line as the originalPositionFor mapping. + * + * Eg, in the code `let id = 1`, `originalPositionAfter` could find the mapping associated with `1` + * using the same needle that would return `id` when calling `originalPositionFor`. + */ +let generatedPositionFor; +/** + * Iterates each mapping in generated position order. + */ +let eachMapping; +/** + * A helper that skips sorting of the input map's mappings array, which can be expensive for larger + * maps. + */ +let presortedDecodedMap; +/** + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +let decodedMap; +/** + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +let encodedMap; +class TraceMap { + constructor(map, mapUrl) { + this._decodedMemo = memoizedState(); + this._bySources = undefined; + this._bySourceMemos = undefined; + const isString = typeof map === 'string'; + if (!isString && map.constructor === TraceMap) + return map; + const parsed = (isString ? JSON.parse(map) : map); + const { version, file, names, sourceRoot, sources, sourcesContent } = parsed; + this.version = version; + this.file = file; + this.names = names; + this.sourceRoot = sourceRoot; + this.sources = sources; + this.sourcesContent = sourcesContent; + if (sourceRoot || mapUrl) { + const from = resolve(sourceRoot || '', stripFilename(mapUrl)); + this.resolvedSources = sources.map((s) => resolve(s || '', from)); + } + else { + this.resolvedSources = sources.map((s) => s || ''); + } + const { mappings } = parsed; + if (typeof mappings === 'string') { + this._encoded = mappings; + this._decoded = undefined; + } + else { + this._encoded = undefined; + this._decoded = maybeSort(mappings, isString); + } + } +} +(() => { + encodedMappings = (map) => { + var _a; + return ((_a = map._encoded) !== null && _a !== void 0 ? _a : (map._encoded = encode(map._decoded))); + }; + decodedMappings = (map) => { + return (map._decoded || (map._decoded = decode(map._encoded))); + }; + traceSegment = (map, line, column) => { + const decoded = decodedMappings(map); + // It's common for parent source maps to have pointers to lines that have no + // mapping (like a "//# sourceMappingURL=") at the end of the child file. + if (line >= decoded.length) + return null; + return traceSegmentInternal(decoded[line], map._decodedMemo, line, column, GREATEST_LOWER_BOUND); + }; + originalPositionFor = (map, { line, column, bias }) => { + line--; + if (line < 0) + throw new Error(LINE_GTR_ZERO); + if (column < 0) + throw new Error(COL_GTR_EQ_ZERO); + const decoded = decodedMappings(map); + // It's common for parent source maps to have pointers to lines that have no + // mapping (like a "//# sourceMappingURL=") at the end of the child file. + if (line >= decoded.length) + return INVALID_ORIGINAL_MAPPING; + const segment = traceSegmentInternal(decoded[line], map._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND); + if (segment == null) + return INVALID_ORIGINAL_MAPPING; + if (segment.length == 1) + return INVALID_ORIGINAL_MAPPING; + const { names, resolvedSources } = map; + return { + source: resolvedSources[segment[SOURCES_INDEX]], + line: segment[SOURCE_LINE] + 1, + column: segment[SOURCE_COLUMN], + name: segment.length === 5 ? names[segment[NAMES_INDEX]] : null, + }; + }; + generatedPositionFor = (map, { source, line, column, bias }) => { + line--; + if (line < 0) + throw new Error(LINE_GTR_ZERO); + if (column < 0) + throw new Error(COL_GTR_EQ_ZERO); + const { sources, resolvedSources } = map; + let sourceIndex = sources.indexOf(source); + if (sourceIndex === -1) + sourceIndex = resolvedSources.indexOf(source); + if (sourceIndex === -1) + return INVALID_GENERATED_MAPPING; + const generated = (map._bySources || (map._bySources = buildBySources(decodedMappings(map), (map._bySourceMemos = sources.map(memoizedState))))); + const memos = map._bySourceMemos; + const segments = generated[sourceIndex][line]; + if (segments == null) + return INVALID_GENERATED_MAPPING; + const segment = traceSegmentInternal(segments, memos[sourceIndex], line, column, bias || GREATEST_LOWER_BOUND); + if (segment == null) + return INVALID_GENERATED_MAPPING; + return { + line: segment[REV_GENERATED_LINE] + 1, + column: segment[REV_GENERATED_COLUMN], + }; + }; + eachMapping = (map, cb) => { + const decoded = decodedMappings(map); + const { names, resolvedSources } = map; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const generatedLine = i + 1; + const generatedColumn = seg[0]; + let source = null; + let originalLine = null; + let originalColumn = null; + let name = null; + if (seg.length !== 1) { + source = resolvedSources[seg[1]]; + originalLine = seg[2] + 1; + originalColumn = seg[3]; + } + if (seg.length === 5) + name = names[seg[4]]; + cb({ + generatedLine, + generatedColumn, + source, + originalLine, + originalColumn, + name, + }); + } + } + }; + presortedDecodedMap = (map, mapUrl) => { + const clone = Object.assign({}, map); + clone.mappings = []; + const tracer = new TraceMap(clone, mapUrl); + tracer._decoded = map.mappings; + return tracer; + }; + decodedMap = (map) => { + return { + version: 3, + file: map.file, + names: map.names, + sourceRoot: map.sourceRoot, + sources: map.sources, + sourcesContent: map.sourcesContent, + mappings: decodedMappings(map), + }; + }; + encodedMap = (map) => { + return { + version: 3, + file: map.file, + names: map.names, + sourceRoot: map.sourceRoot, + sources: map.sources, + sourcesContent: map.sourcesContent, + mappings: encodedMappings(map), + }; + }; +})(); +function traceSegmentInternal(segments, memo, line, column, bias) { + let index = memoizedBinarySearch(segments, column, memo, line); + if (found) { + index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index); + } + else if (bias === LEAST_UPPER_BOUND) + index++; + if (index === -1 || index === segments.length) + return null; + return segments[index]; +} + +export { AnyMap, GREATEST_LOWER_BOUND, LEAST_UPPER_BOUND, TraceMap, decodedMap, decodedMappings, eachMapping, encodedMap, encodedMappings, generatedPositionFor, originalPositionFor, presortedDecodedMap, traceSegment }; +//# sourceMappingURL=trace-mapping.mjs.map diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map new file mode 100644 index 0000000..fec7769 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"trace-mapping.mjs","sources":["../../src/resolve.ts","../../src/strip-filename.ts","../../src/sourcemap-segment.ts","../../src/sort.ts","../../src/binary-search.ts","../../src/by-source.ts","../../src/any-map.ts","../../src/trace-mapping.ts"],"sourcesContent":[null,null,null,null,null,null,null,null],"names":["bsFound"],"mappings":";;;SAEwB,OAAO,CAAC,KAAa,EAAE,IAAwB;;;;IAIrE,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,IAAI,IAAI,GAAG,CAAC;IAE7C,OAAO,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AACjC;;ACTA;;;SAGwB,aAAa,CAAC,IAA+B;IACnE,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IACrB,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACpC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;AAClC;;ACQO,MAAM,MAAM,GAAG,CAAC,CAAC;AACjB,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB,MAAM,WAAW,GAAG,CAAC,CAAC;AACtB,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB,MAAM,WAAW,GAAG,CAAC,CAAC;AAEtB,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAC7B,MAAM,oBAAoB,GAAG,CAAC;;SClBb,SAAS,CAC/B,QAA8B,EAC9B,KAAc;IAEd,MAAM,aAAa,GAAG,uBAAuB,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;IAC3D,IAAI,aAAa,KAAK,QAAQ,CAAC,MAAM;QAAE,OAAO,QAAQ,CAAC;;;IAIvD,IAAI,CAAC,KAAK;QAAE,QAAQ,GAAG,QAAQ,CAAC,KAAK,EAAE,CAAC;IAExC,KAAK,IAAI,CAAC,GAAG,aAAa,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,E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J,CAAC,GAAA,CAAA;AAiBH,SAAS,oBAAoB,CAC3B,QAA+C,EAC/C,IAAe,EACf,IAAY,EACZ,MAAc,EACd,IAA4D;IAE5D,IAAI,KAAK,GAAG,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC/D,IAAIA,KAAO,EAAE;QACX,KAAK,GAAG,CAAC,IAAI,KAAK,iBAAiB,GAAG,UAAU,GAAG,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;KACzF;SAAM,IAAI,IAAI,KAAK,iBAAiB;QAAE,KAAK,EAAE,CAAC;IAE/C,IAAI,KAAK,KAAK,CAAC,CAAC,IAAI,KAAK,KAAK,QAAQ,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAC3D,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;AACzB;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js new file mode 100644 index 0000000..8b755bd --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js @@ -0,0 +1,528 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@jridgewell/sourcemap-codec'), require('@jridgewell/resolve-uri')) : + typeof define === 'function' && define.amd ? define(['exports', '@jridgewell/sourcemap-codec', '@jridgewell/resolve-uri'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.traceMapping = {}, global.sourcemapCodec, global.resolveURI)); +})(this, (function (exports, sourcemapCodec, resolveUri) { 'use strict'; + + function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + + var resolveUri__default = /*#__PURE__*/_interopDefaultLegacy(resolveUri); + + function resolve(input, base) { + // The base is always treated as a directory, if it's not empty. + // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327 + // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401 + if (base && !base.endsWith('/')) + base += '/'; + return resolveUri__default["default"](input, base); + } + + /** + * Removes everything after the last "/", but leaves the slash. + */ + function stripFilename(path) { + if (!path) + return ''; + const index = path.lastIndexOf('/'); + return path.slice(0, index + 1); + } + + const COLUMN = 0; + const SOURCES_INDEX = 1; + const SOURCE_LINE = 2; + const SOURCE_COLUMN = 3; + const NAMES_INDEX = 4; + const REV_GENERATED_LINE = 1; + const REV_GENERATED_COLUMN = 2; + + function maybeSort(mappings, owned) { + const unsortedIndex = nextUnsortedSegmentLine(mappings, 0); + if (unsortedIndex === mappings.length) + return mappings; + // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If + // not, we do not want to modify the consumer's input array. + if (!owned) + mappings = mappings.slice(); + for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) { + mappings[i] = sortSegments(mappings[i], owned); + } + return mappings; + } + function nextUnsortedSegmentLine(mappings, start) { + for (let i = start; i < mappings.length; i++) { + if (!isSorted(mappings[i])) + return i; + } + return mappings.length; + } + function isSorted(line) { + for (let j = 1; j < line.length; j++) { + if (line[j][COLUMN] < line[j - 1][COLUMN]) { + return false; + } + } + return true; + } + function sortSegments(line, owned) { + if (!owned) + line = line.slice(); + return line.sort(sortComparator); + } + function sortComparator(a, b) { + return a[COLUMN] - b[COLUMN]; + } + + let found = false; + /** + * A binary search implementation that returns the index if a match is found. + * If no match is found, then the left-index (the index associated with the item that comes just + * before the desired index) is returned. To maintain proper sort order, a splice would happen at + * the next index: + * + * ```js + * const array = [1, 3]; + * const needle = 2; + * const index = binarySearch(array, needle, (item, needle) => item - needle); + * + * assert.equal(index, 0); + * array.splice(index + 1, 0, needle); + * assert.deepEqual(array, [1, 2, 3]); + * ``` + */ + function binarySearch(haystack, needle, low, high) { + while (low <= high) { + const mid = low + ((high - low) >> 1); + const cmp = haystack[mid][COLUMN] - needle; + if (cmp === 0) { + found = true; + return mid; + } + if (cmp < 0) { + low = mid + 1; + } + else { + high = mid - 1; + } + } + found = false; + return low - 1; + } + function upperBound(haystack, needle, index) { + for (let i = index + 1; i < haystack.length; i++, index++) { + if (haystack[i][COLUMN] !== needle) + break; + } + return index; + } + function lowerBound(haystack, needle, index) { + for (let i = index - 1; i >= 0; i--, index--) { + if (haystack[i][COLUMN] !== needle) + break; + } + return index; + } + function memoizedState() { + return { + lastKey: -1, + lastNeedle: -1, + lastIndex: -1, + }; + } + /** + * This overly complicated beast is just to record the last tested line/column and the resulting + * index, allowing us to skip a few tests if mappings are monotonically increasing. + */ + function memoizedBinarySearch(haystack, needle, state, key) { + const { lastKey, lastNeedle, lastIndex } = state; + let low = 0; + let high = haystack.length - 1; + if (key === lastKey) { + if (needle === lastNeedle) { + found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle; + return lastIndex; + } + if (needle >= lastNeedle) { + // lastIndex may be -1 if the previous needle was not found. + low = lastIndex === -1 ? 0 : lastIndex; + } + else { + high = lastIndex; + } + } + state.lastKey = key; + state.lastNeedle = needle; + return (state.lastIndex = binarySearch(haystack, needle, low, high)); + } + + // Rebuilds the original source files, with mappings that are ordered by source line/column instead + // of generated line/column. + function buildBySources(decoded, memos) { + const sources = memos.map(buildNullArray); + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + if (seg.length === 1) + continue; + const sourceIndex = seg[SOURCES_INDEX]; + const sourceLine = seg[SOURCE_LINE]; + const sourceColumn = seg[SOURCE_COLUMN]; + const originalSource = sources[sourceIndex]; + const originalLine = (originalSource[sourceLine] || (originalSource[sourceLine] = [])); + const memo = memos[sourceIndex]; + // The binary search either found a match, or it found the left-index just before where the + // segment should go. Either way, we want to insert after that. And there may be multiple + // generated segments associated with an original location, so there may need to move several + // indexes before we find where we need to insert. + const index = upperBound(originalLine, sourceColumn, memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine)); + insert(originalLine, (memo.lastIndex = index + 1), [sourceColumn, i, seg[COLUMN]]); + } + } + return sources; + } + function insert(array, index, value) { + for (let i = array.length; i > index; i--) { + array[i] = array[i - 1]; + } + array[index] = value; + } + // Null arrays allow us to use ordered index keys without actually allocating contiguous memory like + // a real array. We use a null-prototype object to avoid prototype pollution and deoptimizations. + // Numeric properties on objects are magically sorted in ascending order by the engine regardless of + // the insertion order. So, by setting any numeric keys, even out of order, we'll get ascending + // order when iterating with for-in. + function buildNullArray() { + return { __proto__: null }; + } + + const AnyMap = function (map, mapUrl) { + const parsed = typeof map === 'string' ? JSON.parse(map) : map; + if (!('sections' in parsed)) + return new TraceMap(parsed, mapUrl); + const mappings = []; + const sources = []; + const sourcesContent = []; + const names = []; + const { sections } = parsed; + let i = 0; + for (; i < sections.length - 1; i++) { + const no = sections[i + 1].offset; + addSection(sections[i], mapUrl, mappings, sources, sourcesContent, names, no.line, no.column); + } + if (sections.length > 0) { + addSection(sections[i], mapUrl, mappings, sources, sourcesContent, names, Infinity, Infinity); + } + const joined = { + version: 3, + file: parsed.file, + names, + sources, + sourcesContent, + mappings, + }; + return exports.presortedDecodedMap(joined); + }; + function addSection(section, mapUrl, mappings, sources, sourcesContent, names, stopLine, stopColumn) { + const map = AnyMap(section.map, mapUrl); + const { line: lineOffset, column: columnOffset } = section.offset; + const sourcesOffset = sources.length; + const namesOffset = names.length; + const decoded = exports.decodedMappings(map); + const { resolvedSources } = map; + append(sources, resolvedSources); + append(sourcesContent, map.sourcesContent || fillSourcesContent(resolvedSources.length)); + append(names, map.names); + // If this section jumps forwards several lines, we need to add lines to the output mappings catch up. + for (let i = mappings.length; i <= lineOffset; i++) + mappings.push([]); + // We can only add so many lines before we step into the range that the next section's map + // controls. When we get to the last line, then we'll start checking the segments to see if + // they've crossed into the column range. + const stopI = stopLine - lineOffset; + const len = Math.min(decoded.length, stopI + 1); + for (let i = 0; i < len; i++) { + const line = decoded[i]; + // On the 0th loop, the line will already exist due to a previous section, or the line catch up + // loop above. + const out = i === 0 ? mappings[lineOffset] : (mappings[lineOffset + i] = []); + // On the 0th loop, the section's column offset shifts us forward. On all other lines (since the + // map can be multiple lines), it doesn't. + const cOffset = i === 0 ? columnOffset : 0; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const column = cOffset + seg[COLUMN]; + // If this segment steps into the column range that the next section's map controls, we need + // to stop early. + if (i === stopI && column >= stopColumn) + break; + if (seg.length === 1) { + out.push([column]); + continue; + } + const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX]; + const sourceLine = seg[SOURCE_LINE]; + const sourceColumn = seg[SOURCE_COLUMN]; + if (seg.length === 4) { + out.push([column, sourcesIndex, sourceLine, sourceColumn]); + continue; + } + out.push([column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]); + } + } + } + function append(arr, other) { + for (let i = 0; i < other.length; i++) + arr.push(other[i]); + } + // Sourcemaps don't need to have sourcesContent, and if they don't, we need to create an array of + // equal length to the sources. This is because the sources and sourcesContent are paired arrays, + // where `sourcesContent[i]` is the content of the `sources[i]` file. If we didn't, then joined + // sourcemap would desynchronize the sources/contents. + function fillSourcesContent(len) { + const sourcesContent = []; + for (let i = 0; i < len; i++) + sourcesContent[i] = null; + return sourcesContent; + } + + const INVALID_ORIGINAL_MAPPING = Object.freeze({ + source: null, + line: null, + column: null, + name: null, + }); + const INVALID_GENERATED_MAPPING = Object.freeze({ + line: null, + column: null, + }); + const LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)'; + const COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)'; + const LEAST_UPPER_BOUND = -1; + const GREATEST_LOWER_BOUND = 1; + /** + * Returns the encoded (VLQ string) form of the SourceMap's mappings field. + */ + exports.encodedMappings = void 0; + /** + * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. + */ + exports.decodedMappings = void 0; + /** + * A low-level API to find the segment associated with a generated line/column (think, from a + * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. + */ + exports.traceSegment = void 0; + /** + * A higher-level API to find the source/line/column associated with a generated line/column + * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in + * `source-map` library. + */ + exports.originalPositionFor = void 0; + /** + * Finds the source/line/column directly after the mapping returned by originalPositionFor, provided + * the found mapping is from the same source and line as the originalPositionFor mapping. + * + * Eg, in the code `let id = 1`, `originalPositionAfter` could find the mapping associated with `1` + * using the same needle that would return `id` when calling `originalPositionFor`. + */ + exports.generatedPositionFor = void 0; + /** + * Iterates each mapping in generated position order. + */ + exports.eachMapping = void 0; + /** + * A helper that skips sorting of the input map's mappings array, which can be expensive for larger + * maps. + */ + exports.presortedDecodedMap = void 0; + /** + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ + exports.decodedMap = void 0; + /** + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ + exports.encodedMap = void 0; + class TraceMap { + constructor(map, mapUrl) { + this._decodedMemo = memoizedState(); + this._bySources = undefined; + this._bySourceMemos = undefined; + const isString = typeof map === 'string'; + if (!isString && map.constructor === TraceMap) + return map; + const parsed = (isString ? JSON.parse(map) : map); + const { version, file, names, sourceRoot, sources, sourcesContent } = parsed; + this.version = version; + this.file = file; + this.names = names; + this.sourceRoot = sourceRoot; + this.sources = sources; + this.sourcesContent = sourcesContent; + if (sourceRoot || mapUrl) { + const from = resolve(sourceRoot || '', stripFilename(mapUrl)); + this.resolvedSources = sources.map((s) => resolve(s || '', from)); + } + else { + this.resolvedSources = sources.map((s) => s || ''); + } + const { mappings } = parsed; + if (typeof mappings === 'string') { + this._encoded = mappings; + this._decoded = undefined; + } + else { + this._encoded = undefined; + this._decoded = maybeSort(mappings, isString); + } + } + } + (() => { + exports.encodedMappings = (map) => { + var _a; + return ((_a = map._encoded) !== null && _a !== void 0 ? _a : (map._encoded = sourcemapCodec.encode(map._decoded))); + }; + exports.decodedMappings = (map) => { + return (map._decoded || (map._decoded = sourcemapCodec.decode(map._encoded))); + }; + exports.traceSegment = (map, line, column) => { + const decoded = exports.decodedMappings(map); + // It's common for parent source maps to have pointers to lines that have no + // mapping (like a "//# sourceMappingURL=") at the end of the child file. + if (line >= decoded.length) + return null; + return traceSegmentInternal(decoded[line], map._decodedMemo, line, column, GREATEST_LOWER_BOUND); + }; + exports.originalPositionFor = (map, { line, column, bias }) => { + line--; + if (line < 0) + throw new Error(LINE_GTR_ZERO); + if (column < 0) + throw new Error(COL_GTR_EQ_ZERO); + const decoded = exports.decodedMappings(map); + // It's common for parent source maps to have pointers to lines that have no + // mapping (like a "//# sourceMappingURL=") at the end of the child file. + if (line >= decoded.length) + return INVALID_ORIGINAL_MAPPING; + const segment = traceSegmentInternal(decoded[line], map._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND); + if (segment == null) + return INVALID_ORIGINAL_MAPPING; + if (segment.length == 1) + return INVALID_ORIGINAL_MAPPING; + const { names, resolvedSources } = map; + return { + source: resolvedSources[segment[SOURCES_INDEX]], + line: segment[SOURCE_LINE] + 1, + column: segment[SOURCE_COLUMN], + name: segment.length === 5 ? names[segment[NAMES_INDEX]] : null, + }; + }; + exports.generatedPositionFor = (map, { source, line, column, bias }) => { + line--; + if (line < 0) + throw new Error(LINE_GTR_ZERO); + if (column < 0) + throw new Error(COL_GTR_EQ_ZERO); + const { sources, resolvedSources } = map; + let sourceIndex = sources.indexOf(source); + if (sourceIndex === -1) + sourceIndex = resolvedSources.indexOf(source); + if (sourceIndex === -1) + return INVALID_GENERATED_MAPPING; + const generated = (map._bySources || (map._bySources = buildBySources(exports.decodedMappings(map), (map._bySourceMemos = sources.map(memoizedState))))); + const memos = map._bySourceMemos; + const segments = generated[sourceIndex][line]; + if (segments == null) + return INVALID_GENERATED_MAPPING; + const segment = traceSegmentInternal(segments, memos[sourceIndex], line, column, bias || GREATEST_LOWER_BOUND); + if (segment == null) + return INVALID_GENERATED_MAPPING; + return { + line: segment[REV_GENERATED_LINE] + 1, + column: segment[REV_GENERATED_COLUMN], + }; + }; + exports.eachMapping = (map, cb) => { + const decoded = exports.decodedMappings(map); + const { names, resolvedSources } = map; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const generatedLine = i + 1; + const generatedColumn = seg[0]; + let source = null; + let originalLine = null; + let originalColumn = null; + let name = null; + if (seg.length !== 1) { + source = resolvedSources[seg[1]]; + originalLine = seg[2] + 1; + originalColumn = seg[3]; + } + if (seg.length === 5) + name = names[seg[4]]; + cb({ + generatedLine, + generatedColumn, + source, + originalLine, + originalColumn, + name, + }); + } + } + }; + exports.presortedDecodedMap = (map, mapUrl) => { + const clone = Object.assign({}, map); + clone.mappings = []; + const tracer = new TraceMap(clone, mapUrl); + tracer._decoded = map.mappings; + return tracer; + }; + exports.decodedMap = (map) => { + return { + version: 3, + file: map.file, + names: map.names, + sourceRoot: map.sourceRoot, + sources: map.sources, + sourcesContent: map.sourcesContent, + mappings: exports.decodedMappings(map), + }; + }; + exports.encodedMap = (map) => { + return { + version: 3, + file: map.file, + names: map.names, + sourceRoot: map.sourceRoot, + sources: map.sources, + sourcesContent: map.sourcesContent, + mappings: exports.encodedMappings(map), + }; + }; + })(); + function traceSegmentInternal(segments, memo, line, column, bias) { + let index = memoizedBinarySearch(segments, column, memo, line); + if (found) { + index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index); + } + else if (bias === LEAST_UPPER_BOUND) + index++; + if (index === -1 || index === segments.length) + return null; + return segments[index]; + } + + exports.AnyMap = AnyMap; + exports.GREATEST_LOWER_BOUND = GREATEST_LOWER_BOUND; + exports.LEAST_UPPER_BOUND = LEAST_UPPER_BOUND; + exports.TraceMap = TraceMap; + + Object.defineProperty(exports, '__esModule', { value: true }); + +})); +//# sourceMappingURL=trace-mapping.umd.js.map diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map new file mode 100644 index 0000000..4ef72e7 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"trace-mapping.umd.js","sources":["../../src/resolve.ts","../../src/strip-filename.ts","../../src/sourcemap-segment.ts","../../src/sort.ts","../../src/binary-search.ts","../../src/by-source.ts","../../src/any-map.ts","../../src/trace-mapping.ts"],"sourcesContent":[null,null,null,null,null,null,null,null],"names":["resolveUri","presortedDecodedMap","decodedMappings","encodedMappings","traceSegment","originalPositionFor","generatedPositionFor","eachMapping","decodedMap","encodedMap","encode","decode","bsFound"],"mappings":";;;;;;;;;;aAEwB,OAAO,CAAC,KAAa,EAAE,IAAwB;;;;QAIrE,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;YAAE,IAAI,IAAI,GAAG,CAAC;QAE7C,OAAOA,8BAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACjC;;ICTA;;;aAGwB,aAAa,CAAC,IAA+B;QACnE,IAAI,CAAC,IAAI;YAAE,OAAO,EAAE,CAAC;QACrB,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACpC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;IAClC;;ICQO,MAAM,MAAM,GAAG,CAAC,CAAC;IACjB,MAAM,aAAa,GAAG,CAAC,CAAC;IACxB,MAAM,WAAW,GAAG,CAAC,CAAC;IACtB,MAAM,aAAa,GAAG,CAAC,CAAC;IACxB,MAAM,WAAW,GAAG,CAAC,CAAC;IAEtB,MAAM,kBAAkB,GAAG,CAAC,CAAC;IAC7B,MAAM,oBAAoB,GAAG,CAAC;;aClBb,SAAS,CAC/B,QAA8B,EAC9B,KAAc;QAEd,MAAM,aAAa,GAAG,uBAAuB,CAAC,QAAQ,EAAE,CAA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,QAAQ,EAAEN,uBAAe,CAAC,GAAG,CAAC;aAC/B,CAAC;SACH,CAAC;QAEFO,kBAAU,GAAG,CAAC,GAAG;YACf,OAAO;gBACL,OAAO,EAAE,CAAC;gBACV,IAAI,EAAE,GAAG,CAAC,IAAI;gBACd,KAAK,EAAE,GAAG,CAAC,KAAK;gBAChB,UAAU,EAAE,GAAG,CAAC,UAAU;gBAC1B,OAAO,EAAE,GAAG,CAAC,OAAO;gBACpB,cAAc,EAAE,GAAG,CAAC,cAAc;gBAClC,QAAQ,EAAEN,uBAAe,CAAC,GAAG,CAAC;aAC/B,CAAC;SACH,CAAC;IACJ,CAAC,GAAA,CAAA;IAiBH,SAAS,oBAAoB,CAC3B,QAA+C,EAC/C,IAAe,EACf,IAAY,EACZ,MAAc,EACd,IAA4D;QAE5D,IAAI,KAAK,GAAG,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAC/D,IAAIS,KAAO,EAAE;YACX,KAAK,GAAG,CAAC,IAAI,KAAK,iBAAiB,GAAG,UAAU,GAAG,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;SACzF;aAAM,IAAI,IAAI,KAAK,iBAAiB;YAAE,KAAK,EAAE,CAAC;QAE/C,IAAI,KAAK,KAAK,CAAC,CAAC,IAAI,KAAK,KAAK,QAAQ,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QAC3D,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;IACzB;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts new file mode 100644 index 0000000..08bca6b --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts @@ -0,0 +1,8 @@ +import { TraceMap } from './trace-mapping'; +import type { SectionedSourceMapInput } from './types'; +declare type AnyMap = { + new (map: SectionedSourceMapInput, mapUrl?: string | null): TraceMap; + (map: SectionedSourceMapInput, mapUrl?: string | null): TraceMap; +}; +export declare const AnyMap: AnyMap; +export {}; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts new file mode 100644 index 0000000..88820e5 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts @@ -0,0 +1,32 @@ +import type { SourceMapSegment, ReverseSegment } from './sourcemap-segment'; +export declare type MemoState = { + lastKey: number; + lastNeedle: number; + lastIndex: number; +}; +export declare let found: boolean; +/** + * A binary search implementation that returns the index if a match is found. + * If no match is found, then the left-index (the index associated with the item that comes just + * before the desired index) is returned. To maintain proper sort order, a splice would happen at + * the next index: + * + * ```js + * const array = [1, 3]; + * const needle = 2; + * const index = binarySearch(array, needle, (item, needle) => item - needle); + * + * assert.equal(index, 0); + * array.splice(index + 1, 0, needle); + * assert.deepEqual(array, [1, 2, 3]); + * ``` + */ +export declare function binarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, low: number, high: number): number; +export declare function upperBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number; +export declare function lowerBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number; +export declare function memoizedState(): MemoState; +/** + * This overly complicated beast is just to record the last tested line/column and the resulting + * index, allowing us to skip a few tests if mappings are monotonically increasing. + */ +export declare function memoizedBinarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, state: MemoState, key: number): number; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/by-source.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/by-source.d.ts new file mode 100644 index 0000000..8d1e538 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/by-source.d.ts @@ -0,0 +1,7 @@ +import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment'; +import type { MemoState } from './binary-search'; +export declare type Source = { + __proto__: null; + [line: number]: Exclude[]; +}; +export default function buildBySources(decoded: readonly SourceMapSegment[][], memos: MemoState[]): Source[]; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts new file mode 100644 index 0000000..cf7d4f8 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts @@ -0,0 +1 @@ +export default function resolve(input: string, base: string | undefined): string; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts new file mode 100644 index 0000000..2bfb5dc --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts @@ -0,0 +1,2 @@ +import type { SourceMapSegment } from './sourcemap-segment'; +export default function maybeSort(mappings: SourceMapSegment[][], owned: boolean): SourceMapSegment[][]; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts new file mode 100644 index 0000000..6d70924 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts @@ -0,0 +1,16 @@ +declare type GeneratedColumn = number; +declare type SourcesIndex = number; +declare type SourceLine = number; +declare type SourceColumn = number; +declare type NamesIndex = number; +declare type GeneratedLine = number; +export declare type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; +export declare type ReverseSegment = [SourceColumn, GeneratedLine, GeneratedColumn]; +export declare const COLUMN = 0; +export declare const SOURCES_INDEX = 1; +export declare const SOURCE_LINE = 2; +export declare const SOURCE_COLUMN = 3; +export declare const NAMES_INDEX = 4; +export declare const REV_GENERATED_LINE = 1; +export declare const REV_GENERATED_COLUMN = 2; +export {}; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts new file mode 100644 index 0000000..bead5c1 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts @@ -0,0 +1,4 @@ +/** + * Removes everything after the last "/", but leaves the slash. + */ +export default function stripFilename(path: string | undefined | null): string; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts new file mode 100644 index 0000000..8cd4574 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts @@ -0,0 +1,70 @@ +import type { SourceMapSegment } from './sourcemap-segment'; +import type { SourceMapV3, DecodedSourceMap, EncodedSourceMap, InvalidOriginalMapping, OriginalMapping, InvalidGeneratedMapping, GeneratedMapping, SourceMapInput, Needle, SourceNeedle, SourceMap, EachMapping } from './types'; +export type { SourceMapSegment } from './sourcemap-segment'; +export type { SourceMapInput, SectionedSourceMapInput, DecodedSourceMap, EncodedSourceMap, SectionedSourceMap, InvalidOriginalMapping, OriginalMapping as Mapping, OriginalMapping, InvalidGeneratedMapping, GeneratedMapping, EachMapping, } from './types'; +export declare const LEAST_UPPER_BOUND = -1; +export declare const GREATEST_LOWER_BOUND = 1; +/** + * Returns the encoded (VLQ string) form of the SourceMap's mappings field. + */ +export declare let encodedMappings: (map: TraceMap) => EncodedSourceMap['mappings']; +/** + * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. + */ +export declare let decodedMappings: (map: TraceMap) => Readonly; +/** + * A low-level API to find the segment associated with a generated line/column (think, from a + * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. + */ +export declare let traceSegment: (map: TraceMap, line: number, column: number) => Readonly | null; +/** + * A higher-level API to find the source/line/column associated with a generated line/column + * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in + * `source-map` library. + */ +export declare let originalPositionFor: (map: TraceMap, needle: Needle) => OriginalMapping | InvalidOriginalMapping; +/** + * Finds the source/line/column directly after the mapping returned by originalPositionFor, provided + * the found mapping is from the same source and line as the originalPositionFor mapping. + * + * Eg, in the code `let id = 1`, `originalPositionAfter` could find the mapping associated with `1` + * using the same needle that would return `id` when calling `originalPositionFor`. + */ +export declare let generatedPositionFor: (map: TraceMap, needle: SourceNeedle) => GeneratedMapping | InvalidGeneratedMapping; +/** + * Iterates each mapping in generated position order. + */ +export declare let eachMapping: (map: TraceMap, cb: (mapping: EachMapping) => void) => void; +/** + * A helper that skips sorting of the input map's mappings array, which can be expensive for larger + * maps. + */ +export declare let presortedDecodedMap: (map: DecodedSourceMap, mapUrl?: string) => TraceMap; +/** + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export declare let decodedMap: (map: TraceMap) => Omit & { + mappings: readonly SourceMapSegment[][]; +}; +/** + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export declare let encodedMap: (map: TraceMap) => EncodedSourceMap; +export { AnyMap } from './any-map'; +export declare class TraceMap implements SourceMap { + version: SourceMapV3['version']; + file: SourceMapV3['file']; + names: SourceMapV3['names']; + sourceRoot: SourceMapV3['sourceRoot']; + sources: SourceMapV3['sources']; + sourcesContent: SourceMapV3['sourcesContent']; + resolvedSources: string[]; + private _encoded; + private _decoded; + private _decodedMemo; + private _bySources; + private _bySourceMemos; + constructor(map: SourceMapInput, mapUrl?: string | null); +} diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts new file mode 100644 index 0000000..2cc90c0 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts @@ -0,0 +1,85 @@ +import type { SourceMapSegment } from './sourcemap-segment'; +import type { TraceMap } from './trace-mapping'; +export interface SourceMapV3 { + file?: string | null; + names: string[]; + sourceRoot?: string; + sources: (string | null)[]; + sourcesContent?: (string | null)[]; + version: 3; +} +export interface EncodedSourceMap extends SourceMapV3 { + mappings: string; +} +export interface DecodedSourceMap extends SourceMapV3 { + mappings: SourceMapSegment[][]; +} +export interface Section { + offset: { + line: number; + column: number; + }; + map: EncodedSourceMap | DecodedSourceMap | SectionedSourceMap; +} +export interface SectionedSourceMap { + file?: string | null; + sections: Section[]; + version: 3; +} +export declare type OriginalMapping = { + source: string | null; + line: number; + column: number; + name: string | null; +}; +export declare type InvalidOriginalMapping = { + source: null; + line: null; + column: null; + name: null; +}; +export declare type GeneratedMapping = { + line: number; + column: number; +}; +export declare type InvalidGeneratedMapping = { + line: null; + column: null; +}; +export declare type SourceMapInput = string | EncodedSourceMap | DecodedSourceMap | TraceMap; +export declare type SectionedSourceMapInput = SourceMapInput | SectionedSourceMap; +export declare type Needle = { + line: number; + column: number; + bias?: 1 | -1; +}; +export declare type SourceNeedle = { + source: string; + line: number; + column: number; + bias?: 1 | -1; +}; +export declare type EachMapping = { + generatedLine: number; + generatedColumn: number; + source: null; + originalLine: null; + originalColumn: null; + name: null; +} | { + generatedLine: number; + generatedColumn: number; + source: string | null; + originalLine: number; + originalColumn: number; + name: string | null; +}; +export declare abstract class SourceMap { + version: SourceMapV3['version']; + file: SourceMapV3['file']; + names: SourceMapV3['names']; + sourceRoot: SourceMapV3['sourceRoot']; + sources: SourceMapV3['sources']; + sourcesContent: SourceMapV3['sourcesContent']; + resolvedSources: SourceMapV3['sources']; +} diff --git a/node_modules/@jridgewell/trace-mapping/package.json b/node_modules/@jridgewell/trace-mapping/package.json new file mode 100644 index 0000000..a957780 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/package.json @@ -0,0 +1,70 @@ +{ + "name": "@jridgewell/trace-mapping", + "version": "0.3.9", + "description": "Trace the original position through a source map", + "keywords": [ + "source", + "map" + ], + "main": "dist/trace-mapping.umd.js", + "module": "dist/trace-mapping.mjs", + "typings": "dist/types/trace-mapping.d.ts", + "files": [ + "dist" + ], + "exports": { + ".": { + "browser": "./dist/trace-mapping.umd.js", + "require": "./dist/trace-mapping.umd.js", + "import": "./dist/trace-mapping.mjs" + }, + "./package.json": "./package.json" + }, + "author": "Justin Ridgewell ", + "repository": { + "type": "git", + "url": "git+https://github.com/jridgewell/trace-mapping.git" + }, + "license": "MIT", + "scripts": { + "benchmark": "run-s build:rollup benchmark:*", + "benchmark:install": "cd benchmark && npm install", + "benchmark:only": "node benchmark/index.mjs", + "build": "run-s -n build:*", + "build:rollup": "rollup -c rollup.config.js", + "build:ts": "tsc --project tsconfig.build.json", + "lint": "run-s -n lint:*", + "lint:prettier": "npm run test:lint:prettier -- --write", + "lint:ts": "npm run test:lint:ts -- --fix", + "prebuild": "rm -rf dist", + "prepublishOnly": "npm run preversion", + "preversion": "run-s test build", + "test": "run-s -n test:lint test:only", + "test:debug": "ava debug", + "test:lint": "run-s -n test:lint:*", + "test:lint:prettier": "prettier --check '{src,test}/**/*.ts' '**/*.md'", + "test:lint:ts": "eslint '{src,test}/**/*.ts'", + "test:only": "c8 ava", + "test:watch": "ava --watch" + }, + "devDependencies": { + "@rollup/plugin-typescript": "8.3.0", + "@typescript-eslint/eslint-plugin": "5.10.0", + "@typescript-eslint/parser": "5.10.0", + "ava": "4.0.1", + "benchmark": "2.1.4", + "c8": "7.11.0", + "esbuild": "0.14.14", + "esbuild-node-loader": "0.6.4", + "eslint": "8.7.0", + "eslint-config-prettier": "8.3.0", + "npm-run-all": "4.1.5", + "prettier": "2.5.1", + "rollup": "2.64.0", + "typescript": "4.5.4" + }, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } +} diff --git a/node_modules/@noble/ed25519/LICENSE b/node_modules/@noble/ed25519/LICENSE new file mode 100644 index 0000000..a5e0151 --- /dev/null +++ b/node_modules/@noble/ed25519/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 Paul Miller (https://paulmillr.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the “Software”), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@noble/ed25519/README.md b/node_modules/@noble/ed25519/README.md new file mode 100644 index 0000000..fe351c0 --- /dev/null +++ b/node_modules/@noble/ed25519/README.md @@ -0,0 +1,327 @@ +# noble-ed25519 + +Fastest 4KB JS implementation of ed25519 signatures. + +- ✍️ [EDDSA](https://en.wikipedia.org/wiki/EdDSA) signatures compliant with [RFC8032](https://tools.ietf.org/html/rfc8032), + FIPS 186-5 +- 🪢 Consensus-friendly, compliant with [ZIP215](https://zips.z.cash/zip-0215) +- 🔖 SUF-CMA (strong unforgeability under chosen message attacks) and SBS (non-repudiation / exclusive ownership) +- 🪶 4KB gzipped, 400 lines of pure ESM, bundler-less code + +The module is a sister project of [noble-curves](https://github.com/paulmillr/noble-curves), +focusing on smaller attack surface & better auditability. +Curves are drop-in replacement and have more features: Common.js, ristretto255, X25519, curve25519, ed25519ph. To upgrade from v1 to v2, see [Upgrading](#upgrading). + +### This library belongs to _noble_ cryptography + +> **noble-cryptography** — high-security, easily auditable set of contained cryptographic libraries and tools. + +- Zero or minimal dependencies +- Highly readable TypeScript / JS code +- PGP-signed releases and transparent NPM builds with provenance +- Check out [homepage](https://paulmillr.com/noble/) & all libraries: + [ciphers](https://github.com/paulmillr/noble-ciphers), + [curves](https://github.com/paulmillr/noble-curves), + [hashes](https://github.com/paulmillr/noble-hashes), + [post-quantum](https://github.com/paulmillr/noble-post-quantum), + 4kb [secp256k1](https://github.com/paulmillr/noble-secp256k1) / + [ed25519](https://github.com/paulmillr/noble-ed25519) + +## Usage + +> `npm install @noble/ed25519` + +> `deno add jsr:@noble/ed25519` + +> `deno doc jsr:@noble/ed25519` # command-line documentation + +We support all major platforms and runtimes. For node.js <= 18 and React Native, additional polyfills are needed: see below. + +```js +import * as ed from '@noble/ed25519'; +(async () => { + // Uint8Arrays or hex strings are accepted: + // Uint8Array.from([0xde, 0xad, 0xbe, 0xef]) is equal to 'deadbeef' + const privKey = ed.utils.randomPrivateKey(); + const message = Uint8Array.from([0xab, 0xbc, 0xcd, 0xde]); + const pubKey = await ed.getPublicKeyAsync(privKey); // Sync methods below + const signature = await ed.signAsync(message, privKey); + const isValid = await ed.verifyAsync(signature, message, pubKey); +})(); +``` + +### Enabling synchronous methods + +Only async methods are available by default, to keep the library dependency-free. +To enable sync methods: + +```ts +import { sha512 } from '@noble/hashes/sha512'; +ed.etc.sha512Sync = (...m) => sha512(ed.etc.concatBytes(...m)); +// Sync methods can be used now: +// ed.getPublicKey(privKey); +// ed.sign(msg, privKey); +// ed.verify(signature, msg, pubKey); +``` + +### React Native: polyfill getRandomValues and sha512 + +```ts +import 'react-native-get-random-values'; +import { sha512 } from '@noble/hashes/sha512'; +ed.etc.sha512Sync = (...m) => sha512(ed.etc.concatBytes(...m)); +ed.etc.sha512Async = (...m) => Promise.resolve(ed.etc.sha512Sync(...m)); +``` + +## API + +There are 3 main methods: + +- `getPublicKey(privateKey)` and `getPublicKeyAsync(privateKey)` +- `sign(message, privateKey)` and `signAsync(message, privateKey)` +- `verify(signature, message, publicKey)` and `verifyAsync(signature, message, publicKey)` + +Functions accept Uint8Array. There are utilities which convert hex strings, utf8 strings or bigints to u8a. + +### getPublicKey + +```typescript +import * as ed from '@noble/ed25519'; +(async () => { + const privKeyA = ed.utils.hexToBytes( + '9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60' + ); + const pubKeyA = ed.getPublicKey(privKeyA); + + const privKeyB = ed.utils.randomPrivateKey(); + const pubKeyB = await ed.getPublicKeyAsync(privKeyB); + const privKey64Byte = ed.etc.concatBytes(privKeyB, pubKeyB); + const pubKeyPoint = ed.ExtendedPoint.fromHex(pubKeyB); + const pubKeyExt = ed.utils.getExtendedPublicKey(privKeyB); +})(); +``` + +Generates 32-byte public key from 32-byte private key. + +- Some libraries have 64-byte private keys - those are just priv+pub concatenated +- Use `ExtendedPoint.fromHex(publicKey)` if you want to convert hex / bytes into Point. + It will use decompression algorithm 5.1.3 of RFC 8032. +- Use `utils.getExtendedPublicKey` if you need full SHA512 hash of seed + +### sign + +```ts +import * as ed from '@noble/ed25519'; +(async () => { + const privKey = ed.utils.hexToBytes( + '9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60' + ); + const message = Uint8Array.from([0xab, 0xbc, 0xcd, 0xde]); + const signature = ed.sign(message, privKey); + + const messageB = new TextEncoder().encode('hello noble'); + const signatureB = await ed.signAsync(messageB, privKey); +})(); +``` + +Generates deterministic EdDSA signature. + +Assumes unhashed `message`: it would be hashed by ed25519 internally. +For prehashed ed25519ph, switch to noble-curves. + +### verify + +```ts +import * as ed from '@noble/ed25519'; +(async () => { + const privKey = ed.utils.randomPrivateKey(); + const message = Uint8Array.from([0xab, 0xbc, 0xcd, 0xde]); + const pubKey = await ed.getPublicKeyAsync(privKey); + const signature = await ed.signAsync(message, privKey); + + const isValidA = ed.verify(signature, message, pubKey); + + const isValidB = await ed.verifyAsync(signature, message, pubKey); + const isValidC = ed.verify(signature, message, pubKey, { zip215: false }); +})(); +``` + +Verifies EdDSA signature. Has SUF-CMA (strong unforgeability under chosen message attacks). +By default, follows ZIP215 [^1] and can be used in consensus-critical apps [^2]. +`zip215: false` option switches verification criteria to strict +RFC8032 / FIPS 186-5 and provides non-repudiation with SBS (Strongly Binding Signatures) [^3]. + +### utils + +A bunch of useful **utilities** are also exposed: + +```typescript +const etc: { + bytesToHex: (b: Bytes) => string; + hexToBytes: (hex: string) => Bytes; + concatBytes: (...arrs: Bytes[]) => Uint8Array; + mod: (a: bigint, b?: bigint) => bigint; + invert: (num: bigint, md?: bigint) => bigint; + randomBytes: (len: number) => Bytes; + sha512Async: (...messages: Bytes[]) => Promise; + sha512Sync: Sha512FnSync; +}; +const utils: { + getExtendedPublicKeyAsync: (priv: Hex) => Promise; + getExtendedPublicKey: (priv: Hex) => ExtK; + precompute(p: Point, w?: number): Point; + randomPrivateKey: () => Bytes; // Uses CSPRNG https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues +}; + +class ExtendedPoint { + // Elliptic curve point in Extended (x, y, z, t) coordinates. + constructor(ex: bigint, ey: bigint, ez: bigint, et: bigint); + static readonly BASE: Point; + static readonly ZERO: Point; + static fromAffine(point: AffinePoint): ExtendedPoint; + static fromHex(hash: string); + get x(): bigint; + get y(): bigint; + // Note: It does not check whether the `other` point is valid point on curve. + add(other: ExtendedPoint): ExtendedPoint; + equals(other: ExtendedPoint): boolean; + isTorsionFree(): boolean; // Multiplies the point by curve order + multiply(scalar: bigint): ExtendedPoint; + subtract(other: ExtendedPoint): ExtendedPoint; + toAffine(): Point; + toRawBytes(): Uint8Array; + toHex(): string; // Compact representation of a Point +} +// Curve params +ed25519.CURVE.p; // 2 ** 255 - 19 +ed25519.CURVE.n; // 2 ** 252 + 27742317777372353535851937790883648493 +ed25519.ExtendedPoint.BASE; // new ed25519.Point(Gx, Gy) where +// Gx=15112221349535400772501151409588531511454012693041857206046113283949847762202n +// Gy=46316835694926478169428394003475163141307993866256225615783033603165251855960n; +``` + +## Security + +The module is production-ready. + +We cross-test against sister project [noble-curves](https://github.com/paulmillr/noble-curves), which was audited and provides improved security. + +- The current version has not been independently audited. It is a rewrite of v1, which has been audited by cure53 in Feb 2022: + [PDF](https://cure53.de/pentest-report_ed25519.pdf). +- It's being fuzzed [in a separate repository](https://github.com/paulmillr/fuzzing) + +If you see anything unusual: investigate and report. + +### Constant-timeness + +We're targetting algorithmic constant time. _JIT-compiler_ and _Garbage Collector_ make "constant time" +extremely hard to achieve [timing attack](https://en.wikipedia.org/wiki/Timing_attack) resistance +in a scripting language. Which means _any other JS library can't have +constant-timeness_. Even statically typed Rust, a language without GC, +[makes it harder to achieve constant-time](https://www.chosenplaintext.ca/open-source/rust-timing-shield/security) +for some cases. If your goal is absolute security, don't use any JS lib — including bindings to native ones. +Use low-level libraries & languages. + +### Supply chain security + +- **Commits** are signed with PGP keys, to prevent forgery. Make sure to verify commit signatures +- **Releases** are transparent and built on GitHub CI. + Check out [attested checksums of single-file builds](https://github.com/paulmillr/noble-ed25519/attestations) + and [provenance logs](https://github.com/paulmillr/noble-ed25519/actions/workflows/release.yml) +- **Rare releasing** is followed to ensure less re-audit need for end-users +- **Dependencies** are minimized and locked-down: any dependency could get hacked and users will be downloading malware with every install. + - We make sure to use as few dependencies as possible + - Automatic dep updates are prevented by locking-down version ranges; diffs are checked with `npm-diff` +- **Dev Dependencies** are disabled for end-users; they are only used to develop / build the source code + +For this package, there are 0 dependencies; and a few dev dependencies: + +- [noble-hashes](https://github.com/paulmillr/noble-hashes) provides cryptographic hashing functionality +- micro-bmark, micro-should and jsbt are used for benchmarking / testing / build tooling and developed by the same author +- prettier, fast-check and typescript are used for code quality / test generation / ts compilation. It's hard to audit their source code thoroughly and fully because of their size + +### Randomness + +We're deferring to built-in +[crypto.getRandomValues](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues) +which is considered cryptographically secure (CSPRNG). + +In the past, browsers had bugs that made it weak: it may happen again. +Implementing a userspace CSPRNG to get resilient to the weakness +is even worse: there is no reliable userspace source of quality entropy. + +### Quantum computers + +Cryptographically relevant quantum computer, if built, will allow to +break elliptic curve cryptography (both ECDSA / EdDSA & ECDH) using Shor's algorithm. + +Consider switching to newer / hybrid algorithms, such as SPHINCS+. They are available in +[noble-post-quantum](https://github.com/paulmillr/noble-post-quantum). + +NIST prohibits classical cryptography (RSA, DSA, ECDSA, ECDH) [after 2035](https://nvlpubs.nist.gov/nistpubs/ir/2024/NIST.IR.8547.ipd.pdf). Australian ASD prohibits it [after 2030](https://www.cyber.gov.au/resources-business-and-government/essential-cyber-security/ism/cyber-security-guidelines/guidelines-cryptography). + +## Speed + +Benchmarks done with Apple M2 on macOS 13 with Node.js 20. + + getPublicKey(utils.randomPrivateKey()) x 9,173 ops/sec @ 109μs/op + sign x 4,567 ops/sec @ 218μs/op + verify x 994 ops/sec @ 1ms/op + Point.fromHex decompression x 16,164 ops/sec @ 61μs/op + +Compare to alternative implementations: + + tweetnacl@1.0.3 getPublicKey x 1,808 ops/sec @ 552μs/op ± 1.64% + tweetnacl@1.0.3 sign x 651 ops/sec @ 1ms/op + ristretto255@0.1.2 getPublicKey x 640 ops/sec @ 1ms/op ± 1.59% + sodium-native#sign x 83,654 ops/sec @ 11μs/op + +## Upgrading + +noble-ed25519 v2 features improved security and smaller attack surface. +The goal of v2 is to provide minimum possible JS library which is safe and fast. + +That means the library was reduced 4x, to just over 300 lines. In order to +achieve the goal, **some features were moved** to +[noble-curves](https://github.com/paulmillr/noble-curves), which is +even safer and faster drop-in replacement library with same API. +Switch to curves if you intend to keep using these features: + +- x25519 / curve25519 / getSharedSecret +- ristretto255 / RistrettoPoint +- Using `utils.precompute()` for non-base point +- Support for environments which don't support bigint literals +- Common.js support +- Support for node.js 18 and older without [shim](#usage) + +Other changes for upgrading from @noble/ed25519 1.7 to 2.0: + +- Methods are now sync by default; use `getPublicKeyAsync`, `signAsync`, `verifyAsync` for async versions +- `bigint` is no longer allowed in `getPublicKey`, `sign`, `verify`. Reason: ed25519 is LE, can lead to bugs +- `Point` (2d xy) has been changed to `ExtendedPoint` (xyzt) +- `Signature` was removed: just use raw bytes or hex now +- `utils` were split into `utils` (same api as in noble-curves) and + `etc` (`sha512Sync` and others) + +## Contributing & testing + +- `npm install && npm run build && npm test` will build the code and run tests. +- `npm run bench` will run benchmarks, which may need their deps first (`npm run bench:install`) +- `npm run loc` will count total output size, important to be less than 4KB + +Check out [github.com/paulmillr/guidelines](https://github.com/paulmillr/guidelines) +for general coding practices and rules. + +See [paulmillr.com/noble](https://paulmillr.com/noble/) +for useful resources, articles, documentation and demos +related to the library. + +## License + +MIT (c) 2019 Paul Miller [(https://paulmillr.com)](https://paulmillr.com), see LICENSE file. + +[^1]: https://zips.z.cash/zip-0215 + +[^2]: https://hdevalence.ca/blog/2020-10-04-its-25519am + +[^3]: https://eprint.iacr.org/2020/1244 diff --git a/node_modules/@noble/ed25519/index.d.ts b/node_modules/@noble/ed25519/index.d.ts new file mode 100644 index 0000000..70512c7 --- /dev/null +++ b/node_modules/@noble/ed25519/index.d.ts @@ -0,0 +1,141 @@ +/*! noble-ed25519 - MIT License (c) 2019 Paul Miller (paulmillr.com) */ +/** + * 4KB JS implementation of ed25519 EdDSA signatures. + * Compliant with RFC8032, FIPS 186-5 & ZIP215. + * @module + * @example + * ```js +import * as ed from '@noble/ed25519'; +(async () => { + const privKey = ed.utils.randomPrivateKey(); + const message = Uint8Array.from([0xab, 0xbc, 0xcd, 0xde]); + const pubKey = await ed.getPublicKeyAsync(privKey); // Sync methods are also present + const signature = await ed.signAsync(message, privKey); + const isValid = await ed.verifyAsync(signature, message, pubKey); +})(); +``` + */ +/** + * Curve params. ed25519 is twisted edwards curve. Equation is −x² + y² = -a + dx²y². + * * P = `2n**255n - 19n` // field over which calculations are done + * * N = `2n**252n + 27742317777372353535851937790883648493n` // group order, amount of curve points + * * h = 8 // cofactor + * * a = `Fp.create(BigInt(-1))` // equation param + * * d = -121665/121666 a.k.a. `Fp.neg(121665 * Fp.inv(121666))` // equation param + * * Gx, Gy are coordinates of Generator / base point + */ +declare const ed25519_CURVE: EdwardsOpts; +/** Alias to Uint8Array. */ +export type Bytes = Uint8Array; +/** Hex-encoded string or Uint8Array. */ +export type Hex = Bytes | string; +/** Edwards elliptic curve options. */ +export type EdwardsOpts = Readonly<{ + p: bigint; + n: bigint; + h: bigint; + a: bigint; + d: bigint; + Gx: bigint; + Gy: bigint; +}>; +/** WebCrypto OS-level CSPRNG (random number generator). Will throw when not available. */ +declare const randomBytes: (len?: number) => Bytes; +/** Point in 2d xy affine coordinates. */ +export interface AffinePoint { + x: bigint; + y: bigint; +} +/** Point in XYZT extended coordinates. */ +declare class Point { + static BASE: Point; + static ZERO: Point; + readonly ex: bigint; + readonly ey: bigint; + readonly ez: bigint; + readonly et: bigint; + constructor(ex: bigint, ey: bigint, ez: bigint, et: bigint); + static fromAffine(p: AffinePoint): Point; + /** RFC8032 5.1.3: Uint8Array to Point. */ + static fromBytes(hex: Bytes, zip215?: boolean): Point; + /** Checks if the point is valid and on-curve. */ + assertValidity(): this; + /** Equality check: compare points P&Q. */ + equals(other: Point): boolean; + is0(): boolean; + /** Flip point over y coordinate. */ + negate(): Point; + /** Point doubling. Complete formula. Cost: `4M + 4S + 1*a + 6add + 1*2`. */ + double(): Point; + /** Point addition. Complete formula. Cost: `8M + 1*k + 8add + 1*2`. */ + add(other: Point): Point; + /** + * Point-by-scalar multiplication. Scalar must be in range 1 <= n < CURVE.n. + * Uses {@link wNAF} for base point. + * Uses fake point to mitigate side-channel leakage. + * @param n scalar by which point is multiplied + * @param safe safe mode guards against timing attacks; unsafe mode is faster + */ + multiply(n: bigint, safe?: boolean): Point; + /** Convert point to 2d xy affine point. (X, Y, Z) ∋ (x=X/Z, y=Y/Z) */ + toAffine(): AffinePoint; + toBytes(): Bytes; + toHex(): string; + clearCofactor(): Point; + isSmallOrder(): boolean; + isTorsionFree(): boolean; + static fromHex(hex: Hex, zip215?: boolean): Point; + get x(): bigint; + get y(): bigint; + toRawBytes(): Bytes; +} +/** etc.sha512Sync should conform to the interface. */ +export type Sha512FnSync = undefined | ((...messages: Bytes[]) => Bytes); +type ExtK = { + head: Bytes; + prefix: Bytes; + scalar: bigint; + point: Point; + pointBytes: Bytes; +}; +/** Creates 32-byte ed25519 public key from 32-byte private key. Async. */ +declare const getPublicKeyAsync: (priv: Hex) => Promise; +/** Creates 32-byte ed25519 public key from 32-byte private key. To use, set `etc.sha512Sync` first. */ +declare const getPublicKey: (priv: Hex) => Bytes; +/** + * Signs message (NOT message hash) using private key. Async. + * Follows RFC8032 5.1.6. + */ +declare const signAsync: (msg: Hex, privKey: Hex) => Promise; +/** + * Signs message (NOT message hash) using private key. To use, set `hashes.sha512` first. + * Follows RFC8032 5.1.6. + */ +declare const sign: (msg: Hex, privKey: Hex) => Bytes; +/** Verification options. zip215: true (default) follows ZIP215 spec. false would follow RFC8032. */ +export type VerifOpts = { + zip215?: boolean; +}; +/** Verifies signature on message and public key. Async. Follows RFC8032 5.1.7. */ +declare const verifyAsync: (s: Hex, m: Hex, p: Hex, opts?: VerifOpts) => Promise; +/** Verifies signature on message and public key. To use, set `hashes.sha512` first. Follows RFC8032 5.1.7. */ +declare const verify: (s: Hex, m: Hex, p: Hex, opts?: VerifOpts) => boolean; +/** Math, hex, byte helpers. Not in `utils` because utils share API with noble-curves. */ +declare const etc: { + sha512Async: (...messages: Bytes[]) => Promise; + sha512Sync: Sha512FnSync; + bytesToHex: (b: Bytes) => string; + hexToBytes: (hex: string) => Bytes; + concatBytes: (...arrs: Bytes[]) => Uint8Array; + mod: (a: bigint, b?: bigint) => bigint; + invert: (num: bigint, md: bigint) => bigint; + randomBytes: typeof randomBytes; +}; +/** ed25519-specific key utilities. */ +declare const utils: { + getExtendedPublicKeyAsync: (priv: Hex) => Promise; + getExtendedPublicKey: (priv: Hex) => ExtK; + randomPrivateKey: () => Bytes; + precompute: (w?: number, p?: Point) => Point; +}; +export { ed25519_CURVE as CURVE, etc, Point as ExtendedPoint, getPublicKey, getPublicKeyAsync, Point, sign, signAsync, utils, verify, verifyAsync, }; diff --git a/node_modules/@noble/ed25519/index.js b/node_modules/@noble/ed25519/index.js new file mode 100644 index 0000000..c1aa5b2 --- /dev/null +++ b/node_modules/@noble/ed25519/index.js @@ -0,0 +1,590 @@ +/*! noble-ed25519 - MIT License (c) 2019 Paul Miller (paulmillr.com) */ +/** + * 4KB JS implementation of ed25519 EdDSA signatures. + * Compliant with RFC8032, FIPS 186-5 & ZIP215. + * @module + * @example + * ```js +import * as ed from '@noble/ed25519'; +(async () => { + const privKey = ed.utils.randomPrivateKey(); + const message = Uint8Array.from([0xab, 0xbc, 0xcd, 0xde]); + const pubKey = await ed.getPublicKeyAsync(privKey); // Sync methods are also present + const signature = await ed.signAsync(message, privKey); + const isValid = await ed.verifyAsync(signature, message, pubKey); +})(); +``` + */ +/** + * Curve params. ed25519 is twisted edwards curve. Equation is −x² + y² = -a + dx²y². + * * P = `2n**255n - 19n` // field over which calculations are done + * * N = `2n**252n + 27742317777372353535851937790883648493n` // group order, amount of curve points + * * h = 8 // cofactor + * * a = `Fp.create(BigInt(-1))` // equation param + * * d = -121665/121666 a.k.a. `Fp.neg(121665 * Fp.inv(121666))` // equation param + * * Gx, Gy are coordinates of Generator / base point + */ +const ed25519_CURVE = { + p: 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedn, + n: 0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3edn, + h: 8n, + a: 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffecn, + d: 0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3n, + Gx: 0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51an, + Gy: 0x6666666666666666666666666666666666666666666666666666666666666658n, +}; +const { p: P, n: N, Gx, Gy, a: _a, d: _d } = ed25519_CURVE; +const h = 8n; // cofactor +const L = 32; // field / group byte length +const L2 = 64; +// Helpers and Precomputes sections are reused between libraries +// ## Helpers +// ---------- +// error helper, messes-up stack trace +const err = (m = '') => { + throw new Error(m); +}; +const isBig = (n) => typeof n === 'bigint'; // is big integer +const isStr = (s) => typeof s === 'string'; // is string +const isBytes = (a) => a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array'); +/** assert is Uint8Array (of specific length) */ +const abytes = (a, l) => !isBytes(a) || (typeof l === 'number' && l > 0 && a.length !== l) + ? err('Uint8Array expected') + : a; +/** create Uint8Array */ +const u8n = (len) => new Uint8Array(len); +const u8fr = (buf) => Uint8Array.from(buf); +const padh = (n, pad) => n.toString(16).padStart(pad, '0'); +const bytesToHex = (b) => Array.from(abytes(b)) + .map((e) => padh(e, 2)) + .join(''); +const C = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 }; // ASCII characters +const _ch = (ch) => { + if (ch >= C._0 && ch <= C._9) + return ch - C._0; // '2' => 50-48 + if (ch >= C.A && ch <= C.F) + return ch - (C.A - 10); // 'B' => 66-(65-10) + if (ch >= C.a && ch <= C.f) + return ch - (C.a - 10); // 'b' => 98-(97-10) + return; +}; +const hexToBytes = (hex) => { + const e = 'hex invalid'; + if (!isStr(hex)) + return err(e); + const hl = hex.length; + const al = hl / 2; + if (hl % 2) + return err(e); + const array = u8n(al); + for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) { + // treat each char as ASCII + const n1 = _ch(hex.charCodeAt(hi)); // parse first char, multiply it by 16 + const n2 = _ch(hex.charCodeAt(hi + 1)); // parse second char + if (n1 === undefined || n2 === undefined) + return err(e); + array[ai] = n1 * 16 + n2; // example: 'A9' => 10*16 + 9 + } + return array; +}; +/** normalize hex or ui8a to ui8a */ +const toU8 = (a, len) => abytes(isStr(a) ? hexToBytes(a) : u8fr(abytes(a)), len); +const cr = () => globalThis?.crypto; // WebCrypto is available in all modern environments +const subtle = () => cr()?.subtle ?? err('crypto.subtle must be defined'); +// prettier-ignore +const concatBytes = (...arrs) => { + const r = u8n(arrs.reduce((sum, a) => sum + abytes(a).length, 0)); // create u8a of summed length + let pad = 0; // walk through each array, + arrs.forEach(a => { r.set(a, pad); pad += a.length; }); // ensure they have proper type + return r; +}; +/** WebCrypto OS-level CSPRNG (random number generator). Will throw when not available. */ +const randomBytes = (len = L) => { + const c = cr(); + return c.getRandomValues(u8n(len)); +}; +const big = BigInt; +const arange = (n, min, max, msg = 'bad number: out of range') => isBig(n) && min <= n && n < max ? n : err(msg); +/** modular division */ +const M = (a, b = P) => { + const r = a % b; + return r >= 0n ? r : b + r; +}; +const modN = (a) => M(a, N); +/** Modular inversion using eucledian GCD (non-CT). No negative exponent for now. */ +// prettier-ignore +const invert = (num, md) => { + if (num === 0n || md <= 0n) + err('no inverse n=' + num + ' mod=' + md); + let a = M(num, md), b = md, x = 0n, y = 1n, u = 1n, v = 0n; + while (a !== 0n) { + const q = b / a, r = b % a; + const m = x - u * q, n = y - v * q; + b = a, a = r, x = u, y = v, u = m, v = n; + } + return b === 1n ? M(x, md) : err('no inverse'); // b is gcd at this point +}; +const callHash = (name) => { + // @ts-ignore + const fn = etc[name]; + if (typeof fn !== 'function') + err('hashes.' + name + ' not set'); + return fn; +}; +const apoint = (p) => (p instanceof Point ? p : err('Point expected')); +// ## End of Helpers +// ----------------- +const B256 = 2n ** 256n; +/** Point in XYZT extended coordinates. */ +class Point { + static BASE; + static ZERO; + ex; + ey; + ez; + et; + constructor(ex, ey, ez, et) { + const max = B256; + this.ex = arange(ex, 0n, max); + this.ey = arange(ey, 0n, max); + this.ez = arange(ez, 1n, max); + this.et = arange(et, 0n, max); + Object.freeze(this); + } + static fromAffine(p) { + return new Point(p.x, p.y, 1n, M(p.x * p.y)); + } + /** RFC8032 5.1.3: Uint8Array to Point. */ + static fromBytes(hex, zip215 = false) { + const d = _d; + // Copy array to not mess it up. + const normed = u8fr(abytes(hex, L)); + // adjust first LE byte = last BE byte + const lastByte = hex[31]; + normed[31] = lastByte & ~0x80; + const y = bytesToNumLE(normed); + // zip215=true: 0 <= y < 2^256 + // zip215=false, RFC8032: 0 <= y < 2^255-19 + const max = zip215 ? B256 : P; + arange(y, 0n, max); + const y2 = M(y * y); // y² + const u = M(y2 - 1n); // u=y²-1 + const v = M(d * y2 + 1n); // v=dy²+1 + let { isValid, value: x } = uvRatio(u, v); // (uv³)(uv⁷)^(p-5)/8; square root + if (!isValid) + err('bad point: y not sqrt'); // not square root: bad point + const isXOdd = (x & 1n) === 1n; // adjust sign of x coordinate + const isLastByteOdd = (lastByte & 0x80) !== 0; // x_0, last bit + if (!zip215 && x === 0n && isLastByteOdd) + err('bad point: x==0, isLastByteOdd'); // x=0, x_0=1 + if (isLastByteOdd !== isXOdd) + x = M(-x); + return new Point(x, y, 1n, M(x * y)); // Z=1, T=xy + } + /** Checks if the point is valid and on-curve. */ + assertValidity() { + const a = _a; + const d = _d; + const p = this; + if (p.is0()) + throw new Error('bad point: ZERO'); // TODO: optimize, with vars below? + // Equation in affine coordinates: ax² + y² = 1 + dx²y² + // Equation in projective coordinates (X/Z, Y/Z, Z): (aX² + Y²)Z² = Z⁴ + dX²Y² + const { ex: X, ey: Y, ez: Z, et: T } = p; + const X2 = M(X * X); // X² + const Y2 = M(Y * Y); // Y² + const Z2 = M(Z * Z); // Z² + const Z4 = M(Z2 * Z2); // Z⁴ + const aX2 = M(X2 * a); // aX² + const left = M(Z2 * M(aX2 + Y2)); // (aX² + Y²)Z² + const right = M(Z4 + M(d * M(X2 * Y2))); // Z⁴ + dX²Y² + if (left !== right) + throw new Error('bad point: equation left != right (1)'); + // In Extended coordinates we also have T, which is x*y=T/Z: check X*Y == Z*T + const XY = M(X * Y); + const ZT = M(Z * T); + if (XY !== ZT) + throw new Error('bad point: equation left != right (2)'); + return this; + } + /** Equality check: compare points P&Q. */ + equals(other) { + const { ex: X1, ey: Y1, ez: Z1 } = this; + const { ex: X2, ey: Y2, ez: Z2 } = apoint(other); // checks class equality + const X1Z2 = M(X1 * Z2); + const X2Z1 = M(X2 * Z1); + const Y1Z2 = M(Y1 * Z2); + const Y2Z1 = M(Y2 * Z1); + return X1Z2 === X2Z1 && Y1Z2 === Y2Z1; + } + is0() { + return this.equals(I); + } + /** Flip point over y coordinate. */ + negate() { + return new Point(M(-this.ex), this.ey, this.ez, M(-this.et)); + } + /** Point doubling. Complete formula. Cost: `4M + 4S + 1*a + 6add + 1*2`. */ + double() { + const { ex: X1, ey: Y1, ez: Z1 } = this; + const a = _a; + // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#doubling-dbl-2008-hwcd + const A = M(X1 * X1); + const B = M(Y1 * Y1); + const C = M(2n * M(Z1 * Z1)); + const D = M(a * A); + const x1y1 = X1 + Y1; + const E = M(M(x1y1 * x1y1) - A - B); + const G = D + B; + const F = G - C; + const H = D - B; + const X3 = M(E * F); + const Y3 = M(G * H); + const T3 = M(E * H); + const Z3 = M(F * G); + return new Point(X3, Y3, Z3, T3); + } + /** Point addition. Complete formula. Cost: `8M + 1*k + 8add + 1*2`. */ + add(other) { + const { ex: X1, ey: Y1, ez: Z1, et: T1 } = this; + const { ex: X2, ey: Y2, ez: Z2, et: T2 } = apoint(other); // doesn't check if other on-curve + const a = _a; + const d = _d; + // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html#addition-add-2008-hwcd-3 + const A = M(X1 * X2); + const B = M(Y1 * Y2); + const C = M(T1 * d * T2); + const D = M(Z1 * Z2); + const E = M((X1 + Y1) * (X2 + Y2) - A - B); + const F = M(D - C); + const G = M(D + C); + const H = M(B - a * A); + const X3 = M(E * F); + const Y3 = M(G * H); + const T3 = M(E * H); + const Z3 = M(F * G); + return new Point(X3, Y3, Z3, T3); + } + /** + * Point-by-scalar multiplication. Scalar must be in range 1 <= n < CURVE.n. + * Uses {@link wNAF} for base point. + * Uses fake point to mitigate side-channel leakage. + * @param n scalar by which point is multiplied + * @param safe safe mode guards against timing attacks; unsafe mode is faster + */ + multiply(n, safe = true) { + if (!safe && (n === 0n || this.is0())) + return I; + arange(n, 1n, N); + if (n === 1n) + return this; + if (this.equals(G)) + return wNAF(n).p; + // init result point & fake point + let p = I; + let f = G; + for (let d = this; n > 0n; d = d.double(), n >>= 1n) { + // if bit is present, add to point + // if not present, add to fake, for timing safety + if (n & 1n) + p = p.add(d); + else if (safe) + f = f.add(d); + } + return p; + } + /** Convert point to 2d xy affine point. (X, Y, Z) ∋ (x=X/Z, y=Y/Z) */ + toAffine() { + const { ex: x, ey: y, ez: z } = this; + // fast-paths for ZERO point OR Z=1 + if (this.equals(I)) + return { x: 0n, y: 1n }; + const iz = invert(z, P); + // (Z * Z^-1) must be 1, otherwise bad math + if (M(z * iz) !== 1n) + err('invalid inverse'); + // x = X*Z^-1; y = Y*Z^-1 + return { x: M(x * iz), y: M(y * iz) }; + } + toBytes() { + const { x, y } = this.assertValidity().toAffine(); + const b = numTo32bLE(y); + // store sign in first LE byte + b[31] |= x & 1n ? 0x80 : 0; + return b; + } + toHex() { + return bytesToHex(this.toBytes()); + } // encode to hex string + clearCofactor() { + return this.multiply(big(h), false); + } + isSmallOrder() { + return this.clearCofactor().is0(); + } + isTorsionFree() { + // multiply by big number CURVE.n + let p = this.multiply(N / 2n, false).double(); // ensures the point is not "bad". + if (N % 2n) + p = p.add(this); // P^(N+1) // P*N == (P*(N/2))*2+P + return p.is0(); + } + static fromHex(hex, zip215) { + return Point.fromBytes(toU8(hex), zip215); + } + get x() { + return this.toAffine().x; + } + get y() { + return this.toAffine().y; + } + toRawBytes() { + return this.toBytes(); + } +} +/** Generator / base point */ +const G = new Point(Gx, Gy, 1n, M(Gx * Gy)); +/** Identity / zero point */ +const I = new Point(0n, 1n, 1n, 0n); +// Static aliases +Point.BASE = G; +Point.ZERO = I; +const numTo32bLE = (num) => hexToBytes(padh(arange(num, 0n, B256), L2)).reverse(); +const bytesToNumLE = (b) => big('0x' + bytesToHex(u8fr(abytes(b)).reverse())); +const pow2 = (x, power) => { + // pow2(x, 4) == x^(2^4) + let r = x; + while (power-- > 0n) { + r *= r; + r %= P; + } + return r; +}; +// prettier-ignore +const pow_2_252_3 = (x) => { + const x2 = (x * x) % P; // x^2, bits 1 + const b2 = (x2 * x) % P; // x^3, bits 11 + const b4 = (pow2(b2, 2n) * b2) % P; // x^(2^4-1), bits 1111 + const b5 = (pow2(b4, 1n) * x) % P; // x^(2^5-1), bits 11111 + const b10 = (pow2(b5, 5n) * b5) % P; // x^(2^10) + const b20 = (pow2(b10, 10n) * b10) % P; // x^(2^20) + const b40 = (pow2(b20, 20n) * b20) % P; // x^(2^40) + const b80 = (pow2(b40, 40n) * b40) % P; // x^(2^80) + const b160 = (pow2(b80, 80n) * b80) % P; // x^(2^160) + const b240 = (pow2(b160, 80n) * b80) % P; // x^(2^240) + const b250 = (pow2(b240, 10n) * b10) % P; // x^(2^250) + const pow_p_5_8 = (pow2(b250, 2n) * x) % P; // < To pow to (p+3)/8, multiply it by x. + return { pow_p_5_8, b2 }; +}; +const RM1 = 0x2b8324804fc1df0b2b4d00993dfbd7a72f431806ad2fe478c4ee1b274a0ea0b0n; // √-1 +// for sqrt comp +// prettier-ignore +const uvRatio = (u, v) => { + const v3 = M(v * v * v); // v³ + const v7 = M(v3 * v3 * v); // v⁷ + const pow = pow_2_252_3(u * v7).pow_p_5_8; // (uv⁷)^(p-5)/8 + let x = M(u * v3 * pow); // (uv³)(uv⁷)^(p-5)/8 + const vx2 = M(v * x * x); // vx² + const root1 = x; // First root candidate + const root2 = M(x * RM1); // Second root candidate; RM1 is √-1 + const useRoot1 = vx2 === u; // If vx² = u (mod p), x is a square root + const useRoot2 = vx2 === M(-u); // If vx² = -u, set x <-- x * 2^((p-1)/4) + const noRoot = vx2 === M(-u * RM1); // There is no valid root, vx² = -u√-1 + if (useRoot1) + x = root1; + if (useRoot2 || noRoot) + x = root2; // We return root2 anyway, for const-time + if ((M(x) & 1n) === 1n) + x = M(-x); // edIsNegative + return { isValid: useRoot1 || useRoot2, value: x }; +}; +// N == L, just weird naming +const modL_LE = (hash) => modN(bytesToNumLE(hash)); // modulo L; but little-endian +const sha512a = (...m) => etc.sha512Async(...m); // Async SHA512 +const sha512s = (...m) => callHash('sha512Sync')(...m); +// RFC8032 5.1.5 +const hash2extK = (hashed) => { + // slice creates a copy, unlike subarray + const head = hashed.slice(0, L); + head[0] &= 248; // Clamp bits: 0b1111_1000 + head[31] &= 127; // 0b0111_1111 + head[31] |= 64; // 0b0100_0000 + const prefix = hashed.slice(L, L2); // private key "prefix" + const scalar = modL_LE(head); // modular division over curve order + const point = G.multiply(scalar); // public key point + const pointBytes = point.toBytes(); // point serialized to Uint8Array + return { head, prefix, scalar, point, pointBytes }; +}; +// RFC8032 5.1.5; getPublicKey async, sync. Hash priv key and extract point. +const getExtendedPublicKeyAsync = (priv) => sha512a(toU8(priv, L)).then(hash2extK); +const getExtendedPublicKey = (priv) => hash2extK(sha512s(toU8(priv, L))); +/** Creates 32-byte ed25519 public key from 32-byte private key. Async. */ +const getPublicKeyAsync = (priv) => getExtendedPublicKeyAsync(priv).then((p) => p.pointBytes); +/** Creates 32-byte ed25519 public key from 32-byte private key. To use, set `etc.sha512Sync` first. */ +const getPublicKey = (priv) => getExtendedPublicKey(priv).pointBytes; +const hashFinishA = (res) => sha512a(res.hashable).then(res.finish); +const hashFinishS = (res) => res.finish(sha512s(res.hashable)); +const _sign = (e, rBytes, msg) => { + // sign() shared code + const { pointBytes: P, scalar: s } = e; + const r = modL_LE(rBytes); // r was created outside, reduce it modulo L + const R = G.multiply(r).toBytes(); // R = [r]B + const hashable = concatBytes(R, P, msg); // dom2(F, C) || R || A || PH(M) + const finish = (hashed) => { + // k = SHA512(dom2(F, C) || R || A || PH(M)) + const S = modN(r + modL_LE(hashed) * s); // S = (r + k * s) mod L; 0 <= s < l + return abytes(concatBytes(R, numTo32bLE(S)), L2); // 64-byte sig: 32b R.x + 32b LE(S) + }; + return { hashable, finish }; +}; +/** + * Signs message (NOT message hash) using private key. Async. + * Follows RFC8032 5.1.6. + */ +const signAsync = async (msg, privKey) => { + const m = toU8(msg); + const e = await getExtendedPublicKeyAsync(privKey); + const rBytes = await sha512a(e.prefix, m); // r = SHA512(dom2(F, C) || prefix || PH(M)) + return hashFinishA(_sign(e, rBytes, m)); // gen R, k, S, then 64-byte signature +}; +/** + * Signs message (NOT message hash) using private key. To use, set `hashes.sha512` first. + * Follows RFC8032 5.1.6. + */ +const sign = (msg, privKey) => { + const m = toU8(msg); + const e = getExtendedPublicKey(privKey); + const rBytes = sha512s(e.prefix, m); // r = SHA512(dom2(F, C) || prefix || PH(M)) + return hashFinishS(_sign(e, rBytes, m)); // gen R, k, S, then 64-byte signature +}; +const veriOpts = { zip215: true }; +const _verify = (sig, msg, pub, opts = veriOpts) => { + sig = toU8(sig, L2); // Signature hex str/Bytes, must be 64 bytes + msg = toU8(msg); // Message hex str/Bytes + pub = toU8(pub, L); + const { zip215 } = opts; // switch between zip215 and rfc8032 verif + let A; + let R; + let s; + let SB; + let hashable = Uint8Array.of(); + try { + A = Point.fromHex(pub, zip215); // public key A decoded + R = Point.fromHex(sig.slice(0, L), zip215); // 0 <= R < 2^256: ZIP215 R can be >= P + s = bytesToNumLE(sig.slice(L, L2)); // Decode second half as an integer S + SB = G.multiply(s, false); // in the range 0 <= s < L + hashable = concatBytes(R.toBytes(), A.toBytes(), msg); // dom2(F, C) || R || A || PH(M) + } + catch (error) { } + const finish = (hashed) => { + // k = SHA512(dom2(F, C) || R || A || PH(M)) + if (SB == null) + return false; // false if try-catch catched an error + if (!zip215 && A.isSmallOrder()) + return false; // false for SBS: Strongly Binding Signature + const k = modL_LE(hashed); // decode in little-endian, modulo L + const RkA = R.add(A.multiply(k, false)); // [8]R + [8][k]A' + return RkA.add(SB.negate()).clearCofactor().is0(); // [8][S]B = [8]R + [8][k]A' + }; + return { hashable, finish }; +}; +/** Verifies signature on message and public key. Async. Follows RFC8032 5.1.7. */ +const verifyAsync = async (s, m, p, opts = veriOpts) => hashFinishA(_verify(s, m, p, opts)); +/** Verifies signature on message and public key. To use, set `hashes.sha512` first. Follows RFC8032 5.1.7. */ +const verify = (s, m, p, opts = veriOpts) => hashFinishS(_verify(s, m, p, opts)); +/** Math, hex, byte helpers. Not in `utils` because utils share API with noble-curves. */ +const etc = { + sha512Async: async (...messages) => { + const s = subtle(); + const m = concatBytes(...messages); + return u8n(await s.digest('SHA-512', m.buffer)); + }, + sha512Sync: undefined, + bytesToHex: bytesToHex, + hexToBytes: hexToBytes, + concatBytes: concatBytes, + mod: M, + invert: invert, + randomBytes: randomBytes, +}; +/** ed25519-specific key utilities. */ +const utils = { + getExtendedPublicKeyAsync: getExtendedPublicKeyAsync, + getExtendedPublicKey: getExtendedPublicKey, + randomPrivateKey: () => randomBytes(L), + precompute: (w = 8, p = G) => { + p.multiply(3n); + w; + return p; + }, // no-op +}; +// ## Precomputes +// -------------- +const W = 8; // W is window size +const scalarBits = 256; +const pwindows = Math.ceil(scalarBits / W) + 1; // 33 for W=8 +const pwindowSize = 2 ** (W - 1); // 128 for W=8 +const precompute = () => { + const points = []; + let p = G; + let b = p; + for (let w = 0; w < pwindows; w++) { + b = p; + points.push(b); + for (let i = 1; i < pwindowSize; i++) { + b = b.add(p); + points.push(b); + } // i=1, bc we skip 0 + p = b.double(); + } + return points; +}; +let Gpows = undefined; // precomputes for base point G +// const-time negate +const ctneg = (cnd, p) => { + const n = p.negate(); + return cnd ? n : p; +}; +/** + * Precomputes give 12x faster getPublicKey(), 10x sign(), 2x verify() by + * caching multiples of G (base point). Cache is stored in 32MB of RAM. + * Any time `G.multiply` is done, precomputes are used. + * Not used for getSharedSecret, which instead multiplies random pubkey `P.multiply`. + * + * w-ary non-adjacent form (wNAF) precomputation method is 10% slower than windowed method, + * but takes 2x less RAM. RAM reduction is possible by utilizing `.subtract`. + * + * !! Precomputes can be disabled by commenting-out call of the wNAF() inside Point#multiply(). + */ +const wNAF = (n) => { + const comp = Gpows || (Gpows = precompute()); + let p = I; + let f = G; // f must be G, or could become I in the end + const pow_2_w = 2 ** W; // 256 for W=8 + const maxNum = pow_2_w; // 256 for W=8 + const mask = big(pow_2_w - 1); // 255 for W=8 == mask 0b11111111 + const shiftBy = big(W); // 8 for W=8 + for (let w = 0; w < pwindows; w++) { + let wbits = Number(n & mask); // extract W bits. + n >>= shiftBy; // shift number by W bits. + if (wbits > pwindowSize) { + wbits -= maxNum; + n += 1n; + } // split if bits > max: +224 => 256-32 + const off = w * pwindowSize; + const offF = off; // offsets, evaluate both + const offP = off + Math.abs(wbits) - 1; + const isEven = w % 2 !== 0; // conditions, evaluate both + const isNeg = wbits < 0; + if (wbits === 0) { + // off == I: can't add it. Adding random offF instead. + f = f.add(ctneg(isEven, comp[offF])); // bits are 0: add garbage to fake point + } + else { + p = p.add(ctneg(isNeg, comp[offP])); // bits are 1: add to result point + } + } + return { p, f }; // return both real and fake points for JIT +}; +// !! Remove the export to easily use in REPL / browser console +export { ed25519_CURVE as CURVE, etc, Point as ExtendedPoint, getPublicKey, getPublicKeyAsync, Point, sign, signAsync, utils, verify, verifyAsync, }; diff --git a/node_modules/@noble/ed25519/index.ts b/node_modules/@noble/ed25519/index.ts new file mode 100644 index 0000000..116c9ac --- /dev/null +++ b/node_modules/@noble/ed25519/index.ts @@ -0,0 +1,630 @@ +/*! noble-ed25519 - MIT License (c) 2019 Paul Miller (paulmillr.com) */ +/** + * 4KB JS implementation of ed25519 EdDSA signatures. + * Compliant with RFC8032, FIPS 186-5 & ZIP215. + * @module + * @example + * ```js +import * as ed from '@noble/ed25519'; +(async () => { + const privKey = ed.utils.randomPrivateKey(); + const message = Uint8Array.from([0xab, 0xbc, 0xcd, 0xde]); + const pubKey = await ed.getPublicKeyAsync(privKey); // Sync methods are also present + const signature = await ed.signAsync(message, privKey); + const isValid = await ed.verifyAsync(signature, message, pubKey); +})(); +``` + */ +/** + * Curve params. ed25519 is twisted edwards curve. Equation is −x² + y² = -a + dx²y². + * * P = `2n**255n - 19n` // field over which calculations are done + * * N = `2n**252n + 27742317777372353535851937790883648493n` // group order, amount of curve points + * * h = 8 // cofactor + * * a = `Fp.create(BigInt(-1))` // equation param + * * d = -121665/121666 a.k.a. `Fp.neg(121665 * Fp.inv(121666))` // equation param + * * Gx, Gy are coordinates of Generator / base point + */ +const ed25519_CURVE: EdwardsOpts = { + p: 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedn, + n: 0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3edn, + h: 8n, + a: 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffecn, + d: 0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3n, + Gx: 0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51an, + Gy: 0x6666666666666666666666666666666666666666666666666666666666666658n, +}; +const { p: P, n: N, Gx, Gy, a: _a, d: _d } = ed25519_CURVE; +const h = 8n; // cofactor +const L = 32; // field / group byte length +const L2 = 64; +/** Alias to Uint8Array. */ +export type Bytes = Uint8Array; +/** Hex-encoded string or Uint8Array. */ +export type Hex = Bytes | string; +/** Edwards elliptic curve options. */ +export type EdwardsOpts = Readonly<{ + p: bigint; + n: bigint; + h: bigint; + a: bigint; + d: bigint; + Gx: bigint; + Gy: bigint; +}>; + +// Helpers and Precomputes sections are reused between libraries + +// ## Helpers +// ---------- +// error helper, messes-up stack trace +const err = (m = ''): never => { + throw new Error(m); +}; +const isBig = (n: unknown): n is bigint => typeof n === 'bigint'; // is big integer +const isStr = (s: unknown): s is string => typeof s === 'string'; // is string +const isBytes = (a: unknown): a is Uint8Array => + a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array'); +/** assert is Uint8Array (of specific length) */ +const abytes = (a: unknown, l?: number): Bytes => + !isBytes(a) || (typeof l === 'number' && l > 0 && a.length !== l) + ? err('Uint8Array expected') + : a; +/** create Uint8Array */ +const u8n = (len: number) => new Uint8Array(len); +const u8fr = (buf: ArrayLike) => Uint8Array.from(buf); +const padh = (n: number | bigint, pad: number) => n.toString(16).padStart(pad, '0'); +const bytesToHex = (b: Bytes): string => + Array.from(abytes(b)) + .map((e) => padh(e, 2)) + .join(''); +const C = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 } as const; // ASCII characters +const _ch = (ch: number): number | undefined => { + if (ch >= C._0 && ch <= C._9) return ch - C._0; // '2' => 50-48 + if (ch >= C.A && ch <= C.F) return ch - (C.A - 10); // 'B' => 66-(65-10) + if (ch >= C.a && ch <= C.f) return ch - (C.a - 10); // 'b' => 98-(97-10) + return; +}; +const hexToBytes = (hex: string): Bytes => { + const e = 'hex invalid'; + if (!isStr(hex)) return err(e); + const hl = hex.length; + const al = hl / 2; + if (hl % 2) return err(e); + const array = u8n(al); + for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) { + // treat each char as ASCII + const n1 = _ch(hex.charCodeAt(hi)); // parse first char, multiply it by 16 + const n2 = _ch(hex.charCodeAt(hi + 1)); // parse second char + if (n1 === undefined || n2 === undefined) return err(e); + array[ai] = n1 * 16 + n2; // example: 'A9' => 10*16 + 9 + } + return array; +}; +/** normalize hex or ui8a to ui8a */ +const toU8 = (a: Hex, len?: number) => abytes(isStr(a) ? hexToBytes(a) : u8fr(abytes(a)), len); +declare const globalThis: Record | undefined; // Typescript symbol present in browsers +const cr = () => globalThis?.crypto; // WebCrypto is available in all modern environments +const subtle = () => cr()?.subtle ?? err('crypto.subtle must be defined'); +// prettier-ignore +const concatBytes = (...arrs: Bytes[]): Bytes => { + const r = u8n(arrs.reduce((sum, a) => sum + abytes(a).length, 0)); // create u8a of summed length + let pad = 0; // walk through each array, + arrs.forEach(a => { r.set(a, pad); pad += a.length; }); // ensure they have proper type + return r; +}; +/** WebCrypto OS-level CSPRNG (random number generator). Will throw when not available. */ +const randomBytes = (len: number = L): Bytes => { + const c = cr(); + return c.getRandomValues(u8n(len)); +}; +const big = BigInt; +const arange = (n: bigint, min: bigint, max: bigint, msg = 'bad number: out of range'): bigint => + isBig(n) && min <= n && n < max ? n : err(msg); +/** modular division */ +const M = (a: bigint, b: bigint = P) => { + const r = a % b; + return r >= 0n ? r : b + r; +}; +const modN = (a: bigint) => M(a, N); +/** Modular inversion using eucledian GCD (non-CT). No negative exponent for now. */ +// prettier-ignore +const invert = (num: bigint, md: bigint): bigint => { + if (num === 0n || md <= 0n) err('no inverse n=' + num + ' mod=' + md); + let a = M(num, md), b = md, x = 0n, y = 1n, u = 1n, v = 0n; + while (a !== 0n) { + const q = b / a, r = b % a; + const m = x - u * q, n = y - v * q; + b = a, a = r, x = u, y = v, u = m, v = n; + } + return b === 1n ? M(x, md) : err('no inverse'); // b is gcd at this point +}; +const callHash = (name: string) => { + // @ts-ignore + const fn = etc[name]; + if (typeof fn !== 'function') err('hashes.' + name + ' not set'); + return fn; +}; +const apoint = (p: unknown) => (p instanceof Point ? p : err('Point expected')); +/** Point in 2d xy affine coordinates. */ +export interface AffinePoint { + x: bigint; + y: bigint; +} +// ## End of Helpers +// ----------------- + +const B256 = 2n ** 256n; +/** Point in XYZT extended coordinates. */ +class Point { + static BASE: Point; + static ZERO: Point; + readonly ex: bigint; + readonly ey: bigint; + readonly ez: bigint; + readonly et: bigint; + constructor(ex: bigint, ey: bigint, ez: bigint, et: bigint) { + const max = B256; + this.ex = arange(ex, 0n, max); + this.ey = arange(ey, 0n, max); + this.ez = arange(ez, 1n, max); + this.et = arange(et, 0n, max); + Object.freeze(this); + } + static fromAffine(p: AffinePoint): Point { + return new Point(p.x, p.y, 1n, M(p.x * p.y)); + } + /** RFC8032 5.1.3: Uint8Array to Point. */ + static fromBytes(hex: Bytes, zip215 = false): Point { + const d = _d; + // Copy array to not mess it up. + const normed = u8fr(abytes(hex, L)); + // adjust first LE byte = last BE byte + const lastByte = hex[31]; + normed[31] = lastByte & ~0x80; + const y = bytesToNumLE(normed); + // zip215=true: 0 <= y < 2^256 + // zip215=false, RFC8032: 0 <= y < 2^255-19 + const max = zip215 ? B256 : P; + arange(y, 0n, max); + + const y2 = M(y * y); // y² + const u = M(y2 - 1n); // u=y²-1 + const v = M(d * y2 + 1n); // v=dy²+1 + let { isValid, value: x } = uvRatio(u, v); // (uv³)(uv⁷)^(p-5)/8; square root + if (!isValid) err('bad point: y not sqrt'); // not square root: bad point + const isXOdd = (x & 1n) === 1n; // adjust sign of x coordinate + const isLastByteOdd = (lastByte & 0x80) !== 0; // x_0, last bit + if (!zip215 && x === 0n && isLastByteOdd) err('bad point: x==0, isLastByteOdd'); // x=0, x_0=1 + if (isLastByteOdd !== isXOdd) x = M(-x); + return new Point(x, y, 1n, M(x * y)); // Z=1, T=xy + } + /** Checks if the point is valid and on-curve. */ + assertValidity(): this { + const a = _a; + const d = _d; + const p = this; + if (p.is0()) throw new Error('bad point: ZERO'); // TODO: optimize, with vars below? + // Equation in affine coordinates: ax² + y² = 1 + dx²y² + // Equation in projective coordinates (X/Z, Y/Z, Z): (aX² + Y²)Z² = Z⁴ + dX²Y² + const { ex: X, ey: Y, ez: Z, et: T } = p; + const X2 = M(X * X); // X² + const Y2 = M(Y * Y); // Y² + const Z2 = M(Z * Z); // Z² + const Z4 = M(Z2 * Z2); // Z⁴ + const aX2 = M(X2 * a); // aX² + const left = M(Z2 * M(aX2 + Y2)); // (aX² + Y²)Z² + const right = M(Z4 + M(d * M(X2 * Y2))); // Z⁴ + dX²Y² + if (left !== right) throw new Error('bad point: equation left != right (1)'); + // In Extended coordinates we also have T, which is x*y=T/Z: check X*Y == Z*T + const XY = M(X * Y); + const ZT = M(Z * T); + if (XY !== ZT) throw new Error('bad point: equation left != right (2)'); + return this; + } + /** Equality check: compare points P&Q. */ + equals(other: Point): boolean { + const { ex: X1, ey: Y1, ez: Z1 } = this; + const { ex: X2, ey: Y2, ez: Z2 } = apoint(other); // checks class equality + const X1Z2 = M(X1 * Z2); + const X2Z1 = M(X2 * Z1); + const Y1Z2 = M(Y1 * Z2); + const Y2Z1 = M(Y2 * Z1); + return X1Z2 === X2Z1 && Y1Z2 === Y2Z1; + } + is0(): boolean { + return this.equals(I); + } + /** Flip point over y coordinate. */ + negate(): Point { + return new Point(M(-this.ex), this.ey, this.ez, M(-this.et)); + } + /** Point doubling. Complete formula. Cost: `4M + 4S + 1*a + 6add + 1*2`. */ + double(): Point { + const { ex: X1, ey: Y1, ez: Z1 } = this; + const a = _a; + // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#doubling-dbl-2008-hwcd + const A = M(X1 * X1); + const B = M(Y1 * Y1); + const C = M(2n * M(Z1 * Z1)); + const D = M(a * A); + const x1y1 = X1 + Y1; + const E = M(M(x1y1 * x1y1) - A - B); + const G = D + B; + const F = G - C; + const H = D - B; + const X3 = M(E * F); + const Y3 = M(G * H); + const T3 = M(E * H); + const Z3 = M(F * G); + return new Point(X3, Y3, Z3, T3); + } + /** Point addition. Complete formula. Cost: `8M + 1*k + 8add + 1*2`. */ + add(other: Point): Point { + const { ex: X1, ey: Y1, ez: Z1, et: T1 } = this; + const { ex: X2, ey: Y2, ez: Z2, et: T2 } = apoint(other); // doesn't check if other on-curve + const a = _a; + const d = _d; + // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html#addition-add-2008-hwcd-3 + const A = M(X1 * X2); + const B = M(Y1 * Y2); + const C = M(T1 * d * T2); + const D = M(Z1 * Z2); + const E = M((X1 + Y1) * (X2 + Y2) - A - B); + const F = M(D - C); + const G = M(D + C); + const H = M(B - a * A); + const X3 = M(E * F); + const Y3 = M(G * H); + const T3 = M(E * H); + const Z3 = M(F * G); + return new Point(X3, Y3, Z3, T3); + } + /** + * Point-by-scalar multiplication. Scalar must be in range 1 <= n < CURVE.n. + * Uses {@link wNAF} for base point. + * Uses fake point to mitigate side-channel leakage. + * @param n scalar by which point is multiplied + * @param safe safe mode guards against timing attacks; unsafe mode is faster + */ + multiply(n: bigint, safe = true): Point { + if (!safe && (n === 0n || this.is0())) return I; + arange(n, 1n, N); + if (n === 1n) return this; + if (this.equals(G)) return wNAF(n).p; + // init result point & fake point + let p = I; + let f = G; + for (let d: Point = this; n > 0n; d = d.double(), n >>= 1n) { + // if bit is present, add to point + // if not present, add to fake, for timing safety + if (n & 1n) p = p.add(d); + else if (safe) f = f.add(d); + } + return p; + } + /** Convert point to 2d xy affine point. (X, Y, Z) ∋ (x=X/Z, y=Y/Z) */ + toAffine(): AffinePoint { + const { ex: x, ey: y, ez: z } = this; + // fast-paths for ZERO point OR Z=1 + if (this.equals(I)) return { x: 0n, y: 1n }; + const iz = invert(z, P); + // (Z * Z^-1) must be 1, otherwise bad math + if (M(z * iz) !== 1n) err('invalid inverse'); + // x = X*Z^-1; y = Y*Z^-1 + return { x: M(x * iz), y: M(y * iz) }; + } + toBytes(): Bytes { + const { x, y } = this.assertValidity().toAffine(); + const b = numTo32bLE(y); + // store sign in first LE byte + b[31] |= x & 1n ? 0x80 : 0; + return b; + } + toHex(): string { + return bytesToHex(this.toBytes()); + } // encode to hex string + + clearCofactor(): Point { + return this.multiply(big(h), false); + } + isSmallOrder(): boolean { + return this.clearCofactor().is0(); + } + isTorsionFree(): boolean { + // multiply by big number CURVE.n + let p = this.multiply(N / 2n, false).double(); // ensures the point is not "bad". + if (N % 2n) p = p.add(this); // P^(N+1) // P*N == (P*(N/2))*2+P + return p.is0(); + } + + static fromHex(hex: Hex, zip215?: boolean): Point { + return Point.fromBytes(toU8(hex), zip215); + } + get x(): bigint { + return this.toAffine().x; + } + get y(): bigint { + return this.toAffine().y; + } + toRawBytes(): Bytes { + return this.toBytes(); + } +} +/** Generator / base point */ +const G: Point = new Point(Gx, Gy, 1n, M(Gx * Gy)); +/** Identity / zero point */ +const I: Point = new Point(0n, 1n, 1n, 0n); +// Static aliases +Point.BASE = G; +Point.ZERO = I; + +const numTo32bLE = (num: bigint) => hexToBytes(padh(arange(num, 0n, B256), L2)).reverse(); +const bytesToNumLE = (b: Bytes): bigint => big('0x' + bytesToHex(u8fr(abytes(b)).reverse())); + +const pow2 = (x: bigint, power: bigint): bigint => { + // pow2(x, 4) == x^(2^4) + let r = x; + while (power-- > 0n) { + r *= r; + r %= P; + } + return r; +}; + +// prettier-ignore +const pow_2_252_3 = (x: bigint) => { // x^(2^252-3) unrolled util for square root + const x2 = (x * x) % P; // x^2, bits 1 + const b2 = (x2 * x) % P; // x^3, bits 11 + const b4 = (pow2(b2, 2n) * b2) % P; // x^(2^4-1), bits 1111 + const b5 = (pow2(b4, 1n) * x) % P; // x^(2^5-1), bits 11111 + const b10 = (pow2(b5, 5n) * b5) % P; // x^(2^10) + const b20 = (pow2(b10, 10n) * b10) % P; // x^(2^20) + const b40 = (pow2(b20, 20n) * b20) % P; // x^(2^40) + const b80 = (pow2(b40, 40n) * b40) % P; // x^(2^80) + const b160 = (pow2(b80, 80n) * b80) % P; // x^(2^160) + const b240 = (pow2(b160, 80n) * b80) % P; // x^(2^240) + const b250 = (pow2(b240, 10n) * b10) % P; // x^(2^250) + const pow_p_5_8 = (pow2(b250, 2n) * x) % P; // < To pow to (p+3)/8, multiply it by x. + return { pow_p_5_8, b2 }; +} +const RM1 = 0x2b8324804fc1df0b2b4d00993dfbd7a72f431806ad2fe478c4ee1b274a0ea0b0n; // √-1 +// for sqrt comp +// prettier-ignore +const uvRatio = (u: bigint, v: bigint): { isValid: boolean, value: bigint } => { + const v3 = M(v * v * v); // v³ + const v7 = M(v3 * v3 * v); // v⁷ + const pow = pow_2_252_3(u * v7).pow_p_5_8; // (uv⁷)^(p-5)/8 + let x = M(u * v3 * pow); // (uv³)(uv⁷)^(p-5)/8 + const vx2 = M(v * x * x); // vx² + const root1 = x; // First root candidate + const root2 = M(x * RM1); // Second root candidate; RM1 is √-1 + const useRoot1 = vx2 === u; // If vx² = u (mod p), x is a square root + const useRoot2 = vx2 === M(-u); // If vx² = -u, set x <-- x * 2^((p-1)/4) + const noRoot = vx2 === M(-u * RM1); // There is no valid root, vx² = -u√-1 + if (useRoot1) x = root1; + if (useRoot2 || noRoot) x = root2; // We return root2 anyway, for const-time + if ((M(x) & 1n) === 1n) x = M(-x); // edIsNegative + return { isValid: useRoot1 || useRoot2, value: x }; +} +// N == L, just weird naming +const modL_LE = (hash: Bytes): bigint => modN(bytesToNumLE(hash)); // modulo L; but little-endian +/** etc.sha512Sync should conform to the interface. */ +export type Sha512FnSync = undefined | ((...messages: Bytes[]) => Bytes); +const sha512a = (...m: Bytes[]) => etc.sha512Async(...m); // Async SHA512 +const sha512s = (...m: Bytes[]) => callHash('sha512Sync')(...m); +type ExtK = { head: Bytes; prefix: Bytes; scalar: bigint; point: Point; pointBytes: Bytes }; + +// RFC8032 5.1.5 +const hash2extK = (hashed: Bytes): ExtK => { + // slice creates a copy, unlike subarray + const head = hashed.slice(0, L); + head[0] &= 248; // Clamp bits: 0b1111_1000 + head[31] &= 127; // 0b0111_1111 + head[31] |= 64; // 0b0100_0000 + const prefix = hashed.slice(L, L2); // private key "prefix" + const scalar = modL_LE(head); // modular division over curve order + const point = G.multiply(scalar); // public key point + const pointBytes = point.toBytes(); // point serialized to Uint8Array + return { head, prefix, scalar, point, pointBytes }; +}; + +// RFC8032 5.1.5; getPublicKey async, sync. Hash priv key and extract point. +const getExtendedPublicKeyAsync = (priv: Hex) => sha512a(toU8(priv, L)).then(hash2extK); +const getExtendedPublicKey = (priv: Hex) => hash2extK(sha512s(toU8(priv, L))); +/** Creates 32-byte ed25519 public key from 32-byte private key. Async. */ +const getPublicKeyAsync = (priv: Hex): Promise => + getExtendedPublicKeyAsync(priv).then((p) => p.pointBytes); +/** Creates 32-byte ed25519 public key from 32-byte private key. To use, set `etc.sha512Sync` first. */ +const getPublicKey = (priv: Hex): Bytes => getExtendedPublicKey(priv).pointBytes; +type Finishable = { + // Reduces logic duplication between + hashable: Bytes; + finish: (hashed: Bytes) => T; // sync & async versions of sign(), verify() +}; +const hashFinishA = (res: Finishable): Promise => sha512a(res.hashable).then(res.finish); +const hashFinishS = (res: Finishable): T => res.finish(sha512s(res.hashable)); +const _sign = (e: ExtK, rBytes: Bytes, msg: Bytes): Finishable => { + // sign() shared code + const { pointBytes: P, scalar: s } = e; + const r = modL_LE(rBytes); // r was created outside, reduce it modulo L + const R = G.multiply(r).toBytes(); // R = [r]B + const hashable = concatBytes(R, P, msg); // dom2(F, C) || R || A || PH(M) + const finish = (hashed: Bytes): Bytes => { + // k = SHA512(dom2(F, C) || R || A || PH(M)) + const S = modN(r + modL_LE(hashed) * s); // S = (r + k * s) mod L; 0 <= s < l + return abytes(concatBytes(R, numTo32bLE(S)), L2); // 64-byte sig: 32b R.x + 32b LE(S) + }; + return { hashable, finish }; +}; +/** + * Signs message (NOT message hash) using private key. Async. + * Follows RFC8032 5.1.6. + */ +const signAsync = async (msg: Hex, privKey: Hex): Promise => { + const m = toU8(msg); + const e = await getExtendedPublicKeyAsync(privKey); + const rBytes = await sha512a(e.prefix, m); // r = SHA512(dom2(F, C) || prefix || PH(M)) + return hashFinishA(_sign(e, rBytes, m)); // gen R, k, S, then 64-byte signature +}; +/** + * Signs message (NOT message hash) using private key. To use, set `hashes.sha512` first. + * Follows RFC8032 5.1.6. + */ +const sign = (msg: Hex, privKey: Hex): Bytes => { + const m = toU8(msg); + const e = getExtendedPublicKey(privKey); + const rBytes = sha512s(e.prefix, m); // r = SHA512(dom2(F, C) || prefix || PH(M)) + return hashFinishS(_sign(e, rBytes, m)); // gen R, k, S, then 64-byte signature +}; +/** Verification options. zip215: true (default) follows ZIP215 spec. false would follow RFC8032. */ +export type VerifOpts = { zip215?: boolean }; +const veriOpts: VerifOpts = { zip215: true }; +const _verify = (sig: Hex, msg: Hex, pub: Hex, opts: VerifOpts = veriOpts): Finishable => { + sig = toU8(sig, L2); // Signature hex str/Bytes, must be 64 bytes + msg = toU8(msg); // Message hex str/Bytes + pub = toU8(pub, L); + const { zip215 } = opts; // switch between zip215 and rfc8032 verif + let A: Point; + let R: Point; + let s: bigint; + let SB: Point; + let hashable = Uint8Array.of(); + try { + A = Point.fromHex(pub, zip215); // public key A decoded + R = Point.fromHex(sig.slice(0, L), zip215); // 0 <= R < 2^256: ZIP215 R can be >= P + s = bytesToNumLE(sig.slice(L, L2)); // Decode second half as an integer S + SB = G.multiply(s, false); // in the range 0 <= s < L + hashable = concatBytes(R.toBytes(), A.toBytes(), msg); // dom2(F, C) || R || A || PH(M) + } catch (error) {} + const finish = (hashed: Bytes): boolean => { + // k = SHA512(dom2(F, C) || R || A || PH(M)) + if (SB == null) return false; // false if try-catch catched an error + if (!zip215 && A.isSmallOrder()) return false; // false for SBS: Strongly Binding Signature + const k = modL_LE(hashed); // decode in little-endian, modulo L + const RkA = R.add(A.multiply(k, false)); // [8]R + [8][k]A' + return RkA.add(SB.negate()).clearCofactor().is0(); // [8][S]B = [8]R + [8][k]A' + }; + return { hashable, finish }; +}; + +/** Verifies signature on message and public key. Async. Follows RFC8032 5.1.7. */ +const verifyAsync = async (s: Hex, m: Hex, p: Hex, opts: VerifOpts = veriOpts): Promise => + hashFinishA(_verify(s, m, p, opts)); +/** Verifies signature on message and public key. To use, set `hashes.sha512` first. Follows RFC8032 5.1.7. */ +const verify = (s: Hex, m: Hex, p: Hex, opts: VerifOpts = veriOpts): boolean => + hashFinishS(_verify(s, m, p, opts)); + +/** Math, hex, byte helpers. Not in `utils` because utils share API with noble-curves. */ +const etc = { + sha512Async: async (...messages: Bytes[]): Promise => { + const s = subtle(); + const m = concatBytes(...messages); + return u8n(await s.digest('SHA-512', m.buffer)); + }, + sha512Sync: undefined as Sha512FnSync, + + bytesToHex: bytesToHex satisfies (b: Bytes) => string as (b: Bytes) => string, + hexToBytes: hexToBytes satisfies (hex: string) => Bytes as (hex: string) => Bytes, + concatBytes: concatBytes satisfies (...arrs: Bytes[]) => Uint8Array as ( + ...arrs: Bytes[] + ) => Uint8Array, + mod: M satisfies (a: bigint, b?: bigint) => bigint as (a: bigint, b?: bigint) => bigint, + invert: invert as (num: bigint, md: bigint) => bigint, + randomBytes: randomBytes as typeof randomBytes, +}; +/** ed25519-specific key utilities. */ +const utils = { + getExtendedPublicKeyAsync: getExtendedPublicKeyAsync as (priv: Hex) => Promise, + getExtendedPublicKey: getExtendedPublicKey as (priv: Hex) => ExtK, + randomPrivateKey: (): Bytes => randomBytes(L), + precompute: (w = 8, p: Point = G): Point => { + p.multiply(3n); + w; + return p; + }, // no-op +}; + +// ## Precomputes +// -------------- + +const W = 8; // W is window size +const scalarBits = 256; +const pwindows = Math.ceil(scalarBits / W) + 1; // 33 for W=8 +const pwindowSize = 2 ** (W - 1); // 128 for W=8 +const precompute = () => { + const points: Point[] = []; + let p = G; + let b = p; + for (let w = 0; w < pwindows; w++) { + b = p; + points.push(b); + for (let i = 1; i < pwindowSize; i++) { + b = b.add(p); + points.push(b); + } // i=1, bc we skip 0 + p = b.double(); + } + return points; +}; +let Gpows: Point[] | undefined = undefined; // precomputes for base point G +// const-time negate +const ctneg = (cnd: boolean, p: Point) => { + const n = p.negate(); + return cnd ? n : p; +}; + +/** + * Precomputes give 12x faster getPublicKey(), 10x sign(), 2x verify() by + * caching multiples of G (base point). Cache is stored in 32MB of RAM. + * Any time `G.multiply` is done, precomputes are used. + * Not used for getSharedSecret, which instead multiplies random pubkey `P.multiply`. + * + * w-ary non-adjacent form (wNAF) precomputation method is 10% slower than windowed method, + * but takes 2x less RAM. RAM reduction is possible by utilizing `.subtract`. + * + * !! Precomputes can be disabled by commenting-out call of the wNAF() inside Point#multiply(). + */ +const wNAF = (n: bigint): { p: Point; f: Point } => { + const comp = Gpows || (Gpows = precompute()); + let p = I; + let f = G; // f must be G, or could become I in the end + const pow_2_w = 2 ** W; // 256 for W=8 + const maxNum = pow_2_w; // 256 for W=8 + const mask = big(pow_2_w - 1); // 255 for W=8 == mask 0b11111111 + const shiftBy = big(W); // 8 for W=8 + for (let w = 0; w < pwindows; w++) { + let wbits = Number(n & mask); // extract W bits. + n >>= shiftBy; // shift number by W bits. + if (wbits > pwindowSize) { + wbits -= maxNum; + n += 1n; + } // split if bits > max: +224 => 256-32 + const off = w * pwindowSize; + const offF = off; // offsets, evaluate both + const offP = off + Math.abs(wbits) - 1; + const isEven = w % 2 !== 0; // conditions, evaluate both + const isNeg = wbits < 0; + if (wbits === 0) { + // off == I: can't add it. Adding random offF instead. + f = f.add(ctneg(isEven, comp[offF])); // bits are 0: add garbage to fake point + } else { + p = p.add(ctneg(isNeg, comp[offP])); // bits are 1: add to result point + } + } + return { p, f }; // return both real and fake points for JIT +}; + +// !! Remove the export to easily use in REPL / browser console +export { + ed25519_CURVE as CURVE, + etc, + Point as ExtendedPoint, + getPublicKey, + getPublicKeyAsync, + Point, + sign, + signAsync, + utils, + verify, + verifyAsync, +}; diff --git a/node_modules/@noble/ed25519/package.json b/node_modules/@noble/ed25519/package.json new file mode 100644 index 0000000..205408d --- /dev/null +++ b/node_modules/@noble/ed25519/package.json @@ -0,0 +1,57 @@ +{ + "name": "@noble/ed25519", + "version": "2.3.0", + "description": "Fastest 4KB JS implementation of ed25519 EDDSA signatures compliant with RFC8032, FIPS 186-5 & ZIP215", + "files": [ + "index.js", + "index.d.ts", + "index.ts" + ], + "type": "module", + "main": "index.js", + "module": "index.js", + "types": "index.d.ts", + "sideEffects": false, + "scripts": { + "build": "tsc", + "build:release": "npx jsbt esbuild test/build", + "lint": "prettier --check 'index.ts' 'test/**/*.{js,ts}'", + "format": "prettier --write 'index.ts' 'test/**/*.{js,ts}'", + "test": "node test/index.js", + "test:bun": "bun test/index.js", + "test:deno": "deno --allow-env --allow-read test/index.js", + "bench": "node test/benchmark.js" + }, + "author": "Paul Miller (https://paulmillr.com)", + "homepage": "https://paulmillr.com/noble/", + "repository": { + "type": "git", + "url": "git+https://github.com/paulmillr/noble-ed25519.git" + }, + "license": "MIT", + "devDependencies": { + "@noble/hashes": "2.0.0-beta.1", + "@paulmillr/jsbt": "0.4.1", + "@types/node": "24.0.0", + "fast-check": "4.1.1", + "micro-bmark": "0.4.2", + "micro-should": "0.5.3", + "prettier": "3.5.3", + "typescript": "5.8.3" + }, + "keywords": [ + "ed25519", + "rfc8032", + "fips186", + "signature", + "eddsa", + "noble", + "cryptography", + "elliptic curve", + "rfc7748", + "zip215", + "x25519", + "curve25519" + ], + "funding": "https://paulmillr.com/funding/" +} diff --git a/node_modules/@tsconfig/node10/LICENSE b/node_modules/@tsconfig/node10/LICENSE new file mode 100644 index 0000000..48ea661 --- /dev/null +++ b/node_modules/@tsconfig/node10/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Microsoft Corporation. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE diff --git a/node_modules/@tsconfig/node10/README.md b/node_modules/@tsconfig/node10/README.md new file mode 100644 index 0000000..046f6cd --- /dev/null +++ b/node_modules/@tsconfig/node10/README.md @@ -0,0 +1,39 @@ +### A base TSConfig for working with Node 10. + +Add the package to your `"devDependencies"`: + +```sh +npm install --save-dev @tsconfig/node10 +yarn add --dev @tsconfig/node10 +``` + +Add to your `tsconfig.json`: + +```json +"extends": "@tsconfig/node10/tsconfig.json" +``` + +--- + +The `tsconfig.json`: + +```jsonc +{ + "$schema": "https://www.schemastore.org/tsconfig", + + "compilerOptions": { + "lib": ["es2018"], + "module": "commonjs", + "target": "es2018", + "types": ["node"], + + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "moduleResolution": "node" + } +} + +``` + +You can find the [code here](https://github.com/tsconfig/bases/blob/master/bases/node10.json). diff --git a/node_modules/@tsconfig/node10/package.json b/node_modules/@tsconfig/node10/package.json new file mode 100644 index 0000000..8ce8113 --- /dev/null +++ b/node_modules/@tsconfig/node10/package.json @@ -0,0 +1,15 @@ +{ + "name": "@tsconfig/node10", + "repository": { + "type": "git", + "url": "https://github.com/tsconfig/bases.git", + "directory": "bases" + }, + "license": "MIT", + "description": "A base TSConfig for working with Node 10.", + "keywords": [ + "tsconfig", + "node10" + ], + "version": "1.0.13" +} \ No newline at end of file diff --git a/node_modules/@tsconfig/node10/tsconfig.json b/node_modules/@tsconfig/node10/tsconfig.json new file mode 100644 index 0000000..f5cd7fe --- /dev/null +++ b/node_modules/@tsconfig/node10/tsconfig.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://www.schemastore.org/tsconfig", + + "compilerOptions": { + "lib": ["es2018"], + "module": "commonjs", + "target": "es2018", + "types": ["node"], + + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "moduleResolution": "node" + } +} diff --git a/node_modules/@tsconfig/node12/LICENSE b/node_modules/@tsconfig/node12/LICENSE new file mode 100644 index 0000000..48ea661 --- /dev/null +++ b/node_modules/@tsconfig/node12/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Microsoft Corporation. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE diff --git a/node_modules/@tsconfig/node12/README.md b/node_modules/@tsconfig/node12/README.md new file mode 100644 index 0000000..6352ccd --- /dev/null +++ b/node_modules/@tsconfig/node12/README.md @@ -0,0 +1,40 @@ +### A base TSConfig for working with Node 12. + +Add the package to your `"devDependencies"`: + +```sh +npm install --save-dev @tsconfig/node12 +yarn add --dev @tsconfig/node12 +``` + +Add to your `tsconfig.json`: + +```json +"extends": "@tsconfig/node12/tsconfig.json" +``` + +--- + +The `tsconfig.json`: + +```jsonc +{ + "$schema": "https://json.schemastore.org/tsconfig", + "display": "Node 12", + + "compilerOptions": { + "lib": ["es2019", "es2020.promise", "es2020.bigint", "es2020.string"], + "module": "commonjs", + "target": "es2019", + + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "moduleResolution": "node" + } +} + +``` + +You can find the [code here](https://github.com/tsconfig/bases/blob/master/bases/node12.json). diff --git a/node_modules/@tsconfig/node12/package.json b/node_modules/@tsconfig/node12/package.json new file mode 100644 index 0000000..56aad61 --- /dev/null +++ b/node_modules/@tsconfig/node12/package.json @@ -0,0 +1 @@ +{"name":"@tsconfig/node12","repository":{"type":"git","url":"https://github.com/tsconfig/bases.git","directory":"bases"},"license":"MIT","description":"A base TSConfig for working with Node 12.","keywords":["tsconfig","node12"],"version":"1.0.11"} \ No newline at end of file diff --git a/node_modules/@tsconfig/node12/tsconfig.json b/node_modules/@tsconfig/node12/tsconfig.json new file mode 100644 index 0000000..eeaf944 --- /dev/null +++ b/node_modules/@tsconfig/node12/tsconfig.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "display": "Node 12", + + "compilerOptions": { + "lib": ["es2019", "es2020.promise", "es2020.bigint", "es2020.string"], + "module": "commonjs", + "target": "es2019", + + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "moduleResolution": "node" + } +} diff --git a/node_modules/@tsconfig/node14/LICENSE b/node_modules/@tsconfig/node14/LICENSE new file mode 100644 index 0000000..48ea661 --- /dev/null +++ b/node_modules/@tsconfig/node14/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Microsoft Corporation. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE diff --git a/node_modules/@tsconfig/node14/README.md b/node_modules/@tsconfig/node14/README.md new file mode 100644 index 0000000..dad7f02 --- /dev/null +++ b/node_modules/@tsconfig/node14/README.md @@ -0,0 +1,40 @@ +### A base TSConfig for working with Node 14. + +Add the package to your `"devDependencies"`: + +```sh +npm install --save-dev @tsconfig/node14 +yarn add --dev @tsconfig/node14 +``` + +Add to your `tsconfig.json`: + +```json +"extends": "@tsconfig/node14/tsconfig.json" +``` + +--- + +The `tsconfig.json`: + +```jsonc +{ + "$schema": "https://json.schemastore.org/tsconfig", + "display": "Node 14", + + "compilerOptions": { + "lib": ["es2020"], + "module": "commonjs", + "target": "es2020", + + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "moduleResolution": "node" + } +} + +``` + +You can find the [code here](https://github.com/tsconfig/bases/blob/master/bases/node14.json). diff --git a/node_modules/@tsconfig/node14/package.json b/node_modules/@tsconfig/node14/package.json new file mode 100644 index 0000000..742f97b --- /dev/null +++ b/node_modules/@tsconfig/node14/package.json @@ -0,0 +1 @@ +{"name":"@tsconfig/node14","repository":{"type":"git","url":"https://github.com/tsconfig/bases.git","directory":"bases"},"license":"MIT","description":"A base TSConfig for working with Node 14.","keywords":["tsconfig","node14"],"version":"1.0.3"} \ No newline at end of file diff --git a/node_modules/@tsconfig/node14/tsconfig.json b/node_modules/@tsconfig/node14/tsconfig.json new file mode 100644 index 0000000..d1d7551 --- /dev/null +++ b/node_modules/@tsconfig/node14/tsconfig.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "display": "Node 14", + + "compilerOptions": { + "lib": ["es2020"], + "module": "commonjs", + "target": "es2020", + + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "moduleResolution": "node" + } +} diff --git a/node_modules/@tsconfig/node16/LICENSE b/node_modules/@tsconfig/node16/LICENSE new file mode 100644 index 0000000..48ea661 --- /dev/null +++ b/node_modules/@tsconfig/node16/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Microsoft Corporation. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE diff --git a/node_modules/@tsconfig/node16/README.md b/node_modules/@tsconfig/node16/README.md new file mode 100644 index 0000000..2946b2f --- /dev/null +++ b/node_modules/@tsconfig/node16/README.md @@ -0,0 +1,40 @@ +### A base TSConfig for working with Node 16. + +Add the package to your `"devDependencies"`: + +```sh +npm install --save-dev @tsconfig/node16 +yarn add --dev @tsconfig/node16 +``` + +Add to your `tsconfig.json`: + +```json +"extends": "@tsconfig/node16/tsconfig.json" +``` + +--- + +The `tsconfig.json`: + +```jsonc +{ + "$schema": "https://json.schemastore.org/tsconfig", + "display": "Node 16", + + "compilerOptions": { + "lib": ["es2021"], + "module": "Node16", + "target": "es2021", + + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "moduleResolution": "node" + } +} + +``` + +You can find the [code here](https://github.com/tsconfig/bases/blob/master/bases/node16.json). diff --git a/node_modules/@tsconfig/node16/package.json b/node_modules/@tsconfig/node16/package.json new file mode 100644 index 0000000..8ccc97f --- /dev/null +++ b/node_modules/@tsconfig/node16/package.json @@ -0,0 +1,15 @@ +{ + "name": "@tsconfig/node16", + "repository": { + "type": "git", + "url": "https://github.com/tsconfig/bases.git", + "directory": "bases" + }, + "license": "MIT", + "description": "A base TSConfig for working with Node 16.", + "keywords": [ + "tsconfig", + "node16" + ], + "version": "1.0.4" +} \ No newline at end of file diff --git a/node_modules/@tsconfig/node16/tsconfig.json b/node_modules/@tsconfig/node16/tsconfig.json new file mode 100644 index 0000000..2671912 --- /dev/null +++ b/node_modules/@tsconfig/node16/tsconfig.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "display": "Node 16", + + "compilerOptions": { + "lib": ["es2021"], + "module": "Node16", + "target": "es2021", + + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "moduleResolution": "node" + } +} diff --git a/node_modules/@types/node/LICENSE b/node_modules/@types/node/LICENSE new file mode 100644 index 0000000..9e841e7 --- /dev/null +++ b/node_modules/@types/node/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/node_modules/@types/node/README.md b/node_modules/@types/node/README.md new file mode 100644 index 0000000..95e5513 --- /dev/null +++ b/node_modules/@types/node/README.md @@ -0,0 +1,15 @@ +# Installation +> `npm install --save @types/node` + +# Summary +This package contains type definitions for node (https://nodejs.org/). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node. + +### Additional Details + * Last updated: Sat, 19 Sep 2026 00:09:37 GMT + * Dependencies: [undici-types](https://npmjs.com/package/undici-types) + +# Credits +These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [David Junger](https://github.com/touffy), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Sebastian Silbermann](https://github.com/eps1lon), [Wilco Bakker](https://github.com/WilcoBakker), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), [Dmitry Semigradsky](https://github.com/Semigradsky), [René](https://github.com/Renegade334), and [Yagiz Nizipli](https://github.com/anonrig). diff --git a/node_modules/@types/node/assert.d.ts b/node_modules/@types/node/assert.d.ts new file mode 100644 index 0000000..72cc91d --- /dev/null +++ b/node_modules/@types/node/assert.d.ts @@ -0,0 +1,1077 @@ +declare module "node:assert" { + import strict = require("node:assert/strict"); + /** + * An alias of {@link assert.ok}. + * @since v0.5.9 + * @param value The input that is checked for being truthy. + */ + function assert( + value: unknown, + message?: Error | assert.AssertMessageFunction, + ): asserts value; + function assert( + value: unknown, + message: string, + ...args: unknown[] + ): asserts value; + const kOptions: unique symbol; + namespace assert { + type AssertMethodNames = + | "deepEqual" + | "deepStrictEqual" + | "doesNotMatch" + | "doesNotReject" + | "doesNotThrow" + | "equal" + | "fail" + | "ifError" + | "match" + | "notDeepEqual" + | "notDeepStrictEqual" + | "notEqual" + | "notStrictEqual" + | "ok" + | "partialDeepStrictEqual" + | "rejects" + | "strictEqual" + | "throws"; + interface AssertOptions { + /** + * If set to `'full'`, shows the full diff in assertion errors. + * @default 'simple' + */ + diff?: "simple" | "full" | undefined; + /** + * If set to `true`, non-strict methods behave like their + * corresponding strict methods. + * @default true + */ + strict?: boolean | undefined; + /** + * If set to `true`, skips prototype and constructor + * comparison in deep equality checks. + * @since v24.9.0 + * @default false + */ + skipPrototype?: boolean | undefined; + } + interface Assert extends Pick { + readonly [kOptions]: AssertOptions & { strict: false }; + } + interface AssertStrict extends Pick { + readonly [kOptions]: AssertOptions & { strict: true }; + } + /** + * The `Assert` class allows creating independent assertion instances with custom options. + * @since v24.6.0 + */ + var Assert: { + /** + * Creates a new assertion instance. The `diff` option controls the verbosity of diffs in assertion error messages. + * + * ```js + * const { Assert } = require('node:assert'); + * const assertInstance = new Assert({ diff: 'full' }); + * assertInstance.deepStrictEqual({ a: 1 }, { a: 2 }); + * // Shows a full diff in the error message. + * ``` + * + * **Important**: When destructuring assertion methods from an `Assert` instance, + * the methods lose their connection to the instance's configuration options (such + * as `diff`, `strict`, and `skipPrototype` settings). + * The destructured methods will fall back to default behavior instead. + * + * ```js + * const myAssert = new Assert({ diff: 'full' }); + * + * // This works as expected - uses 'full' diff + * myAssert.strictEqual({ a: 1 }, { b: { c: 1 } }); + * + * // This loses the 'full' diff setting - falls back to default 'simple' diff + * const { strictEqual } = myAssert; + * strictEqual({ a: 1 }, { b: { c: 1 } }); + * ``` + * + * The `skipPrototype` option affects all deep equality methods: + * + * ```js + * class Foo { + * constructor(a) { + * this.a = a; + * } + * } + * + * class Bar { + * constructor(a) { + * this.a = a; + * } + * } + * + * const foo = new Foo(1); + * const bar = new Bar(1); + * + * // Default behavior - fails due to different constructors + * const assert1 = new Assert(); + * assert1.deepStrictEqual(foo, bar); // AssertionError + * + * // Skip prototype comparison - passes if properties are equal + * const assert2 = new Assert({ skipPrototype: true }); + * assert2.deepStrictEqual(foo, bar); // OK + * ``` + * + * When destructured, methods lose access to the instance's `this` context and revert to default assertion behavior + * (diff: 'simple', non-strict mode). + * To maintain custom options when using destructured methods, avoid + * destructuring and call methods directly on the instance. + * @since v24.6.0 + */ + new( + options?: AssertOptions & { strict?: true | undefined }, + ): AssertStrict; + new( + options: AssertOptions, + ): Assert; + }; + interface AssertionErrorOptions { + /** + * If provided, the error message is set to this value. + */ + message?: string | undefined; + /** + * The `actual` property on the error instance. + */ + actual?: unknown; + /** + * The `expected` property on the error instance. + */ + expected?: unknown; + /** + * The `operator` property on the error instance. + */ + operator?: string | undefined; + /** + * If provided, the generated stack trace omits frames before this function. + */ + stackStartFn?: Function | undefined; + /** + * If set to `'full'`, shows the full diff in assertion errors. + * @default 'simple' + */ + diff?: "simple" | "full" | undefined; + } + /** + * Indicates the failure of an assertion. All errors thrown by the `node:assert` module will be instances of the `AssertionError` class. + */ + class AssertionError extends Error { + constructor(options: AssertionErrorOptions); + /** + * Set to the `actual` argument for methods such as {@link assert.strictEqual()}. + */ + actual: unknown; + /** + * Set to the `expected` argument for methods such as {@link assert.strictEqual()}. + */ + expected: unknown; + /** + * Indicates if the message was auto-generated (`true`) or not. + */ + generatedMessage: boolean; + /** + * Value is always `ERR_ASSERTION` to show that the error is an assertion error. + */ + code: "ERR_ASSERTION"; + /** + * Set to the passed in operator value. + */ + operator: string; + } + type AssertMessageFunction = (actual: unknown, expected: unknown) => string; + type AssertPredicate = RegExp | (new() => object) | ((thrown: unknown) => boolean) | object | Error; + /** + * Throws an `AssertionError` with the provided error message or a default + * error message. If the `message` parameter is an instance of an `Error` then + * it will be thrown instead of the `AssertionError`. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.fail(); + * // AssertionError [ERR_ASSERTION]: Failed + * + * assert.fail('boom'); + * // AssertionError [ERR_ASSERTION]: boom + * + * assert.fail(new TypeError('need array')); + * // TypeError: need array + * ``` + * @since v0.1.21 + * @param [message='Failed'] + */ + function fail(message?: string | Error): never; + /** + * Tests if `value` is truthy. It is equivalent to `assert.equal(!!value, true, message)`. + * + * If `value` is not truthy, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is `undefined`, a default + * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`. + * If no arguments are passed in at all `message` will be set to the string:`` 'No value argument passed to `assert.ok()`' ``. + * + * Be aware that in the `repl` the error message will be different to the one + * thrown in a file! See below for further details. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.ok(true); + * // OK + * assert.ok(1); + * // OK + * + * assert.ok(); + * // AssertionError: No value argument passed to `assert.ok()` + * + * assert.ok(false, 'it\'s false'); + * // AssertionError: it's false + * + * // In the repl: + * assert.ok(typeof 123 === 'string'); + * // AssertionError: false == true + * + * // In a file (e.g. test.js): + * assert.ok(typeof 123 === 'string'); + * // AssertionError: The expression evaluated to a falsy value: + * // + * // assert.ok(typeof 123 === 'string') + * + * assert.ok(false); + * // AssertionError: The expression evaluated to a falsy value: + * // + * // assert.ok(false) + * + * assert.ok(0); + * // AssertionError: The expression evaluated to a falsy value: + * // + * // assert.ok(0) + * ``` + * + * ```js + * import assert from 'node:assert/strict'; + * + * // Using `assert()` works the same: + * assert(2 + 2 > 5);; + * // AssertionError: The expression evaluated to a falsy value: + * // + * // assert(2 + 2 > 5) + * ``` + * @since v0.1.21 + */ + function ok( + value: unknown, + message?: Error | AssertMessageFunction, + ): asserts value; + function ok( + value: unknown, + message: string, + ...args: unknown[] + ): asserts value; + /** + * **Strict assertion mode** + * + * An alias of {@link strictEqual}. + * + * **Legacy assertion mode** + * + * > Stability: 3 - Legacy: Use {@link strictEqual} instead. + * + * Tests shallow, coercive equality between the `actual` and `expected` parameters + * using the [`==` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Equality). `NaN` is specially handled + * and treated as being identical if both sides are `NaN`. + * + * ```js + * import assert from 'node:assert'; + * + * assert.equal(1, 1); + * // OK, 1 == 1 + * assert.equal(1, '1'); + * // OK, 1 == '1' + * assert.equal(NaN, NaN); + * // OK + * + * assert.equal(1, 2); + * // AssertionError: 1 == 2 + * assert.equal({ a: { b: 1 } }, { a: { b: 1 } }); + * // AssertionError: { a: { b: 1 } } == { a: { b: 1 } } + * ``` + * + * If the values are not equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default + * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`. + * @since v0.1.21 + */ + function equal( + actual: unknown, + expected: unknown, + message?: Error | AssertMessageFunction, + ): void; + function equal( + actual: unknown, + expected: unknown, + message: string, + ...args: unknown[] + ): void; + /** + * **Strict assertion mode** + * + * An alias of {@link notStrictEqual}. + * + * **Legacy assertion mode** + * + * > Stability: 3 - Legacy: Use {@link notStrictEqual} instead. + * + * Tests shallow, coercive inequality with the [`!=` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Inequality). `NaN` is + * specially handled and treated as being identical if both sides are `NaN`. + * + * ```js + * import assert from 'node:assert'; + * + * assert.notEqual(1, 2); + * // OK + * + * assert.notEqual(1, 1); + * // AssertionError: 1 != 1 + * + * assert.notEqual(1, '1'); + * // AssertionError: 1 != '1' + * ``` + * + * If the values are equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default error + * message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`. + * @since v0.1.21 + */ + function notEqual( + actual: unknown, + expected: unknown, + message?: Error | AssertMessageFunction, + ): void; + function notEqual( + actual: unknown, + expected: unknown, + message: string, + ...args: unknown[] + ): void; + /** + * **Strict assertion mode** + * + * An alias of {@link deepStrictEqual}. + * + * **Legacy assertion mode** + * + * > Stability: 3 - Legacy: Use {@link deepStrictEqual} instead. + * + * Tests for deep equality between the `actual` and `expected` parameters. Consider + * using {@link deepStrictEqual} instead. {@link deepEqual} can have + * surprising results. + * + * _Deep equality_ means that the enumerable "own" properties of child objects + * are also recursively evaluated by the following rules. + * @since v0.1.21 + */ + function deepEqual( + actual: unknown, + expected: unknown, + message?: Error | AssertMessageFunction, + ): void; + function deepEqual( + actual: unknown, + expected: unknown, + message: string, + ...args: unknown[] + ): void; + /** + * **Strict assertion mode** + * + * An alias of {@link notDeepStrictEqual}. + * + * **Legacy assertion mode** + * + * > Stability: 3 - Legacy: Use {@link notDeepStrictEqual} instead. + * + * Tests for any deep inequality. Opposite of {@link deepEqual}. + * + * ```js + * import assert from 'node:assert'; + * + * const obj1 = { + * a: { + * b: 1, + * }, + * }; + * const obj2 = { + * a: { + * b: 2, + * }, + * }; + * const obj3 = { + * a: { + * b: 1, + * }, + * }; + * const obj4 = { __proto__: obj1 }; + * + * assert.notDeepEqual(obj1, obj1); + * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } } + * + * assert.notDeepEqual(obj1, obj2); + * // OK + * + * assert.notDeepEqual(obj1, obj3); + * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } } + * + * assert.notDeepEqual(obj1, obj4); + * // OK + * ``` + * + * If the values are deeply equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default + * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown + * instead of the `AssertionError`. + * @since v0.1.21 + */ + function notDeepEqual( + actual: unknown, + expected: unknown, + message?: Error | AssertMessageFunction, + ): void; + function notDeepEqual( + actual: unknown, + expected: unknown, + message: string, + ...args: unknown[] + ): void; + /** + * Tests strict equality between the `actual` and `expected` parameters as + * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.strictEqual(1, 2); + * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal: + * // + * // 1 !== 2 + * + * assert.strictEqual(1, 1); + * // OK + * + * assert.strictEqual('Hello foobar', 'Hello World!'); + * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal: + * // + actual - expected + * // + * // + 'Hello foobar' + * // - 'Hello World!' + * // ^ + * + * const apples = 1; + * const oranges = 2; + * assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`); + * // AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2 + * + * assert.strictEqual(1, '1', new TypeError('Inputs are not identical')); + * // TypeError: Inputs are not identical + * ``` + * + * If the values are not strictly equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a + * default error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown + * instead of the `AssertionError`. + * @since v0.1.21 + */ + function strictEqual( + actual: unknown, + expected: T, + message?: Error | AssertMessageFunction, + ): asserts actual is T; + function strictEqual( + actual: unknown, + expected: T, + message: string, + ...args: unknown[] + ): asserts actual is T; + /** + * Tests strict inequality between the `actual` and `expected` parameters as + * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.notStrictEqual(1, 2); + * // OK + * + * assert.notStrictEqual(1, 1); + * // AssertionError [ERR_ASSERTION]: Expected "actual" to be strictly unequal to: + * // + * // 1 + * + * assert.notStrictEqual(1, '1'); + * // OK + * ``` + * + * If the values are strictly equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a + * default error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown + * instead of the `AssertionError`. + * @since v0.1.21 + */ + function notStrictEqual( + actual: unknown, + expected: unknown, + message?: Error | AssertMessageFunction, + ): void; + function notStrictEqual( + actual: unknown, + expected: unknown, + message: string, + ...args: unknown[] + ): void; + /** + * Tests for deep equality between the `actual` and `expected` parameters. + * "Deep" equality means that the enumerable "own" properties of child objects + * are recursively evaluated also by the following rules. + * @since v1.2.0 + */ + function deepStrictEqual( + actual: unknown, + expected: T, + message?: Error | AssertMessageFunction, + ): asserts actual is T; + function deepStrictEqual( + actual: unknown, + expected: T, + message: string, + ...args: unknown[] + ): asserts actual is T; + /** + * Tests for deep strict inequality. Opposite of {@link deepStrictEqual}. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.notDeepStrictEqual({ a: 1 }, { a: '1' }); + * // OK + * ``` + * + * If the values are deeply and strictly equal, an `AssertionError` is thrown + * with a `message` property set equal to the value of the `message` parameter. If + * the `message` parameter is undefined, a default error message is assigned. If + * the `message` parameter is an instance of an `Error` then it will be thrown + * instead of the `AssertionError`. + * @since v1.2.0 + */ + function notDeepStrictEqual( + actual: unknown, + expected: unknown, + message?: Error | AssertMessageFunction, + ): void; + function notDeepStrictEqual( + actual: unknown, + expected: unknown, + message: string, + ...args: unknown[] + ): void; + /** + * Expects the function `fn` to throw an error. + * + * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), + * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function, + * a validation object where each property will be tested for strict deep equality, + * or an instance of error where each property will be tested for strict deep + * equality including the non-enumerable `message` and `name` properties. When + * using an object, it is also possible to use a regular expression, when + * validating against a string property. See below for examples. + * + * If specified, `message` will be appended to the message provided by the `AssertionError` if the `fn` call fails to throw or in case the error validation + * fails. + * + * Custom validation object/error instance: + * + * ```js + * import assert from 'node:assert/strict'; + * + * const err = new TypeError('Wrong value'); + * err.code = 404; + * err.foo = 'bar'; + * err.info = { + * nested: true, + * baz: 'text', + * }; + * err.reg = /abc/i; + * + * assert.throws( + * () => { + * throw err; + * }, + * { + * name: 'TypeError', + * message: 'Wrong value', + * info: { + * nested: true, + * baz: 'text', + * }, + * // Only properties on the validation object will be tested for. + * // Using nested objects requires all properties to be present. Otherwise + * // the validation is going to fail. + * }, + * ); + * + * // Using regular expressions to validate error properties: + * assert.throws( + * () => { + * throw err; + * }, + * { + * // The `name` and `message` properties are strings and using regular + * // expressions on those will match against the string. If they fail, an + * // error is thrown. + * name: /^TypeError$/, + * message: /Wrong/, + * foo: 'bar', + * info: { + * nested: true, + * // It is not possible to use regular expressions for nested properties! + * baz: 'text', + * }, + * // The `reg` property contains a regular expression and only if the + * // validation object contains an identical regular expression, it is going + * // to pass. + * reg: /abc/i, + * }, + * ); + * + * // Fails due to the different `message` and `name` properties: + * assert.throws( + * () => { + * const otherErr = new Error('Not found'); + * // Copy all enumerable properties from `err` to `otherErr`. + * for (const [key, value] of Object.entries(err)) { + * otherErr[key] = value; + * } + * throw otherErr; + * }, + * // The error's `message` and `name` properties will also be checked when using + * // an error as validation object. + * err, + * ); + * ``` + * + * Validate instanceof using constructor: + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.throws( + * () => { + * throw new Error('Wrong value'); + * }, + * Error, + * ); + * ``` + * + * Validate error message using [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions): + * + * Using a regular expression runs `.toString` on the error object, and will + * therefore also include the error name. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.throws( + * () => { + * throw new Error('Wrong value'); + * }, + * /^Error: Wrong value$/, + * ); + * ``` + * + * Custom error validation: + * + * The function must return `true` to indicate all internal validations passed. + * It will otherwise fail with an `AssertionError`. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.throws( + * () => { + * throw new Error('Wrong value'); + * }, + * (err) => { + * assert(err instanceof Error); + * assert(/value/.test(err)); + * // Avoid returning anything from validation functions besides `true`. + * // Otherwise, it's not clear what part of the validation failed. Instead, + * // throw an error about the specific validation that failed (as done in this + * // example) and add as much helpful debugging information to that error as + * // possible. + * return true; + * }, + * 'unexpected error', + * ); + * ``` + * + * `error` cannot be a string. If a string is provided as the second + * argument, then `error` is assumed to be omitted and the string will be used for `message` instead. This can lead to easy-to-miss mistakes. Using the same + * message as the thrown error message is going to result in an `ERR_AMBIGUOUS_ARGUMENT` error. Please read the example below carefully if using + * a string as the second argument gets considered: + * + * ```js + * import assert from 'node:assert/strict'; + * + * function throwingFirst() { + * throw new Error('First'); + * } + * + * function throwingSecond() { + * throw new Error('Second'); + * } + * + * function notThrowing() {} + * + * // The second argument is a string and the input function threw an Error. + * // The first case will not throw as it does not match for the error message + * // thrown by the input function! + * assert.throws(throwingFirst, 'Second'); + * // In the next example the message has no benefit over the message from the + * // error and since it is not clear if the user intended to actually match + * // against the error message, Node.js throws an `ERR_AMBIGUOUS_ARGUMENT` error. + * assert.throws(throwingSecond, 'Second'); + * // TypeError [ERR_AMBIGUOUS_ARGUMENT] + * + * // The string is only used (as message) in case the function does not throw: + * assert.throws(notThrowing, 'Second'); + * // AssertionError [ERR_ASSERTION]: Missing expected exception: Second + * + * // If it was intended to match for the error message do this instead: + * // It does not throw because the error messages match. + * assert.throws(throwingSecond, /Second$/); + * + * // If the error message does not match, an AssertionError is thrown. + * assert.throws(throwingFirst, /Second$/); + * // AssertionError [ERR_ASSERTION] + * ``` + * + * Due to the confusing error-prone notation, avoid a string as the second + * argument. + * @since v0.1.21 + */ + function throws(block: () => unknown, message?: string | Error): void; + function throws(block: () => unknown, error: AssertPredicate, message?: string | Error): void; + /** + * Asserts that the function `fn` does not throw an error. + * + * Using `assert.doesNotThrow()` is actually not useful because there + * is no benefit in catching an error and then rethrowing it. Instead, consider + * adding a comment next to the specific code path that should not throw and keep + * error messages as expressive as possible. + * + * When `assert.doesNotThrow()` is called, it will immediately call the `fn` function. + * + * If an error is thrown and it is the same type as that specified by the `error` parameter, then an `AssertionError` is thrown. If the error is of a + * different type, or if the `error` parameter is undefined, the error is + * propagated back to the caller. + * + * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), + * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation + * function. See {@link throws} for more details. + * + * The following, for instance, will throw the `TypeError` because there is no + * matching error type in the assertion: + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.doesNotThrow( + * () => { + * throw new TypeError('Wrong value'); + * }, + * SyntaxError, + * ); + * ``` + * + * However, the following will result in an `AssertionError` with the message + * 'Got unwanted exception...': + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.doesNotThrow( + * () => { + * throw new TypeError('Wrong value'); + * }, + * TypeError, + * ); + * ``` + * + * If an `AssertionError` is thrown and a value is provided for the `message` parameter, the value of `message` will be appended to the `AssertionError` message: + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.doesNotThrow( + * () => { + * throw new TypeError('Wrong value'); + * }, + * /Wrong value/, + * 'Whoops', + * ); + * // Throws: AssertionError: Got unwanted exception: Whoops + * ``` + * @since v0.1.21 + */ + function doesNotThrow(block: () => unknown, message?: string | Error): void; + function doesNotThrow(block: () => unknown, error: AssertPredicate, message?: string | Error): void; + /** + * Throws `value` if `value` is not `undefined` or `null`. This is useful when + * testing the `error` argument in callbacks. The stack trace contains all frames + * from the error passed to `ifError()` including the potential new frames for `ifError()` itself. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.ifError(null); + * // OK + * assert.ifError(0); + * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 0 + * assert.ifError('error'); + * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 'error' + * assert.ifError(new Error()); + * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Error + * + * // Create some random error frames. + * let err; + * (function errorFrame() { + * err = new Error('test error'); + * })(); + * + * (function ifErrorFrame() { + * assert.ifError(err); + * })(); + * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: test error + * // at ifErrorFrame + * // at errorFrame + * ``` + * @since v0.1.97 + */ + function ifError(value: unknown): asserts value is null | undefined; + /** + * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately + * calls the function and awaits the returned promise to complete. It will then + * check that the promise is rejected. + * + * If `asyncFn` is a function and it throws an error synchronously, `assert.rejects()` will return a rejected `Promise` with that error. If the + * function does not return a promise, `assert.rejects()` will return a rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v26.x/api/errors.html#err_invalid_return_value) + * error. In both cases the error handler is skipped. + * + * Besides the async nature to await the completion behaves identically to {@link throws}. + * + * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), + * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function, + * an object where each property will be tested for, or an instance of error where + * each property will be tested for including the non-enumerable `message` and `name` properties. + * + * If specified, `message` will be the message provided by the `{@link AssertionError}` if the `asyncFn` fails to reject. + * + * ```js + * import assert from 'node:assert/strict'; + * + * await assert.rejects( + * async () => { + * throw new TypeError('Wrong value'); + * }, + * { + * name: 'TypeError', + * message: 'Wrong value', + * }, + * ); + * ``` + * + * ```js + * import assert from 'node:assert/strict'; + * + * await assert.rejects( + * async () => { + * throw new TypeError('Wrong value'); + * }, + * (err) => { + * assert.strictEqual(err.name, 'TypeError'); + * assert.strictEqual(err.message, 'Wrong value'); + * return true; + * }, + * ); + * ``` + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.rejects( + * Promise.reject(new Error('Wrong value')), + * Error, + * ).then(() => { + * // ... + * }); + * ``` + * + * `error` cannot be a string. If a string is provided as the second argument, then `error` is assumed to + * be omitted and the string will be used for `message` instead. This can lead to easy-to-miss mistakes. Please read the + * example in {@link throws} carefully if using a string as the second argument gets considered. + * @since v10.0.0 + */ + function rejects(block: (() => Promise) | Promise, message?: string | Error): Promise; + function rejects( + block: (() => Promise) | Promise, + error: AssertPredicate, + message?: string | Error, + ): Promise; + /** + * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately + * calls the function and awaits the returned promise to complete. It will then + * check that the promise is not rejected. + * + * If `asyncFn` is a function and it throws an error synchronously, `assert.doesNotReject()` will return a rejected `Promise` with that error. If + * the function does not return a promise, `assert.doesNotReject()` will return a + * rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v26.x/api/errors.html#err_invalid_return_value) error. In both cases + * the error handler is skipped. + * + * Using `assert.doesNotReject()` is actually not useful because there is little + * benefit in catching a rejection and then rejecting it again. Instead, consider + * adding a comment next to the specific code path that should not reject and keep + * error messages as expressive as possible. + * + * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), + * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation + * function. See {@link throws} for more details. + * + * Besides the async nature to await the completion behaves identically to {@link doesNotThrow}. + * + * ```js + * import assert from 'node:assert/strict'; + * + * await assert.doesNotReject( + * async () => { + * throw new TypeError('Wrong value'); + * }, + * SyntaxError, + * ); + * ``` + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.doesNotReject(Promise.reject(new TypeError('Wrong value'))) + * .then(() => { + * // ... + * }); + * ``` + * @since v10.0.0 + */ + function doesNotReject( + block: (() => Promise) | Promise, + message?: string | Error, + ): Promise; + function doesNotReject( + block: (() => Promise) | Promise, + error: AssertPredicate, + message?: string | Error, + ): Promise; + /** + * Expects the `string` input to match the regular expression. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.match('I will fail', /pass/); + * // AssertionError [ERR_ASSERTION]: The input did not match the regular ... + * + * assert.match(123, /pass/); + * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string. + * + * assert.match('I will pass', /pass/); + * // OK + * ``` + * + * If the values do not match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal + * to the value of the `message` parameter. If the `message` parameter is + * undefined, a default error message is assigned. If the `message` parameter is an + * instance of an [Error](https://nodejs.org/docs/latest-v26.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`. + * @since v13.6.0, v12.16.0 + */ + function match( + value: string, + regExp: RegExp, + message?: Error | AssertMessageFunction, + ): void; + function match( + value: string, + regExp: RegExp, + message: string, + ...args: unknown[] + ): void; + /** + * Expects the `string` input not to match the regular expression. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.doesNotMatch('I will fail', /fail/); + * // AssertionError [ERR_ASSERTION]: The input was expected to not match the ... + * + * assert.doesNotMatch(123, /pass/); + * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string. + * + * assert.doesNotMatch('I will pass', /different/); + * // OK + * ``` + * + * If the values do match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal + * to the value of the `message` parameter. If the `message` parameter is + * undefined, a default error message is assigned. If the `message` parameter is an + * instance of an [Error](https://nodejs.org/docs/latest-v26.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`. + * @since v13.6.0, v12.16.0 + */ + function doesNotMatch( + value: string, + regExp: RegExp, + message?: Error | AssertMessageFunction, + ): void; + function doesNotMatch( + value: string, + regExp: RegExp, + message: string, + ...args: unknown[] + ): void; + /** + * Tests for partial deep equality between the `actual` and `expected` parameters. + * "Deep" equality means that the enumerable "own" properties of child objects + * are recursively evaluated also by the following rules. "Partial" equality means + * that only properties that exist on the `expected` parameter are going to be + * compared. + * + * This method always passes the same test cases as `assert.deepStrictEqual()`, + * behaving as a super set of it. + * @since v22.13.0 + */ + function partialDeepStrictEqual( + actual: unknown, + expected: unknown, + message?: Error | AssertMessageFunction, + ): void; + function partialDeepStrictEqual( + actual: unknown, + expected: unknown, + message: string, + ...args: unknown[] + ): void; + } + namespace assert { + export { strict }; + } + export = assert; +} +declare module "assert" { + import assert = require("node:assert"); + export = assert; +} diff --git a/node_modules/@types/node/assert/strict.d.ts b/node_modules/@types/node/assert/strict.d.ts new file mode 100644 index 0000000..d4ea390 --- /dev/null +++ b/node_modules/@types/node/assert/strict.d.ts @@ -0,0 +1,68 @@ +declare module "node:assert/strict" { + import { + Assert, + AssertionError, + AssertionErrorOptions, + AssertMessageFunction, + AssertOptions, + AssertPredicate, + AssertStrict, + deepStrictEqual, + doesNotMatch, + doesNotReject, + doesNotThrow, + fail, + ifError, + match, + notDeepStrictEqual, + notStrictEqual, + ok, + partialDeepStrictEqual, + rejects, + strictEqual, + throws, + } from "node:assert"; + function strict( + value: unknown, + message?: Error | AssertMessageFunction, + ): asserts value; + function strict( + value: unknown, + message: string, + ...args: unknown[] + ): asserts value; + namespace strict { + export { + Assert, + AssertionError, + AssertionErrorOptions, + AssertOptions, + AssertPredicate, + AssertStrict, + deepStrictEqual, + deepStrictEqual as deepEqual, + doesNotMatch, + doesNotReject, + doesNotThrow, + fail, + ifError, + match, + notDeepStrictEqual, + notDeepStrictEqual as notDeepEqual, + notStrictEqual, + notStrictEqual as notEqual, + ok, + partialDeepStrictEqual, + rejects, + strict, + strictEqual, + strictEqual as equal, + throws, + }; + } + export = strict; +} +declare module "assert/strict" { + import strict = require("node:assert/strict"); + export = strict; +} diff --git a/node_modules/@types/node/async_hooks.d.ts b/node_modules/@types/node/async_hooks.d.ts new file mode 100644 index 0000000..d38fcf0 --- /dev/null +++ b/node_modules/@types/node/async_hooks.d.ts @@ -0,0 +1,711 @@ +declare module "node:async_hooks" { + /** + * ```js + * import { executionAsyncId } from 'node:async_hooks'; + * import fs from 'node:fs'; + * + * console.log(executionAsyncId()); // 1 - bootstrap + * const path = '.'; + * fs.open(path, 'r', (err, fd) => { + * console.log(executionAsyncId()); // 6 - open() + * }); + * ``` + * + * The ID returned from `executionAsyncId()` is related to execution timing, not + * causality (which is covered by `triggerAsyncId()`): + * + * ```js + * const server = net.createServer((conn) => { + * // Returns the ID of the server, not of the new connection, because the + * // callback runs in the execution scope of the server's MakeCallback(). + * async_hooks.executionAsyncId(); + * + * }).listen(port, () => { + * // Returns the ID of a TickObject (process.nextTick()) because all + * // callbacks passed to .listen() are wrapped in a nextTick(). + * async_hooks.executionAsyncId(); + * }); + * ``` + * + * Promise contexts may not get precise `executionAsyncIds` by default. + * See the section on [promise execution tracking](https://nodejs.org/docs/latest-v26.x/api/async_hooks.html#promise-execution-tracking). + * @since v8.1.0 + * @return The `asyncId` of the current execution context. Useful to track when something calls. + */ + function executionAsyncId(): number; + /** + * Resource objects returned by `executionAsyncResource()` are most often internal + * Node.js handle objects with undocumented APIs. Using any functions or properties + * on the object is likely to crash your application and should be avoided. + * + * Using `executionAsyncResource()` in the top-level execution context will + * return an empty object as there is no handle or request object to use, + * but having an object representing the top-level can be helpful. + * + * ```js + * import { open } from 'node:fs'; + * import { executionAsyncId, executionAsyncResource } from 'node:async_hooks'; + * + * console.log(executionAsyncId(), executionAsyncResource()); // 1 {} + * open(new URL(import.meta.url), 'r', (err, fd) => { + * console.log(executionAsyncId(), executionAsyncResource()); // 7 FSReqWrap + * }); + * ``` + * + * This can be used to implement continuation local storage without the + * use of a tracking `Map` to store the metadata: + * + * ```js + * import { createServer } from 'node:http'; + * import { + * executionAsyncId, + * executionAsyncResource, + * createHook, + * } from 'node:async_hooks'; + * const sym = Symbol('state'); // Private symbol to avoid pollution + * + * createHook({ + * init(asyncId, type, triggerAsyncId, resource) { + * const cr = executionAsyncResource(); + * if (cr) { + * resource[sym] = cr[sym]; + * } + * }, + * }).enable(); + * + * const server = createServer((req, res) => { + * executionAsyncResource()[sym] = { state: req.url }; + * setTimeout(function() { + * res.end(JSON.stringify(executionAsyncResource()[sym])); + * }, 100); + * }).listen(3000); + * ``` + * @since v13.9.0, v12.17.0 + * @return The resource representing the current execution. Useful to store data within the resource. + */ + function executionAsyncResource(): object; + /** + * ```js + * const server = net.createServer((conn) => { + * // The resource that caused (or triggered) this callback to be called + * // was that of the new connection. Thus the return value of triggerAsyncId() + * // is the asyncId of "conn". + * async_hooks.triggerAsyncId(); + * + * }).listen(port, () => { + * // Even though all callbacks passed to .listen() are wrapped in a nextTick() + * // the callback itself exists because the call to the server's .listen() + * // was made. So the return value would be the ID of the server. + * async_hooks.triggerAsyncId(); + * }); + * ``` + * + * Promise contexts may not get valid `triggerAsyncId`s by default. See + * the section on [promise execution tracking](https://nodejs.org/docs/latest-v26.x/api/async_hooks.html#promise-execution-tracking). + * @return The ID of the resource responsible for calling the callback that is currently being executed. + */ + function triggerAsyncId(): number; + interface HookCallbacks { + /** + * The [`init` callback](https://nodejs.org/docs/latest-v26.x/api/async_hooks.html#initasyncid-type-triggerasyncid-resource). + */ + init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void; + /** + * The [`before` callback](https://nodejs.org/docs/latest-v26.x/api/async_hooks.html#beforeasyncid). + */ + before?(asyncId: number): void; + /** + * The [`after` callback](https://nodejs.org/docs/latest-v26.x/api/async_hooks.html#afterasyncid). + */ + after?(asyncId: number): void; + /** + * The [`promiseResolve` callback](https://nodejs.org/docs/latest-v26.x/api/async_hooks.html#promiseresolveasyncid). + */ + promiseResolve?(asyncId: number): void; + /** + * The [`destroy` callback](https://nodejs.org/docs/latest-v26.x/api/async_hooks.html#destroyasyncid). + */ + destroy?(asyncId: number): void; + /** + * Whether the hook should track `Promise`s. Cannot be `false` if + * `promiseResolve` is set. + * @default true + */ + trackPromises?: boolean | undefined; + } + interface AsyncHook { + /** + * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop. + */ + enable(): this; + /** + * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled. + */ + disable(): this; + } + /** + * Registers functions to be called for different lifetime events of each async + * operation. + * + * The callbacks `init()`/`before()`/`after()`/`destroy()` are called for the + * respective asynchronous event during a resource's lifetime. + * + * All callbacks are optional. For example, if only resource cleanup needs to + * be tracked, then only the `destroy` callback needs to be passed. The + * specifics of all functions that can be passed to `callbacks` is in the + * [Hook Callbacks](https://nodejs.org/docs/latest-v26.x/api/async_hooks.html#hook-callbacks) section. + * + * ```js + * import { createHook } from 'node:async_hooks'; + * + * const asyncHook = createHook({ + * init(asyncId, type, triggerAsyncId, resource) { }, + * destroy(asyncId) { }, + * }); + * ``` + * + * The callbacks will be inherited via the prototype chain: + * + * ```js + * class MyAsyncCallbacks { + * init(asyncId, type, triggerAsyncId, resource) { } + * destroy(asyncId) {} + * } + * + * class MyAddedCallbacks extends MyAsyncCallbacks { + * before(asyncId) { } + * after(asyncId) { } + * } + * + * const asyncHook = async_hooks.createHook(new MyAddedCallbacks()); + * ``` + * + * Because promises are asynchronous resources whose lifecycle is tracked + * via the async hooks mechanism, the `init()`, `before()`, `after()`, and + * `destroy()` callbacks _must not_ be async functions that return promises. + * @since v8.1.0 + * @param options The [Hook Callbacks](https://nodejs.org/docs/latest-v26.x/api/async_hooks.html#hook-callbacks) to register + * @returns Instance used for disabling and enabling hooks + */ + function createHook(options: HookCallbacks): AsyncHook; + interface AsyncResourceOptions { + /** + * The ID of the execution context that created this async event. + * @default executionAsyncId() + */ + triggerAsyncId?: number | undefined; + /** + * Disables automatic `emitDestroy` when the object is garbage collected. + * This usually does not need to be set (even if `emitDestroy` is called + * manually), unless the resource's `asyncId` is retrieved and the + * sensitive API's `emitDestroy` is called with it. + * @default false + */ + requireManualDestroy?: boolean | undefined; + } + /** + * The class `AsyncResource` is designed to be extended by the embedder's async + * resources. Using this, users can easily trigger the lifetime events of their + * own resources. + * + * The `init` hook will trigger when an `AsyncResource` is instantiated. + * + * The following is an overview of the `AsyncResource` API. + * + * ```js + * import { AsyncResource, executionAsyncId } from 'node:async_hooks'; + * + * // AsyncResource() is meant to be extended. Instantiating a + * // new AsyncResource() also triggers init. If triggerAsyncId is omitted then + * // async_hook.executionAsyncId() is used. + * const asyncResource = new AsyncResource( + * type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false }, + * ); + * + * // Run a function in the execution context of the resource. This will + * // * establish the context of the resource + * // * trigger the AsyncHooks before callbacks + * // * call the provided function `fn` with the supplied arguments + * // * trigger the AsyncHooks after callbacks + * // * restore the original execution context + * asyncResource.runInAsyncScope(fn, thisArg, ...args); + * + * // Call AsyncHooks destroy callbacks. + * asyncResource.emitDestroy(); + * + * // Return the unique ID assigned to the AsyncResource instance. + * asyncResource.asyncId(); + * + * // Return the trigger ID for the AsyncResource instance. + * asyncResource.triggerAsyncId(); + * ``` + */ + class AsyncResource { + /** + * AsyncResource() is meant to be extended. Instantiating a + * new AsyncResource() also triggers init. If triggerAsyncId is omitted then + * async_hook.executionAsyncId() is used. + * @param type The type of async event. + * @param triggerAsyncId The ID of the execution context that created + * this async event (default: `executionAsyncId()`), or an + * AsyncResourceOptions object (since v9.3.0) + */ + constructor(type: string, triggerAsyncId?: number | AsyncResourceOptions); + /** + * Binds the given function to the current execution context. + * @since v14.8.0, v12.19.0 + * @param fn The function to bind to the current execution context. + * @param type An optional name to associate with the underlying `AsyncResource`. + */ + static bind any, ThisArg>( + fn: Func, + type?: string, + thisArg?: ThisArg, + ): Func; + /** + * Binds the given function to execute to this `AsyncResource`'s scope. + * @since v14.8.0, v12.19.0 + * @param fn The function to bind to the current `AsyncResource`. + */ + bind any>(fn: Func): Func; + /** + * Call the provided function with the provided arguments in the execution context + * of the async resource. This will establish the context, trigger the AsyncHooks + * before callbacks, call the function, trigger the AsyncHooks after callbacks, and + * then restore the original execution context. + * @since v9.6.0 + * @param fn The function to call in the execution context of this async resource. + * @param thisArg The receiver to be used for the function call. + * @param args Optional arguments to pass to the function. + */ + runInAsyncScope( + fn: (this: This, ...args: any[]) => Result, + thisArg?: This, + ...args: any[] + ): Result; + /** + * Call all `destroy` hooks. This should only ever be called once. An error will + * be thrown if it is called more than once. This **must** be manually called. If + * the resource is left to be collected by the GC then the `destroy` hooks will + * never be called. + * @return A reference to `asyncResource`. + */ + emitDestroy(): this; + /** + * @return The unique `asyncId` assigned to the resource. + */ + asyncId(): number; + /** + * @return The same `triggerAsyncId` that is passed to the `AsyncResource` constructor. + */ + triggerAsyncId(): number; + } + interface AsyncLocalStorageOptions { + /** + * The default value to be used when no store is provided. + */ + defaultValue?: any; + /** + * A name for the `AsyncLocalStorage` value. + */ + name?: string | undefined; + } + /** + * This class creates stores that stay coherent through asynchronous operations. + * + * While you can create your own implementation on top of the `node:async_hooks` module, `AsyncLocalStorage` should be preferred as it is a performant and memory + * safe implementation that involves significant optimizations that are non-obvious + * to implement. + * + * The following example uses `AsyncLocalStorage` to build a simple logger + * that assigns IDs to incoming HTTP requests and includes them in messages + * logged within each request. + * + * ```js + * import http from 'node:http'; + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const asyncLocalStorage = new AsyncLocalStorage(); + * + * function logWithId(msg) { + * const id = asyncLocalStorage.getStore(); + * console.log(`${id !== undefined ? id : '-'}:`, msg); + * } + * + * let idSeq = 0; + * http.createServer((req, res) => { + * asyncLocalStorage.run(idSeq++, () => { + * logWithId('start'); + * // Imagine any chain of async operations here + * setImmediate(() => { + * logWithId('finish'); + * res.end(); + * }); + * }); + * }).listen(8080); + * + * http.get('http://localhost:8080'); + * http.get('http://localhost:8080'); + * // Prints: + * // 0: start + * // 0: finish + * // 1: start + * // 1: finish + * ``` + * + * Each instance of `AsyncLocalStorage` maintains an independent storage context. + * Multiple instances can safely exist simultaneously without risk of interfering + * with each other's data. + * @since v13.10.0, v12.17.0 + */ + class AsyncLocalStorage { + /** + * Creates a new instance of `AsyncLocalStorage`. Store is only provided within a + * `run()` call or after an `enterWith()` call. + */ + constructor(options?: AsyncLocalStorageOptions); + /** + * Binds the given function to the current execution context. + * @since v19.8.0 + * @param fn The function to bind to the current execution context. + * @return A new function that calls `fn` within the captured execution context. + */ + static bind any>(fn: Func): Func; + /** + * Captures the current execution context and returns a function that accepts a + * function as an argument. Whenever the returned function is called, it + * calls the function passed to it within the captured context. + * + * ```js + * const asyncLocalStorage = new AsyncLocalStorage(); + * const runInAsyncScope = asyncLocalStorage.run(123, () => AsyncLocalStorage.snapshot()); + * const result = asyncLocalStorage.run(321, () => runInAsyncScope(() => asyncLocalStorage.getStore())); + * console.log(result); // returns 123 + * ``` + * + * AsyncLocalStorage.snapshot() can replace the use of AsyncResource for simple + * async context tracking purposes, for example: + * + * ```js + * class Foo { + * #runInAsyncScope = AsyncLocalStorage.snapshot(); + * + * get() { return this.#runInAsyncScope(() => asyncLocalStorage.getStore()); } + * } + * + * const foo = asyncLocalStorage.run(123, () => new Foo()); + * console.log(asyncLocalStorage.run(321, () => foo.get())); // returns 123 + * ``` + * @since v19.8.0 + * @return A new function with the signature `(fn: (...args) : R, ...args) : R`. + */ + static snapshot(): (fn: (...args: TArgs) => R, ...args: TArgs) => R; + /** + * Disables the instance of `AsyncLocalStorage`. All subsequent calls + * to `asyncLocalStorage.getStore()` will return `undefined` until `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()` is called again. + * + * When calling `asyncLocalStorage.disable()`, all current contexts linked to the + * instance will be exited. + * + * Calling `asyncLocalStorage.disable()` is required before the `asyncLocalStorage` can be garbage collected. This does not apply to stores + * provided by the `asyncLocalStorage`, as those objects are garbage collected + * along with the corresponding async resources. + * + * Use this method when the `asyncLocalStorage` is not in use anymore + * in the current process. + * @since v13.10.0, v12.17.0 + * @experimental + */ + disable(): void; + /** + * Returns the current store. + * If called outside of an asynchronous context initialized by + * calling `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()`, it + * returns `undefined`. + * @since v13.10.0, v12.17.0 + */ + getStore(): T | undefined; + /** + * The name of the `AsyncLocalStorage` instance if provided. + * @since v24.0.0 + */ + readonly name: string; + /** + * Runs a function synchronously within a context and returns its + * return value. The store is not accessible outside of the callback function. + * The store is accessible to any asynchronous operations created within the + * callback. + * + * The optional `args` are passed to the callback function. + * + * If the callback function throws an error, the error is thrown by `run()` too. + * The stacktrace is not impacted by this call and the context is exited. + * + * Example: + * + * ```js + * const store = { id: 2 }; + * try { + * asyncLocalStorage.run(store, () => { + * asyncLocalStorage.getStore(); // Returns the store object + * setTimeout(() => { + * asyncLocalStorage.getStore(); // Returns the store object + * }, 200); + * throw new Error(); + * }); + * } catch (e) { + * asyncLocalStorage.getStore(); // Returns undefined + * // The error will be caught here + * } + * ``` + * @since v13.10.0, v12.17.0 + */ + run(store: T, callback: () => R): R; + run(store: T, callback: (...args: TArgs) => R, ...args: TArgs): R; + /** + * Runs a function synchronously outside of a context and returns its + * return value. The store is not accessible within the callback function or + * the asynchronous operations created within the callback. Any `getStore()` call done within the callback function will always return `undefined`. + * + * The optional `args` are passed to the callback function. + * + * If the callback function throws an error, the error is thrown by `exit()` too. + * The stacktrace is not impacted by this call and the context is re-entered. + * + * Example: + * + * ```js + * // Within a call to run + * try { + * asyncLocalStorage.getStore(); // Returns the store object or value + * asyncLocalStorage.exit(() => { + * asyncLocalStorage.getStore(); // Returns undefined + * throw new Error(); + * }); + * } catch (e) { + * asyncLocalStorage.getStore(); // Returns the same object or value + * // The error will be caught here + * } + * ``` + * @since v13.10.0, v12.17.0 + * @experimental + */ + exit(callback: (...args: TArgs) => R, ...args: TArgs): R; + /** + * Creates a disposable scope that enters the given store and automatically + * restores the previous store value when the scope is disposed. This method is + * designed to work with JavaScript's explicit resource management (`using` syntax). + * + * Example: + * + * ```js + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const asyncLocalStorage = new AsyncLocalStorage(); + * + * { + * using _ = asyncLocalStorage.withScope('my-store'); + * console.log(asyncLocalStorage.getStore()); // Prints: my-store + * } + * + * console.log(asyncLocalStorage.getStore()); // Prints: undefined + * ``` + * + * The `withScope()` method is particularly useful for managing context in + * synchronous code where you want to ensure the previous store value is restored + * when exiting a block, even if an error is thrown. + * + * ```js + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const asyncLocalStorage = new AsyncLocalStorage(); + * + * try { + * using _ = asyncLocalStorage.withScope('my-store'); + * console.log(asyncLocalStorage.getStore()); // Prints: my-store + * throw new Error('test'); + * } catch (e) { + * // Store is automatically restored even after error + * console.log(asyncLocalStorage.getStore()); // Prints: undefined + * } + * ``` + * + * **Important:** When using `withScope()` in async functions before the first + * `await`, be aware that the scope change will affect the caller's context. The + * synchronous portion of an async function (before the first `await`) runs + * immediately when called, and when it reaches the first `await`, it returns the + * promise to the caller. At that point, the scope change becomes visible in the + * caller's context and will persist in subsequent synchronous code until something + * else changes the scope value. For async operations, prefer using `run()` which + * properly isolates context across async boundaries. + * + * ```js + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const asyncLocalStorage = new AsyncLocalStorage(); + * + * async function example() { + * using _ = asyncLocalStorage.withScope('my-store'); + * console.log(asyncLocalStorage.getStore()); // Prints: my-store + * await someAsyncOperation(); // Function pauses here and returns promise + * console.log(asyncLocalStorage.getStore()); // Prints: my-store + * } + * + * // Calling without await + * example(); // Synchronous portion runs, then pauses at first await + * // After the promise is returned, the scope 'my-store' is now active in caller! + * console.log(asyncLocalStorage.getStore()); // Prints: my-store (unexpected!) + * ``` + * @since v25.9.0 + * @experimental + */ + withScope(store: T): RunScope; + /** + * Transitions into the context for the remainder of the current + * synchronous execution and then persists the store through any following + * asynchronous calls. + * + * Example: + * + * ```js + * const store = { id: 1 }; + * // Replaces previous store with the given store object + * asyncLocalStorage.enterWith(store); + * asyncLocalStorage.getStore(); // Returns the store object + * someAsyncOperation(() => { + * asyncLocalStorage.getStore(); // Returns the same object + * }); + * ``` + * + * This transition will continue for the _entire_ synchronous execution. + * This means that if, for example, the context is entered within an event + * handler subsequent event handlers will also run within that context unless + * specifically bound to another context with an `AsyncResource`. That is why `run()` should be preferred over `enterWith()` unless there are strong reasons + * to use the latter method. + * + * ```js + * const store = { id: 1 }; + * + * emitter.on('my-event', () => { + * asyncLocalStorage.enterWith(store); + * }); + * emitter.on('my-event', () => { + * asyncLocalStorage.getStore(); // Returns the same object + * }); + * + * asyncLocalStorage.getStore(); // Returns undefined + * emitter.emit('my-event'); + * asyncLocalStorage.getStore(); // Returns the same object + * ``` + * @since v13.11.0, v12.17.0 + * @experimental + */ + enterWith(store: T): void; + } + /** + * A disposable scope returned by `asyncLocalStorage.withScope()` that + * automatically restores the previous store value when disposed. This class + * implements the [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) protocol and is designed to work + * with JavaScript's `using` syntax. + * + * The scope automatically restores the previous store value when the `using` block + * exits, whether through normal completion or by throwing an error. + * @since v25.9.0 + * @experimental + */ + interface RunScope extends Disposable { + /** + * Explicitly ends the scope and restores the previous store value. This method + * is idempotent: calling it multiple times has the same effect as calling it once. + * + * The `[Symbol.dispose]()` method defers to `dispose()`. + * + * If `withScope()` is called without the `using` keyword, `dispose()` must be + * called manually to restore the previous store value. Forgetting to call + * `dispose()` will cause the store value to persist for the remainder of the + * current execution context: + * + * ```js + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const storage = new AsyncLocalStorage(); + * + * // Without using, the scope must be disposed manually + * const scope = storage.withScope('my-store'); + * // storage.getStore() === 'my-store' here + * + * scope.dispose(); // Restore previous value + * // storage.getStore() === undefined here + * ``` + * @since v25.9.0 + */ + dispose(): void; + } + /** + * @since v17.2.0, v16.14.0 + * @return A map of provider types to the corresponding numeric id. + * This map contains all the event types that might be emitted by the `async_hooks.init()` event. + */ + namespace asyncWrapProviders { + const NONE: number; + const DIRHANDLE: number; + const DNSCHANNEL: number; + const ELDHISTOGRAM: number; + const FILEHANDLE: number; + const FILEHANDLECLOSEREQ: number; + const FIXEDSIZEBLOBCOPY: number; + const FSEVENTWRAP: number; + const FSREQCALLBACK: number; + const FSREQPROMISE: number; + const GETADDRINFOREQWRAP: number; + const GETNAMEINFOREQWRAP: number; + const HEAPSNAPSHOT: number; + const HTTP2SESSION: number; + const HTTP2STREAM: number; + const HTTP2PING: number; + const HTTP2SETTINGS: number; + const HTTPINCOMINGMESSAGE: number; + const HTTPCLIENTREQUEST: number; + const JSSTREAM: number; + const JSUDPWRAP: number; + const MESSAGEPORT: number; + const PIPECONNECTWRAP: number; + const PIPESERVERWRAP: number; + const PIPEWRAP: number; + const PROCESSWRAP: number; + const PROMISE: number; + const QUERYWRAP: number; + const SHUTDOWNWRAP: number; + const SIGNALWRAP: number; + const STATWATCHER: number; + const STREAMPIPE: number; + const TCPCONNECTWRAP: number; + const TCPSERVERWRAP: number; + const TCPWRAP: number; + const TTYWRAP: number; + const UDPSENDWRAP: number; + const UDPWRAP: number; + const SIGINTWATCHDOG: number; + const WORKER: number; + const WORKERHEAPSNAPSHOT: number; + const WRITEWRAP: number; + const ZLIB: number; + const CHECKPRIMEREQUEST: number; + const PBKDF2REQUEST: number; + const KEYPAIRGENREQUEST: number; + const KEYGENREQUEST: number; + const KEYEXPORTREQUEST: number; + const CIPHERREQUEST: number; + const DERIVEBITSREQUEST: number; + const HASHREQUEST: number; + const RANDOMBYTESREQUEST: number; + const RANDOMPRIMEREQUEST: number; + const SCRYPTREQUEST: number; + const SIGNREQUEST: number; + const TLSWRAP: number; + const VERIFYREQUEST: number; + } +} +declare module "async_hooks" { + export * from "node:async_hooks"; +} diff --git a/node_modules/@types/node/buffer.buffer.d.ts b/node_modules/@types/node/buffer.buffer.d.ts new file mode 100644 index 0000000..47f1fac --- /dev/null +++ b/node_modules/@types/node/buffer.buffer.d.ts @@ -0,0 +1,471 @@ +declare module "node:buffer" { + type ImplicitArrayBuffer> = T extends + { valueOf(): infer V extends ArrayBufferLike } ? V : T; + global { + interface BufferConstructor { + // see buffer.d.ts for implementation shared with all TypeScript versions + + /** + * Allocates a new buffer containing the given {str}. + * + * @param str String to store in buffer. + * @param encoding encoding to use, optional. Default is 'utf8' + * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead. + */ + new(str: string, encoding?: BufferEncoding): Buffer; + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`). + */ + new(size: number): Buffer; + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. + */ + new(array: ArrayLike): Buffer; + /** + * Produces a Buffer backed by the same allocated memory as + * the given {ArrayBuffer}/{SharedArrayBuffer}. + * + * @param arrayBuffer The ArrayBuffer with which to share memory. + * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead. + */ + new(arrayBuffer: TArrayBuffer): Buffer; + /** + * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`. + * Array entries outside that range will be truncated to fit into it. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'. + * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]); + * ``` + * + * If `array` is an `Array`-like object (that is, one with a `length` property of + * type `number`), it is treated as if it is an array, unless it is a `Buffer` or + * a `Uint8Array`. This means all other `TypedArray` variants get treated as an + * `Array`. To create a `Buffer` from the bytes backing a `TypedArray`, use + * `Buffer.copyBytesFrom()`. + * + * A `TypeError` will be thrown if `array` is not an `Array` or another type + * appropriate for `Buffer.from()` variants. + * + * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal + * `Buffer` pool like `Buffer.allocUnsafe()` does. + * @since v5.10.0 + */ + from(array: WithImplicitCoercion>): Buffer; + /** + * This creates a view of the `ArrayBuffer` without copying the underlying + * memory. For example, when passed a reference to the `.buffer` property of a + * `TypedArray` instance, the newly created `Buffer` will share the same + * allocated memory as the `TypedArray`'s underlying `ArrayBuffer`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const arr = new Uint16Array(2); + * + * arr[0] = 5000; + * arr[1] = 4000; + * + * // Shares memory with `arr`. + * const buf = Buffer.from(arr.buffer); + * + * console.log(buf); + * // Prints: + * + * // Changing the original Uint16Array changes the Buffer also. + * arr[1] = 6000; + * + * console.log(buf); + * // Prints: + * ``` + * + * The optional `byteOffset` and `length` arguments specify a memory range within + * the `arrayBuffer` that will be shared by the `Buffer`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const ab = new ArrayBuffer(10); + * const buf = Buffer.from(ab, 0, 2); + * + * console.log(buf.length); + * // Prints: 2 + * ``` + * + * A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer` or a + * `SharedArrayBuffer` or another type appropriate for `Buffer.from()` + * variants. + * + * It is important to remember that a backing `ArrayBuffer` can cover a range + * of memory that extends beyond the bounds of a `TypedArray` view. A new + * `Buffer` created using the `buffer` property of a `TypedArray` may extend + * beyond the range of the `TypedArray`: + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const arrA = Uint8Array.from([0x63, 0x64, 0x65, 0x66]); // 4 elements + * const arrB = new Uint8Array(arrA.buffer, 1, 2); // 2 elements + * console.log(arrA.buffer === arrB.buffer); // true + * + * const buf = Buffer.from(arrB.buffer); + * console.log(buf); + * // Prints: + * ``` + * @since v5.10.0 + * @param arrayBuffer An `ArrayBuffer`, `SharedArrayBuffer`, for example the + * `.buffer` property of a `TypedArray`. + * @param byteOffset Index of first byte to expose. **Default:** `0`. + * @param length Number of bytes to expose. **Default:** + * `arrayBuffer.byteLength - byteOffset`. + */ + from>( + arrayBuffer: TArrayBuffer, + byteOffset?: number, + length?: number, + ): Buffer>; + /** + * Creates a new `Buffer` containing `string`. The `encoding` parameter identifies + * the character encoding to be used when converting `string` into bytes. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from('this is a tést'); + * const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); + * + * console.log(buf1.toString()); + * // Prints: this is a tést + * console.log(buf2.toString()); + * // Prints: this is a tést + * console.log(buf1.toString('latin1')); + * // Prints: this is a tést + * ``` + * + * A `TypeError` will be thrown if `string` is not a string or another type + * appropriate for `Buffer.from()` variants. + * + * `Buffer.from(string)` may also use the internal `Buffer` pool like + * `Buffer.allocUnsafe()` does. + * @since v5.10.0 + * @param string A string to encode. + * @param encoding The encoding of `string`. **Default:** `'utf8'`. + */ + from(string: WithImplicitCoercion, encoding?: BufferEncoding): Buffer; + from(arrayOrString: WithImplicitCoercion | string>): Buffer; + /** + * Creates a new Buffer using the passed {data} + * @param values to create a new Buffer + */ + of(...items: number[]): Buffer; + /** + * Returns a new `Buffer` which is the result of concatenating all the `Buffer` instances in the `list` together. + * + * If the list has no items, or if the `totalLength` is 0, then a new zero-length `Buffer` is returned. + * + * If `totalLength` is not provided, it is calculated from the `Buffer` instances + * in `list` by adding their lengths. + * + * If `totalLength` is provided, it must be an unsigned integer. If the + * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is + * truncated to `totalLength`. If the combined length of the `Buffer`s in `list` is + * less than `totalLength`, the remaining space is filled with zeros. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Create a single `Buffer` from a list of three `Buffer` instances. + * + * const buf1 = Buffer.alloc(10); + * const buf2 = Buffer.alloc(14); + * const buf3 = Buffer.alloc(18); + * const totalLength = buf1.length + buf2.length + buf3.length; + * + * console.log(totalLength); + * // Prints: 42 + * + * const bufA = Buffer.concat([buf1, buf2, buf3], totalLength); + * + * console.log(bufA); + * // Prints: + * console.log(bufA.length); + * // Prints: 42 + * ``` + * + * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does. + * @since v0.7.11 + * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate. + * @param totalLength Total length of the `Buffer` instances in `list` when concatenated. + */ + concat(list: readonly Uint8Array[], totalLength?: number): Buffer; + /** + * Copies the underlying memory of `view` into a new `Buffer`. + * + * ```js + * const u16 = new Uint16Array([0, 0xffff]); + * const buf = Buffer.copyBytesFrom(u16, 1, 1); + * u16[1] = 0; + * console.log(buf.length); // 2 + * console.log(buf[0]); // 255 + * console.log(buf[1]); // 255 + * ``` + * @since v19.8.0 + * @param view The {TypedArray} to copy. + * @param [offset=0] The starting offset within `view`. + * @param [length=view.length - offset] The number of elements from `view` to copy. + */ + copyBytesFrom(view: NodeJS.TypedArray, offset?: number, length?: number): Buffer; + /** + * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.alloc(5); + * + * console.log(buf); + * // Prints: + * ``` + * + * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. + * + * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.alloc(5, 'a'); + * + * console.log(buf); + * // Prints: + * ``` + * + * If both `fill` and `encoding` are specified, the allocated `Buffer` will be + * initialized by calling `buf.fill(fill, encoding)`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); + * + * console.log(buf); + * // Prints: + * ``` + * + * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance + * contents will never contain sensitive data from previous allocations, including + * data that might not have been allocated for `Buffer`s. + * + * A `TypeError` will be thrown if `size` is not a number. + * @since v5.10.0 + * @param size The desired length of the new `Buffer`. + * @param [fill=0] A value to pre-fill the new `Buffer` with. + * @param [encoding='utf8'] If `fill` is a string, this is its encoding. + */ + alloc(size: number, fill?: string | Uint8Array | number, encoding?: BufferEncoding): Buffer; + /** + * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. + * + * The underlying memory for `Buffer` instances created in this way is _not_ + * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(10); + * + * console.log(buf); + * // Prints (contents may vary): + * + * buf.fill(0); + * + * console.log(buf); + * // Prints: + * ``` + * + * A `TypeError` will be thrown if `size` is not a number. + * + * The `Buffer` module pre-allocates an internal `Buffer` instance of + * size `Buffer.poolSize` that is used as a pool for the fast allocation of new `Buffer` instances created using `Buffer.allocUnsafe()`, `Buffer.from(array)`, + * and `Buffer.concat()` only when `size` is less than `Buffer.poolSize >>> 1` (floor of `Buffer.poolSize` divided by two). + * + * Use of this pre-allocated internal memory pool is a key difference between + * calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. + * Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less + * than or equal to half `Buffer.poolSize`. The + * difference is subtle but can be important when an application requires the + * additional performance that `Buffer.allocUnsafe()` provides. + * @since v5.10.0 + * @param size The desired length of the new `Buffer`. + */ + allocUnsafe(size: number): Buffer; + /** + * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. A zero-length `Buffer` is created if + * `size` is 0. + * + * The underlying memory for `Buffer` instances created in this way is _not_ + * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize + * such `Buffer` instances with zeroes. + * + * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, + * allocations less than `Buffer.poolSize >>> 1` (32KiB when default poolSize is used) are sliced + * from a single pre-allocated `Buffer`. This allows applications to avoid the + * garbage collection overhead of creating many individually allocated `Buffer` + * instances. This approach improves both performance and memory usage by + * eliminating the need to track and clean up as many individual `ArrayBuffer` objects. + * + * However, in the case where a developer may need to retain a small chunk of + * memory from a pool for an indeterminate amount of time, it may be appropriate + * to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and + * then copying out the relevant bits. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Need to keep around a few small chunks of memory. + * const store = []; + * + * socket.on('readable', () => { + * let data; + * while (null !== (data = readable.read())) { + * // Allocate for retained data. + * const sb = Buffer.allocUnsafeSlow(10); + * + * // Copy the data into the new allocation. + * data.copy(sb, 0, 0, 10); + * + * store.push(sb); + * } + * }); + * ``` + * + * A `TypeError` will be thrown if `size` is not a number. + * @since v5.12.0 + * @param size The desired length of the new `Buffer`. + */ + allocUnsafeSlow(size: number): Buffer; + } + interface Buffer extends Uint8Array { + // see buffer.d.ts for implementation shared with all TypeScript versions + + /** + * Returns a new `Buffer` that references the same memory as the original, but + * offset and cropped by the `start` and `end` indices. + * + * This method is not compatible with the `Uint8Array.prototype.slice()`, + * which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('buffer'); + * + * const copiedBuf = Uint8Array.prototype.slice.call(buf); + * copiedBuf[0]++; + * console.log(copiedBuf.toString()); + * // Prints: cuffer + * + * console.log(buf.toString()); + * // Prints: buffer + * + * // With buf.slice(), the original buffer is modified. + * const notReallyCopiedBuf = buf.slice(); + * notReallyCopiedBuf[0]++; + * console.log(notReallyCopiedBuf.toString()); + * // Prints: cuffer + * console.log(buf.toString()); + * // Also prints: cuffer (!) + * ``` + * @since v0.3.0 + * @deprecated Use `subarray` instead. + * @param [start=0] Where the new `Buffer` will start. + * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). + */ + slice(start?: number, end?: number): Buffer; + /** + * Returns a new `Buffer` that references the same memory as the original, but + * offset and cropped by the `start` and `end` indices. + * + * Specifying `end` greater than `buf.length` will return the same result as + * that of `end` equal to `buf.length`. + * + * This method is inherited from [`TypedArray.prototype.subarray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray). + * + * Modifying the new `Buffer` slice will modify the memory in the original `Buffer`because the allocated memory of the two objects overlap. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte + * // from the original `Buffer`. + * + * const buf1 = Buffer.allocUnsafe(26); + * + * for (let i = 0; i < 26; i++) { + * // 97 is the decimal ASCII value for 'a'. + * buf1[i] = i + 97; + * } + * + * const buf2 = buf1.subarray(0, 3); + * + * console.log(buf2.toString('ascii', 0, buf2.length)); + * // Prints: abc + * + * buf1[0] = 33; + * + * console.log(buf2.toString('ascii', 0, buf2.length)); + * // Prints: !bc + * ``` + * + * Specifying negative indexes causes the slice to be generated relative to the + * end of `buf` rather than the beginning. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('buffer'); + * + * console.log(buf.subarray(-6, -1).toString()); + * // Prints: buffe + * // (Equivalent to buf.subarray(0, 5).) + * + * console.log(buf.subarray(-6, -2).toString()); + * // Prints: buff + * // (Equivalent to buf.subarray(0, 4).) + * + * console.log(buf.subarray(-5, -2).toString()); + * // Prints: uff + * // (Equivalent to buf.subarray(1, 4).) + * ``` + * @since v3.0.0 + * @param [start=0] Where the new `Buffer` will start. + * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). + */ + subarray(start?: number, end?: number): Buffer; + } + // TODO: remove globals in future version + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedBuffer = Buffer; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type AllowSharedBuffer = Buffer; + } + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type BufferView = T extends NodeJS.ArrayBufferView ? Buffer : never; +} diff --git a/node_modules/@types/node/buffer.d.ts b/node_modules/@types/node/buffer.d.ts new file mode 100644 index 0000000..59f8a45 --- /dev/null +++ b/node_modules/@types/node/buffer.d.ts @@ -0,0 +1,1800 @@ +declare module "node:buffer" { + import { ReadableStream } from "node:stream/web"; + /** + * This function returns `true` if `input` contains only valid UTF-8-encoded data, + * including the case in which `input` is empty. + * + * Throws if the `input` is a detached array buffer. + * @since v19.4.0, v18.14.0 + * @param input The input to validate. + */ + export function isUtf8(input: ArrayBuffer | NodeJS.TypedArray): boolean; + /** + * This function returns `true` if `input` contains only valid ASCII-encoded data, + * including the case in which `input` is empty. + * + * Throws if the `input` is a detached array buffer. + * @since v19.6.0, v18.15.0 + * @param input The input to validate. + */ + export function isAscii(input: ArrayBuffer | NodeJS.TypedArray): boolean; + export let INSPECT_MAX_BYTES: number; + export const kMaxLength: number; + export const kStringMaxLength: number; + export const constants: { + MAX_LENGTH: number; + MAX_STRING_LENGTH: number; + }; + export type TranscodeEncoding = + | "ascii" + | "utf8" + | "utf-8" + | "utf16le" + | "utf-16le" + | "ucs2" + | "ucs-2" + | "latin1" + | "binary"; + /** + * Re-encodes the given `Buffer` or `Uint8Array` instance from one character + * encoding to another. Returns a new `Buffer` instance. + * + * Throws if the `fromEnc` or `toEnc` specify invalid character encodings or if + * conversion from `fromEnc` to `toEnc` is not permitted. + * + * Encodings supported by `buffer.transcode()` are: `'ascii'`, `'utf8'`, `'utf16le'`, `'ucs2'`, `'latin1'`, and `'binary'`. + * + * The transcoding process will use substitution characters if a given byte + * sequence cannot be adequately represented in the target encoding. For instance: + * + * ```js + * import { Buffer, transcode } from 'node:buffer'; + * + * const newBuf = transcode(Buffer.from('€'), 'utf8', 'ascii'); + * console.log(newBuf.toString('ascii')); + * // Prints: '?' + * ``` + * + * Because the Euro (`€`) sign is not representable in US-ASCII, it is replaced + * with `?` in the transcoded `Buffer`. + * @since v7.1.0 + * @param source A `Buffer` or `Uint8Array` instance. + * @param fromEnc The current encoding. + * @param toEnc To target encoding. + */ + export function transcode( + source: Uint8Array, + fromEnc: TranscodeEncoding, + toEnc: TranscodeEncoding, + ): NonSharedBuffer; + /** + * Resolves a `'blob:nodedata:...'` an associated `Blob` object registered using + * a prior call to `URL.createObjectURL()`. + * @since v16.7.0 + * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`. + */ + export function resolveObjectURL(id: string): Blob | undefined; + export { type AllowSharedBuffer, Buffer, type NonSharedBuffer }; + export type WithImplicitCoercion = + | T + | { valueOf(): T } + | (T extends string ? { [Symbol.toPrimitive](hint: "string"): T } : never); + global { + namespace NodeJS { + export { BufferEncoding }; + } + // Buffer class + type BufferEncoding = + | "ascii" + | "utf8" + | "utf-8" + | "utf16le" + | "utf-16le" + | "ucs2" + | "ucs-2" + | "base64" + | "base64url" + | "latin1" + | "binary" + | "hex"; + /** + * Raw data is stored in instances of the Buffer class. + * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. + * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'base64url'|'binary'(deprecated)|'hex' + */ + interface BufferConstructor { + // see buffer.buffer.d.ts for implementation specific to TypeScript 5.7 and later + // see ts5.6/buffer.buffer.d.ts for implementation specific to TypeScript 5.6 and earlier + + /** + * Returns `true` if `obj` is a `Buffer`, `false` otherwise. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * Buffer.isBuffer(Buffer.alloc(10)); // true + * Buffer.isBuffer(Buffer.from('foo')); // true + * Buffer.isBuffer('a string'); // false + * Buffer.isBuffer([]); // false + * Buffer.isBuffer(new Uint8Array(1024)); // false + * ``` + * @since v0.1.101 + */ + isBuffer(obj: any): obj is Buffer; + /** + * Returns `true` if `encoding` is the name of a supported character encoding, + * or `false` otherwise. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * console.log(Buffer.isEncoding('utf8')); + * // Prints: true + * + * console.log(Buffer.isEncoding('hex')); + * // Prints: true + * + * console.log(Buffer.isEncoding('utf/8')); + * // Prints: false + * + * console.log(Buffer.isEncoding('')); + * // Prints: false + * ``` + * @since v0.9.1 + * @param encoding A character encoding name to check. + */ + isEncoding(encoding: string): encoding is BufferEncoding; + /** + * Returns the byte length of a string when encoded using `encoding`. + * This is not the same as [`String.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length), which does not account + * for the encoding that is used to convert the string into bytes. + * + * For `'base64'`, `'base64url'`, and `'hex'`, this function assumes valid input. + * For strings that contain non-base64/hex-encoded data (e.g. whitespace), the + * return value might be greater than the length of a `Buffer` created from the + * string. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const str = '\u00bd + \u00bc = \u00be'; + * + * console.log(`${str}: ${str.length} characters, ` + + * `${Buffer.byteLength(str, 'utf8')} bytes`); + * // Prints: ½ + ¼ = ¾: 9 characters, 12 bytes + * ``` + * + * When `string` is a + * `Buffer`/[`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)/[`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/- + * Reference/Global_Objects/TypedArray)/[`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)/[`SharedArrayBuffer`](https://develop- + * er.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer), the byte length as reported by `.byteLength`is returned. + * @since v0.1.90 + * @param string A value to calculate the length of. + * @param [encoding='utf8'] If `string` is a string, this is its encoding. + * @return The number of bytes contained within `string`. + */ + byteLength( + string: string | NodeJS.ArrayBufferView | ArrayBufferLike, + encoding?: BufferEncoding, + ): number; + /** + * Compares `buf1` to `buf2`, typically for the purpose of sorting arrays of `Buffer` instances. This is equivalent to calling `buf1.compare(buf2)`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from('1234'); + * const buf2 = Buffer.from('0123'); + * const arr = [buf1, buf2]; + * + * console.log(arr.sort(Buffer.compare)); + * // Prints: [ , ] + * // (This result is equal to: [buf2, buf1].) + * ``` + * @since v0.11.13 + * @return Either `-1`, `0`, or `1`, depending on the result of the comparison. See `compare` for details. + */ + compare(buf1: Uint8Array, buf2: Uint8Array): -1 | 0 | 1; + /** + * This is the size (in bytes) of pre-allocated internal `Buffer` instances used + * for pooling. This value may be modified. + * @since v0.11.3 + */ + poolSize: number; + } + interface Buffer { + // see buffer.buffer.d.ts for implementation specific to TypeScript 5.7 and later + // see ts5.6/buffer.buffer.d.ts for implementation specific to TypeScript 5.6 and earlier + + /** + * Writes `string` to `buf` at `offset` according to the character encoding in`encoding`. The `length` parameter is the number of bytes to write. If `buf` did + * not contain enough space to fit the entire string, only part of `string` will be + * written. However, partially encoded characters will not be written. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.alloc(256); + * + * const len = buf.write('\u00bd + \u00bc = \u00be', 0); + * + * console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`); + * // Prints: 12 bytes: ½ + ¼ = ¾ + * + * const buffer = Buffer.alloc(10); + * + * const length = buffer.write('abcd', 8); + * + * console.log(`${length} bytes: ${buffer.toString('utf8', 8, 10)}`); + * // Prints: 2 bytes : ab + * ``` + * @since v0.1.90 + * @param string String to write to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write `string`. + * @param [length=buf.length - offset] Maximum number of bytes to write (written bytes will not exceed `buf.length - offset`). + * @param [encoding='utf8'] The character encoding of `string`. + * @return Number of bytes written. + */ + write(string: string, encoding?: BufferEncoding): number; + write(string: string, offset: number, encoding?: BufferEncoding): number; + write(string: string, offset: number, length: number, encoding?: BufferEncoding): number; + /** + * Decodes `buf` to a string according to the specified character encoding in`encoding`. `start` and `end` may be passed to decode only a subset of `buf`. + * + * If `encoding` is `'utf8'` and a byte sequence in the input is not valid UTF-8, + * then each invalid byte is replaced with the replacement character `U+FFFD`. + * + * The maximum length of a string instance (in UTF-16 code units) is available + * as {@link constants.MAX_STRING_LENGTH}. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.allocUnsafe(26); + * + * for (let i = 0; i < 26; i++) { + * // 97 is the decimal ASCII value for 'a'. + * buf1[i] = i + 97; + * } + * + * console.log(buf1.toString('utf8')); + * // Prints: abcdefghijklmnopqrstuvwxyz + * console.log(buf1.toString('utf8', 0, 5)); + * // Prints: abcde + * + * const buf2 = Buffer.from('tést'); + * + * console.log(buf2.toString('hex')); + * // Prints: 74c3a97374 + * console.log(buf2.toString('utf8', 0, 3)); + * // Prints: té + * console.log(buf2.toString(undefined, 0, 3)); + * // Prints: té + * ``` + * @since v0.1.90 + * @param [encoding='utf8'] The character encoding to use. + * @param [start=0] The byte offset to start decoding at. + * @param [end=buf.length] The byte offset to stop decoding at (not inclusive). + */ + toString(encoding?: BufferEncoding, start?: number, end?: number): string; + /** + * Returns a JSON representation of `buf`. [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) implicitly calls + * this function when stringifying a `Buffer` instance. + * + * `Buffer.from()` accepts objects in the format returned from this method. + * In particular, `Buffer.from(buf.toJSON())` works like `Buffer.from(buf)`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5]); + * const json = JSON.stringify(buf); + * + * console.log(json); + * // Prints: {"type":"Buffer","data":[1,2,3,4,5]} + * + * const copy = JSON.parse(json, (key, value) => { + * return value && value.type === 'Buffer' ? + * Buffer.from(value) : + * value; + * }); + * + * console.log(copy); + * // Prints: + * ``` + * @since v0.9.2 + */ + toJSON(): { + type: "Buffer"; + data: number[]; + }; + /** + * Returns `true` if both `buf` and `otherBuffer` have exactly the same bytes,`false` otherwise. Equivalent to `buf.compare(otherBuffer) === 0`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from('ABC'); + * const buf2 = Buffer.from('414243', 'hex'); + * const buf3 = Buffer.from('ABCD'); + * + * console.log(buf1.equals(buf2)); + * // Prints: true + * console.log(buf1.equals(buf3)); + * // Prints: false + * ``` + * @since v0.11.13 + * @param otherBuffer A `Buffer` or {@link Uint8Array} with which to compare `buf`. + */ + equals(otherBuffer: Uint8Array): boolean; + /** + * Compares `buf` with `target` and returns a number indicating whether `buf`comes before, after, or is the same as `target` in sort order. + * Comparison is based on the actual sequence of bytes in each `Buffer`. + * + * * `0` is returned if `target` is the same as `buf` + * * `1` is returned if `target` should come _before_`buf` when sorted. + * * `-1` is returned if `target` should come _after_`buf` when sorted. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from('ABC'); + * const buf2 = Buffer.from('BCD'); + * const buf3 = Buffer.from('ABCD'); + * + * console.log(buf1.compare(buf1)); + * // Prints: 0 + * console.log(buf1.compare(buf2)); + * // Prints: -1 + * console.log(buf1.compare(buf3)); + * // Prints: -1 + * console.log(buf2.compare(buf1)); + * // Prints: 1 + * console.log(buf2.compare(buf3)); + * // Prints: 1 + * console.log([buf1, buf2, buf3].sort(Buffer.compare)); + * // Prints: [ , , ] + * // (This result is equal to: [buf1, buf3, buf2].) + * ``` + * + * The optional `targetStart`, `targetEnd`, `sourceStart`, and `sourceEnd` arguments can be used to limit the comparison to specific ranges within `target` and `buf` respectively. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8, 9]); + * const buf2 = Buffer.from([5, 6, 7, 8, 9, 1, 2, 3, 4]); + * + * console.log(buf1.compare(buf2, 5, 9, 0, 4)); + * // Prints: 0 + * console.log(buf1.compare(buf2, 0, 6, 4)); + * // Prints: -1 + * console.log(buf1.compare(buf2, 5, 6, 5)); + * // Prints: 1 + * ``` + * + * `ERR_OUT_OF_RANGE` is thrown if `targetStart < 0`, `sourceStart < 0`, `targetEnd > target.byteLength`, or `sourceEnd > source.byteLength`. + * @since v0.11.13 + * @param target A `Buffer` or {@link Uint8Array} with which to compare `buf`. + * @param [targetStart=0] The offset within `target` at which to begin comparison. + * @param [targetEnd=target.length] The offset within `target` at which to end comparison (not inclusive). + * @param [sourceStart=0] The offset within `buf` at which to begin comparison. + * @param [sourceEnd=buf.length] The offset within `buf` at which to end comparison (not inclusive). + */ + compare( + target: Uint8Array, + targetStart?: number, + targetEnd?: number, + sourceStart?: number, + sourceEnd?: number, + ): -1 | 0 | 1; + /** + * Copies data from a region of `buf` to a region in `target`, even if the `target`memory region overlaps with `buf`. + * + * [`TypedArray.prototype.set()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) performs the same operation, and is available + * for all TypedArrays, including Node.js `Buffer`s, although it takes + * different function arguments. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Create two `Buffer` instances. + * const buf1 = Buffer.allocUnsafe(26); + * const buf2 = Buffer.allocUnsafe(26).fill('!'); + * + * for (let i = 0; i < 26; i++) { + * // 97 is the decimal ASCII value for 'a'. + * buf1[i] = i + 97; + * } + * + * // Copy `buf1` bytes 16 through 19 into `buf2` starting at byte 8 of `buf2`. + * buf1.copy(buf2, 8, 16, 20); + * // This is equivalent to: + * // buf2.set(buf1.subarray(16, 20), 8); + * + * console.log(buf2.toString('ascii', 0, 25)); + * // Prints: !!!!!!!!qrst!!!!!!!!!!!!! + * ``` + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Create a `Buffer` and copy data from one region to an overlapping region + * // within the same `Buffer`. + * + * const buf = Buffer.allocUnsafe(26); + * + * for (let i = 0; i < 26; i++) { + * // 97 is the decimal ASCII value for 'a'. + * buf[i] = i + 97; + * } + * + * buf.copy(buf, 0, 4, 10); + * + * console.log(buf.toString()); + * // Prints: efghijghijklmnopqrstuvwxyz + * ``` + * @since v0.1.90 + * @param target A `Buffer` or {@link Uint8Array} to copy into. + * @param [targetStart=0] The offset within `target` at which to begin writing. + * @param [sourceStart=0] The offset within `buf` from which to begin copying. + * @param [sourceEnd=buf.length] The offset within `buf` at which to stop copying (not inclusive). + * @return The number of bytes copied. + */ + copy(target: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. + * + * `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeBigInt64BE(0x0102030405060708n, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v12.0.0, v10.20.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeBigInt64BE(value: bigint, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. + * + * `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeBigInt64LE(0x0102030405060708n, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v12.0.0, v10.20.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeBigInt64LE(value: bigint, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. + * + * This function is also available under the `writeBigUint64BE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeBigUInt64BE(0xdecafafecacefaden, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v12.0.0, v10.20.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeBigUInt64BE(value: bigint, offset?: number): number; + /** + * @alias Buffer.writeBigUInt64BE + * @since v14.10.0, v12.19.0 + */ + writeBigUint64BE(value: bigint, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeBigUInt64LE(0xdecafafecacefaden, 0); + * + * console.log(buf); + * // Prints: + * ``` + * + * This function is also available under the `writeBigUint64LE` alias. + * @since v12.0.0, v10.20.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeBigUInt64LE(value: bigint, offset?: number): number; + /** + * @alias Buffer.writeBigUInt64LE + * @since v14.10.0, v12.19.0 + */ + writeBigUint64LE(value: bigint, offset?: number): number; + /** + * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined + * when `value` is anything other than an unsigned integer. + * + * This function is also available under the `writeUintLE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(6); + * + * buf.writeUIntLE(0x1234567890ab, 0, 6); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. + * @return `offset` plus the number of bytes written. + */ + writeUIntLE(value: number, offset: number, byteLength: number): number; + /** + * @alias Buffer.writeUIntLE + * @since v14.9.0, v12.19.0 + */ + writeUintLE(value: number, offset: number, byteLength: number): number; + /** + * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined + * when `value` is anything other than an unsigned integer. + * + * This function is also available under the `writeUintBE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(6); + * + * buf.writeUIntBE(0x1234567890ab, 0, 6); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. + * @return `offset` plus the number of bytes written. + */ + writeUIntBE(value: number, offset: number, byteLength: number): number; + /** + * @alias Buffer.writeUIntBE + * @since v14.9.0, v12.19.0 + */ + writeUintBE(value: number, offset: number, byteLength: number): number; + /** + * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined + * when `value` is anything other than a signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(6); + * + * buf.writeIntLE(0x1234567890ab, 0, 6); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. + * @return `offset` plus the number of bytes written. + */ + writeIntLE(value: number, offset: number, byteLength: number): number; + /** + * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined when`value` is anything other than a + * signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(6); + * + * buf.writeIntBE(0x1234567890ab, 0, 6); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. + * @return `offset` plus the number of bytes written. + */ + writeIntBE(value: number, offset: number, byteLength: number): number; + /** + * Reads an unsigned, big-endian 64-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readBigUint64BE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]); + * + * console.log(buf.readBigUInt64BE(0)); + * // Prints: 4294967295n + * ``` + * @since v12.0.0, v10.20.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. + */ + readBigUInt64BE(offset?: number): bigint; + /** + * @alias Buffer.readBigUInt64BE + * @since v14.10.0, v12.19.0 + */ + readBigUint64BE(offset?: number): bigint; + /** + * Reads an unsigned, little-endian 64-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readBigUint64LE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]); + * + * console.log(buf.readBigUInt64LE(0)); + * // Prints: 18446744069414584320n + * ``` + * @since v12.0.0, v10.20.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. + */ + readBigUInt64LE(offset?: number): bigint; + /** + * @alias Buffer.readBigUInt64LE + * @since v14.10.0, v12.19.0 + */ + readBigUint64LE(offset?: number): bigint; + /** + * Reads a signed, big-endian 64-bit integer from `buf` at the specified `offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed + * values. + * @since v12.0.0, v10.20.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. + */ + readBigInt64BE(offset?: number): bigint; + /** + * Reads a signed, little-endian 64-bit integer from `buf` at the specified`offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed + * values. + * @since v12.0.0, v10.20.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. + */ + readBigInt64LE(offset?: number): bigint; + /** + * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as an unsigned, little-endian integer supporting + * up to 48 bits of accuracy. + * + * This function is also available under the `readUintLE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); + * + * console.log(buf.readUIntLE(0, 6).toString(16)); + * // Prints: ab9078563412 + * ``` + * @since v0.11.15 + * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. + */ + readUIntLE(offset: number, byteLength: number): number; + /** + * @alias Buffer.readUIntLE + * @since v14.9.0, v12.19.0 + */ + readUintLE(offset: number, byteLength: number): number; + /** + * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as an unsigned big-endian integer supporting + * up to 48 bits of accuracy. + * + * This function is also available under the `readUintBE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); + * + * console.log(buf.readUIntBE(0, 6).toString(16)); + * // Prints: 1234567890ab + * console.log(buf.readUIntBE(1, 6).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.11.15 + * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. + */ + readUIntBE(offset: number, byteLength: number): number; + /** + * @alias Buffer.readUIntBE + * @since v14.9.0, v12.19.0 + */ + readUintBE(offset: number, byteLength: number): number; + /** + * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as a little-endian, two's complement signed value + * supporting up to 48 bits of accuracy. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); + * + * console.log(buf.readIntLE(0, 6).toString(16)); + * // Prints: -546f87a9cbee + * ``` + * @since v0.11.15 + * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. + */ + readIntLE(offset: number, byteLength: number): number; + /** + * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as a big-endian, two's complement signed value + * supporting up to 48 bits of accuracy. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); + * + * console.log(buf.readIntBE(0, 6).toString(16)); + * // Prints: 1234567890ab + * console.log(buf.readIntBE(1, 6).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * console.log(buf.readIntBE(1, 0).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.11.15 + * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. + */ + readIntBE(offset: number, byteLength: number): number; + /** + * Reads an unsigned 8-bit integer from `buf` at the specified `offset`. + * + * This function is also available under the `readUint8` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([1, -2]); + * + * console.log(buf.readUInt8(0)); + * // Prints: 1 + * console.log(buf.readUInt8(1)); + * // Prints: 254 + * console.log(buf.readUInt8(2)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`. + */ + readUInt8(offset?: number): number; + /** + * @alias Buffer.readUInt8 + * @since v14.9.0, v12.19.0 + */ + readUint8(offset?: number): number; + /** + * Reads an unsigned, little-endian 16-bit integer from `buf` at the specified `offset`. + * + * This function is also available under the `readUint16LE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56]); + * + * console.log(buf.readUInt16LE(0).toString(16)); + * // Prints: 3412 + * console.log(buf.readUInt16LE(1).toString(16)); + * // Prints: 5634 + * console.log(buf.readUInt16LE(2).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. + */ + readUInt16LE(offset?: number): number; + /** + * @alias Buffer.readUInt16LE + * @since v14.9.0, v12.19.0 + */ + readUint16LE(offset?: number): number; + /** + * Reads an unsigned, big-endian 16-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readUint16BE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56]); + * + * console.log(buf.readUInt16BE(0).toString(16)); + * // Prints: 1234 + * console.log(buf.readUInt16BE(1).toString(16)); + * // Prints: 3456 + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. + */ + readUInt16BE(offset?: number): number; + /** + * @alias Buffer.readUInt16BE + * @since v14.9.0, v12.19.0 + */ + readUint16BE(offset?: number): number; + /** + * Reads an unsigned, little-endian 32-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readUint32LE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]); + * + * console.log(buf.readUInt32LE(0).toString(16)); + * // Prints: 78563412 + * console.log(buf.readUInt32LE(1).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readUInt32LE(offset?: number): number; + /** + * @alias Buffer.readUInt32LE + * @since v14.9.0, v12.19.0 + */ + readUint32LE(offset?: number): number; + /** + * Reads an unsigned, big-endian 32-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readUint32BE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]); + * + * console.log(buf.readUInt32BE(0).toString(16)); + * // Prints: 12345678 + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readUInt32BE(offset?: number): number; + /** + * @alias Buffer.readUInt32BE + * @since v14.9.0, v12.19.0 + */ + readUint32BE(offset?: number): number; + /** + * Reads a signed 8-bit integer from `buf` at the specified `offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([-1, 5]); + * + * console.log(buf.readInt8(0)); + * // Prints: -1 + * console.log(buf.readInt8(1)); + * // Prints: 5 + * console.log(buf.readInt8(2)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`. + */ + readInt8(offset?: number): number; + /** + * Reads a signed, little-endian 16-bit integer from `buf` at the specified`offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0, 5]); + * + * console.log(buf.readInt16LE(0)); + * // Prints: 1280 + * console.log(buf.readInt16LE(1)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. + */ + readInt16LE(offset?: number): number; + /** + * Reads a signed, big-endian 16-bit integer from `buf` at the specified `offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0, 5]); + * + * console.log(buf.readInt16BE(0)); + * // Prints: 5 + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. + */ + readInt16BE(offset?: number): number; + /** + * Reads a signed, little-endian 32-bit integer from `buf` at the specified`offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0, 0, 0, 5]); + * + * console.log(buf.readInt32LE(0)); + * // Prints: 83886080 + * console.log(buf.readInt32LE(1)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readInt32LE(offset?: number): number; + /** + * Reads a signed, big-endian 32-bit integer from `buf` at the specified `offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0, 0, 0, 5]); + * + * console.log(buf.readInt32BE(0)); + * // Prints: 5 + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readInt32BE(offset?: number): number; + /** + * Reads a 32-bit, little-endian float from `buf` at the specified `offset`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([1, 2, 3, 4]); + * + * console.log(buf.readFloatLE(0)); + * // Prints: 1.539989614439558e-36 + * console.log(buf.readFloatLE(1)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.11.15 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readFloatLE(offset?: number): number; + /** + * Reads a 32-bit, big-endian float from `buf` at the specified `offset`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([1, 2, 3, 4]); + * + * console.log(buf.readFloatBE(0)); + * // Prints: 2.387939260590663e-38 + * ``` + * @since v0.11.15 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readFloatBE(offset?: number): number; + /** + * Reads a 64-bit, little-endian double from `buf` at the specified `offset`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]); + * + * console.log(buf.readDoubleLE(0)); + * // Prints: 5.447603722011605e-270 + * console.log(buf.readDoubleLE(1)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.11.15 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`. + */ + readDoubleLE(offset?: number): number; + /** + * Reads a 64-bit, big-endian double from `buf` at the specified `offset`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]); + * + * console.log(buf.readDoubleBE(0)); + * // Prints: 8.20788039913184e-304 + * ``` + * @since v0.11.15 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`. + */ + readDoubleBE(offset?: number): number; + reverse(): this; + /** + * Interprets `buf` as an array of unsigned 16-bit integers and swaps the + * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 2. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); + * + * console.log(buf1); + * // Prints: + * + * buf1.swap16(); + * + * console.log(buf1); + * // Prints: + * + * const buf2 = Buffer.from([0x1, 0x2, 0x3]); + * + * buf2.swap16(); + * // Throws ERR_INVALID_BUFFER_SIZE. + * ``` + * + * One convenient use of `buf.swap16()` is to perform a fast in-place conversion + * between UTF-16 little-endian and UTF-16 big-endian: + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('This is little-endian UTF-16', 'utf16le'); + * buf.swap16(); // Convert to big-endian UTF-16 text. + * ``` + * @since v5.10.0 + * @return A reference to `buf`. + */ + swap16(): this; + /** + * Interprets `buf` as an array of unsigned 32-bit integers and swaps the + * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 4. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); + * + * console.log(buf1); + * // Prints: + * + * buf1.swap32(); + * + * console.log(buf1); + * // Prints: + * + * const buf2 = Buffer.from([0x1, 0x2, 0x3]); + * + * buf2.swap32(); + * // Throws ERR_INVALID_BUFFER_SIZE. + * ``` + * @since v5.10.0 + * @return A reference to `buf`. + */ + swap32(): this; + /** + * Interprets `buf` as an array of 64-bit numbers and swaps byte order _in-place_. + * Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 8. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); + * + * console.log(buf1); + * // Prints: + * + * buf1.swap64(); + * + * console.log(buf1); + * // Prints: + * + * const buf2 = Buffer.from([0x1, 0x2, 0x3]); + * + * buf2.swap64(); + * // Throws ERR_INVALID_BUFFER_SIZE. + * ``` + * @since v6.3.0 + * @return A reference to `buf`. + */ + swap64(): this; + /** + * Writes `value` to `buf` at the specified `offset`. `value` must be a + * valid unsigned 8-bit integer. Behavior is undefined when `value` is anything + * other than an unsigned 8-bit integer. + * + * This function is also available under the `writeUint8` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt8(0x3, 0); + * buf.writeUInt8(0x4, 1); + * buf.writeUInt8(0x23, 2); + * buf.writeUInt8(0x42, 3); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`. + * @return `offset` plus the number of bytes written. + */ + writeUInt8(value: number, offset?: number): number; + /** + * @alias Buffer.writeUInt8 + * @since v14.9.0, v12.19.0 + */ + writeUint8(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid unsigned 16-bit integer. Behavior is undefined when `value` is + * anything other than an unsigned 16-bit integer. + * + * This function is also available under the `writeUint16LE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt16LE(0xdead, 0); + * buf.writeUInt16LE(0xbeef, 2); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. + * @return `offset` plus the number of bytes written. + */ + writeUInt16LE(value: number, offset?: number): number; + /** + * @alias Buffer.writeUInt16LE + * @since v14.9.0, v12.19.0 + */ + writeUint16LE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid unsigned 16-bit integer. Behavior is undefined when `value`is anything other than an + * unsigned 16-bit integer. + * + * This function is also available under the `writeUint16BE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt16BE(0xdead, 0); + * buf.writeUInt16BE(0xbeef, 2); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. + * @return `offset` plus the number of bytes written. + */ + writeUInt16BE(value: number, offset?: number): number; + /** + * @alias Buffer.writeUInt16BE + * @since v14.9.0, v12.19.0 + */ + writeUint16BE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid unsigned 32-bit integer. Behavior is undefined when `value` is + * anything other than an unsigned 32-bit integer. + * + * This function is also available under the `writeUint32LE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt32LE(0xfeedface, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeUInt32LE(value: number, offset?: number): number; + /** + * @alias Buffer.writeUInt32LE + * @since v14.9.0, v12.19.0 + */ + writeUint32LE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid unsigned 32-bit integer. Behavior is undefined when `value`is anything other than an + * unsigned 32-bit integer. + * + * This function is also available under the `writeUint32BE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt32BE(0xfeedface, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeUInt32BE(value: number, offset?: number): number; + /** + * @alias Buffer.writeUInt32BE + * @since v14.9.0, v12.19.0 + */ + writeUint32BE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset`. `value` must be a valid + * signed 8-bit integer. Behavior is undefined when `value` is anything other than + * a signed 8-bit integer. + * + * `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(2); + * + * buf.writeInt8(2, 0); + * buf.writeInt8(-2, 1); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`. + * @return `offset` plus the number of bytes written. + */ + writeInt8(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid signed 16-bit integer. Behavior is undefined when `value` is + * anything other than a signed 16-bit integer. + * + * The `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(2); + * + * buf.writeInt16LE(0x0304, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. + * @return `offset` plus the number of bytes written. + */ + writeInt16LE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid signed 16-bit integer. Behavior is undefined when `value` is + * anything other than a signed 16-bit integer. + * + * The `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(2); + * + * buf.writeInt16BE(0x0102, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. + * @return `offset` plus the number of bytes written. + */ + writeInt16BE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid signed 32-bit integer. Behavior is undefined when `value` is + * anything other than a signed 32-bit integer. + * + * The `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeInt32LE(0x05060708, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeInt32LE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid signed 32-bit integer. Behavior is undefined when `value` is + * anything other than a signed 32-bit integer. + * + * The `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeInt32BE(0x01020304, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeInt32BE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. Behavior is + * undefined when `value` is anything other than a JavaScript number. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeFloatLE(0xcafebabe, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeFloatLE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. Behavior is + * undefined when `value` is anything other than a JavaScript number. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeFloatBE(0xcafebabe, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeFloatBE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a JavaScript number. Behavior is undefined when `value` is anything + * other than a JavaScript number. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeDoubleLE(123.456, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeDoubleLE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a JavaScript number. Behavior is undefined when `value` is anything + * other than a JavaScript number. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeDoubleBE(123.456, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeDoubleBE(value: number, offset?: number): number; + /** + * Fills `buf` with the specified `value`. If the `offset` and `end` are not given, + * the entire `buf` will be filled: + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Fill a `Buffer` with the ASCII character 'h'. + * + * const b = Buffer.allocUnsafe(50).fill('h'); + * + * console.log(b.toString()); + * // Prints: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh + * + * // Fill a buffer with empty string + * const c = Buffer.allocUnsafe(5).fill(''); + * + * console.log(c.fill('')); + * // Prints: + * ``` + * + * `value` is coerced to a `uint32` value if it is not a string, `Buffer`, or + * integer. If the resulting integer is greater than `255` (decimal), `buf` will be + * filled with `value & 255`. + * + * If the final write of a `fill()` operation falls on a multi-byte character, + * then only the bytes of that character that fit into `buf` are written: + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Fill a `Buffer` with character that takes up two bytes in UTF-8. + * + * console.log(Buffer.allocUnsafe(5).fill('\u0222')); + * // Prints: + * ``` + * + * If `value` contains invalid characters, it is truncated; if no valid + * fill data remains, an exception is thrown: + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(5); + * + * console.log(buf.fill('a')); + * // Prints: + * console.log(buf.fill('aazz', 'hex')); + * // Prints: + * console.log(buf.fill('zz', 'hex')); + * // Throws an exception. + * ``` + * @since v0.5.0 + * @param value The value with which to fill `buf`. Empty value (string, Uint8Array, Buffer) is coerced to `0`. + * @param [offset=0] Number of bytes to skip before starting to fill `buf`. + * @param [end=buf.length] Where to stop filling `buf` (not inclusive). + * @param [encoding='utf8'] The encoding for `value` if `value` is a string. + * @return A reference to `buf`. + */ + fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this; + fill(value: string | Uint8Array | number, offset: number, encoding: BufferEncoding): this; + fill(value: string | Uint8Array | number, encoding: BufferEncoding): this; + /** + * If `value` is: + * + * * a string, `value` is interpreted according to the character encoding in + * `encoding`. + * * a `Buffer` or `Uint8Array`, `value` will be used in its entirety. + * To compare a partial `Buffer`, use `buf.subarray`. + * * a number, `value` will be interpreted as an unsigned 8-bit integer + * value between `0` and `255`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('this is a buffer'); + * + * console.log(buf.indexOf('this')); + * // Prints: 0 + * console.log(buf.indexOf('is')); + * // Prints: 2 + * console.log(buf.indexOf(Buffer.from('a buffer'))); + * // Prints: 8 + * console.log(buf.indexOf(97)); + * // Prints: 8 (97 is the decimal ASCII value for 'a') + * console.log(buf.indexOf(Buffer.from('a buffer example'))); + * // Prints: -1 + * console.log(buf.indexOf(Buffer.from('a buffer example').slice(0, 8))); + * // Prints: 8 + * + * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le'); + * + * console.log(utf16Buffer.indexOf('\u03a3', 0, 'utf16le')); + * // Prints: 4 + * console.log(utf16Buffer.indexOf('\u03a3', -4, 'utf16le')); + * // Prints: 6 + * ``` + * + * If `value` is not a string, number, or `Buffer`, this method will throw a + * `TypeError`. If `value` is a number, it will be coerced to a valid byte value, + * an integer between 0 and 255. + * + * If `byteOffset` is not a number, it will be coerced to a number. If the result + * of coercion is `NaN` or `0`, then the entire buffer will be searched. This + * behavior matches `String.prototype.indexOf()`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const b = Buffer.from('abcdef'); + * + * // Passing a value that's a number, but not a valid byte. + * // Prints: 2, equivalent to searching for 99 or 'c'. + * console.log(b.indexOf(99.9)); + * console.log(b.indexOf(256 + 99)); + * + * // Passing a byteOffset that coerces to NaN or 0. + * // Prints: 1, searching the whole buffer. + * console.log(b.indexOf('b', undefined)); + * console.log(b.indexOf('b', {})); + * console.log(b.indexOf('b', null)); + * console.log(b.indexOf('b', [])); + * ``` + * + * If `value` is an empty string or empty `Buffer` and `byteOffset` is less + * than `buf.length`, `byteOffset` will be returned. If `value` is empty and + * `byteOffset` is at least `buf.length`, `buf.length` will be returned. + * @since v1.5.0 + * @param value What to search for. + * @param start Where to begin searching in `buf`. If negative, then + * offset is calculated from the end of `buf`. **Default:** `0`. + * @param end Where to stop searching in `buf` (exclusive). **Default:** + * `buf.length`. + * @param encoding If `value` is a string, this is the encoding used to + * determine the binary representation of the string that will be searched for in + * `buf`. **Default:** `'utf8'`. + * @returns The index of the first occurrence of `value` in `buf`, or + * `-1` if `buf` does not contain `value`. + */ + indexOf( + value: string | number | Uint8Array, + start?: number, + end?: number, + encoding?: BufferEncoding, + ): number; + indexOf(value: string | number | Uint8Array, start: number, encoding: BufferEncoding): number; + indexOf(value: string | number | Uint8Array, encoding: BufferEncoding): number; + /** + * Identical to `buf.indexOf()`, except the last occurrence of `value` is found + * rather than the first occurrence. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('this buffer is a buffer'); + * + * console.log(buf.lastIndexOf('this')); + * // Prints: 0 + * console.log(buf.lastIndexOf('buffer')); + * // Prints: 17 + * console.log(buf.lastIndexOf(Buffer.from('buffer'))); + * // Prints: 17 + * console.log(buf.lastIndexOf(97)); + * // Prints: 15 (97 is the decimal ASCII value for 'a') + * console.log(buf.lastIndexOf(Buffer.from('yolo'))); + * // Prints: -1 + * console.log(buf.lastIndexOf('buffer', 5)); + * // Prints: 5 + * console.log(buf.lastIndexOf('buffer', 4)); + * // Prints: -1 + * + * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le'); + * + * console.log(utf16Buffer.lastIndexOf('\u03a3', undefined, 'utf16le')); + * // Prints: 6 + * console.log(utf16Buffer.lastIndexOf('\u03a3', -5, 'utf16le')); + * // Prints: 4 + * ``` + * + * If `value` is not a string, number, or `Buffer`, this method will throw a + * `TypeError`. If `value` is a number, it will be coerced to a valid byte value, + * an integer between 0 and 255. + * + * If `byteOffset` is not a number, it will be coerced to a number. Any arguments + * that coerce to `NaN`, like `{}` or `undefined`, will search the whole buffer. + * This behavior matches `String.prototype.lastIndexOf()`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const b = Buffer.from('abcdef'); + * + * // Passing a value that's a number, but not a valid byte. + * // Prints: 2, equivalent to searching for 99 or 'c'. + * console.log(b.lastIndexOf(99.9)); + * console.log(b.lastIndexOf(256 + 99)); + * + * // Passing a byteOffset that coerces to NaN. + * // Prints: 1, searching the whole buffer. + * console.log(b.lastIndexOf('b', undefined)); + * console.log(b.lastIndexOf('b', {})); + * + * // Passing a byteOffset that coerces to 0. + * // Prints: -1, equivalent to passing 0. + * console.log(b.lastIndexOf('b', null)); + * console.log(b.lastIndexOf('b', [])); + * ``` + * + * If `value` is an empty string or empty `Buffer`, `byteOffset` will be returned. + * @since v6.0.0 + * @param value What to search for. + * @param start Where to begin searching in `buf`. If negative, then + * offset is calculated from the end of `buf`. **Default:** + * `buf.length - 1`. + * @param end Where to stop searching in `buf` (exclusive). **Default:** + * `buf.length`. + * @param encoding If `value` is a string, this is the encoding used to + * determine the binary representation of the string that will be searched for in + * `buf`. **Default:** `'utf8'`. + * @returns The index of the last occurrence of `value` in `buf`, or + * `-1` if `buf` does not contain `value`. + */ + lastIndexOf( + value: string | number | Uint8Array, + start?: number, + end?: number, + encoding?: BufferEncoding, + ): number; + lastIndexOf(value: string | number | Uint8Array, start: number, encoding: BufferEncoding): number; + lastIndexOf(value: string | number | Uint8Array, encoding: BufferEncoding): number; + /** + * Equivalent to `buf.indexOf() !== -1`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('this is a buffer'); + * + * console.log(buf.includes('this')); + * // Prints: true + * console.log(buf.includes('is')); + * // Prints: true + * console.log(buf.includes(Buffer.from('a buffer'))); + * // Prints: true + * console.log(buf.includes(97)); + * // Prints: true (97 is the decimal ASCII value for 'a') + * console.log(buf.includes(Buffer.from('a buffer example'))); + * // Prints: false + * console.log(buf.includes(Buffer.from('a buffer example').slice(0, 8))); + * // Prints: true + * console.log(buf.includes('this', 4)); + * // Prints: false + * ``` + * @since v5.3.0 + * @param value What to search for. + * @param start Where to begin searching in `buf`. If negative, then + * offset is calculated from the end of `buf`. **Default:** `0`. + * @param end Where to stop searching in `buf` (exclusive). **Default:** + * `buf.length`. + * @param encoding If `value` is a string, this is its encoding. + * **Default:** `'utf8'`. + * @returns `true` if `value` was found in `buf`, `false` otherwise. + */ + includes( + value: string | number | Uint8Array, + start?: number, + end?: number, + encoding?: BufferEncoding, + ): boolean; + includes(value: string | number | Uint8Array, start: number, encoding: BufferEncoding): boolean; + includes(value: string | number | Uint8Array, encoding: BufferEncoding): boolean; + } + var Buffer: BufferConstructor; + } + // #region web types + export type BlobPart = NodeJS.BufferSource | Blob | string; + export interface BlobPropertyBag { + endings?: "native" | "transparent"; + type?: string; + } + export interface FilePropertyBag extends BlobPropertyBag { + lastModified?: number; + } + export interface Blob { + readonly size: number; + readonly type: string; + arrayBuffer(): Promise; + bytes(): Promise; + slice(start?: number, end?: number, contentType?: string): Blob; + stream(): ReadableStream; + text(): Promise; + textStream(): ReadableStream; + } + export var Blob: { + prototype: Blob; + new(blobParts?: BlobPart[], options?: BlobPropertyBag): Blob; + }; + export interface File extends Blob { + readonly lastModified: number; + readonly name: string; + readonly webkitRelativePath: string; + } + export var File: { + prototype: File; + new(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File; + }; + export import atob = globalThis.atob; + export import btoa = globalThis.btoa; + // #endregion +} +declare module "buffer" { + export * from "node:buffer"; +} diff --git a/node_modules/@types/node/child_process.d.ts b/node_modules/@types/node/child_process.d.ts new file mode 100644 index 0000000..f89e415 --- /dev/null +++ b/node_modules/@types/node/child_process.d.ts @@ -0,0 +1,1361 @@ +declare module "node:child_process" { + import { NonSharedBuffer } from "node:buffer"; + import * as dgram from "node:dgram"; + import { Abortable, EventEmitter, InternalEventEmitter } from "node:events"; + import * as net from "node:net"; + import { Readable, Stream, Writable } from "node:stream"; + import { URL } from "node:url"; + type Serializable = string | object | number | boolean | bigint; + type SendHandle = net.Socket | net.Server | dgram.Socket | undefined; + interface ChildProcessEventMap { + "close": [code: number | null, signal: NodeJS.Signals | null]; + "disconnect": []; + "error": [err: Error]; + "exit": [code: number | null, signal: NodeJS.Signals | null]; + "message": [message: Serializable, sendHandle: SendHandle]; + "spawn": []; + } + /** + * Instances of the `ChildProcess` represent spawned child processes. + * + * Instances of `ChildProcess` are not intended to be created directly. Rather, + * use the {@link spawn}, {@link exec},{@link execFile}, or {@link fork} methods to create + * instances of `ChildProcess`. + * @since v2.2.0 + */ + class ChildProcess implements EventEmitter { + /** + * A `Writable Stream` that represents the child process's `stdin`. + * + * If a child process waits to read all of its input, the child will not continue + * until this stream has been closed via `end()`. + * + * If the child was spawned with `stdio[0]` set to anything other than `'pipe'`, + * then this will be `null`. + * + * `subprocess.stdin` is an alias for `subprocess.stdio[0]`. Both properties will + * refer to the same value. + * + * The `subprocess.stdin` property can be `null` or `undefined` if the child process could not be successfully spawned. + * @since v0.1.90 + */ + stdin: Writable | null; + /** + * A `Readable Stream` that represents the child process's `stdout`. + * + * If the child was spawned with `stdio[1]` set to anything other than `'pipe'`, + * then this will be `null`. + * + * `subprocess.stdout` is an alias for `subprocess.stdio[1]`. Both properties will + * refer to the same value. + * + * ```js + * import { spawn } from 'node:child_process'; + * + * const subprocess = spawn('ls'); + * + * subprocess.stdout.on('data', (data) => { + * console.log(`Received chunk ${data}`); + * }); + * ``` + * + * The `subprocess.stdout` property can be `null` or `undefined` if the child process could not be successfully spawned. + * @since v0.1.90 + */ + stdout: Readable | null; + /** + * A `Readable Stream` that represents the child process's `stderr`. + * + * If the child was spawned with `stdio[2]` set to anything other than `'pipe'`, + * then this will be `null`. + * + * `subprocess.stderr` is an alias for `subprocess.stdio[2]`. Both properties will + * refer to the same value. + * + * The `subprocess.stderr` property can be `null` or `undefined` if the child process could not be successfully spawned. + * @since v0.1.90 + */ + stderr: Readable | null; + /** + * The `subprocess.channel` property is a reference to the child's IPC channel. If + * no IPC channel exists, this property is `undefined`. + * @since v7.1.0 + */ + readonly channel?: Control | null; + /** + * A sparse array of pipes to the child process, corresponding with positions in + * the `stdio` option passed to {@link spawn} that have been set + * to the value `'pipe'`. `subprocess.stdio[0]`, `subprocess.stdio[1]`, and `subprocess.stdio[2]` are also available as `subprocess.stdin`, `subprocess.stdout`, and `subprocess.stderr`, + * respectively. + * + * In the following example, only the child's fd `1` (stdout) is configured as a + * pipe, so only the parent's `subprocess.stdio[1]` is a stream, all other values + * in the array are `null`. + * + * ```js + * import assert from 'node:assert'; + * import fs from 'node:fs'; + * import child_process from 'node:child_process'; + * + * const subprocess = child_process.spawn('ls', { + * stdio: [ + * 0, // Use parent's stdin for child. + * 'pipe', // Pipe child's stdout to parent. + * fs.openSync('err.out', 'w'), // Direct child's stderr to a file. + * ], + * }); + * + * assert.strictEqual(subprocess.stdio[0], null); + * assert.strictEqual(subprocess.stdio[0], subprocess.stdin); + * + * assert(subprocess.stdout); + * assert.strictEqual(subprocess.stdio[1], subprocess.stdout); + * + * assert.strictEqual(subprocess.stdio[2], null); + * assert.strictEqual(subprocess.stdio[2], subprocess.stderr); + * ``` + * + * The `subprocess.stdio` property can be `undefined` if the child process could + * not be successfully spawned. + * @since v0.7.10 + */ + readonly stdio: [ + Writable | null, + // stdin + Readable | null, + // stdout + Readable | null, + // stderr + Readable | Writable | null | undefined, + // extra + Readable | Writable | null | undefined, // extra + ]; + /** + * The `subprocess.killed` property indicates whether the child process + * successfully received a signal from `subprocess.kill()`. The `killed` property + * does not indicate that the child process has been terminated. + * @since v0.5.10 + */ + readonly killed: boolean; + /** + * Returns the process identifier (PID) of the child process. If the child process + * fails to spawn due to errors, then the value is `undefined` and `error` is + * emitted. + * + * ```js + * import { spawn } from 'node:child_process'; + * const grep = spawn('grep', ['ssh']); + * + * console.log(`Spawned child pid: ${grep.pid}`); + * grep.stdin.end(); + * ``` + * @since v0.1.90 + */ + readonly pid?: number | undefined; + /** + * The `subprocess.connected` property indicates whether it is still possible to + * send and receive messages from a child process. When `subprocess.connected` is `false`, it is no longer possible to send or receive messages. + * @since v0.7.2 + */ + readonly connected: boolean; + /** + * The `subprocess.exitCode` property indicates the exit code of the child process. + * If the child process is still running, the field will be `null`. + * + * When the child process is terminated by a signal, `subprocess.exitCode` will be + * `null` and `subprocess.signalCode` will be set. To get the corresponding + * POSIX exit code, use + * `util.convertProcessSignalToExitCode(subprocess.signalCode)`. + */ + readonly exitCode: number | null; + /** + * The `subprocess.signalCode` property indicates the signal received by + * the child process if any, else `null`. + */ + readonly signalCode: NodeJS.Signals | null; + /** + * The `subprocess.spawnargs` property represents the full list of command-line + * arguments the child process was launched with. + */ + readonly spawnargs: string[]; + /** + * The `subprocess.spawnfile` property indicates the executable file name of + * the child process that is launched. + * + * For {@link fork}, its value will be equal to `process.execPath`. + * For {@link spawn}, its value will be the name of + * the executable file. + * For {@link exec}, its value will be the name of the shell + * in which the child process is launched. + */ + readonly spawnfile: string; + /** + * The `subprocess.kill()` method sends a signal to the child process. If no + * argument is given, the process will be sent the `'SIGTERM'` signal. See [`signal(7)`](http://man7.org/linux/man-pages/man7/signal.7.html) for a list of available signals. This function + * returns `true` if [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) succeeds, and `false` otherwise. + * + * ```js + * import { spawn } from 'node:child_process'; + * const grep = spawn('grep', ['ssh']); + * + * grep.on('close', (code, signal) => { + * console.log( + * `child process terminated due to receipt of signal ${signal}`); + * }); + * + * // Send SIGHUP to process. + * grep.kill('SIGHUP'); + * ``` + * + * The `ChildProcess` object may emit an `'error'` event if the signal + * cannot be delivered. Sending a signal to a child process that has already exited + * is not an error but may have unforeseen consequences. Specifically, if the + * process identifier (PID) has been reassigned to another process, the signal will + * be delivered to that process instead which can have unexpected results. + * + * While the function is called `kill`, the signal delivered to the child process + * may not actually terminate the process. + * + * See [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for reference. + * + * On Windows, where POSIX signals do not exist, the `signal` argument will be + * ignored, and the process will be killed forcefully and abruptly (similar to `'SIGKILL'`). + * See `Signal Events` for more details. + * + * On Linux, child processes of child processes will not be terminated + * when attempting to kill their parent. This is likely to happen when running a + * new process in a shell or with the use of the `shell` option of `ChildProcess`: + * + * ```js + * import { spawn } from 'node:child_process'; + * + * const subprocess = spawn( + * 'sh', + * [ + * '-c', + * `node -e "setInterval(() => { + * console.log(process.pid, 'is alive') + * }, 500);"`, + * ], { + * stdio: ['inherit', 'inherit', 'inherit'], + * }, + * ); + * + * setTimeout(() => { + * subprocess.kill(); // Does not terminate the Node.js process in the shell. + * }, 2000); + * ``` + * @since v0.1.90 + */ + kill(signal?: NodeJS.Signals | number): boolean; + /** + * Calls {@link ChildProcess.kill} with `'SIGTERM'`. + * @since v20.5.0 + */ + [Symbol.dispose](): void; + /** + * When an IPC channel has been established between the parent and child ( + * i.e. when using {@link fork}), the `subprocess.send()` method can + * be used to send messages to the child process. When the child process is a + * Node.js instance, these messages can be received via the `'message'` event. + * + * The message goes through serialization and parsing. The resulting + * message might not be the same as what is originally sent. + * + * For example, in the parent script: + * + * ```js + * import cp from 'node:child_process'; + * const n = cp.fork(`${__dirname}/sub.js`); + * + * n.on('message', (m) => { + * console.log('PARENT got message:', m); + * }); + * + * // Causes the child to print: CHILD got message: { hello: 'world' } + * n.send({ hello: 'world' }); + * ``` + * + * And then the child script, `'sub.js'` might look like this: + * + * ```js + * process.on('message', (m) => { + * console.log('CHILD got message:', m); + * }); + * + * // Causes the parent to print: PARENT got message: { foo: 'bar', baz: null } + * process.send({ foo: 'bar', baz: NaN }); + * ``` + * + * Child Node.js processes will have a `process.send()` method of their own + * that allows the child to send messages back to the parent. + * + * There is a special case when sending a `{cmd: 'NODE_foo'}` message. Messages + * containing a `NODE_` prefix in the `cmd` property are reserved for use within + * Node.js core and will not be emitted in the child's `'message'` event. Rather, such messages are emitted using the `'internalMessage'` event and are consumed internally by Node.js. + * Applications should avoid using such messages or listening for `'internalMessage'` events as it is subject to change without notice. + * + * The optional `sendHandle` argument that may be passed to `subprocess.send()` is + * for passing a TCP server or socket object to the child process. The child will + * receive the object as the second argument passed to the callback function + * registered on the `'message'` event. Any data that is received and buffered in + * the socket will not be sent to the child. Sending IPC sockets is not supported on Windows. + * + * The optional `callback` is a function that is invoked after the message is + * sent but before the child may have received it. The function is called with a + * single argument: `null` on success, or an `Error` object on failure. + * + * If no `callback` function is provided and the message cannot be sent, an `'error'` event will be emitted by the `ChildProcess` object. This can + * happen, for instance, when the child process has already exited. + * + * `subprocess.send()` will return `false` if the channel has closed or when the + * backlog of unsent messages exceeds a threshold that makes it unwise to send + * more. Otherwise, the method returns `true`. The `callback` function can be + * used to implement flow control. + * + * #### Example: sending a server object + * + * The `sendHandle` argument can be used, for instance, to pass the handle of + * a TCP server object to the child process as illustrated in the example below: + * + * ```js + * import { createServer } from 'node:net'; + * import { fork } from 'node:child_process'; + * const subprocess = fork('subprocess.js'); + * + * // Open up the server object and send the handle. + * const server = createServer(); + * server.on('connection', (socket) => { + * socket.end('handled by parent'); + * }); + * server.listen(1337, () => { + * subprocess.send('server', server); + * }); + * ``` + * + * The child would then receive the server object as: + * + * ```js + * process.on('message', (m, server) => { + * if (m === 'server') { + * server.on('connection', (socket) => { + * socket.end('handled by child'); + * }); + * } + * }); + * ``` + * + * Once the server is now shared between the parent and child, some connections + * can be handled by the parent and some by the child. + * + * While the example above uses a server created using the `node:net` module, `node:dgram` module servers use exactly the same workflow with the exceptions of + * listening on a `'message'` event instead of `'connection'` and using `server.bind()` instead of `server.listen()`. This is, however, only + * supported on Unix platforms. + * + * #### Example: sending a socket object + * + * Similarly, the `sendHandler` argument can be used to pass the handle of a + * socket to the child process. The example below spawns two children that each + * handle connections with "normal" or "special" priority: + * + * ```js + * import { createServer } from 'node:net'; + * import { fork } from 'node:child_process'; + * const normal = fork('subprocess.js', ['normal']); + * const special = fork('subprocess.js', ['special']); + * + * // Open up the server and send sockets to child. Use pauseOnConnect to prevent + * // the sockets from being read before they are sent to the child process. + * const server = createServer({ pauseOnConnect: true }); + * server.on('connection', (socket) => { + * + * // If this is special priority... + * if (socket.remoteAddress === '74.125.127.100') { + * special.send('socket', socket); + * return; + * } + * // This is normal priority. + * normal.send('socket', socket); + * }); + * server.listen(1337); + * ``` + * + * The `subprocess.js` would receive the socket handle as the second argument + * passed to the event callback function: + * + * ```js + * process.on('message', (m, socket) => { + * if (m === 'socket') { + * if (socket) { + * // Check that the client socket exists. + * // It is possible for the socket to be closed between the time it is + * // sent and the time it is received in the child process. + * socket.end(`Request handled with ${process.argv[2]} priority`); + * } + * } + * }); + * ``` + * + * Do not use `.maxConnections` on a socket that has been passed to a subprocess. + * The parent cannot track when the socket is destroyed. + * + * Any `'message'` handlers in the subprocess should verify that `socket` exists, + * as the connection may have been closed during the time it takes to send the + * connection to the child. + * @since v0.5.9 + * @param sendHandle `undefined`, or a [`net.Socket`](https://nodejs.org/docs/latest-v26.x/api/net.html#class-netsocket), [`net.Server`](https://nodejs.org/docs/latest-v26.x/api/net.html#class-netserver), or [`dgram.Socket`](https://nodejs.org/docs/latest-v26.x/api/dgram.html#class-dgramsocket) object. + * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties: + */ + send(message: Serializable, callback?: (error: Error | null) => void): boolean; + send(message: Serializable, sendHandle?: SendHandle, callback?: (error: Error | null) => void): boolean; + send( + message: Serializable, + sendHandle?: SendHandle, + options?: MessageOptions, + callback?: (error: Error | null) => void, + ): boolean; + /** + * Closes the IPC channel between parent and child, allowing the child to exit + * gracefully once there are no other connections keeping it alive. After calling + * this method the `subprocess.connected` and `process.connected` properties in + * both the parent and child (respectively) will be set to `false`, and it will be + * no longer possible to pass messages between the processes. + * + * The `'disconnect'` event will be emitted when there are no messages in the + * process of being received. This will most often be triggered immediately after + * calling `subprocess.disconnect()`. + * + * When the child process is a Node.js instance (e.g. spawned using {@link fork}), the `process.disconnect()` method can be invoked + * within the child process to close the IPC channel as well. + * @since v0.7.2 + */ + disconnect(): void; + /** + * By default, the parent will wait for the detached child to exit. To prevent the + * parent from waiting for a given `subprocess` to exit, use the `subprocess.unref()` method. Doing so will cause the parent's event loop to not + * include the child in its reference count, allowing the parent to exit + * independently of the child, unless there is an established IPC channel between + * the child and the parent. + * + * ```js + * import { spawn } from 'node:child_process'; + * + * const subprocess = spawn(process.argv[0], ['child_program.js'], { + * detached: true, + * stdio: 'ignore', + * }); + * + * subprocess.unref(); + * ``` + * @since v0.7.10 + */ + unref(): void; + /** + * Calling `subprocess.ref()` after making a call to `subprocess.unref()` will + * restore the removed reference count for the child process, forcing the parent + * to wait for the child to exit before exiting itself. + * + * ```js + * import { spawn } from 'node:child_process'; + * + * const subprocess = spawn(process.argv[0], ['child_program.js'], { + * detached: true, + * stdio: 'ignore', + * }); + * + * subprocess.unref(); + * subprocess.ref(); + * ``` + * @since v0.7.10 + */ + ref(): void; + } + interface ChildProcess extends InternalEventEmitter {} + // return this object when stdio option is undefined or not specified + interface ChildProcessWithoutNullStreams extends ChildProcess { + stdin: Writable; + stdout: Readable; + stderr: Readable; + readonly stdio: [ + Writable, + Readable, + Readable, + // stderr + Readable | Writable | null | undefined, + // extra, no modification + Readable | Writable | null | undefined, // extra, no modification + ]; + } + // return this object when stdio option is a tuple of 3 + interface ChildProcessByStdio + extends ChildProcess + { + stdin: I; + stdout: O; + stderr: E; + readonly stdio: [ + I, + O, + E, + Readable | Writable | null | undefined, + // extra, no modification + Readable | Writable | null | undefined, // extra, no modification + ]; + } + interface Control extends EventEmitter { + ref(): void; + unref(): void; + } + interface MessageOptions { + keepOpen?: boolean | undefined; + } + type IOType = "overlapped" | "pipe" | "ignore" | "inherit"; + type StdioOptions = IOType | Array; + type SerializationType = "json" | "advanced"; + interface MessagingOptions extends Abortable { + /** + * Specify the kind of serialization used for sending messages between processes. + * @default 'json' + */ + serialization?: SerializationType | undefined; + /** + * The signal value to be used when the spawned process will be killed by the abort signal. + * @default 'SIGTERM' + */ + killSignal?: NodeJS.Signals | number | undefined; + /** + * In milliseconds the maximum amount of time the process is allowed to run. + */ + timeout?: number | undefined; + } + interface ProcessEnvOptions { + uid?: number | undefined; + gid?: number | undefined; + cwd?: string | URL | undefined; + env?: NodeJS.ProcessEnv | undefined; + } + interface CommonOptions extends ProcessEnvOptions { + /** + * @default false + */ + windowsHide?: boolean | undefined; + /** + * @default 0 + */ + timeout?: number | undefined; + } + interface CommonSpawnOptions extends CommonOptions, MessagingOptions, Abortable { + argv0?: string | undefined; + /** + * Can be set to 'pipe', 'inherit', 'overlapped', or 'ignore', or an array of these strings. + * If passed as an array, the first element is used for `stdin`, the second for + * `stdout`, and the third for `stderr`. A fourth element can be used to + * specify the `stdio` behavior beyond the standard streams. See + * {@link ChildProcess.stdio} for more information. + * + * @default 'pipe' + */ + stdio?: StdioOptions | undefined; + shell?: boolean | string | undefined; + windowsVerbatimArguments?: boolean | undefined; + } + interface SpawnOptions extends CommonSpawnOptions { + detached?: boolean | undefined; + } + interface SpawnOptionsWithoutStdio extends SpawnOptions { + stdio?: StdioPipeNamed | StdioPipe[] | undefined; + } + type StdioNull = "inherit" | "ignore" | Stream; + type StdioPipeNamed = "pipe" | "overlapped"; + type StdioPipe = undefined | null | StdioPipeNamed; + interface SpawnOptionsWithStdioTuple< + Stdin extends StdioNull | StdioPipe, + Stdout extends StdioNull | StdioPipe, + Stderr extends StdioNull | StdioPipe, + > extends SpawnOptions { + stdio: [Stdin, Stdout, Stderr]; + } + /** + * The `child_process.spawn()` method spawns a new process using the given `command`, with command-line arguments in `args`. If omitted, `args` defaults + * to an empty array. + * + * **If the `shell` option is enabled, do not pass unsanitized user input to this** + * **function. Any input containing shell metacharacters may be used to trigger** + * **arbitrary command execution.** + * + * A third argument may be used to specify additional options, with these defaults: + * + * ```js + * const defaults = { + * cwd: undefined, + * env: process.env, + * }; + * ``` + * + * Use `cwd` to specify the working directory from which the process is spawned. + * If not given, the default is to inherit the current working directory. If given, + * but the path does not exist, the child process emits an `ENOENT` error + * and exits immediately. `ENOENT` is also emitted when the command + * does not exist. + * + * Use `env` to specify environment variables that will be visible to the new + * process, the default is `process.env`. + * + * `undefined` values in `env` will be ignored. + * + * Example of running `ls -lh /usr`, capturing `stdout`, `stderr`, and the + * exit code: + * + * ```js + * import { spawn } from 'node:child_process'; + * import { once } from 'node:events'; + * const ls = spawn('ls', ['-lh', '/usr']); + * + * ls.stdout.on('data', (data) => { + * console.log(`stdout: ${data}`); + * }); + * + * ls.stderr.on('data', (data) => { + * console.error(`stderr: ${data}`); + * }); + * + * const [code] = await once(ls, 'close'); + * console.log(`child process exited with code ${code}`); + * ``` + * + * Example: A very elaborate way to run `ps ax | grep ssh` + * + * ```js + * import { spawn } from 'node:child_process'; + * const ps = spawn('ps', ['ax']); + * const grep = spawn('grep', ['ssh']); + * + * ps.stdout.on('data', (data) => { + * grep.stdin.write(data); + * }); + * + * ps.stderr.on('data', (data) => { + * console.error(`ps stderr: ${data}`); + * }); + * + * ps.on('close', (code) => { + * if (code !== 0) { + * console.log(`ps process exited with code ${code}`); + * } + * grep.stdin.end(); + * }); + * + * grep.stdout.on('data', (data) => { + * console.log(data.toString()); + * }); + * + * grep.stderr.on('data', (data) => { + * console.error(`grep stderr: ${data}`); + * }); + * + * grep.on('close', (code) => { + * if (code !== 0) { + * console.log(`grep process exited with code ${code}`); + * } + * }); + * ``` + * + * Example of checking for failed `spawn`: + * + * ```js + * import { spawn } from 'node:child_process'; + * const subprocess = spawn('bad_command'); + * + * subprocess.on('error', (err) => { + * console.error('Failed to start subprocess.'); + * }); + * ``` + * + * Certain platforms (macOS, Linux) will use the value of `argv[0]` for the process + * title while others (Windows, SunOS) will use `command`. + * + * Node.js overwrites `argv[0]` with `process.execPath` on startup, so `process.argv[0]` in a Node.js child process will not match the `argv0` parameter passed to `spawn` from the parent. Retrieve + * it with the `process.argv0` property instead. + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except + * the error passed to the callback will be an `AbortError`: + * + * ```js + * import { spawn } from 'node:child_process'; + * const controller = new AbortController(); + * const { signal } = controller; + * const grep = spawn('grep', ['ssh'], { signal }); + * grep.on('error', (err) => { + * // This will be called with err being an AbortError if the controller aborts + * }); + * controller.abort(); // Stops the child process + * ``` + * @since v0.1.90 + * @param command The command to run. + * @param args List of string arguments. + */ + function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn(command: string, options: SpawnOptions): ChildProcess; + // overloads of spawn with 'args' + function spawn( + command: string, + args?: readonly string[], + options?: SpawnOptionsWithoutStdio, + ): ChildProcessWithoutNullStreams; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn(command: string, args: readonly string[], options: SpawnOptions): ChildProcess; + interface ExecOptions extends CommonOptions { + shell?: string | undefined; + signal?: AbortSignal | undefined; + maxBuffer?: number | undefined; + killSignal?: NodeJS.Signals | number | undefined; + encoding?: string | null | undefined; + } + interface ExecOptionsWithStringEncoding extends ExecOptions { + encoding?: BufferEncoding | undefined; + } + interface ExecOptionsWithBufferEncoding extends ExecOptions { + encoding: "buffer" | null; + } + interface ExecException extends Omit { + cmd: string; + code?: number | string; + killed?: boolean; + signal?: NodeJS.Signals; + stdout?: string | NonSharedBuffer; + stderr?: string | NonSharedBuffer; + } + /** + * Spawns a shell then executes the `command` within that shell, buffering any + * generated output. The `command` string passed to the exec function is processed + * directly by the shell and special characters (vary based on [shell](https://en.wikipedia.org/wiki/List_of_command-line_interpreters)) + * need to be dealt with accordingly: + * + * ```js + * import { exec } from 'node:child_process'; + * + * exec('"/path/to/test file/test.sh" arg1 arg2'); + * // Double quotes are used so that the space in the path is not interpreted as + * // a delimiter of multiple arguments. + * + * exec('echo "The \\$HOME variable is $HOME"'); + * // The $HOME variable is escaped in the first instance, but not in the second. + * ``` + * + * **Never pass unsanitized user input to this function. Any input containing shell** + * **metacharacters may be used to trigger arbitrary command execution.** + * + * If a `callback` function is provided, it is called with the arguments `(error, stdout, stderr)`. On success, `error` will be `null`. On error, `error` will be an instance of `Error`. The + * `error.code` property will be + * the exit code of the process. By convention, any exit code other than `0` indicates an error. `error.signal` will be the signal that terminated the + * process. + * + * The `stdout` and `stderr` arguments passed to the callback will contain the + * stdout and stderr output of the child process. By default, Node.js will decode + * the output as UTF-8 and pass strings to the callback. The `encoding` option + * can be used to specify the character encoding used to decode the stdout and + * stderr output. If `encoding` is `'buffer'`, or an unrecognized character + * encoding, `Buffer` objects will be passed to the callback instead. + * + * ```js + * import { exec } from 'node:child_process'; + * exec('cat *.js missing_file | wc -l', (error, stdout, stderr) => { + * if (error) { + * console.error(`exec error: ${error}`); + * return; + * } + * console.log(`stdout: ${stdout}`); + * console.error(`stderr: ${stderr}`); + * }); + * ``` + * + * If `timeout` is greater than `0`, the parent will send the signal + * identified by the `killSignal` property (the default is `'SIGTERM'`) if the + * child runs longer than `timeout` milliseconds. + * + * Unlike the [`exec(3)`](http://man7.org/linux/man-pages/man3/exec.3.html) POSIX system call, `child_process.exec()` does not replace + * the existing process and uses a shell to execute the command. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned `ChildProcess` instance is attached to the `Promise` as a `child` property. In + * case of an error (including any error resulting in an exit code other than 0), a + * rejected promise is returned, with the same `error` object given in the + * callback, but with two additional properties `stdout` and `stderr`. + * + * ```js + * import util from 'node:util'; + * import child_process from 'node:child_process'; + * const exec = util.promisify(child_process.exec); + * + * async function lsExample() { + * const { stdout, stderr } = await exec('ls'); + * console.log('stdout:', stdout); + * console.error('stderr:', stderr); + * } + * lsExample(); + * ``` + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except + * the error passed to the callback will be an `AbortError`: + * + * ```js + * import { exec } from 'node:child_process'; + * const controller = new AbortController(); + * const { signal } = controller; + * const child = exec('grep ssh', { signal }, (error) => { + * console.error(error); // an AbortError + * }); + * controller.abort(); + * ``` + * @since v0.1.90 + * @param command The command to run, with space-separated arguments. + * @param callback called with the output when process terminates. + */ + function exec( + command: string, + callback?: (error: ExecException | null, stdout: string, stderr: string) => void, + ): ChildProcess; + // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`. + function exec( + command: string, + options: ExecOptionsWithBufferEncoding, + callback?: (error: ExecException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void, + ): ChildProcess; + // `options` with well-known or absent `encoding` means stdout/stderr are definitely `string`. + function exec( + command: string, + options: ExecOptionsWithStringEncoding, + callback?: (error: ExecException | null, stdout: string, stderr: string) => void, + ): ChildProcess; + // fallback if nothing else matches. Worst case is always `string | Buffer`. + function exec( + command: string, + options: ExecOptions | undefined | null, + callback?: ( + error: ExecException | null, + stdout: string | NonSharedBuffer, + stderr: string | NonSharedBuffer, + ) => void, + ): ChildProcess; + interface PromiseWithChild extends Promise { + child: ChildProcess; + } + namespace exec { + function __promisify__(command: string): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + command: string, + options: ExecOptionsWithBufferEncoding, + ): PromiseWithChild<{ + stdout: NonSharedBuffer; + stderr: NonSharedBuffer; + }>; + function __promisify__( + command: string, + options: ExecOptionsWithStringEncoding, + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + command: string, + options: ExecOptions | undefined | null, + ): PromiseWithChild<{ + stdout: string | NonSharedBuffer; + stderr: string | NonSharedBuffer; + }>; + } + interface ExecFileOptions extends CommonOptions, Abortable { + maxBuffer?: number | undefined; + killSignal?: NodeJS.Signals | number | undefined; + windowsVerbatimArguments?: boolean | undefined; + shell?: boolean | string | undefined; + signal?: AbortSignal | undefined; + encoding?: string | null | undefined; + } + interface ExecFileOptionsWithStringEncoding extends ExecFileOptions { + encoding?: BufferEncoding | undefined; + } + interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions { + encoding: "buffer" | null; + } + /** @deprecated Use `ExecFileOptions` instead. */ + interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {} + /** + * The `child_process.execFile()` function is similar to {@link exec} except that it does not spawn a shell by default. Rather, the specified + * executable `file` is spawned directly as a new process making it slightly more + * efficient than {@link exec}. + * + * The same options as {@link exec} are supported. Since a shell is + * not spawned, behaviors such as I/O redirection and file globbing are not + * supported. + * + * ```js + * import { execFile } from 'node:child_process'; + * const child = execFile('node', ['--version'], (error, stdout, stderr) => { + * if (error) { + * throw error; + * } + * console.log(stdout); + * }); + * ``` + * + * The `stdout` and `stderr` arguments passed to the callback will contain the + * stdout and stderr output of the child process. By default, Node.js will decode + * the output as UTF-8 and pass strings to the callback. The `encoding` option + * can be used to specify the character encoding used to decode the stdout and + * stderr output. If `encoding` is `'buffer'`, or an unrecognized character + * encoding, `Buffer` objects will be passed to the callback instead. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned `ChildProcess` instance is attached to the `Promise` as a `child` property. In + * case of an error (including any error resulting in an exit code other than 0), a + * rejected promise is returned, with the same `error` object given in the + * callback, but with two additional properties `stdout` and `stderr`. + * + * ```js + * import util from 'node:util'; + * import child_process from 'node:child_process'; + * const execFile = util.promisify(child_process.execFile); + * async function getVersion() { + * const { stdout } = await execFile('node', ['--version']); + * console.log(stdout); + * } + * getVersion(); + * ``` + * + * **If the `shell` option is enabled, do not pass unsanitized user input to this** + * **function. Any input containing shell metacharacters may be used to trigger** + * **arbitrary command execution.** + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except + * the error passed to the callback will be an `AbortError`: + * + * ```js + * import { execFile } from 'node:child_process'; + * const controller = new AbortController(); + * const { signal } = controller; + * const child = execFile('node', ['--version'], { signal }, (error) => { + * console.error(error); // an AbortError + * }); + * controller.abort(); + * ``` + * @since v0.1.91 + * @param file The name or path of the executable file to run. + * @param args List of string arguments. + * @param callback Called with the output when process terminates. + */ + // no `options` definitely means stdout/stderr are `string`. + function execFile( + file: string, + callback?: (error: ExecException | null, stdout: string, stderr: string) => void, + ): ChildProcess; + function execFile( + file: string, + args: readonly string[] | undefined | null, + callback?: (error: ExecException | null, stdout: string, stderr: string) => void, + ): ChildProcess; + // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`. + function execFile( + file: string, + options: ExecFileOptionsWithBufferEncoding, + callback?: (error: ExecException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void, + ): ChildProcess; + function execFile( + file: string, + args: readonly string[] | undefined | null, + options: ExecFileOptionsWithBufferEncoding, + callback?: (error: ExecException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void, + ): ChildProcess; + // `options` with well-known or absent `encoding` means stdout/stderr are definitely `string`. + function execFile( + file: string, + options: ExecFileOptionsWithStringEncoding, + callback?: (error: ExecException | null, stdout: string, stderr: string) => void, + ): ChildProcess; + function execFile( + file: string, + args: readonly string[] | undefined | null, + options: ExecFileOptionsWithStringEncoding, + callback?: (error: ExecException | null, stdout: string, stderr: string) => void, + ): ChildProcess; + // fallback if nothing else matches. Worst case is always `string | Buffer`. + function execFile( + file: string, + options: ExecFileOptions | undefined | null, + callback: + | (( + error: ExecException | null, + stdout: string | NonSharedBuffer, + stderr: string | NonSharedBuffer, + ) => void) + | undefined + | null, + ): ChildProcess; + function execFile( + file: string, + args: readonly string[] | undefined | null, + options: ExecFileOptions | undefined | null, + callback: + | (( + error: ExecException | null, + stdout: string | NonSharedBuffer, + stderr: string | NonSharedBuffer, + ) => void) + | undefined + | null, + ): ChildProcess; + namespace execFile { + function __promisify__(file: string): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + args: readonly string[] | undefined | null, + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + options: ExecFileOptionsWithBufferEncoding, + ): PromiseWithChild<{ + stdout: NonSharedBuffer; + stderr: NonSharedBuffer; + }>; + function __promisify__( + file: string, + args: readonly string[] | undefined | null, + options: ExecFileOptionsWithBufferEncoding, + ): PromiseWithChild<{ + stdout: NonSharedBuffer; + stderr: NonSharedBuffer; + }>; + function __promisify__( + file: string, + options: ExecFileOptionsWithStringEncoding, + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + args: readonly string[] | undefined | null, + options: ExecFileOptionsWithStringEncoding, + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + options: ExecFileOptions | undefined | null, + ): PromiseWithChild<{ + stdout: string | NonSharedBuffer; + stderr: string | NonSharedBuffer; + }>; + function __promisify__( + file: string, + args: readonly string[] | undefined | null, + options: ExecFileOptions | undefined | null, + ): PromiseWithChild<{ + stdout: string | NonSharedBuffer; + stderr: string | NonSharedBuffer; + }>; + } + interface ForkOptions extends CommonOptions, MessagingOptions, Abortable { + execPath?: string | undefined; + execArgv?: string[] | undefined; + silent?: boolean | undefined; + /** + * Can be set to 'pipe', 'inherit', 'overlapped', or 'ignore', or an array of these strings. + * If passed as an array, the first element is used for `stdin`, the second for + * `stdout`, and the third for `stderr`. A fourth element can be used to + * specify the `stdio` behavior beyond the standard streams. See + * {@link ChildProcess.stdio} for more information. + * + * @default 'pipe' + */ + stdio?: StdioOptions | undefined; + detached?: boolean | undefined; + windowsVerbatimArguments?: boolean | undefined; + } + /** + * The `child_process.fork()` method is a special case of {@link spawn} used specifically to spawn new Node.js processes. + * Like {@link spawn}, a `ChildProcess` object is returned. The + * returned `ChildProcess` will have an additional communication channel + * built-in that allows messages to be passed back and forth between the parent and + * child. See `subprocess.send()` for details. + * + * Keep in mind that spawned Node.js child processes are + * independent of the parent with exception of the IPC communication channel + * that is established between the two. Each process has its own memory, with + * their own V8 instances. Because of the additional resource allocations + * required, spawning a large number of child Node.js processes is not + * recommended. + * + * By default, `child_process.fork()` will spawn new Node.js instances using the `process.execPath` of the parent process. The `execPath` property in the `options` object allows for an alternative + * execution path to be used. + * + * Node.js processes launched with a custom `execPath` will communicate with the + * parent process using the file descriptor (fd) identified using the + * environment variable `NODE_CHANNEL_FD` on the child process. + * + * Unlike the [`fork(2)`](http://man7.org/linux/man-pages/man2/fork.2.html) POSIX system call, `child_process.fork()` does not clone the + * current process. + * + * The `shell` option available in {@link spawn} is not supported by `child_process.fork()` and will be ignored if set. + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except + * the error passed to the callback will be an `AbortError`: + * + * ```js + * if (process.argv[2] === 'child') { + * setTimeout(() => { + * console.log(`Hello from ${process.argv[2]}!`); + * }, 1_000); + * } else { + * import { fork } from 'node:child_process'; + * const controller = new AbortController(); + * const { signal } = controller; + * const child = fork(__filename, ['child'], { signal }); + * child.on('error', (err) => { + * // This will be called with err being an AbortError if the controller aborts + * }); + * controller.abort(); // Stops the child process + * } + * ``` + * @since v0.5.0 + * @param modulePath The module to run in the child. + * @param args List of string arguments. + */ + function fork(modulePath: string | URL, options?: ForkOptions): ChildProcess; + function fork(modulePath: string | URL, args?: readonly string[], options?: ForkOptions): ChildProcess; + interface SpawnSyncOptions extends CommonSpawnOptions { + input?: string | NodeJS.ArrayBufferView | undefined; + maxBuffer?: number | undefined; + encoding?: BufferEncoding | "buffer" | null | undefined; + } + interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions { + encoding: BufferEncoding; + } + interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions { + encoding?: "buffer" | null | undefined; + } + interface SpawnSyncReturns { + pid: number; + output: Array; + stdout: T; + stderr: T; + status: number | null; + signal: NodeJS.Signals | null; + error?: Error; + } + /** + * The `child_process.spawnSync()` method is generally identical to {@link spawn} with the exception that the function will not return + * until the child process has fully closed. When a timeout has been encountered + * and `killSignal` is sent, the method won't return until the process has + * completely exited. If the process intercepts and handles the `SIGTERM` signal + * and doesn't exit, the parent process will wait until the child process has + * exited. + * + * **If the `shell` option is enabled, do not pass unsanitized user input to this** + * **function. Any input containing shell metacharacters may be used to trigger** + * **arbitrary command execution.** + * @since v0.11.12 + * @param command The command to run. + * @param args List of string arguments. + */ + function spawnSync(command: string): SpawnSyncReturns; + function spawnSync(command: string, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; + function spawnSync(command: string, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; + function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns; + function spawnSync(command: string, args: readonly string[]): SpawnSyncReturns; + function spawnSync( + command: string, + args: readonly string[], + options: SpawnSyncOptionsWithStringEncoding, + ): SpawnSyncReturns; + function spawnSync( + command: string, + args: readonly string[], + options: SpawnSyncOptionsWithBufferEncoding, + ): SpawnSyncReturns; + function spawnSync( + command: string, + args?: readonly string[], + options?: SpawnSyncOptions, + ): SpawnSyncReturns; + interface CommonExecOptions extends CommonOptions { + input?: string | NodeJS.ArrayBufferView | undefined; + /** + * Can be set to 'pipe', 'inherit, or 'ignore', or an array of these strings. + * If passed as an array, the first element is used for `stdin`, the second for + * `stdout`, and the third for `stderr`. A fourth element can be used to + * specify the `stdio` behavior beyond the standard streams. See + * {@link ChildProcess.stdio} for more information. + * + * @default 'pipe' + */ + stdio?: StdioOptions | undefined; + killSignal?: NodeJS.Signals | number | undefined; + maxBuffer?: number | undefined; + encoding?: BufferEncoding | "buffer" | null | undefined; + } + interface ExecSyncOptions extends CommonExecOptions { + shell?: string | undefined; + } + interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions { + encoding: BufferEncoding; + } + interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions { + encoding?: "buffer" | null | undefined; + } + /** + * The `child_process.execSync()` method is generally identical to {@link exec} with the exception that the method will not return + * until the child process has fully closed. When a timeout has been encountered + * and `killSignal` is sent, the method won't return until the process has + * completely exited. If the child process intercepts and handles the `SIGTERM` signal and doesn't exit, the parent process will wait until the child process + * has exited. + * + * If the process times out or has a non-zero exit code, this method will throw. + * The `Error` object will contain the entire result from {@link spawnSync}. + * + * **Never pass unsanitized user input to this function. Any input containing shell** + * **metacharacters may be used to trigger arbitrary command execution.** + * @since v0.11.12 + * @param command The command to run. + * @return The stdout from the command. + */ + function execSync(command: string): NonSharedBuffer; + function execSync(command: string, options: ExecSyncOptionsWithStringEncoding): string; + function execSync(command: string, options: ExecSyncOptionsWithBufferEncoding): NonSharedBuffer; + function execSync(command: string, options?: ExecSyncOptions): string | NonSharedBuffer; + interface ExecFileSyncOptions extends CommonExecOptions { + shell?: boolean | string | undefined; + } + interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions { + encoding: BufferEncoding; + } + interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions { + encoding?: "buffer" | null | undefined; // specify `null`. + } + /** + * The `child_process.execFileSync()` method is generally identical to {@link execFile} with the exception that the method will not + * return until the child process has fully closed. When a timeout has been + * encountered and `killSignal` is sent, the method won't return until the process + * has completely exited. + * + * If the child process intercepts and handles the `SIGTERM` signal and + * does not exit, the parent process will still wait until the child process has + * exited. + * + * If the process times out or has a non-zero exit code, this method will throw an `Error` that will include the full result of the underlying {@link spawnSync}. + * + * **If the `shell` option is enabled, do not pass unsanitized user input to this** + * **function. Any input containing shell metacharacters may be used to trigger** + * **arbitrary command execution.** + * @since v0.11.12 + * @param file The name or path of the executable file to run. + * @param args List of string arguments. + * @return The stdout from the command. + */ + function execFileSync(file: string): NonSharedBuffer; + function execFileSync(file: string, options: ExecFileSyncOptionsWithStringEncoding): string; + function execFileSync(file: string, options: ExecFileSyncOptionsWithBufferEncoding): NonSharedBuffer; + function execFileSync(file: string, options?: ExecFileSyncOptions): string | NonSharedBuffer; + function execFileSync(file: string, args: readonly string[]): NonSharedBuffer; + function execFileSync( + file: string, + args: readonly string[], + options: ExecFileSyncOptionsWithStringEncoding, + ): string; + function execFileSync( + file: string, + args: readonly string[], + options: ExecFileSyncOptionsWithBufferEncoding, + ): NonSharedBuffer; + function execFileSync( + file: string, + args?: readonly string[], + options?: ExecFileSyncOptions, + ): string | NonSharedBuffer; + /** @deprecated This deprecated alias will be removed in a future version. Use `ExecException` instead. */ + interface ExecFileException extends ExecException {} +} +declare module "child_process" { + export * from "node:child_process"; +} diff --git a/node_modules/@types/node/cluster.d.ts b/node_modules/@types/node/cluster.d.ts new file mode 100644 index 0000000..b9dbc8c --- /dev/null +++ b/node_modules/@types/node/cluster.d.ts @@ -0,0 +1,432 @@ +declare module "node:cluster" { + import * as child_process from "node:child_process"; + import { EventEmitter, InternalEventEmitter } from "node:events"; + class Worker implements EventEmitter { + constructor(options?: cluster.WorkerOptions); + /** + * Each new worker is given its own unique id, this id is stored in the `id`. + * + * While a worker is alive, this is the key that indexes it in `cluster.workers`. + * @since v0.8.0 + */ + id: number; + /** + * All workers are created using [`child_process.fork()`](https://nodejs.org/docs/latest-v26.x/api/child_process.html#child_processforkmodulepath-args-options), the returned object + * from this function is stored as `.process`. In a worker, the global `process` is stored. + * + * See: [Child Process module](https://nodejs.org/docs/latest-v26.x/api/child_process.html#child_processforkmodulepath-args-options). + * + * Workers will call `process.exit(0)` if the `'disconnect'` event occurs + * on `process` and `.exitedAfterDisconnect` is not `true`. This protects against + * accidental disconnection. + * @since v0.7.0 + */ + process: child_process.ChildProcess; + /** + * Send a message to a worker or primary, optionally with a handle. + * + * In the primary, this sends a message to a specific worker. It is identical to [`ChildProcess.send()`](https://nodejs.org/docs/latest-v26.x/api/child_process.html#subprocesssendmessage-sendhandle-options-callback). + * + * In a worker, this sends a message to the primary. It is identical to `process.send()`. + * + * This example will echo back all messages from the primary: + * + * ```js + * if (cluster.isPrimary) { + * const worker = cluster.fork(); + * worker.send('hi there'); + * + * } else if (cluster.isWorker) { + * process.on('message', (msg) => { + * process.send(msg); + * }); + * } + * ``` + * @since v0.7.0 + * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. + */ + send(message: child_process.Serializable, callback?: (error: Error | null) => void): boolean; + send( + message: child_process.Serializable, + sendHandle: child_process.SendHandle, + callback?: (error: Error | null) => void, + ): boolean; + send( + message: child_process.Serializable, + sendHandle: child_process.SendHandle, + options?: child_process.MessageOptions, + callback?: (error: Error | null) => void, + ): boolean; + /** + * This function will kill the worker. In the primary worker, it does this by + * disconnecting the `worker.process`, and once disconnected, killing with `signal`. In the worker, it does it by killing the process with `signal`. + * + * The `kill()` function kills the worker process without waiting for a graceful + * disconnect, it has the same behavior as `worker.process.kill()`. + * + * This method is aliased as `worker.destroy()` for backwards compatibility. + * + * In a worker, `process.kill()` exists, but it is not this function; + * it is [`kill()`](https://nodejs.org/docs/latest-v26.x/api/process.html#processkillpid-signal). + * @since v0.9.12 + * @param [signal='SIGTERM'] Name of the kill signal to send to the worker process. + */ + kill(signal?: string): void; + destroy(signal?: string): void; + /** + * In a worker, this function will close all servers, wait for the `'close'` event + * on those servers, and then disconnect the IPC channel. + * + * In the primary, an internal message is sent to the worker causing it to call `.disconnect()` on itself. + * + * Causes `.exitedAfterDisconnect` to be set. + * + * After a server is closed, it will no longer accept new connections, + * but connections may be accepted by any other listening worker. Existing + * connections will be allowed to close as usual. When no more connections exist, + * see `server.close()`, the IPC channel to the worker will close allowing it + * to die gracefully. + * + * The above applies _only_ to server connections, client connections are not + * automatically closed by workers, and disconnect does not wait for them to close + * before exiting. + * + * In a worker, `process.disconnect` exists, but it is not this function; + * it is `disconnect()`. + * + * Because long living server connections may block workers from disconnecting, it + * may be useful to send a message, so application specific actions may be taken to + * close them. It also may be useful to implement a timeout, killing a worker if + * the `'disconnect'` event has not been emitted after some time. + * + * ```js + * import net from 'node:net'; + * + * if (cluster.isPrimary) { + * const worker = cluster.fork(); + * let timeout; + * + * worker.on('listening', (address) => { + * worker.send('shutdown'); + * worker.disconnect(); + * timeout = setTimeout(() => { + * worker.kill(); + * }, 2000); + * }); + * + * worker.on('disconnect', () => { + * clearTimeout(timeout); + * }); + * + * } else if (cluster.isWorker) { + * const server = net.createServer((socket) => { + * // Connections never end + * }); + * + * server.listen(8000); + * + * process.on('message', (msg) => { + * if (msg === 'shutdown') { + * // Initiate graceful close of any connections to server + * } + * }); + * } + * ``` + * @since v0.7.7 + * @return A reference to `worker`. + */ + disconnect(): this; + /** + * This function returns `true` if the worker is connected to its primary via its + * IPC channel, `false` otherwise. A worker is connected to its primary after it + * has been created. It is disconnected after the `'disconnect'` event is emitted. + * @since v0.11.14 + */ + isConnected(): boolean; + /** + * This function returns `true` if the worker's process has terminated (either + * because of exiting or being signaled). Otherwise, it returns `false`. + * + * ```js + * import cluster from 'node:cluster'; + * import http from 'node:http'; + * import { availableParallelism } from 'node:os'; + * import process from 'node:process'; + * + * const numCPUs = availableParallelism(); + * + * if (cluster.isPrimary) { + * console.log(`Primary ${process.pid} is running`); + * + * // Fork workers. + * for (let i = 0; i < numCPUs; i++) { + * cluster.fork(); + * } + * + * cluster.on('fork', (worker) => { + * console.log('worker is dead:', worker.isDead()); + * }); + * + * cluster.on('exit', (worker, code, signal) => { + * console.log('worker is dead:', worker.isDead()); + * }); + * } else { + * // Workers can share any TCP connection. In this case, it is an HTTP server. + * http.createServer((req, res) => { + * res.writeHead(200); + * res.end(`Current process\n ${process.pid}`); + * process.kill(process.pid); + * }).listen(8000); + * } + * ``` + * @since v0.11.14 + */ + isDead(): boolean; + /** + * This property is `true` if the worker exited due to `.disconnect()`. + * If the worker exited any other way, it is `false`. If the + * worker has not exited, it is `undefined`. + * + * The boolean `worker.exitedAfterDisconnect` allows distinguishing between + * voluntary and accidental exit, the primary may choose not to respawn a worker + * based on this value. + * + * ```js + * cluster.on('exit', (worker, code, signal) => { + * if (worker.exitedAfterDisconnect === true) { + * console.log('Oh, it was just voluntary – no need to worry'); + * } + * }); + * + * // kill worker + * worker.kill(); + * ``` + * @since v6.0.0 + */ + exitedAfterDisconnect: boolean; + } + interface Worker extends InternalEventEmitter {} + type _Worker = Worker; + namespace cluster { + interface Worker extends _Worker {} + interface WorkerOptions { + id?: number | undefined; + process?: child_process.ChildProcess | undefined; + state?: string | undefined; + } + interface WorkerEventMap { + "disconnect": []; + "error": [error: Error]; + "exit": [code: number, signal: string]; + "listening": [address: Address]; + "message": [message: any, handle: child_process.SendHandle]; + "online": []; + } + interface ClusterSettings { + /** + * List of string arguments passed to the Node.js executable. + * @default process.execArgv + */ + execArgv?: string[] | undefined; + /** + * File path to worker file. + * @default process.argv[1] + */ + exec?: string | undefined; + /** + * String arguments passed to worker. + * @default process.argv.slice(2) + */ + args?: readonly string[] | undefined; + /** + * Whether or not to send output to parent's stdio. + * @default false + */ + silent?: boolean | undefined; + /** + * Configures the stdio of forked processes. Because the cluster module relies on IPC to function, this configuration must + * contain an `'ipc'` entry. When this option is provided, it overrides `silent`. See [`child_prcess.spawn()`](https://nodejs.org/docs/latest-v26.x/api/child_process.html#child_processspawncommand-args-options)'s + * [`stdio`](https://nodejs.org/docs/latest-v26.x/api/child_process.html#optionsstdio). + */ + stdio?: any[] | undefined; + /** + * Sets the user identity of the process. (See [`setuid(2)`](https://man7.org/linux/man-pages/man2/setuid.2.html).) + */ + uid?: number | undefined; + /** + * Sets the group identity of the process. (See [`setgid(2)`](https://man7.org/linux/man-pages/man2/setgid.2.html).) + */ + gid?: number | undefined; + /** + * Sets inspector port of worker. This can be a number, or a function that takes no arguments and returns a number. + * By default each worker gets its own port, incremented from the primary's `process.debugPort`. + */ + inspectPort?: number | (() => number) | undefined; + /** + * Specify the kind of serialization used for sending messages between processes. Possible values are `'json'` and `'advanced'`. + * See [Advanced serialization for `child_process`](https://nodejs.org/docs/latest-v26.x/api/child_process.html#advanced-serialization) for more details. + * @default false + */ + serialization?: "json" | "advanced" | undefined; + /** + * Current working directory of the worker process. + * @default undefined (inherits from parent process) + */ + cwd?: string | undefined; + /** + * Hide the forked processes console window that would normally be created on Windows systems. + * @default false + */ + windowsHide?: boolean | undefined; + } + interface Address { + address: string; + port: number; + /** + * The `addressType` is one of: + * + * * `4` (TCPv4) + * * `6` (TCPv6) + * * `-1` (Unix domain socket) + * * `'udp4'` or `'udp6'` (UDPv4 or UDPv6) + */ + addressType: 4 | 6 | -1 | "udp4" | "udp6"; + } + interface ClusterEventMap { + "disconnect": [worker: Worker]; + "exit": [worker: Worker, code: number, signal: string]; + "fork": [worker: Worker]; + "listening": [worker: Worker, address: Address]; + "message": [worker: Worker, message: any, handle: child_process.SendHandle]; + "online": [worker: Worker]; + "setup": [settings: ClusterSettings]; + } + interface Cluster extends InternalEventEmitter { + /** + * A `Worker` object contains all public information and method about a worker. + * In the primary it can be obtained using `cluster.workers`. In a worker + * it can be obtained using `cluster.worker`. + * @since v0.7.0 + */ + Worker: typeof Worker; + disconnect(callback?: () => void): void; + /** + * Spawn a new worker process. + * + * This can only be called from the primary process. + * @param env Key/value pairs to add to worker process environment. + * @since v0.6.0 + */ + fork(env?: any): Worker; + /** @deprecated since v16.0.0 - use isPrimary. */ + readonly isMaster: boolean; + /** + * True if the process is a primary. This is determined by the `process.env.NODE_UNIQUE_ID`. If `process.env.NODE_UNIQUE_ID` + * is undefined, then `isPrimary` is `true`. + * @since v16.0.0 + */ + readonly isPrimary: boolean; + /** + * True if the process is not a primary (it is the negation of `cluster.isPrimary`). + * @since v0.6.0 + */ + readonly isWorker: boolean; + /** + * The scheduling policy, either `cluster.SCHED_RR` for round-robin or `cluster.SCHED_NONE` to leave it to the operating system. This is a + * global setting and effectively frozen once either the first worker is spawned, or [`.setupPrimary()`](https://nodejs.org/docs/latest-v26.x/api/cluster.html#clustersetupprimarysettings) + * is called, whichever comes first. + * + * `SCHED_RR` is the default on all operating systems except Windows. Windows will change to `SCHED_RR` once libuv is able to effectively distribute + * IOCP handles without incurring a large performance hit. + * + * `cluster.schedulingPolicy` can also be set through the `NODE_CLUSTER_SCHED_POLICY` environment variable. Valid values are `'rr'` and `'none'`. + * @since v0.11.2 + */ + schedulingPolicy: number; + /** + * After calling [`.setupPrimary()`](https://nodejs.org/docs/latest-v26.x/api/cluster.html#clustersetupprimarysettings) + * (or [`.fork()`](https://nodejs.org/docs/latest-v26.x/api/cluster.html#clusterforkenv)) this settings object will contain + * the settings, including the default values. + * + * This object is not intended to be changed or set manually. + * @since v0.7.1 + */ + readonly settings: ClusterSettings; + /** @deprecated since v16.0.0 - use [`.setupPrimary()`](https://nodejs.org/docs/latest-v26.x/api/cluster.html#clustersetupprimarysettings) instead. */ + setupMaster(settings?: ClusterSettings): void; + /** + * `setupPrimary` is used to change the default 'fork' behavior. Once called, the settings will be present in `cluster.settings`. + * + * Any settings changes only affect future calls to [`.fork()`](https://nodejs.org/docs/latest-v26.x/api/cluster.html#clusterforkenv) + * and have no effect on workers that are already running. + * + * The only attribute of a worker that cannot be set via `.setupPrimary()` is the `env` passed to + * [`.fork()`](https://nodejs.org/docs/latest-v26.x/api/cluster.html#clusterforkenv). + * + * The defaults above apply to the first call only; the defaults for later calls are the current values at the time of + * `cluster.setupPrimary()` is called. + * + * ```js + * import cluster from 'node:cluster'; + * + * cluster.setupPrimary({ + * exec: 'worker.js', + * args: ['--use', 'https'], + * silent: true, + * }); + * cluster.fork(); // https worker + * cluster.setupPrimary({ + * exec: 'worker.js', + * args: ['--use', 'http'], + * }); + * cluster.fork(); // http worker + * ``` + * + * This can only be called from the primary process. + * @since v16.0.0 + */ + setupPrimary(settings?: ClusterSettings): void; + /** + * A reference to the current worker object. Not available in the primary process. + * + * ```js + * import cluster from 'node:cluster'; + * + * if (cluster.isPrimary) { + * console.log('I am primary'); + * cluster.fork(); + * cluster.fork(); + * } else if (cluster.isWorker) { + * console.log(`I am worker #${cluster.worker.id}`); + * } + * ``` + * @since v0.7.0 + */ + readonly worker?: Worker; + /** + * A hash that stores the active worker objects, keyed by `id` field. This makes it easy to loop through all the workers. It is only available in the primary process. + * + * A worker is removed from `cluster.workers` after the worker has disconnected _and_ exited. The order between these two events cannot be determined in advance. However, it + * is guaranteed that the removal from the `cluster.workers` list happens before the last `'disconnect'` or `'exit'` event is emitted. + * + * ```js + * import cluster from 'node:cluster'; + * + * for (const worker of Object.values(cluster.workers)) { + * worker.send('big announcement to all workers'); + * } + * ``` + * @since v0.7.0 + */ + readonly workers?: NodeJS.Dict; + readonly SCHED_NONE: number; + readonly SCHED_RR: number; + } + } + var cluster: cluster.Cluster; + export = cluster; +} +declare module "cluster" { + import cluster = require("node:cluster"); + export = cluster; +} diff --git a/node_modules/@types/node/console.d.ts b/node_modules/@types/node/console.d.ts new file mode 100644 index 0000000..5ba70b3 --- /dev/null +++ b/node_modules/@types/node/console.d.ts @@ -0,0 +1,93 @@ +declare module "node:console" { + import { InspectOptions } from "node:util"; + namespace console { + interface ConsoleOptions { + stdout: NodeJS.WritableStream; + stderr?: NodeJS.WritableStream | undefined; + /** + * Ignore errors when writing to the underlying streams. + * @default true + */ + ignoreErrors?: boolean | undefined; + /** + * Set color support for this `Console` instance. Setting to true enables coloring while inspecting + * values. Setting to `false` disables coloring while inspecting values. Setting to `'auto'` makes color + * support depend on the value of the `isTTY` property and the value returned by `getColorDepth()` on the + * respective stream. This option can not be used, if `inspectOptions.colors` is set as well. + * @default 'auto' + */ + colorMode?: boolean | "auto" | undefined; + /** + * Specifies options that are passed along to + * [`util.inspect()`](https://nodejs.org/docs/latest-v26.x/api/util.html#utilinspectobject-options). + */ + inspectOptions?: InspectOptions | ReadonlyMap | undefined; + /** + * Set group indentation. + * @default 2 + */ + groupIndentation?: number | undefined; + } + interface Console { + readonly Console: { + prototype: Console; + new(stdout: NodeJS.WritableStream, stderr?: NodeJS.WritableStream, ignoreErrors?: boolean): Console; + new(options: ConsoleOptions): Console; + }; + assert(condition?: unknown, ...data: any[]): void; + clear(): void; + count(label?: string): void; + countReset(label?: string): void; + debug(...data: any[]): void; + dir(item?: any, options?: InspectOptions): void; + dirxml(...data: any[]): void; + error(...data: any[]): void; + group(...data: any[]): void; + groupCollapsed(...data: any[]): void; + groupEnd(): void; + info(...data: any[]): void; + log(...data: any[]): void; + table(tabularData?: any, properties?: string[]): void; + time(label?: string): void; + timeEnd(label?: string): void; + timeLog(label?: string, ...data: any[]): void; + trace(...data: any[]): void; + warn(...data: any[]): void; + /** + * This method does not display anything unless used in the inspector. The `console.profile()` + * method starts a JavaScript CPU profile with an optional label until {@link profileEnd} + * is called. The profile is then added to the Profile panel of the inspector. + * + * ```js + * console.profile('MyLabel'); + * // Some code + * console.profileEnd('MyLabel'); + * // Adds the profile 'MyLabel' to the Profiles panel of the inspector. + * ``` + * @since v8.0.0 + */ + profile(label?: string): void; + /** + * This method does not display anything unless used in the inspector. Stops the current + * JavaScript CPU profiling session if one has been started and prints the report to the + * Profiles panel of the inspector. See {@link profile} for an example. + * + * If this method is called without a label, the most recently started profile is stopped. + * @since v8.0.0 + */ + profileEnd(label?: string): void; + /** + * This method does not display anything unless used in the inspector. The `console.timeStamp()` + * method adds an event with the label `'label'` to the Timeline panel of the inspector. + * @since v8.0.0 + */ + timeStamp(label?: string): void; + } + } + var console: console.Console; + export = console; +} +declare module "console" { + import console = require("node:console"); + export = console; +} diff --git a/node_modules/@types/node/constants.d.ts b/node_modules/@types/node/constants.d.ts new file mode 100644 index 0000000..a271f9a --- /dev/null +++ b/node_modules/@types/node/constants.d.ts @@ -0,0 +1,14 @@ +declare module "node:constants" { + const constants: + & typeof import("node:os").constants.dlopen + & typeof import("node:os").constants.errno + & typeof import("node:os").constants.priority + & typeof import("node:os").constants.signals + & typeof import("node:fs").constants + & typeof import("node:crypto").constants; + export = constants; +} +declare module "constants" { + import constants = require("node:constants"); + export = constants; +} diff --git a/node_modules/@types/node/crypto.d.ts b/node_modules/@types/node/crypto.d.ts new file mode 100644 index 0000000..b15ba39 --- /dev/null +++ b/node_modules/@types/node/crypto.d.ts @@ -0,0 +1,3964 @@ +declare module "node:crypto" { + import { NonSharedBuffer } from "node:buffer"; + import { Transform, TransformOptions, Writable, WritableOptions } from "node:stream"; + import { PeerCertificate } from "node:tls"; + /** + * SPKAC is a Certificate Signing Request mechanism originally implemented by + * Netscape and was specified formally as part of HTML5's `keygen` element. + * + * `` is deprecated since [HTML 5.2](https://www.w3.org/TR/html52/changes.html#features-removed) and new projects + * should not use this element anymore. + * + * The `node:crypto` module provides the `Certificate` class for working with SPKAC + * data. The most common usage is handling output generated by the HTML5 `` element. Node.js uses [OpenSSL's SPKAC + * implementation](https://www.openssl.org/docs/man3.0/man1/openssl-spkac.html) internally. + * @since v0.11.8 + */ + class Certificate { + /** + * ```js + * const { Certificate } = await import('node:crypto'); + * const spkac = getSpkacSomehow(); + * const challenge = Certificate.exportChallenge(spkac); + * console.log(challenge.toString('utf8')); + * // Prints: the challenge as a UTF8 string + * ``` + * @since v9.0.0 + * @param encoding The `encoding` of the `spkac` string. + * @return The challenge component of the `spkac` data structure, which includes a public key and a challenge. + */ + static exportChallenge(spkac: BinaryLike, encoding?: BufferEncoding): NonSharedBuffer; + /** + * ```js + * const { Certificate } = await import('node:crypto'); + * const spkac = getSpkacSomehow(); + * const publicKey = Certificate.exportPublicKey(spkac); + * console.log(publicKey); + * // Prints: the public key as + * ``` + * @since v9.0.0 + * @param encoding The `encoding` of the `spkac` string. + * @return The public key component of the `spkac` data structure, which includes a public key and a challenge. + */ + static exportPublicKey(spkac: BinaryLike, encoding?: BufferEncoding): NonSharedBuffer; + /** + * ```js + * import { Buffer } from 'node:buffer'; + * const { Certificate } = await import('node:crypto'); + * + * const spkac = getSpkacSomehow(); + * console.log(Certificate.verifySpkac(Buffer.from(spkac))); + * // Prints: true or false + * ``` + * @since v9.0.0 + * @param encoding The `encoding` of the `spkac` string. + * @return `true` if the given `spkac` data structure is valid, `false` otherwise. + */ + static verifySpkac(spkac: BinaryLike, encoding?: BufferEncoding): boolean; + /** + * @deprecated + * @param encoding The `encoding` of the `spkac` string. + * @returns The challenge component of the `spkac` data structure, + * which includes a public key and a challenge. + */ + exportChallenge(spkac: BinaryLike, encoding?: BufferEncoding): NonSharedBuffer; + /** + * @deprecated + * @param encoding The encoding of the spkac string. + * @returns The public key component of the `spkac` data structure, + * which includes a public key and a challenge. + */ + exportPublicKey(spkac: BinaryLike, encoding?: BufferEncoding): NonSharedBuffer; + /** + * @deprecated + * @param encoding The `encoding` of the `spkac` string. + * @returns `true` if the given `spkac` data structure is valid, + * `false` otherwise. + */ + verifySpkac(spkac: BinaryLike, encoding?: BufferEncoding): boolean; + } + /** @deprecated This property is deprecated. Please use `crypto.setFips()` and `crypto.getFips()` instead. */ + var fips: boolean; + interface HashOptions extends TransformOptions { + outputLength?: number | undefined; + } + /** + * Creates and returns a `Hash` object that can be used to generate hash digests + * using the given `algorithm`. Optional `options` argument controls stream + * behavior. For XOF hash functions such as `'shake256'`, the `outputLength` option + * can be used to specify the desired output length in bytes. + * + * When the data is small (< 5MB) and readily available, `crypto.hash()` is usually faster. + * + * The `algorithm` is dependent on the available algorithms supported by the + * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. + * On recent releases of OpenSSL, `openssl list -digest-algorithms` will + * display the available digest algorithms. + * + * Example: generating the sha256 sum of a file + * + * ```js + * import { + * createReadStream, + * } from 'node:fs'; + * import { argv } from 'node:process'; + * const { + * createHash, + * } = await import('node:crypto'); + * + * const filename = argv[2]; + * + * const hash = createHash('sha256'); + * + * const input = createReadStream(filename); + * input.on('readable', () => { + * // Only one element is going to be produced by the + * // hash stream. + * const data = input.read(); + * if (data) + * hash.update(data); + * else { + * console.log(`${hash.digest('hex')} ${filename}`); + * } + * }); + * ``` + * @since v0.1.92 + * @param options `stream.transform` options + */ + function createHash(algorithm: string, options?: HashOptions): Hash; + interface HmacOptions extends TransformOptions { + encoding?: BufferEncoding | undefined; + } + /** + * Creates and returns an `Hmac` object that uses the given `algorithm` and `key`. + * Optional `options` argument controls stream behavior. + * + * The `algorithm` is dependent on the available algorithms supported by the + * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. + * On recent releases of OpenSSL, `openssl list -digest-algorithms` will + * display the available digest algorithms. + * + * The `key` is the HMAC key used to generate the cryptographic HMAC hash. If it is + * a `KeyObject`, its type must be `secret`. If it is a string, please consider `caveats when using strings as inputs to cryptographic APIs`. If it was + * obtained from a cryptographically secure source of entropy, such as {@link randomBytes} or {@link generateKey}, its length should not + * exceed the block size of `algorithm` (e.g., 512 bits for SHA-256). + * + * Example: generating the sha256 HMAC of a file + * + * ```js + * import { + * createReadStream, + * } from 'node:fs'; + * import { argv } from 'node:process'; + * const { + * createHmac, + * } = await import('node:crypto'); + * + * const filename = argv[2]; + * + * const hmac = createHmac('sha256', 'a secret'); + * + * const input = createReadStream(filename); + * input.on('readable', () => { + * // Only one element is going to be produced by the + * // hash stream. + * const data = input.read(); + * if (data) + * hmac.update(data); + * else { + * console.log(`${hmac.digest('hex')} ${filename}`); + * } + * }); + * ``` + * @since v0.1.94 + * @param options `stream.transform` options + */ + function createHmac(algorithm: string, key: KeyLike, options?: HmacOptions): Hmac; + /** + * The `Hash` class is a utility for creating hash digests of data. It can be + * used in one of two ways: + * + * * As a `stream` that is both readable and writable, where data is written + * to produce a computed hash digest on the readable side, or + * * Using the `hash.update()` and `hash.digest()` methods to produce the + * computed hash. + * + * The {@link createHash} method is used to create `Hash` instances. `Hash`objects are not to be created directly using the `new` keyword. + * + * Example: Using `Hash` objects as streams: + * + * ```js + * const { + * createHash, + * } = await import('node:crypto'); + * + * const hash = createHash('sha256'); + * + * hash.on('readable', () => { + * // Only one element is going to be produced by the + * // hash stream. + * const data = hash.read(); + * if (data) { + * console.log(data.toString('hex')); + * // Prints: + * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50 + * } + * }); + * + * hash.write('some data to hash'); + * hash.end(); + * ``` + * + * Example: Using `Hash` and piped streams: + * + * ```js + * import { createReadStream } from 'node:fs'; + * import { stdout } from 'node:process'; + * const { createHash } = await import('node:crypto'); + * + * const hash = createHash('sha256'); + * + * const input = createReadStream('test.js'); + * input.pipe(hash).setEncoding('hex').pipe(stdout); + * ``` + * + * Example: Using the `hash.update()` and `hash.digest()` methods: + * + * ```js + * const { + * createHash, + * } = await import('node:crypto'); + * + * const hash = createHash('sha256'); + * + * hash.update('some data to hash'); + * console.log(hash.digest('hex')); + * // Prints: + * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50 + * ``` + * @since v0.1.92 + */ + class Hash extends Transform { + private constructor(); + /** + * Creates a new `Hash` object that contains a deep copy of the internal state + * of the current `Hash` object. + * + * The optional `options` argument controls stream behavior. For XOF hash + * functions such as `'shake256'`, the `outputLength` option can be used to + * specify the desired output length in bytes. + * + * An error is thrown when an attempt is made to copy the `Hash` object after + * its `hash.digest()` method has been called. + * + * ```js + * // Calculate a rolling hash. + * const { + * createHash, + * } = await import('node:crypto'); + * + * const hash = createHash('sha256'); + * + * hash.update('one'); + * console.log(hash.copy().digest('hex')); + * + * hash.update('two'); + * console.log(hash.copy().digest('hex')); + * + * hash.update('three'); + * console.log(hash.copy().digest('hex')); + * + * // Etc. + * ``` + * @since v13.1.0 + * @param options `stream.transform` options + */ + copy(options?: HashOptions): Hash; + /** + * Updates the hash content with the given `data`, the encoding of which + * is given in `inputEncoding`. + * If `encoding` is not provided, and the `data` is a string, an + * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. + * + * This can be called many times with new data as it is streamed. + * @since v0.1.92 + * @param inputEncoding The `encoding` of the `data` string. + */ + update(data: string | NodeJS.ArrayBufferView, inputEncoding?: BufferEncoding): Hash; + /** + * Calculates the digest of all of the data passed to be hashed (using the `hash.update()` method). + * If `encoding` is provided a string will be returned; otherwise + * a `Buffer` is returned. + * + * The `Hash` object can not be used again after `hash.digest()` method has been + * called. Multiple calls will cause an error to be thrown. + * @since v0.1.92 + * @param encoding The `encoding` of the return value. + */ + digest(): NonSharedBuffer; + digest(encoding: BufferEncoding): string; + } + /** + * The `Hmac` class is a utility for creating cryptographic HMAC digests. It can + * be used in one of two ways: + * + * * As a `stream` that is both readable and writable, where data is written + * to produce a computed HMAC digest on the readable side, or + * * Using the `hmac.update()` and `hmac.digest()` methods to produce the + * computed HMAC digest. + * + * The {@link createHmac} method is used to create `Hmac` instances. `Hmac`objects are not to be created directly using the `new` keyword. + * + * Example: Using `Hmac` objects as streams: + * + * ```js + * const { + * createHmac, + * } = await import('node:crypto'); + * + * const hmac = createHmac('sha256', 'a secret'); + * + * hmac.on('readable', () => { + * // Only one element is going to be produced by the + * // hash stream. + * const data = hmac.read(); + * if (data) { + * console.log(data.toString('hex')); + * // Prints: + * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e + * } + * }); + * + * hmac.write('some data to hash'); + * hmac.end(); + * ``` + * + * Example: Using `Hmac` and piped streams: + * + * ```js + * import { createReadStream } from 'node:fs'; + * import { stdout } from 'node:process'; + * const { + * createHmac, + * } = await import('node:crypto'); + * + * const hmac = createHmac('sha256', 'a secret'); + * + * const input = createReadStream('test.js'); + * input.pipe(hmac).pipe(stdout); + * ``` + * + * Example: Using the `hmac.update()` and `hmac.digest()` methods: + * + * ```js + * const { + * createHmac, + * } = await import('node:crypto'); + * + * const hmac = createHmac('sha256', 'a secret'); + * + * hmac.update('some data to hash'); + * console.log(hmac.digest('hex')); + * // Prints: + * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e + * ``` + * @since v0.1.94 + */ + class Hmac extends Transform { + private constructor(); + /** + * Updates the `Hmac` content with the given `data`, the encoding of which + * is given in `inputEncoding`. + * If `encoding` is not provided, and the `data` is a string, an + * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. + * + * This can be called many times with new data as it is streamed. + * @since v0.1.94 + * @param inputEncoding The `encoding` of the `data` string. + */ + update(data: string | NodeJS.ArrayBufferView, inputEncoding?: BufferEncoding): Hmac; + /** + * Calculates the HMAC digest of all of the data passed using `hmac.update()`. + * If `encoding` is + * provided a string is returned; otherwise a `Buffer` is returned; + * + * The `Hmac` object can not be used again after `hmac.digest()` has been + * called. Multiple calls to `hmac.digest()` will result in an error being thrown. + * @since v0.1.94 + * @param encoding The `encoding` of the return value. + */ + digest(): NonSharedBuffer; + digest(encoding: BufferEncoding): string; + } + type KeyFormat = "pem" | "der" | "jwk" | "raw-public" | "raw-private" | "raw-seed"; + type KeyObjectType = "secret" | "public" | "private"; + type PublicKeyExportType = "pkcs1" | "spki"; + type PrivateKeyExportType = "pkcs1" | "pkcs8" | "sec1"; + type KeyExportOptions = + | SymmetricKeyExportOptions + | PublicKeyExportOptions + | PrivateKeyExportOptions + | JwkKeyExportOptions + | RawPublicKeyExportOptions + | RawPrivateKeyExportOptions; + interface SymmetricKeyExportOptions { + format?: "buffer" | undefined; + } + interface PublicKeyExportOptions { + type: T; + format: "pem" | "der"; + } + interface PrivateKeyExportOptions { + type: T; + format: "pem" | "der"; + cipher?: string | undefined; + passphrase?: BinaryLike | undefined; + } + interface JwkKeyExportOptions { + format: "jwk"; + } + interface RawPublicKeyExportOptions { + format: "raw-public"; + } + interface RawPrivateKeyExportOptions { + format: "raw-private" | "raw-seed"; + } + interface KeyPairExportOptions< + TPublic extends PublicKeyExportType = PublicKeyExportType, + TPrivate extends PrivateKeyExportType = PrivateKeyExportType, + > { + publicKeyEncoding?: + | PublicKeyExportOptions + | RawPublicKeyExportOptions + | JwkKeyExportOptions + | undefined; + privateKeyEncoding?: + | PrivateKeyExportOptions + | RawPrivateKeyExportOptions + | JwkKeyExportOptions + | undefined; + } + type KeyExportResult = T extends { format: infer F extends KeyFormat } ? { + "der": NonSharedBuffer; + "jwk": webcrypto.JsonWebKey; + "pem": string; + "raw-public": NonSharedBuffer; + "raw-private": NonSharedBuffer; + "raw-seed": NonSharedBuffer; + }[F] + : Default; + interface KeyPairExportResult { + publicKey: KeyExportResult; + privateKey: KeyExportResult; + } + type KeyPairExportCallback = ( + err: Error | null, + publicKey: KeyExportResult, + privateKey: KeyExportResult, + ) => void; + type MLDSAKeyType = `ml-dsa-${44 | 65 | 87}`; + type MLKEMKeyType = `ml-kem-${1024 | 512 | 768}`; + type SLHDSAKeyType = `slh-dsa-${"sha2" | "shake"}-${128 | 192 | 256}${"f" | "s"}`; + type AsymmetricKeyType = + | "dh" + | "dsa" + | "ec" + | "ed25519" + | "ed448" + | MLDSAKeyType + | MLKEMKeyType + | "rsa-pss" + | "rsa" + | SLHDSAKeyType + | "x25519" + | "x448"; + interface AsymmetricKeyDetails { + modulusLength?: number; + publicExponent?: bigint; + hashAlgorithm?: string; + mgf1HashAlgorithm?: string; + saltLength?: number; + divisorLength?: number; + namedCurve?: string; + } + /** + * Node.js uses a `KeyObject` class to represent a symmetric or asymmetric key, + * and each kind of key exposes different functions. The {@link createSecretKey}, {@link createPublicKey} and {@link createPrivateKey} methods are used to create `KeyObject`instances. `KeyObject` + * objects are not to be created directly using the `new`keyword. + * + * Most applications should consider using the new `KeyObject` API instead of + * passing keys as strings or `Buffer`s due to improved security features. + * + * `KeyObject` instances can be passed to other threads via `postMessage()`. + * The receiver obtains a cloned `KeyObject`, and the `KeyObject` does not need to + * be listed in the `transferList` argument. + * @since v11.6.0 + */ + class KeyObject { + private constructor(); + /** + * Returns the underlying `KeyObject` of a `CryptoKey`. The returned `KeyObject` + * does not retain any of the restrictions imposed by the Web Crypto API on the + * original `CryptoKey`, such as the allowed key usages, the algorithm or hash + * algorithm bindings, and the extractability flag. In particular, the underlying + * key material of the returned `KeyObject` can always be exported. + * + * ```js + * const { KeyObject } = await import('node:crypto'); + * const { subtle } = globalThis.crypto; + * + * const key = await subtle.generateKey({ + * name: 'HMAC', + * hash: 'SHA-256', + * length: 256, + * }, true, ['sign', 'verify']); + * + * const keyObject = KeyObject.from(key); + * console.log(keyObject.symmetricKeySize); + * // Prints: 32 (symmetric key size in bytes) + * ``` + * @since v15.0.0 + */ + static from(key: webcrypto.CryptoKey): KeyObject; + /** + * For asymmetric keys, this property represents the type of the key. See the + * supported [asymmetric key types](https://nodejs.org/docs/latest-v26.x/api/crypto.html#asymmetric-key-types). + * + * This property is `undefined` for unrecognized `KeyObject` types and symmetric + * keys. + * @since v11.6.0 + */ + asymmetricKeyType?: AsymmetricKeyType; + /** + * This property exists only on asymmetric keys. Depending on the type of the key, + * this object contains information about the key. None of the information obtained + * through this property can be used to uniquely identify a key or to compromise + * the security of the key. + * + * For RSA-PSS keys, if the key material contains a `RSASSA-PSS-params` sequence, + * the `hashAlgorithm`, `mgf1HashAlgorithm`, and `saltLength` properties will be + * set. + * + * Other key details might be exposed via this API using additional attributes. + * @since v15.7.0 + */ + asymmetricKeyDetails?: AsymmetricKeyDetails; + /** + * The result type depends on the selected encoding format, when PEM the + * result is a string, when DER it will be a buffer containing the data + * encoded as DER, when [JWK](https://tools.ietf.org/html/rfc7517) it will be an object. Raw formats return a + * `Buffer` containing the raw key material. + * + * Private keys can be encrypted by specifying a `cipher` and `passphrase`. + * The PKCS#8 `type` supports encryption with both PEM and DER `format` for any + * key algorithm. PKCS#1 and SEC1 can only be encrypted when the PEM `format` is + * used. For maximum compatibility, use PKCS#8 for encrypted private keys. Since + * PKCS#8 defines its own encryption mechanism, PEM-level encryption is not + * supported when encrypting a PKCS#8 key. See [RFC 5208](https://www.rfc-editor.org/rfc/rfc5208.txt) for PKCS#8 encryption + * and [RFC 1421](https://www.rfc-editor.org/rfc/rfc1421.txt) for PKCS#1 and SEC1 encryption. + * @since v11.6.0 + */ + export(options?: T): KeyExportResult; + /** + * Returns `true` or `false` depending on whether the keys have exactly the same + * type, value, and parameters. This method is not [constant time](https://en.wikipedia.org/wiki/Timing_attack). + * @since v17.7.0, v16.15.0 + * @param otherKeyObject A `KeyObject` with which to compare `keyObject`. + */ + equals(otherKeyObject: KeyObject): boolean; + /** + * For secret keys, this property represents the size of the key in bytes. This + * property is `undefined` for asymmetric keys. + * @since v11.6.0 + */ + symmetricKeySize?: number; + /** + * Converts a `KeyObject` instance to a `CryptoKey`. + * @since 22.10.0 + */ + toCryptoKey( + algorithm: + | webcrypto.AlgorithmIdentifier + | webcrypto.RsaHashedImportParams + | webcrypto.EcKeyImportParams + | webcrypto.HmacImportParams, + extractable: boolean, + keyUsages: readonly webcrypto.KeyUsage[], + ): webcrypto.CryptoKey; + /** + * Depending on the type of this `KeyObject`, this property is either`'secret'` for secret (symmetric) keys, `'public'` for public (asymmetric) keys + * or `'private'` for private (asymmetric) keys. + * @since v11.6.0 + */ + type: KeyObjectType; + } + type CipherCCMTypes = "aes-128-ccm" | "aes-192-ccm" | "aes-256-ccm"; + type CipherGCMTypes = "aes-128-gcm" | "aes-192-gcm" | "aes-256-gcm"; + type CipherOCBTypes = "aes-128-ocb" | "aes-192-ocb" | "aes-256-ocb"; + type CipherChaCha20Poly1305Types = "chacha20-poly1305"; + type BinaryLike = string | ArrayBufferLike | NodeJS.ArrayBufferView; + type KeyLike = BinaryLike | KeyObject; + interface CipherCCMOptions extends TransformOptions { + authTagLength: number; + } + interface CipherGCMOptions extends TransformOptions { + authTagLength?: number | undefined; + } + interface CipherOCBOptions extends TransformOptions { + authTagLength: number; + } + interface CipherChaCha20Poly1305Options extends TransformOptions { + authTagLength?: number | undefined; + } + /** + * Creates and returns a `Cipher` object, with the given `algorithm`, `key` and + * initialization vector (`iv`). + * + * The `options` argument controls stream behavior and is optional except when a + * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the + * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication + * tag that will be returned by `getAuthTag()` and defaults to 16 bytes. + * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes. + * + * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On + * recent OpenSSL releases, `openssl list -cipher-algorithms` will + * display the available cipher algorithms. + * + * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded + * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be + * a `KeyObject` of type `secret`. If the cipher does not need + * an initialization vector, `iv` may be `null`. + * + * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * Initialization vectors should be unpredictable and unique; ideally, they will be + * cryptographically random. They do not have to be secret: IVs are typically just + * added to ciphertext messages unencrypted. It may sound contradictory that + * something has to be unpredictable and unique, but does not have to be secret; + * remember that an attacker must not be able to predict ahead of time what a + * given IV will be. + * @since v0.1.94 + * @param options `stream.transform` options + */ + function createCipheriv( + algorithm: CipherCCMTypes, + key: KeyLike, + iv: BinaryLike, + options: CipherCCMOptions, + ): CipherCCM; + function createCipheriv( + algorithm: CipherOCBTypes, + key: KeyLike, + iv: BinaryLike, + options: CipherOCBOptions, + ): CipherOCB; + function createCipheriv( + algorithm: CipherGCMTypes, + key: KeyLike, + iv: BinaryLike, + options?: CipherGCMOptions, + ): CipherGCM; + function createCipheriv( + algorithm: CipherChaCha20Poly1305Types, + key: KeyLike, + iv: BinaryLike, + options?: CipherChaCha20Poly1305Options, + ): CipherChaCha20Poly1305; + function createCipheriv( + algorithm: string, + key: KeyLike, + iv: BinaryLike | null, + options?: TransformOptions, + ): Cipheriv; + /** + * Instances of the `Cipheriv` class are used to encrypt data. The class can be + * used in one of two ways: + * + * * As a `stream` that is both readable and writable, where plain unencrypted + * data is written to produce encrypted data on the readable side, or + * * Using the `cipher.update()` and `cipher.final()` methods to produce + * the encrypted data. + * + * The {@link createCipheriv} method is + * used to create `Cipheriv` instances. `Cipheriv` objects are not to be created + * directly using the `new` keyword. + * + * Example: Using `Cipheriv` objects as streams: + * + * ```js + * const { + * scrypt, + * randomFill, + * createCipheriv, + * } = await import('node:crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * + * // First, we'll generate the key. The key length is dependent on the algorithm. + * // In this case for aes192, it is 24 bytes (192 bits). + * scrypt(password, 'salt', 24, (err, key) => { + * if (err) throw err; + * // Then, we'll generate a random initialization vector + * randomFill(new Uint8Array(16), (err, iv) => { + * if (err) throw err; + * + * // Once we have the key and iv, we can create and use the cipher... + * const cipher = createCipheriv(algorithm, key, iv); + * + * let encrypted = ''; + * cipher.setEncoding('hex'); + * + * cipher.on('data', (chunk) => encrypted += chunk); + * cipher.on('end', () => console.log(encrypted)); + * + * cipher.write('some clear text data'); + * cipher.end(); + * }); + * }); + * ``` + * + * Example: Using `Cipheriv` and piped streams: + * + * ```js + * import { + * createReadStream, + * createWriteStream, + * } from 'node:fs'; + * + * import { + * pipeline, + * } from 'node:stream'; + * + * const { + * scrypt, + * randomFill, + * createCipheriv, + * } = await import('node:crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * + * // First, we'll generate the key. The key length is dependent on the algorithm. + * // In this case for aes192, it is 24 bytes (192 bits). + * scrypt(password, 'salt', 24, (err, key) => { + * if (err) throw err; + * // Then, we'll generate a random initialization vector + * randomFill(new Uint8Array(16), (err, iv) => { + * if (err) throw err; + * + * const cipher = createCipheriv(algorithm, key, iv); + * + * const input = createReadStream('test.js'); + * const output = createWriteStream('test.enc'); + * + * pipeline(input, cipher, output, (err) => { + * if (err) throw err; + * }); + * }); + * }); + * ``` + * + * Example: Using the `cipher.update()` and `cipher.final()` methods: + * + * ```js + * const { + * scrypt, + * randomFill, + * createCipheriv, + * } = await import('node:crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * + * // First, we'll generate the key. The key length is dependent on the algorithm. + * // In this case for aes192, it is 24 bytes (192 bits). + * scrypt(password, 'salt', 24, (err, key) => { + * if (err) throw err; + * // Then, we'll generate a random initialization vector + * randomFill(new Uint8Array(16), (err, iv) => { + * if (err) throw err; + * + * const cipher = createCipheriv(algorithm, key, iv); + * + * let encrypted = cipher.update('some clear text data', 'utf8', 'hex'); + * encrypted += cipher.final('hex'); + * console.log(encrypted); + * }); + * }); + * ``` + * @since v0.1.94 + */ + class Cipheriv extends Transform { + private constructor(); + /** + * Updates the cipher with `data`. If the `inputEncoding` argument is given, + * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`, `TypedArray`, or `DataView`. If `data` is a `Buffer`, + * `TypedArray`, or `DataView`, then `inputEncoding` is ignored. + * + * The `outputEncoding` specifies the output format of the enciphered + * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned. + * + * The `cipher.update()` method can be called multiple times with new data until `cipher.final()` is called. Calling `cipher.update()` after `cipher.final()` will result in an error being + * thrown. + * @since v0.1.94 + * @param inputEncoding The `encoding` of the data. + * @param outputEncoding The `encoding` of the return value. + */ + update(data: string | NodeJS.ArrayBufferView, inputEncoding?: BufferEncoding): NonSharedBuffer; + update( + data: string | NodeJS.ArrayBufferView, + inputEncoding: BufferEncoding | null | undefined, + outputEncoding: BufferEncoding, + ): string; + /** + * Once the `cipher.final()` method has been called, the `Cipheriv` object can no + * longer be used to encrypt data. Attempts to call `cipher.final()` more than + * once will result in an error being thrown. + * @since v0.1.94 + * @param outputEncoding The `encoding` of the return value. + * @return Any remaining enciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned. + */ + final(): NonSharedBuffer; + final(outputEncoding: BufferEncoding): string; + /** + * When using block encryption algorithms, the `Cipheriv` class will automatically + * add padding to the input data to the appropriate block size. To disable the + * default padding call `cipher.setAutoPadding(false)`. + * + * When `autoPadding` is `false`, the length of the entire input data must be a + * multiple of the cipher's block size or `cipher.final()` will throw an error. + * Disabling automatic padding is useful for non-standard padding, for instance + * using `0x0` instead of PKCS padding. + * + * The `cipher.setAutoPadding()` method must be called before `cipher.final()`. + * @since v0.7.1 + * @param [autoPadding=true] + * @return for method chaining. + */ + setAutoPadding(autoPadding?: boolean): this; + } + interface CipherAEADMethods { + getAuthTag(): NonSharedBuffer; + setAAD(buffer: BinaryLike, options?: { + plaintextLength?: number | undefined; + encoding?: BufferEncoding | undefined; + }): this; + } + interface CipherCCM extends Cipheriv, CipherAEADMethods { + setAAD(buffer: BinaryLike, options: { + plaintextLength: number; + encoding?: BufferEncoding | undefined; + }): this; + } + interface CipherGCM extends Cipheriv, CipherAEADMethods {} + interface CipherOCB extends Cipheriv, CipherAEADMethods {} + interface CipherChaCha20Poly1305 extends Cipheriv, CipherAEADMethods {} + /** + * Creates and returns a `Decipheriv` object that uses the given `algorithm`, `key` and initialization vector (`iv`). + * + * The `options` argument controls stream behavior and is optional except when a + * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the + * `authTagLength` option is required and specifies the length of the + * authentication tag in bytes, see [CCM mode](https://nodejs.org/docs/latest-v26.x/api/crypto.html#ccm-mode). + * For AES-GCM and `chacha20-poly1305`, the `authTagLength` option defaults to 16 + * bytes and must be set to a different value if a different length is used. + * + * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On + * recent OpenSSL releases, `openssl list -cipher-algorithms` will + * display the available cipher algorithms. + * + * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded + * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be + * a `KeyObject` of type `secret`. If the cipher does not need + * an initialization vector, `iv` may be `null`. + * + * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * Initialization vectors should be unpredictable and unique; ideally, they will be + * cryptographically random. They do not have to be secret: IVs are typically just + * added to ciphertext messages unencrypted. It may sound contradictory that + * something has to be unpredictable and unique, but does not have to be secret; + * remember that an attacker must not be able to predict ahead of time what a given + * IV will be. + * @since v0.1.94 + * @param options `stream.transform` options + */ + function createDecipheriv( + algorithm: CipherCCMTypes, + key: KeyLike, + iv: BinaryLike, + options: CipherCCMOptions, + ): DecipherCCM; + function createDecipheriv( + algorithm: CipherOCBTypes, + key: KeyLike, + iv: BinaryLike, + options: CipherOCBOptions, + ): DecipherOCB; + function createDecipheriv( + algorithm: CipherGCMTypes, + key: KeyLike, + iv: BinaryLike, + options?: CipherGCMOptions, + ): DecipherGCM; + function createDecipheriv( + algorithm: CipherChaCha20Poly1305Types, + key: KeyLike, + iv: BinaryLike, + options?: CipherChaCha20Poly1305Options, + ): DecipherChaCha20Poly1305; + function createDecipheriv( + algorithm: string, + key: KeyLike, + iv: BinaryLike | null, + options?: TransformOptions, + ): Decipheriv; + /** + * Instances of the `Decipheriv` class are used to decrypt data. The class can be + * used in one of two ways: + * + * * As a `stream` that is both readable and writable, where plain encrypted + * data is written to produce unencrypted data on the readable side, or + * * Using the `decipher.update()` and `decipher.final()` methods to + * produce the unencrypted data. + * + * The {@link createDecipheriv} method is + * used to create `Decipheriv` instances. `Decipheriv` objects are not to be created + * directly using the `new` keyword. + * + * Example: Using `Decipheriv` objects as streams: + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { + * scryptSync, + * createDecipheriv, + * } = await import('node:crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * // Key length is dependent on the algorithm. In this case for aes192, it is + * // 24 bytes (192 bits). + * // Use the async `crypto.scrypt()` instead. + * const key = scryptSync(password, 'salt', 24); + * // The IV is usually passed along with the ciphertext. + * const iv = Buffer.alloc(16, 0); // Initialization vector. + * + * const decipher = createDecipheriv(algorithm, key, iv); + * + * let decrypted = ''; + * decipher.on('readable', () => { + * let chunk; + * while (null !== (chunk = decipher.read())) { + * decrypted += chunk.toString('utf8'); + * } + * }); + * decipher.on('end', () => { + * console.log(decrypted); + * // Prints: some clear text data + * }); + * + * // Encrypted with same algorithm, key and iv. + * const encrypted = + * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa'; + * decipher.write(encrypted, 'hex'); + * decipher.end(); + * ``` + * + * Example: Using `Decipheriv` and piped streams: + * + * ```js + * import { + * createReadStream, + * createWriteStream, + * } from 'node:fs'; + * import { Buffer } from 'node:buffer'; + * const { + * scryptSync, + * createDecipheriv, + * } = await import('node:crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * // Use the async `crypto.scrypt()` instead. + * const key = scryptSync(password, 'salt', 24); + * // The IV is usually passed along with the ciphertext. + * const iv = Buffer.alloc(16, 0); // Initialization vector. + * + * const decipher = createDecipheriv(algorithm, key, iv); + * + * const input = createReadStream('test.enc'); + * const output = createWriteStream('test.js'); + * + * input.pipe(decipher).pipe(output); + * ``` + * + * Example: Using the `decipher.update()` and `decipher.final()` methods: + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { + * scryptSync, + * createDecipheriv, + * } = await import('node:crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * // Use the async `crypto.scrypt()` instead. + * const key = scryptSync(password, 'salt', 24); + * // The IV is usually passed along with the ciphertext. + * const iv = Buffer.alloc(16, 0); // Initialization vector. + * + * const decipher = createDecipheriv(algorithm, key, iv); + * + * // Encrypted using same algorithm, key and iv. + * const encrypted = + * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa'; + * let decrypted = decipher.update(encrypted, 'hex', 'utf8'); + * decrypted += decipher.final('utf8'); + * console.log(decrypted); + * // Prints: some clear text data + * ``` + * @since v0.1.94 + */ + class Decipheriv extends Transform { + private constructor(); + /** + * Updates the decipher with `data`. If the `inputEncoding` argument is given, + * the `data` argument is a string using the specified encoding. If the `inputEncoding` argument is not given, `data` must be a `Buffer`. If `data` is a `Buffer` then `inputEncoding` is + * ignored. + * + * The `outputEncoding` specifies the output format of the enciphered + * data. If the `outputEncoding` is specified, a string using the specified encoding is returned. If no `outputEncoding` is provided, a `Buffer` is returned. + * + * The `decipher.update()` method can be called multiple times with new data until `decipher.final()` is called. Calling `decipher.update()` after `decipher.final()` will result in an error + * being thrown. + * @since v0.1.94 + * @param inputEncoding The `encoding` of the `data` string. + * @param outputEncoding The `encoding` of the return value. + */ + update(data: string | NodeJS.ArrayBufferView, inputEncoding?: BufferEncoding): NonSharedBuffer; + update( + data: string | NodeJS.ArrayBufferView, + inputEncoding: BufferEncoding | null | undefined, + outputEncoding: BufferEncoding, + ): string; + /** + * Once the `decipher.final()` method has been called, the `Decipheriv` object can + * no longer be used to decrypt data. Attempts to call `decipher.final()` more + * than once will result in an error being thrown. + * @since v0.1.94 + * @param outputEncoding The `encoding` of the return value. + * @return Any remaining deciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned. + */ + final(): NonSharedBuffer; + final(outputEncoding: BufferEncoding): string; + /** + * When data has been encrypted without standard block padding, calling `decipher.setAutoPadding(false)` will disable automatic padding to prevent `decipher.final()` from checking for and + * removing padding. + * + * Turning auto padding off will only work if the input data's length is a + * multiple of the ciphers block size. + * + * The `decipher.setAutoPadding()` method must be called before `decipher.final()`. + * @since v0.7.1 + * @param [autoPadding=true] + * @return for method chaining. + */ + setAutoPadding(auto_padding?: boolean): this; + } + interface DecipherAEADMethods { + setAAD( + buffer: BinaryLike, + options?: { + plaintextLength?: number | undefined; + encoding?: BufferEncoding | undefined; + }, + ): this; + setAuthTag(buffer: BinaryLike, encoding?: BufferEncoding): this; + } + interface DecipherCCM extends Decipheriv, DecipherAEADMethods { + setAAD( + buffer: BinaryLike, + options: { + plaintextLength: number; + encoding?: BufferEncoding | undefined; + }, + ): this; + } + interface DecipherGCM extends Decipheriv, DecipherAEADMethods {} + interface DecipherOCB extends Decipheriv, DecipherAEADMethods {} + interface DecipherChaCha20Poly1305 extends Decipheriv, DecipherAEADMethods {} + interface PrivateKeyInput { + key: BinaryLike; + format?: "pem" | "der" | undefined; + type?: PrivateKeyExportType | undefined; + passphrase?: BinaryLike | undefined; + encoding?: BufferEncoding | undefined; + } + interface PublicKeyInput { + key: BinaryLike; + format?: "pem" | "der" | undefined; + type?: PublicKeyExportType | undefined; + encoding?: BufferEncoding | undefined; + } + interface RawPrivateKeyInput { + key: ArrayBufferLike | NodeJS.ArrayBufferView; + format: "raw-private" | "raw-seed"; + asymmetricKeyType: AsymmetricKeyType; + namedCurve?: string | undefined; + } + interface RawPublicKeyInput { + key: ArrayBufferLike | NodeJS.ArrayBufferView; + format: "raw-public"; + asymmetricKeyType: AsymmetricKeyType; + namedCurve?: string | undefined; + } + interface JsonWebKeyInput { + key: webcrypto.JsonWebKey; + format: "jwk"; + } + interface SecretKeyOptions { + length: number; + } + /** + * Asynchronously generates a new random secret key of the given `length`. The `type` will determine which validations will be performed on the `length`. + * + * ```js + * const { + * generateKey, + * } = await import('node:crypto'); + * + * generateKey('hmac', { length: 512 }, (err, key) => { + * if (err) throw err; + * console.log(key.export().toString('hex')); // 46e..........620 + * }); + * ``` + * + * The size of a generated HMAC key should not exceed the block size of the + * underlying hash function. See {@link createHmac} for more information. + * @since v15.0.0 + * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`. + */ + function generateKey( + type: "hmac" | "aes", + options: SecretKeyOptions, + callback: (err: Error | null, key: KeyObject) => void, + ): void; + /** + * Synchronously generates a new random secret key of the given `length`. The `type` will determine which validations will be performed on the `length`. + * + * ```js + * const { + * generateKeySync, + * } = await import('node:crypto'); + * + * const key = generateKeySync('hmac', { length: 512 }); + * console.log(key.export().toString('hex')); // e89..........41e + * ``` + * + * The size of a generated HMAC key should not exceed the block size of the + * underlying hash function. See {@link createHmac} for more information. + * @since v15.0.0 + * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`. + */ + function generateKeySync(type: "hmac" | "aes", options: SecretKeyOptions): KeyObject; + /** + * Creates and returns a new key object containing a private key. If `key` is a + * string or `Buffer`, `format` is assumed to be `'pem'`; otherwise, `key` must be an object with the properties described above. + * + * If the private key is encrypted, a `passphrase` must be specified. The length + * of the passphrase is limited to 1024 bytes. + * @since v11.6.0 + */ + function createPrivateKey(key: PrivateKeyInput | RawPrivateKeyInput | JsonWebKeyInput | BinaryLike): KeyObject; + /** + * Creates and returns a new key object containing a public key. If `key` is a + * string or `Buffer`, `format` is assumed to be `'pem'`; if `key` is a `KeyObject` with type `'private'`, the public key is derived from the given private key; + * otherwise, `key` must be an object with the properties described above. + * + * If the format is `'pem'`, the `'key'` may also be an X.509 certificate. + * + * Because public keys can be derived from private keys, a private key may be + * passed instead of a public key. In that case, this function behaves as if {@link createPrivateKey} had been called, except that the type of the + * returned `KeyObject` will be `'public'` and that the private key cannot be + * extracted from the returned `KeyObject`. Similarly, if a `KeyObject` with type `'private'` is given, a new `KeyObject` with type `'public'` will be returned + * and it will be impossible to extract the private key from the returned object. + * @since v11.6.0 + */ + function createPublicKey(key: PublicKeyInput | RawPublicKeyInput | JsonWebKeyInput | KeyLike): KeyObject; + /** + * Creates and returns a new key object containing a secret key for symmetric + * encryption or `Hmac`. + * @since v11.6.0 + * @param encoding The string encoding when `key` is a string. + */ + function createSecretKey(key: BinaryLike, encoding?: BufferEncoding): KeyObject; + /** + * Creates and returns a `Sign` object that uses the given `algorithm`. Use {@link getHashes} to obtain the names of the available digest algorithms. + * Optional `options` argument controls the `stream.Writable` behavior. + * + * In some cases, a `Sign` instance can be created using the name of a signature + * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use + * the corresponding digest algorithm. This does not work for all signature + * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest + * algorithm names. + * @since v0.1.92 + * @param options `stream.Writable` options + */ + function createSign(algorithm: string, options?: WritableOptions): Sign; + type DSAEncoding = "der" | "ieee-p1363"; + interface SigningOptions { + padding?: number | undefined; + saltLength?: number | undefined; + dsaEncoding?: DSAEncoding | undefined; + context?: NodeJS.ArrayBufferView | undefined; + } + interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {} + interface SignRawPrivateKeyInput extends RawPrivateKeyInput, SigningOptions {} + interface SignJsonWebKeyInput extends JsonWebKeyInput, SigningOptions {} + interface SignKeyObjectInput extends SigningOptions { + key: KeyObject; + } + interface VerifyPublicKeyInput extends PublicKeyInput, SigningOptions {} + interface VerifyRawPublicKeyInput extends RawPublicKeyInput, SigningOptions {} + interface VerifyJsonWebKeyInput extends JsonWebKeyInput, SigningOptions {} + interface VerifyKeyObjectInput extends SigningOptions { + key: KeyObject; + } + /** + * The `Sign` class is a utility for generating signatures. It can be used in one + * of two ways: + * + * * As a writable `stream`, where data to be signed is written and the `sign.sign()` method is used to generate and return the signature, or + * * Using the `sign.update()` and `sign.sign()` methods to produce the + * signature. + * + * The {@link createSign} method is used to create `Sign` instances. The + * argument is the string name of the hash function to use. `Sign` objects are not + * to be created directly using the `new` keyword. + * + * Example: Using `Sign` and `Verify` objects as streams: + * + * ```js + * const { + * generateKeyPairSync, + * createSign, + * createVerify, + * } = await import('node:crypto'); + * + * const { privateKey, publicKey } = generateKeyPairSync('ec', { + * namedCurve: 'sect239k1', + * }); + * + * const sign = createSign('SHA256'); + * sign.write('some data to sign'); + * sign.end(); + * const signature = sign.sign(privateKey, 'hex'); + * + * const verify = createVerify('SHA256'); + * verify.write('some data to sign'); + * verify.end(); + * console.log(verify.verify(publicKey, signature, 'hex')); + * // Prints: true + * ``` + * + * Example: Using the `sign.update()` and `verify.update()` methods: + * + * ```js + * const { + * generateKeyPairSync, + * createSign, + * createVerify, + * } = await import('node:crypto'); + * + * const { privateKey, publicKey } = generateKeyPairSync('rsa', { + * modulusLength: 2048, + * }); + * + * const sign = createSign('SHA256'); + * sign.update('some data to sign'); + * sign.end(); + * const signature = sign.sign(privateKey); + * + * const verify = createVerify('SHA256'); + * verify.update('some data to sign'); + * verify.end(); + * console.log(verify.verify(publicKey, signature)); + * // Prints: true + * ``` + * @since v0.1.92 + */ + class Sign extends Writable { + private constructor(); + /** + * Updates the `Sign` content with the given `data`, the encoding of which + * is given in `inputEncoding`. + * If `encoding` is not provided, and the `data` is a string, an + * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. + * + * This can be called many times with new data as it is streamed. + * @since v0.1.92 + * @param inputEncoding The `encoding` of the `data` string. + */ + update(data: string | NodeJS.ArrayBufferView, inputEncoding?: BufferEncoding): this; + /** + * Calculates the signature on all the data passed through using either `sign.update()` or `sign.write()`. + * + * If `privateKey` is not a `KeyObject`, this function behaves as if + * `privateKey` had been passed to `crypto.createPrivateKey()`. When + * `privateKey` is a string, `ArrayBuffer`, `Buffer`, `TypedArray`, or + * `DataView`, it must contain PEM-encoded key material. If it is an object, the + * following additional properties can be passed: + * + * If `outputEncoding` is provided a string is returned; otherwise a `Buffer` is returned. + * + * The `Sign` object can not be again used after `sign.sign()` method has been + * called. Multiple calls to `sign.sign()` will result in an error being thrown. + * @since v0.1.92 + */ + sign( + privateKey: + | KeyLike + | SignKeyObjectInput + | SignPrivateKeyInput + | SignRawPrivateKeyInput + | SignJsonWebKeyInput, + ): NonSharedBuffer; + sign( + privateKey: + | KeyLike + | SignKeyObjectInput + | SignPrivateKeyInput + | SignRawPrivateKeyInput + | SignJsonWebKeyInput, + outputFormat: BufferEncoding, + ): string; + } + /** + * Creates and returns a `Verify` object that uses the given algorithm. + * Use {@link getHashes} to obtain an array of names of the available + * signing algorithms. Optional `options` argument controls the `stream.Writable` behavior. + * + * In some cases, a `Verify` instance can be created using the name of a signature + * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use + * the corresponding digest algorithm. This does not work for all signature + * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest + * algorithm names. + * @since v0.1.92 + * @param options `stream.Writable` options + */ + function createVerify(algorithm: string, options?: WritableOptions): Verify; + /** + * The `Verify` class is a utility for verifying signatures. It can be used in one + * of two ways: + * + * * As a writable `stream` where written data is used to validate against the + * supplied signature, or + * * Using the `verify.update()` and `verify.verify()` methods to verify + * the signature. + * + * The {@link createVerify} method is used to create `Verify` instances. `Verify` objects are not to be created directly using the `new` keyword. + * + * See `Sign` for examples. + * @since v0.1.92 + */ + class Verify extends Writable { + private constructor(); + /** + * Updates the `Verify` content with the given `data`, the encoding of which + * is given in `inputEncoding`. + * If `inputEncoding` is not provided, and the `data` is a string, an + * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or `DataView`, then `inputEncoding` is ignored. + * + * This can be called many times with new data as it is streamed. + * @since v0.1.92 + * @param inputEncoding The `encoding` of the `data` string. + */ + update(data: string | NodeJS.ArrayBufferView, inputEncoding?: BufferEncoding): Verify; + /** + * Verifies the provided data using the given `key` and `signature`. + * + * If `key` is not a `KeyObject`, this function behaves as if + * `key` had been passed to `crypto.createPublicKey()`. When `key` is a string, + * `ArrayBuffer`, `Buffer`, `TypedArray`, or `DataView`, it must contain + * PEM-encoded key material. If it is an object, the following additional + * properties can be passed: + * + * The `signature` argument is the previously calculated signature for the data, in + * the `signatureEncoding`. + * If a `signatureEncoding` is specified, the `signature` is expected to be a + * string; otherwise `signature` is expected to be a `Buffer`, `TypedArray`, or `DataView`. + * + * The `verify` object can not be used again after `verify.verify()` has been + * called. Multiple calls to `verify.verify()` will result in an error being + * thrown. + * + * Because public keys can be derived from private keys, a private key may + * be passed instead of a public key. + * @since v0.1.92 + */ + verify( + key: + | KeyLike + | VerifyKeyObjectInput + | VerifyPublicKeyInput + | VerifyRawPublicKeyInput + | VerifyJsonWebKeyInput, + signature: BinaryLike, + signatureEncoding?: BufferEncoding, + ): boolean; + } + /** + * Creates a `DiffieHellman` key exchange object using the supplied `prime` and an + * optional specific `generator`. + * + * The `generator` argument can be a number, string, or `Buffer`. If `generator` is not specified, the value `2` is used. + * + * If `primeEncoding` is specified, `prime` is expected to be a string; otherwise + * a `Buffer`, `TypedArray`, or `DataView` is expected. + * + * If `generatorEncoding` is specified, `generator` is expected to be a string; + * otherwise a number, `Buffer`, `TypedArray`, or `DataView` is expected. + * @since v0.11.12 + * @param primeEncoding The `encoding` of the `prime` string. + * @param [generator=2] + * @param generatorEncoding The `encoding` of the `generator` string. + */ + function createDiffieHellman(primeLength: number, generator?: number): DiffieHellman; + function createDiffieHellman( + prime: BinaryLike, + primeEncoding?: BufferEncoding, + generator?: number | BinaryLike, + generatorEncoding?: BufferEncoding, + ): DiffieHellman; + function createDiffieHellman( + prime: BinaryLike, + generator: number | BinaryLike, + generatorEncoding?: BufferEncoding, + ): DiffieHellman; + /** + * The `DiffieHellman` class is a utility for creating Diffie-Hellman key + * exchanges. + * + * Instances of the `DiffieHellman` class can be created using the {@link createDiffieHellman} function. + * + * ```js + * import assert from 'node:assert'; + * + * const { + * createDiffieHellman, + * } = await import('node:crypto'); + * + * // Generate Alice's keys... + * const alice = createDiffieHellman(2048); + * const aliceKey = alice.generateKeys(); + * + * // Generate Bob's keys... + * const bob = createDiffieHellman(alice.getPrime(), alice.getGenerator()); + * const bobKey = bob.generateKeys(); + * + * // Exchange and generate the secret... + * const aliceSecret = alice.computeSecret(bobKey); + * const bobSecret = bob.computeSecret(aliceKey); + * + * // OK + * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex')); + * ``` + * @since v0.5.0 + */ + class DiffieHellman { + private constructor(); + /** + * Generates private and public Diffie-Hellman key values unless they have been + * generated or computed already, and returns + * the public key in the specified `encoding`. This key should be + * transferred to the other party. + * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned. + * + * This function is a thin wrapper around [`DH_generate_key()`](https://www.openssl.org/docs/man3.0/man3/DH_generate_key.html). In particular, + * once a private key has been generated or set, calling this function only + * recomputes the public key from the existing private key. Since the public key is + * determined by the private key, the result will be the same unless the private key + * has been changed via `diffieHellman.setPrivateKey()`. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ + generateKeys(): NonSharedBuffer; + generateKeys(encoding: BufferEncoding): string; + /** + * Computes the shared secret using `otherPublicKey` as the other + * party's public key and returns the computed shared secret. The supplied + * key is interpreted using the specified `inputEncoding`, and secret is + * encoded using specified `outputEncoding`. + * If the `inputEncoding` is not + * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`. + * + * If `outputEncoding` is given a string is returned; otherwise, a `Buffer` is returned. + * @since v0.5.0 + * @param inputEncoding The `encoding` of an `otherPublicKey` string. + * @param outputEncoding The `encoding` of the return value. + */ + computeSecret( + otherPublicKey: BinaryLike, + inputEncoding?: BufferEncoding, + ): NonSharedBuffer; + computeSecret( + otherPublicKey: BinaryLike, + inputEncoding: BufferEncoding | null | undefined, + outputEncoding: BufferEncoding, + ): string; + /** + * Returns the Diffie-Hellman prime in the specified `encoding`. + * If `encoding` is provided a string is + * returned; otherwise a `Buffer` is returned. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ + getPrime(): NonSharedBuffer; + getPrime(encoding: BufferEncoding): string; + /** + * Returns the Diffie-Hellman generator in the specified `encoding`. + * If `encoding` is provided a string is + * returned; otherwise a `Buffer` is returned. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ + getGenerator(): NonSharedBuffer; + getGenerator(encoding: BufferEncoding): string; + /** + * Returns the Diffie-Hellman public key in the specified `encoding`. + * If `encoding` is provided a + * string is returned; otherwise a `Buffer` is returned. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ + getPublicKey(): NonSharedBuffer; + getPublicKey(encoding: BufferEncoding): string; + /** + * Returns the Diffie-Hellman private key in the specified `encoding`. + * If `encoding` is provided a + * string is returned; otherwise a `Buffer` is returned. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ + getPrivateKey(): NonSharedBuffer; + getPrivateKey(encoding: BufferEncoding): string; + /** + * Sets the Diffie-Hellman public key. If the `encoding` argument is provided, `publicKey` is expected + * to be a string. If no `encoding` is provided, `publicKey` is expected + * to be a `Buffer`, `TypedArray`, or `DataView`. + * @since v0.5.0 + * @param encoding The `encoding` of the `publicKey` string. + */ + setPublicKey(publicKey: BinaryLike, encoding?: BufferEncoding): void; + /** + * Sets the Diffie-Hellman private key. If the `encoding` argument is provided,`privateKey` is expected + * to be a string. If no `encoding` is provided, `privateKey` is expected + * to be a `Buffer`, `TypedArray`, or `DataView`. + * + * This function does not automatically compute the associated public key. Either `diffieHellman.setPublicKey()` or `diffieHellman.generateKeys()` can be + * used to manually provide the public key or to automatically derive it. + * @since v0.5.0 + * @param encoding The `encoding` of the `privateKey` string. + */ + setPrivateKey(privateKey: BinaryLike, encoding?: BufferEncoding): void; + /** + * A bit field containing any warnings and/or errors resulting from a check + * performed during initialization of the `DiffieHellman` object. + * + * The following values are valid for this property (as defined in `node:constants` module): + * + * * `DH_CHECK_P_NOT_SAFE_PRIME` + * * `DH_CHECK_P_NOT_PRIME` + * * `DH_UNABLE_TO_CHECK_GENERATOR` + * * `DH_NOT_SUITABLE_GENERATOR` + * @since v0.11.12 + */ + verifyError: number; + } + /** + * The `DiffieHellmanGroup` class takes a well-known modp group as its argument. + * It works the same as `DiffieHellman`, except that it does not allow changing its keys after creation. + * In other words, it does not implement `setPublicKey()` or `setPrivateKey()` methods. + * + * ```js + * const { createDiffieHellmanGroup } = await import('node:crypto'); + * const dh = createDiffieHellmanGroup('modp1'); + * ``` + * The name (e.g. `'modp1'`) is taken from [RFC 2412](https://www.rfc-editor.org/rfc/rfc2412.txt) (modp1 and 2) and [RFC 3526](https://www.rfc-editor.org/rfc/rfc3526.txt): + * ```bash + * $ perl -ne 'print "$1\n" if /"(modp\d+)"/' src/node_crypto_groups.h + * modp1 # 768 bits + * modp2 # 1024 bits + * modp5 # 1536 bits + * modp14 # 2048 bits + * modp15 # etc. + * modp16 + * modp17 + * modp18 + * ``` + * @since v0.7.5 + */ + class DiffieHellmanGroup { + private constructor(); + } + interface DiffieHellmanGroup extends Omit {} + /** + * Creates a predefined `DiffieHellmanGroup` key exchange object. The + * supported groups are listed in the documentation for `DiffieHellmanGroup`. + * + * The returned object mimics the interface of objects created by {@link createDiffieHellman}, but will not allow changing + * the keys (with `diffieHellman.setPublicKey()`, for example). The + * advantage of using this method is that the parties do not have to + * generate nor exchange a group modulus beforehand, saving both processor + * and communication time. + * + * Example (obtaining a shared secret): + * + * ```js + * const { + * getDiffieHellman, + * } = await import('node:crypto'); + * const alice = getDiffieHellman('modp14'); + * const bob = getDiffieHellman('modp14'); + * + * alice.generateKeys(); + * bob.generateKeys(); + * + * const aliceSecret = alice.computeSecret(bob.getPublicKey(), null, 'hex'); + * const bobSecret = bob.computeSecret(alice.getPublicKey(), null, 'hex'); + * + * // aliceSecret and bobSecret should be the same + * console.log(aliceSecret === bobSecret); + * ``` + * @since v0.7.5 + */ + function getDiffieHellman(groupName: string): DiffieHellmanGroup; + /** + * An alias for {@link getDiffieHellman} + * @since v0.9.3 + */ + function createDiffieHellmanGroup(name: string): DiffieHellmanGroup; + /** + * Provides an asynchronous Password-Based Key Derivation Function 2 (PBKDF2) + * implementation. A selected HMAC digest algorithm specified by `digest` is + * applied to derive a key of the requested byte length (`keylen`) from the `password`, `salt` and `iterations`. + * + * The supplied `callback` function is called with two arguments: `err` and `derivedKey`. If an error occurs while deriving the key, `err` will be set; + * otherwise `err` will be `null`. By default, the successfully generated `derivedKey` will be passed to the callback as a `Buffer`. An error will be + * thrown if any of the input arguments specify invalid values or types. + * + * The `iterations` argument must be a number set as high as possible. The + * higher the number of iterations, the more secure the derived key will be, + * but will take a longer amount of time to complete. + * + * The `salt` should be as unique as possible. It is recommended that a salt is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * ```js + * const { + * pbkdf2, + * } = await import('node:crypto'); + * + * pbkdf2('secret', 'salt', 100000, 64, 'sha512', (err, derivedKey) => { + * if (err) throw err; + * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae' + * }); + * ``` + * + * An array of supported digest functions can be retrieved using {@link getHashes}. + * + * This API uses libuv's threadpool, which can have surprising and + * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. + * @since v0.5.5 + */ + function pbkdf2( + password: BinaryLike, + salt: BinaryLike, + iterations: number, + keylen: number, + digest: string, + callback: (err: Error | null, derivedKey: NonSharedBuffer) => void, + ): void; + /** + * Provides a synchronous Password-Based Key Derivation Function 2 (PBKDF2) + * implementation. A selected HMAC digest algorithm specified by `digest` is + * applied to derive a key of the requested byte length (`keylen`) from the `password`, `salt` and `iterations`. + * + * If an error occurs an `Error` will be thrown, otherwise the derived key will be + * returned as a `Buffer`. + * + * The `iterations` argument must be a number set as high as possible. The + * higher the number of iterations, the more secure the derived key will be, + * but will take a longer amount of time to complete. + * + * The `salt` should be as unique as possible. It is recommended that a salt is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * ```js + * const { + * pbkdf2Sync, + * } = await import('node:crypto'); + * + * const key = pbkdf2Sync('secret', 'salt', 100000, 64, 'sha512'); + * console.log(key.toString('hex')); // '3745e48...08d59ae' + * ``` + * + * An array of supported digest functions can be retrieved using {@link getHashes}. + * @since v0.9.3 + */ + function pbkdf2Sync( + password: BinaryLike, + salt: BinaryLike, + iterations: number, + keylen: number, + digest: string, + ): NonSharedBuffer; + /** + * Generates cryptographically strong pseudorandom data. The `size` argument + * is a number indicating the number of bytes to generate. + * + * If a `callback` function is provided, the bytes are generated asynchronously + * and the `callback` function is invoked with two arguments: `err` and `buf`. + * If an error occurs, `err` will be an `Error` object; otherwise it is `null`. The `buf` argument is a `Buffer` containing the generated bytes. + * + * ```js + * // Asynchronous + * const { + * randomBytes, + * } = await import('node:crypto'); + * + * randomBytes(256, (err, buf) => { + * if (err) throw err; + * console.log(`${buf.length} bytes of random data: ${buf.toString('hex')}`); + * }); + * ``` + * + * If the `callback` function is not provided, the random bytes are generated + * synchronously and returned as a `Buffer`. An error will be thrown if + * there is a problem generating the bytes. + * + * ```js + * // Synchronous + * const { + * randomBytes, + * } = await import('node:crypto'); + * + * const buf = randomBytes(256); + * console.log( + * `${buf.length} bytes of random data: ${buf.toString('hex')}`); + * ``` + * + * The `crypto.randomBytes()` method will not complete until there is + * sufficient entropy available. + * This should normally never take longer than a few milliseconds. The only time + * when generating the random bytes may conceivably block for a longer period of + * time is right after boot, when the whole system is still low on entropy. + * + * This API uses libuv's threadpool, which can have surprising and + * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. + * + * The asynchronous version of `crypto.randomBytes()` is carried out in a single + * threadpool request. To minimize threadpool task length variation, partition + * large `randomBytes` requests when doing so as part of fulfilling a client + * request. + * @since v0.5.8 + * @param size The number of bytes to generate. The `size` must not be larger than `2**31 - 1`. + * @return if the `callback` function is not provided. + */ + function randomBytes(size: number): NonSharedBuffer; + function randomBytes(size: number, callback: (err: Error | null, buf: NonSharedBuffer) => void): void; + function pseudoRandomBytes(size: number): NonSharedBuffer; + function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: NonSharedBuffer) => void): void; + /** + * Return a random integer `n` such that `min <= n < max`. This + * implementation avoids [modulo bias](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Modulo_bias). + * + * The range (`max - min`) must be less than 2**48. `min` and `max` must + * be [safe integers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger). + * + * If the `callback` function is not provided, the random integer is + * generated synchronously. + * + * ```js + * // Asynchronous + * const { + * randomInt, + * } = await import('node:crypto'); + * + * randomInt(3, (err, n) => { + * if (err) throw err; + * console.log(`Random number chosen from (0, 1, 2): ${n}`); + * }); + * ``` + * + * ```js + * // Synchronous + * const { + * randomInt, + * } = await import('node:crypto'); + * + * const n = randomInt(3); + * console.log(`Random number chosen from (0, 1, 2): ${n}`); + * ``` + * + * ```js + * // With `min` argument + * const { + * randomInt, + * } = await import('node:crypto'); + * + * const n = randomInt(1, 7); + * console.log(`The dice rolled: ${n}`); + * ``` + * @since v14.10.0, v12.19.0 + * @param min Start of random range (inclusive). + * @param max End of random range (exclusive). + */ + function randomInt(max: number): number; + function randomInt(min: number, max: number): number; + function randomInt(max: number, callback: (err: Error | null, value: number) => void): void; + function randomInt(min: number, max: number, callback: (err: Error | null, value: number) => void): void; + /** + * Synchronous version of {@link randomFill}. + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { randomFillSync } = await import('node:crypto'); + * + * const buf = Buffer.alloc(10); + * console.log(randomFillSync(buf).toString('hex')); + * + * randomFillSync(buf, 5); + * console.log(buf.toString('hex')); + * + * // The above is equivalent to the following: + * randomFillSync(buf, 5, 5); + * console.log(buf.toString('hex')); + * ``` + * + * Any `ArrayBuffer`, `TypedArray` or `DataView` instance may be passed as`buffer`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { randomFillSync } = await import('node:crypto'); + * + * const a = new Uint32Array(10); + * console.log(Buffer.from(randomFillSync(a).buffer, + * a.byteOffset, a.byteLength).toString('hex')); + * + * const b = new DataView(new ArrayBuffer(10)); + * console.log(Buffer.from(randomFillSync(b).buffer, + * b.byteOffset, b.byteLength).toString('hex')); + * + * const c = new ArrayBuffer(10); + * console.log(Buffer.from(randomFillSync(c)).toString('hex')); + * ``` + * @since v7.10.0, v6.13.0 + * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`. + * @param [offset=0] + * @param [size=buffer.length - offset] + * @return The object passed as `buffer` argument. + */ + function randomFillSync( + buffer: T, + offset?: number, + size?: number, + ): T; + /** + * This function is similar to {@link randomBytes} but requires the first + * argument to be a `Buffer` that will be filled. It also + * requires that a callback is passed in. + * + * If the `callback` function is not provided, an error will be thrown. + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { randomFill } = await import('node:crypto'); + * + * const buf = Buffer.alloc(10); + * randomFill(buf, (err, buf) => { + * if (err) throw err; + * console.log(buf.toString('hex')); + * }); + * + * randomFill(buf, 5, (err, buf) => { + * if (err) throw err; + * console.log(buf.toString('hex')); + * }); + * + * // The above is equivalent to the following: + * randomFill(buf, 5, 5, (err, buf) => { + * if (err) throw err; + * console.log(buf.toString('hex')); + * }); + * ``` + * + * Any `ArrayBuffer`, `TypedArray`, or `DataView` instance may be passed as `buffer`. + * + * While this includes instances of `Float32Array` and `Float64Array`, this + * function should not be used to generate random floating-point numbers. The + * result may contain `+Infinity`, `-Infinity`, and `NaN`, and even if the array + * contains finite numbers only, they are not drawn from a uniform random + * distribution and have no meaningful lower or upper bounds. + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { randomFill } = await import('node:crypto'); + * + * const a = new Uint32Array(10); + * randomFill(a, (err, buf) => { + * if (err) throw err; + * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength) + * .toString('hex')); + * }); + * + * const b = new DataView(new ArrayBuffer(10)); + * randomFill(b, (err, buf) => { + * if (err) throw err; + * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength) + * .toString('hex')); + * }); + * + * const c = new ArrayBuffer(10); + * randomFill(c, (err, buf) => { + * if (err) throw err; + * console.log(Buffer.from(buf).toString('hex')); + * }); + * ``` + * + * This API uses libuv's threadpool, which can have surprising and + * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. + * + * The asynchronous version of `crypto.randomFill()` is carried out in a single + * threadpool request. To minimize threadpool task length variation, partition + * large `randomFill` requests when doing so as part of fulfilling a client + * request. + * @since v7.10.0, v6.13.0 + * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`. + * @param [offset=0] + * @param [size=buffer.length - offset] + * @param callback `function(err, buf) {}`. + */ + function randomFill( + buffer: T, + callback: (err: Error | null, buf: T) => void, + ): void; + function randomFill( + buffer: T, + offset: number, + callback: (err: Error | null, buf: T) => void, + ): void; + function randomFill( + buffer: T, + offset: number, + size: number, + callback: (err: Error | null, buf: T) => void, + ): void; + interface ScryptOptions { + cost?: number | undefined; + blockSize?: number | undefined; + parallelization?: number | undefined; + N?: number | undefined; + r?: number | undefined; + p?: number | undefined; + maxmem?: number | undefined; + } + /** + * Provides an asynchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based + * key derivation function that is designed to be expensive computationally and + * memory-wise in order to make brute-force attacks unrewarding. + * + * The `salt` should be as unique as possible. It is recommended that a salt is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * The `callback` function is called with two arguments: `err` and `derivedKey`. `err` is an exception object when key derivation fails, otherwise `err` is `null`. `derivedKey` is passed to the + * callback as a `Buffer`. + * + * An exception is thrown when any of the input arguments specify invalid values + * or types. + * + * ```js + * const { + * scrypt, + * } = await import('node:crypto'); + * + * // Using the factory defaults. + * scrypt('password', 'salt', 64, (err, derivedKey) => { + * if (err) throw err; + * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae' + * }); + * // Using a custom N parameter. Must be a power of two. + * scrypt('password', 'salt', 64, { N: 1024 }, (err, derivedKey) => { + * if (err) throw err; + * console.log(derivedKey.toString('hex')); // '3745e48...aa39b34' + * }); + * ``` + * @since v10.5.0 + */ + function scrypt( + password: BinaryLike, + salt: BinaryLike, + keylen: number, + callback: (err: Error | null, derivedKey: NonSharedBuffer) => void, + ): void; + function scrypt( + password: BinaryLike, + salt: BinaryLike, + keylen: number, + options: ScryptOptions, + callback: (err: Error | null, derivedKey: NonSharedBuffer) => void, + ): void; + /** + * Provides a synchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based + * key derivation function that is designed to be expensive computationally and + * memory-wise in order to make brute-force attacks unrewarding. + * + * The `salt` should be as unique as possible. It is recommended that a salt is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * An exception is thrown when key derivation fails, otherwise the derived key is + * returned as a `Buffer`. + * + * An exception is thrown when any of the input arguments specify invalid values + * or types. + * + * ```js + * const { + * scryptSync, + * } = await import('node:crypto'); + * // Using the factory defaults. + * + * const key1 = scryptSync('password', 'salt', 64); + * console.log(key1.toString('hex')); // '3745e48...08d59ae' + * // Using a custom N parameter. Must be a power of two. + * const key2 = scryptSync('password', 'salt', 64, { N: 1024 }); + * console.log(key2.toString('hex')); // '3745e48...aa39b34' + * ``` + * @since v10.5.0 + */ + function scryptSync( + password: BinaryLike, + salt: BinaryLike, + keylen: number, + options?: ScryptOptions, + ): NonSharedBuffer; + interface PublicDecryptOptions { + padding?: number | undefined; + encoding?: BufferEncoding | undefined; + } + interface PublicDecryptPrivateKeyInput extends PrivateKeyInput, PublicDecryptOptions {} + interface PublicDecryptPublicKeyInput extends PublicKeyInput, PublicDecryptOptions {} + interface PublicDecryptJsonWebKeyInput extends JsonWebKeyInput, PublicDecryptOptions {} + interface PublicDecryptKeyObjectInput extends PublicDecryptOptions { + key: KeyObject; + } + interface PublicEncryptOptions extends PublicDecryptOptions { + oaepHash?: string | undefined; + oaepLabel?: BinaryLike | undefined; + } + interface PublicEncryptPrivateKeyInput extends PrivateKeyInput, PublicEncryptOptions {} + interface PublicEncryptPublicKeyInput extends PublicKeyInput, PublicEncryptOptions {} + interface PublicEncryptJsonWebKeyInput extends JsonWebKeyInput, PublicEncryptOptions {} + interface PublicEncryptKeyObjectInput extends PublicEncryptOptions { + key: KeyObject; + } + /** + * Encrypts the content of `buffer` with `key` and returns a new `Buffer` with encrypted content. The returned data can be decrypted using + * the corresponding private key, for example using {@link privateDecrypt}. + * + * If `key` is not a `KeyObject`, this function behaves as if `key` had been passed to {@link createPublicKey}. If it is an + * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_OAEP_PADDING`. + * + * Because RSA public keys can be derived from private keys, a private key may + * be passed instead of a public key. + * @since v0.11.14 + */ + function publicEncrypt( + key: + | KeyLike + | PublicEncryptKeyObjectInput + | PublicEncryptPrivateKeyInput + | PublicEncryptPublicKeyInput + | PublicEncryptJsonWebKeyInput, + buffer: BinaryLike, + ): NonSharedBuffer; + /** + * Decrypts `buffer` with `key`.`buffer` was previously encrypted using + * the corresponding private key, for example using {@link privateEncrypt}. + * + * If `key` is not a `KeyObject`, this function behaves as if `key` had been passed to {@link createPublicKey}. If it is an + * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_PADDING`. + * + * Because RSA public keys can be derived from private keys, a private key may + * be passed instead of a public key. + * @since v1.1.0 + */ + function publicDecrypt( + key: + | KeyLike + | PublicDecryptKeyObjectInput + | PublicDecryptPrivateKeyInput + | PublicDecryptPublicKeyInput + | PublicDecryptJsonWebKeyInput, + buffer: BinaryLike, + ): NonSharedBuffer; + /** + * Decrypts `buffer` with `privateKey`. `buffer` was previously encrypted using + * the corresponding public key, for example using {@link publicEncrypt}. + * + * If `privateKey` is not a `KeyObject`, this function behaves as if `privateKey` had been passed to {@link createPrivateKey}. If it is an + * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_OAEP_PADDING`. + * @since v0.11.14 + */ + function privateDecrypt( + privateKey: + | KeyLike + | PublicEncryptKeyObjectInput + | PublicEncryptPrivateKeyInput + | PublicEncryptJsonWebKeyInput, + buffer: BinaryLike, + ): NonSharedBuffer; + /** + * Encrypts `buffer` with `privateKey`. The returned data can be decrypted using + * the corresponding public key, for example using {@link publicDecrypt}. + * + * If `privateKey` is not a `KeyObject`, this function behaves as if `privateKey` had been passed to {@link createPrivateKey}. If it is an + * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_PADDING`. + * @since v1.1.0 + */ + function privateEncrypt( + privateKey: + | KeyLike + | PublicDecryptKeyObjectInput + | PublicDecryptPrivateKeyInput + | PublicDecryptJsonWebKeyInput, + buffer: BinaryLike, + ): NonSharedBuffer; + /** + * ```js + * const { + * getCiphers, + * } = await import('node:crypto'); + * + * console.log(getCiphers()); // ['aes-128-cbc', 'aes-128-ccm', ...] + * ``` + * @since v0.9.3 + * @return An array with the names of the supported cipher algorithms. + */ + function getCiphers(): string[]; + /** + * ```js + * const { + * getCurves, + * } = await import('node:crypto'); + * + * console.log(getCurves()); // ['Oakley-EC2N-3', 'Oakley-EC2N-4', ...] + * ``` + * @since v2.3.0 + * @return An array with the names of the supported elliptic curves. + */ + function getCurves(): string[]; + /** + * @since v10.0.0 + * @return `1` if and only if a FIPS compliant crypto provider is currently in use, `0` otherwise. A future semver-major release may change the return type of this API to a {boolean}. + */ + function getFips(): 1 | 0; + /** + * Enables the FIPS compliant crypto provider in a FIPS-enabled Node.js build. + * Throws an error if FIPS mode is not available. + * @since v10.0.0 + * @param bool `true` to enable FIPS mode. + */ + function setFips(bool: boolean): void; + /** + * ```js + * const { + * getHashes, + * } = await import('node:crypto'); + * + * console.log(getHashes()); // ['DSA', 'DSA-SHA', 'DSA-SHA1', ...] + * ``` + * @since v0.9.3 + * @return An array of the names of the supported hash algorithms, such as `'RSA-SHA256'`. Hash algorithms are also called "digest" algorithms. + */ + function getHashes(): string[]; + type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid"; + /** + * The `ECDH` class is a utility for creating Elliptic Curve Diffie-Hellman (ECDH) + * key exchanges. + * + * Instances of the `ECDH` class can be created using the {@link createECDH} function. + * + * ```js + * import assert from 'node:assert'; + * + * const { + * createECDH, + * } = await import('node:crypto'); + * + * // Generate Alice's keys... + * const alice = createECDH('secp521r1'); + * const aliceKey = alice.generateKeys(); + * + * // Generate Bob's keys... + * const bob = createECDH('secp521r1'); + * const bobKey = bob.generateKeys(); + * + * // Exchange and generate the secret... + * const aliceSecret = alice.computeSecret(bobKey); + * const bobSecret = bob.computeSecret(aliceKey); + * + * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex')); + * // OK + * ``` + * @since v0.11.14 + */ + class ECDH { + private constructor(); + /** + * Converts the EC Diffie-Hellman public key specified by `key` and `curve` to the + * format specified by `format`. The `format` argument specifies point encoding + * and can be `'compressed'`, `'uncompressed'` or `'hybrid'`. The supplied key is + * interpreted using the specified `inputEncoding`, and the returned key is encoded + * using the specified `outputEncoding`. + * + * Use {@link getCurves} to obtain a list of available curve names. + * On recent OpenSSL releases, `openssl ecparam -list_curves` will also display + * the name and description of each available elliptic curve. + * + * If `format` is not specified the point will be returned in `'uncompressed'` format. + * + * If the `inputEncoding` is not provided, `key` is expected to be a `Buffer`, `TypedArray`, or `DataView`. + * + * Example (uncompressing a key): + * + * ```js + * const { + * createECDH, + * ECDH, + * } = await import('node:crypto'); + * + * const ecdh = createECDH('secp256k1'); + * ecdh.generateKeys(); + * + * const compressedKey = ecdh.getPublicKey('hex', 'compressed'); + * + * const uncompressedKey = ECDH.convertKey(compressedKey, + * 'secp256k1', + * 'hex', + * 'hex', + * 'uncompressed'); + * + * // The converted key and the uncompressed public key should be the same + * console.log(uncompressedKey === ecdh.getPublicKey('hex')); + * ``` + * @since v10.0.0 + * @param inputEncoding The `encoding` of the `key` string. + * @param outputEncoding The `encoding` of the return value. + */ + static convertKey( + key: BinaryLike, + curve: string, + inputEncoding?: BufferEncoding, + outputEncoding?: null, + format?: "uncompressed" | "compressed" | "hybrid", + ): NonSharedBuffer; + static convertKey( + key: BinaryLike, + curve: string, + inputEncoding: BufferEncoding | null | undefined, + outputEncoding: BufferEncoding, + format?: "uncompressed" | "compressed" | "hybrid", + ): string; + /** + * Generates private and public EC Diffie-Hellman key values, and returns + * the public key in the specified `format` and `encoding`. This key should be + * transferred to the other party. + * + * The `format` argument specifies point encoding and can be `'compressed'` or `'uncompressed'`. If `format` is not specified, the point will be returned in`'uncompressed'` format. + * + * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned. + * @since v0.11.14 + * @param encoding The `encoding` of the return value. + * @param [format='uncompressed'] + */ + generateKeys(encoding?: null, format?: ECDHKeyFormat): NonSharedBuffer; + generateKeys(encoding: BufferEncoding, format?: ECDHKeyFormat): string; + /** + * Computes the shared secret using `otherPublicKey` as the other + * party's public key and returns the computed shared secret. The supplied + * key is interpreted using specified `inputEncoding`, and the returned secret + * is encoded using the specified `outputEncoding`. + * If the `inputEncoding` is not + * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`. + * + * If `outputEncoding` is given a string will be returned; otherwise a `Buffer` is returned. + * + * `ecdh.computeSecret` will throw an`ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY` error when `otherPublicKey` lies outside of the elliptic curve. Since `otherPublicKey` is + * usually supplied from a remote user over an insecure network, + * be sure to handle this exception accordingly. + * @since v0.11.14 + * @param inputEncoding The `encoding` of the `otherPublicKey` string. + * @param outputEncoding The `encoding` of the return value. + */ + computeSecret(otherPublicKey: BinaryLike, inputEncoding?: BufferEncoding): NonSharedBuffer; + computeSecret( + otherPublicKey: BinaryLike, + inputEncoding: BufferEncoding | null | undefined, + outputEncoding: BufferEncoding, + ): string; + /** + * If `encoding` is specified, a string is returned; otherwise a `Buffer` is + * returned. + * @since v0.11.14 + * @param encoding The `encoding` of the return value. + * @return The EC Diffie-Hellman in the specified `encoding`. + */ + getPrivateKey(): NonSharedBuffer; + getPrivateKey(encoding: BufferEncoding): string; + /** + * The `format` argument specifies point encoding and can be `'compressed'` or `'uncompressed'`. If `format` is not specified the point will be returned in`'uncompressed'` format. + * + * If `encoding` is specified, a string is returned; otherwise a `Buffer` is + * returned. + * @since v0.11.14 + * @param encoding The `encoding` of the return value. + * @param [format='uncompressed'] + * @return The EC Diffie-Hellman public key in the specified `encoding` and `format`. + */ + getPublicKey(encoding?: null, format?: ECDHKeyFormat): NonSharedBuffer; + getPublicKey(encoding: BufferEncoding, format?: ECDHKeyFormat): string; + /** + * Sets the EC Diffie-Hellman private key. + * If `encoding` is provided, `privateKey` is expected + * to be a string; otherwise `privateKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`. + * + * If `privateKey` is not valid for the curve specified when the `ECDH` object was + * created, an error is thrown. Upon setting the private key, the associated + * public point (key) is also generated and set in the `ECDH` object. + * @since v0.11.14 + * @param encoding The `encoding` of the `privateKey` string. + */ + setPrivateKey(privateKey: BinaryLike, encoding?: BufferEncoding): void; + } + /** + * Creates an Elliptic Curve Diffie-Hellman (`ECDH`) key exchange object using a + * predefined curve specified by the `curveName` string. Use {@link getCurves} to obtain a list of available curve names. On recent + * OpenSSL releases, `openssl ecparam -list_curves` will also display the name + * and description of each available elliptic curve. + * @since v0.11.14 + */ + function createECDH(curveName: string): ECDH; + /** + * This function compares the underlying bytes that represent the given `ArrayBuffer`, `TypedArray`, or `DataView` instances using a constant-time + * algorithm. + * + * This function does not leak timing information that + * would allow an attacker to guess one of the values. This is suitable for + * comparing HMAC digests or secret values like authentication cookies or [capability urls](https://www.w3.org/TR/capability-urls/). + * + * `a` and `b` must both be `Buffer`s, `TypedArray`s, or `DataView`s, and they + * must have the same byte length. An error is thrown if `a` and `b` have + * different byte lengths. + * + * If at least one of `a` and `b` is a `TypedArray` with more than one byte per + * entry, such as `Uint16Array`, the result will be computed using the platform + * byte order. + * + * **When both of the inputs are `Float32Array`s or `Float64Array`s, this function might return unexpected results due to IEEE 754** + * **encoding of floating-point numbers. In particular, neither `x === y` nor `Object.is(x, y)` implies that the byte representations of two floating-point** + * **numbers `x` and `y` are equal.** + * + * Use of `crypto.timingSafeEqual` does not guarantee that the _surrounding_ code + * is timing-safe. Care should be taken to ensure that the surrounding code does + * not introduce timing vulnerabilities. + * @since v6.6.0 + */ + function timingSafeEqual( + a: ArrayBufferLike | NodeJS.ArrayBufferView, + b: ArrayBufferLike | NodeJS.ArrayBufferView, + ): boolean; + interface DHKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> { + prime?: NodeJS.ArrayBufferView | undefined; + primeLength?: number | undefined; + generator?: number | undefined; + groupName?: string | undefined; + } + interface DSAKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> { + modulusLength: number; + divisorLength?: number | undefined; + } + interface ECKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8" | "sec1"> { + namedCurve: string; + paramEncoding?: "explicit" | "named" | undefined; + } + interface ED25519KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} + interface ED448KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} + interface MLDSAKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} + interface MLKEMKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} + interface RSAPSSKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> { + modulusLength: number; + publicExponent?: number | undefined; + hashAlgorithm?: string | undefined; + mgf1HashAlgorithm?: string | undefined; + saltLength?: string | undefined; + } + interface RSAKeyPairOptions extends KeyPairExportOptions<"pkcs1" | "spki", "pkcs1" | "pkcs8"> { + modulusLength: number; + publicExponent?: number | undefined; + } + interface SLHDSAKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} + interface X25519KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} + interface X448KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {} + /** + * Generates a new asymmetric key pair of the given `type`. See the + * supported [asymmetric key types](https://nodejs.org/docs/latest-v26.x/api/crypto.html#asymmetric-key-types). + * + * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function + * behaves as if `keyObject.export()` had been called on its result. Otherwise, + * the respective part of the key is returned as a `KeyObject`. + * + * When encoding public keys, it is recommended to use `'spki'`. When encoding + * private keys, it is recommended to use `'pkcs8'` with a strong passphrase, + * and to keep the passphrase confidential. + * + * ```js + * const { + * generateKeyPairSync, + * } = await import('node:crypto'); + * + * const { + * publicKey, + * privateKey, + * } = generateKeyPairSync('rsa', { + * modulusLength: 4096, + * publicKeyEncoding: { + * type: 'spki', + * format: 'pem', + * }, + * privateKeyEncoding: { + * type: 'pkcs8', + * format: 'pem', + * cipher: 'aes-256-cbc', + * passphrase: 'top secret', + * }, + * }); + * ``` + * + * The return value `{ publicKey, privateKey }` represents the generated key pair. + * When PEM encoding was selected, the respective key will be a string, otherwise + * it will be a buffer containing the data encoded as DER. + * @since v10.12.0 + * @param type The asymmetric key type to generate. See the + * supported [asymmetric key types](https://nodejs.org/docs/latest-v26.x/api/crypto.html#asymmetric-key-types). + */ + function generateKeyPairSync( + type: "dh", + options: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: "dsa", + options: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: "ec", + options: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: "ed25519", + options?: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: "ed448", + options?: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: MLDSAKeyType, + options?: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: MLKEMKeyType, + options?: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: "rsa-pss", + options: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: "rsa", + options: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: SLHDSAKeyType, + options?: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: "x25519", + options?: T, + ): KeyPairExportResult; + function generateKeyPairSync( + type: "x448", + options?: T, + ): KeyPairExportResult; + /** + * Generates a new asymmetric key pair of the given `type`. See the + * supported [asymmetric key types](https://nodejs.org/docs/latest-v26.x/api/crypto.html#asymmetric-key-types). + * + * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function + * behaves as if `keyObject.export()` had been called on its result. Otherwise, + * the respective part of the key is returned as a `KeyObject`. + * + * It is recommended to encode public keys as `'spki'` and private keys as `'pkcs8'` with encryption for long-term storage: + * + * ```js + * const { + * generateKeyPair, + * } = await import('node:crypto'); + * + * generateKeyPair('rsa', { + * modulusLength: 4096, + * publicKeyEncoding: { + * type: 'spki', + * format: 'pem', + * }, + * privateKeyEncoding: { + * type: 'pkcs8', + * format: 'pem', + * cipher: 'aes-256-cbc', + * passphrase: 'top secret', + * }, + * }, (err, publicKey, privateKey) => { + * // Handle errors and use the generated key pair. + * }); + * ``` + * + * On completion, `callback` will be called with `err` set to `undefined` and `publicKey` / `privateKey` representing the generated key pair. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a `Promise` for an `Object` with `publicKey` and `privateKey` properties. + * @since v10.12.0 + * @param type The asymmetric key type to generate. See the + * supported [asymmetric key types](https://nodejs.org/docs/latest-v26.x/api/crypto.html#asymmetric-key-types). + */ + function generateKeyPair( + type: "dh", + options: T, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "dsa", + options: T, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "ec", + options: T, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "ed25519", + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "ed25519", + options: T | undefined, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "ed448", + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "ed448", + options: T | undefined, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: MLDSAKeyType, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: MLDSAKeyType, + options: T | undefined, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: MLKEMKeyType, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: MLKEMKeyType, + options: T | undefined, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "rsa-pss", + options: T, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "rsa", + options: T, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: SLHDSAKeyType, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: SLHDSAKeyType, + options: T | undefined, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "x25519", + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "x25519", + options: T | undefined, + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "x448", + callback: KeyPairExportCallback, + ): void; + function generateKeyPair( + type: "x448", + options: T | undefined, + callback: KeyPairExportCallback, + ): void; + namespace generateKeyPair { + function __promisify__( + type: "dh", + options: T, + ): Promise>; + function __promisify__( + type: "dsa", + options: T, + ): Promise>; + function __promisify__( + type: "ec", + options: T, + ): Promise>; + function __promisify__( + type: "ed25519", + options?: T, + ): Promise>; + function __promisify__( + type: "ed448", + options?: T, + ): Promise>; + function __promisify__( + type: MLDSAKeyType, + options?: T, + ): Promise>; + function __promisify__( + type: MLKEMKeyType, + options?: T, + ): Promise>; + function __promisify__( + type: "rsa-pss", + options: T, + ): Promise>; + function __promisify__( + type: "rsa", + options: T, + ): Promise>; + function __promisify__( + type: SLHDSAKeyType, + options?: T, + ): Promise>; + function __promisify__( + type: "x25519", + options?: T, + ): Promise>; + function __promisify__( + type: "x448", + options?: T, + ): Promise>; + } + /** + * Calculates and returns the signature for `data` using the given private key and + * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is + * dependent upon the key type. + * + * `algorithm` is required to be `null` or `undefined` for Ed25519, Ed448, and + * ML-DSA. + * + * If `key` is not a `KeyObject`, this function behaves as if `key` had been + * passed to `crypto.createPrivateKey()`. When `key` is a string, `ArrayBuffer`, + * `Buffer`, `TypedArray`, or `DataView`, it must contain PEM-encoded key + * material. If it is an object, the following additional properties can be + * passed: + * + * If the `callback` function is provided this function uses libuv's threadpool. + * @since v12.0.0 + */ + function sign( + algorithm: string | null | undefined, + data: BinaryLike, + key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput, + ): NonSharedBuffer; + function sign( + algorithm: string | null | undefined, + data: BinaryLike, + key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput, + callback: (error: Error | null, data: NonSharedBuffer) => void, + ): void; + /** + * Verifies the given signature for `data` using the given key and algorithm. If + * `algorithm` is `null` or `undefined`, then the algorithm is dependent upon the + * key type. + * + * `algorithm` is required to be `null` or `undefined` for Ed25519, Ed448, and + * ML-DSA. + * + * If `key` is not a `KeyObject`, this function behaves as if `key` had been + * passed to `crypto.createPublicKey()`. When `key` is a string, `ArrayBuffer`, + * `Buffer`, `TypedArray`, or `DataView`, it must contain PEM-encoded key + * material. If it is an object, the following additional properties can be + * passed: + * + * The `signature` argument is the previously calculated signature for the `data`. + * + * Because public keys can be derived from private keys, a private key or a public + * key may be passed for `key`. + * + * If the `callback` function is provided this function uses libuv's threadpool. + * @since v12.0.0 + */ + function verify( + algorithm: string | null | undefined, + data: BinaryLike, + key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, + signature: BinaryLike, + ): boolean; + function verify( + algorithm: string | null | undefined, + data: BinaryLike, + key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, + signature: BinaryLike, + callback: (error: Error | null, result: boolean) => void, + ): void; + /** + * Key decapsulation using a KEM algorithm with a private key. + * + * Supported key types and their KEM algorithms are: + * + * * `'rsa'` RSA Secret Value Encapsulation + * * `'ec'` DHKEM(P-256, HKDF-SHA256), DHKEM(P-384, HKDF-SHA256), DHKEM(P-521, HKDF-SHA256) + * * `'x25519'` DHKEM(X25519, HKDF-SHA256) + * * `'x448'` DHKEM(X448, HKDF-SHA512) + * * `'ml-kem-512'` ML-KEM + * * `'ml-kem-768'` ML-KEM + * * `'ml-kem-1024'` ML-KEM + * + * If `key` is not a {@link KeyObject}, this function behaves as if `key` had been + * passed to `crypto.createPrivateKey()`. + * + * If the `callback` function is provided this function uses libuv's threadpool. + * @since v24.7.0 + */ + function decapsulate( + key: KeyLike | PrivateKeyInput | RawPrivateKeyInput | JsonWebKeyInput, + ciphertext: ArrayBufferLike | NodeJS.ArrayBufferView, + ): NonSharedBuffer; + function decapsulate( + key: KeyLike | PrivateKeyInput | RawPrivateKeyInput | JsonWebKeyInput, + ciphertext: ArrayBufferLike | NodeJS.ArrayBufferView, + callback: (err: Error, sharedKey: NonSharedBuffer) => void, + ): void; + interface DiffieHellmanOptions { + privateKey: KeyLike | PrivateKeyInput; + publicKey: KeyLike | PublicKeyInput; + } + /** + * Computes the Diffie-Hellman shared secret based on a `privateKey` and a `publicKey`. + * Both keys must have the same `asymmetricKeyType` and must support either the DH or + * ECDH operation. + * + * If the `callback` function is provided this function uses libuv's threadpool. + * @since v13.9.0, v12.17.0 + */ + function diffieHellman(options: DiffieHellmanOptions): NonSharedBuffer; + function diffieHellman( + options: DiffieHellmanOptions, + callback: (err: Error | null, secret: NonSharedBuffer) => void, + ): void; + /** + * Key encapsulation using a KEM algorithm with a public key. + * + * Supported key types and their KEM algorithms are: + * + * * `'rsa'` RSA Secret Value Encapsulation + * * `'ec'` DHKEM(P-256, HKDF-SHA256), DHKEM(P-384, HKDF-SHA256), DHKEM(P-521, HKDF-SHA256) + * * `'x25519'` DHKEM(X25519, HKDF-SHA256) + * * `'x448'` DHKEM(X448, HKDF-SHA512) + * * `'ml-kem-512'` ML-KEM + * * `'ml-kem-768'` ML-KEM + * * `'ml-kem-1024'` ML-KEM + * + * If `key` is not a {@link KeyObject}, this function behaves as if `key` had been + * passed to `crypto.createPublicKey()`. + * + * If the `callback` function is provided this function uses libuv's threadpool. + * @since v24.7.0 + */ + function encapsulate( + key: KeyLike | PublicKeyInput | RawPublicKeyInput | JsonWebKeyInput, + ): { sharedKey: NonSharedBuffer; ciphertext: NonSharedBuffer }; + function encapsulate( + key: KeyLike | PublicKeyInput | RawPublicKeyInput | JsonWebKeyInput, + callback: (err: Error, result: { sharedKey: NonSharedBuffer; ciphertext: NonSharedBuffer }) => void, + ): void; + interface OneShotDigestOptions { + /** + * Encoding used to encode the returned digest. + * @default 'hex' + */ + outputEncoding?: BufferEncoding | "buffer" | undefined; + /** + * For XOF hash functions such as 'shake256', the outputLength option + * can be used to specify the desired output length in bytes. + */ + outputLength?: number | undefined; + } + interface OneShotDigestOptionsWithStringEncoding extends OneShotDigestOptions { + outputEncoding?: BufferEncoding | undefined; + } + interface OneShotDigestOptionsWithBufferEncoding extends OneShotDigestOptions { + outputEncoding: "buffer"; + } + /** + * A utility for creating one-shot hash digests of data. It can be faster than + * the object-based `crypto.createHash()` when hashing a smaller amount of data + * (<= 5MB) that's readily available. If the data can be big or if it is streamed, + * it's still recommended to use `crypto.createHash()` instead. + * + * The `algorithm` is dependent on the available algorithms supported by the + * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. + * On recent releases of OpenSSL, `openssl list -digest-algorithms` will + * display the available digest algorithms. + * + * If `options` is a string, then it specifies the `outputEncoding`. + * + * Example: + * + * ```js + * import crypto from 'node:crypto'; + * import { Buffer } from 'node:buffer'; + * + * // Hashing a string and return the result as a hex-encoded string. + * const string = 'Node.js'; + * // 10b3493287f831e81a438811a1ffba01f8cec4b7 + * console.log(crypto.hash('sha1', string)); + * + * // Encode a base64-encoded string into a Buffer, hash it and return + * // the result as a buffer. + * const base64 = 'Tm9kZS5qcw=='; + * // + * console.log(crypto.hash('sha1', Buffer.from(base64, 'base64'), 'buffer')); + * ``` + * @since v21.7.0, v20.12.0 + * @param data When `data` is a string, it will be encoded as UTF-8 before being hashed. If a different + * input encoding is desired for a string input, user could encode the string + * into a `TypedArray` using either `TextEncoder` or `Buffer.from()` and passing + * the encoded `TypedArray` into this API instead. + */ + function hash( + algorithm: string, + data: BinaryLike, + options?: OneShotDigestOptionsWithStringEncoding | BufferEncoding, + ): string; + function hash( + algorithm: string, + data: BinaryLike, + options: OneShotDigestOptionsWithBufferEncoding | "buffer", + ): NonSharedBuffer; + function hash( + algorithm: string, + data: BinaryLike, + options: OneShotDigestOptions | BufferEncoding | "buffer", + ): string | NonSharedBuffer; + type CipherMode = "cbc" | "ccm" | "cfb" | "ctr" | "ecb" | "gcm" | "ocb" | "ofb" | "stream" | "wrap" | "xts"; + interface CipherInfoOptions { + /** + * A test key length. + */ + keyLength?: number | undefined; + /** + * A test IV length. + */ + ivLength?: number | undefined; + } + interface CipherInfo { + name: string; + nid: number; + blockSize?: number; + ivLength?: number; + keyLength: number; + mode: CipherMode; + } + /** + * Returns information about a given cipher. + * + * Some ciphers accept variable length keys and initialization vectors. By default, + * the `crypto.getCipherInfo()` method will return the default values for these + * ciphers. To test if a given key length or iv length is acceptable for given + * cipher, use the `keyLength` and `ivLength` options. If the given values are + * unacceptable, `undefined` will be returned. + * @since v15.0.0 + * @param nameOrNid The name or nid of the cipher to query. + */ + function getCipherInfo(nameOrNid: string | number, options?: CipherInfoOptions): CipherInfo | undefined; + /** + * HKDF is a simple key derivation function defined in RFC 5869\. The given `ikm`, `salt` and `info` are used with the `digest` to derive a key of `keylen` bytes. + * + * The supplied `callback` function is called with two arguments: `err` and `derivedKey`. If an errors occurs while deriving the key, `err` will be set; + * otherwise `err` will be `null`. The successfully generated `derivedKey` will + * be passed to the callback as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). An error will be thrown if any + * of the input arguments specify invalid values or types. + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { + * hkdf, + * } = await import('node:crypto'); + * + * hkdf('sha512', 'key', 'salt', 'info', 64, (err, derivedKey) => { + * if (err) throw err; + * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653' + * }); + * ``` + * @since v15.0.0 + * @param digest The digest algorithm to use. + * @param ikm The input keying material. Must be provided but can be zero-length. + * @param salt The salt value. Must be provided but can be zero-length. + * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes. + * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512` + * generates 64-byte hashes, making the maximum HKDF output 16320 bytes). + */ + function hkdf( + digest: string, + ikm: KeyLike, + salt: BinaryLike, + info: BinaryLike, + keylen: number, + callback: (err: Error | null, derivedKey: ArrayBuffer) => void, + ): void; + /** + * Provides a synchronous HKDF key derivation function as defined in RFC 5869\. The + * given `ikm`, `salt` and `info` are used with the `digest` to derive a key of `keylen` bytes. + * + * The successfully generated `derivedKey` will be returned as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). + * + * An error will be thrown if any of the input arguments specify invalid values or + * types, or if the derived key cannot be generated. + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { + * hkdfSync, + * } = await import('node:crypto'); + * + * const derivedKey = hkdfSync('sha512', 'key', 'salt', 'info', 64); + * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653' + * ``` + * @since v15.0.0 + * @param digest The digest algorithm to use. + * @param ikm The input keying material. Must be provided but can be zero-length. + * @param salt The salt value. Must be provided but can be zero-length. + * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes. + * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512` + * generates 64-byte hashes, making the maximum HKDF output 16320 bytes). + */ + function hkdfSync( + digest: string, + ikm: KeyLike, + salt: BinaryLike, + info: BinaryLike, + keylen: number, + ): ArrayBuffer; + interface SecureHeapUsage { + total: number; + min: number; + used: number; + utilization: number; + } + /** + * @since v15.6.0 + */ + function secureHeapUsed(): SecureHeapUsage; + interface RandomUUIDOptions { + /** + * By default, to improve performance, + * Node.js will pre-emptively generate and persistently cache enough + * random data to generate up to 128 random UUIDs. To generate a UUID + * without using the cache, set `disableEntropyCache` to `true`. + * @default `false` + */ + disableEntropyCache?: boolean | undefined; + } + interface RandomUUIDV7Options extends RandomUUIDOptions {} + type UUID = `${string}-${string}-${string}-${string}-${string}`; + /** + * Generates a random [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) version 4 UUID. The UUID is generated using a + * cryptographic pseudorandom number generator. + * @since v15.6.0, v14.17.0 + */ + function randomUUID(options?: RandomUUIDOptions): UUID; + /** + * Generates a random [RFC 9562](https://www.rfc-editor.org/rfc/rfc9562.txt) version 7 UUID. The UUID contains a millisecond + * precision Unix timestamp in the most significant 48 bits, followed by + * cryptographically secure random bits for the remaining fields, making it + * suitable for use as a database key with time-based sorting. The embedded + * timestamp relies on a non-monotonic clock and is not guaranteed to be strictly + * increasing. + * @since v26.1.0 + */ + function randomUUIDv7(options?: RandomUUIDV7Options): UUID; + interface X509CheckOptions { + subject?: "always" | "default" | "never" | undefined; + wildcards?: boolean | undefined; + partialWildcards?: boolean | undefined; + multiLabelWildcards?: boolean | undefined; + singleLabelSubdomains?: boolean | undefined; + } + /** + * Encapsulates an X509 certificate and provides read-only access to + * its information. + * + * ```js + * const { X509Certificate } = await import('node:crypto'); + * + * const x509 = new X509Certificate('{... pem encoded cert ...}'); + * + * console.log(x509.subject); + * ``` + * @since v15.6.0 + */ + class X509Certificate { + /** + * Will be \`true\` if this is a Certificate Authority (CA) certificate. + * @since v15.6.0 + */ + readonly ca: boolean; + /** + * The SHA-1 fingerprint of this certificate. + * + * Because SHA-1 is cryptographically broken and because the security of SHA-1 is + * significantly worse than that of algorithms that are commonly used to sign + * certificates, consider using `x509.fingerprint256` instead. + * @since v15.6.0 + */ + readonly fingerprint: string; + /** + * The SHA-256 fingerprint of this certificate. + * @since v15.6.0 + */ + readonly fingerprint256: string; + /** + * The SHA-512 fingerprint of this certificate. + * + * Because computing the SHA-256 fingerprint is usually faster and because it is + * only half the size of the SHA-512 fingerprint, `x509.fingerprint256` may be + * a better choice. While SHA-512 presumably provides a higher level of security in + * general, the security of SHA-256 matches that of most algorithms that are + * commonly used to sign certificates. + * @since v17.2.0, v16.14.0 + */ + readonly fingerprint512: string; + /** + * The complete subject of this certificate. + * @since v15.6.0 + */ + readonly subject: string; + /** + * The subject alternative name specified for this certificate. + * + * This is a comma-separated list of subject alternative names. Each entry begins + * with a string identifying the kind of the subject alternative name followed by + * a colon and the value associated with the entry. + * + * Earlier versions of Node.js incorrectly assumed that it is safe to split this + * property at the two-character sequence `', '` (see [CVE-2021-44532](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44532)). However, + * both malicious and legitimate certificates can contain subject alternative names + * that include this sequence when represented as a string. + * + * After the prefix denoting the type of the entry, the remainder of each entry + * might be enclosed in quotes to indicate that the value is a JSON string literal. + * For backward compatibility, Node.js only uses JSON string literals within this + * property when necessary to avoid ambiguity. Third-party code should be prepared + * to handle both possible entry formats. + * @since v15.6.0 + */ + readonly subjectAltName: string | undefined; + /** + * A textual representation of the certificate's authority information access + * extension. + * + * This is a line feed separated list of access descriptions. Each line begins with + * the access method and the kind of the access location, followed by a colon and + * the value associated with the access location. + * + * After the prefix denoting the access method and the kind of the access location, + * the remainder of each line might be enclosed in quotes to indicate that the + * value is a JSON string literal. For backward compatibility, Node.js only uses + * JSON string literals within this property when necessary to avoid ambiguity. + * Third-party code should be prepared to handle both possible entry formats. + * @since v15.6.0 + */ + readonly infoAccess: string | undefined; + /** + * An array detailing the key usages for this certificate. + * @since v15.6.0 + */ + readonly keyUsage: string[]; + /** + * The issuer identification included in this certificate. + * @since v15.6.0 + */ + readonly issuer: string; + /** + * The issuer certificate or `undefined` if the issuer certificate is not + * available. + * @since v15.9.0 + */ + readonly issuerCertificate: X509Certificate | undefined; + /** + * The public key `KeyObject` for this certificate. + * @since v15.6.0 + */ + readonly publicKey: KeyObject; + /** + * A `Buffer` containing the DER encoding of this certificate. + * @since v15.6.0 + */ + readonly raw: NonSharedBuffer; + /** + * The serial number of this certificate. + * + * Serial numbers are assigned by certificate authorities and do not uniquely + * identify certificates. Consider using `x509.fingerprint256` as a unique + * identifier instead. + * @since v15.6.0 + */ + readonly serialNumber: string; + /** + * The algorithm used to sign the certificate or `undefined` if the signature algorithm is unknown by OpenSSL. + * @since v24.9.0 + */ + readonly signatureAlgorithm: string | undefined; + /** + * The OID of the algorithm used to sign the certificate. + * @since v24.9.0 + */ + readonly signatureAlgorithmOid: string; + /** + * The date/time from which this certificate is considered valid. + * @since v15.6.0 + */ + readonly validFrom: string; + /** + * The date/time from which this certificate is valid, encapsulated in a `Date` object. + * @since v22.10.0 + */ + readonly validFromDate: Date; + /** + * The date/time until which this certificate is considered valid. + * @since v15.6.0 + */ + readonly validTo: string; + /** + * The date/time until which this certificate is valid, encapsulated in a `Date` object. + * @since v22.10.0 + */ + readonly validToDate: Date; + constructor(buffer: string | NodeJS.ArrayBufferView); + /** + * Checks whether the certificate matches the given email address. + * + * If the `'subject'` option is undefined or set to `'default'`, the certificate + * subject is only considered if the subject alternative name extension either does + * not exist or does not contain any email addresses. + * + * If the `'subject'` option is set to `'always'` and if the subject alternative + * name extension either does not exist or does not contain a matching email + * address, the certificate subject is considered. + * + * If the `'subject'` option is set to `'never'`, the certificate subject is never + * considered, even if the certificate contains no subject alternative names. + * @since v15.6.0 + * @return Returns `email` if the certificate matches, `undefined` if it does not. + */ + checkEmail(email: string, options?: Pick): string | undefined; + /** + * Checks whether the certificate matches the given host name. + * + * If the certificate matches the given host name, the matching subject name is + * returned. The returned name might be an exact match (e.g., `foo.example.com`) + * or it might contain wildcards (e.g., `*.example.com`). Because host name + * comparisons are case-insensitive, the returned subject name might also differ + * from the given `name` in capitalization. + * + * If the `'subject'` option is undefined or set to `'default'`, the certificate + * subject is only considered if the subject alternative name extension either does + * not exist or does not contain any DNS names. This behavior is consistent with [RFC 2818](https://www.rfc-editor.org/rfc/rfc2818.txt) ("HTTP Over TLS"). + * + * If the `'subject'` option is set to `'always'` and if the subject alternative + * name extension either does not exist or does not contain a matching DNS name, + * the certificate subject is considered. + * + * If the `'subject'` option is set to `'never'`, the certificate subject is never + * considered, even if the certificate contains no subject alternative names. + * @since v15.6.0 + * @return Returns a subject name that matches `name`, or `undefined` if no subject name matches `name`. + */ + checkHost(name: string, options?: X509CheckOptions): string | undefined; + /** + * Checks whether the certificate matches the given IP address (IPv4 or IPv6). + * + * Only [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280.txt) `iPAddress` subject alternative names are considered, and they + * must match the given `ip` address exactly. Other subject alternative names as + * well as the subject field of the certificate are ignored. + * @since v15.6.0 + * @return Returns `ip` if the certificate matches, `undefined` if it does not. + */ + checkIP(ip: string): string | undefined; + /** + * Checks whether this certificate was potentially issued by the given `otherCert` + * by comparing the certificate metadata. + * + * This is useful for pruning a list of possible issuer certificates which have been + * selected using a more rudimentary filtering routine, i.e. just based on subject + * and issuer names. + * + * Finally, to verify that this certificate's signature was produced by a private key + * corresponding to `otherCert`'s public key use `x509.verify(publicKey)` + * with `otherCert`'s public key represented as a `KeyObject` + * like so + * + * ```js + * if (!x509.verify(otherCert.publicKey)) { + * throw new Error('otherCert did not issue x509'); + * } + * ``` + * @since v15.6.0 + */ + checkIssued(otherCert: X509Certificate): boolean; + /** + * Checks whether the public key for this certificate is consistent with + * the given private key. + * @since v15.6.0 + * @param privateKey A private key. + */ + checkPrivateKey(privateKey: KeyObject): boolean; + /** + * There is no standard JSON encoding for X509 certificates. The`toJSON()` method returns a string containing the PEM encoded + * certificate. + * @since v15.6.0 + */ + toJSON(): string; + /** + * Returns information about this certificate using the legacy `certificate object` encoding. + * @since v15.6.0 + */ + toLegacyObject(): PeerCertificate; + /** + * Returns the PEM-encoded certificate. + * @since v15.6.0 + */ + toString(): string; + /** + * Verifies that this certificate was signed by the given public key. + * Does not perform any other validation checks on the certificate. + * @since v15.6.0 + * @param publicKey A public key. + */ + verify(publicKey: KeyObject): boolean; + } + type LargeNumberLike = ArrayBufferLike | NodeJS.ArrayBufferView | bigint; + interface GeneratePrimeOptions { + add?: LargeNumberLike | undefined; + rem?: LargeNumberLike | undefined; + safe?: boolean | undefined; + bigint?: boolean | undefined; + } + interface GeneratePrimeOptionsBigInt extends GeneratePrimeOptions { + bigint: true; + } + interface GeneratePrimeOptionsArrayBuffer extends GeneratePrimeOptions { + bigint?: false | undefined; + } + /** + * Generates a pseudorandom prime of `size` bits. + * + * If `options.safe` is `true`, the prime will be a safe prime -- that is, `(prime - 1) / 2` will also be a prime. + * + * The `options.add` and `options.rem` parameters can be used to enforce additional + * requirements, e.g., for Diffie-Hellman: + * + * * If `options.add` and `options.rem` are both set, the prime will satisfy the + * condition that `prime % add = rem`. + * * If only `options.add` is set and `options.safe` is not `true`, the prime will + * satisfy the condition that `prime % add = 1`. + * * If only `options.add` is set and `options.safe` is set to `true`, the prime + * will instead satisfy the condition that `prime % add = 3`. This is necessary + * because `prime % add = 1` for `options.add > 2` would contradict the condition + * enforced by `options.safe`. + * * `options.rem` is ignored if `options.add` is not given. + * + * Both `options.add` and `options.rem` must be encoded as big-endian sequences + * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or `DataView`. + * + * By default, the prime is encoded as a big-endian sequence of octets + * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a + * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided. + * @since v15.8.0 + * @param size The size (in bits) of the prime to generate. + */ + function generatePrime(size: number, callback: (err: Error | null, prime: ArrayBuffer) => void): void; + function generatePrime( + size: number, + options: GeneratePrimeOptionsArrayBuffer, + callback: (err: Error | null, prime: ArrayBuffer) => void, + ): void; + function generatePrime( + size: number, + options: GeneratePrimeOptionsBigInt, + callback: (err: Error | null, prime: bigint) => void, + ): void; + function generatePrime( + size: number, + options: GeneratePrimeOptions, + callback: (err: Error | null, prime: ArrayBuffer | bigint) => void, + ): void; + /** + * Generates a pseudorandom prime of `size` bits. + * + * If `options.safe` is `true`, the prime will be a safe prime -- that is, `(prime - 1) / 2` will also be a prime. + * + * The `options.add` and `options.rem` parameters can be used to enforce additional + * requirements, e.g., for Diffie-Hellman: + * + * * If `options.add` and `options.rem` are both set, the prime will satisfy the + * condition that `prime % add = rem`. + * * If only `options.add` is set and `options.safe` is not `true`, the prime will + * satisfy the condition that `prime % add = 1`. + * * If only `options.add` is set and `options.safe` is set to `true`, the prime + * will instead satisfy the condition that `prime % add = 3`. This is necessary + * because `prime % add = 1` for `options.add > 2` would contradict the condition + * enforced by `options.safe`. + * * `options.rem` is ignored if `options.add` is not given. + * + * Both `options.add` and `options.rem` must be encoded as big-endian sequences + * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or `DataView`. + * + * By default, the prime is encoded as a big-endian sequence of octets + * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a + * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided. + * @since v15.8.0 + * @param size The size (in bits) of the prime to generate. + */ + function generatePrimeSync(size: number): ArrayBuffer; + function generatePrimeSync(size: number, options: GeneratePrimeOptionsArrayBuffer): ArrayBuffer; + function generatePrimeSync(size: number, options: GeneratePrimeOptionsBigInt): bigint; + function generatePrimeSync(size: number, options: GeneratePrimeOptions): ArrayBuffer | bigint; + interface CheckPrimeOptions { + /** + * The number of Miller-Rabin probabilistic primality iterations to perform. + * When the value is 0 (zero), a number of checks is used that yields a false positive rate of at most `2**-64` for random input. + * Care must be used when selecting a number of checks. + * Refer to the OpenSSL documentation for the BN_is_prime_ex function nchecks options for more details. + * @default 0 + */ + checks?: number | undefined; + } + /** + * Checks the primality of the `candidate`. + * @since v15.8.0 + * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length. + */ + function checkPrime(value: LargeNumberLike, callback: (err: Error | null, result: boolean) => void): void; + function checkPrime( + value: LargeNumberLike, + options: CheckPrimeOptions, + callback: (err: Error | null, result: boolean) => void, + ): void; + /** + * Checks the primality of the `candidate`. + * @since v15.8.0 + * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length. + * @return `true` if the candidate is a prime with an error probability less than `0.25 ** options.checks`. + */ + function checkPrimeSync(candidate: LargeNumberLike, options?: CheckPrimeOptions): boolean; + /** + * Load and set the `engine` for some or all OpenSSL functions (selected by flags). + * + * `engine` could be either an id or a path to the engine's shared library. + * + * The optional `flags` argument uses `ENGINE_METHOD_ALL` by default. The `flags` is a bit field taking one of or a mix of the following flags (defined in `crypto.constants`): + * + * * `crypto.constants.ENGINE_METHOD_RSA` + * * `crypto.constants.ENGINE_METHOD_DSA` + * * `crypto.constants.ENGINE_METHOD_DH` + * * `crypto.constants.ENGINE_METHOD_RAND` + * * `crypto.constants.ENGINE_METHOD_EC` + * * `crypto.constants.ENGINE_METHOD_CIPHERS` + * * `crypto.constants.ENGINE_METHOD_DIGESTS` + * * `crypto.constants.ENGINE_METHOD_PKEY_METHS` + * * `crypto.constants.ENGINE_METHOD_PKEY_ASN1_METHS` + * * `crypto.constants.ENGINE_METHOD_ALL` + * * `crypto.constants.ENGINE_METHOD_NONE` + * @since v0.11.11 + * @param flags + */ + function setEngine(engine: string, flags?: number): void; + /** + * A convenient alias for {@link webcrypto.getRandomValues}. This + * implementation is not compliant with the Web Crypto spec, to write + * web-compatible code use {@link webcrypto.getRandomValues} instead. + * @since v17.4.0 + * @return Returns `typedArray`. + */ + function getRandomValues< + T extends Exclude< + NodeJS.NonSharedTypedArray, + NodeJS.NonSharedFloat16Array | NodeJS.NonSharedFloat32Array | NodeJS.NonSharedFloat64Array + >, + >(typedArray: T): T; + type Argon2Algorithm = "argon2d" | "argon2i" | "argon2id"; + interface Argon2Parameters { + message: BinaryLike; + nonce: BinaryLike; + parallelism: number; + tagLength: number; + memory: number; + passes: number; + secret?: BinaryLike | undefined; + associatedData?: BinaryLike | undefined; + } + /** + * Provides an asynchronous [Argon2](https://www.rfc-editor.org/rfc/rfc9106.html) implementation. Argon2 is a password-based + * key derivation function that is designed to be expensive computationally and + * memory-wise in order to make brute-force attacks unrewarding. + * + * The `nonce` should be as unique as possible. It is recommended that a nonce is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `message`, `nonce`, `secret` or `associatedData`, please + * consider [caveats when using strings as inputs to cryptographic APIs](https://nodejs.org/docs/latest-v26.x/api/crypto.html#using-strings-as-inputs-to-cryptographic-apis). + * + * The `callback` function is called with two arguments: `err` and `derivedKey`. + * `err` is an exception object when key derivation fails, otherwise `err` is + * `null`. `derivedKey` is passed to the callback as a `Buffer`. + * + * An exception is thrown when any of the input arguments specify invalid values + * or types. + * + * ```js + * const { argon2, randomBytes } = await import('node:crypto'); + * + * const parameters = { + * message: 'password', + * nonce: randomBytes(16), + * parallelism: 4, + * tagLength: 64, + * memory: 65536, + * passes: 3, + * }; + * + * argon2('argon2id', parameters, (err, derivedKey) => { + * if (err) throw err; + * console.log(derivedKey.toString('hex')); // 'af91dad...9520f15' + * }); + * ``` + * @since v24.7.0 + * @param algorithm Variant of Argon2, one of `"argon2d"`, `"argon2i"` or `"argon2id"`. + */ + function argon2( + algorithm: Argon2Algorithm, + parameters: Argon2Parameters, + callback: (err: Error | null, derivedKey: NonSharedBuffer) => void, + ): void; + /** + * Provides a synchronous [Argon2][] implementation. Argon2 is a password-based + * key derivation function that is designed to be expensive computationally and + * memory-wise in order to make brute-force attacks unrewarding. + * + * The `nonce` should be as unique as possible. It is recommended that a nonce is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `message`, `nonce`, `secret` or `associatedData`, please + * consider [caveats when using strings as inputs to cryptographic APIs](https://nodejs.org/docs/latest-v26.x/api/crypto.html#using-strings-as-inputs-to-cryptographic-apis). + * + * An exception is thrown when key derivation fails, otherwise the derived key is + * returned as a `Buffer`. + * + * An exception is thrown when any of the input arguments specify invalid values + * or types. + * + * ```js + * const { argon2Sync, randomBytes } = await import('node:crypto'); + * + * const parameters = { + * message: 'password', + * nonce: randomBytes(16), + * parallelism: 4, + * tagLength: 64, + * memory: 65536, + * passes: 3, + * }; + * + * const derivedKey = argon2Sync('argon2id', parameters); + * console.log(derivedKey.toString('hex')); // 'af91dad...9520f15' + * ``` + * @since v24.7.0 + */ + function argon2Sync(algorithm: Argon2Algorithm, parameters: Argon2Parameters): NonSharedBuffer; + /** + * A convenient alias for `crypto.webcrypto.subtle`. + * @since v17.4.0 + */ + const subtle: webcrypto.SubtleCrypto; + /** + * An implementation of the Web Crypto API standard. + * + * See the {@link https://nodejs.org/docs/latest/api/webcrypto.html Web Crypto API documentation} for details. + * @since v15.0.0 + */ + const webcrypto: webcrypto.Crypto; + namespace webcrypto { + type AlgorithmIdentifier = Algorithm | string; + type BigInteger = NodeJS.NonSharedUint8Array; + type KeyFormat = "jwk" | "pkcs8" | "raw" | "raw-public" | "raw-secret" | "raw-seed" | "spki"; + type KeyType = "private" | "public" | "secret"; + type KeyUsage = + | "decapsulateBits" + | "decapsulateKey" + | "decrypt" + | "deriveBits" + | "deriveKey" + | "encapsulateBits" + | "encapsulateKey" + | "encrypt" + | "sign" + | "unwrapKey" + | "verify" + | "wrapKey"; + type HashAlgorithmIdentifier = AlgorithmIdentifier; + type NamedCurve = string; + interface AeadParams extends Algorithm { + additionalData?: NodeJS.BufferSource; + iv: NodeJS.BufferSource; + tagLength: number; + } + interface AesCbcParams extends Algorithm { + iv: NodeJS.BufferSource; + } + interface AesCtrParams extends Algorithm { + counter: NodeJS.BufferSource; + length: number; + } + interface AesDerivedKeyParams extends Algorithm { + length: number; + } + interface AesKeyAlgorithm extends KeyAlgorithm { + length: number; + } + interface AesKeyGenParams extends Algorithm { + length: number; + } + interface Algorithm { + name: string; + } + interface Argon2Params extends Algorithm { + associatedData?: NodeJS.BufferSource; + memory: number; + nonce: NodeJS.BufferSource; + parallelism: number; + passes: number; + secretValue?: NodeJS.BufferSource; + version?: number; + } + interface CShakeParams extends Algorithm { + customization?: NodeJS.BufferSource; + functionName?: NodeJS.BufferSource; + outputLength: number; + } + interface ContextParams extends Algorithm { + context?: NodeJS.BufferSource; + } + interface EcKeyAlgorithm extends KeyAlgorithm { + namedCurve: NamedCurve; + } + interface EcKeyGenParams extends Algorithm { + namedCurve: NamedCurve; + } + interface EcKeyImportParams extends Algorithm { + namedCurve: NamedCurve; + } + interface EcdhKeyDeriveParams extends Algorithm { + public: CryptoKey; + } + interface EcdsaParams extends Algorithm { + hash: HashAlgorithmIdentifier; + } + interface HkdfParams extends Algorithm { + hash: HashAlgorithmIdentifier; + info: NodeJS.BufferSource; + salt: NodeJS.BufferSource; + } + interface HmacImportParams extends Algorithm { + hash: HashAlgorithmIdentifier; + length?: number; + } + interface HmacKeyAlgorithm extends KeyAlgorithm { + hash: KeyAlgorithm; + length: number; + } + interface HmacKeyGenParams extends Algorithm { + hash: HashAlgorithmIdentifier; + length?: number; + } + interface KangarooTwelveParams { + customization?: NodeJS.BufferSource; + outputLength: number; + } + interface JsonWebKey { + alg?: string; + crv?: string; + d?: string; + dp?: string; + dq?: string; + e?: string; + ext?: boolean; + k?: string; + key_ops?: string[]; + kty?: string; + n?: string; + oth?: RsaOtherPrimesInfo[]; + p?: string; + q?: string; + qi?: string; + use?: string; + x?: string; + y?: string; + } + interface KeyAlgorithm { + name: string; + } + interface KmacImportParams extends Algorithm { + length?: number; + } + interface KmacKeyAlgorithm extends KeyAlgorithm { + length: number; + } + interface KmacKeyGenParams extends Algorithm { + length?: number; + } + interface KmacParams extends Algorithm { + customization?: NodeJS.BufferSource; + outputLength: number; + } + interface Pbkdf2Params extends Algorithm { + hash: HashAlgorithmIdentifier; + iterations: number; + salt: NodeJS.BufferSource; + } + interface RsaHashedImportParams extends Algorithm { + hash: HashAlgorithmIdentifier; + } + interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm { + hash: KeyAlgorithm; + } + interface RsaHashedKeyGenParams extends RsaKeyGenParams { + hash: HashAlgorithmIdentifier; + } + interface RsaKeyAlgorithm extends KeyAlgorithm { + modulusLength: number; + publicExponent: BigInteger; + } + interface RsaKeyGenParams extends Algorithm { + modulusLength: number; + publicExponent: BigInteger; + } + interface RsaOaepParams extends Algorithm { + label?: NodeJS.BufferSource; + } + interface RsaOtherPrimesInfo { + d?: string; + r?: string; + t?: string; + } + interface RsaPssParams extends Algorithm { + saltLength: number; + } + interface TurboShakeParams { + domainSeparation?: number; + outputLength: number; + } + interface Crypto { + readonly subtle: SubtleCrypto; + getRandomValues< + T extends Exclude< + NodeJS.NonSharedTypedArray, + NodeJS.NonSharedFloat16Array | NodeJS.NonSharedFloat32Array | NodeJS.NonSharedFloat64Array + >, + >( + typedArray: T, + ): T; + randomUUID(): UUID; + } + interface CryptoKey { + readonly algorithm: KeyAlgorithm; + readonly extractable: boolean; + readonly type: KeyType; + readonly usages: KeyUsage[]; + } + interface CryptoKeyPair { + privateKey: CryptoKey; + publicKey: CryptoKey; + } + interface EncapsulatedBits { + sharedKey: ArrayBuffer; + ciphertext: ArrayBuffer; + } + interface EncapsulatedKey { + sharedKey: CryptoKey; + ciphertext: ArrayBuffer; + } + interface SubtleCrypto { + decapsulateBits( + decapsulationAlgorithm: AlgorithmIdentifier, + decapsulationKey: CryptoKey, + ciphertext: NodeJS.BufferSource, + ): Promise; + decapsulateKey( + decapsulationAlgorithm: AlgorithmIdentifier, + decapsulationKey: CryptoKey, + ciphertext: NodeJS.BufferSource, + sharedKeyAlgorithm: AlgorithmIdentifier | HmacImportParams | AesDerivedKeyParams | KmacImportParams, + extractable: boolean, + keyUsages: KeyUsage[], + ): Promise; + decrypt( + algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams, + key: CryptoKey, + data: NodeJS.BufferSource, + ): Promise; + deriveBits( + algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params | Argon2Params, + baseKey: CryptoKey, + length?: number | null, + ): Promise; + deriveKey( + algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params | Argon2Params, + baseKey: CryptoKey, + derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | KmacImportParams, + extractable: boolean, + keyUsages: readonly KeyUsage[], + ): Promise; + digest( + algorithm: AlgorithmIdentifier | CShakeParams | TurboShakeParams | KangarooTwelveParams, + data: NodeJS.BufferSource, + ): Promise; + encapsulateBits( + encapsulationAlgorithm: AlgorithmIdentifier, + encapsulationKey: CryptoKey, + ): Promise; + encapsulateKey( + encapsulationAlgorithm: AlgorithmIdentifier, + encapsulationKey: CryptoKey, + sharedKeyAlgorithm: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | KmacImportParams, + extractable: boolean, + keyUsages: KeyUsage[], + ): Promise; + encrypt( + algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams, + key: CryptoKey, + data: NodeJS.BufferSource, + ): Promise; + exportKey(format: "jwk", key: CryptoKey): Promise; + exportKey(format: Exclude, key: CryptoKey): Promise; + exportKey(format: KeyFormat, key: CryptoKey): Promise; + generateKey( + algorithm: RsaHashedKeyGenParams | EcKeyGenParams, + extractable: boolean, + keyUsages: KeyUsage[], + ): Promise; + generateKey( + algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params | KmacKeyGenParams, + extractable: boolean, + keyUsages: KeyUsage[], + ): Promise; + generateKey( + algorithm: AlgorithmIdentifier, + extractable: boolean, + keyUsages: KeyUsage[], + ): Promise; + getPublicKey(key: CryptoKey, keyUsages: KeyUsage[]): Promise; + importKey( + format: "jwk", + keyData: JsonWebKey, + algorithm: + | AlgorithmIdentifier + | RsaHashedImportParams + | EcKeyImportParams + | HmacImportParams + | AesKeyAlgorithm + | KmacImportParams, + extractable: boolean, + keyUsages: KeyUsage[], + ): Promise; + importKey( + format: Exclude, + keyData: NodeJS.BufferSource, + algorithm: + | AlgorithmIdentifier + | RsaHashedImportParams + | EcKeyImportParams + | HmacImportParams + | AesKeyAlgorithm + | KmacImportParams, + extractable: boolean, + keyUsages: KeyUsage[], + ): Promise; + sign( + algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | ContextParams | KmacParams, + key: CryptoKey, + data: NodeJS.BufferSource, + ): Promise; + unwrapKey( + format: KeyFormat, + wrappedKey: NodeJS.BufferSource, + unwrappingKey: CryptoKey, + unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams, + unwrappedKeyAlgorithm: + | AlgorithmIdentifier + | RsaHashedImportParams + | EcKeyImportParams + | HmacImportParams + | AesKeyAlgorithm + | KmacImportParams, + extractable: boolean, + keyUsages: KeyUsage[], + ): Promise; + verify( + algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | ContextParams | KmacParams, + key: CryptoKey, + signature: NodeJS.BufferSource, + data: NodeJS.BufferSource, + ): Promise; + wrapKey( + format: KeyFormat, + key: CryptoKey, + wrappingKey: CryptoKey, + wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams, + ): Promise; + } + } + /** + * An object containing commonly used constants for crypto and security related + * operations. The specific constants currently defined are described in + * [Crypto constants](https://nodejs.org/docs/latest-v26.x/api/crypto.html#crypto-constants). + * @since v6.3.0 + */ + namespace constants { + const OPENSSL_VERSION_NUMBER: number; + const SSL_OP_ALL: number; + const SSL_OP_ALLOW_NO_DHE_KEX: number; + const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number; + const SSL_OP_CIPHER_SERVER_PREFERENCE: number; + const SSL_OP_CISCO_ANYCONNECT: number; + const SSL_OP_COOKIE_EXCHANGE: number; + const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number; + const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number; + const SSL_OP_LEGACY_SERVER_CONNECT: number; + const SSL_OP_NO_COMPRESSION: number; + const SSL_OP_NO_ENCRYPT_THEN_MAC: number; + const SSL_OP_NO_QUERY_MTU: number; + const SSL_OP_NO_RENEGOTIATION: number; + const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number; + const SSL_OP_NO_SSLv2: number; + const SSL_OP_NO_SSLv3: number; + const SSL_OP_NO_TICKET: number; + const SSL_OP_NO_TLSv1: number; + const SSL_OP_NO_TLSv1_1: number; + const SSL_OP_NO_TLSv1_2: number; + const SSL_OP_NO_TLSv1_3: number; + const SSL_OP_PRIORITIZE_CHACHA: number; + const SSL_OP_TLS_ROLLBACK_BUG: number; + const ENGINE_METHOD_RSA: number; + const ENGINE_METHOD_DSA: number; + const ENGINE_METHOD_DH: number; + const ENGINE_METHOD_RAND: number; + const ENGINE_METHOD_EC: number; + const ENGINE_METHOD_CIPHERS: number; + const ENGINE_METHOD_DIGESTS: number; + const ENGINE_METHOD_PKEY_METHS: number; + const ENGINE_METHOD_PKEY_ASN1_METHS: number; + const ENGINE_METHOD_ALL: number; + const ENGINE_METHOD_NONE: number; + const DH_CHECK_P_NOT_SAFE_PRIME: number; + const DH_CHECK_P_NOT_PRIME: number; + const DH_UNABLE_TO_CHECK_GENERATOR: number; + const DH_NOT_SUITABLE_GENERATOR: number; + const RSA_PKCS1_PADDING: number; + const RSA_NO_PADDING: number; + const RSA_PKCS1_OAEP_PADDING: number; + const RSA_X931_PADDING: number; + const RSA_PKCS1_PSS_PADDING: number; + const RSA_PSS_SALTLEN_DIGEST: number; + const RSA_PSS_SALTLEN_MAX_SIGN: number; + const RSA_PSS_SALTLEN_AUTO: number; + const TLS1_VERSION: number; + const TLS1_1_VERSION: number; + const TLS1_2_VERSION: number; + const TLS1_3_VERSION: number; + const POINT_CONVERSION_COMPRESSED: number; + const POINT_CONVERSION_UNCOMPRESSED: number; + const POINT_CONVERSION_HYBRID: number; + const defaultCipherList: string; + const defaultCoreCipherList: string; + } + // TODO: remove in future major version + /** @deprecated This type will be removed in a future version. Use `BufferEncoding` instead. */ + type BinaryToTextEncoding = "base64" | "base64url" | "hex" | "binary"; + /** @deprecated This type will be removed in a future version. Use `BufferEncoding` instead. */ + type CharacterEncoding = "utf8" | "utf-8" | "utf16le" | "utf-16le" | "latin1"; + /** @deprecated This type will be removed in a future version. Use `BufferEncoding` instead. */ + type LegacyCharacterEncoding = "ascii" | "binary" | "ucs2" | "ucs-2"; + /** @deprecated This type will be removed in a future version. Use `BufferEncoding` instead. */ + type Encoding = BufferEncoding; + /** @deprecated This type will be removed in a future version. Use `KeyLike` instead. */ + type CipherKey = KeyLike; + /** @deprecated This type will be removed in a future version. */ + interface RsaPrivateKey { + key: KeyLike; + passphrase?: string | undefined; + oaepHash?: string | undefined; + oaepLabel?: NodeJS.TypedArray | undefined; + padding?: number | undefined; + } + /** @deprecated This type will be removed in a future version. */ + interface RsaPublicKey { + key: KeyLike; + padding?: number | undefined; + } +} +declare module "crypto" { + export * from "node:crypto"; +} diff --git a/node_modules/@types/node/dgram.d.ts b/node_modules/@types/node/dgram.d.ts new file mode 100644 index 0000000..09ce785 --- /dev/null +++ b/node_modules/@types/node/dgram.d.ts @@ -0,0 +1,652 @@ +declare module "node:dgram" { + import { NonSharedBuffer } from "node:buffer"; + import * as dns from "node:dns"; + import { Abortable, EventEmitter, InternalEventEmitter } from "node:events"; + import { AddressInfo, BlockList } from "node:net"; + interface RemoteInfo { + address: string; + family: "IPv4" | "IPv6"; + port: number; + size: number; + } + interface BindOptions { + port?: number | undefined; + address?: string | undefined; + exclusive?: boolean | undefined; + fd?: number | undefined; + } + interface BindSyncOptions { + port?: number | undefined; + address?: string | undefined; + } + type SocketType = "udp4" | "udp6"; + interface SocketOptions extends Abortable { + type: SocketType; + reuseAddr?: boolean | undefined; + reusePort?: boolean | undefined; + /** + * @default false + */ + ipv6Only?: boolean | undefined; + recvBufferSize?: number | undefined; + sendBufferSize?: number | undefined; + lookup?: + | (( + hostname: string, + options: dns.LookupOneOptions, + callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, + ) => void) + | undefined; + receiveBlockList?: BlockList | undefined; + sendBlockList?: BlockList | undefined; + } + /** + * Creates a `dgram.Socket` object. Once the socket is created, calling `socket.bind()` will instruct the socket to begin listening for datagram + * messages. When `address` and `port` are not passed to `socket.bind()` the + * method will bind the socket to the "all interfaces" address on a random port + * (it does the right thing for both `udp4` and `udp6` sockets). The bound address + * and port can be retrieved using `socket.address().address` and `socket.address().port`. + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.close()` on the socket: + * + * ```js + * const controller = new AbortController(); + * const { signal } = controller; + * const server = dgram.createSocket({ type: 'udp4', signal }); + * server.on('message', (msg, rinfo) => { + * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); + * }); + * // Later, when you want to close the server. + * controller.abort(); + * ``` + * @since v0.11.13 + * @param options Available options are: + * @param callback Attached as a listener for `'message'` events. Optional. + */ + function createSocket(type: SocketType, callback?: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): Socket; + function createSocket(options: SocketOptions, callback?: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): Socket; + interface SocketEventMap { + "close": []; + "connect": []; + "error": [err: Error]; + "listening": []; + "message": [msg: NonSharedBuffer, rinfo: RemoteInfo]; + } + /** + * Encapsulates the datagram functionality. + * + * New instances of `dgram.Socket` are created using {@link createSocket}. + * The `new` keyword is not to be used to create `dgram.Socket` instances. + * @since v0.1.99 + */ + class Socket implements EventEmitter { + /** + * Tells the kernel to join a multicast group at the given `multicastAddress` and `multicastInterface` using the `IP_ADD_MEMBERSHIP` socket option. If the `multicastInterface` argument is not + * specified, the operating system will choose + * one interface and will add membership to it. To add membership to every + * available interface, call `addMembership` multiple times, once per interface. + * + * When called on an unbound socket, this method will implicitly bind to a random + * port, listening on all interfaces. + * + * When sharing a UDP socket across multiple `cluster` workers, the`socket.addMembership()` function must be called only once or an`EADDRINUSE` error will occur: + * + * ```js + * import cluster from 'node:cluster'; + * import dgram from 'node:dgram'; + * + * if (cluster.isPrimary) { + * cluster.fork(); // Works ok. + * cluster.fork(); // Fails with EADDRINUSE. + * } else { + * const s = dgram.createSocket('udp4'); + * s.bind(1234, () => { + * s.addMembership('224.0.0.114'); + * }); + * } + * ``` + * @since v0.6.9 + */ + addMembership(multicastAddress: string, multicastInterface?: string): void; + /** + * Returns an object containing the address information for a socket. + * For UDP sockets, this object will contain `address`, `family`, and `port` properties. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.1.99 + */ + address(): AddressInfo; + /** + * For UDP sockets, causes the `dgram.Socket` to listen for datagram + * messages on a named `port` and optional `address`. If `port` is not + * specified or is `0`, the operating system will attempt to bind to a + * random port. If `address` is not specified, the operating system will + * attempt to listen on all addresses. Once binding is complete, a + * `'listening'` event is emitted and the optional `callback` function is + * called. + * + * Specifying both a `'listening'` event listener and passing a + * `callback` to the `socket.bind()` method is not harmful but not very + * useful. + * + * A bound datagram socket keeps the Node.js process running to receive + * datagram messages. + * + * If binding fails, an `'error'` event is generated. In rare case (e.g. + * attempting to bind with a closed socket), an `Error` may be thrown. + * + * Example of a UDP server listening on port 41234: + * + * ```js + * import dgram from 'node:dgram'; + * + * const server = dgram.createSocket('udp4'); + * + * server.on('error', (err) => { + * console.error(`server error:\n${err.stack}`); + * server.close(); + * }); + * + * server.on('message', (msg, rinfo) => { + * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); + * }); + * + * server.on('listening', () => { + * const address = server.address(); + * console.log(`server listening ${address.address}:${address.port}`); + * }); + * + * server.bind(41234); + * // Prints: server listening 0.0.0.0:41234 + * ``` + * @since v0.1.99 + * @param callback with no parameters. Called when binding is complete. + */ + bind(port?: number, address?: string, callback?: () => void): this; + bind(port: number, callback: () => void): this; + bind(callback: () => void): this; + /** + * For UDP sockets, causes the `dgram.Socket` to listen for datagram + * messages on a named `port` and optional `address` that are passed as + * properties of an `options` object passed as the first argument. If + * `port` is not specified or is `0`, the operating system will attempt + * to bind to a random port. If `address` is not specified, the operating + * system will attempt to listen on all addresses. Once binding is + * complete, a `'listening'` event is emitted and the optional `callback` + * function is called. + * + * The `options` object may contain a `fd` property. When a `fd` greater + * than `0` is set, it will wrap around an existing socket with the given + * file descriptor. In this case, the properties of `port` and `address` + * will be ignored. + * + * Specifying both a `'listening'` event listener and passing a + * `callback` to the `socket.bind()` method is not harmful but not very + * useful. + * + * The `options` object may contain an additional `exclusive` property that is + * used when using `dgram.Socket` objects with the [`cluster`](https://nodejs.org/docs/latest-v26.x/api/cluster.html) module. When + * `exclusive` is set to `false` (the default), cluster workers will use the same + * underlying socket handle allowing connection handling duties to be shared. + * When `exclusive` is `true`, however, the handle is not shared and attempted + * port sharing results in an error. Creating a `dgram.Socket` with the `reusePort` + * option set to `true` causes `exclusive` to always be `true` when `socket.bind()` + * is called. + * + * A bound datagram socket keeps the Node.js process running to receive + * datagram messages. + * + * If binding fails, an `'error'` event is generated. In rare case (e.g. + * attempting to bind with a closed socket), an `Error` may be thrown. + * + * An example socket listening on an exclusive port is shown below. + * + * ```js + * socket.bind({ + * address: 'localhost', + * port: 8000, + * exclusive: true, + * }); + * ``` + * @since v0.11.14 + * @param options Required. Supports the following properties: + */ + bind(options: BindOptions, callback?: () => void): this; + /** + * The synchronous counterpart of `socket.bind()`. `bind(2)` is a local, + * non-blocking system call, so the bind is performed inline and the resolved + * address is returned immediately, including the operating-system-assigned + * ephemeral port when `port` is `0`: + * + * ```js + * const dgram = require('node:dgram'); + * + * const socket = dgram.createSocket('udp4'); + * const address = socket.bindSync({ address: '0.0.0.0', port: 0 }); + * console.log(address); // e.g. { address: '0.0.0.0', family: 'IPv4', port: 53124 } + * ``` + * + * A bind failure such as `EADDRINUSE` is thrown synchronously rather than emitted + * as an `'error'` event. After `bindSync()` returns, `socket.address()` is + * valid synchronously and the `'listening'` event is emitted on the next tick. + * + * `address` must be a numeric IP literal; `bindSync()` never performs DNS + * resolution (asynchronous name resolution being the only genuinely blocking part + * of binding). Incoming datagrams continue to be delivered asynchronously via the + * `'message'` event. `bindSync()` always binds the socket's own handle and + * does not participate in [`cluster`](https://nodejs.org/docs/latest-v26.x/api/cluster.html) handle sharing. + * @since v26.4.0 + * @returns The bound address as returned by `socket.address()`. + */ + bindSync(options?: BindSyncOptions): AddressInfo; + /** + * Close the underlying socket and stop listening for data on it. If a callback is + * provided, it is added as a listener for the `'close'` event. + * @since v0.1.99 + * @param callback Called when the socket has been closed. + */ + close(callback?: () => void): this; + /** + * Associates the `dgram.Socket` to a remote address and port. Every + * message sent by this handle is automatically sent to that destination. Also, + * the socket will only receive messages from that remote peer. + * Trying to call `connect()` on an already connected socket will result + * in an `ERR_SOCKET_DGRAM_IS_CONNECTED` exception. If `address` is not + * provided, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for `udp6` sockets) + * will be used by default. Once the connection is complete, a `'connect'` event + * is emitted and the optional `callback` function is called. In case of failure, + * the `callback` is called or, failing this, an `'error'` event is emitted. + * @since v12.0.0 + * @param callback Called when the connection is completed or on error. + */ + connect(port: number, address?: string, callback?: () => void): void; + connect(port: number, callback: () => void): void; + /** + * The synchronous counterpart of `socket.connect()`. For a UDP socket + * `connect(2)` only records the default peer address and is a local, non-blocking + * system call, so the association is performed inline. Any error raised by the + * call itself (for example `EAFNOSUPPORT` for a mismatched address family) is + * thrown synchronously rather than reported via the `'error'` event. Because + * `connect(2)` does not probe reachability, errors such as `ECONNREFUSED` are + * still surfaced asynchronously on a later send or receive, exactly as for + * `socket.connect()`: + * + * ```js + * const dgram = require('node:dgram'); + * + * const socket = dgram.createSocket('udp4'); + * socket.connectSync(41234, '127.0.0.1'); + * console.log(socket.remoteAddress()); // { address: '127.0.0.1', family: 'IPv4', port: 41234 } + * ``` + * + * If the socket is still unbound it is bound synchronously first. After + * `connectSync()` returns, `socket.remoteAddress()` is valid synchronously + * and the `'connect'` event is emitted on the next tick. Trying to call + * `connectSync()` on an already connected socket throws an + * `ERR_SOCKET_DGRAM_IS_CONNECTED` exception, and calling it while an + * asynchronous [`socket.bind()`][] is still in progress throws an + * `ERR_SOCKET_ALREADY_BOUND` exception. + * + * `address` must be a numeric IP literal; `connectSync()` never performs DNS + * resolution (asynchronous name resolution being the only genuinely blocking part + * of connecting). + * @since v26.4.0 + * @param address A numeric IP address to connect to. Unlike + * `socket.connect()`, no DNS resolution is performed, so a host name is not + * accepted. If omitted, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for + * `udp6` sockets) is used. + */ + connectSync(port: number, address?: string): void; + /** + * A synchronous function that disassociates a connected `dgram.Socket` from + * its remote address. Trying to call `disconnect()` on an unbound or already + * disconnected socket will result in an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception. + * @since v12.0.0 + */ + disconnect(): void; + /** + * Instructs the kernel to leave a multicast group at `multicastAddress` using the `IP_DROP_MEMBERSHIP` socket option. This method is automatically called by the + * kernel when the socket is closed or the process terminates, so most apps will + * never have reason to call this. + * + * If `multicastInterface` is not specified, the operating system will attempt to + * drop membership on all valid interfaces. + * @since v0.6.9 + */ + dropMembership(multicastAddress: string, multicastInterface?: string): void; + /** + * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. + * @since v8.7.0 + * @return the `SO_RCVBUF` socket receive buffer size in bytes. + */ + getRecvBufferSize(): number; + /** + * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. + * @since v8.7.0 + * @return the `SO_SNDBUF` socket send buffer size in bytes. + */ + getSendBufferSize(): number; + /** + * @since v18.8.0, v16.19.0 + * @return Number of bytes queued for sending. + */ + getSendQueueSize(): number; + /** + * @since v18.8.0, v16.19.0 + * @return Number of send requests currently in the queue awaiting to be processed. + */ + getSendQueueCount(): number; + /** + * By default, binding a socket will cause it to block the Node.js process from + * exiting as long as the socket is open. The `socket.unref()` method can be used + * to exclude the socket from the reference counting that keeps the Node.js + * process active. The `socket.ref()` method adds the socket back to the reference + * counting and restores the default behavior. + * + * Calling `socket.ref()` multiples times will have no additional effect. + * + * The `socket.ref()` method returns a reference to the socket so calls can be + * chained. + * @since v0.9.1 + */ + ref(): this; + /** + * Returns an object containing the `address`, `family`, and `port` of the remote + * endpoint. This method throws an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception + * if the socket is not connected. + * @since v12.0.0 + */ + remoteAddress(): AddressInfo; + /** + * Broadcasts a datagram on the socket. + * For connectionless sockets, the destination `port` and `address` must be + * specified. Connected sockets, on the other hand, will use their associated + * remote endpoint, so the `port` and `address` arguments must not be set. + * + * The `msg` argument contains the message to be sent. + * Depending on its type, different behavior can apply. If `msg` is a `Buffer`, + * any `TypedArray` or a `DataView`, + * the `offset` and `length` specify the offset within the `Buffer` where the + * message begins and the number of bytes in the message, respectively. + * If `msg` is a `String`, then it is automatically converted to a `Buffer` with `'utf8'` encoding. With messages that + * contain multi-byte characters, `offset` and `length` will be calculated with + * respect to `byte length` and not the character position. + * If `msg` is an array, `offset` and `length` must not be specified. + * + * The `address` argument is a string. If the value of `address` is a host name, + * DNS will be used to resolve the address of the host. If `address` is not + * provided or otherwise nullish, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for `udp6` sockets) will be used by default. + * + * If the socket has not been previously bound with a call to `bind`, the socket + * is assigned a random port number and is bound to the "all interfaces" address + * (`'0.0.0.0'` for `udp4` sockets, `'::0'` for `udp6` sockets.) + * + * An optional `callback` function may be specified to as a way of reporting + * DNS errors or for determining when it is safe to reuse the `buf` object. + * DNS lookups delay the time to send for at least one tick of the + * Node.js event loop. + * + * The only way to know for sure that the datagram has been sent is by using a `callback`. If an error occurs and a `callback` is given, the error will be + * passed as the first argument to the `callback`. If a `callback` is not given, + * the error is emitted as an `'error'` event on the `socket` object. + * + * Offset and length are optional but both _must_ be set if either are used. + * They are supported only when the first argument is a `Buffer`, a `TypedArray`, + * or a `DataView`. + * + * This method throws `ERR_SOCKET_BAD_PORT` if called on an unbound socket. + * + * Example of sending a UDP packet to a port on `localhost`; + * + * ```js + * import dgram from 'node:dgram'; + * import { Buffer } from 'node:buffer'; + * + * const message = Buffer.from('Some bytes'); + * const client = dgram.createSocket('udp4'); + * client.send(message, 41234, 'localhost', (err) => { + * client.close(); + * }); + * ``` + * + * Example of sending a UDP packet composed of multiple buffers to a port on`127.0.0.1`; + * + * ```js + * import dgram from 'node:dgram'; + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from('Some '); + * const buf2 = Buffer.from('bytes'); + * const client = dgram.createSocket('udp4'); + * client.send([buf1, buf2], 41234, (err) => { + * client.close(); + * }); + * ``` + * + * Sending multiple buffers might be faster or slower depending on the + * application and operating system. Run benchmarks to + * determine the optimal strategy on a case-by-case basis. Generally speaking, + * however, sending multiple buffers is faster. + * + * Example of sending a UDP packet using a socket connected to a port on `localhost`: + * + * ```js + * import dgram from 'node:dgram'; + * import { Buffer } from 'node:buffer'; + * + * const message = Buffer.from('Some bytes'); + * const client = dgram.createSocket('udp4'); + * client.connect(41234, 'localhost', (err) => { + * client.send(message, (err) => { + * client.close(); + * }); + * }); + * ``` + * @since v0.1.99 + * @param msg Message to be sent. + * @param offset Offset in the buffer where the message starts. + * @param length Number of bytes in the message. + * @param port Destination port. + * @param address Destination host name or IP address. + * @param callback Called when the message has been sent. + */ + send( + msg: string | NodeJS.ArrayBufferView | readonly any[], + port?: number, + address?: string, + callback?: (error: Error | null, bytes: number) => void, + ): void; + send( + msg: string | NodeJS.ArrayBufferView | readonly any[], + port?: number, + callback?: (error: Error | null, bytes: number) => void, + ): void; + send( + msg: string | NodeJS.ArrayBufferView | readonly any[], + callback?: (error: Error | null, bytes: number) => void, + ): void; + send( + msg: string | NodeJS.ArrayBufferView, + offset: number, + length: number, + port?: number, + address?: string, + callback?: (error: Error | null, bytes: number) => void, + ): void; + send( + msg: string | NodeJS.ArrayBufferView, + offset: number, + length: number, + port?: number, + callback?: (error: Error | null, bytes: number) => void, + ): void; + send( + msg: string | NodeJS.ArrayBufferView, + offset: number, + length: number, + callback?: (error: Error | null, bytes: number) => void, + ): void; + /** + * Sets or clears the `SO_BROADCAST` socket option. When set to `true`, UDP + * packets may be sent to a local interface's broadcast address. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.6.9 + */ + setBroadcast(flag: boolean): void; + /** + * _All references to scope in this section are referring to [IPv6 Zone Indices](https://en.wikipedia.org/wiki/IPv6_address#Scoped_literal_IPv6_addresses), which are defined by [RFC + * 4007](https://tools.ietf.org/html/rfc4007). In string form, an IP_ + * _with a scope index is written as `'IP%scope'` where scope is an interface name_ + * _or interface number._ + * + * Sets the default outgoing multicast interface of the socket to a chosen + * interface or back to system interface selection. The `multicastInterface` must + * be a valid string representation of an IP from the socket's family. + * + * For IPv4 sockets, this should be the IP configured for the desired physical + * interface. All packets sent to multicast on the socket will be sent on the + * interface determined by the most recent successful use of this call. + * + * For IPv6 sockets, `multicastInterface` should include a scope to indicate the + * interface as in the examples that follow. In IPv6, individual `send` calls can + * also use explicit scope in addresses, so only packets sent to a multicast + * address without specifying an explicit scope are affected by the most recent + * successful use of this call. + * + * This method throws `EBADF` if called on an unbound socket. + * + * #### Example: IPv6 outgoing multicast interface + * + * On most systems, where scope format uses the interface name: + * + * ```js + * const socket = dgram.createSocket('udp6'); + * + * socket.bind(1234, () => { + * socket.setMulticastInterface('::%eth1'); + * }); + * ``` + * + * On Windows, where scope format uses an interface number: + * + * ```js + * const socket = dgram.createSocket('udp6'); + * + * socket.bind(1234, () => { + * socket.setMulticastInterface('::%2'); + * }); + * ``` + * + * #### Example: IPv4 outgoing multicast interface + * + * All systems use an IP of the host on the desired physical interface: + * + * ```js + * const socket = dgram.createSocket('udp4'); + * + * socket.bind(1234, () => { + * socket.setMulticastInterface('10.0.0.2'); + * }); + * ``` + * @since v8.6.0 + */ + setMulticastInterface(multicastInterface: string): void; + /** + * Sets or clears the `IP_MULTICAST_LOOP` socket option. When set to `true`, + * multicast packets will also be received on the local interface. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.3.8 + */ + setMulticastLoopback(flag: boolean): boolean; + /** + * Sets the `IP_MULTICAST_TTL` socket option. While TTL generally stands for + * "Time to Live", in this context it specifies the number of IP hops that a + * packet is allowed to travel through, specifically for multicast traffic. Each + * router or gateway that forwards a packet decrements the TTL. If the TTL is + * decremented to 0 by a router, it will not be forwarded. + * + * The `ttl` argument may be between 0 and 255\. The default on most systems is `1`. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.3.8 + */ + setMulticastTTL(ttl: number): number; + /** + * Sets the `SO_RCVBUF` socket option. Sets the maximum socket receive buffer + * in bytes. + * + * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. + * @since v8.7.0 + */ + setRecvBufferSize(size: number): void; + /** + * Sets the `SO_SNDBUF` socket option. Sets the maximum socket send buffer + * in bytes. + * + * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. + * @since v8.7.0 + */ + setSendBufferSize(size: number): void; + /** + * Sets the `IP_TTL` socket option. While TTL generally stands for "Time to Live", + * in this context it specifies the number of IP hops that a packet is allowed to + * travel through. Each router or gateway that forwards a packet decrements the + * TTL. If the TTL is decremented to 0 by a router, it will not be forwarded. + * Changing TTL values is typically done for network probes or when multicasting. + * + * The `ttl` argument may be between 1 and 255\. The default on most systems + * is 64. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.1.101 + */ + setTTL(ttl: number): number; + /** + * By default, binding a socket will cause it to block the Node.js process from + * exiting as long as the socket is open. The `socket.unref()` method can be used + * to exclude the socket from the reference counting that keeps the Node.js + * process active, allowing the process to exit even if the socket is still + * listening. + * + * Calling `socket.unref()` multiple times will have no additional effect. + * + * The `socket.unref()` method returns a reference to the socket so calls can be + * chained. + * @since v0.9.1 + */ + unref(): this; + /** + * Tells the kernel to join a source-specific multicast channel at the given `sourceAddress` and `groupAddress`, using the `multicastInterface` with the `IP_ADD_SOURCE_MEMBERSHIP` socket + * option. If the `multicastInterface` argument + * is not specified, the operating system will choose one interface and will add + * membership to it. To add membership to every available interface, call `socket.addSourceSpecificMembership()` multiple times, once per interface. + * + * When called on an unbound socket, this method will implicitly bind to a random + * port, listening on all interfaces. + * @since v13.1.0, v12.16.0 + */ + addSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void; + /** + * Instructs the kernel to leave a source-specific multicast channel at the given `sourceAddress` and `groupAddress` using the `IP_DROP_SOURCE_MEMBERSHIP` socket option. This method is + * automatically called by the kernel when the + * socket is closed or the process terminates, so most apps will never have + * reason to call this. + * + * If `multicastInterface` is not specified, the operating system will attempt to + * drop membership on all valid interfaces. + * @since v13.1.0, v12.16.0 + */ + dropSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void; + /** + * Calls `socket.close()` and returns a promise that fulfills when the socket has closed. + * @since v20.5.0 + */ + [Symbol.asyncDispose](): Promise; + } + interface Socket extends InternalEventEmitter {} +} +declare module "dgram" { + export * from "node:dgram"; +} diff --git a/node_modules/@types/node/diagnostics_channel.d.ts b/node_modules/@types/node/diagnostics_channel.d.ts new file mode 100644 index 0000000..3dee66a --- /dev/null +++ b/node_modules/@types/node/diagnostics_channel.d.ts @@ -0,0 +1,794 @@ +declare module "node:diagnostics_channel" { + import { AsyncLocalStorage } from "node:async_hooks"; + /** + * Check if there are active subscribers to the named channel. This is helpful if + * the message you want to send might be expensive to prepare. + * + * This API is optional but helpful when trying to publish messages from very + * performance-sensitive code. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * if (diagnostics_channel.hasSubscribers('my-channel')) { + * // There are subscribers, prepare and publish message + * } + * ``` + * @since v15.1.0, v14.17.0 + * @param name The channel name + * @return If there are active subscribers + */ + function hasSubscribers(name: string | symbol): boolean; + /** + * This is the primary entry-point for anyone wanting to publish to a named + * channel. It produces a channel object which is optimized to reduce overhead at + * publish time as much as possible. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * ``` + * @since v15.1.0, v14.17.0 + * @param name The channel name + * @return The named channel object + */ + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + function channel( + name: string | symbol, + ): Channel; + type ChannelListener = (message: unknown, name: string | symbol) => void; + /** + * Register a message handler to subscribe to this channel. This message handler + * will be run synchronously whenever a message is published to the channel. Any + * errors thrown in the message handler will trigger an `'uncaughtException'`. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * diagnostics_channel.subscribe('my-channel', (message, name) => { + * // Received data + * }); + * ``` + * @since v18.7.0, v16.17.0 + * @param name The channel name + * @param onMessage The handler to receive channel messages + */ + function subscribe(name: string | symbol, onMessage: ChannelListener): void; + /** + * Remove a message handler previously registered to this channel with {@link subscribe}. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * function onMessage(message, name) { + * // Received data + * } + * + * diagnostics_channel.subscribe('my-channel', onMessage); + * + * diagnostics_channel.unsubscribe('my-channel', onMessage); + * ``` + * @since v18.7.0, v16.17.0 + * @param name The channel name + * @param onMessage The previous subscribed handler to remove + * @return `true` if the handler was found, `false` otherwise. + */ + function unsubscribe(name: string | symbol, onMessage: ChannelListener): boolean; + /** + * Creates a `TracingChannel` wrapper for the given `TracingChannel Channels`. If a name is given, the corresponding tracing + * channels will be created in the form of `tracing:${name}:${eventType}` where `eventType` corresponds to the types of `TracingChannel Channels`. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channelsByName = diagnostics_channel.tracingChannel('my-channel'); + * + * // or... + * + * const channelsByCollection = diagnostics_channel.tracingChannel({ + * start: diagnostics_channel.channel('tracing:my-channel:start'), + * end: diagnostics_channel.channel('tracing:my-channel:end'), + * asyncStart: diagnostics_channel.channel('tracing:my-channel:asyncStart'), + * asyncEnd: diagnostics_channel.channel('tracing:my-channel:asyncEnd'), + * error: diagnostics_channel.channel('tracing:my-channel:error'), + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param nameOrChannels Channel name or object containing all the `TracingChannel Channels` + * @return Collection of channels to trace with + */ + function tracingChannel( + nameOrChannels: string | TracingChannelCollection, + ): TracingChannel; + /** + * Creates a {@link BoundedChannel} wrapper for the given channels. If a name is + * given, the corresponding channels will be created in the form of + * `tracing:${name}:${eventType}` where `eventType` is `start` or `end`. + * + * A `BoundedChannel` is a simplified version of {@link TracingChannel} that only + * traces synchronous operations. It only has `start` and `end` events, without + * `asyncStart`, `asyncEnd`, or `error` events, making it suitable for tracing + * operations that don't involve asynchronous continuations or error handling. + * + * ```js + * import { boundedChannel, channel } from 'node:diagnostics_channel'; + * + * const wc = boundedChannel('my-operation'); + * + * // or... + * + * const wc2 = boundedChannel({ + * start: channel('tracing:my-operation:start'), + * end: channel('tracing:my-operation:end'), + * }); + * ``` + * @since v26.1.0 + * @experimental + * @param nameOrChannels Channel name or + * object containing all the [BoundedChannel Channels](https://nodejs.org/docs/latest-v26.x/api/diagnostics_channel.html#boundedchannel-channels) + */ + function boundedChannel( + nameOrChannels: string | BoundedChannelCollection, + ): BoundedChannel; + /** + * The class `Channel` represents an individual named channel within the data + * pipeline. It is used to track subscribers and to publish messages when there + * are subscribers present. It exists as a separate object to avoid channel + * lookups at publish time, enabling very fast publish speeds and allowing + * for heavy use while incurring very minimal cost. Channels are created with {@link channel}, constructing a channel directly + * with `new Channel(name)` is not supported. + * @since v15.1.0, v14.17.0 + */ + class Channel { + private constructor(); + readonly name: string | symbol; + /** + * Check if there are active subscribers to this channel. This is helpful if + * the message you want to send might be expensive to prepare. + * + * This API is optional but helpful when trying to publish messages from very + * performance-sensitive code. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * if (channel.hasSubscribers) { + * // There are subscribers, prepare and publish message + * } + * ``` + * @since v15.1.0, v14.17.0 + */ + readonly hasSubscribers: boolean; + /** + * Publish a message to any subscribers to the channel. This will trigger + * message handlers synchronously so they will execute within the same context. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * channel.publish({ + * some: 'message', + * }); + * ``` + * @since v15.1.0, v14.17.0 + * @param message The message to send to the channel subscribers + */ + publish(message: unknown): void; + /** + * Register a message handler to subscribe to this channel. This message handler + * will be run synchronously whenever a message is published to the channel. Any + * errors thrown in the message handler will trigger an `'uncaughtException'`. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * channel.subscribe((message, name) => { + * // Received data + * }); + * ``` + * @since v15.1.0, v14.17.0 + * @param onMessage The handler to receive channel messages + */ + subscribe(onMessage: ChannelListener): void; + /** + * Remove a message handler previously registered to this channel with `channel.subscribe(onMessage)`. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * function onMessage(message, name) { + * // Received data + * } + * + * channel.subscribe(onMessage); + * + * channel.unsubscribe(onMessage); + * ``` + * @since v15.1.0, v14.17.0 + * @param onMessage The previous subscribed handler to remove + * @return `true` if the handler was found, `false` otherwise. + */ + unsubscribe(onMessage: ChannelListener): void; + /** + * When `channel.runStores(context, ...)` is called, the given context data + * will be applied to any store bound to the channel. If the store has already been + * bound the previous `transform` function will be replaced with the new one. + * The `transform` function may be omitted to set the given context data as the + * context directly. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const store = new AsyncLocalStorage(); + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * channel.bindStore(store, (data) => { + * return { data }; + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param store The store to which to bind the context data + * @param transform Transform context data before setting the store context + */ + bindStore(store: AsyncLocalStorage, transform?: (context: ContextType) => StoreType): void; + /** + * Remove a message handler previously registered to this channel with `channel.bindStore(store)`. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const store = new AsyncLocalStorage(); + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * channel.bindStore(store); + * channel.unbindStore(store); + * ``` + * @since v19.9.0 + * @experimental + * @param store The store to unbind from the channel. + * @return `true` if the store was found, `false` otherwise. + */ + unbindStore(store: AsyncLocalStorage): boolean; + /** + * Applies the given data to any AsyncLocalStorage instances bound to the channel + * for the duration of the given function, then publishes to the channel within + * the scope of that data is applied to the stores. + * + * If a transform function was given to `channel.bindStore(store)` it will be + * applied to transform the message data before it becomes the context value for + * the store. The prior storage context is accessible from within the transform + * function in cases where context linking is required. + * + * The context applied to the store should be accessible in any async code which + * continues from execution which began during the given function, however + * there are some situations in which `context loss` may occur. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const store = new AsyncLocalStorage(); + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * channel.bindStore(store, (message) => { + * const parent = store.getStore(); + * return new Span(message, parent); + * }); + * channel.runStores({ some: 'message' }, () => { + * store.getStore(); // Span({ some: 'message' }) + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param context Message to send to subscribers and bind to stores + * @param fn Handler to run within the entered storage context + * @param thisArg The receiver to be used for the function call. + * @param args Optional arguments to pass to the function. + */ + runStores( + context: ContextType, + fn: (this: ThisArg, ...args: Args) => Result, + thisArg?: ThisArg, + ...args: Args + ): Result; + /** + * Creates a disposable scope that binds the given data to any AsyncLocalStorage + * instances bound to the channel and publishes it to subscribers. The scope + * automatically restores the previous storage contexts when disposed. + * + * This method enables the use of JavaScript's explicit resource management + * (`using` syntax with `Symbol.dispose`) to manage store contexts without + * closure wrapping. + * + * ```js + * import { channel } from 'node:diagnostics_channel'; + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const store = new AsyncLocalStorage(); + * const ch = channel('my-channel'); + * + * ch.bindStore(store, (message) => { + * return { ...message, timestamp: Date.now() }; + * }); + * + * { + * using scope = ch.withStoreScope({ request: 'data' }); + * // Store is entered, data is published + * console.log(store.getStore()); // { request: 'data', timestamp: ... } + * } + * // Store is automatically restored on scope exit + * ``` + * @since v26.1.0 + * @experimental + */ + withStoreScope(data: ContextType): RunStoresScope; + } + /** + * The class `RunStoresScope` represents a disposable scope created by + * `channel.withStoreScope(data)`. It manages the lifecycle of store + * contexts and ensures they are properly restored when the scope exits. + * + * The scope must be used with the `using` syntax to ensure proper disposal. + * @since v26.1.0 + * @experimental + */ + interface RunStoresScope extends Disposable {} + interface TracingChannelSubscribers { + start: (message: ContextType) => void; + end: ( + message: ContextType & { + error?: unknown; + result?: unknown; + }, + ) => void; + asyncStart: ( + message: ContextType & { + error?: unknown; + result?: unknown; + }, + ) => void; + asyncEnd: ( + message: ContextType & { + error?: unknown; + result?: unknown; + }, + ) => void; + error: ( + message: ContextType & { + error: unknown; + }, + ) => void; + } + interface TracingChannelCollection { + start: Channel; + end: Channel; + asyncStart: Channel; + asyncEnd: Channel; + error: Channel; + } + /** + * The class `TracingChannel` is a collection of `TracingChannel Channels` which + * together express a single traceable action. It is used to formalize and + * simplify the process of producing events for tracing application flow. {@link tracingChannel} is used to construct a `TracingChannel`. As with `Channel` it is recommended to create and reuse a + * single `TracingChannel` at the top-level of the file rather than creating them + * dynamically. + * @since v19.9.0 + * @experimental + */ + interface TracingChannel + extends TracingChannelCollection + { + /** + * Helper to subscribe a collection of functions to the corresponding channels. + * This is the same as calling `channel.subscribe(onMessage)` on each channel + * individually. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channels = diagnostics_channel.tracingChannel('my-channel'); + * + * channels.subscribe({ + * start(message) { + * // Handle start message + * }, + * end(message) { + * // Handle end message + * }, + * asyncStart(message) { + * // Handle asyncStart message + * }, + * asyncEnd(message) { + * // Handle asyncEnd message + * }, + * error(message) { + * // Handle error message + * }, + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param subscribers Set of `TracingChannel Channels` subscribers + */ + subscribe(subscribers: NodeJS.PartialOptions>): void; + /** + * Helper to unsubscribe a collection of functions from the corresponding channels. + * This is the same as calling `channel.unsubscribe(onMessage)` on each channel + * individually. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channels = diagnostics_channel.tracingChannel('my-channel'); + * + * channels.unsubscribe({ + * start(message) { + * // Handle start message + * }, + * end(message) { + * // Handle end message + * }, + * asyncStart(message) { + * // Handle asyncStart message + * }, + * asyncEnd(message) { + * // Handle asyncEnd message + * }, + * error(message) { + * // Handle error message + * }, + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param subscribers Set of `TracingChannel Channels` subscribers + * @return `true` if all handlers were successfully unsubscribed, and `false` otherwise. + */ + unsubscribe(subscribers: NodeJS.PartialOptions>): void; + /** + * Trace a synchronous function call. This will always produce a `start event` and `end event` around the execution and may produce an `error event` if the given function throws an error. + * This will run the given function using `channel.runStores(context, ...)` on the `start` channel which ensures all + * events should have any bound stores set to match this trace context. + * + * To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions + * which are added after the trace begins will not receive future events from that trace, only future traces will be seen. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channels = diagnostics_channel.tracingChannel('my-channel'); + * + * channels.traceSync(() => { + * // Do something + * }, { + * some: 'thing', + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param fn Function to wrap a trace around + * @param context Shared object to correlate events through + * @param thisArg The receiver to be used for the function call + * @param args Optional arguments to pass to the function + * @return The return value of the given function + */ + traceSync( + fn: (this: ThisArg, ...args: Args) => Result, + context?: ContextType, + thisArg?: ThisArg, + ...args: Args + ): Result; + /** + * Trace an asynchronous function call which returns a `Promise` or + * [thenable object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables). This will always produce a [`start` event](https://nodejs.org/docs/latest-v26.x/api/diagnostics_channel.html#startevent) and + * [`end` event](https://nodejs.org/docs/latest-v26.x/api/diagnostics_channel.html#endevent) around the synchronous portion of the function execution, and + * will produce an [`asyncStart` event](https://nodejs.org/docs/latest-v26.x/api/diagnostics_channel.html#asyncstartevent) and [`asyncEnd` event](https://nodejs.org/docs/latest-v26.x/api/diagnostics_channel.html#asyncendevent) when the + * returned promise is resolved or rejected. It may also produce an + * [`error` event](https://nodejs.org/docs/latest-v26.x/api/diagnostics_channel.html#errorevent) if the given function throws an error or the returned promise + * is rejected. This will run the given function using + * [`channel.runStores(context, ...)`](https://nodejs.org/docs/latest-v26.x/api/diagnostics_channel.html##channelrunstorescontext-fn-thisarg-args) on the `start` channel which ensures all + * events should have any bound stores set to match this trace context. + * + * If the value returned by `fn` is not a Promise or thenable, then it will be + * returned with a warning, and no `asyncStart` or `asyncEnd` events will be + * produced. + * + * To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions + * which are added after the trace begins will not receive future events from that trace, only future traces will be seen. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channels = diagnostics_channel.tracingChannel('my-channel'); + * + * channels.tracePromise(async () => { + * // Do something + * }, { + * some: 'thing', + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param fn Function to wrap a trace around + * @param context Shared object to correlate trace events through + * @param thisArg The receiver to be used for the function call + * @param args Optional arguments to pass to the function + * @returns The return value of the given function. If the return value + * is a Promise or thenable, tracing events will be published when it settles. + * If the return value is not a Promise or thenable, it is returned as-is and + * a warning is emitted. + */ + tracePromise = any>( + fn: (this: ThisArg, ...args: Args) => Result, + context?: ContextType, + thisArg?: ThisArg, + ...args: Args + ): Result; + /** + * Trace a callback-receiving function call. This will always produce a `start event` and `end event` around the synchronous portion of the + * function execution, and will produce a `asyncStart event` and `asyncEnd event` around the callback execution. It may also produce an `error event` if the given function throws an error or + * the returned + * promise rejects. This will run the given function using `channel.runStores(context, ...)` on the `start` channel which ensures all + * events should have any bound stores set to match this trace context. + * + * The `position` will be -1 by default to indicate the final argument should + * be used as the callback. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channels = diagnostics_channel.tracingChannel('my-channel'); + * + * channels.traceCallback((arg1, callback) => { + * // Do something + * callback(null, 'result'); + * }, 1, { + * some: 'thing', + * }, thisArg, arg1, callback); + * ``` + * + * The callback will also be run with `channel.runStores(context, ...)` which + * enables context loss recovery in some cases. + * + * To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions + * which are added after the trace begins will not receive future events from that trace, only future traces will be seen. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const channels = diagnostics_channel.tracingChannel('my-channel'); + * const myStore = new AsyncLocalStorage(); + * + * // The start channel sets the initial store data to something + * // and stores that store data value on the trace context object + * channels.start.bindStore(myStore, (data) => { + * const span = new Span(data); + * data.span = span; + * return span; + * }); + * + * // Then asyncStart can restore from that data it stored previously + * channels.asyncStart.bindStore(myStore, (data) => { + * return data.span; + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param fn callback using function to wrap a trace around + * @param position Zero-indexed argument position of expected callback + * @param context Shared object to correlate trace events through + * @param thisArg The receiver to be used for the function call + * @param args Optional arguments to pass to the function + * @return The return value of the given function + */ + traceCallback( + fn: (this: ThisArg, ...args: Args) => Result, + position?: number, + context?: ContextType, + thisArg?: ThisArg, + ...args: Args + ): Result; + /** + * `true` if any of the individual channels has a subscriber, `false` if not. + * + * This is a helper method available on a {@link TracingChannel} instance to check + * if any of the [TracingChannel Channels](https://nodejs.org/api/diagnostics_channel.html#tracingchannel-channels) have subscribers. + * A `true` is returned if any of them have at least one subscriber, a `false` is returned otherwise. + * + * ```js + * const diagnostics_channel = require('node:diagnostics_channel'); + * + * const channels = diagnostics_channel.tracingChannel('my-channel'); + * + * if (channels.hasSubscribers) { + * // Do something + * } + * ``` + * @since v22.0.0, v20.13.0 + */ + readonly hasSubscribers: boolean; + } + interface BoundedChannelSubscribers { + start: (message: ContextType) => void; + end: (message: ContextType) => void; + } + interface BoundedChannelCollection { + start: Channel; + end: Channel; + } + /** + * The class `BoundedChannel` is a simplified version of {@link TracingChannel} that + * only traces synchronous operations. It consists of two channels (`start` and + * `end`) instead of five, omitting the `asyncStart`, `asyncEnd`, and `error` + * events. This makes it suitable for tracing operations that don't involve + * asynchronous continuations or error handling. + * + * Like `TracingChannel`, it is recommended to create and reuse a single + * `BoundedChannel` at the top-level of the file rather than creating them + * dynamically. + * @since v26.1.0 + * @experimental + */ + interface BoundedChannel + extends BoundedChannelCollection + { + /** + * Check if any of the `start` or `end` channels have subscribers. + * + * ```js + * import { boundedChannel } from 'node:diagnostics_channel'; + * + * const wc = boundedChannel('my-operation'); + * + * if (wc.hasSubscribers) { + * // There are subscribers, perform traced operation + * } + * ``` + * @since v26.1.0 + */ + readonly hasSubscribers: boolean; + /** + * Subscribe to the bounded channel events. This is equivalent to calling + * [`channel.subscribe(onMessage)`][] on each channel individually. + * + * ```mjs + * import { boundedChannel } from 'node:diagnostics_channel'; + * + * const wc = boundedChannel('my-operation'); + * + * wc.subscribe({ + * start(message) { + * // Handle start + * }, + * end(message) { + * // Handle end + * }, + * }); + * ``` + * @since v26.1.0 + * @param handlers Set of channel subscribers + */ + subscribe(handlers: NodeJS.PartialOptions>): void; + /** + * Unsubscribe from the bounded channel events. This is equivalent to calling + * [`channel.unsubscribe(onMessage)`][] on each channel individually. + * + * ```js + * import { boundedChannel } from 'node:diagnostics_channel'; + * + * const wc = boundedChannel('my-operation'); + * + * const handlers = { + * start(message) {}, + * end(message) {}, + * }; + * + * wc.subscribe(handlers); + * wc.unsubscribe(handlers); + * ``` + * @since v26.1.0 + * @param handlers Set of channel subscribers + * @returns `true` if all handlers were successfully unsubscribed, + * `false` otherwise. + */ + unsubscribe(handlers: NodeJS.PartialOptions>): boolean; + /** + * Trace a synchronous function call. This will produce a `start` event and `end` + * event around the execution. This runs the given function using + * [`channel.runStores(context, ...)`][] on the `start` channel which ensures all + * events have any bound stores set to match this trace context. + * + * ```js + * import { boundedChannel } from 'node:diagnostics_channel'; + * + * const wc = boundedChannel('my-operation'); + * + * const result = wc.run({ operationId: '123' }, () => { + * // Perform operation + * return 42; + * }); + * ``` + * @since v26.1.0 + * @param context Shared object to correlate events through + * @param fn Function to wrap a trace around + * @param thisArg The receiver to be used for the function call + * @param args Optional arguments to pass to the function + * @returns The return value of the given function + */ + run( + fn: (this: ThisArg, ...args: Args) => Result, + context?: ContextType, + thisArg?: ThisArg, + ...args: Args + ): Result; + /** + * Create a disposable scope for tracing a synchronous operation using JavaScript's + * explicit resource management (`using` syntax). The scope automatically publishes + * `start` and `end` events, enters bound stores, and handles cleanup when disposed. + * + * ```js + * import { boundedChannel } from 'node:diagnostics_channel'; + * + * const wc = boundedChannel('my-operation'); + * + * const context = { operationId: '123' }; + * { + * using scope = wc.withScope(context); + * // Stores are entered, start event is published + * + * // Perform work and set result on context + * context.result = 42; + * } + * // End event is published, stores are restored automatically + * ``` + * @since v26.1.0 + * @param context Shared object to correlate events through + * @returns Disposable scope object + */ + withScope(context: ContextType): BoundedChannelScope; + } + /** + * The class `BoundedChannelScope` represents a disposable scope created by + * `boundedChannel.withScope(context)`. It manages the lifecycle of a traced + * operation, automatically publishing events and managing store contexts. + * + * The scope must be used with the `using` syntax to ensure proper disposal. + * + * ```js + * import { boundedChannel } from 'node:diagnostics_channel'; + * + * const wc = boundedChannel('my-operation'); + * + * const context = {}; + * { + * using scope = wc.withScope(context); + * // Start event is published, stores are entered + * context.result = performOperation(); + * // End event is automatically published at end of block + * } + * ``` + * @since v26.1.0 + * @experimental + */ + interface BoundedChannelScope extends Disposable {} +} +declare module "diagnostics_channel" { + export * from "node:diagnostics_channel"; +} diff --git a/node_modules/@types/node/dns.d.ts b/node_modules/@types/node/dns.d.ts new file mode 100644 index 0000000..319ee96 --- /dev/null +++ b/node_modules/@types/node/dns.d.ts @@ -0,0 +1,876 @@ +declare module "node:dns" { + // Supported getaddrinfo flags. + /** + * Limits returned address types to the types of non-loopback addresses configured on the system. For example, IPv4 addresses are + * only returned if the current system has at least one IPv4 address configured. + */ + const ADDRCONFIG: number; + /** + * If the IPv6 family was specified, but no IPv6 addresses were found, then return IPv4 mapped IPv6 addresses. It is not supported + * on some operating systems (e.g. FreeBSD 10.1). + */ + const V4MAPPED: number; + /** + * If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as + * well as IPv4 mapped IPv6 addresses. + */ + const ALL: number; + interface LookupOptions { + /** + * The record family. Must be `4`, `6`, or `0`. For backward compatibility reasons, `'IPv4'` and `'IPv6'` are interpreted + * as `4` and `6` respectively. The value 0 indicates that either an IPv4 or IPv6 address is returned. If the value `0` is used + * with `{ all: true } (see below)`, both IPv4 and IPv6 addresses are returned. + * @default 0 + */ + family?: number | "IPv4" | "IPv6" | undefined; + /** + * One or more [supported `getaddrinfo`](https://nodejs.org/docs/latest-v26.x/api/dns.html#supported-getaddrinfo-flags) flags. Multiple flags may be + * passed by bitwise `OR`ing their values. + */ + hints?: number | undefined; + /** + * When `true`, the callback returns all resolved addresses in an array. Otherwise, returns a single address. + * @default false + */ + all?: boolean | undefined; + /** + * When `verbatim`, the resolved addresses are returned unsorted. When `ipv4first`, the resolved addresses are sorted + * by placing IPv4 addresses before IPv6 addresses. When `ipv6first`, the resolved addresses are sorted by placing IPv6 + * addresses before IPv4 addresses. Default value is configurable using + * {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v26.x/api/cli.html#--dns-result-orderorder). + * @default `verbatim` (addresses are not reordered) + * @since v22.1.0 + */ + order?: "ipv4first" | "ipv6first" | "verbatim" | undefined; + /** + * When `true`, the callback receives IPv4 and IPv6 addresses in the order the DNS resolver returned them. When `false`, IPv4 + * addresses are placed before IPv6 addresses. This option will be deprecated in favor of `order`. When both are specified, + * `order` has higher precedence. New code should only use `order`. Default value is configurable using {@link setDefaultResultOrder} + * @default true (addresses are not reordered) + * @deprecated Please use `order` option + */ + verbatim?: boolean | undefined; + } + interface LookupOneOptions extends LookupOptions { + all?: false | undefined; + } + interface LookupAllOptions extends LookupOptions { + all: true; + } + interface LookupAddress { + /** + * A string representation of an IPv4 or IPv6 address. + */ + address: string; + /** + * `4` or `6`, denoting the family of `address`, or `0` if the address is not an IPv4 or IPv6 address. `0` is a likely indicator of a + * bug in the name resolution service used by the operating system. + */ + family: number; + } + /** + * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or + * AAAA (IPv6) record. All `option` properties are optional. If `options` is an + * integer, then it must be `4` or `6` – if `options` is `0` or not provided, then + * IPv4 and IPv6 addresses are both returned if found. + * + * With the `all` option set to `true`, the arguments for `callback` change to `(err, addresses)`, with `addresses` being an array of objects with the + * properties `address` and `family`. + * + * On error, `err` is an `Error` object, where `err.code` is the error code. + * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when + * the host name does not exist but also when the lookup fails in other ways + * such as no available file descriptors. + * + * `dns.lookup()` does not necessarily have anything to do with the DNS protocol. + * The implementation uses an operating system facility that can associate names + * with addresses and vice versa. This implementation can have subtle but + * important consequences on the behavior of any Node.js program. Please take some + * time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v26.x/api/dns.html#implementation-considerations) + * before using `dns.lookup()`. + * + * Example usage: + * + * ```js + * import dns from 'node:dns'; + * const options = { + * family: 6, + * hints: dns.ADDRCONFIG | dns.V4MAPPED, + * }; + * dns.lookup('example.com', options, (err, address, family) => + * console.log('address: %j family: IPv%s', address, family)); + * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6 + * + * // When options.all is true, the result will be an Array. + * options.all = true; + * dns.lookup('example.com', options, (err, addresses) => + * console.log('addresses: %j', addresses)); + * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}] + * ``` + * + * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v26.x/api/util.html#utilpromisifyoriginal) ed + * version, and `all` is not set to `true`, it returns a `Promise` for an `Object` with `address` and `family` properties. + * @since v0.1.90 + */ + function lookup( + hostname: string, + family: number, + callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, + ): void; + function lookup( + hostname: string, + options: LookupOneOptions, + callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, + ): void; + function lookup( + hostname: string, + options: LookupAllOptions, + callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void, + ): void; + function lookup( + hostname: string, + options: LookupOptions, + callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void, + ): void; + function lookup( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, + ): void; + namespace lookup { + function __promisify__(hostname: string, options: LookupAllOptions): Promise; + function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise; + function __promisify__(hostname: string, options: LookupOptions): Promise; + } + /** + * Resolves the given `address` and `port` into a host name and service using + * the operating system's underlying `getnameinfo` implementation. + * + * If `address` is not a valid IP address, a `TypeError` will be thrown. + * The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown. + * + * On an error, `err` is an [`Error`](https://nodejs.org/docs/latest-v26.x/api/errors.html#class-error) object, + * where `err.code` is the error code. + * + * ```js + * import dns from 'node:dns'; + * dns.lookupService('127.0.0.1', 22, (err, hostname, service) => { + * console.log(hostname, service); + * // Prints: localhost ssh + * }); + * ``` + * + * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v26.x/api/util.html#utilpromisifyoriginal) ed + * version, it returns a `Promise` for an `Object` with `hostname` and `service` properties. + * @since v0.11.14 + */ + function lookupService( + address: string, + port: number, + callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void, + ): void; + namespace lookupService { + function __promisify__( + address: string, + port: number, + ): Promise<{ + hostname: string; + service: string; + }>; + } + interface ResolveOptions { + ttl: boolean; + } + interface ResolveWithTtlOptions extends ResolveOptions { + ttl: true; + } + interface RecordWithTtl { + address: string; + ttl: number; + } + interface AnyARecord extends RecordWithTtl { + type: "A"; + } + interface AnyAaaaRecord extends RecordWithTtl { + type: "AAAA"; + } + interface CaaRecord { + critical: number; + issue?: string | undefined; + issuewild?: string | undefined; + iodef?: string | undefined; + contactemail?: string | undefined; + contactphone?: string | undefined; + } + interface AnyCaaRecord extends CaaRecord { + type: "CAA"; + } + interface MxRecord { + priority: number; + exchange: string; + } + interface AnyMxRecord extends MxRecord { + type: "MX"; + } + interface NaptrRecord { + flags: string; + service: string; + regexp: string; + replacement: string; + order: number; + preference: number; + } + interface AnyNaptrRecord extends NaptrRecord { + type: "NAPTR"; + } + interface SoaRecord { + nsname: string; + hostmaster: string; + serial: number; + refresh: number; + retry: number; + expire: number; + minttl: number; + } + interface AnySoaRecord extends SoaRecord { + type: "SOA"; + } + interface SrvRecord { + priority: number; + weight: number; + port: number; + name: string; + } + interface AnySrvRecord extends SrvRecord { + type: "SRV"; + } + interface TlsaRecord { + certUsage: number; + selector: number; + match: number; + data: ArrayBuffer; + } + interface AnyTlsaRecord extends TlsaRecord { + type: "TLSA"; + } + interface AnyTxtRecord { + type: "TXT"; + entries: string[]; + } + interface AnyNsRecord { + type: "NS"; + value: string; + } + interface AnyPtrRecord { + type: "PTR"; + value: string; + } + interface AnyCnameRecord { + type: "CNAME"; + value: string; + } + type AnyRecord = + | AnyARecord + | AnyAaaaRecord + | AnyCaaRecord + | AnyCnameRecord + | AnyMxRecord + | AnyNaptrRecord + | AnyNsRecord + | AnyPtrRecord + | AnySoaRecord + | AnySrvRecord + | AnyTlsaRecord + | AnyTxtRecord; + /** + * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array + * of the resource records. The `callback` function has arguments `(err, records)`. When successful, `records` will be an array of resource + * records. The type and structure of individual results varies based on `rrtype`: + * + * + * + * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v26.x/api/errors.html#class-error) object, + * where `err.code` is one of the `DNS error codes`. + * @since v0.1.27 + * @param hostname Host name to resolve. + * @param [rrtype='A'] Resource record type. + */ + function resolve( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, + ): void; + function resolve( + hostname: string, + rrtype: "A" | "AAAA" | "CNAME" | "NS" | "PTR", + callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, + ): void; + function resolve( + hostname: string, + rrtype: "ANY", + callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void, + ): void; + function resolve( + hostname: string, + rrtype: "CAA", + callback: (err: NodeJS.ErrnoException | null, address: CaaRecord[]) => void, + ): void; + function resolve( + hostname: string, + rrtype: "MX", + callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void, + ): void; + function resolve( + hostname: string, + rrtype: "NAPTR", + callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void, + ): void; + function resolve( + hostname: string, + rrtype: "SOA", + callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void, + ): void; + function resolve( + hostname: string, + rrtype: "SRV", + callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void, + ): void; + function resolve( + hostname: string, + rrtype: "TLSA", + callback: (err: NodeJS.ErrnoException | null, addresses: TlsaRecord[]) => void, + ): void; + function resolve( + hostname: string, + rrtype: "TXT", + callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void, + ): void; + function resolve( + hostname: string, + rrtype: string, + callback: ( + err: NodeJS.ErrnoException | null, + addresses: + | string[] + | CaaRecord[] + | MxRecord[] + | NaptrRecord[] + | SoaRecord + | SrvRecord[] + | TlsaRecord[] + | string[][] + | AnyRecord[], + ) => void, + ): void; + namespace resolve { + function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise; + function __promisify__(hostname: string, rrtype: "ANY"): Promise; + function __promisify__(hostname: string, rrtype: "CAA"): Promise; + function __promisify__(hostname: string, rrtype: "MX"): Promise; + function __promisify__(hostname: string, rrtype: "NAPTR"): Promise; + function __promisify__(hostname: string, rrtype: "SOA"): Promise; + function __promisify__(hostname: string, rrtype: "SRV"): Promise; + function __promisify__(hostname: string, rrtype: "TLSA"): Promise; + function __promisify__(hostname: string, rrtype: "TXT"): Promise; + function __promisify__( + hostname: string, + rrtype: string, + ): Promise< + | string[] + | CaaRecord[] + | MxRecord[] + | NaptrRecord[] + | SoaRecord + | SrvRecord[] + | TlsaRecord[] + | string[][] + | AnyRecord[] + >; + } + /** + * Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the `hostname`. The `addresses` argument passed to the `callback` function + * will contain an array of IPv4 addresses (e.g.`['74.125.79.104', '74.125.79.105', '74.125.79.106']`). + * @since v0.1.16 + * @param hostname Host name to resolve. + */ + function resolve4( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, + ): void; + function resolve4( + hostname: string, + options: ResolveWithTtlOptions, + callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void, + ): void; + function resolve4( + hostname: string, + options: ResolveOptions, + callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void, + ): void; + namespace resolve4 { + function __promisify__(hostname: string): Promise; + function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; + function __promisify__(hostname: string, options?: ResolveOptions): Promise; + } + /** + * Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the `hostname`. The `addresses` argument passed to the `callback` function + * will contain an array of IPv6 addresses. + * @since v0.1.16 + * @param hostname Host name to resolve. + */ + function resolve6( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, + ): void; + function resolve6( + hostname: string, + options: ResolveWithTtlOptions, + callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void, + ): void; + function resolve6( + hostname: string, + options: ResolveOptions, + callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void, + ): void; + namespace resolve6 { + function __promisify__(hostname: string): Promise; + function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; + function __promisify__(hostname: string, options?: ResolveOptions): Promise; + } + /** + * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. The `addresses` argument passed to the `callback` function + * will contain an array of canonical name records available for the `hostname` (e.g. `['bar.example.com']`). + * @since v0.3.2 + */ + function resolveCname( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, + ): void; + namespace resolveCname { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve `CAA` records for the `hostname`. The `addresses` argument passed to the `callback` function + * will contain an array of certification authority authorization records + * available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]`). + * @since v15.0.0, v14.17.0 + */ + function resolveCaa( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void, + ): void; + namespace resolveCaa { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the `hostname`. The `addresses` argument passed to the `callback` function will + * contain an array of objects containing both a `priority` and `exchange` property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`). + * @since v0.1.27 + */ + function resolveMx( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void, + ): void; + namespace resolveMx { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve regular expression-based records (`NAPTR` records) for the `hostname`. The `addresses` argument passed to the `callback` function will contain an array of + * objects with the following properties: + * + * * `flags` + * * `service` + * * `regexp` + * * `replacement` + * * `order` + * * `preference` + * + * ```js + * { + * flags: 's', + * service: 'SIP+D2U', + * regexp: '', + * replacement: '_sip._udp.example.com', + * order: 30, + * preference: 100, + * } + * ``` + * @since v0.9.12 + */ + function resolveNaptr( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void, + ): void; + namespace resolveNaptr { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve name server records (`NS` records) for the `hostname`. The `addresses` argument passed to the `callback` function will + * contain an array of name server records available for `hostname` (e.g. `['ns1.example.com', 'ns2.example.com']`). + * @since v0.1.90 + */ + function resolveNs( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, + ): void; + namespace resolveNs { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve pointer records (`PTR` records) for the `hostname`. The `addresses` argument passed to the `callback` function will + * be an array of strings containing the reply records. + * @since v6.0.0 + */ + function resolvePtr( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, + ): void; + namespace resolvePtr { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for + * the `hostname`. The `address` argument passed to the `callback` function will + * be an object with the following properties: + * + * * `nsname` + * * `hostmaster` + * * `serial` + * * `refresh` + * * `retry` + * * `expire` + * * `minttl` + * + * ```js + * { + * nsname: 'ns.example.com', + * hostmaster: 'root.example.com', + * serial: 2013101809, + * refresh: 10000, + * retry: 2400, + * expire: 604800, + * minttl: 3600, + * } + * ``` + * @since v0.11.10 + */ + function resolveSoa( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void, + ): void; + namespace resolveSoa { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve service records (`SRV` records) for the `hostname`. The `addresses` argument passed to the `callback` function will + * be an array of objects with the following properties: + * + * * `priority` + * * `weight` + * * `port` + * * `name` + * + * ```js + * { + * priority: 10, + * weight: 5, + * port: 21223, + * name: 'service.example.com', + * } + * ``` + * @since v0.1.27 + */ + function resolveSrv( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void, + ): void; + namespace resolveSrv { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve certificate associations (`TLSA` records) for + * the `hostname`. The `records` argument passed to the `callback` function is an + * array of objects with these properties: + * + * * `certUsage` + * * `selector` + * * `match` + * * `data` + * + * ```js + * { + * certUsage: 3, + * selector: 1, + * match: 1, + * data: [ArrayBuffer], + * } + * ``` + * @since v23.9.0, v22.15.0 + */ + function resolveTlsa( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: TlsaRecord[]) => void, + ): void; + namespace resolveTlsa { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. The `records` argument passed to the `callback` function is a + * two-dimensional array of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of + * one record. Depending on the use case, these could be either joined together or + * treated separately. + * @since v0.1.27 + */ + function resolveTxt( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void, + ): void; + namespace resolveTxt { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query). + * The `ret` argument passed to the `callback` function will be an array containing + * various types of records. Each object has a property `type` that indicates the + * type of the current record. And depending on the `type`, additional properties + * will be present on the object: + * + * + * + * Here is an example of the `ret` object passed to the callback: + * + * ```js + * [ { type: 'A', address: '127.0.0.1', ttl: 299 }, + * { type: 'CNAME', value: 'example.com' }, + * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 }, + * { type: 'NS', value: 'ns1.example.com' }, + * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] }, + * { type: 'SOA', + * nsname: 'ns1.example.com', + * hostmaster: 'admin.example.com', + * serial: 156696742, + * refresh: 900, + * retry: 900, + * expire: 1800, + * minttl: 60 } ]; + * ``` + * + * DNS server operators may choose not to respond to `ANY` queries. It may be better to call individual methods like {@link resolve4}, {@link resolveMx}, and so on. For more details, see + * [RFC 8482](https://tools.ietf.org/html/rfc8482). + */ + function resolveAny( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void, + ): void; + namespace resolveAny { + function __promisify__(hostname: string): Promise; + } + /** + * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an + * array of host names. + * + * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v26.x/api/errors.html#class-error) object, where `err.code` is + * one of the [DNS error codes](https://nodejs.org/docs/latest-v26.x/api/dns.html#error-codes). + * @since v0.1.16 + */ + function reverse( + ip: string, + callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void, + ): void; + /** + * Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v26.x/api/dns.html#dnspromiseslookuphostname-options). + * The value could be: + * + * * `ipv4first`: for `order` defaulting to `ipv4first`. + * * `ipv6first`: for `order` defaulting to `ipv6first`. + * * `verbatim`: for `order` defaulting to `verbatim`. + * @since v18.17.0 + */ + function getDefaultResultOrder(): "ipv4first" | "ipv6first" | "verbatim"; + /** + * Sets the IP address and port of servers to be used when performing DNS + * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted + * addresses. If the port is the IANA default DNS port (53) it can be omitted. + * + * ```js + * dns.setServers([ + * '4.4.4.4', + * '[2001:4860:4860::8888]', + * '4.4.4.4:1053', + * '[2001:4860:4860::8888]:1053', + * ]); + * ``` + * + * An error will be thrown if an invalid address is provided. + * + * The `dns.setServers()` method must not be called while a DNS query is in + * progress. + * + * The {@link setServers} method affects only {@link resolve}, `dns.resolve*()` and {@link reverse} (and specifically _not_ {@link lookup}). + * + * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html). + * That is, if attempting to resolve with the first server provided results in a `NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with + * subsequent servers provided. Fallback DNS servers will only be used if the + * earlier ones time out or result in some other error. + * @since v0.11.3 + * @param servers array of [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952#section-6) formatted addresses + */ + function setServers(servers: readonly string[]): void; + /** + * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6), + * that are currently configured for DNS resolution. A string will include a port + * section if a custom port is used. + * + * ```js + * [ + * '4.4.4.4', + * '2001:4860:4860::8888', + * '4.4.4.4:1053', + * '[2001:4860:4860::8888]:1053', + * ] + * ``` + * @since v0.11.3 + */ + function getServers(): string[]; + /** + * Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v26.x/api/dns.html#dnspromiseslookuphostname-options). + * The value could be: + * + * * `ipv4first`: sets default `order` to `ipv4first`. + * * `ipv6first`: sets default `order` to `ipv6first`. + * * `verbatim`: sets default `order` to `verbatim`. + * + * The default is `verbatim` and {@link setDefaultResultOrder} have higher + * priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v26.x/api/cli.html#--dns-result-orderorder). When using + * [worker threads](https://nodejs.org/docs/latest-v26.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main + * thread won't affect the default dns orders in workers. + * @since v16.4.0, v14.18.0 + * @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`. + */ + function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void; + // Error codes + const NODATA: "ENODATA"; + const FORMERR: "EFORMERR"; + const SERVFAIL: "ESERVFAIL"; + const NOTFOUND: "ENOTFOUND"; + const NOTIMP: "ENOTIMP"; + const REFUSED: "EREFUSED"; + const BADQUERY: "EBADQUERY"; + const BADNAME: "EBADNAME"; + const BADFAMILY: "EBADFAMILY"; + const BADRESP: "EBADRESP"; + const CONNREFUSED: "ECONNREFUSED"; + const TIMEOUT: "ETIMEOUT"; + const EOF: "EOF"; + const FILE: "EFILE"; + const NOMEM: "ENOMEM"; + const DESTRUCTION: "EDESTRUCTION"; + const BADSTR: "EBADSTR"; + const BADFLAGS: "EBADFLAGS"; + const NONAME: "ENONAME"; + const BADHINTS: "EBADHINTS"; + const NOTINITIALIZED: "ENOTINITIALIZED"; + const LOADIPHLPAPI: "ELOADIPHLPAPI"; + const ADDRGETNETWORKPARAMS: "EADDRGETNETWORKPARAMS"; + const CANCELLED: "ECANCELLED"; + interface ResolverOptions { + /** + * Query timeout in milliseconds, or `-1` to use the default timeout. + */ + timeout?: number | undefined; + /** + * The number of tries the resolver will try contacting each name server before giving up. + * @default 4 + */ + tries?: number | undefined; + /** + * The max retry timeout, in milliseconds. + * @default 0 + */ + maxTimeout?: number | undefined; + } + /** + * An independent resolver for DNS requests. + * + * Creating a new resolver uses the default server settings. Setting + * the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v26.x/api/dns.html#dnssetserversservers) does not affect + * other resolvers: + * + * ```js + * import { Resolver } from 'node:dns'; + * const resolver = new Resolver(); + * resolver.setServers(['4.4.4.4']); + * + * // This request will use the server at 4.4.4.4, independent of global settings. + * resolver.resolve4('example.org', (err, addresses) => { + * // ... + * }); + * ``` + * + * The following methods from the `node:dns` module are available: + * + * * `resolver.getServers()` + * * `resolver.resolve()` + * * `resolver.resolve4()` + * * `resolver.resolve6()` + * * `resolver.resolveAny()` + * * `resolver.resolveCaa()` + * * `resolver.resolveCname()` + * * `resolver.resolveMx()` + * * `resolver.resolveNaptr()` + * * `resolver.resolveNs()` + * * `resolver.resolvePtr()` + * * `resolver.resolveSoa()` + * * `resolver.resolveSrv()` + * * `resolver.resolveTxt()` + * * `resolver.reverse()` + * * `resolver.setServers()` + * @since v8.3.0 + */ + class Resolver { + constructor(options?: ResolverOptions); + /** + * Cancel all outstanding DNS queries made by this resolver. The corresponding + * callbacks will be called with an error with code `ECANCELLED`. + * @since v8.3.0 + */ + cancel(): void; + getServers: typeof getServers; + resolve: typeof resolve; + resolve4: typeof resolve4; + resolve6: typeof resolve6; + resolveAny: typeof resolveAny; + resolveCaa: typeof resolveCaa; + resolveCname: typeof resolveCname; + resolveMx: typeof resolveMx; + resolveNaptr: typeof resolveNaptr; + resolveNs: typeof resolveNs; + resolvePtr: typeof resolvePtr; + resolveSoa: typeof resolveSoa; + resolveSrv: typeof resolveSrv; + resolveTlsa: typeof resolveTlsa; + resolveTxt: typeof resolveTxt; + reverse: typeof reverse; + /** + * The resolver instance will send its requests from the specified IP address. + * This allows programs to specify outbound interfaces when used on multi-homed + * systems. + * + * If a v4 or v6 address is not specified, it is set to the default and the + * operating system will choose a local address automatically. + * + * The resolver will use the v4 local address when making requests to IPv4 DNS + * servers, and the v6 local address when making requests to IPv6 DNS servers. + * The `rrtype` of resolution requests has no impact on the local address used. + * @since v15.1.0, v14.17.0 + * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address. + * @param [ipv6='::0'] A string representation of an IPv6 address. + */ + setLocalAddress(ipv4?: string, ipv6?: string): void; + setServers: typeof setServers; + } +} +declare module "node:dns" { + export * as promises from "node:dns/promises"; +} +declare module "dns" { + export * from "node:dns"; +} diff --git a/node_modules/@types/node/dns/promises.d.ts b/node_modules/@types/node/dns/promises.d.ts new file mode 100644 index 0000000..9e7e1c9 --- /dev/null +++ b/node_modules/@types/node/dns/promises.d.ts @@ -0,0 +1,497 @@ +declare module "node:dns/promises" { + import { + AnyRecord, + CaaRecord, + LookupAddress, + LookupAllOptions, + LookupOneOptions, + LookupOptions, + MxRecord, + NaptrRecord, + RecordWithTtl, + ResolveOptions, + ResolverOptions, + ResolveWithTtlOptions, + SoaRecord, + SrvRecord, + TlsaRecord, + } from "node:dns"; + /** + * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6), + * that are currently configured for DNS resolution. A string will include a port + * section if a custom port is used. + * + * ```js + * [ + * '4.4.4.4', + * '2001:4860:4860::8888', + * '4.4.4.4:1053', + * '[2001:4860:4860::8888]:1053', + * ] + * ``` + * @since v10.6.0 + */ + function getServers(): string[]; + /** + * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or + * AAAA (IPv6) record. All `option` properties are optional. If `options` is an + * integer, then it must be `4` or `6` – if `options` is not provided, then IPv4 + * and IPv6 addresses are both returned if found. + * + * With the `all` option set to `true`, the `Promise` is resolved with `addresses` being an array of objects with the properties `address` and `family`. + * + * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is the error code. + * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when + * the host name does not exist but also when the lookup fails in other ways + * such as no available file descriptors. + * + * [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options) does not necessarily have anything to do with the DNS + * protocol. The implementation uses an operating system facility that can + * associate names with addresses and vice versa. This implementation can have + * subtle but important consequences on the behavior of any Node.js program. Please + * take some time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v20.x/api/dns.html#implementation-considerations) before + * using `dnsPromises.lookup()`. + * + * Example usage: + * + * ```js + * import dns from 'node:dns'; + * const dnsPromises = dns.promises; + * const options = { + * family: 6, + * hints: dns.ADDRCONFIG | dns.V4MAPPED, + * }; + * + * dnsPromises.lookup('example.com', options).then((result) => { + * console.log('address: %j family: IPv%s', result.address, result.family); + * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6 + * }); + * + * // When options.all is true, the result will be an Array. + * options.all = true; + * dnsPromises.lookup('example.com', options).then((result) => { + * console.log('addresses: %j', result); + * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}] + * }); + * ``` + * @since v10.6.0 + */ + function lookup(hostname: string, family: number): Promise; + function lookup(hostname: string, options: LookupOneOptions): Promise; + function lookup(hostname: string, options: LookupAllOptions): Promise; + function lookup(hostname: string, options: LookupOptions): Promise; + function lookup(hostname: string): Promise; + /** + * Resolves the given `address` and `port` into a host name and service using + * the operating system's underlying `getnameinfo` implementation. + * + * If `address` is not a valid IP address, a `TypeError` will be thrown. + * The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown. + * + * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is the error code. + * + * ```js + * import dnsPromises from 'node:dns'; + * dnsPromises.lookupService('127.0.0.1', 22).then((result) => { + * console.log(result.hostname, result.service); + * // Prints: localhost ssh + * }); + * ``` + * @since v10.6.0 + */ + function lookupService( + address: string, + port: number, + ): Promise<{ + hostname: string; + service: string; + }>; + /** + * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array + * of the resource records. When successful, the `Promise` is resolved with an + * array of resource records. The type and structure of individual results vary + * based on `rrtype`: + * + * + * + * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` + * is one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes). + * @since v10.6.0 + * @param hostname Host name to resolve. + * @param [rrtype='A'] Resource record type. + */ + function resolve(hostname: string): Promise; + function resolve(hostname: string, rrtype: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise; + function resolve(hostname: string, rrtype: "ANY"): Promise; + function resolve(hostname: string, rrtype: "CAA"): Promise; + function resolve(hostname: string, rrtype: "MX"): Promise; + function resolve(hostname: string, rrtype: "NAPTR"): Promise; + function resolve(hostname: string, rrtype: "SOA"): Promise; + function resolve(hostname: string, rrtype: "SRV"): Promise; + function resolve(hostname: string, rrtype: "TLSA"): Promise; + function resolve(hostname: string, rrtype: "TXT"): Promise; + function resolve(hostname: string, rrtype: string): Promise< + | string[] + | CaaRecord[] + | MxRecord[] + | NaptrRecord[] + | SoaRecord + | SrvRecord[] + | TlsaRecord[] + | string[][] + | AnyRecord[] + >; + /** + * Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv4 + * addresses (e.g. `['74.125.79.104', '74.125.79.105', '74.125.79.106']`). + * @since v10.6.0 + * @param hostname Host name to resolve. + */ + function resolve4(hostname: string): Promise; + function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise; + function resolve4(hostname: string, options: ResolveOptions): Promise; + /** + * Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv6 + * addresses. + * @since v10.6.0 + * @param hostname Host name to resolve. + */ + function resolve6(hostname: string): Promise; + function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise; + function resolve6(hostname: string, options: ResolveOptions): Promise; + /** + * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query). + * On success, the `Promise` is resolved with an array containing various types of + * records. Each object has a property `type` that indicates the type of the + * current record. And depending on the `type`, additional properties will be + * present on the object: + * + * + * + * Here is an example of the result object: + * + * ```js + * [ { type: 'A', address: '127.0.0.1', ttl: 299 }, + * { type: 'CNAME', value: 'example.com' }, + * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 }, + * { type: 'NS', value: 'ns1.example.com' }, + * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] }, + * { type: 'SOA', + * nsname: 'ns1.example.com', + * hostmaster: 'admin.example.com', + * serial: 156696742, + * refresh: 900, + * retry: 900, + * expire: 1800, + * minttl: 60 } ]; + * ``` + * @since v10.6.0 + */ + function resolveAny(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve `CAA` records for the `hostname`. On success, + * the `Promise` is resolved with an array of objects containing available + * certification authority authorization records available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'},{critical: 128, issue: 'pki.example.com'}]`). + * @since v15.0.0, v14.17.0 + */ + function resolveCaa(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. On success, + * the `Promise` is resolved with an array of canonical name records available for + * the `hostname` (e.g. `['bar.example.com']`). + * @since v10.6.0 + */ + function resolveCname(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the `hostname`. On success, the `Promise` is resolved with an array of objects + * containing both a `priority` and `exchange` property (e.g.`[{priority: 10, exchange: 'mx.example.com'}, ...]`). + * @since v10.6.0 + */ + function resolveMx(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve regular expression-based records (`NAPTR` records) for the `hostname`. On success, the `Promise` is resolved with an array + * of objects with the following properties: + * + * * `flags` + * * `service` + * * `regexp` + * * `replacement` + * * `order` + * * `preference` + * + * ```js + * { + * flags: 's', + * service: 'SIP+D2U', + * regexp: '', + * replacement: '_sip._udp.example.com', + * order: 30, + * preference: 100, + * } + * ``` + * @since v10.6.0 + */ + function resolveNaptr(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve name server records (`NS` records) for the `hostname`. On success, the `Promise` is resolved with an array of name server + * records available for `hostname` (e.g.`['ns1.example.com', 'ns2.example.com']`). + * @since v10.6.0 + */ + function resolveNs(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve pointer records (`PTR` records) for the `hostname`. On success, the `Promise` is resolved with an array of strings + * containing the reply records. + * @since v10.6.0 + */ + function resolvePtr(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for + * the `hostname`. On success, the `Promise` is resolved with an object with the + * following properties: + * + * * `nsname` + * * `hostmaster` + * * `serial` + * * `refresh` + * * `retry` + * * `expire` + * * `minttl` + * + * ```js + * { + * nsname: 'ns.example.com', + * hostmaster: 'root.example.com', + * serial: 2013101809, + * refresh: 10000, + * retry: 2400, + * expire: 604800, + * minttl: 3600, + * } + * ``` + * @since v10.6.0 + */ + function resolveSoa(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve service records (`SRV` records) for the `hostname`. On success, the `Promise` is resolved with an array of objects with + * the following properties: + * + * * `priority` + * * `weight` + * * `port` + * * `name` + * + * ```js + * { + * priority: 10, + * weight: 5, + * port: 21223, + * name: 'service.example.com', + * } + * ``` + * @since v10.6.0 + */ + function resolveSrv(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve certificate associations (`TLSA` records) for + * the `hostname`. On success, the `Promise` is resolved with an array of objectsAdd commentMore actions + * with these properties: + * + * * `certUsage` + * * `selector` + * * `match` + * * `data` + * + * ```js + * { + * certUsage: 3, + * selector: 1, + * match: 1, + * data: [ArrayBuffer], + * } + * ``` + * @since v23.9.0, v22.15.0 + */ + function resolveTlsa(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. On success, the `Promise` is resolved with a two-dimensional array + * of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of + * one record. Depending on the use case, these could be either joined together or + * treated separately. + * @since v10.6.0 + */ + function resolveTxt(hostname: string): Promise; + /** + * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an + * array of host names. + * + * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` + * is one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes). + * @since v10.6.0 + */ + function reverse(ip: string): Promise; + /** + * Get the default value for `verbatim` in {@link lookup} and [dnsPromises.lookup()](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options). + * The value could be: + * + * * `ipv4first`: for `verbatim` defaulting to `false`. + * * `verbatim`: for `verbatim` defaulting to `true`. + * @since v20.1.0 + */ + function getDefaultResultOrder(): "ipv4first" | "verbatim"; + /** + * Sets the IP address and port of servers to be used when performing DNS + * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted + * addresses. If the port is the IANA default DNS port (53) it can be omitted. + * + * ```js + * dnsPromises.setServers([ + * '4.4.4.4', + * '[2001:4860:4860::8888]', + * '4.4.4.4:1053', + * '[2001:4860:4860::8888]:1053', + * ]); + * ``` + * + * An error will be thrown if an invalid address is provided. + * + * The `dnsPromises.setServers()` method must not be called while a DNS query is in + * progress. + * + * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html). + * That is, if attempting to resolve with the first server provided results in a `NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with + * subsequent servers provided. Fallback DNS servers will only be used if the + * earlier ones time out or result in some other error. + * @since v10.6.0 + * @param servers array of `RFC 5952` formatted addresses + */ + function setServers(servers: readonly string[]): void; + /** + * Set the default value of `order` in `dns.lookup()` and `{@link lookup}`. The value could be: + * + * * `ipv4first`: sets default `order` to `ipv4first`. + * * `ipv6first`: sets default `order` to `ipv6first`. + * * `verbatim`: sets default `order` to `verbatim`. + * + * The default is `verbatim` and [dnsPromises.setDefaultResultOrder()](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder) + * have higher priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder). + * When using [worker threads](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html), [`dnsPromises.setDefaultResultOrder()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder) + * from the main thread won't affect the default dns orders in workers. + * @since v16.4.0, v14.18.0 + * @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`. + */ + function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void; + // Error codes + const NODATA: "ENODATA"; + const FORMERR: "EFORMERR"; + const SERVFAIL: "ESERVFAIL"; + const NOTFOUND: "ENOTFOUND"; + const NOTIMP: "ENOTIMP"; + const REFUSED: "EREFUSED"; + const BADQUERY: "EBADQUERY"; + const BADNAME: "EBADNAME"; + const BADFAMILY: "EBADFAMILY"; + const BADRESP: "EBADRESP"; + const CONNREFUSED: "ECONNREFUSED"; + const TIMEOUT: "ETIMEOUT"; + const EOF: "EOF"; + const FILE: "EFILE"; + const NOMEM: "ENOMEM"; + const DESTRUCTION: "EDESTRUCTION"; + const BADSTR: "EBADSTR"; + const BADFLAGS: "EBADFLAGS"; + const NONAME: "ENONAME"; + const BADHINTS: "EBADHINTS"; + const NOTINITIALIZED: "ENOTINITIALIZED"; + const LOADIPHLPAPI: "ELOADIPHLPAPI"; + const ADDRGETNETWORKPARAMS: "EADDRGETNETWORKPARAMS"; + const CANCELLED: "ECANCELLED"; + + /** + * An independent resolver for DNS requests. + * + * Creating a new resolver uses the default server settings. Setting + * the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetserversservers) does not affect + * other resolvers: + * + * ```js + * import { promises } from 'node:dns'; + * const resolver = new promises.Resolver(); + * resolver.setServers(['4.4.4.4']); + * + * // This request will use the server at 4.4.4.4, independent of global settings. + * resolver.resolve4('example.org').then((addresses) => { + * // ... + * }); + * + * // Alternatively, the same code can be written using async-await style. + * (async function() { + * const addresses = await resolver.resolve4('example.org'); + * })(); + * ``` + * + * The following methods from the `dnsPromises` API are available: + * + * * `resolver.getServers()` + * * `resolver.resolve()` + * * `resolver.resolve4()` + * * `resolver.resolve6()` + * * `resolver.resolveAny()` + * * `resolver.resolveCaa()` + * * `resolver.resolveCname()` + * * `resolver.resolveMx()` + * * `resolver.resolveNaptr()` + * * `resolver.resolveNs()` + * * `resolver.resolvePtr()` + * * `resolver.resolveSoa()` + * * `resolver.resolveSrv()` + * * `resolver.resolveTxt()` + * * `resolver.reverse()` + * * `resolver.setServers()` + * @since v10.6.0 + */ + class Resolver { + constructor(options?: ResolverOptions); + /** + * Cancel all outstanding DNS queries made by this resolver. The corresponding + * callbacks will be called with an error with code `ECANCELLED`. + * @since v8.3.0 + */ + cancel(): void; + getServers: typeof getServers; + resolve: typeof resolve; + resolve4: typeof resolve4; + resolve6: typeof resolve6; + resolveAny: typeof resolveAny; + resolveCaa: typeof resolveCaa; + resolveCname: typeof resolveCname; + resolveMx: typeof resolveMx; + resolveNaptr: typeof resolveNaptr; + resolveNs: typeof resolveNs; + resolvePtr: typeof resolvePtr; + resolveSoa: typeof resolveSoa; + resolveSrv: typeof resolveSrv; + resolveTlsa: typeof resolveTlsa; + resolveTxt: typeof resolveTxt; + reverse: typeof reverse; + /** + * The resolver instance will send its requests from the specified IP address. + * This allows programs to specify outbound interfaces when used on multi-homed + * systems. + * + * If a v4 or v6 address is not specified, it is set to the default and the + * operating system will choose a local address automatically. + * + * The resolver will use the v4 local address when making requests to IPv4 DNS + * servers, and the v6 local address when making requests to IPv6 DNS servers. + * The `rrtype` of resolution requests has no impact on the local address used. + * @since v15.1.0, v14.17.0 + * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address. + * @param [ipv6='::0'] A string representation of an IPv6 address. + */ + setLocalAddress(ipv4?: string, ipv6?: string): void; + setServers: typeof setServers; + } +} +declare module "dns/promises" { + export * from "node:dns/promises"; +} diff --git a/node_modules/@types/node/domain.d.ts b/node_modules/@types/node/domain.d.ts new file mode 100644 index 0000000..8e03a7d --- /dev/null +++ b/node_modules/@types/node/domain.d.ts @@ -0,0 +1,150 @@ +declare module "node:domain" { + import { EventEmitter } from "node:events"; + /** + * The `Domain` class encapsulates the functionality of routing errors and + * uncaught exceptions to the active `Domain` object. + * + * To handle the errors that it catches, listen to its `'error'` event. + */ + class Domain extends EventEmitter { + /** + * An array of event emitters that have been explicitly added to the domain. + */ + members: EventEmitter[]; + /** + * The `enter()` method is plumbing used by the `run()`, `bind()`, and `intercept()` methods to set the active domain. It sets `domain.active` and `process.domain` to the domain, and implicitly + * pushes the domain onto the domain + * stack managed by the domain module (see {@link exit} for details on the + * domain stack). The call to `enter()` delimits the beginning of a chain of + * asynchronous calls and I/O operations bound to a domain. + * + * Calling `enter()` changes only the active domain, and does not alter the domain + * itself. `enter()` and `exit()` can be called an arbitrary number of times on a + * single domain. + */ + enter(): void; + /** + * The `exit()` method exits the current domain, popping it off the domain stack. + * Any time execution is going to switch to the context of a different chain of + * asynchronous calls, it's important to ensure that the current domain is exited. + * The call to `exit()` delimits either the end of or an interruption to the chain + * of asynchronous calls and I/O operations bound to a domain. + * + * If there are multiple, nested domains bound to the current execution context, `exit()` will exit any domains nested within this domain. + * + * Calling `exit()` changes only the active domain, and does not alter the domain + * itself. `enter()` and `exit()` can be called an arbitrary number of times on a + * single domain. + */ + exit(): void; + /** + * Run the supplied function in the context of the domain, implicitly + * binding all event emitters, timers, and low-level requests that are + * created in that context. Optionally, arguments can be passed to + * the function. + * + * This is the most basic way to use a domain. + * + * ```js + * import domain from 'node:domain'; + * import fs from 'node:fs'; + * const d = domain.create(); + * d.on('error', (er) => { + * console.error('Caught error!', er); + * }); + * d.run(() => { + * process.nextTick(() => { + * setTimeout(() => { // Simulating some various async stuff + * fs.open('non-existent file', 'r', (er, fd) => { + * if (er) throw er; + * // proceed... + * }); + * }, 100); + * }); + * }); + * ``` + * + * In this example, the `d.on('error')` handler will be triggered, rather + * than crashing the program. + */ + run(fn: (...args: any[]) => T, ...args: any[]): T; + /** + * Explicitly adds an emitter to the domain. If any event handlers called by + * the emitter throw an error, or if the emitter emits an `'error'` event, it + * will be routed to the domain's `'error'` event, just like with implicit + * binding. + * + * If the `EventEmitter` was already bound to a domain, it is removed from that + * one, and bound to this one instead. + * @param emitter emitter to be added to the domain + */ + add(emitter: EventEmitter): void; + /** + * The opposite of {@link add}. Removes domain handling from the + * specified emitter. + * @param emitter emitter to be removed from the domain + */ + remove(emitter: EventEmitter): void; + /** + * The returned function will be a wrapper around the supplied callback + * function. When the returned function is called, any errors that are + * thrown will be routed to the domain's `'error'` event. + * + * ```js + * const d = domain.create(); + * + * function readSomeFile(filename, cb) { + * fs.readFile(filename, 'utf8', d.bind((er, data) => { + * // If this throws, it will also be passed to the domain. + * return cb(er, data ? JSON.parse(data) : null); + * })); + * } + * + * d.on('error', (er) => { + * // An error occurred somewhere. If we throw it now, it will crash the program + * // with the normal line number and stack message. + * }); + * ``` + * @param callback The callback function + * @return The bound function + */ + bind(callback: T): T; + /** + * This method is almost identical to {@link bind}. However, in + * addition to catching thrown errors, it will also intercept `Error` objects sent as the first argument to the function. + * + * In this way, the common `if (err) return callback(err);` pattern can be replaced + * with a single error handler in a single place. + * + * ```js + * const d = domain.create(); + * + * function readSomeFile(filename, cb) { + * fs.readFile(filename, 'utf8', d.intercept((data) => { + * // Note, the first argument is never passed to the + * // callback since it is assumed to be the 'Error' argument + * // and thus intercepted by the domain. + * + * // If this throws, it will also be passed to the domain + * // so the error-handling logic can be moved to the 'error' + * // event on the domain instead of being repeated throughout + * // the program. + * return cb(null, JSON.parse(data)); + * })); + * } + * + * d.on('error', (er) => { + * // An error occurred somewhere. If we throw it now, it will crash the program + * // with the normal line number and stack message. + * }); + * ``` + * @param callback The callback function + * @return The intercepted function + */ + intercept(callback: T): T; + } + function create(): Domain; +} +declare module "domain" { + export * from "node:domain"; +} diff --git a/node_modules/@types/node/events.d.ts b/node_modules/@types/node/events.d.ts new file mode 100644 index 0000000..3191046 --- /dev/null +++ b/node_modules/@types/node/events.d.ts @@ -0,0 +1,1008 @@ +declare module "node:events" { + import { AsyncResource, AsyncResourceOptions } from "node:async_hooks"; + // #region Event map helpers + type EventMap = Record; + type IfEventMap, True, False> = {} extends Events ? False : True; + type Args, EventName extends string | symbol> = IfEventMap< + Events, + EventName extends keyof Events ? Events[EventName] + : EventName extends keyof EventEmitterEventMap ? EventEmitterEventMap[EventName] + : any[], + any[] + >; + type EventNames, EventName extends string | symbol> = IfEventMap< + Events, + EventName | (keyof Events & (string | symbol)) | keyof EventEmitterEventMap, + string | symbol + >; + type Listener, EventName extends string | symbol> = IfEventMap< + Events, + ( + ...args: EventName extends keyof Events ? Events[EventName] + : EventName extends keyof EventEmitterEventMap ? EventEmitterEventMap[EventName] + : any[] + ) => void, + (...args: any[]) => void + >; + interface EventEmitterEventMap { + newListener: [eventName: string | symbol, listener: (...args: any[]) => void]; + removeListener: [eventName: string | symbol, listener: (...args: any[]) => void]; + } + // #endregion + interface EventEmitterOptions { + /** + * It enables + * [automatic capturing of promise rejection](https://nodejs.org/docs/latest-v26.x/api/events.html#capture-rejections-of-promises). + * @default false + */ + captureRejections?: boolean | undefined; + } + /** + * The `EventEmitter` class is defined and exposed by the `node:events` module: + * + * ```js + * import { EventEmitter } from 'node:events'; + * ``` + * + * All `EventEmitter`s emit the event `'newListener'` when new listeners are + * added and `'removeListener'` when existing listeners are removed. + * + * It supports the following option: + * @since v0.1.26 + */ + class EventEmitter = any> { + constructor(options?: EventEmitterOptions); + } + interface EventEmitter = any> extends NodeJS.EventEmitter {} + global { + namespace NodeJS { + interface EventEmitter = any> { + /** + * The `Symbol.for('nodejs.rejection')` method is called in case a + * promise rejection happens when emitting an event and + * `captureRejections` is enabled on the emitter. + * It is possible to use `events.captureRejectionSymbol` in + * place of `Symbol.for('nodejs.rejection')`. + * + * ```js + * import { EventEmitter, captureRejectionSymbol } from 'node:events'; + * + * class MyClass extends EventEmitter { + * constructor() { + * super({ captureRejections: true }); + * } + * + * [captureRejectionSymbol](err, event, ...args) { + * console.log('rejection happened for', event, 'with', err, ...args); + * this.destroy(err); + * } + * + * destroy(err) { + * // Tear the resource down here. + * } + * } + * ``` + * @since v13.4.0, v12.16.0 + */ + [EventEmitter.captureRejectionSymbol]?(error: Error, event: string | symbol, ...args: any[]): void; + /** + * Alias for `emitter.on(eventName, listener)`. + * @since v0.1.26 + */ + addListener(eventName: EventNames, listener: Listener): this; + /** + * Synchronously calls each of the listeners registered for the event named + * `eventName`, in the order they were registered, passing the supplied arguments + * to each. + * + * Returns `true` if the event had listeners, `false` otherwise. + * + * ```js + * import { EventEmitter } from 'node:events'; + * const myEmitter = new EventEmitter(); + * + * // First listener + * myEmitter.on('event', function firstListener() { + * console.log('Helloooo! first listener'); + * }); + * // Second listener + * myEmitter.on('event', function secondListener(arg1, arg2) { + * console.log(`event with parameters ${arg1}, ${arg2} in second listener`); + * }); + * // Third listener + * myEmitter.on('event', function thirdListener(...args) { + * const parameters = args.join(', '); + * console.log(`event with parameters ${parameters} in third listener`); + * }); + * + * console.log(myEmitter.listeners('event')); + * + * myEmitter.emit('event', 1, 2, 3, 4, 5); + * + * // Prints: + * // [ + * // [Function: firstListener], + * // [Function: secondListener], + * // [Function: thirdListener] + * // ] + * // Helloooo! first listener + * // event with parameters 1, 2 in second listener + * // event with parameters 1, 2, 3, 4, 5 in third listener + * ``` + * @since v0.1.26 + */ + emit(eventName: EventNames, ...args: Args): boolean; + /** + * Returns an array listing the events for which the emitter has registered + * listeners. + * + * ```js + * import { EventEmitter } from 'node:events'; + * + * const myEE = new EventEmitter(); + * myEE.on('foo', () => {}); + * myEE.on('bar', () => {}); + * + * const sym = Symbol('symbol'); + * myEE.on(sym, () => {}); + * + * console.log(myEE.eventNames()); + * // Prints: [ 'foo', 'bar', Symbol(symbol) ] + * ``` + * @since v6.0.0 + */ + eventNames(): (string | symbol)[]; + /** + * Returns the current max listener value for the `EventEmitter` which is either + * set by `emitter.setMaxListeners(n)` or defaults to + * `events.defaultMaxListeners`. + * @since v1.0.0 + */ + getMaxListeners(): number; + /** + * Returns the number of listeners listening for the event named `eventName`. + * If `listener` is provided, it will return how many times the listener is found + * in the list of the listeners of the event. + * @since v3.2.0 + * @param eventName The name of the event being listened for + * @param listener The event handler function + */ + listenerCount( + eventName: EventNames, + listener?: Listener, + ): number; + /** + * Returns a copy of the array of listeners for the event named `eventName`. + * + * ```js + * server.on('connection', (stream) => { + * console.log('someone connected!'); + * }); + * console.log(util.inspect(server.listeners('connection'))); + * // Prints: [ [Function] ] + * ``` + * @since v0.1.26 + */ + listeners(eventName: EventNames): Listener[]; + /** + * Alias for `emitter.removeListener()`. + * @since v10.0.0 + */ + off(eventName: EventNames, listener: Listener): this; + /** + * Adds the `listener` function to the end of the listeners array for the + * event named `eventName`. No checks are made to see if the `listener` has + * already been added. Multiple calls passing the same combination of `eventName` + * and `listener` will result in the `listener` being added, and called, multiple + * times. + * + * ```js + * server.on('connection', (stream) => { + * console.log('someone connected!'); + * }); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * + * By default, event listeners are invoked in the order they are added. The + * `emitter.prependListener()` method can be used as an alternative to add the + * event listener to the beginning of the listeners array. + * + * ```js + * import { EventEmitter } from 'node:events'; + * const myEE = new EventEmitter(); + * myEE.on('foo', () => console.log('a')); + * myEE.prependListener('foo', () => console.log('b')); + * myEE.emit('foo'); + * // Prints: + * // b + * // a + * ``` + * @since v0.1.101 + * @param eventName The name of the event. + * @param listener The callback function + */ + on(eventName: EventNames, listener: Listener): this; + /** + * Adds a **one-time** `listener` function for the event named `eventName`. The + * next time `eventName` is triggered, this listener is removed and then invoked. + * + * ```js + * server.once('connection', (stream) => { + * console.log('Ah, we have our first user!'); + * }); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * + * By default, event listeners are invoked in the order they are added. The + * `emitter.prependOnceListener()` method can be used as an alternative to add the + * event listener to the beginning of the listeners array. + * + * ```js + * import { EventEmitter } from 'node:events'; + * const myEE = new EventEmitter(); + * myEE.once('foo', () => console.log('a')); + * myEE.prependOnceListener('foo', () => console.log('b')); + * myEE.emit('foo'); + * // Prints: + * // b + * // a + * ``` + * @since v0.3.0 + * @param eventName The name of the event. + * @param listener The callback function + */ + once(eventName: EventNames, listener: Listener): this; + /** + * Adds the `listener` function to the _beginning_ of the listeners array for the + * event named `eventName`. No checks are made to see if the `listener` has + * already been added. Multiple calls passing the same combination of `eventName` + * and `listener` will result in the `listener` being added, and called, multiple + * times. + * + * ```js + * server.prependListener('connection', (stream) => { + * console.log('someone connected!'); + * }); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v6.0.0 + * @param eventName The name of the event. + * @param listener The callback function + */ + prependListener(eventName: EventNames, listener: Listener): this; + /** + * Adds a **one-time** `listener` function for the event named `eventName` to the + * _beginning_ of the listeners array. The next time `eventName` is triggered, this + * listener is removed, and then invoked. + * + * ```js + * server.prependOnceListener('connection', (stream) => { + * console.log('Ah, we have our first user!'); + * }); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v6.0.0 + * @param eventName The name of the event. + * @param listener The callback function + */ + prependOnceListener( + eventName: EventNames, + listener: Listener, + ): this; + /** + * Returns a copy of the array of listeners for the event named `eventName`, + * including any wrappers (such as those created by `.once()`). + * + * ```js + * import { EventEmitter } from 'node:events'; + * const emitter = new EventEmitter(); + * emitter.once('log', () => console.log('log once')); + * + * // Returns a new Array with a function `onceWrapper` which has a property + * // `listener` which contains the original listener bound above + * const listeners = emitter.rawListeners('log'); + * const logFnWrapper = listeners[0]; + * + * // Logs "log once" to the console and does not unbind the `once` event + * logFnWrapper.listener(); + * + * // Logs "log once" to the console and removes the listener + * logFnWrapper(); + * + * emitter.on('log', () => console.log('log persistently')); + * // Will return a new Array with a single function bound by `.on()` above + * const newListeners = emitter.rawListeners('log'); + * + * // Logs "log persistently" twice + * newListeners[0](); + * emitter.emit('log'); + * ``` + * @since v9.4.0 + */ + rawListeners(eventName: EventNames): Listener[]; + /** + * Removes all listeners, or those of the specified `eventName`. + * + * It is bad practice to remove listeners added elsewhere in the code, + * particularly when the `EventEmitter` instance was created by some other + * component or module (e.g. sockets or file streams). + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v0.1.26 + */ + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: EventNames): this; + /** + * Removes the specified `listener` from the listener array for the event named + * `eventName`. + * + * ```js + * const callback = (stream) => { + * console.log('someone connected!'); + * }; + * server.on('connection', callback); + * // ... + * server.removeListener('connection', callback); + * ``` + * + * `removeListener()` will remove, at most, one instance of a listener from the + * listener array. If any single listener has been added multiple times to the + * listener array for the specified `eventName`, then `removeListener()` must be + * called multiple times to remove each instance. + * + * Once an event is emitted, all listeners attached to it at the + * time of emitting are called in order. This implies that any + * `removeListener()` or `removeAllListeners()` calls _after_ emitting and + * _before_ the last listener finishes execution will not remove them from + * `emit()` in progress. Subsequent events behave as expected. + * + * ```js + * import { EventEmitter } from 'node:events'; + * class MyEmitter extends EventEmitter {} + * const myEmitter = new MyEmitter(); + * + * const callbackA = () => { + * console.log('A'); + * myEmitter.removeListener('event', callbackB); + * }; + * + * const callbackB = () => { + * console.log('B'); + * }; + * + * myEmitter.on('event', callbackA); + * + * myEmitter.on('event', callbackB); + * + * // callbackA removes listener callbackB but it will still be called. + * // Internal listener array at time of emit [callbackA, callbackB] + * myEmitter.emit('event'); + * // Prints: + * // A + * // B + * + * // callbackB is now removed. + * // Internal listener array [callbackA] + * myEmitter.emit('event'); + * // Prints: + * // A + * ``` + * + * Because listeners are managed using an internal array, calling this will + * change the position indexes of any listener registered _after_ the listener + * being removed. This will not impact the order in which listeners are called, + * but it means that any copies of the listener array as returned by + * the `emitter.listeners()` method will need to be recreated. + * + * When a single function has been added as a handler multiple times for a single + * event (as in the example below), `removeListener()` will remove the most + * recently added instance. In the example the `once('ping')` + * listener is removed: + * + * ```js + * import { EventEmitter } from 'node:events'; + * const ee = new EventEmitter(); + * + * function pong() { + * console.log('pong'); + * } + * + * ee.on('ping', pong); + * ee.once('ping', pong); + * ee.removeListener('ping', pong); + * + * ee.emit('ping'); + * ee.emit('ping'); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v0.1.26 + */ + removeListener(eventName: EventNames, listener: Listener): this; + /** + * By default `EventEmitter`s will print a warning if more than `10` listeners are + * added for a particular event. This is a useful default that helps finding + * memory leaks. The `emitter.setMaxListeners()` method allows the limit to be + * modified for this specific `EventEmitter` instance. The value can be set to + * `Infinity` (or `0`) to indicate an unlimited number of listeners. + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v0.3.5 + */ + setMaxListeners(n: number): this; + } + } + } + namespace EventEmitter { + export { EventEmitter, EventEmitterEventMap, EventEmitterOptions }; + } + namespace EventEmitter { + interface Abortable { + signal?: AbortSignal | undefined; + } + /** + * See how to write a custom [rejection handler](https://nodejs.org/docs/latest-v26.x/api/events.html#emittersymbolfornodejsrejectionerr-eventname-args). + * @since v13.4.0, v12.16.0 + */ + const captureRejectionSymbol: unique symbol; + /** + * Change the default `captureRejections` option on all new `EventEmitter` objects. + * @since v13.4.0, v12.16.0 + */ + let captureRejections: boolean; + /** + * By default, a maximum of `10` listeners can be registered for any single + * event. This limit can be changed for individual `EventEmitter` instances + * using the `emitter.setMaxListeners(n)` method. To change the default + * for _all_ `EventEmitter` instances, the `events.defaultMaxListeners` + * property can be used. If this value is not a positive number, a `RangeError` + * is thrown. + * + * Take caution when setting the `events.defaultMaxListeners` because the + * change affects _all_ `EventEmitter` instances, including those created before + * the change is made. However, calling `emitter.setMaxListeners(n)` still has + * precedence over `events.defaultMaxListeners`. + * + * This is not a hard limit. The `EventEmitter` instance will allow + * more listeners to be added but will output a trace warning to stderr indicating + * that a "possible EventEmitter memory leak" has been detected. For any single + * `EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()` + * methods can be used to temporarily avoid this warning: + * + * `defaultMaxListeners` has no effect on `AbortSignal` instances. While it is + * still possible to use `emitter.setMaxListeners(n)` to set a warning limit + * for individual `AbortSignal` instances, per default `AbortSignal` instances will not warn. + * + * ```js + * import { EventEmitter } from 'node:events'; + * const emitter = new EventEmitter(); + * emitter.setMaxListeners(emitter.getMaxListeners() + 1); + * emitter.once('event', () => { + * // do stuff + * emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); + * }); + * ``` + * + * The `--trace-warnings` command-line flag can be used to display the + * stack trace for such warnings. + * + * The emitted warning can be inspected with `process.on('warning')` and will + * have the additional `emitter`, `type`, and `count` properties, referring to + * the event emitter instance, the event's name and the number of attached + * listeners, respectively. + * Its `name` property is set to `'MaxListenersExceededWarning'`. + * @since v0.11.2 + */ + let defaultMaxListeners: number; + /** + * This symbol shall be used to install a listener for only monitoring `'error'` + * events. Listeners installed using this symbol are called before the regular + * `'error'` listeners are called. + * + * Installing a listener using this symbol does not change the behavior once an + * `'error'` event is emitted. Therefore, the process will still crash if no + * regular `'error'` listener is installed. + * @since v13.6.0, v12.17.0 + */ + const errorMonitor: unique symbol; + /** + * Listens once to the `abort` event on the provided `signal`. + * + * Listening to the `abort` event on abort signals is unsafe and may + * lead to resource leaks since another third party with the signal can + * call `e.stopImmediatePropagation()`. Unfortunately Node.js cannot change + * this since it would violate the web standard. Additionally, the original + * API makes it easy to forget to remove listeners. + * + * This API allows safely using `AbortSignal`s in Node.js APIs by solving these + * two issues by listening to the event such that `stopImmediatePropagation` does + * not prevent the listener from running. + * + * Returns a disposable so that it may be unsubscribed from more easily. + * + * ```js + * import { addAbortListener } from 'node:events'; + * + * function example(signal) { + * signal.addEventListener('abort', (e) => e.stopImmediatePropagation()); + * // addAbortListener() returns a disposable, so the `using` keyword ensures + * // the abort listener is automatically removed when this scope exits. + * using _ = addAbortListener(signal, (e) => { + * // Do something when signal is aborted. + * }); + * } + * ``` + * @since v20.5.0 + * @return Disposable that removes the `abort` listener. + */ + function addAbortListener(signal: AbortSignal, resource: (event: Event) => void): Disposable; + /** + * Returns a copy of the array of listeners for the event named `eventName`. + * + * For `EventEmitter`s this behaves exactly the same as calling `.listeners` on + * the emitter. + * + * For `EventTarget`s this is the only way to get the event listeners for the + * event target. This is useful for debugging and diagnostic purposes. + * + * ```js + * import { getEventListeners, EventEmitter } from 'node:events'; + * + * { + * const ee = new EventEmitter(); + * const listener = () => console.log('Events are fun'); + * ee.on('foo', listener); + * console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ] + * } + * { + * const et = new EventTarget(); + * const listener = () => console.log('Events are fun'); + * et.addEventListener('foo', listener); + * console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ] + * } + * ``` + * @since v15.2.0, v14.17.0 + */ + function getEventListeners(emitter: EventEmitter, name: string | symbol): ((...args: any[]) => void)[]; + function getEventListeners(emitter: EventTarget, name: string): ((...args: any[]) => void)[]; + /** + * Returns the currently set max amount of listeners. + * + * For `EventEmitter`s this behaves exactly the same as calling `.getMaxListeners` on + * the emitter. + * + * For `EventTarget`s this is the only way to get the max event listeners for the + * event target. If the number of event handlers on a single EventTarget exceeds + * the max set, the EventTarget will print a warning. + * + * ```js + * import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events'; + * + * { + * const ee = new EventEmitter(); + * console.log(getMaxListeners(ee)); // 10 + * setMaxListeners(11, ee); + * console.log(getMaxListeners(ee)); // 11 + * } + * { + * const et = new EventTarget(); + * console.log(getMaxListeners(et)); // 10 + * setMaxListeners(11, et); + * console.log(getMaxListeners(et)); // 11 + * } + * ``` + * @since v19.9.0 + */ + function getMaxListeners(emitter: EventEmitter | EventTarget): number; + /** + * Returns the number of registered listeners for the event named `eventName`. + * + * For `EventEmitter`s this behaves exactly the same as calling `.listenerCount` + * on the emitter. + * + * For `EventTarget`s this is the only way to obtain the listener count. This can + * be useful for debugging and diagnostic purposes. + * @since v0.9.12 + */ + function listenerCount(emitter: EventEmitter, eventName: string | symbol): number; + function listenerCount(emitter: EventTarget, eventName: string): number; + interface OnOptions extends Abortable { + /** + * Names of events that will end the iteration. + */ + close?: readonly string[] | undefined; + /** + * The high watermark. The emitter is paused every time the size of events + * being buffered is higher than it. Supported only on emitters implementing + * `pause()` and `resume()` methods. + * @default Number.MAX_SAFE_INTEGER + */ + highWaterMark?: number | undefined; + /** + * The low watermark. The emitter is resumed every time the size of events + * being buffered is lower than it. Supported only on emitters implementing + * `pause()` and `resume()` methods. + * @default 1 + */ + lowWaterMark?: number | undefined; + } + /** + * ```js + * import { on, EventEmitter } from 'node:events'; + * import process from 'node:process'; + * + * const ee = new EventEmitter(); + * + * // Emit later on + * process.nextTick(() => { + * ee.emit('foo', 'bar'); + * ee.emit('foo', 42); + * }); + * + * for await (const event of on(ee, 'foo')) { + * // The execution of this inner block is synchronous and it + * // processes one event at a time (even with await). Do not use + * // if concurrent execution is required. + * console.log(event); // prints ['bar'] [42] + * } + * // Unreachable here + * ``` + * + * Returns an `AsyncIterator` that iterates `eventName` events. It will throw + * if the `EventEmitter` emits `'error'`. It removes all listeners when + * exiting the loop. The `value` returned by each iteration is an array + * composed of the emitted event arguments. + * + * An `AbortSignal` can be used to cancel waiting on events: + * + * ```js + * import { on, EventEmitter } from 'node:events'; + * import process from 'node:process'; + * + * const ac = new AbortController(); + * + * (async () => { + * const ee = new EventEmitter(); + * + * // Emit later on + * process.nextTick(() => { + * ee.emit('foo', 'bar'); + * ee.emit('foo', 42); + * }); + * + * for await (const event of on(ee, 'foo', { signal: ac.signal })) { + * // The execution of this inner block is synchronous and it + * // processes one event at a time (even with await). Do not use + * // if concurrent execution is required. + * console.log(event); // prints ['bar'] [42] + * } + * // Unreachable here + * })(); + * + * process.nextTick(() => ac.abort()); + * ``` + * @since v13.6.0, v12.16.0 + * @returns `AsyncIterator` that iterates `eventName` events emitted by the `emitter` + */ + function on( + emitter: EventEmitter, + eventName: string | symbol, + options?: OnOptions, + ): NodeJS.AsyncIterator; + function on( + emitter: EventTarget, + eventName: string, + options?: OnOptions, + ): NodeJS.AsyncIterator; + interface OnceOptions extends Abortable {} + /** + * Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given + * event or that is rejected if the `EventEmitter` emits `'error'` while waiting. + * The `Promise` will resolve with an array of all the arguments emitted to the + * given event. + * + * This method is intentionally generic and works with the web platform + * [EventTarget][WHATWG-EventTarget] interface, which has no special + * `'error'` event semantics and does not listen to the `'error'` event. + * + * ```js + * import { once, EventEmitter } from 'node:events'; + * import process from 'node:process'; + * + * const ee = new EventEmitter(); + * + * process.nextTick(() => { + * ee.emit('myevent', 42); + * }); + * + * const [value] = await once(ee, 'myevent'); + * console.log(value); + * + * const err = new Error('kaboom'); + * process.nextTick(() => { + * ee.emit('error', err); + * }); + * + * try { + * await once(ee, 'myevent'); + * } catch (err) { + * console.error('error happened', err); + * } + * ``` + * + * The special handling of the `'error'` event is only used when `events.once()` + * is used to wait for another event. If `events.once()` is used to wait for the + * '`error'` event itself, then it is treated as any other kind of event without + * special handling: + * + * ```js + * import { EventEmitter, once } from 'node:events'; + * + * const ee = new EventEmitter(); + * + * once(ee, 'error') + * .then(([err]) => console.log('ok', err.message)) + * .catch((err) => console.error('error', err.message)); + * + * ee.emit('error', new Error('boom')); + * + * // Prints: ok boom + * ``` + * + * An `AbortSignal` can be used to cancel waiting for the event: + * + * ```js + * import { EventEmitter, once } from 'node:events'; + * + * const ee = new EventEmitter(); + * const ac = new AbortController(); + * + * async function foo(emitter, event, signal) { + * try { + * await once(emitter, event, { signal }); + * console.log('event emitted!'); + * } catch (error) { + * if (error.name === 'AbortError') { + * console.error('Waiting for the event was canceled!'); + * } else { + * console.error('There was an error', error.message); + * } + * } + * } + * + * foo(ee, 'foo', ac.signal); + * ac.abort(); // Prints: Waiting for the event was canceled! + * ``` + * @since v11.13.0, v10.16.0 + */ + function once( + emitter: EventEmitter, + eventName: string | symbol, + options?: OnceOptions, + ): Promise; + function once(emitter: EventTarget, eventName: string, options?: OnceOptions): Promise; + /** + * ```js + * import { setMaxListeners, EventEmitter } from 'node:events'; + * + * const target = new EventTarget(); + * const emitter = new EventEmitter(); + * + * setMaxListeners(5, target, emitter); + * ``` + * @since v15.4.0 + * @param n A non-negative number. The maximum number of listeners per `EventTarget` event. + * @param eventTargets Zero or more `EventTarget` + * or `EventEmitter` instances. If none are specified, `n` is set as the default + * max for all newly created `EventTarget` and `EventEmitter` objects. + * objects. + */ + function setMaxListeners(n: number, ...eventTargets: ReadonlyArray): void; + /** + * This is the interface from which event-emitting Node.js APIs inherit in the types package. + * **It is not intended for consumer use.** + * + * It provides event-mapped definitions similar to EventEmitter, except that its signatures + * are deliberately permissive: they provide type _hinting_, but not rigid type-checking, + * for compatibility reasons. + * + * Classes that inherit directly from EventEmitter in JavaScript can inherit directly from + * this interface in the type definitions. Classes that are more than one inheritance level + * away from EventEmitter (eg. `net.Socket` > `stream.Duplex` > `EventEmitter`) must instead + * copy these method definitions into the derived class. Search "#region InternalEventEmitter" + * for examples. + * @internal + */ + interface InternalEventEmitter> extends EventEmitter { + addListener(eventName: E, listener: (...args: T[E]) => void): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: T[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount(eventName: E, listener?: (...args: T[E]) => void): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: T[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off(eventName: E, listener: (...args: T[E]) => void): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on(eventName: E, listener: (...args: T[E]) => void): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once(eventName: E, listener: (...args: T[E]) => void): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener(eventName: E, listener: (...args: T[E]) => void): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(eventName: E, listener: (...args: T[E]) => void): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: T[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener(eventName: E, listener: (...args: T[E]) => void): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + } + interface EventEmitterReferencingAsyncResource extends AsyncResource { + readonly eventEmitter: EventEmitterAsyncResource; + } + interface EventEmitterAsyncResourceOptions extends AsyncResourceOptions, EventEmitterOptions { + /** + * The type of async event. + * @default new.target.name + */ + name?: string | undefined; + } + /** + * Integrates `EventEmitter` with `AsyncResource` for `EventEmitter`s that + * require manual async tracking. Specifically, all events emitted by instances + * of `events.EventEmitterAsyncResource` will run within its [async context](https://nodejs.org/docs/latest-v26.x/api/async_context.html). + * + * ```js + * import { EventEmitterAsyncResource, EventEmitter } from 'node:events'; + * import { notStrictEqual, strictEqual } from 'node:assert'; + * import { executionAsyncId, triggerAsyncId } from 'node:async_hooks'; + * + * // Async tracking tooling will identify this as 'Q'. + * const ee1 = new EventEmitterAsyncResource({ name: 'Q' }); + * + * // 'foo' listeners will run in the EventEmitters async context. + * ee1.on('foo', () => { + * strictEqual(executionAsyncId(), ee1.asyncId); + * strictEqual(triggerAsyncId(), ee1.triggerAsyncId); + * }); + * + * const ee2 = new EventEmitter(); + * + * // 'foo' listeners on ordinary EventEmitters that do not track async + * // context, however, run in the same async context as the emit(). + * ee2.on('foo', () => { + * notStrictEqual(executionAsyncId(), ee2.asyncId); + * notStrictEqual(triggerAsyncId(), ee2.triggerAsyncId); + * }); + * + * Promise.resolve().then(() => { + * ee1.emit('foo'); + * ee2.emit('foo'); + * }); + * ``` + * + * The `EventEmitterAsyncResource` class has the same methods and takes the + * same options as `EventEmitter` and `AsyncResource` themselves. + * @since v17.4.0, v16.14.0 + */ + class EventEmitterAsyncResource extends EventEmitter { + constructor(options?: EventEmitterAsyncResourceOptions); + /** + * The unique `asyncId` assigned to the resource. + */ + readonly asyncId: number; + /** + * The returned `AsyncResource` object has an additional `eventEmitter` property + * that provides a reference to this `EventEmitterAsyncResource`. + */ + readonly asyncResource: EventEmitterReferencingAsyncResource; + /** + * Call all `destroy` hooks. This should only ever be called once. An error will + * be thrown if it is called more than once. This **must** be manually called. If + * the resource is left to be collected by the GC then the `destroy` hooks will + * never be called. + */ + emitDestroy(): void; + /** + * The same `triggerAsyncId` that is passed to the + * `AsyncResource` constructor. + */ + readonly triggerAsyncId: number; + } + /** + * The `NodeEventTarget` is a Node.js-specific extension to `EventTarget` + * that emulates a subset of the `EventEmitter` API. + * @since v14.5.0 + */ + interface NodeEventTarget extends EventTarget { + /** + * Node.js-specific extension to the `EventTarget` class that emulates the + * equivalent `EventEmitter` API. The only difference between `addListener()` and + * `addEventListener()` is that `addListener()` will return a reference to the + * `EventTarget`. + * @since v14.5.0 + */ + addListener(type: string, listener: (arg: any) => void): this; + /** + * Node.js-specific extension to the `EventTarget` class that dispatches the + * `arg` to the list of handlers for `type`. + * @since v15.2.0 + * @returns `true` if event listeners registered for the `type` exist, + * otherwise `false`. + */ + emit(type: string, arg: any): boolean; + /** + * Node.js-specific extension to the `EventTarget` class that returns an array + * of event `type` names for which event listeners are registered. + * @since 14.5.0 + */ + eventNames(): string[]; + /** + * Node.js-specific extension to the `EventTarget` class that returns the number + * of event listeners registered for the `type`. + * @since v14.5.0 + */ + listenerCount(type: string): number; + /** + * Node.js-specific extension to the `EventTarget` class that sets the number + * of max event listeners as `n`. + * @since v14.5.0 + */ + setMaxListeners(n: number): void; + /** + * Node.js-specific extension to the `EventTarget` class that returns the number + * of max event listeners. + * @since v14.5.0 + */ + getMaxListeners(): number; + /** + * Node.js-specific alias for `eventTarget.removeEventListener()`. + * @since v14.5.0 + */ + off(type: string, listener: (arg: any) => void, options?: EventListenerOptions): this; + /** + * Node.js-specific alias for `eventTarget.addEventListener()`. + * @since v14.5.0 + */ + on(type: string, listener: (arg: any) => void): this; + /** + * Node.js-specific extension to the `EventTarget` class that adds a `once` + * listener for the given event `type`. This is equivalent to calling `on` + * with the `once` option set to `true`. + * @since v14.5.0 + */ + once(type: string, listener: (arg: any) => void): this; + /** + * Node.js-specific extension to the `EventTarget` class. If `type` is specified, + * removes all registered listeners for `type`, otherwise removes all registered + * listeners. + * @since v14.5.0 + */ + removeAllListeners(type?: string): this; + /** + * Node.js-specific extension to the `EventTarget` class that removes the + * `listener` for the given `type`. The only difference between `removeListener()` + * and `removeEventListener()` is that `removeListener()` will return a reference + * to the `EventTarget`. + * @since v14.5.0 + */ + removeListener(type: string, listener: (arg: any) => void, options?: EventListenerOptions): this; + } + /** @internal */ + type InternalEventTargetEventProperties = { + [K in keyof T & string as `on${K}`]: ((ev: T[K]) => void) | null; + }; + } + export = EventEmitter; +} +declare module "events" { + import events = require("node:events"); + export = events; +} diff --git a/node_modules/@types/node/ffi.d.ts b/node_modules/@types/node/ffi.d.ts new file mode 100644 index 0000000..6b99320 --- /dev/null +++ b/node_modules/@types/node/ffi.d.ts @@ -0,0 +1,500 @@ +declare module "node:ffi" { + import { NonSharedBuffer } from "node:buffer"; + interface FunctionSignature { + return?: ReturnType | undefined; + arguments?: readonly ArgumentType[] | undefined; + } + interface FunctionDefinitions { + [symbol: string]: FunctionSignature; + } + type CallbackFunction = ( + ...args: { [K in keyof P]: ArgumentTypeMap[DataTypeMap[P[K]]] } + ) => ReturnTypeMap[DataTypeMap[R]]; + interface WrappedFunction + extends CallbackFunction + { + readonly pointer: bigint; + } + type CallbackFunctionFromSignature = CallbackFunction< + ReturnTypeFromFunctionSignature, + ArgumentTypesFromFunctionSignature + >; + type WrappedFunctionFromSignature = WrappedFunction< + ReturnTypeFromFunctionSignature, + ArgumentTypesFromFunctionSignature + >; + type WrappedFunctionsFromDefinitions = { + [K in keyof T]: WrappedFunctionFromSignature; + }; + type ReturnTypeFromFunctionSignature = "return" extends keyof T + ? T extends { return: infer R extends ReturnType } ? R : any + : "void"; + type ArgumentTypesFromFunctionSignature = "arguments" extends keyof T + ? T extends { arguments: infer P extends readonly ArgumentType[] } ? P : any[] + : []; + interface DynamicLibraryResult extends Disposable { + lib: DynamicLibrary; + functions: WrappedFunctionsFromDefinitions; + } + /** + * The native shared library suffix for the current platform: + * + * * `'dylib'` on macOS + * * `'so'` on Unix-like platforms + * * `'dll'` on Windows + * + * This can be used to build portable library paths: + * + * ```js + * const { suffix } = require('node:ffi'); + * + * const path = `libsqlite3.${suffix}`; + * ``` + * @since v26.1.0 + */ + const suffix: string; + /** + * Loads a dynamic library and resolves the requested function definitions. + * + * On Windows passing `null` is not supported. + * + * When `definitions` is omitted, `functions` is returned as an empty object until + * symbols are resolved explicitly. + * + * The returned object also implements the explicit resource management protocol, + * so it can be used with the `using` declaration. Disposing the returned + * object closes the library handle. + * + * ```js + * import { dlopen } from 'node:ffi'; + * + * { + * using handle = dlopen('./mylib.so', { + * add_i32: { arguments: ['i32', 'i32'], return: 'i32' }, + * }); + * console.log(handle.functions.add_i32(20, 22)); + * } // handle.lib.close() is invoked automatically here. + * ``` + * + * ```js + * import { dlopen } from 'node:ffi'; + * + * const { lib, functions } = dlopen('./mylib.so', { + * add_i32: { arguments: ['i32', 'i32'], return: 'i32' }, + * string_length: { arguments: ['pointer'], return: 'u64' }, + * }); + * + * console.log(functions.add_i32(20, 22)); + * ``` + * @since v26.1.0 + * @param path Path to a dynamic library, or `null` to resolve symbols + * from the current process image. + * @param definitions Symbol definitions to resolve immediately. + */ + function dlopen( + path: string | null, + definitions?: T, + ): DynamicLibraryResult; + /** + * Closes a dynamic library. + * + * This is equivalent to calling `handle.close()`. + * @since v26.1.0 + */ + function dlclose(handle: DynamicLibrary): void; + /** + * Resolves a symbol address from a loaded library. + * + * This is equivalent to calling `handle.getSymbol(symbol)`. + * @since v26.1.0 + */ + function dlsym(handle: DynamicLibrary, symbol: string): bigint; + /** + * @since v26.1.0 + */ + class DynamicLibrary { + /** + * Loads the dynamic library without resolving any functions eagerly. + * + * On Windows passing `null` is not supported. + * + * ```js + * const { DynamicLibrary } = require('node:ffi'); + * + * const lib = new DynamicLibrary('./mylib.so'); + * ``` + * @param path Path to a dynamic library, or `null` to resolve symbols + * from the current process image. + */ + constructor(path: string | null); + /** + * The path used to load the library. + */ + readonly path: string; + /** + * An object containing previously resolved symbol addresses as `bigint` values. + */ + readonly symbols: { [symbol: string]: bigint }; + /** + * Closes the library handle. + * + * `DynamicLibrary` implements the explicit resource management protocol, so a + * library instance can be managed with the `using` declaration. Leaving the + * enclosing scope invokes `library.close()` automatically. + * + * ```js + * import { DynamicLibrary } from 'node:ffi'; + * + * { + * using lib = new DynamicLibrary('./mylib.so'); + * // Use `lib` here; `lib.close()` is called when the block exits. + * } + * ``` + * + * Calling `library.close()` (or disposing the library) more than once is a no-op. + * + * After a library has been closed: + * + * * Resolved function wrappers become invalid. + * * Further symbol and function resolution throws. + * * Registered callbacks are invalidated. + * + * Closing a library does not make previously exported callback pointers safe to + * reuse. Node.js does not track or revoke callback pointers that have already + * been handed to native code. + * + * If native code still holds a callback pointer after `library.close()` or after + * `library.unregisterCallback(pointer)`, invoking that pointer has undefined + * behavior, is not allowed, and is dangerous: it can crash the process, produce + * incorrect output, or corrupt memory. Native code must stop using callback + * addresses before the library is closed or before the callback is unregistered. + * + * Calling `library.close()` from one of the library's active callbacks is + * unsupported and dangerous. The callback must return before the library is + * closed. + */ + close(): void; + /** + * Calls `library.close()`. This allows `DynamicLibrary` instances to be used with + * the `using` declaration for automatic cleanup when the enclosing scope + * exits. It is a no-op on a library that has already been closed. + * @since v26.1.0 + */ + [Symbol.dispose](): void; + /** + * Resolves a symbol and returns a callable JavaScript wrapper. + * + * The returned function has a `.pointer` property containing the native function + * address as a `bigint`. + * + * If the same symbol has already been resolved, requesting it again with a + * different signature throws. + * + * ```js + * const { DynamicLibrary } = require('node:ffi'); + * + * const lib = new DynamicLibrary('./mylib.so'); + * const add = lib.getFunction('add_i32', { + * arguments: ['i32', 'i32'], + * return: 'i32', + * }); + * + * console.log(add(20, 22)); + * console.log(add.pointer); + * ``` + */ + getFunction(name: string, signature: T): WrappedFunctionFromSignature; + /** + * When `definitions` is provided, resolves each named symbol and returns an + * object containing callable wrappers. + * + * When `definitions` is omitted, returns wrappers for all functions that have + * already been resolved on the library. + */ + getFunctions(): { [symbol: string]: WrappedFunction }; + getFunctions(definitions: T): WrappedFunctionsFromDefinitions; + /** + * Resolves a symbol and returns its native address as a `bigint`. + */ + getSymbol(name: string): bigint; + /** + * Returns an object containing all previously resolved symbol addresses. + */ + getSymbols(): Record; + /** + * Creates a native callback pointer backed by a JavaScript function. + * + * When `signature` is omitted, the callback uses a default `void ()` signature. + * + * The return value is the callback pointer address as a `bigint`. It can be + * passed to native functions expecting a callback pointer. + * + * ```js + * const { DynamicLibrary } = require('node:ffi'); + * + * const lib = new DynamicLibrary('./mylib.so'); + * + * const callback = lib.registerCallback( + * { arguments: ['i32'], return: 'i32' }, + * (value) => value * 2, + * ); + * ``` + * + * Callbacks are subject to the following restrictions: + * + * * They must be invoked on the same system thread where they were created. + * * They must not throw exceptions. + * * They must not return promises. + * * They must return a value compatible with the declared return type. + * * They must not call `library.close()` on their owning library while running. + * * They must not unregister themselves while running. + * + * Closing the owning library or unregistering the currently executing callback + * from inside the callback is unsupported and dangerous. Doing so may crash the + * process, produce incorrect output, or corrupt memory. + */ + registerCallback(callback: () => void): bigint; + registerCallback( + signature: T, + callback: CallbackFunctionFromSignature, + ): bigint; + /** + * Releases a callback previously created with `library.registerCallback()`. + * + * Calling `library.unregisterCallback(pointer)` for a callback that is currently + * executing is unsupported and dangerous. The callback must return before it is + * unregistered. + * + * After `library.unregisterCallback(pointer)` returns, invoking that callback + * pointer from native code has undefined behavior, is not allowed, and is + * dangerous: it can crash the process, produce incorrect output, or corrupt + * memory. + */ + unregisterCallback(pointer: bigint): void; + /** + * Keeps the callback strongly referenced by JavaScript. + */ + refCallback(pointer: bigint): void; + /** + * Allows the callback to become weakly referenced by JavaScript. + * + * If the callback function is later garbage collected, subsequent native + * invocations become a no-op. Non-void return values are zero-initialized before + * returning to native code. + */ + unrefCallback(pointer: bigint): void; + } + function getInt8(pointer: bigint, offset?: number): number; + function getUint8(pointer: bigint, offset?: number): number; + function getInt16(pointer: bigint, offset?: number): number; + function getUint16(pointer: bigint, offset?: number): number; + function getInt32(pointer: bigint, offset?: number): number; + function getUint32(pointer: bigint, offset?: number): number; + function getInt64(pointer: bigint, offset?: number): bigint; + function getUint64(pointer: bigint, offset?: number): bigint; + function getFloat32(pointer: bigint, offset?: number): number; + function getFloat64(pointer: bigint, offset?: number): number; + function setInt8(pointer: bigint, offset: number, value: number): void; + function setUint8(pointer: bigint, offset: number, value: number): void; + function setInt16(pointer: bigint, offset: number, value: number): void; + function setUint16(pointer: bigint, offset: number, value: number): void; + function setInt32(pointer: bigint, offset: number, value: number): void; + function setUint32(pointer: bigint, offset: number, value: number): void; + function setInt64(pointer: bigint, offset: number, value: number | bigint): void; + function setUint64(pointer: bigint, offset: number, value: number | bigint): void; + function setFloat32(pointer: bigint, offset: number, value: number): void; + function setFloat64(pointer: bigint, offset: number, value: number): void; + /** + * Reads a NUL-terminated UTF-8 string from native memory. + * + * If `pointer` is `0n`, `null` is returned. + * + * This function does not validate that `pointer` refers to readable memory or + * that the pointed-to data is terminated with `\0`. Passing an invalid pointer, + * a pointer to freed memory, or a pointer to bytes without a terminating NUL can + * read unrelated memory, crash the process, or produce truncated or garbled + * output. + * @since v26.1.0 + */ + function toString(pointer: bigint): string | null; + /** + * Creates a `Buffer` from native memory. + * + * When `copy` is `true`, the returned `Buffer` owns its own copied memory. + * When `copy` is `false`, the returned `Buffer` references the original native + * memory directly. + * + * Using `copy: false` is a zero-copy escape hatch. The returned `Buffer` is a + * writable view onto foreign memory, so writes in JavaScript update the original + * native memory directly. The caller must guarantee that: + * + * * `pointer` remains valid for the entire lifetime of the returned `Buffer`. + * * `length` stays within the allocated native region. + * * no native code frees or repurposes that memory while JavaScript still uses + * the `Buffer`. + * * Memory protection is observed. For example, read-only memory pages must not + * be written to. + * + * If these guarantees are not met, reading or writing the `Buffer` can corrupt + * memory or crash the process. + * @since v26.1.0 + * @param copy When `false`, creates a zero-copy view. **Default:** `true`. + */ + function toBuffer(pointer: bigint, length: number, copy?: boolean): NonSharedBuffer; + /** + * Creates an `ArrayBuffer` from native memory. + * + * When `copy` is `true`, the returned `ArrayBuffer` contains copied bytes. + * When `copy` is `false`, the returned `ArrayBuffer` references the original + * native memory directly. + * + * The same lifetime and bounds requirements described for + * `ffi.toBuffer(pointer, length, copy)` apply + * here. With `copy: false`, the + * returned `ArrayBuffer` is a zero-copy view of foreign memory and is only safe + * while that memory remains allocated, unchanged in layout, and valid for the + * entire exposed range. + * @since v26.1.0 + * @param copy When `false`, creates a zero-copy view. **Default:** `true`. + */ + function toArrayBuffer(pointer: bigint, length: number, copy?: boolean): ArrayBuffer; + /** + * Copies a JavaScript string into native memory and appends a trailing NUL + * terminator. + * + * `length` must be large enough to hold the full encoded string plus the trailing + * NUL terminator. For UTF-16 and UCS-2 encodings, the trailing terminator uses + * two zero bytes. + * + * `pointer` must refer to writable native memory with at least `length` bytes of + * available storage. This function does not allocate memory on its own. + * + * `string` must be a JavaScript string. `encoding` must be a string. + * @since v26.1.0 + * @param encoding **Default:** `'utf8'`. + */ + function exportString(string: string, pointer: bigint, length: number, encoding?: BufferEncoding): void; + /** + * Copies bytes from a `Buffer` into native memory. + * + * `length` must be at least `buffer.length`. + * + * `pointer` must refer to writable native memory with at least `length` bytes of + * available storage. This function does not allocate memory on its own. + * + * `buffer` must be a Node.js `Buffer`. + * @since v26.1.0 + */ + function exportBuffer(buffer: Buffer, pointer: bigint, length: number): void; + /** + * Copies bytes from an `ArrayBuffer` into native memory. + * + * `length` must be at least `arrayBuffer.byteLength`. + * + * `pointer` must refer to writable native memory with at least `length` bytes of + * available storage. This function does not allocate memory on its own. + * @since v26.1.0 + */ + function exportArrayBuffer(arrayBuffer: ArrayBuffer, pointer: bigint, length: number): void; + /** + * Copies bytes from an `ArrayBufferView` into native memory. + * + * `length` must be at least `arrayBufferView.byteLength`. + * + * `pointer` must refer to writable native memory with at least `length` bytes of + * available storage. This function does not allocate memory on its own. + * @since v26.1.0 + */ + function exportArrayBufferView(arrayBufferView: NodeJS.ArrayBufferView, pointer: bigint, length: number): void; + /** + * Returns the raw memory address of JavaScript-managed byte storage. + * + * This is unsafe and dangerous. The returned pointer can become invalid if the + * underlying memory is detached, resized, transferred, or otherwise invalidated. + * Using stale pointers can cause memory corruption or process crashes. + * @since v26.1.0 + */ + function getRawPointer(source: ArrayBuffer | NodeJS.ArrayBufferView): bigint; + /** + * Returns the address of the current thread's `uv_loop_t` as a `bigint`. + * + * The returned address is for the current Node.js environment. In the main thread, + * this is the main thread event loop. In a worker thread, this is that worker's + * event loop. + * + * This is unsafe and dangerous. The returned pointer is only valid for the lifetime + * of the current environment. Using it after the environment exits, or from native + * code that assumes a different thread or lifetime, can crash the process or + * corrupt memory. + * @since v26.6.0 + */ + function getCurrentEventLoop(): bigint; + type ReturnType = { [K in keyof DataTypeMap]: K }[keyof DataTypeMap]; + type ArgumentType = Exclude; + interface DataTypeMap { + void: "void"; + char: "number"; + bool: "number"; + i8: "number"; + int8: "number"; + u8: "number"; + uint8: "number"; + i16: "number"; + int16: "number"; + u16: "number"; + uint16: "number"; + i32: "number"; + int32: "number"; + u32: "number"; + uint32: "number"; + i64: "bigint"; + int64: "bigint"; + u64: "bigint"; + uint64: "bigint"; + float: "number"; + f32: "number"; + double: "number"; + f64: "number"; + pointer: "pointer"; + ptr: "pointer"; + function: "pointer"; + buffer: "pointer"; + arraybuffer: "pointer"; + string: "pointer"; + str: "pointer"; + } + interface ArgumentTypeMap { + "number": number; + "bigint": bigint; + "pointer": bigint | string | ArrayBuffer | NodeJS.ArrayBufferView | null; + } + interface ReturnTypeMap { + // eslint-disable-next-line @typescript-eslint/no-invalid-void-type + "void": void; + "number": number; + "bigint": bigint; + "pointer": bigint; + } + enum types { + VOID = "void", + POINTER = "pointer", + BUFFER = "buffer", + ARRAY_BUFFER = "arraybuffer", + FUNCTION = "function", + BOOL = "bool", + CHAR = "char", + STRING = "string", + FLOAT = "float", + DOUBLE = "double", + INT_8 = "int8", + UINT_8 = "uint8", + INT_16 = "int16", + UINT_16 = "uint16", + INT_32 = "int32", + UINT_32 = "uint32", + INT_64 = "int64", + UINT_64 = "uint64", + FLOAT_32 = "float32", + FLOAT_64 = "float64", + } +} diff --git a/node_modules/@types/node/fs.d.ts b/node_modules/@types/node/fs.d.ts new file mode 100644 index 0000000..e2626e6 --- /dev/null +++ b/node_modules/@types/node/fs.d.ts @@ -0,0 +1,4803 @@ +declare module "node:fs" { + import { BufferView, NonSharedBuffer } from "node:buffer"; + import { Abortable, EventEmitter, InternalEventEmitter } from "node:events"; + import { FileHandle } from "node:fs/promises"; + import * as stream from "node:stream"; + import { URL } from "node:url"; + /** + * Valid types for path values in "fs". + */ + type PathLike = string | Buffer | URL; + type PathOrFileDescriptor = PathLike | number; + type TimeLike = string | number | Date; + type NoParamCallback = (err: NodeJS.ErrnoException | null) => void; + type BufferEncodingOption = + | "buffer" + | { + encoding: "buffer"; + }; + interface ObjectEncodingOptions { + encoding?: BufferEncoding | null | undefined; + } + type EncodingOption = ObjectEncodingOptions | BufferEncoding | undefined | null; + type OpenMode = number | string; + type Mode = number | string; + interface StatsBase { + isFile(): boolean; + isDirectory(): boolean; + isBlockDevice(): boolean; + isCharacterDevice(): boolean; + isSymbolicLink(): boolean; + isFIFO(): boolean; + isSocket(): boolean; + dev: T; + ino: T; + mode: T; + nlink: T; + uid: T; + gid: T; + rdev: T; + size: T; + blksize: T; + blocks: T; + atimeMs: T; + mtimeMs: T; + ctimeMs: T; + birthtimeMs: T; + atime: Date; + mtime: Date; + ctime: Date; + birthtime: Date; + // Deliberately not defining a type alias here... it'd be exported, and something in the ecosystem would inevitably start using it. + // TODO: replace with Temporal builtins once @types/node no longer supports TS <6.0. + atimeInstant: typeof globalThis extends { Temporal: { Instant: new(...args: any[]) => infer T } } ? T : unknown; + mtimeInstant: typeof globalThis extends { Temporal: { Instant: new(...args: any[]) => infer T } } ? T : unknown; + ctimeInstant: typeof globalThis extends { Temporal: { Instant: new(...args: any[]) => infer T } } ? T : unknown; + birthtimeInstant: typeof globalThis extends { Temporal: { Instant: new(...args: any[]) => infer T } } ? T + : unknown; + } + interface Stats extends StatsBase {} + /** + * A `fs.Stats` object provides information about a file. + * + * Objects returned from {@link stat}, {@link lstat}, {@link fstat}, and + * their synchronous counterparts are of this type. + * If `bigint` in the `options` passed to those methods is true, the numeric values + * will be `bigint` instead of `number`, and the object will contain additional + * nanosecond-precision properties suffixed with `Ns`. `Stat` objects are not to be created directly using the `new` keyword. + * + * ```console + * Stats { + * dev: 2114, + * ino: 48064969, + * mode: 33188, + * nlink: 1, + * uid: 85, + * gid: 100, + * rdev: 0, + * size: 527, + * blksize: 4096, + * blocks: 8, + * atimeMs: 1318289051000.1, + * mtimeMs: 1318289051000.1, + * ctimeMs: 1318289051000.1, + * birthtimeMs: 1318289051000.1, + * atime: Mon, 10 Oct 2011 23:24:11 GMT, + * mtime: Mon, 10 Oct 2011 23:24:11 GMT, + * ctime: Mon, 10 Oct 2011 23:24:11 GMT, + * birthtime: Mon, 10 Oct 2011 23:24:11 GMT } + * ``` + * + * `bigint` version: + * + * ```console + * BigIntStats { + * dev: 2114n, + * ino: 48064969n, + * mode: 33188n, + * nlink: 1n, + * uid: 85n, + * gid: 100n, + * rdev: 0n, + * size: 527n, + * blksize: 4096n, + * blocks: 8n, + * atimeMs: 1318289051000n, + * mtimeMs: 1318289051000n, + * ctimeMs: 1318289051000n, + * birthtimeMs: 1318289051000n, + * atimeNs: 1318289051000000000n, + * mtimeNs: 1318289051000000000n, + * ctimeNs: 1318289051000000000n, + * birthtimeNs: 1318289051000000000n, + * atime: Mon, 10 Oct 2011 23:24:11 GMT, + * mtime: Mon, 10 Oct 2011 23:24:11 GMT, + * ctime: Mon, 10 Oct 2011 23:24:11 GMT, + * birthtime: Mon, 10 Oct 2011 23:24:11 GMT } + * ``` + * @since v0.1.21 + */ + class Stats { + private constructor(); + } + interface StatsFsBase { + /** Type of file system. */ + type: T; + /** Optimal transfer block size. */ + bsize: T; + /** Total data blocks in file system. */ + blocks: T; + /** Free blocks in file system. */ + bfree: T; + /** Available blocks for unprivileged users */ + bavail: T; + /** Total file nodes in file system. */ + files: T; + /** Fundamental file system block size. */ + frsize: T; + /** Free file nodes in file system. */ + ffree: T; + } + interface StatsFs extends StatsFsBase {} + /** + * Provides information about a mounted file system. + * + * Objects returned from {@link statfs} and its synchronous counterpart are of + * this type. If `bigint` in the `options` passed to those methods is `true`, the + * numeric values will be `bigint` instead of `number`. + * + * ```console + * StatFs { + * type: 1397114950, + * bsize: 4096, + * blocks: 121938943, + * bfree: 61058895, + * bavail: 61058895, + * files: 999, + * ffree: 1000000 + * } + * ``` + * + * `bigint` version: + * + * ```console + * StatFs { + * type: 1397114950n, + * bsize: 4096n, + * blocks: 121938943n, + * bfree: 61058895n, + * bavail: 61058895n, + * files: 999n, + * ffree: 1000000n + * } + * ``` + * @since v19.6.0, v18.15.0 + */ + class StatsFs {} + interface BigIntStatsFs extends StatsFsBase {} + interface StatFsOptions { + bigint?: boolean | undefined; + } + /** + * A representation of a directory entry, which can be a file or a subdirectory + * within the directory, as returned by reading from an `fs.Dir`. The + * directory entry is a combination of the file name and file type pairs. + * + * Additionally, when {@link readdir} or {@link readdirSync} is called with + * the `withFileTypes` option set to `true`, the resulting array is filled with `fs.Dirent` objects, rather than strings or `Buffer` s. + * @since v10.10.0 + */ + class Dirent { + /** + * Returns `true` if the `fs.Dirent` object describes a regular file. + * @since v10.10.0 + */ + isFile(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a file system + * directory. + * @since v10.10.0 + */ + isDirectory(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a block device. + * @since v10.10.0 + */ + isBlockDevice(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a character device. + * @since v10.10.0 + */ + isCharacterDevice(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a symbolic link. + * @since v10.10.0 + */ + isSymbolicLink(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a first-in-first-out + * (FIFO) pipe. + * @since v10.10.0 + */ + isFIFO(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a socket. + * @since v10.10.0 + */ + isSocket(): boolean; + /** + * The file name that this `fs.Dirent` object refers to. The type of this + * value is determined by the `options.encoding` passed to {@link readdir} or {@link readdirSync}. + * @since v10.10.0 + */ + name: Name; + /** + * The path to the parent directory of the file this `fs.Dirent` object refers to. + * @since v20.12.0, v18.20.0 + */ + parentPath: string; + } + /** + * A class representing a directory stream. + * + * Created by {@link opendir}, {@link opendirSync}, or `fsPromises.opendir()`. + * + * ```js + * import { opendir } from 'node:fs/promises'; + * + * try { + * const dir = await opendir('./'); + * for await (const dirent of dir) + * console.log(dirent.name); + * } catch (err) { + * console.error(err); + * } + * ``` + * + * When using the async iterator, the `fs.Dir` object will be automatically + * closed after the iterator exits. + * @since v12.12.0 + */ + class Dir implements AsyncIterable { + /** + * The read-only path of this directory as was provided to {@link opendir},{@link opendirSync}, or `fsPromises.opendir()`. + * @since v12.12.0 + */ + readonly path: string; + /** + * Asynchronously iterates over the directory via `readdir(3)` until all entries have been read. + */ + [Symbol.asyncIterator](): NodeJS.AsyncIterator; + /** + * Asynchronously close the directory's underlying resource handle. + * Subsequent reads will result in errors. + * + * A promise is returned that will be fulfilled after the resource has been + * closed. + * @since v12.12.0 + */ + close(): Promise; + close(cb: NoParamCallback): void; + /** + * Synchronously close the directory's underlying resource handle. + * Subsequent reads will result in errors. + * @since v12.12.0 + */ + closeSync(): void; + /** + * Asynchronously read the next directory entry via [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) as an `fs.Dirent`. + * + * A promise is returned that will be fulfilled with an `fs.Dirent`, or `null` if there are no more directory entries to read. + * + * Directory entries returned by this function are in no particular order as + * provided by the operating system's underlying directory mechanisms. + * Entries added or removed while iterating over the directory might not be + * included in the iteration results. + * @since v12.12.0 + * @return containing {fs.Dirent|null} + */ + read(): Promise; + read(cb: (err: NodeJS.ErrnoException | null, dirEnt: Dirent | null) => void): void; + /** + * Synchronously read the next directory entry as an `fs.Dirent`. See the + * POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more detail. + * + * If there are no more directory entries to read, `null` will be returned. + * + * Directory entries returned by this function are in no particular order as + * provided by the operating system's underlying directory mechanisms. + * Entries added or removed while iterating over the directory might not be + * included in the iteration results. + * @since v12.12.0 + */ + readSync(): Dirent | null; + /** + * Calls `dir.close()` if the directory handle is open, and returns a promise that + * fulfills when disposal is complete. + * @since v24.1.0 + */ + [Symbol.asyncDispose](): Promise; + /** + * Calls `dir.closeSync()` if the directory handle is open, and returns + * `undefined`. + * @since v24.1.0 + */ + [Symbol.dispose](): void; + } + /** + * Class: fs.StatWatcher + * @since v14.3.0, v12.20.0 + * Extends `EventEmitter` + * A successful call to {@link watchFile} method will return a new fs.StatWatcher object. + */ + interface StatWatcher extends EventEmitter { + /** + * When called, requests that the Node.js event loop _not_ exit so long as the `fs.StatWatcher` is active. Calling `watcher.ref()` multiple times will have + * no effect. + * + * By default, all `fs.StatWatcher` objects are "ref'ed", making it normally + * unnecessary to call `watcher.ref()` unless `watcher.unref()` had been + * called previously. + * @since v14.3.0, v12.20.0 + */ + ref(): this; + /** + * When called, the active `fs.StatWatcher` object will not require the Node.js + * event loop to remain active. If there is no other activity keeping the + * event loop running, the process may exit before the `fs.StatWatcher` object's + * callback is invoked. Calling `watcher.unref()` multiple times will have + * no effect. + * @since v14.3.0, v12.20.0 + */ + unref(): this; + } + interface FSWatcherEventMap { + "change": [eventType: string, filename: string | NonSharedBuffer]; + "close": []; + "error": [error: Error]; + } + interface FSWatcher extends InternalEventEmitter { + /** + * Stop watching for changes on the given `fs.FSWatcher`. Once stopped, the `fs.FSWatcher` object is no longer usable. + * @since v0.5.8 + */ + close(): void; + /** + * When called, requests that the Node.js event loop _not_ exit so long as the `fs.FSWatcher` is active. Calling `watcher.ref()` multiple times will have + * no effect. + * + * By default, all `fs.FSWatcher` objects are "ref'ed", making it normally + * unnecessary to call `watcher.ref()` unless `watcher.unref()` had been + * called previously. + * @since v14.3.0, v12.20.0 + */ + ref(): this; + /** + * When called, the active `fs.FSWatcher` object will not require the Node.js + * event loop to remain active. If there is no other activity keeping the + * event loop running, the process may exit before the `fs.FSWatcher` object's + * callback is invoked. Calling `watcher.unref()` multiple times will have + * no effect. + * @since v14.3.0, v12.20.0 + */ + unref(): this; + } + interface ReadStreamEventMap extends stream.ReadableEventMap { + "close": []; + "data": [chunk: string | NonSharedBuffer]; + "open": [fd: number]; + "ready": []; + } + /** + * Instances of `fs.ReadStream` cannot be constructed directly. They are created and + * returned using the `fs.createReadStream()` function. + * @since v0.1.93 + */ + class ReadStream extends stream.Readable { + close(callback?: (err?: NodeJS.ErrnoException | null) => void): void; + /** + * The number of bytes that have been read so far. + * @since v6.4.0 + */ + bytesRead: number; + /** + * The path to the file the stream is reading from as specified in the first + * argument to `fs.createReadStream()`. If `path` is passed as a string, then`readStream.path` will be a string. If `path` is passed as a `Buffer`, then`readStream.path` will be a + * `Buffer`. If `fd` is specified, then`readStream.path` will be `undefined`. + * @since v0.1.93 + */ + path: string | Buffer; + /** + * This property is `true` if the underlying file has not been opened yet, + * i.e. before the `'ready'` event is emitted. + * @since v11.2.0, v10.16.0 + */ + pending: boolean; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: ReadStreamEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: ReadStreamEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: ReadStreamEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: ReadStreamEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off(eventName: E, listener: (...args: ReadStreamEventMap[E]) => void): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on(eventName: E, listener: (...args: ReadStreamEventMap[E]) => void): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: ReadStreamEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: ReadStreamEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: ReadStreamEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: ReadStreamEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: ReadStreamEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface Utf8StreamOptions { + /** + * Appends writes to dest file instead of truncating it. + * @default true + */ + append?: boolean | undefined; + /** + * Which type of data you can send to the write + * function, supported values are `'utf8'` or `'buffer'`. + * @default 'utf8' + */ + contentMode?: "utf8" | "buffer" | undefined; + /** + * A path to a file to be written to (mode controlled by the + * append option). + */ + dest?: string | undefined; + /** + * A file descriptor, something that is returned by `fs.open()` + * or `fs.openSync()`. + */ + fd?: number | undefined; + /** + * An object that has the same API as the `fs` module, useful + * for mocking, testing, or customizing the behavior of the stream. + */ + fs?: object | undefined; + /** + * Perform a `fs.fsyncSync()` every time a write is + * completed. + */ + fsync?: boolean | undefined; + /** + * The maximum length of the internal buffer. If a write + * operation would cause the buffer to exceed `maxLength`, the data written is + * dropped and a drop event is emitted with the dropped data + */ + maxLength?: number | undefined; + /** + * The maximum number of bytes that can be written; + * @default 16384 + */ + maxWrite?: number | undefined; + /** + * The minimum length of the internal buffer that is + * required to be full before flushing. + */ + minLength?: number | undefined; + /** + * Ensure directory for `dest` file exists when true. + * @default false + */ + mkdir?: boolean | undefined; + /** + * Specify the creating file mode (see `fs.open()`). + */ + mode?: number | string | undefined; + /** + * Calls flush every `periodicFlush` milliseconds. + */ + periodicFlush?: number | undefined; + /** + * A function that will be called when `write()`, + * `writeSync()`, or `flushSync()` encounters an `EAGAIN` or `EBUSY` error. + * If the return value is `true` the operation will be retried, otherwise it + * will bubble the error. The `err` is the error that caused this function to + * be called, `writeBufferLen` is the length of the buffer that was written, + * and `remainingBufferLen` is the length of the remaining buffer that the + * stream did not try to write. + */ + retryEAGAIN?: ((err: Error | null, writeBufferLen: number, remainingBufferLen: number) => boolean) | undefined; + /** + * Perform writes synchronously. + */ + sync?: boolean | undefined; + } + interface Utf8StreamEventMap { + "close": []; + "drain": []; + "drop": [data: string | Buffer]; + "error": [error: Error]; + "finish": []; + "ready": []; + "write": [n: number]; + } + /** + * An optimized UTF-8 stream writer that allows for flushing all the internal + * buffering on demand. It handles `EAGAIN` errors correctly, allowing for + * customization, for example, by dropping content if the disk is busy. + * @since v24.6.0 + * @experimental + */ + class Utf8Stream implements EventEmitter { + constructor(options: Utf8StreamOptions); + /** + * Whether the stream is appending to the file or truncating it. + */ + readonly append: boolean; + /** + * The type of data that can be written to the stream. Supported + * values are `'utf8'` or `'buffer'`. + * @default 'utf8' + */ + readonly contentMode: "utf8" | "buffer"; + /** + * Close the stream immediately, without flushing the internal buffer. + */ + destroy(): void; + /** + * Close the stream gracefully, flushing the internal buffer before closing. + */ + end(): void; + /** + * The file descriptor that is being written to. + */ + readonly fd: number; + /** + * The file that is being written to. + */ + readonly file: string; + /** + * Writes the current buffer to the file if a write was not in progress. Do + * nothing if `minLength` is zero or if it is already writing. + */ + flush(callback: (err: Error | null) => void): void; + /** + * Flushes the buffered data synchronously. This is a costly operation. + */ + flushSync(): void; + /** + * Whether the stream is performing a `fs.fsyncSync()` after every + * write operation. + */ + readonly fsync: boolean; + /** + * The maximum length of the internal buffer. If a write + * operation would cause the buffer to exceed `maxLength`, the data written is + * dropped and a drop event is emitted with the dropped data. + */ + readonly maxLength: number; + /** + * The minimum length of the internal buffer that is required to be + * full before flushing. + */ + readonly minLength: number; + /** + * Whether the stream should ensure that the directory for the + * `dest` file exists. If `true`, it will create the directory if it does not + * exist. + * @default false + */ + readonly mkdir: boolean; + /** + * The mode of the file that is being written to. + */ + readonly mode: number | string; + /** + * The number of milliseconds between flushes. If set to `0`, no + * periodic flushes will be performed. + */ + readonly periodicFlush: number; + /** + * Reopen the file in place, useful for log rotation. + * @param file A path to a file to be written to (mode + * controlled by the append option). + */ + reopen(file: PathLike): void; + /** + * Whether the stream is writing synchronously or asynchronously. + */ + readonly sync: boolean; + /** + * When the `options.contentMode` is set to `'utf8'` when the stream is created, + * the `data` argument must be a string. If the `contentMode` is set to `'buffer'`, + * the `data` argument must be a `Buffer`. + * @param data The data to write. + */ + write(data: string | Buffer): boolean; + /** + * Whether the stream is currently writing data to the file. + */ + readonly writing: boolean; + /** + * Calls `utf8Stream.destroy()`. + */ + [Symbol.dispose](): void; + } + interface Utf8Stream extends InternalEventEmitter {} + interface WriteStreamEventMap extends stream.WritableEventMap { + "close": []; + "open": [fd: number]; + "ready": []; + } + /** + * Instances of `fs.WriteStream` cannot be constructed directly. They are created and + * returned using the `fs.createWriteStream()` function. + * @since v0.1.93 + */ + class WriteStream extends stream.Writable { + /** + * Closes `writeStream`. Optionally accepts a + * callback that will be executed once the `writeStream`is closed. + * @since v0.9.4 + */ + close(callback?: (err?: NodeJS.ErrnoException | null) => void): void; + /** + * The number of bytes written so far. Does not include data that is still queued + * for writing. + * @since v0.4.7 + */ + bytesWritten: number; + /** + * The path to the file the stream is writing to as specified in the first + * argument to {@link createWriteStream}. If `path` is passed as a string, then`writeStream.path` will be a string. If `path` is passed as a `Buffer`, then`writeStream.path` will be a + * `Buffer`. + * @since v0.1.93 + */ + path: string | Buffer; + /** + * This property is `true` if the underlying file has not been opened yet, + * i.e. before the `'ready'` event is emitted. + * @since v11.2.0 + */ + pending: boolean; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: WriteStreamEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: WriteStreamEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: WriteStreamEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: WriteStreamEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + /** + * Asynchronously rename file at `oldPath` to the pathname provided + * as `newPath`. In the case that `newPath` already exists, it will + * be overwritten. If there is a directory at `newPath`, an error will + * be raised instead. No arguments other than a possible exception are + * given to the completion callback. + * + * See also: [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html). + * + * ```js + * import { rename } from 'node:fs'; + * + * rename('oldFile.txt', 'newFile.txt', (err) => { + * if (err) throw err; + * console.log('Rename complete!'); + * }); + * ``` + * @since v0.0.2 + */ + function rename(oldPath: PathLike, newPath: PathLike, callback: NoParamCallback): void; + namespace rename { + /** + * Asynchronous rename(2) - Change the name or location of a file or directory. + * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function __promisify__(oldPath: PathLike, newPath: PathLike): Promise; + } + /** + * Renames the file from `oldPath` to `newPath`. Returns `undefined`. + * + * See the POSIX [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html) documentation for more details. + * @since v0.1.21 + */ + function renameSync(oldPath: PathLike, newPath: PathLike): void; + /** + * Truncates the file. No arguments other than a possible exception are + * given to the completion callback. A file descriptor can also be passed as the + * first argument. In this case, `fs.ftruncate()` is called. + * + * ```js + * import { truncate } from 'node:fs'; + * // Assuming that 'path/file.txt' is a regular file. + * truncate('path/file.txt', (err) => { + * if (err) throw err; + * console.log('path/file.txt was truncated'); + * }); + * ``` + * + * Passing a file descriptor is deprecated and may result in an error being thrown + * in the future. + * + * See the POSIX [`truncate(2)`](http://man7.org/linux/man-pages/man2/truncate.2.html) documentation for more details. + * @since v0.8.6 + * @param [len=0] + */ + function truncate(path: PathLike, len: number | undefined, callback: NoParamCallback): void; + /** + * Asynchronous truncate(2) - Truncate a file to a specified length. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function truncate(path: PathLike, callback: NoParamCallback): void; + namespace truncate { + /** + * Asynchronous truncate(2) - Truncate a file to a specified length. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param len If not specified, defaults to `0`. + */ + function __promisify__(path: PathLike, len?: number): Promise; + } + /** + * Truncates the file. Returns `undefined`. A file descriptor can also be + * passed as the first argument. In this case, `fs.ftruncateSync()` is called. + * + * Passing a file descriptor is deprecated and may result in an error being thrown + * in the future. + * @since v0.8.6 + * @param [len=0] + */ + function truncateSync(path: PathLike, len?: number): void; + /** + * Truncates the file descriptor. No arguments other than a possible exception are + * given to the completion callback. + * + * See the POSIX [`ftruncate(2)`](http://man7.org/linux/man-pages/man2/ftruncate.2.html) documentation for more detail. + * + * If the file referred to by the file descriptor was larger than `len` bytes, only + * the first `len` bytes will be retained in the file. + * + * For example, the following program retains only the first four bytes of the + * file: + * + * ```js + * import { open, close, ftruncate } from 'node:fs'; + * + * function closeFd(fd) { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * + * open('temp.txt', 'r+', (err, fd) => { + * if (err) throw err; + * + * try { + * ftruncate(fd, 4, (err) => { + * closeFd(fd); + * if (err) throw err; + * }); + * } catch (err) { + * closeFd(fd); + * if (err) throw err; + * } + * }); + * ``` + * + * If the file previously was shorter than `len` bytes, it is extended, and the + * extended part is filled with null bytes (`'\0'`): + * + * If `len` is negative then `0` will be used. + * @since v0.8.6 + * @param [len=0] + */ + function ftruncate(fd: number, len: number | undefined, callback: NoParamCallback): void; + /** + * Asynchronous ftruncate(2) - Truncate a file to a specified length. + * @param fd A file descriptor. + */ + function ftruncate(fd: number, callback: NoParamCallback): void; + namespace ftruncate { + /** + * Asynchronous ftruncate(2) - Truncate a file to a specified length. + * @param fd A file descriptor. + * @param len If not specified, defaults to `0`. + */ + function __promisify__(fd: number, len?: number): Promise; + } + /** + * Truncates the file descriptor. Returns `undefined`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link ftruncate}. + * @since v0.8.6 + * @param [len=0] + */ + function ftruncateSync(fd: number, len?: number): void; + /** + * Asynchronously changes owner and group of a file. No arguments other than a + * possible exception are given to the completion callback. + * + * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail. + * @since v0.1.97 + */ + function chown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void; + namespace chown { + /** + * Asynchronous chown(2) - Change ownership of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike, uid: number, gid: number): Promise; + } + /** + * Synchronously changes owner and group of a file. Returns `undefined`. + * This is the synchronous version of {@link chown}. + * + * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail. + * @since v0.1.97 + */ + function chownSync(path: PathLike, uid: number, gid: number): void; + /** + * Sets the owner of the file. No arguments other than a possible exception are + * given to the completion callback. + * + * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail. + * @since v0.4.7 + */ + function fchown(fd: number, uid: number, gid: number, callback: NoParamCallback): void; + namespace fchown { + /** + * Asynchronous fchown(2) - Change ownership of a file. + * @param fd A file descriptor. + */ + function __promisify__(fd: number, uid: number, gid: number): Promise; + } + /** + * Sets the owner of the file. Returns `undefined`. + * + * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail. + * @since v0.4.7 + * @param uid The file's new owner's user id. + * @param gid The file's new group's group id. + */ + function fchownSync(fd: number, uid: number, gid: number): void; + /** + * Set the owner of the symbolic link. No arguments other than a possible + * exception are given to the completion callback. + * + * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more detail. + */ + function lchown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void; + namespace lchown { + /** + * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike, uid: number, gid: number): Promise; + } + /** + * Set the owner for the path. Returns `undefined`. + * + * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more details. + * @param uid The file's new owner's user id. + * @param gid The file's new group's group id. + */ + function lchownSync(path: PathLike, uid: number, gid: number): void; + /** + * Changes the access and modification times of a file in the same way as {@link utimes}, with the difference that if the path refers to a symbolic + * link, then the link is not dereferenced: instead, the timestamps of the + * symbolic link itself are changed. + * + * No arguments other than a possible exception are given to the completion + * callback. + * @since v14.5.0, v12.19.0 + */ + function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; + namespace lutimes { + /** + * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`, + * with the difference that if the path refers to a symbolic link, then the link is not + * dereferenced: instead, the timestamps of the symbolic link itself are changed. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; + } + /** + * Change the file system timestamps of the symbolic link referenced by `path`. + * Returns `undefined`, or throws an exception when parameters are incorrect or + * the operation fails. This is the synchronous version of {@link lutimes}. + * @since v14.5.0, v12.19.0 + */ + function lutimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void; + /** + * Asynchronously changes the permissions of a file. No arguments other than a + * possible exception are given to the completion callback. + * + * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail. + * + * ```js + * import { chmod } from 'node:fs'; + * + * chmod('my_file.txt', 0o775, (err) => { + * if (err) throw err; + * console.log('The permissions for file "my_file.txt" have been changed!'); + * }); + * ``` + * @since v0.1.30 + */ + function chmod(path: PathLike, mode: Mode, callback: NoParamCallback): void; + namespace chmod { + /** + * Asynchronous chmod(2) - Change permissions of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function __promisify__(path: PathLike, mode: Mode): Promise; + } + /** + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link chmod}. + * + * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail. + * @since v0.6.7 + */ + function chmodSync(path: PathLike, mode: Mode): void; + /** + * Sets the permissions on the file. No arguments other than a possible exception + * are given to the completion callback. + * + * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail. + * @since v0.4.7 + */ + function fchmod(fd: number, mode: Mode, callback: NoParamCallback): void; + namespace fchmod { + /** + * Asynchronous fchmod(2) - Change permissions of a file. + * @param fd A file descriptor. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function __promisify__(fd: number, mode: Mode): Promise; + } + /** + * Sets the permissions on the file. Returns `undefined`. + * + * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail. + * @since v0.4.7 + */ + function fchmodSync(fd: number, mode: Mode): void; + /** + * Changes the permissions on a symbolic link. No arguments other than a possible + * exception are given to the completion callback. + * + * This method is only implemented on macOS. + * + * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail. + * @deprecated Since v0.4.7 + */ + function lchmod(path: PathLike, mode: Mode, callback: NoParamCallback): void; + /** @deprecated */ + namespace lchmod { + /** + * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function __promisify__(path: PathLike, mode: Mode): Promise; + } + /** + * Changes the permissions on a symbolic link. Returns `undefined`. + * + * This method is only implemented on macOS. + * + * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail. + * @deprecated Since v0.4.7 + */ + function lchmodSync(path: PathLike, mode: Mode): void; + /** + * Asynchronous [`stat(2)`](http://man7.org/linux/man-pages/man2/stat.2.html). The callback gets two arguments `(err, stats)` where`stats` is an `fs.Stats` object. + * + * In case of an error, the `err.code` will be one of `Common System Errors`. + * + * {@link stat} follows symbolic links. Use {@link lstat} to look at the + * links themselves. + * + * Using `fs.stat()` to check for the existence of a file before calling`fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended. + * Instead, user code should open/read/write the file directly and handle the + * error raised if the file is not available. + * + * To check if a file exists without manipulating it afterwards, {@link access} is recommended. + * + * For example, given the following directory structure: + * + * ```text + * - txtDir + * -- file.txt + * - app.js + * ``` + * + * The next program will check for the stats of the given paths: + * + * ```js + * import { stat } from 'node:fs'; + * + * const pathsToCheck = ['./txtDir', './txtDir/file.txt']; + * + * for (let i = 0; i < pathsToCheck.length; i++) { + * stat(pathsToCheck[i], (err, stats) => { + * console.log(stats.isDirectory()); + * console.log(stats); + * }); + * } + * ``` + * + * The resulting output will resemble: + * + * ```console + * true + * Stats { + * dev: 16777220, + * mode: 16877, + * nlink: 3, + * uid: 501, + * gid: 20, + * rdev: 0, + * blksize: 4096, + * ino: 14214262, + * size: 96, + * blocks: 0, + * atimeMs: 1561174653071.963, + * mtimeMs: 1561174614583.3518, + * ctimeMs: 1561174626623.5366, + * birthtimeMs: 1561174126937.2893, + * atime: 2019-06-22T03:37:33.072Z, + * mtime: 2019-06-22T03:36:54.583Z, + * ctime: 2019-06-22T03:37:06.624Z, + * birthtime: 2019-06-22T03:28:46.937Z + * } + * false + * Stats { + * dev: 16777220, + * mode: 33188, + * nlink: 1, + * uid: 501, + * gid: 20, + * rdev: 0, + * blksize: 4096, + * ino: 14214074, + * size: 8, + * blocks: 8, + * atimeMs: 1561174616618.8555, + * mtimeMs: 1561174614584, + * ctimeMs: 1561174614583.8145, + * birthtimeMs: 1561174007710.7478, + * atime: 2019-06-22T03:36:56.619Z, + * mtime: 2019-06-22T03:36:54.584Z, + * ctime: 2019-06-22T03:36:54.584Z, + * birthtime: 2019-06-22T03:26:47.711Z + * } + * ``` + * @since v0.0.2 + */ + function stat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + function stat( + path: PathLike, + options: + | (StatOptions & { + bigint?: false | undefined; + throwIfNoEntry?: true | undefined; + }) + | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void, + ): void; + function stat( + path: PathLike, + options: StatOptions & { + bigint: true; + throwIfNoEntry?: true | undefined; + }, + callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void, + ): void; + function stat( + path: PathLike, + options: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry: false; + }, + callback: (err: NodeJS.ErrnoException | null, stats: Stats | undefined) => void, + ): void; + function stat( + path: PathLike, + options: StatOptions & { + bigint: true; + throwIfNoEntry: false; + }, + callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats | undefined) => void, + ): void; + function stat( + path: PathLike, + options: StatOptions & { + throwIfNoEntry?: true | undefined; + }, + callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void, + ): void; + function stat( + path: PathLike, + options: StatOptions | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats | undefined) => void, + ): void; + namespace stat { + // TODO: aliased promisify signatures + /** + * Asynchronous stat(2) - Get file status. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike): Promise; + function __promisify__( + path: PathLike, + options?: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry?: true | undefined; + }, + ): Promise; + function __promisify__( + path: PathLike, + options: StatOptions & { + bigint: true; + throwIfNoEntry?: true | undefined; + }, + ): Promise; + function __promisify__( + path: PathLike, + options: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry: false; + }, + ): Promise; + function __promisify__( + path: PathLike, + options: StatOptions & { + bigint: true; + throwIfNoEntry: false; + }, + ): Promise; + function __promisify__( + path: PathLike, + options: StatOptions & { + throwIfNoEntry?: true | undefined; + }, + ): Promise; + function __promisify__(path: PathLike, options?: StatOptions): Promise; + } + /** @deprecated This orphaned interface will be removed in a future version. */ + interface StatSyncFn extends Function { + (path: PathLike, options?: undefined): Stats; + ( + path: PathLike, + options?: StatSyncOptions & { + bigint?: false | undefined; + throwIfNoEntry: false; + }, + ): Stats | undefined; + ( + path: PathLike, + options: StatSyncOptions & { + bigint: true; + throwIfNoEntry: false; + }, + ): BigIntStats | undefined; + ( + path: PathLike, + options?: StatSyncOptions & { + bigint?: false | undefined; + }, + ): Stats; + ( + path: PathLike, + options: StatSyncOptions & { + bigint: true; + }, + ): BigIntStats; + ( + path: PathLike, + options: StatSyncOptions & { + bigint: boolean; + throwIfNoEntry?: false | undefined; + }, + ): Stats | BigIntStats; + (path: PathLike, options?: StatSyncOptions): Stats | BigIntStats | undefined; + } + /** + * Synchronous stat(2) - Get file status. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function statSync(path: PathLike): Stats; + function statSync( + path: PathLike, + options?: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry?: true | undefined; + }, + ): Stats; + function statSync( + path: PathLike, + options: StatOptions & { + bigint: true; + throwIfNoEntry?: true | undefined; + }, + ): BigIntStats; + function statSync( + path: PathLike, + options: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry: false; + }, + ): Stats | undefined; + function statSync( + path: PathLike, + options: StatOptions & { + bigint: true; + throwIfNoEntry: false; + }, + ): BigIntStats | undefined; + function statSync( + path: PathLike, + options: StatOptions & { + throwIfNoEntry?: true | undefined; + }, + ): Stats | BigIntStats; + function statSync(path: PathLike, options?: StatOptions): Stats | BigIntStats | undefined; + /** + * Invokes the callback with the `fs.Stats` for the file descriptor. + * + * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail. + * @since v0.1.95 + */ + function fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + function fstat( + fd: number, + options: + | (StatOptions & { + bigint?: false | undefined; + }) + | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void, + ): void; + function fstat( + fd: number, + options: StatOptions & { + bigint: true; + }, + callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void, + ): void; + function fstat( + fd: number, + options: StatOptions | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void, + ): void; + namespace fstat { + /** + * Asynchronous fstat(2) - Get file status. + * @param fd A file descriptor. + */ + function __promisify__( + fd: number, + options?: StatOptions & { + bigint?: false | undefined; + }, + ): Promise; + function __promisify__( + fd: number, + options: StatOptions & { + bigint: true; + }, + ): Promise; + function __promisify__(fd: number, options?: StatOptions): Promise; + } + /** + * Retrieves the `fs.Stats` for the file descriptor. + * + * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail. + * @since v0.1.95 + */ + function fstatSync( + fd: number, + options?: StatOptions & { + bigint?: false | undefined; + }, + ): Stats; + function fstatSync( + fd: number, + options: StatOptions & { + bigint: true; + }, + ): BigIntStats; + function fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats; + /** + * Retrieves the `fs.Stats` for the symbolic link referred to by the path. + * The callback gets two arguments `(err, stats)` where `stats` is a `fs.Stats` object. `lstat()` is identical to `stat()`, except that if `path` is a symbolic + * link, then the link itself is stat-ed, not the file that it refers to. + * + * See the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) documentation for more details. + * @since v0.1.30 + */ + function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + function lstat( + path: PathLike, + options: + | (StatOptions & { + bigint?: false | undefined; + }) + | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void, + ): void; + function lstat( + path: PathLike, + options: StatOptions & { + bigint: true; + }, + callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void, + ): void; + function lstat( + path: PathLike, + options: StatOptions | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void, + ): void; + namespace lstat { + /** + * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__( + path: PathLike, + options?: StatOptions & { + bigint?: false | undefined; + }, + ): Promise; + function __promisify__( + path: PathLike, + options: StatOptions & { + bigint: true; + }, + ): Promise; + function __promisify__(path: PathLike, options?: StatOptions): Promise; + } + /** + * Asynchronous [`statfs(2)`](http://man7.org/linux/man-pages/man2/statfs.2.html). Returns information about the mounted file system which + * contains `path`. The callback gets two arguments `(err, stats)` where `stats`is an `fs.StatFs` object. + * + * In case of an error, the `err.code` will be one of `Common System Errors`. + * @since v19.6.0, v18.15.0 + * @param path A path to an existing file or directory on the file system to be queried. + */ + function statfs(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void): void; + function statfs( + path: PathLike, + options: + | (StatFsOptions & { + bigint?: false | undefined; + }) + | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void, + ): void; + function statfs( + path: PathLike, + options: StatFsOptions & { + bigint: true; + }, + callback: (err: NodeJS.ErrnoException | null, stats: BigIntStatsFs) => void, + ): void; + function statfs( + path: PathLike, + options: StatFsOptions | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: StatsFs | BigIntStatsFs) => void, + ): void; + namespace statfs { + /** + * Asynchronous statfs(2) - Returns information about the mounted file system which contains path. The callback gets two arguments (err, stats) where stats is an object. + * @param path A path to an existing file or directory on the file system to be queried. + */ + function __promisify__( + path: PathLike, + options?: StatFsOptions & { + bigint?: false | undefined; + }, + ): Promise; + function __promisify__( + path: PathLike, + options: StatFsOptions & { + bigint: true; + }, + ): Promise; + function __promisify__(path: PathLike, options?: StatFsOptions): Promise; + } + /** + * Synchronous [`statfs(2)`](http://man7.org/linux/man-pages/man2/statfs.2.html). Returns information about the mounted file system which + * contains `path`. + * + * In case of an error, the `err.code` will be one of `Common System Errors`. + * @since v19.6.0, v18.15.0 + * @param path A path to an existing file or directory on the file system to be queried. + */ + function statfsSync( + path: PathLike, + options?: StatFsOptions & { + bigint?: false | undefined; + }, + ): StatsFs; + function statfsSync( + path: PathLike, + options: StatFsOptions & { + bigint: true; + }, + ): BigIntStatsFs; + function statfsSync(path: PathLike, options?: StatFsOptions): StatsFs | BigIntStatsFs; + /** + * Synchronous lstat(2) - Get file status. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function lstatSync(path: PathLike): Stats; + function lstatSync( + path: PathLike, + options?: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry?: true | undefined; + }, + ): Stats; + function lstatSync( + path: PathLike, + options: StatOptions & { + bigint: true; + throwIfNoEntry?: true | undefined; + }, + ): BigIntStats; + function lstatSync( + path: PathLike, + options: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry: false; + }, + ): Stats | undefined; + function lstatSync( + path: PathLike, + options: StatOptions & { + bigint: true; + throwIfNoEntry: false; + }, + ): BigIntStats | undefined; + function lstatSync( + path: PathLike, + options: StatOptions & { + throwIfNoEntry?: true | undefined; + }, + ): Stats | BigIntStats; + function lstatSync(path: PathLike, options?: StatOptions): Stats | BigIntStats | undefined; + /** + * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. No arguments other than + * a possible + * exception are given to the completion callback. + * @since v0.1.31 + */ + function link(existingPath: PathLike, newPath: PathLike, callback: NoParamCallback): void; + namespace link { + /** + * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file. + * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(existingPath: PathLike, newPath: PathLike): Promise; + } + /** + * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. Returns `undefined`. + * @since v0.1.31 + */ + function linkSync(existingPath: PathLike, newPath: PathLike): void; + /** + * Creates the link called `path` pointing to `target`. No arguments other than a + * possible exception are given to the completion callback. + * + * See the POSIX [`symlink(2)`](http://man7.org/linux/man-pages/man2/symlink.2.html) documentation for more details. + * + * The `type` argument is only available on Windows and ignored on other platforms. + * It can be set to `'dir'`, `'file'`, or `'junction'`. If the `type` argument is + * not a string, Node.js will autodetect `target` type and use `'file'` or `'dir'`. + * If the `target` does not exist, `'file'` will be used. Windows junction points + * require the destination path to be absolute. When using `'junction'`, the`target` argument will automatically be normalized to absolute path. Junction + * points on NTFS volumes can only point to directories. + * + * Relative targets are relative to the link's parent directory. + * + * ```js + * import { symlink } from 'node:fs'; + * + * symlink('./mew', './mewtwo', callback); + * ``` + * + * The above example creates a symbolic link `mewtwo` which points to `mew` in the + * same directory: + * + * ```bash + * $ tree . + * . + * ├── mew + * └── mewtwo -> ./mew + * ``` + * @since v0.1.31 + * @param [type='null'] + */ + function symlink( + target: PathLike, + path: PathLike, + type: symlink.Type | undefined | null, + callback: NoParamCallback, + ): void; + /** + * Asynchronous symlink(2) - Create a new symbolic link to an existing file. + * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. + * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. + */ + function symlink(target: PathLike, path: PathLike, callback: NoParamCallback): void; + namespace symlink { + /** + * Asynchronous symlink(2) - Create a new symbolic link to an existing file. + * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. + * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. + * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). + * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. + */ + function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise; + type Type = "dir" | "file" | "junction"; + } + /** + * Returns `undefined`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link symlink}. + * @since v0.1.31 + * @param [type='null'] + */ + function symlinkSync(target: PathLike, path: PathLike, type?: symlink.Type | null): void; + /** + * Reads the contents of the symbolic link referred to by `path`. The callback gets + * two arguments `(err, linkString)`. + * + * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the link path passed to the callback. If the `encoding` is set to `'buffer'`, + * the link path returned will be passed as a `Buffer` object. + * @since v0.1.31 + */ + function readlink( + path: PathLike, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, linkString: string) => void, + ): void; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink( + path: PathLike, + options: BufferEncodingOption, + callback: (err: NodeJS.ErrnoException | null, linkString: NonSharedBuffer) => void, + ): void; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink( + path: PathLike, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, linkString: string | NonSharedBuffer) => void, + ): void; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function readlink( + path: PathLike, + callback: (err: NodeJS.ErrnoException | null, linkString: string) => void, + ): void; + namespace readlink { + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: EncodingOption): Promise; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options: BufferEncodingOption): Promise; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: EncodingOption): Promise; + } + /** + * Returns the symbolic link's string value. + * + * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the link path returned. If the `encoding` is set to `'buffer'`, + * the link path returned will be passed as a `Buffer` object. + * @since v0.1.31 + */ + function readlinkSync(path: PathLike, options?: EncodingOption): string; + /** + * Synchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlinkSync(path: PathLike, options: BufferEncodingOption): NonSharedBuffer; + /** + * Synchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlinkSync(path: PathLike, options?: EncodingOption): string | NonSharedBuffer; + /** + * Asynchronously computes the canonical pathname by resolving `.`, `..`, and + * symbolic links. + * + * A canonical pathname is not necessarily unique. Hard links and bind mounts can + * expose a file system entity through many pathnames. + * + * This function behaves like [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html), with some exceptions: + * + * 1. No case conversion is performed on case-insensitive file systems. + * 2. The maximum number of symbolic links is platform-independent and generally + * (much) higher than what the native [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html) implementation supports. + * + * The `callback` gets two arguments `(err, resolvedPath)`. May use `process.cwd` to resolve relative paths. + * + * Only paths that can be converted to UTF8 strings are supported. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the path passed to the callback. If the `encoding` is set to `'buffer'`, + * the path returned will be passed as a `Buffer` object. + * + * If `path` resolves to a socket or a pipe, the function will return a system + * dependent name for that object. + * @since v0.1.31 + */ + function realpath( + path: PathLike, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, + ): void; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath( + path: PathLike, + options: BufferEncodingOption, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: NonSharedBuffer) => void, + ): void; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath( + path: PathLike, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | NonSharedBuffer) => void, + ): void; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function realpath( + path: PathLike, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, + ): void; + namespace realpath { + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: EncodingOption): Promise; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options: BufferEncodingOption): Promise; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: EncodingOption): Promise; + /** + * Asynchronous [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html). + * + * The `callback` gets two arguments `(err, resolvedPath)`. + * + * Only paths that can be converted to UTF8 strings are supported. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the path passed to the callback. If the `encoding` is set to `'buffer'`, + * the path returned will be passed as a `Buffer` object. + * + * On Linux, when Node.js is linked against musl libc, the procfs file system must + * be mounted on `/proc` in order for this function to work. Glibc does not have + * this restriction. + * @since v9.2.0 + */ + function native( + path: PathLike, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, + ): void; + function native( + path: PathLike, + options: BufferEncodingOption, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: NonSharedBuffer) => void, + ): void; + function native( + path: PathLike, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | NonSharedBuffer) => void, + ): void; + function native( + path: PathLike, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, + ): void; + } + /** + * Returns the resolved pathname. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link realpath}. + * @since v0.1.31 + */ + function realpathSync(path: PathLike, options?: EncodingOption): string; + /** + * Synchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpathSync(path: PathLike, options: BufferEncodingOption): NonSharedBuffer; + /** + * Synchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpathSync(path: PathLike, options?: EncodingOption): string | NonSharedBuffer; + namespace realpathSync { + function native(path: PathLike, options?: EncodingOption): string; + function native(path: PathLike, options: BufferEncodingOption): NonSharedBuffer; + function native(path: PathLike, options?: EncodingOption): string | NonSharedBuffer; + } + /** + * Asynchronously removes a file or symbolic link. No arguments other than a + * possible exception are given to the completion callback. + * + * ```js + * import { unlink } from 'node:fs'; + * // Assuming that 'path/file.txt' is a regular file. + * unlink('path/file.txt', (err) => { + * if (err) throw err; + * console.log('path/file.txt was deleted'); + * }); + * ``` + * + * `fs.unlink()` will not work on a directory, empty or otherwise. To remove a + * directory, use {@link rmdir}. + * + * See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more details. + * @since v0.0.2 + */ + function unlink(path: PathLike, callback: NoParamCallback): void; + namespace unlink { + /** + * Asynchronous unlink(2) - delete a name and possibly the file it refers to. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike): Promise; + } + /** + * Synchronous [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html). Returns `undefined`. + * @since v0.1.21 + */ + function unlinkSync(path: PathLike): void; + /** @deprecated `rmdir()` no longer provides any options. This interface will be removed in a future version. */ + // TODO: remove in future major + interface RmDirOptions {} + /** + * Asynchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). No arguments other than a possible exception are given + * to the completion callback. + * + * Using `fs.rmdir()` on a file (not a directory) results in an `ENOENT` error on + * Windows and an `ENOTDIR` error on POSIX. + * + * To get a behavior similar to the `rm -rf` Unix command, use {@link rm} with options `{ recursive: true, force: true }`. + * @since v0.0.2 + */ + function rmdir(path: PathLike, callback: NoParamCallback): void; + namespace rmdir { + /** + * Asynchronous rmdir(2) - delete a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike): Promise; + } + /** + * Synchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). Returns `undefined`. + * + * Using `fs.rmdirSync()` on a file (not a directory) results in an `ENOENT` error + * on Windows and an `ENOTDIR` error on POSIX. + * + * To get a behavior similar to the `rm -rf` Unix command, use {@link rmSync} with options `{ recursive: true, force: true }`. + * @since v0.1.21 + */ + function rmdirSync(path: PathLike): void; + interface RmOptions { + /** + * When `true`, exceptions will be ignored if `path` does not exist. + * @default false + */ + force?: boolean | undefined; + /** + * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or + * `EPERM` error is encountered, Node.js will retry the operation with a linear + * backoff wait of `retryDelay` ms longer on each try. This option represents the + * number of retries. This option is ignored if the `recursive` option is not + * `true`. + * @default 0 + */ + maxRetries?: number | undefined; + /** + * If `true`, perform a recursive directory removal. In + * recursive mode, operations are retried on failure. + * @default false + */ + recursive?: boolean | undefined; + /** + * The amount of time in milliseconds to wait between retries. + * This option is ignored if the `recursive` option is not `true`. + * @default 100 + */ + retryDelay?: number | undefined; + } + /** + * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility). No arguments other than a possible exception are given to the + * completion callback. + * @since v14.14.0 + */ + function rm(path: PathLike, callback: NoParamCallback): void; + function rm(path: PathLike, options: RmOptions, callback: NoParamCallback): void; + namespace rm { + /** + * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility). + */ + function __promisify__(path: PathLike, options?: RmOptions): Promise; + } + /** + * Synchronously removes files and directories (modeled on the standard POSIX `rm` utility). Returns `undefined`. + * @since v14.14.0 + */ + function rmSync(path: PathLike, options?: RmOptions): void; + interface MakeDirectoryOptions { + /** + * Indicates whether parent folders should be created. + * If a folder was created, the path to the first created folder will be returned. + * @default false + */ + recursive?: boolean | undefined; + /** + * A file mode. If a string is passed, it is parsed as an octal integer. If not specified + * @default 0o777 + */ + mode?: Mode | undefined; + } + /** + * Asynchronously creates a directory. + * + * The callback is given a possible exception and, if `recursive` is `true`, the + * first directory path created, `(err[, path])`.`path` can still be `undefined` when `recursive` is `true`, if no directory was + * created (for instance, if it was previously created). + * + * The optional `options` argument can be an integer specifying `mode` (permission + * and sticky bits), or an object with a `mode` property and a `recursive` property indicating whether parent directories should be created. Calling `fs.mkdir()` when `path` is a directory that + * exists results in an error only + * when `recursive` is false. If `recursive` is false and the directory exists, + * an `EEXIST` error occurs. + * + * ```js + * import { mkdir } from 'node:fs'; + * + * // Create ./tmp/a/apple, regardless of whether ./tmp and ./tmp/a exist. + * mkdir('./tmp/a/apple', { recursive: true }, (err) => { + * if (err) throw err; + * }); + * ``` + * + * On Windows, using `fs.mkdir()` on the root directory even with recursion will + * result in an error: + * + * ```js + * import { mkdir } from 'node:fs'; + * + * mkdir('/', { recursive: true }, (err) => { + * // => [Error: EPERM: operation not permitted, mkdir 'C:\'] + * }); + * ``` + * + * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details. + * @since v0.1.8 + */ + function mkdir( + path: PathLike, + options: MakeDirectoryOptions & { + recursive: true; + }, + callback: (err: NodeJS.ErrnoException | null, path?: string) => void, + ): void; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdir( + path: PathLike, + options: + | Mode + | (MakeDirectoryOptions & { + recursive?: false | undefined; + }) + | null + | undefined, + callback: NoParamCallback, + ): void; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdir( + path: PathLike, + options: Mode | MakeDirectoryOptions | null | undefined, + callback: (err: NodeJS.ErrnoException | null, path?: string) => void, + ): void; + /** + * Asynchronous mkdir(2) - create a directory with a mode of `0o777`. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function mkdir(path: PathLike, callback: NoParamCallback): void; + namespace mkdir { + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function __promisify__( + path: PathLike, + options: MakeDirectoryOptions & { + recursive: true; + }, + ): Promise; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function __promisify__( + path: PathLike, + options?: + | Mode + | (MakeDirectoryOptions & { + recursive?: false | undefined; + }) + | null, + ): Promise; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function __promisify__( + path: PathLike, + options?: Mode | MakeDirectoryOptions | null, + ): Promise; + } + /** + * Synchronously creates a directory. Returns `undefined`, or if `recursive` is `true`, the first directory path created. + * This is the synchronous version of {@link mkdir}. + * + * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details. + * @since v0.1.21 + */ + function mkdirSync( + path: PathLike, + options: MakeDirectoryOptions & { + recursive: true; + }, + ): string | undefined; + /** + * Synchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdirSync( + path: PathLike, + options?: + | Mode + | (MakeDirectoryOptions & { + recursive?: false | undefined; + }) + | null, + ): void; + /** + * Synchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdirSync(path: PathLike, options?: Mode | MakeDirectoryOptions | null): string | undefined; + /** + * Creates a unique temporary directory. + * + * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. Due to platform + * inconsistencies, avoid trailing `X` characters in `prefix`. Some platforms, + * notably the BSDs, can return more than six random characters, and replace + * trailing `X` characters in `prefix` with random characters. + * + * The created directory path is passed as a string to the callback's second + * parameter. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use. + * + * ```js + * import { mkdtemp } from 'node:fs'; + * import { join } from 'node:path'; + * import { tmpdir } from 'node:os'; + * + * mkdtemp(join(tmpdir(), 'foo-'), (err, directory) => { + * if (err) throw err; + * console.log(directory); + * // Prints: /tmp/foo-itXde2 or C:\Users\...\AppData\Local\Temp\foo-itXde2 + * }); + * ``` + * + * The `fs.mkdtemp()` method will append the six randomly selected characters + * directly to the `prefix` string. For instance, given a directory `/tmp`, if the + * intention is to create a temporary directory _within_`/tmp`, the `prefix`must end with a trailing platform-specific path separator + * (`import { sep } from 'node:path'`). + * + * ```js + * import { tmpdir } from 'node:os'; + * import { mkdtemp } from 'node:fs'; + * + * // The parent directory for the new temporary directory + * const tmpDir = tmpdir(); + * + * // This method is *INCORRECT*: + * mkdtemp(tmpDir, (err, directory) => { + * if (err) throw err; + * console.log(directory); + * // Will print something similar to `/tmpabc123`. + * // A new temporary directory is created at the file system root + * // rather than *within* the /tmp directory. + * }); + * + * // This method is *CORRECT*: + * import { sep } from 'node:path'; + * mkdtemp(`${tmpDir}${sep}`, (err, directory) => { + * if (err) throw err; + * console.log(directory); + * // Will print something similar to `/tmp/abc123`. + * // A new temporary directory is created within + * // the /tmp directory. + * }); + * ``` + * @since v5.10.0 + */ + function mkdtemp( + prefix: string, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, folder: string) => void, + ): void; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp( + prefix: string, + options: BufferEncodingOption, + callback: (err: NodeJS.ErrnoException | null, folder: NonSharedBuffer) => void, + ): void; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp( + prefix: string, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, folder: string | NonSharedBuffer) => void, + ): void; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + */ + function mkdtemp( + prefix: string, + callback: (err: NodeJS.ErrnoException | null, folder: string) => void, + ): void; + namespace mkdtemp { + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(prefix: string, options?: EncodingOption): Promise; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(prefix: string, options: BufferEncodingOption): Promise; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(prefix: string, options?: EncodingOption): Promise; + } + /** + * Returns the created directory path. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link mkdtemp}. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use. + * @since v5.10.0 + */ + function mkdtempSync(prefix: string, options?: EncodingOption): string; + /** + * Synchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtempSync(prefix: string, options: BufferEncodingOption): NonSharedBuffer; + /** + * Synchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtempSync(prefix: string, options?: EncodingOption): string | NonSharedBuffer; + interface DisposableTempDir extends Disposable { + /** + * The path of the created directory. + */ + path: string; + /** + * A function which removes the created directory. + */ + remove(): void; + /** + * The same as `remove`. + */ + [Symbol.dispose](): void; + } + /** + * Returns a disposable object whose `path` property holds the created directory + * path. When the object is disposed, the directory and its contents will be + * removed if it still exists. If the directory cannot be deleted, disposal will + * throw an error. The object has a `remove()` method which will perform the same + * task. + * + * + * + * For detailed information, see the documentation of `fs.mkdtemp()`. + * + * There is no callback-based version of this API because it is designed for use + * with the `using` syntax. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use. + * @since v24.4.0 + */ + function mkdtempDisposableSync(prefix: string, options?: EncodingOption): DisposableTempDir; + /** + * Reads the contents of a directory. The callback gets two arguments `(err, files)` where `files` is an array of the names of the files in the directory excluding `'.'` and `'..'`. + * + * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the filenames passed to the callback. If the `encoding` is set to `'buffer'`, + * the filenames returned will be passed as `Buffer` objects. + * + * If `options.withFileTypes` is set to `true`, the `files` array will contain `fs.Dirent` objects. + * @since v0.1.8 + */ + function readdir( + path: PathLike, + options: + | { + encoding: BufferEncoding | null; + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + } + | BufferEncoding + | undefined + | null, + callback: (err: NodeJS.ErrnoException | null, files: string[]) => void, + ): void; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir( + path: PathLike, + options: + | { + encoding: "buffer"; + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + } + | "buffer", + callback: (err: NodeJS.ErrnoException | null, files: NonSharedBuffer[]) => void, + ): void; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir( + path: PathLike, + options: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + }) + | BufferEncoding + | undefined + | null, + callback: (err: NodeJS.ErrnoException | null, files: string[] | NonSharedBuffer[]) => void, + ): void; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function readdir( + path: PathLike, + callback: (err: NodeJS.ErrnoException | null, files: string[]) => void, + ): void; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. + */ + function readdir( + path: PathLike, + options: ObjectEncodingOptions & { + withFileTypes: true; + recursive?: boolean | undefined; + }, + callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void, + ): void; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Must include `withFileTypes: true` and `encoding: 'buffer'`. + */ + function readdir( + path: PathLike, + options: { + encoding: "buffer"; + withFileTypes: true; + recursive?: boolean | undefined; + }, + callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void, + ): void; + namespace readdir { + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__( + path: PathLike, + options?: + | { + encoding: BufferEncoding | null; + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + } + | BufferEncoding + | null, + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__( + path: PathLike, + options: + | "buffer" + | { + encoding: "buffer"; + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + }, + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__( + path: PathLike, + options?: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + }) + | BufferEncoding + | null, + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent + */ + function __promisify__( + path: PathLike, + options: ObjectEncodingOptions & { + withFileTypes: true; + recursive?: boolean | undefined; + }, + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Must include `withFileTypes: true` and `encoding: 'buffer'`. + */ + function __promisify__( + path: PathLike, + options: { + encoding: "buffer"; + withFileTypes: true; + recursive?: boolean | undefined; + }, + ): Promise[]>; + } + /** + * Reads the contents of the directory. + * + * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the filenames returned. If the `encoding` is set to `'buffer'`, + * the filenames returned will be passed as `Buffer` objects. + * + * If `options.withFileTypes` is set to `true`, the result will contain `fs.Dirent` objects. + * @since v0.1.21 + */ + function readdirSync( + path: PathLike, + options?: + | { + encoding: BufferEncoding | null; + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + } + | BufferEncoding + | null, + ): string[]; + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdirSync( + path: PathLike, + options: + | { + encoding: "buffer"; + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + } + | "buffer", + ): NonSharedBuffer[]; + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdirSync( + path: PathLike, + options?: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + }) + | BufferEncoding + | null, + ): string[] | NonSharedBuffer[]; + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. + */ + function readdirSync( + path: PathLike, + options: ObjectEncodingOptions & { + withFileTypes: true; + recursive?: boolean | undefined; + }, + ): Dirent[]; + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Must include `withFileTypes: true` and `encoding: 'buffer'`. + */ + function readdirSync( + path: PathLike, + options: { + encoding: "buffer"; + withFileTypes: true; + recursive?: boolean | undefined; + }, + ): Dirent[]; + /** + * Closes the file descriptor. No arguments other than a possible exception are + * given to the completion callback. + * + * Calling `fs.close()` on any file descriptor (`fd`) that is currently in use + * through any other `fs` operation may lead to undefined behavior. + * + * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail. + * @since v0.0.2 + */ + function close(fd: number, callback?: NoParamCallback): void; + namespace close { + /** + * Asynchronous close(2) - close a file descriptor. + * @param fd A file descriptor. + */ + function __promisify__(fd: number): Promise; + } + /** + * Closes the file descriptor. Returns `undefined`. + * + * Calling `fs.closeSync()` on any file descriptor (`fd`) that is currently in use + * through any other `fs` operation may lead to undefined behavior. + * + * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail. + * @since v0.1.21 + */ + function closeSync(fd: number): void; + /** + * Asynchronous file open. See the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more details. + * + * `mode` sets the file mode (permission and sticky bits), but only if the file was + * created. On Windows, only the write permission can be manipulated; see {@link chmod}. + * + * The callback gets two arguments `(err, fd)`. + * + * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented + * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains + * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams). + * + * Functions based on `fs.open()` exhibit this behavior as well:`fs.writeFile()`, `fs.readFile()`, etc. + * @since v0.0.2 + * @param [flags='r'] See `support of file system `flags``. + * @param [mode=0o666] + */ + function open( + path: PathLike, + flags: OpenMode | undefined, + mode: Mode | undefined | null, + callback: (err: NodeJS.ErrnoException | null, fd: number) => void, + ): void; + /** + * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param [flags='r'] See `support of file system `flags``. + */ + function open( + path: PathLike, + flags: OpenMode | undefined, + callback: (err: NodeJS.ErrnoException | null, fd: number) => void, + ): void; + /** + * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function open(path: PathLike, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void; + namespace open { + /** + * Asynchronous open(2) - open and possibly create a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`. + */ + function __promisify__(path: PathLike, flags: OpenMode, mode?: Mode | null): Promise; + } + /** + * Returns an integer representing the file descriptor. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link open}. + * @since v0.1.21 + * @param [flags='r'] + * @param [mode=0o666] + */ + function openSync(path: PathLike, flags: OpenMode, mode?: Mode | null): number; + /** + * Change the file system timestamps of the object referenced by `path`. + * + * The `atime` and `mtime` arguments follow these rules: + * + * * Values can be either numbers representing Unix epoch time in seconds, `Date`s, or a numeric string like `'123456789.0'`. + * * If the value can not be converted to a number, or is `NaN`, `Infinity`, or `-Infinity`, an `Error` will be thrown. + * @since v0.4.2 + */ + function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; + namespace utimes { + /** + * Asynchronously change file timestamps of the file referenced by the supplied path. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; + } + /** + * Returns `undefined`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link utimes}. + * @since v0.4.2 + */ + function utimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void; + /** + * Change the file system timestamps of the object referenced by the supplied file + * descriptor. See {@link utimes}. + * @since v0.4.2 + */ + function futimes(fd: number, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; + namespace futimes { + /** + * Asynchronously change file timestamps of the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function __promisify__(fd: number, atime: TimeLike, mtime: TimeLike): Promise; + } + /** + * Synchronous version of {@link futimes}. Returns `undefined`. + * @since v0.4.2 + */ + function futimesSync(fd: number, atime: TimeLike, mtime: TimeLike): void; + /** + * Request that all data for the open file descriptor is flushed to the storage + * device. The specific implementation is operating system and device specific. + * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. No arguments other + * than a possible exception are given to the completion callback. + * @since v0.1.96 + */ + function fsync(fd: number, callback: NoParamCallback): void; + namespace fsync { + /** + * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. + * @param fd A file descriptor. + */ + function __promisify__(fd: number): Promise; + } + /** + * Request that all data for the open file descriptor is flushed to the storage + * device. The specific implementation is operating system and device specific. + * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. Returns `undefined`. + * @since v0.1.96 + */ + function fsyncSync(fd: number): void; + interface WriteOptions { + /** + * @default 0 + */ + offset?: number | undefined; + /** + * @default `buffer.byteLength - offset` + */ + length?: number | undefined; + /** + * @default null + */ + position?: number | null | undefined; + } + /** + * Write `buffer` to the file specified by `fd`. + * + * `offset` determines the part of the buffer to be written, and `length` is + * an integer specifying the number of bytes to write. + * + * `position` refers to the offset from the beginning of the file where this data + * should be written. If `typeof position !== 'number'`, the data will be written + * at the current position. See [`pwrite(2)`](http://man7.org/linux/man-pages/man2/pwrite.2.html). + * + * The callback will be given three arguments `(err, bytesWritten, buffer)` where `bytesWritten` specifies how many _bytes_ were written from `buffer`. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a promise for an `Object` with `bytesWritten` and `buffer` properties. + * + * It is unsafe to use `fs.write()` multiple times on the same file without waiting + * for the callback. For this scenario, {@link createWriteStream} is + * recommended. + * + * On Linux, positional writes don't work when the file is opened in append mode. + * The kernel ignores the position argument and always appends the data to + * the end of the file. + * @since v0.0.2 + * @param [offset=0] + * @param [length=buffer.byteLength - offset] + * @param [position='null'] + */ + function write( + fd: number, + buffer: TBuffer, + offset: number | undefined | null, + length: number | undefined | null, + position: number | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, + ): void; + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + */ + function write( + fd: number, + buffer: TBuffer, + offset: number | undefined | null, + length: number | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, + ): void; + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + */ + function write( + fd: number, + buffer: TBuffer, + offset: number | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, + ): void; + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + */ + function write( + fd: number, + buffer: TBuffer, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, + ): void; + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param options An object with the following properties: + * * `offset` The part of the buffer to be written. If not supplied, defaults to `0`. + * * `length` The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + * * `position` The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + function write( + fd: number, + buffer: TBuffer, + options: WriteOptions, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, + ): void; + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + function write( + fd: number, + string: string, + position: number | undefined | null, + encoding: BufferEncoding | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void, + ): void; + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + function write( + fd: number, + string: string, + position: number | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void, + ): void; + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. + */ + function write( + fd: number, + string: string, + callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void, + ): void; + namespace write { + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + function __promisify__( + fd: number, + buffer?: TBuffer, + offset?: number, + length?: number, + position?: number | null, + ): Promise<{ + bytesWritten: number; + buffer: TBuffer; + }>; + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param options An object with the following properties: + * * `offset` The part of the buffer to be written. If not supplied, defaults to `0`. + * * `length` The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + * * `position` The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + function __promisify__( + fd: number, + buffer?: TBuffer, + options?: WriteOptions, + ): Promise<{ + bytesWritten: number; + buffer: TBuffer; + }>; + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + function __promisify__( + fd: number, + string: string, + position?: number | null, + encoding?: BufferEncoding | null, + ): Promise<{ + bytesWritten: number; + buffer: string; + }>; + } + /** + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link write}. + * @since v0.1.21 + * @param [offset=0] + * @param [length=buffer.byteLength - offset] + * @param [position='null'] + * @return The number of bytes written. + */ + function writeSync( + fd: number, + buffer: NodeJS.ArrayBufferView, + offset?: number | null, + length?: number | null, + position?: number | null, + ): number; + /** + * Synchronously writes `string` to the file referenced by the supplied file descriptor, returning the number of bytes written. + * @param fd A file descriptor. + * @param string A string to write. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + function writeSync( + fd: number, + string: string, + position?: number | null, + encoding?: BufferEncoding | null, + ): number; + type ReadPosition = number | bigint; + interface ReadOptions { + /** + * @default 0 + */ + offset?: number | undefined; + /** + * @default `length of buffer` + */ + length?: number | undefined; + /** + * @default null + */ + position?: ReadPosition | null | undefined; + } + interface ReadOptionsWithBuffer extends ReadOptions { + buffer?: T | undefined; + } + /** + * Read data from the file specified by `fd`. + * + * The callback is given the three arguments, `(err, bytesRead, buffer)`. + * + * If the file is not modified concurrently, the end-of-file is reached when the + * number of bytes read is zero. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a promise for an `Object` with `bytesRead` and `buffer` properties. + * @since v0.0.2 + * @param buffer The buffer that the data will be written to. + * @param offset The position in `buffer` to write the data to. + * @param length The number of bytes to read. + * @param position Specifies where to begin reading from in the file. If `position` is `null` or `-1 `, data will be read from the current file position, and the file position will be updated. If + * `position` is an integer, the file position will be unchanged. + */ + function read( + fd: number, + buffer: TBuffer, + offset: number, + length: number, + position: ReadPosition | null, + callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, + ): void; + /** + * Similar to the above `fs.read` function, this version takes an optional `options` object. + * If not otherwise specified in an `options` object, + * `buffer` defaults to `Buffer.alloc(16384)`, + * `offset` defaults to `0`, + * `length` defaults to `buffer.byteLength`, `- offset` as of Node 17.6.0 + * `position` defaults to `null` + * @since v12.17.0, 13.11.0 + */ + function read( + fd: number, + options: ReadOptionsWithBuffer, + callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, + ): void; + function read( + fd: number, + buffer: TBuffer, + options: ReadOptions, + callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, + ): void; + function read( + fd: number, + buffer: TBuffer, + callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, + ): void; + function read( + fd: number, + callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: NonSharedBuffer) => void, + ): void; + namespace read { + /** + * @param fd A file descriptor. + * @param buffer The buffer that the data will be written to. + * @param offset The offset in the buffer at which to start writing. + * @param length The number of bytes to read. + * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. + */ + function __promisify__( + fd: number, + buffer: TBuffer, + offset: number, + length: number, + position: ReadPosition | null, + ): Promise<{ + bytesRead: number; + buffer: TBuffer; + }>; + function __promisify__( + fd: number, + options: ReadOptionsWithBuffer, + ): Promise<{ + bytesRead: number; + buffer: TBuffer; + }>; + function __promisify__(fd: number): Promise<{ + bytesRead: number; + buffer: NonSharedBuffer; + }>; + } + /** + * Returns the number of `bytesRead`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link read}. + * @since v0.1.21 + * @param [position='null'] + */ + function readSync( + fd: number, + buffer: NodeJS.ArrayBufferView, + offset: number, + length: number, + position: ReadPosition | null, + ): number; + /** + * Similar to the above `fs.readSync` function, this version takes an optional `options` object. + * If no `options` object is specified, it will default with the above values. + */ + function readSync(fd: number, buffer: NodeJS.ArrayBufferView, opts?: ReadOptions): number; + interface ReadFileOptions extends Abortable { + encoding?: BufferEncoding | null | undefined; + flag?: OpenMode | undefined; + } + interface ReadFileOptionsWithStringEncoding extends ReadFileOptions { + encoding: BufferEncoding; + } + interface ReadFileOptionsWithBufferEncoding extends ReadFileOptions { + encoding?: null | undefined; + } + interface ReadFileOptionsWithBuffer extends ReadFileOptionsWithBufferEncoding { + buffer: T | ((size: number) => T); + } + /** + * Asynchronously reads the entire contents of a file. + * + * ```js + * import { readFile } from 'node:fs'; + * + * readFile('/etc/passwd', (err, data) => { + * if (err) throw err; + * console.log(data); + * }); + * ``` + * + * The callback is passed two arguments `(err, data)`, where `data` is the + * contents of the file. + * + * If no encoding is specified, then the raw buffer is returned. + * + * If `buffer` is provided and no encoding is specified, the returned `Buffer` is + * a view over the supplied buffer containing only the bytes read. If the + * supplied buffer is too small to contain the entire file, the callback is + * called with an error. + * + * If `options` is a string, then it specifies the encoding: + * + * ```js + * import { readFile } from 'node:fs'; + * + * readFile('/etc/passwd', 'utf8', callback); + * ``` + * + * When the path is a directory, the behavior of `fs.readFile()` and + * `fs.readFileSync()` is platform-specific. On macOS, Linux, and Windows, an + * error will be returned. On FreeBSD, a representation of the directory's contents + * will be returned. + * + * ```js + * import { readFile } from 'node:fs'; + * + * // macOS, Linux, and Windows + * readFile('', (err, data) => { + * // => [Error: EISDIR: illegal operation on a directory, read ] + * }); + * + * // FreeBSD + * readFile('', (err, data) => { + * // => null, + * }); + * ``` + * + * It is possible to abort an ongoing request using an `AbortSignal`. If a + * request is aborted the callback is called with an `AbortError`: + * + * ```js + * import { readFile } from 'node:fs'; + * + * const controller = new AbortController(); + * const signal = controller.signal; + * readFile(fileInfo[0].name, { signal }, (err, buf) => { + * // ... + * }); + * // When you want to abort the request + * controller.abort(); + * ``` + * + * The `fs.readFile()` function buffers the entire file. To minimize memory costs, + * when possible prefer streaming via `fs.createReadStream()`. + * + * Aborting an ongoing request does not abort individual operating + * system requests but rather the internal buffering `fs.readFile` performs. + * + * An example using the `buffer` option with a pre-allocated buffer: + * + * ```js + * import { Buffer } from 'node:buffer'; + * import { readFile } from 'node:fs'; + * + * const buf = Buffer.alloc(16384); + * readFile('/path/to/file', { buffer: buf }, (err, data) => { + * if (err) throw err; + * console.log(data); // A view over `buf` containing only the bytes read + * }); + * ``` + * + * An example using the `buffer` option with a function returning a buffer: + * + * ```js + * import { Buffer } from 'node:buffer'; + * import { readFile } from 'node:fs'; + * + * readFile('/path/to/file', { + * buffer: (size) => Buffer.alloc(size), + * }, (err, data) => { + * if (err) throw err; + * console.log(data); + * }); + * ``` + * @since v0.1.29 + * @param path filename or file descriptor + */ + function readFile( + path: PathOrFileDescriptor, + options: ReadFileOptionsWithBuffer, + callback: (err: NodeJS.ErrnoException | null, data: BufferView) => void, + ): void; + function readFile( + path: PathOrFileDescriptor, + options: ReadFileOptionsWithBufferEncoding | null | undefined, + callback: (err: NodeJS.ErrnoException | null, data: NonSharedBuffer) => void, + ): void; + function readFile( + path: PathOrFileDescriptor, + options: ReadFileOptionsWithStringEncoding | BufferEncoding, + callback: (err: NodeJS.ErrnoException | null, data: string) => void, + ): void; + function readFile( + path: PathOrFileDescriptor, + options: ReadFileOptions | BufferEncoding | null | undefined, + callback: (err: NodeJS.ErrnoException | null, data: string | NonSharedBuffer) => void, + ): void; + function readFile( + path: PathOrFileDescriptor, + callback: (err: NodeJS.ErrnoException | null, data: NonSharedBuffer) => void, + ): void; + namespace readFile { + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function __promisify__( + path: PathOrFileDescriptor, + options?: { + encoding?: null | undefined; + flag?: string | undefined; + } | null, + ): Promise; + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function __promisify__( + path: PathOrFileDescriptor, + options: + | { + encoding: BufferEncoding; + flag?: string | undefined; + } + | BufferEncoding, + ): Promise; + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function __promisify__( + path: PathOrFileDescriptor, + options?: + | (ObjectEncodingOptions & { + flag?: string | undefined; + }) + | BufferEncoding + | null, + ): Promise; + } + interface ReadFileSyncOptions { + encoding?: BufferEncoding | null | undefined; + flag?: OpenMode | undefined; + } + interface ReadFileSyncOptionsWithStringEncoding extends ReadFileSyncOptions { + encoding: BufferEncoding; + } + interface ReadFileSyncOptionsWithBufferEncoding extends ReadFileSyncOptions { + encoding?: null | undefined; + } + interface ReadFileSyncOptionsWithBuffer + extends ReadFileSyncOptionsWithBufferEncoding + { + buffer: T | ((size: number) => T); + } + /** + * Returns the contents of the `path`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: `fs.readFile()`. + * + * If the `encoding` option is specified then this function returns a + * string. Otherwise it returns a buffer. + * + * If `buffer` is provided and no encoding is specified, the returned {Buffer} is + * a view over the supplied buffer containing only the bytes read. If the + * supplied buffer is too small to contain the entire file, an error will be + * thrown. + * + * Similar to `fs.readFile()`, when the path is a directory, the behavior of + * `fs.readFileSync()` is platform-specific. + * + * ```js + * import { readFileSync } from 'node:fs'; + * + * // macOS, Linux, and Windows + * readFileSync(''); + * // => [Error: EISDIR: illegal operation on a directory, read ] + * + * // FreeBSD + * readFileSync(''); // => + * ``` + * @since v0.1.8 + * @param path filename or file descriptor + */ + function readFileSync( + path: PathOrFileDescriptor, + options: ReadFileSyncOptionsWithBuffer, + ): BufferView; + function readFileSync( + path: PathOrFileDescriptor, + options?: ReadFileSyncOptionsWithBufferEncoding | null, + ): NonSharedBuffer; + function readFileSync( + path: PathOrFileDescriptor, + options: ReadFileSyncOptionsWithStringEncoding | BufferEncoding, + ): string; + function readFileSync(path: PathOrFileDescriptor, options: ReadFileSyncOptions): string | NonSharedBuffer; + type WriteFileOptions = + | ( + & ObjectEncodingOptions + & Abortable + & { + mode?: Mode | undefined; + flag?: string | undefined; + flush?: boolean | undefined; + } + ) + | BufferEncoding + | null; + /** + * When `file` is a filename, asynchronously writes data to the file, replacing the + * file if it already exists. `data` can be a string or a buffer. + * + * When `file` is a file descriptor, the behavior is similar to calling `fs.write()` directly (which is recommended). See the notes below on using + * a file descriptor. + * + * The `encoding` option is ignored if `data` is a buffer. + * + * The `mode` option only affects the newly created file. See {@link open} for more details. + * + * ```js + * import { writeFile } from 'node:fs'; + * import { Buffer } from 'node:buffer'; + * + * const data = new Uint8Array(Buffer.from('Hello Node.js')); + * writeFile('message.txt', data, (err) => { + * if (err) throw err; + * console.log('The file has been saved!'); + * }); + * ``` + * + * If `options` is a string, then it specifies the encoding: + * + * ```js + * import { writeFile } from 'node:fs'; + * + * writeFile('message.txt', 'Hello Node.js', 'utf8', callback); + * ``` + * + * It is unsafe to use `fs.writeFile()` multiple times on the same file without + * waiting for the callback. For this scenario, {@link createWriteStream} is + * recommended. + * + * Similarly to `fs.readFile` \- `fs.writeFile` is a convenience method that + * performs multiple `write` calls internally to write the buffer passed to it. + * For performance sensitive code consider using {@link createWriteStream}. + * + * It is possible to use an `AbortSignal` to cancel an `fs.writeFile()`. + * Cancelation is "best effort", and some amount of data is likely still + * to be written. + * + * ```js + * import { writeFile } from 'node:fs'; + * import { Buffer } from 'node:buffer'; + * + * const controller = new AbortController(); + * const { signal } = controller; + * const data = new Uint8Array(Buffer.from('Hello Node.js')); + * writeFile('message.txt', data, { signal }, (err) => { + * // When a request is aborted - the callback is called with an AbortError + * }); + * // When the request should be aborted + * controller.abort(); + * ``` + * + * Aborting an ongoing request does not abort individual operating + * system requests but rather the internal buffering `fs.writeFile` performs. + * @since v0.1.29 + * @param file filename or file descriptor + */ + function writeFile( + file: PathOrFileDescriptor, + data: string | NodeJS.ArrayBufferView, + options: WriteFileOptions, + callback: NoParamCallback, + ): void; + /** + * Asynchronously writes data to a file, replacing the file if it already exists. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + */ + function writeFile( + path: PathOrFileDescriptor, + data: string | NodeJS.ArrayBufferView, + callback: NoParamCallback, + ): void; + namespace writeFile { + /** + * Asynchronously writes data to a file, replacing the file if it already exists. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'w'` is used. + */ + function __promisify__( + path: PathOrFileDescriptor, + data: string | NodeJS.ArrayBufferView, + options?: WriteFileOptions, + ): Promise; + } + /** + * Returns `undefined`. + * + * The `mode` option only affects the newly created file. See {@link open} for more details. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link writeFile}. + * @since v0.1.29 + * @param file filename or file descriptor + */ + function writeFileSync( + file: PathOrFileDescriptor, + data: string | NodeJS.ArrayBufferView, + options?: WriteFileOptions, + ): void; + /** + * Asynchronously append data to a file, creating the file if it does not yet + * exist. `data` can be a string or a `Buffer`. + * + * The `mode` option only affects the newly created file. See {@link open} for more details. + * + * ```js + * import { appendFile } from 'node:fs'; + * + * appendFile('message.txt', 'data to append', (err) => { + * if (err) throw err; + * console.log('The "data to append" was appended to file!'); + * }); + * ``` + * + * If `options` is a string, then it specifies the encoding: + * + * ```js + * import { appendFile } from 'node:fs'; + * + * appendFile('message.txt', 'data to append', 'utf8', callback); + * ``` + * + * The `path` may be specified as a numeric file descriptor that has been opened + * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will + * not be closed automatically. + * + * ```js + * import { open, close, appendFile } from 'node:fs'; + * + * function closeFd(fd) { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * + * open('message.txt', 'a', (err, fd) => { + * if (err) throw err; + * + * try { + * appendFile(fd, 'data to append', 'utf8', (err) => { + * closeFd(fd); + * if (err) throw err; + * }); + * } catch (err) { + * closeFd(fd); + * throw err; + * } + * }); + * ``` + * @since v0.6.7 + * @param path filename or file descriptor + */ + function appendFile( + path: PathOrFileDescriptor, + data: string | Uint8Array, + options: WriteFileOptions, + callback: NoParamCallback, + ): void; + /** + * Asynchronously append data to a file, creating the file if it does not exist. + * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + */ + function appendFile(file: PathOrFileDescriptor, data: string | Uint8Array, callback: NoParamCallback): void; + namespace appendFile { + /** + * Asynchronously append data to a file, creating the file if it does not exist. + * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'a'` is used. + */ + function __promisify__( + file: PathOrFileDescriptor, + data: string | Uint8Array, + options?: WriteFileOptions, + ): Promise; + } + /** + * Synchronously append data to a file, creating the file if it does not yet + * exist. `data` can be a string or a `Buffer`. + * + * The `mode` option only affects the newly created file. See {@link open} for more details. + * + * ```js + * import { appendFileSync } from 'node:fs'; + * + * try { + * appendFileSync('message.txt', 'data to append'); + * console.log('The "data to append" was appended to file!'); + * } catch (err) { + * // Handle the error + * } + * ``` + * + * If `options` is a string, then it specifies the encoding: + * + * ```js + * import { appendFileSync } from 'node:fs'; + * + * appendFileSync('message.txt', 'data to append', 'utf8'); + * ``` + * + * The `path` may be specified as a numeric file descriptor that has been opened + * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will + * not be closed automatically. + * + * ```js + * import { openSync, closeSync, appendFileSync } from 'node:fs'; + * + * let fd; + * + * try { + * fd = openSync('message.txt', 'a'); + * appendFileSync(fd, 'data to append', 'utf8'); + * } catch (err) { + * // Handle the error + * } finally { + * if (fd !== undefined) + * closeSync(fd); + * } + * ``` + * @since v0.6.7 + * @param path filename or file descriptor + */ + function appendFileSync( + path: PathOrFileDescriptor, + data: string | Uint8Array, + options?: WriteFileOptions, + ): void; + /** + * Watch for changes on `filename`. The callback `listener` will be called each + * time the file is accessed. + * + * The `options` argument may be omitted. If provided, it should be an object. The `options` object may contain a boolean named `persistent` that indicates + * whether the process should continue to run as long as files are being watched. + * The `options` object may specify an `interval` property indicating how often the + * target should be polled in milliseconds. + * + * The `listener` gets two arguments the current stat object and the previous + * stat object: + * + * ```js + * import { watchFile } from 'node:fs'; + * + * watchFile('message.text', (curr, prev) => { + * console.log(`the current mtime is: ${curr.mtime}`); + * console.log(`the previous mtime was: ${prev.mtime}`); + * }); + * ``` + * + * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`, + * the numeric values in these objects are specified as `BigInt`s. + * + * To be notified when the file was modified, not just accessed, it is necessary + * to compare `curr.mtimeMs` and `prev.mtimeMs`. + * + * When an `fs.watchFile` operation results in an `ENOENT` error, it + * will invoke the listener once, with all the fields zeroed (or, for dates, the + * Unix Epoch). If the file is created later on, the listener will be called + * again, with the latest stat objects. This is a change in functionality since + * v0.10. + * + * Using {@link watch} is more efficient than `fs.watchFile` and `fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and `fs.unwatchFile` when possible. + * + * When a file being watched by `fs.watchFile()` disappears and reappears, + * then the contents of `previous` in the second callback event (the file's + * reappearance) will be the same as the contents of `previous` in the first + * callback event (its disappearance). + * + * This happens when: + * + * * the file is deleted, followed by a restore + * * the file is renamed and then renamed a second time back to its original name + * @since v0.1.31 + */ + interface WatchFileOptions { + bigint?: boolean | undefined; + persistent?: boolean | undefined; + interval?: number | undefined; + } + /** + * Watch for changes on `filename`. The callback `listener` will be called each + * time the file is accessed. + * + * The `options` argument may be omitted. If provided, it should be an object. The `options` object may contain a boolean named `persistent` that indicates + * whether the process should continue to run as long as files are being watched. + * The `options` object may specify an `interval` property indicating how often the + * target should be polled in milliseconds. + * + * The `listener` gets two arguments the current stat object and the previous + * stat object: + * + * ```js + * import { watchFile } from 'node:fs'; + * + * watchFile('message.text', (curr, prev) => { + * console.log(`the current mtime is: ${curr.mtime}`); + * console.log(`the previous mtime was: ${prev.mtime}`); + * }); + * ``` + * + * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`, + * the numeric values in these objects are specified as `BigInt`s. + * + * To be notified when the file was modified, not just accessed, it is necessary + * to compare `curr.mtimeMs` and `prev.mtimeMs`. + * + * When an `fs.watchFile` operation results in an `ENOENT` error, it + * will invoke the listener once, with all the fields zeroed (or, for dates, the + * Unix Epoch). If the file is created later on, the listener will be called + * again, with the latest stat objects. This is a change in functionality since + * v0.10. + * + * Using {@link watch} is more efficient than `fs.watchFile` and `fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and `fs.unwatchFile` when possible. + * + * When a file being watched by `fs.watchFile()` disappears and reappears, + * then the contents of `previous` in the second callback event (the file's + * reappearance) will be the same as the contents of `previous` in the first + * callback event (its disappearance). + * + * This happens when: + * + * * the file is deleted, followed by a restore + * * the file is renamed and then renamed a second time back to its original name + * @since v0.1.31 + */ + function watchFile( + filename: PathLike, + options: + | (WatchFileOptions & { + bigint?: false | undefined; + }) + | undefined, + listener: StatsListener, + ): StatWatcher; + function watchFile( + filename: PathLike, + options: + | (WatchFileOptions & { + bigint: true; + }) + | undefined, + listener: BigIntStatsListener, + ): StatWatcher; + /** + * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + */ + function watchFile(filename: PathLike, listener: StatsListener): StatWatcher; + /** + * Stop watching for changes on `filename`. If `listener` is specified, only that + * particular listener is removed. Otherwise, _all_ listeners are removed, + * effectively stopping watching of `filename`. + * + * Calling `fs.unwatchFile()` with a filename that is not being watched is a + * no-op, not an error. + * + * Using {@link watch} is more efficient than `fs.watchFile()` and `fs.unwatchFile()`. `fs.watch()` should be used instead of `fs.watchFile()` and `fs.unwatchFile()` when possible. + * @since v0.1.31 + * @param listener Optional, a listener previously attached using `fs.watchFile()` + */ + function unwatchFile(filename: PathLike, listener?: StatsListener): void; + function unwatchFile(filename: PathLike, listener?: BigIntStatsListener): void; + type WatchIgnorePredicate = string | RegExp | ((filename: string) => boolean); + interface WatchOptions extends Abortable { + encoding?: BufferEncoding | "buffer" | undefined; + persistent?: boolean | undefined; + recursive?: boolean | undefined; + ignore?: WatchIgnorePredicate | readonly WatchIgnorePredicate[] | undefined; + } + interface WatchOptionsWithBufferEncoding extends WatchOptions { + encoding: "buffer"; + } + interface WatchOptionsWithStringEncoding extends WatchOptions { + encoding?: BufferEncoding | undefined; + } + type WatchEventType = "rename" | "change"; + type WatchListener = (event: WatchEventType, filename: T | null) => void; + type StatsListener = (curr: Stats, prev: Stats) => void; + type BigIntStatsListener = (curr: BigIntStats, prev: BigIntStats) => void; + /** + * Watch for changes on `filename`, where `filename` is either a file or a + * directory. + * + * The second argument is optional. If `options` is provided as a string, it + * specifies the `encoding`. Otherwise `options` should be passed as an object. + * + * The listener callback gets two arguments `(eventType, filename)`. `eventType`is either `'rename'` or `'change'`, and `filename` is the name of the file + * which triggered the event. + * + * On most platforms, `'rename'` is emitted whenever a filename appears or + * disappears in the directory. + * + * The listener callback is attached to the `'change'` event fired by `fs.FSWatcher`, but it is not the same thing as the `'change'` value of `eventType`. + * + * If a `signal` is passed, aborting the corresponding AbortController will close + * the returned `fs.FSWatcher`. + * @since v0.5.10 + * @param listener + */ + function watch( + filename: PathLike, + options?: WatchOptionsWithStringEncoding | BufferEncoding | null, + listener?: WatchListener, + ): FSWatcher; + function watch( + filename: PathLike, + options: WatchOptionsWithBufferEncoding | "buffer", + listener: WatchListener, + ): FSWatcher; + function watch( + filename: PathLike, + options: WatchOptions | BufferEncoding | "buffer" | null, + listener: WatchListener, + ): FSWatcher; + function watch(filename: PathLike, listener: WatchListener): FSWatcher; + /** + * Test whether or not the given path exists by checking with the file system. + * Then call the `callback` argument with either true or false: + * + * ```js + * import { exists } from 'node:fs'; + * + * exists('/etc/passwd', (e) => { + * console.log(e ? 'it exists' : 'no passwd!'); + * }); + * ``` + * + * **The parameters for this callback are not consistent with other Node.js** + * **callbacks.** Normally, the first parameter to a Node.js callback is an `err` parameter, optionally followed by other parameters. The `fs.exists()` callback + * has only one boolean parameter. This is one reason `fs.access()` is recommended + * instead of `fs.exists()`. + * + * Using `fs.exists()` to check for the existence of a file before calling `fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended. Doing + * so introduces a race condition, since other processes may change the file's + * state between the two calls. Instead, user code should open/read/write the + * file directly and handle the error raised if the file does not exist. + * + * **write (NOT RECOMMENDED)** + * + * ```js + * import { exists, open, close } from 'node:fs'; + * + * exists('myfile', (e) => { + * if (e) { + * console.error('myfile already exists'); + * } else { + * open('myfile', 'wx', (err, fd) => { + * if (err) throw err; + * + * try { + * writeMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * } + * }); + * ``` + * + * **write (RECOMMENDED)** + * + * ```js + * import { open, close } from 'node:fs'; + * open('myfile', 'wx', (err, fd) => { + * if (err) { + * if (err.code === 'EEXIST') { + * console.error('myfile already exists'); + * return; + * } + * + * throw err; + * } + * + * try { + * writeMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * ``` + * + * **read (NOT RECOMMENDED)** + * + * ```js + * import { open, close, exists } from 'node:fs'; + * + * exists('myfile', (e) => { + * if (e) { + * open('myfile', 'r', (err, fd) => { + * if (err) throw err; + * + * try { + * readMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * } else { + * console.error('myfile does not exist'); + * } + * }); + * ``` + * + * **read (RECOMMENDED)** + * + * ```js + * import { open, close } from 'node:fs'; + * + * open('myfile', 'r', (err, fd) => { + * if (err) { + * if (err.code === 'ENOENT') { + * console.error('myfile does not exist'); + * return; + * } + * + * throw err; + * } + * + * try { + * readMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * ``` + * + * The "not recommended" examples above check for existence and then use the + * file; the "recommended" examples are better because they use the file directly + * and handle the error, if any. + * + * In general, check for the existence of a file only if the file won't be + * used directly, for example when its existence is a signal from another + * process. + * @since v0.0.2 + * @deprecated Since v1.0.0 - Use {@link stat} or {@link access} instead. + */ + function exists(path: PathLike, callback: (exists: boolean) => void): void; + /** @deprecated */ + namespace exists { + /** + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function __promisify__(path: PathLike): Promise; + } + /** + * Returns `true` if the path exists, `false` otherwise. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link exists}. + * + * `fs.exists()` is deprecated, but `fs.existsSync()` is not. The `callback` parameter to `fs.exists()` accepts parameters that are inconsistent with other + * Node.js callbacks. `fs.existsSync()` does not use a callback. + * + * ```js + * import { existsSync } from 'node:fs'; + * + * if (existsSync('/etc/passwd')) + * console.log('The path exists.'); + * ``` + * @since v0.1.21 + */ + function existsSync(path: PathLike): boolean; + namespace constants { + // File Access Constants + /** Constant for fs.access(). File is visible to the calling process. */ + const F_OK: number; + /** Constant for fs.access(). File can be read by the calling process. */ + const R_OK: number; + /** Constant for fs.access(). File can be written by the calling process. */ + const W_OK: number; + /** Constant for fs.access(). File can be executed by the calling process. */ + const X_OK: number; + // File Copy Constants + /** Constant for fs.copyFile. Flag indicating the destination file should not be overwritten if it already exists. */ + const COPYFILE_EXCL: number; + /** + * Constant for fs.copyFile. copy operation will attempt to create a copy-on-write reflink. + * If the underlying platform does not support copy-on-write, then a fallback copy mechanism is used. + */ + const COPYFILE_FICLONE: number; + /** + * Constant for fs.copyFile. Copy operation will attempt to create a copy-on-write reflink. + * If the underlying platform does not support copy-on-write, then the operation will fail with an error. + */ + const COPYFILE_FICLONE_FORCE: number; + // File Open Constants + /** Constant for fs.open(). Flag indicating to open a file for read-only access. */ + const O_RDONLY: number; + /** Constant for fs.open(). Flag indicating to open a file for write-only access. */ + const O_WRONLY: number; + /** Constant for fs.open(). Flag indicating to open a file for read-write access. */ + const O_RDWR: number; + /** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */ + const O_CREAT: number; + /** Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists. */ + const O_EXCL: number; + /** + * Constant for fs.open(). Flag indicating that if path identifies a terminal device, + * opening the path shall not cause that terminal to become the controlling terminal for the process + * (if the process does not already have one). + */ + const O_NOCTTY: number; + /** Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero. */ + const O_TRUNC: number; + /** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */ + const O_APPEND: number; + /** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */ + const O_DIRECTORY: number; + /** + * constant for fs.open(). + * Flag indicating reading accesses to the file system will no longer result in + * an update to the atime information associated with the file. + * This flag is available on Linux operating systems only. + */ + const O_NOATIME: number; + /** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */ + const O_NOFOLLOW: number; + /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */ + const O_SYNC: number; + /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O with write operations waiting for data integrity. */ + const O_DSYNC: number; + /** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */ + const O_SYMLINK: number; + /** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */ + const O_DIRECT: number; + /** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */ + const O_NONBLOCK: number; + // File Type Constants + /** Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code. */ + const S_IFMT: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */ + const S_IFREG: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */ + const S_IFDIR: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file. */ + const S_IFCHR: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file. */ + const S_IFBLK: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */ + const S_IFIFO: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */ + const S_IFLNK: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */ + const S_IFSOCK: number; + // File Mode Constants + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner. */ + const S_IRWXU: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */ + const S_IRUSR: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */ + const S_IWUSR: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */ + const S_IXUSR: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group. */ + const S_IRWXG: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */ + const S_IRGRP: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */ + const S_IWGRP: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */ + const S_IXGRP: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others. */ + const S_IRWXO: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */ + const S_IROTH: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */ + const S_IWOTH: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */ + const S_IXOTH: number; + /** + * When set, a memory file mapping is used to access the file. This flag + * is available on Windows operating systems only. On other operating systems, + * this flag is ignored. + */ + const UV_FS_O_FILEMAP: number; + } + /** + * Tests a user's permissions for the file or directory specified by `path`. + * The `mode` argument is an optional integer that specifies the accessibility + * checks to be performed. `mode` should be either the value `fs.constants.F_OK` or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`, `fs.constants.W_OK`, and `fs.constants.X_OK` + * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for + * possible values of `mode`. + * + * The final argument, `callback`, is a callback function that is invoked with + * a possible error argument. If any of the accessibility checks fail, the error + * argument will be an `Error` object. The following examples check if `package.json` exists, and if it is readable or writable. + * + * ```js + * import { access, constants } from 'node:fs'; + * + * const file = 'package.json'; + * + * // Check if the file exists in the current directory. + * access(file, constants.F_OK, (err) => { + * console.log(`${file} ${err ? 'does not exist' : 'exists'}`); + * }); + * + * // Check if the file is readable. + * access(file, constants.R_OK, (err) => { + * console.log(`${file} ${err ? 'is not readable' : 'is readable'}`); + * }); + * + * // Check if the file is writable. + * access(file, constants.W_OK, (err) => { + * console.log(`${file} ${err ? 'is not writable' : 'is writable'}`); + * }); + * + * // Check if the file is readable and writable. + * access(file, constants.R_OK | constants.W_OK, (err) => { + * console.log(`${file} ${err ? 'is not' : 'is'} readable and writable`); + * }); + * ``` + * + * Do not use `fs.access()` to check for the accessibility of a file before calling `fs.open()`, `fs.readFile()`, or `fs.writeFile()`. Doing + * so introduces a race condition, since other processes may change the file's + * state between the two calls. Instead, user code should open/read/write the + * file directly and handle the error raised if the file is not accessible. + * + * **write (NOT RECOMMENDED)** + * + * ```js + * import { access, open, close } from 'node:fs'; + * + * access('myfile', (err) => { + * if (!err) { + * console.error('myfile already exists'); + * return; + * } + * + * open('myfile', 'wx', (err, fd) => { + * if (err) throw err; + * + * try { + * writeMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * }); + * ``` + * + * **write (RECOMMENDED)** + * + * ```js + * import { open, close } from 'node:fs'; + * + * open('myfile', 'wx', (err, fd) => { + * if (err) { + * if (err.code === 'EEXIST') { + * console.error('myfile already exists'); + * return; + * } + * + * throw err; + * } + * + * try { + * writeMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * ``` + * + * **read (NOT RECOMMENDED)** + * + * ```js + * import { access, open, close } from 'node:fs'; + * access('myfile', (err) => { + * if (err) { + * if (err.code === 'ENOENT') { + * console.error('myfile does not exist'); + * return; + * } + * + * throw err; + * } + * + * open('myfile', 'r', (err, fd) => { + * if (err) throw err; + * + * try { + * readMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * }); + * ``` + * + * **read (RECOMMENDED)** + * + * ```js + * import { open, close } from 'node:fs'; + * + * open('myfile', 'r', (err, fd) => { + * if (err) { + * if (err.code === 'ENOENT') { + * console.error('myfile does not exist'); + * return; + * } + * + * throw err; + * } + * + * try { + * readMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * ``` + * + * The "not recommended" examples above check for accessibility and then use the + * file; the "recommended" examples are better because they use the file directly + * and handle the error, if any. + * + * In general, check for the accessibility of a file only if the file will not be + * used directly, for example when its accessibility is a signal from another + * process. + * + * On Windows, access-control policies (ACLs) on a directory may limit access to + * a file or directory. The `fs.access()` function, however, does not check the + * ACL and therefore may report that a path is accessible even if the ACL restricts + * the user from reading or writing to it. + * @since v0.11.15 + * @param [mode=fs.constants.F_OK] + */ + function access(path: PathLike, mode: number | undefined, callback: NoParamCallback): void; + /** + * Asynchronously tests a user's permissions for the file specified by path. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + */ + function access(path: PathLike, callback: NoParamCallback): void; + namespace access { + /** + * Asynchronously tests a user's permissions for the file specified by path. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function __promisify__(path: PathLike, mode?: number): Promise; + } + /** + * Synchronously tests a user's permissions for the file or directory specified + * by `path`. The `mode` argument is an optional integer that specifies the + * accessibility checks to be performed. `mode` should be either the value `fs.constants.F_OK` or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`, `fs.constants.W_OK`, and + * `fs.constants.X_OK` (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for + * possible values of `mode`. + * + * If any of the accessibility checks fail, an `Error` will be thrown. Otherwise, + * the method will return `undefined`. + * + * ```js + * import { accessSync, constants } from 'node:fs'; + * + * try { + * accessSync('etc/passwd', constants.R_OK | constants.W_OK); + * console.log('can read/write'); + * } catch (err) { + * console.error('no access!'); + * } + * ``` + * @since v0.11.15 + * @param [mode=fs.constants.F_OK] + */ + function accessSync(path: PathLike, mode?: number): void; + interface StreamOptions { + flags?: string | undefined; + encoding?: BufferEncoding | undefined; + fd?: number | FileHandle | undefined; + mode?: number | undefined; + autoClose?: boolean | undefined; + emitClose?: boolean | undefined; + start?: number | undefined; + signal?: AbortSignal | null | undefined; + highWaterMark?: number | undefined; + } + interface FSImplementation { + open?: (...args: any[]) => any; + close?: (...args: any[]) => any; + } + interface CreateReadStreamFSImplementation extends FSImplementation { + read: (...args: any[]) => any; + } + interface CreateWriteStreamFSImplementation extends FSImplementation { + write: (...args: any[]) => any; + writev?: (...args: any[]) => any; + } + interface ReadStreamOptions extends StreamOptions { + fs?: CreateReadStreamFSImplementation | null | undefined; + end?: number | undefined; + } + interface WriteStreamOptions extends StreamOptions { + fs?: CreateWriteStreamFSImplementation | null | undefined; + flush?: boolean | undefined; + } + /** + * `options` can include `start` and `end` values to read a range of bytes from + * the file instead of the entire file. Both `start` and `end` are inclusive and + * start counting at 0, allowed values are in the + * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `fd` is specified and `start` is + * omitted or `undefined`, `fs.createReadStream()` reads sequentially from the + * current file position. The `encoding` can be any one of those accepted by `Buffer`. + * + * If `fd` is specified, `ReadStream` will ignore the `path` argument and will use + * the specified file descriptor. This means that no `'open'` event will be + * emitted. `fd` should be blocking; non-blocking `fd`s should be passed to `net.Socket`. + * + * If `fd` points to a character device that only supports blocking reads + * (such as keyboard or sound card), read operations do not finish until data is + * available. This can prevent the process from exiting and the stream from + * closing naturally. + * + * By default, the stream will emit a `'close'` event after it has been + * destroyed. Set the `emitClose` option to `false` to change this behavior. + * + * By providing the `fs` option, it is possible to override the corresponding `fs` implementations for `open`, `read`, and `close`. When providing the `fs` option, + * an override for `read` is required. If no `fd` is provided, an override for `open` is also required. If `autoClose` is `true`, an override for `close` is + * also required. + * + * ```js + * import { createReadStream } from 'node:fs'; + * + * // Create a stream from some character device. + * const stream = createReadStream('/dev/input/event0'); + * setTimeout(() => { + * stream.close(); // This may not close the stream. + * // Artificially marking end-of-stream, as if the underlying resource had + * // indicated end-of-file by itself, allows the stream to close. + * // This does not cancel pending read operations, and if there is such an + * // operation, the process may still not be able to exit successfully + * // until it finishes. + * stream.push(null); + * stream.read(0); + * }, 100); + * ``` + * + * If `autoClose` is false, then the file descriptor won't be closed, even if + * there's an error. It is the application's responsibility to close it and make + * sure there's no file descriptor leak. If `autoClose` is set to true (default + * behavior), on `'error'` or `'end'` the file descriptor will be closed + * automatically. + * + * `mode` sets the file mode (permission and sticky bits), but only if the + * file was created. + * + * An example to read the last 10 bytes of a file which is 100 bytes long: + * + * ```js + * import { createReadStream } from 'node:fs'; + * + * createReadStream('sample.txt', { start: 90, end: 99 }); + * ``` + * + * If `options` is a string, then it specifies the encoding. + * @since v0.1.31 + */ + function createReadStream(path: PathLike, options?: BufferEncoding | ReadStreamOptions): ReadStream; + /** + * `options` may also include a `start` option to allow writing data at some + * position past the beginning of the file, allowed values are in the + * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than + * replacing it may require the `flags` option to be set to `r+` rather than the + * default `w`. The `encoding` can be any one of those accepted by `Buffer`. + * + * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'` the file descriptor will be closed automatically. If `autoClose` is false, + * then the file descriptor won't be closed, even if there's an error. + * It is the application's responsibility to close it and make sure there's no + * file descriptor leak. + * + * By default, the stream will emit a `'close'` event after it has been + * destroyed. Set the `emitClose` option to `false` to change this behavior. + * + * By providing the `fs` option it is possible to override the corresponding `fs` implementations for `open`, `write`, `writev`, and `close`. Overriding `write()` without `writev()` can reduce + * performance as some optimizations (`_writev()`) + * will be disabled. When providing the `fs` option, overrides for at least one of `write` and `writev` are required. If no `fd` option is supplied, an override + * for `open` is also required. If `autoClose` is `true`, an override for `close` is also required. + * + * Like `fs.ReadStream`, if `fd` is specified, `fs.WriteStream` will ignore the `path` argument and will use the specified file descriptor. This means that no `'open'` event will be + * emitted. `fd` should be blocking; non-blocking `fd`s + * should be passed to `net.Socket`. + * + * If `options` is a string, then it specifies the encoding. + * @since v0.1.31 + */ + function createWriteStream(path: PathLike, options?: BufferEncoding | WriteStreamOptions): WriteStream; + /** + * Forces all currently queued I/O operations associated with the file to the + * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. No arguments other + * than a possible + * exception are given to the completion callback. + * @since v0.1.96 + */ + function fdatasync(fd: number, callback: NoParamCallback): void; + namespace fdatasync { + /** + * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. + * @param fd A file descriptor. + */ + function __promisify__(fd: number): Promise; + } + /** + * Forces all currently queued I/O operations associated with the file to the + * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. Returns `undefined`. + * @since v0.1.96 + */ + function fdatasyncSync(fd: number): void; + /** + * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it + * already exists. No arguments other than a possible exception are given to the + * callback function. Node.js makes no guarantees about the atomicity of the copy + * operation. If an error occurs after the destination file has been opened for + * writing, Node.js will attempt to remove the destination. + * + * `mode` is an optional integer that specifies the behavior + * of the copy operation. It is possible to create a mask consisting of the bitwise + * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`). + * + * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already + * exists. + * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a + * copy-on-write reflink. If the platform does not support copy-on-write, then a + * fallback copy mechanism is used. + * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to + * create a copy-on-write reflink. If the platform does not support + * copy-on-write, then the operation will fail. + * + * ```js + * import { copyFile, constants } from 'node:fs'; + * + * function callback(err) { + * if (err) throw err; + * console.log('source.txt was copied to destination.txt'); + * } + * + * // destination.txt will be created or overwritten by default. + * copyFile('source.txt', 'destination.txt', callback); + * + * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. + * copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL, callback); + * ``` + * @since v8.5.0 + * @param src source filename to copy + * @param dest destination filename of the copy operation + * @param [mode=0] modifiers for copy operation. + */ + function copyFile(src: PathLike, dest: PathLike, callback: NoParamCallback): void; + function copyFile(src: PathLike, dest: PathLike, mode: number, callback: NoParamCallback): void; + namespace copyFile { + function __promisify__(src: PathLike, dst: PathLike, mode?: number): Promise; + } + /** + * Synchronously copies `src` to `dest`. By default, `dest` is overwritten if it + * already exists. Returns `undefined`. Node.js makes no guarantees about the + * atomicity of the copy operation. If an error occurs after the destination file + * has been opened for writing, Node.js will attempt to remove the destination. + * + * `mode` is an optional integer that specifies the behavior + * of the copy operation. It is possible to create a mask consisting of the bitwise + * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`). + * + * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already + * exists. + * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a + * copy-on-write reflink. If the platform does not support copy-on-write, then a + * fallback copy mechanism is used. + * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to + * create a copy-on-write reflink. If the platform does not support + * copy-on-write, then the operation will fail. + * + * ```js + * import { copyFileSync, constants } from 'node:fs'; + * + * // destination.txt will be created or overwritten by default. + * copyFileSync('source.txt', 'destination.txt'); + * console.log('source.txt was copied to destination.txt'); + * + * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. + * copyFileSync('source.txt', 'destination.txt', constants.COPYFILE_EXCL); + * ``` + * @since v8.5.0 + * @param src source filename to copy + * @param dest destination filename of the copy operation + * @param [mode=0] modifiers for copy operation. + */ + function copyFileSync(src: PathLike, dest: PathLike, mode?: number): void; + /** + * Write an array of `ArrayBufferView`s to the file specified by `fd` using `writev()`. + * + * `position` is the offset from the beginning of the file where this data + * should be written. If `typeof position !== 'number'`, the data will be written + * at the current position. + * + * The callback will be given three arguments: `err`, `bytesWritten`, and `buffers`. `bytesWritten` is how many bytes were written from `buffers`. + * + * If this method is `util.promisify()` ed, it returns a promise for an `Object` with `bytesWritten` and `buffers` properties. + * + * It is unsafe to use `fs.writev()` multiple times on the same file without + * waiting for the callback. For this scenario, use {@link createWriteStream}. + * + * On Linux, positional writes don't work when the file is opened in append mode. + * The kernel ignores the position argument and always appends the data to + * the end of the file. + * @since v12.9.0 + * @param [position='null'] + */ + function writev( + fd: number, + buffers: TBuffers, + cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: TBuffers) => void, + ): void; + function writev( + fd: number, + buffers: TBuffers, + position: number | null, + cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: TBuffers) => void, + ): void; + // Providing a default type parameter doesn't provide true BC for userland consumers, but at least suppresses TS2314 + // TODO: remove default in future major version + interface WriteVResult { + bytesWritten: number; + buffers: T; + } + namespace writev { + function __promisify__( + fd: number, + buffers: TBuffers, + position?: number, + ): Promise>; + } + /** + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link writev}. + * @since v12.9.0 + * @param [position='null'] + * @return The number of bytes written. + */ + function writevSync(fd: number, buffers: readonly NodeJS.ArrayBufferView[], position?: number): number; + /** + * Read from a file specified by `fd` and write to an array of `ArrayBufferView`s + * using `readv()`. + * + * `position` is the offset from the beginning of the file from where data + * should be read. If `typeof position !== 'number'`, the data will be read + * from the current position. + * + * The callback will be given three arguments: `err`, `bytesRead`, and `buffers`. `bytesRead` is how many bytes were read from the file. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a promise for an `Object` with `bytesRead` and `buffers` properties. + * @since v13.13.0, v12.17.0 + * @param [position='null'] + */ + function readv( + fd: number, + buffers: TBuffers, + cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: TBuffers) => void, + ): void; + function readv( + fd: number, + buffers: TBuffers, + position: number | null, + cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: TBuffers) => void, + ): void; + // Providing a default type parameter doesn't provide true BC for userland consumers, but at least suppresses TS2314 + // TODO: remove default in future major version + interface ReadVResult { + bytesRead: number; + buffers: T; + } + namespace readv { + function __promisify__( + fd: number, + buffers: TBuffers, + position?: number, + ): Promise>; + } + /** + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link readv}. + * @since v13.13.0, v12.17.0 + * @param [position='null'] + * @return The number of bytes read. + */ + function readvSync(fd: number, buffers: readonly NodeJS.ArrayBufferView[], position?: number): number; + + interface OpenAsBlobOptions { + /** + * An optional mime type for the blob. + * + * @default 'undefined' + */ + type?: string | undefined; + } + + /** + * Returns a `Blob` whose data is backed by the given file. + * + * The file must not be modified after the `Blob` is created. Any modifications + * will cause reading the `Blob` data to fail with a `DOMException` error. + * Synchronous stat operations on the file when the `Blob` is created, and before + * each read in order to detect whether the file data has been modified on disk. + * + * ```js + * import { openAsBlob } from 'node:fs'; + * + * const blob = await openAsBlob('the.file.txt'); + * const ab = await blob.arrayBuffer(); + * blob.stream(); + * ``` + * @since v19.8.0 + */ + function openAsBlob(path: PathLike, options?: OpenAsBlobOptions): Promise; + + interface OpenDirOptions { + /** + * @default 'utf8' + */ + encoding?: BufferEncoding | undefined; + /** + * Number of directory entries that are buffered + * internally when reading from the directory. Higher values lead to better + * performance but higher memory usage. + * @default 32 + */ + bufferSize?: number | undefined; + /** + * @default false + */ + recursive?: boolean | undefined; + } + /** + * Synchronously open a directory. See [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html). + * + * Creates an `fs.Dir`, which contains all further functions for reading from + * and cleaning up the directory. + * + * The `encoding` option sets the encoding for the `path` while opening the + * directory and subsequent read operations. + * @since v12.12.0 + */ + function opendirSync(path: PathLike, options?: OpenDirOptions): Dir; + /** + * Asynchronously open a directory. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for + * more details. + * + * Creates an `fs.Dir`, which contains all further functions for reading from + * and cleaning up the directory. + * + * The `encoding` option sets the encoding for the `path` while opening the + * directory and subsequent read operations. + * @since v12.12.0 + */ + function opendir(path: PathLike, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void; + function opendir( + path: PathLike, + options: OpenDirOptions, + cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void, + ): void; + namespace opendir { + function __promisify__(path: PathLike, options?: OpenDirOptions): Promise; + } + interface BigIntStats extends StatsBase { + atimeNs: bigint; + mtimeNs: bigint; + ctimeNs: bigint; + birthtimeNs: bigint; + } + interface BigIntOptions { + bigint: true; + } + interface StatOptions { + // TODO: add signal option once we sort its behavior out upstream + bigint?: boolean | undefined; + throwIfNoEntry?: boolean | undefined; + } + /** @deprecated This orphaned interface will be removed in a future version. Use `StatOptions` instead. */ + interface StatSyncOptions extends StatOptions {} + interface CopyOptionsBase { + /** + * Dereference symlinks + * @default false + */ + dereference?: boolean | undefined; + /** + * When `force` is `false`, and the destination + * exists, throw an error. + * @default false + */ + errorOnExist?: boolean | undefined; + /** + * Overwrite existing file or directory. _The copy + * operation will ignore errors if you set this to false and the destination + * exists. Use the `errorOnExist` option to change this behavior. + * @default true + */ + force?: boolean | undefined; + /** + * Modifiers for copy operation. See `mode` flag of {@link copyFileSync()} + */ + mode?: number | undefined; + /** + * When `true` timestamps from `src` will + * be preserved. + * @default false + */ + preserveTimestamps?: boolean | undefined; + /** + * Copy directories recursively. + * @default false + */ + recursive?: boolean | undefined; + /** + * When true, path resolution for symlinks will be skipped + * @default false + */ + verbatimSymlinks?: boolean | undefined; + } + interface CopyOptions extends CopyOptionsBase { + /** + * Function to filter copied files/directories. Return + * `true` to copy the item, `false` to ignore it. + */ + filter?: ((source: string, destination: string) => boolean | Promise) | undefined; + } + interface CopySyncOptions extends CopyOptionsBase { + /** + * Function to filter copied files/directories. Return + * `true` to copy the item, `false` to ignore it. + */ + filter?: ((source: string, destination: string) => boolean) | undefined; + } + /** + * Asynchronously copies the entire directory structure from `src` to `dest`, + * including subdirectories and files. + * + * When copying a directory to another directory, globs are not supported and + * behavior is similar to `cp dir1/ dir2/`. + * @since v16.7.0 + * @experimental + * @param src source path to copy. + * @param dest destination path to copy to. + */ + function cp( + source: string | URL, + destination: string | URL, + callback: (err: NodeJS.ErrnoException | null) => void, + ): void; + function cp( + source: string | URL, + destination: string | URL, + opts: CopyOptions, + callback: (err: NodeJS.ErrnoException | null) => void, + ): void; + /** + * Synchronously copies the entire directory structure from `src` to `dest`, + * including subdirectories and files. + * + * When copying a directory to another directory, globs are not supported and + * behavior is similar to `cp dir1/ dir2/`. + * @since v16.7.0 + * @experimental + * @param src source path to copy. + * @param dest destination path to copy to. + */ + function cpSync(source: string | URL, destination: string | URL, opts?: CopySyncOptions): void; + interface GlobOptions { + /** + * Current working directory. + * @default process.cwd() + */ + cwd?: string | URL | undefined; + /** + * Function to filter out files/directories or a + * list of glob patterns to be excluded. If a function is provided, return + * `true` to exclude the item, `false` to include it. + * If a string array is provided, each string should be a glob pattern that + * specifies paths to exclude. Note: Negation patterns (e.g., '!foo.js') are + * not supported. + * @default undefined + */ + exclude?: ((fileName: T) => boolean) | readonly string[] | undefined; + /** + * When `true`, symbolic links to directories are + * followed while expanding `**` patterns. + * @default false + */ + followSymlinks?: boolean | undefined; + /** + * `true` if the glob should return paths as `Dirent`s, `false` otherwise. + * @default false + * @since v22.2.0 + */ + withFileTypes?: boolean | undefined; + } + interface GlobOptionsWithFileTypes extends GlobOptions { + withFileTypes: true; + } + interface GlobOptionsWithoutFileTypes extends GlobOptions { + withFileTypes?: false | undefined; + } + + /** + * Retrieves the files matching the specified pattern. + * + * When `followSymlinks` is enabled, detected symbolic link cycles are not + * traversed recursively. + * + * ```js + * import { glob } from 'node:fs'; + * + * glob('*.js', (err, matches) => { + * if (err) throw err; + * console.log(matches); + * }); + * ``` + * @since v22.0.0 + */ + function glob( + pattern: string | readonly string[], + callback: (err: NodeJS.ErrnoException | null, matches: string[]) => void, + ): void; + function glob( + pattern: string | readonly string[], + options: GlobOptionsWithFileTypes, + callback: ( + err: NodeJS.ErrnoException | null, + matches: Dirent[], + ) => void, + ): void; + function glob( + pattern: string | readonly string[], + options: GlobOptionsWithoutFileTypes, + callback: ( + err: NodeJS.ErrnoException | null, + matches: string[], + ) => void, + ): void; + function glob( + pattern: string | readonly string[], + options: GlobOptions, + callback: ( + err: NodeJS.ErrnoException | null, + matches: Dirent[] | string[], + ) => void, + ): void; + /** + * When `followSymlinks` is enabled, detected symbolic link cycles are not + * traversed recursively. + * + * ```js + * import { globSync } from 'node:fs'; + * + * console.log(globSync('*.js')); + * ``` + * @since v22.0.0 + * @returns paths of files that match the pattern. + */ + function globSync(pattern: string | readonly string[]): string[]; + function globSync( + pattern: string | readonly string[], + options: GlobOptionsWithFileTypes, + ): Dirent[]; + function globSync( + pattern: string | readonly string[], + options: GlobOptionsWithoutFileTypes, + ): string[]; + function globSync( + pattern: string | readonly string[], + options: GlobOptions, + ): Dirent[] | string[]; +} +declare module "node:fs" { + export * as promises from "node:fs/promises"; +} +declare module "fs" { + export * from "node:fs"; +} diff --git a/node_modules/@types/node/fs/promises.d.ts b/node_modules/@types/node/fs/promises.d.ts new file mode 100644 index 0000000..9366b97 --- /dev/null +++ b/node_modules/@types/node/fs/promises.d.ts @@ -0,0 +1,1477 @@ +declare module "node:fs/promises" { + import { BufferView, NonSharedBuffer } from "node:buffer"; + import { Abortable } from "node:events"; + import { Interface as ReadlineInterface } from "node:readline"; + import { + BigIntStats, + BigIntStatsFs, + BufferEncodingOption, + constants as fsConstants, + CopyOptions, + Dir, + Dirent, + EncodingOption, + GlobOptions, + GlobOptionsWithFileTypes, + GlobOptionsWithoutFileTypes, + MakeDirectoryOptions, + Mode, + ObjectEncodingOptions, + OpenDirOptions, + OpenMode, + PathLike, + ReadFileOptions, + ReadFileOptionsWithBuffer, + ReadFileOptionsWithBufferEncoding, + ReadFileOptionsWithStringEncoding, + ReadOptions, + ReadOptionsWithBuffer, + ReadPosition, + ReadStream, + ReadVResult, + RmOptions, + StatFsOptions, + StatOptions, + Stats, + StatsFs, + TimeLike, + WatchEventType, + WatchOptions as _WatchOptions, + WriteStream, + WriteVResult, + } from "node:fs"; + import { ByteReadableStream, Transform, Writer } from "node:stream/iter"; + import { ReadableStream } from "node:stream/web"; + interface FileChangeInfo { + eventType: WatchEventType; + filename: T | null; + } + interface FlagAndOpenMode { + mode?: Mode | undefined; + flag?: OpenMode | undefined; + } + interface FileReadResult { + bytesRead: number; + buffer: T; + } + /** @deprecated This interface will be removed in a future version. Use `import { ReadOptionsWithBuffer } from "node:fs"` instead. */ + interface FileReadOptions { + /** + * @default `Buffer.alloc(0xffff)` + */ + buffer?: T; + /** + * @default 0 + */ + offset?: number | null; + /** + * @default `buffer.byteLength` + */ + length?: number | null; + position?: ReadPosition | null; + } + interface CreateReadStreamOptions extends Abortable { + encoding?: BufferEncoding | null | undefined; + autoClose?: boolean | undefined; + emitClose?: boolean | undefined; + start?: number | undefined; + end?: number | undefined; + highWaterMark?: number | undefined; + } + interface CreateWriteStreamOptions { + encoding?: BufferEncoding | null | undefined; + autoClose?: boolean | undefined; + emitClose?: boolean | undefined; + start?: number | undefined; + highWaterMark?: number | undefined; + flush?: boolean | undefined; + } + interface ReadableWebStreamOptions { + autoClose?: boolean | undefined; + } + interface PullOptions extends Abortable { + /** + * Close the file handle when the stream ends. + * @default false + */ + autoClose?: boolean | undefined; + /** + * Byte offset to begin reading from. When specified, + * reads use explicit positioning (`pread` semantics). + */ + start?: number | undefined; + /** + * Maximum number of bytes to read before ending the + * iterator. Reads stop when `limit` bytes have been delivered or EOF is + * reached, whichever comes first. + */ + limit?: number | undefined; + /** + * Size in bytes of the buffer allocated for each + * read operation. + * @default 131072 + */ + chunkSize?: number | undefined; + } + interface WriterOptions { + /** + * Close the file handle when the writer ends or fails. + * @default false + */ + autoClose?: boolean | undefined; + /** + * Byte offset to start writing at. When specified, + * writes use explicit positioning. + */ + start?: number | undefined; + /** + * Maximum number of bytes the writer will accept. + * Async writes (`write()`, `writev()`) that would exceed the limit reject + * with `ERR_OUT_OF_RANGE`. Sync writes (`writeSync()`, `writevSync()`) + * return `false`. + */ + limit?: number | undefined; + /** + * Maximum chunk size in bytes for synchronous write + * operations. Writes larger than this threshold fall back to async I/O. + * Set this to match the reader's `chunkSize` for optimal `pipeTo()` + * performance. + * @default 131072 + */ + chunkSize?: number | undefined; + } + // TODO: Add `EventEmitter` close + interface FileHandle { + /** + * The numeric file descriptor managed by the {FileHandle} object. + * @since v10.0.0 + */ + readonly fd: number; + /** + * Alias of `filehandle.writeFile()`. + * + * When operating on file handles, the mode cannot be changed from what it was set + * to with `fsPromises.open()`. Therefore, this is equivalent to `filehandle.writeFile()`. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + appendFile( + data: + | string + | NodeJS.ArrayBufferView + | Iterable + | AsyncIterable, + options?: + | (ObjectEncodingOptions & Abortable) + | BufferEncoding + | null, + ): Promise; + /** + * Changes the ownership of the file. A wrapper for [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html). + * @since v10.0.0 + * @param uid The file's new owner's user id. + * @param gid The file's new group's group id. + * @return Fulfills with `undefined` upon success. + */ + chown(uid: number, gid: number): Promise; + /** + * Modifies the permissions on the file. See [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html). + * @since v10.0.0 + * @param mode the file mode bit mask. + * @return Fulfills with `undefined` upon success. + */ + chmod(mode: Mode): Promise; + /** + * Unlike the 16 KiB default `highWaterMark` for a `stream.Readable`, the stream + * returned by this method has a default `highWaterMark` of 64 KiB. + * + * `options` can include `start` and `end` values to read a range of bytes from + * the file instead of the entire file. Both `start` and `end` are inclusive and + * start counting at 0, allowed values are in the + * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `start` is + * omitted or `undefined`, `filehandle.createReadStream()` reads sequentially from + * the current file position. The `encoding` can be any one of those accepted by `Buffer`. + * + * If the `FileHandle` points to a character device that only supports blocking + * reads (such as keyboard or sound card), read operations do not finish until data + * is available. This can prevent the process from exiting and the stream from + * closing naturally. + * + * By default, the stream will emit a `'close'` event after it has been + * destroyed. Set the `emitClose` option to `false` to change this behavior. + * + * ```js + * import { open } from 'node:fs/promises'; + * + * const fd = await open('/dev/input/event0'); + * // Create a stream from some character device. + * const stream = fd.createReadStream(); + * setTimeout(() => { + * stream.close(); // This may not close the stream. + * // Artificially marking end-of-stream, as if the underlying resource had + * // indicated end-of-file by itself, allows the stream to close. + * // This does not cancel pending read operations, and if there is such an + * // operation, the process may still not be able to exit successfully + * // until it finishes. + * stream.push(null); + * stream.read(0); + * }, 100); + * ``` + * + * If `autoClose` is false, then the file descriptor won't be closed, even if + * there's an error. It is the application's responsibility to close it and make + * sure there's no file descriptor leak. If `autoClose` is set to true (default + * behavior), on `'error'` or `'end'` the file descriptor will be closed + * automatically. + * + * An example to read the last 10 bytes of a file which is 100 bytes long: + * + * ```js + * import { open } from 'node:fs/promises'; + * + * const fd = await open('sample.txt'); + * fd.createReadStream({ start: 90, end: 99 }); + * ``` + * @since v16.11.0 + */ + createReadStream(options?: CreateReadStreamOptions): ReadStream; + /** + * `options` may also include a `start` option to allow writing data at some + * position past the beginning of the file, allowed values are in the + * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than + * replacing it may require the `flags` `open` option to be set to `r+` rather than + * the default `r`. The `encoding` can be any one of those accepted by `Buffer`. + * + * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'` the file descriptor will be closed automatically. If `autoClose` is false, + * then the file descriptor won't be closed, even if there's an error. + * It is the application's responsibility to close it and make sure there's no + * file descriptor leak. + * + * By default, the stream will emit a `'close'` event after it has been + * destroyed. Set the `emitClose` option to `false` to change this behavior. + * @since v16.11.0 + */ + createWriteStream(options?: CreateWriteStreamOptions): WriteStream; + /** + * Forces all currently queued I/O operations associated with the file to the + * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. + * + * Unlike `filehandle.sync` this method does not flush modified metadata. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + datasync(): Promise; + /** + * Return the file contents as an async iterable using the + * [`node:stream/iter`](https://nodejs.org/docs/latest-v26.x/api/stream_iter.html) pull model. Reads are performed in `chunkSize`-byte + * chunks (default 128 KB). If transforms are provided, they are applied + * via [`stream/iter pull()`](https://nodejs.org/docs/latest-v26.x/api/stream_iter.html#pullsource-transforms-options). + * + * The file handle is locked while the iterable is being consumed and unlocked + * when iteration completes, an error occurs, or the consumer breaks. + * + * This function is only available when the `--experimental-stream-iter` flag is + * enabled. + * + * ```js + * import { open } from 'node:fs/promises'; + * import { text } from 'node:stream/iter'; + * import { compressGzip } from 'node:zlib/iter'; + * + * const fh = await open('input.txt', 'r'); + * + * // Read as text + * console.log(await text(fh.pull({ autoClose: true }))); + * + * // Read 1 KB starting at byte 100 + * const fh2 = await open('input.txt', 'r'); + * console.log(await text(fh2.pull({ start: 100, limit: 1024, autoClose: true }))); + * + * // Read with compression + * const fh3 = await open('input.txt', 'r'); + * const compressed = fh3.pull(compressGzip(), { autoClose: true }); + * ``` + * @since v25.9.0 + * @experimental + */ + pull(...transforms: Transform[]): ByteReadableStream; + pull(...args: [...transforms: Transform[], options: PullOptions]): ByteReadableStream; + /** + * Request that all data for the open file descriptor is flushed to the storage + * device. The specific implementation is operating system and device specific. + * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + sync(): Promise; + /** + * Reads data from the file and stores that in the given buffer. + * + * If the file is not modified concurrently, the end-of-file is reached when the + * number of bytes read is zero. + * @since v10.0.0 + * @param buffer A buffer that will be filled with the file data read. + * @param offset The location in the buffer at which to start filling. + * @param length The number of bytes to read. + * @param position The location where to begin reading data from the file. If `null`, data will be read from the current file position, and the position will be updated. If `position` is an + * integer, the current file position will remain unchanged. + * @return Fulfills upon success with an object with two properties: + */ + read( + buffer: T, + offset?: number | null, + length?: number | null, + position?: ReadPosition | null, + ): Promise>; + read( + buffer: T, + options?: ReadOptions, + ): Promise>; + read( + options?: ReadOptionsWithBuffer, + ): Promise>; + /** + * Returns a byte-oriented `ReadableStream` that may be used to read the file's + * contents. + * + * An error will be thrown if this method is called more than once or is called + * after the `FileHandle` is closed or closing. + * + * ```js + * import { + * open, + * } from 'node:fs/promises'; + * + * const file = await open('./some/file/to/read'); + * + * for await (const chunk of file.readableWebStream()) + * console.log(chunk); + * + * await file.close(); + * ``` + * + * While the `ReadableStream` will read the file to completion, it will not + * close the `FileHandle` automatically. User code must still call the`fileHandle.close()` method. + * @since v17.0.0 + */ + readableWebStream(options?: ReadableWebStreamOptions): ReadableStream; + /** + * Asynchronously reads the entire contents of a file. + * + * If `options` is a string, then it specifies the `encoding`. + * + * If `buffer` is provided and no encoding is specified, the returned {Buffer} is + * a view over the supplied buffer containing only the bytes read. If the + * supplied buffer is too small to contain the entire file, the operation will + * fail. + * + * The `FileHandle` has to support reading. + * + * If one or more `filehandle.read()` calls are made on a file handle and then a + * `filehandle.readFile()` call is made, the data will be read from the current + * position till the end of the file. It doesn't always read from the beginning + * of the file. + * + * An example using the `buffer` option with a pre-allocated buffer: + * + * ```js + * import { Buffer } from 'node:buffer'; + * import { open } from 'node:fs/promises'; + * + * const file = await open('./some/file/to/read'); + * try { + * const buf = Buffer.alloc(16384); + * const contents = await file.readFile({ buffer: buf }); + * console.log(contents); // A view over `buf` containing only the bytes read + * } finally { + * await file.close(); + * } + * ``` + * + * An example using the `buffer` option with a function returning a buffer: + * + * ```js + * import { Buffer } from 'node:buffer'; + * import { open } from 'node:fs/promises'; + * + * const file = await open('./some/file/to/read'); + * try { + * const contents = await file.readFile({ + * buffer: (size) => Buffer.alloc(size), + * }); + * console.log(contents); + * } finally { + * await file.close(); + * } + * ``` + * @since v10.0.0 + * @returns Fulfills upon a successful read with the contents of the + * file. If no encoding is specified (using `options.encoding`), the data is + * returned as a `Buffer` object. Otherwise, the data will be a string. + */ + readFile( + options: Omit, "flag">, + ): Promise>; + readFile(options?: Omit | null): Promise; + readFile(options: Omit | BufferEncoding): Promise; + readFile(options: Omit | BufferEncoding | null): Promise; + /** + * Convenience method to create a `readline` interface and stream over the file. + * See `filehandle.createReadStream()` for the options. + * + * ```js + * import { open } from 'node:fs/promises'; + * + * const file = await open('./some/file/to/read'); + * + * for await (const line of file.readLines()) { + * console.log(line); + * } + * ``` + * @since v18.11.0 + */ + readLines(options?: CreateReadStreamOptions): ReadlineInterface; + /** + * @since v10.0.0 + * @return Fulfills with an {fs.Stats} for the file. + */ + stat( + opts?: StatOptions & { + bigint?: false | undefined; + }, + ): Promise; + stat( + opts: StatOptions & { + bigint: true; + }, + ): Promise; + stat(opts?: StatOptions): Promise; + /** + * Truncates the file. + * + * If the file was larger than `len` bytes, only the first `len` bytes will be + * retained in the file. + * + * The following example retains only the first four bytes of the file: + * + * ```js + * import { open } from 'node:fs/promises'; + * + * let filehandle = null; + * try { + * filehandle = await open('temp.txt', 'r+'); + * await filehandle.truncate(4); + * } finally { + * await filehandle?.close(); + * } + * ``` + * + * If the file previously was shorter than `len` bytes, it is extended, and the + * extended part is filled with null bytes (`'\0'`): + * + * If `len` is negative then `0` will be used. + * @since v10.0.0 + * @param [len=0] + * @return Fulfills with `undefined` upon success. + */ + truncate(len?: number): Promise; + /** + * Change the file system timestamps of the object referenced by the `FileHandle` then fulfills the promise with no arguments upon success. + * @since v10.0.0 + */ + utimes(atime: TimeLike, mtime: TimeLike): Promise; + /** + * Asynchronously writes data to a file, replacing the file if it already exists. `data` can be a string, a buffer, an + * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface), or an + * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object. + * The promise is fulfilled with no arguments upon success. + * + * If `options` is a string, then it specifies the `encoding`. + * + * The `FileHandle` has to support writing. + * + * It is unsafe to use `filehandle.writeFile()` multiple times on the same file + * without waiting for the promise to be fulfilled (or rejected). + * + * If one or more `filehandle.write()` calls are made on a file handle and then a`filehandle.writeFile()` call is made, the data will be written from the + * current position till the end of the file. It doesn't always write from the + * beginning of the file. + * @since v10.0.0 + */ + writeFile( + data: + | string + | NodeJS.ArrayBufferView + | Iterable + | AsyncIterable, + options?: + | (ObjectEncodingOptions & Abortable) + | BufferEncoding + | null, + ): Promise; + /** + * Write `buffer` to the file. + * + * The promise is fulfilled with an object containing two properties: + * + * It is unsafe to use `filehandle.write()` multiple times on the same file + * without waiting for the promise to be fulfilled (or rejected). For this + * scenario, use `filehandle.createWriteStream()`. + * + * On Linux, positional writes do not work when the file is opened in append mode. + * The kernel ignores the position argument and always appends the data to + * the end of the file. + * @since v10.0.0 + * @param offset The start position from within `buffer` where the data to write begins. + * @param [length=buffer.byteLength - offset] The number of bytes from `buffer` to write. + * @param [position='null'] The offset from the beginning of the file where the data from `buffer` should be written. If `position` is not a `number`, the data will be written at the current + * position. See the POSIX pwrite(2) documentation for more detail. + */ + write( + buffer: TBuffer, + offset?: number | null, + length?: number | null, + position?: number | null, + ): Promise<{ + bytesWritten: number; + buffer: TBuffer; + }>; + write( + buffer: TBuffer, + options?: { offset?: number; length?: number; position?: number }, + ): Promise<{ + bytesWritten: number; + buffer: TBuffer; + }>; + write( + data: string, + position?: number | null, + encoding?: BufferEncoding | null, + ): Promise<{ + bytesWritten: number; + buffer: string; + }>; + /** + * Write an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s to the file. + * + * The promise is fulfilled with an object containing a two properties: + * + * It is unsafe to call `writev()` multiple times on the same file without waiting + * for the promise to be fulfilled (or rejected). + * + * On Linux, positional writes don't work when the file is opened in append mode. + * The kernel ignores the position argument and always appends the data to + * the end of the file. + * @since v12.9.0 + * @param [position='null'] The offset from the beginning of the file where the data from `buffers` should be written. If `position` is not a `number`, the data will be written at the current + * position. + */ + writev( + buffers: TBuffers, + position?: number, + ): Promise>; + /** + * Return a [`node:stream/iter`](https://nodejs.org/docs/latest-v26.x/api/stream_iter.html) writer backed by this file handle. + * + * The writer supports both `Symbol.asyncDispose` and `Symbol.dispose`: + * + * * `await using w = fh.writer()` — if the writer is still open (no `end()` + * called), `asyncDispose` calls `fail()`. If `end()` is pending, it waits + * for it to complete. + * * `using w = fh.writer()` — calls `fail()` unconditionally. + * + * The `writeSync()` and `writevSync()` methods enable the try-sync fast path + * used by [`stream/iter pipeTo()`](https://nodejs.org/docs/latest-v26.x/api/stream_iter.html#pipetosource-transforms-writer). When the reader's chunk size matches the + * writer's `chunkSize`, all writes in a `pipeTo()` pipeline complete + * synchronously with zero promise overhead. + * + * This function is only available when the `--experimental-stream-iter` flag is + * enabled. + * + * ```js + * import { open } from 'node:fs/promises'; + * import { from, pipeTo } from 'node:stream/iter'; + * import { compressGzip } from 'node:zlib/iter'; + * + * // Async pipeline + * const fh = await open('output.gz', 'w'); + * await pipeTo(from('Hello!'), compressGzip(), fh.writer({ autoClose: true })); + * + * // Sync pipeline with limit + * const src = await open('input.txt', 'r'); + * const dst = await open('output.txt', 'w'); + * const w = dst.writer({ limit: 1024 * 1024 }); // Max 1 MB + * await pipeTo(src.pull({ autoClose: true }), w); + * await w.end(); + * await dst.close(); + * ``` + * @since v25.9.0 + * @experimental + */ + writer(options?: WriterOptions): Writer; + /** + * Read from a file and write to an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s + * @since v13.13.0, v12.17.0 + * @param [position='null'] The offset from the beginning of the file where the data should be read from. If `position` is not a `number`, the data will be read from the current position. + * @return Fulfills upon success an object containing two properties: + */ + readv( + buffers: TBuffers, + position?: number, + ): Promise>; + /** + * Closes the file handle after waiting for any pending operation on the handle to + * complete. + * + * ```js + * import { open } from 'node:fs/promises'; + * + * let filehandle; + * try { + * filehandle = await open('thefile.txt', 'r'); + * } finally { + * await filehandle?.close(); + * } + * ``` + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + close(): Promise; + /** + * Calls `filehandle.close()` and returns a promise that fulfills when the + * filehandle is closed. + * @since v20.4.0, v18.8.0 + */ + [Symbol.asyncDispose](): Promise; + } + const constants: typeof fsConstants; + /** + * Tests a user's permissions for the file or directory specified by `path`. + * The `mode` argument is an optional integer that specifies the accessibility + * checks to be performed. `mode` should be either the value `fs.constants.F_OK` or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`, `fs.constants.W_OK`, and `fs.constants.X_OK` + * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for + * possible values of `mode`. + * + * If the accessibility check is successful, the promise is fulfilled with no + * value. If any of the accessibility checks fail, the promise is rejected + * with an [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object. The following example checks if the file`/etc/passwd` can be read and + * written by the current process. + * + * ```js + * import { access, constants } from 'node:fs/promises'; + * + * try { + * await access('/etc/passwd', constants.R_OK | constants.W_OK); + * console.log('can access'); + * } catch { + * console.error('cannot access'); + * } + * ``` + * + * Using `fsPromises.access()` to check for the accessibility of a file before + * calling `fsPromises.open()` is not recommended. Doing so introduces a race + * condition, since other processes may change the file's state between the two + * calls. Instead, user code should open/read/write the file directly and handle + * the error raised if the file is not accessible. + * @since v10.0.0 + * @param [mode=fs.constants.F_OK] + * @return Fulfills with `undefined` upon success. + */ + function access(path: PathLike, mode?: number): Promise; + /** + * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it + * already exists. + * + * No guarantees are made about the atomicity of the copy operation. If an + * error occurs after the destination file has been opened for writing, an attempt + * will be made to remove the destination. + * + * ```js + * import { copyFile, constants } from 'node:fs/promises'; + * + * try { + * await copyFile('source.txt', 'destination.txt'); + * console.log('source.txt was copied to destination.txt'); + * } catch { + * console.error('The file could not be copied'); + * } + * + * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. + * try { + * await copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL); + * console.log('source.txt was copied to destination.txt'); + * } catch { + * console.error('The file could not be copied'); + * } + * ``` + * @since v10.0.0 + * @param src source filename to copy + * @param dest destination filename of the copy operation + * @param [mode=0] Optional modifiers that specify the behavior of the copy operation. It is possible to create a mask consisting of the bitwise OR of two or more values (e.g. + * `fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`) + * @return Fulfills with `undefined` upon success. + */ + function copyFile(src: PathLike, dest: PathLike, mode?: number): Promise; + /** + * Opens a `FileHandle`. + * + * Refer to the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more detail. + * + * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented + * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains + * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams). + * @since v10.0.0 + * @param [flags='r'] See `support of file system `flags``. + * @param [mode=0o666] Sets the file mode (permission and sticky bits) if the file is created. + * @return Fulfills with a {FileHandle} object. + */ + function open(path: PathLike, flags?: string | number, mode?: Mode): Promise; + /** + * Renames `oldPath` to `newPath`. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function rename(oldPath: PathLike, newPath: PathLike): Promise; + /** + * Truncates (shortens or extends the length) of the content at `path` to `len` bytes. + * @since v10.0.0 + * @param [len=0] + * @return Fulfills with `undefined` upon success. + */ + function truncate(path: PathLike, len?: number): Promise; + /** + * Removes the directory identified by `path`. + * + * Using `fsPromises.rmdir()` on a file (not a directory) results in the + * promise being rejected with an `ENOENT` error on Windows and an `ENOTDIR` error on POSIX. + * + * To get a behavior similar to the `rm -rf` Unix command, use `fsPromises.rm()` with options `{ recursive: true, force: true }`. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function rmdir(path: PathLike): Promise; + /** + * Removes files and directories (modeled on the standard POSIX `rm` utility). + * @since v14.14.0 + * @return Fulfills with `undefined` upon success. + */ + function rm(path: PathLike, options?: RmOptions): Promise; + /** + * Asynchronously creates a directory. + * + * The optional `options` argument can be an integer specifying `mode` (permission + * and sticky bits), or an object with a `mode` property and a `recursive` property indicating whether parent directories should be created. Calling `fsPromises.mkdir()` when `path` is a directory + * that exists results in a + * rejection only when `recursive` is false. + * + * ```js + * import { mkdir } from 'node:fs/promises'; + * + * try { + * const projectFolder = new URL('./test/project/', import.meta.url); + * const createDir = await mkdir(projectFolder, { recursive: true }); + * + * console.log(`created ${createDir}`); + * } catch (err) { + * console.error(err.message); + * } + * ``` + * @since v10.0.0 + * @return Upon success, fulfills with `undefined` if `recursive` is `false`, or the first directory path created if `recursive` is `true`. + */ + function mkdir( + path: PathLike, + options: MakeDirectoryOptions & { + recursive: true; + }, + ): Promise; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdir( + path: PathLike, + options?: + | Mode + | (MakeDirectoryOptions & { + recursive?: false | undefined; + }) + | null, + ): Promise; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdir(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise; + /** + * Reads the contents of a directory. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the filenames. If the `encoding` is set to `'buffer'`, the filenames returned + * will be passed as `Buffer` objects. + * + * If `options.withFileTypes` is set to `true`, the returned array will contain `fs.Dirent` objects. + * + * ```js + * import { readdir } from 'node:fs/promises'; + * + * try { + * const files = await readdir(path); + * for (const file of files) + * console.log(file); + * } catch (err) { + * console.error(err); + * } + * ``` + * @since v10.0.0 + * @return Fulfills with an array of the names of the files in the directory excluding `'.'` and `'..'`. + */ + function readdir( + path: PathLike, + options?: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + }) + | BufferEncoding + | null, + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir( + path: PathLike, + options: + | { + encoding: "buffer"; + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + } + | "buffer", + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir( + path: PathLike, + options?: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + }) + | BufferEncoding + | null, + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. + */ + function readdir( + path: PathLike, + options: ObjectEncodingOptions & { + withFileTypes: true; + recursive?: boolean | undefined; + }, + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a directory. If a URL is provided, it must use the `file:` protocol. + * @param options Must include `withFileTypes: true` and `encoding: 'buffer'`. + */ + function readdir( + path: PathLike, + options: { + encoding: "buffer"; + withFileTypes: true; + recursive?: boolean | undefined; + }, + ): Promise[]>; + /** + * Reads the contents of the symbolic link referred to by `path`. See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more detail. The promise is + * fulfilled with the`linkString` upon success. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the link path returned. If the `encoding` is set to `'buffer'`, the link path + * returned will be passed as a `Buffer` object. + * @since v10.0.0 + * @return Fulfills with the `linkString` upon success. + */ + function readlink(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink(path: PathLike, options: BufferEncodingOption): Promise; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink( + path: PathLike, + options?: ObjectEncodingOptions | string | null, + ): Promise; + /** + * Creates a symbolic link. + * + * The `type` argument is only used on Windows platforms and can be one of `'dir'`, `'file'`, or `'junction'`. If the `type` argument is not a string, Node.js will + * autodetect `target` type and use `'file'` or `'dir'`. If the `target` does not + * exist, `'file'` will be used. Windows junction points require the destination + * path to be absolute. When using `'junction'`, the `target` argument will + * automatically be normalized to absolute path. Junction points on NTFS volumes + * can only point to directories. + * @since v10.0.0 + * @param [type='null'] + * @return Fulfills with `undefined` upon success. + */ + function symlink(target: PathLike, path: PathLike, type?: string | null): Promise; + /** + * Equivalent to `fsPromises.stat()` unless `path` refers to a symbolic link, + * in which case the link itself is stat-ed, not the file that it refers to. + * Refer to the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) document for more detail. + * @since v10.0.0 + * @return Fulfills with the {fs.Stats} object for the given symbolic link `path`. + */ + function lstat( + path: PathLike, + opts?: StatOptions & { + bigint?: false | undefined; + }, + ): Promise; + function lstat( + path: PathLike, + opts: StatOptions & { + bigint: true; + }, + ): Promise; + function lstat(path: PathLike, opts?: StatOptions): Promise; + /** + * @since v10.0.0 + * @return Fulfills with the {fs.Stats} object for the given `path`. + */ + function stat(path: PathLike): Promise; + function stat( + path: PathLike, + opts?: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry?: true | undefined; + }, + ): Promise; + function stat( + path: PathLike, + opts: StatOptions & { + bigint: true; + throwIfNoEntry?: true | undefined; + }, + ): Promise; + function stat( + path: PathLike, + opts: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry: false; + }, + ): Promise; + function stat( + path: PathLike, + opts: StatOptions & { + bigint: true; + throwIfNoEntry: false; + }, + ): Promise; + function stat( + path: PathLike, + opts: StatOptions & { + throwIfNoEntry?: true | undefined; + }, + ): Promise; + function stat(path: PathLike, opts?: StatOptions): Promise; + /** + * @since v19.6.0, v18.15.0 + * @return Fulfills with the {fs.StatFs} object for the given `path`. + */ + function statfs( + path: PathLike, + opts?: StatFsOptions & { + bigint?: false | undefined; + }, + ): Promise; + function statfs( + path: PathLike, + opts: StatFsOptions & { + bigint: true; + }, + ): Promise; + function statfs(path: PathLike, opts?: StatFsOptions): Promise; + /** + * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function link(existingPath: PathLike, newPath: PathLike): Promise; + /** + * If `path` refers to a symbolic link, then the link is removed without affecting + * the file or directory to which that link refers. If the `path` refers to a file + * path that is not a symbolic link, the file is deleted. See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more detail. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function unlink(path: PathLike): Promise; + /** + * Changes the permissions of a file. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function chmod(path: PathLike, mode: Mode): Promise; + /** + * Changes the permissions on a symbolic link. + * + * This method is only implemented on macOS. + * @deprecated Since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function lchmod(path: PathLike, mode: Mode): Promise; + /** + * Changes the ownership on a symbolic link. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function lchown(path: PathLike, uid: number, gid: number): Promise; + /** + * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`, with the difference that if the path refers to a + * symbolic link, then the link is not dereferenced: instead, the timestamps of + * the symbolic link itself are changed. + * @since v14.5.0, v12.19.0 + * @return Fulfills with `undefined` upon success. + */ + function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; + /** + * Changes the ownership of a file. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function chown(path: PathLike, uid: number, gid: number): Promise; + /** + * Change the file system timestamps of the object referenced by `path`. + * + * The `atime` and `mtime` arguments follow these rules: + * + * * Values can be either numbers representing Unix epoch time, `Date`s, or a + * numeric string like `'123456789.0'`. + * * If the value can not be converted to a number, or is `NaN`, `Infinity`, or `-Infinity`, an `Error` will be thrown. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; + /** + * Determines the actual location of `path` using the same semantics as the `fs.realpath.native()` function. + * + * Only paths that can be converted to UTF8 strings are supported. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the path. If the `encoding` is set to `'buffer'`, the path returned will be + * passed as a `Buffer` object. + * + * On Linux, when Node.js is linked against musl libc, the procfs file system must + * be mounted on `/proc` in order for this function to work. Glibc does not have + * this restriction. + * @since v10.0.0 + * @return Fulfills with the resolved path upon success. + */ + function realpath(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath(path: PathLike, options: BufferEncodingOption): Promise; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath( + path: PathLike, + options?: ObjectEncodingOptions | BufferEncoding | null, + ): Promise; + /** + * Creates a unique temporary directory. A unique directory name is generated by + * appending six random characters to the end of the provided `prefix`. Due to + * platform inconsistencies, avoid trailing `X` characters in `prefix`. Some + * platforms, notably the BSDs, can return more than six random characters, and + * replace trailing `X` characters in `prefix` with random characters. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use. + * + * ```js + * import { mkdtemp } from 'node:fs/promises'; + * import { join } from 'node:path'; + * import { tmpdir } from 'node:os'; + * + * try { + * await mkdtemp(join(tmpdir(), 'foo-')); + * } catch (err) { + * console.error(err); + * } + * ``` + * + * The `fsPromises.mkdtemp()` method will append the six randomly selected + * characters directly to the `prefix` string. For instance, given a directory `/tmp`, if the intention is to create a temporary directory _within_ `/tmp`, the `prefix` must end with a trailing + * platform-specific path separator + * (`import { sep } from 'node:path'`). + * @since v10.0.0 + * @return Fulfills with a string containing the file system path of the newly created temporary directory. + */ + function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp(prefix: string, options: BufferEncodingOption): Promise; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp( + prefix: string, + options?: ObjectEncodingOptions | BufferEncoding | null, + ): Promise; + interface DisposableTempDir extends AsyncDisposable { + /** + * The path of the created directory. + */ + path: string; + /** + * A function which removes the created directory. + */ + remove(): Promise; + /** + * The same as `remove`. + */ + [Symbol.asyncDispose](): Promise; + } + /** + * The resulting Promise holds an async-disposable object whose `path` property + * holds the created directory path. When the object is disposed, the directory + * and its contents will be removed asynchronously if it still exists. If the + * directory cannot be deleted, disposal will throw an error. The object has an + * async `remove()` method which will perform the same task. + * + * Both this function and the disposal function on the resulting object are + * async, so it should be used with `await` + `await using` as in + * `await using dir = await fsPromises.mkdtempDisposable('prefix')`. + * + * + * + * For detailed information, see the documentation of `fsPromises.mkdtemp()`. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use. + * @since v24.4.0 + */ + function mkdtempDisposable(prefix: PathLike, options?: EncodingOption): Promise; + /** + * Asynchronously writes data to a file, replacing the file if it already exists. `data` can be a string, a buffer, an + * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface), or an + * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object. + * + * The `encoding` option is ignored if `data` is a buffer. + * + * If `options` is a string, then it specifies the encoding. + * + * The `mode` option only affects the newly created file. See `fs.open()` for more details. + * + * Any specified `FileHandle` has to support writing. + * + * It is unsafe to use `fsPromises.writeFile()` multiple times on the same file + * without waiting for the promise to be settled. + * + * Similarly to `fsPromises.readFile` \- `fsPromises.writeFile` is a convenience + * method that performs multiple `write` calls internally to write the buffer + * passed to it. For performance sensitive code consider using `fs.createWriteStream()` or `filehandle.createWriteStream()`. + * + * It is possible to use an `AbortSignal` to cancel an `fsPromises.writeFile()`. + * Cancelation is "best effort", and some amount of data is likely still + * to be written. + * + * ```js + * import { writeFile } from 'node:fs/promises'; + * import { Buffer } from 'node:buffer'; + * + * try { + * const controller = new AbortController(); + * const { signal } = controller; + * const data = new Uint8Array(Buffer.from('Hello Node.js')); + * const promise = writeFile('message.txt', data, { signal }); + * + * // Abort the request before the promise settles. + * controller.abort(); + * + * await promise; + * } catch (err) { + * // When a request is aborted - err is an AbortError + * console.error(err); + * } + * ``` + * + * Aborting an ongoing request does not abort individual operating + * system requests but rather the internal buffering `fs.writeFile` performs. + * @since v10.0.0 + * @param file filename or `FileHandle` + * @return Fulfills with `undefined` upon success. + */ + function writeFile( + file: PathLike | FileHandle, + data: + | string + | NodeJS.ArrayBufferView + | Iterable + | AsyncIterable, + options?: + | (ObjectEncodingOptions & { + mode?: Mode | undefined; + flag?: OpenMode | undefined; + /** + * If all data is successfully written to the file, and `flush` + * is `true`, `filehandle.sync()` is used to flush the data. + * @default false + */ + flush?: boolean | undefined; + } & Abortable) + | BufferEncoding + | null, + ): Promise; + /** + * Asynchronously append data to a file, creating the file if it does not yet + * exist. `data` can be a string or a `Buffer`. + * + * If `options` is a string, then it specifies the `encoding`. + * + * The `mode` option only affects the newly created file. See `fs.open()` for more details. + * + * The `path` may be specified as a `FileHandle` that has been opened + * for appending (using `fsPromises.open()`). + * @since v10.0.0 + * @param path filename or {FileHandle} + * @return Fulfills with `undefined` upon success. + */ + function appendFile( + path: PathLike | FileHandle, + data: + | string + | NodeJS.ArrayBufferView + | Iterable + | AsyncIterable, + options?: (ObjectEncodingOptions & FlagAndOpenMode & { flush?: boolean | undefined }) | BufferEncoding | null, + ): Promise; + /** + * Asynchronously reads the entire contents of a file. + * + * If no encoding is specified (using `options.encoding`), the data is returned + * as a `Buffer` object. Otherwise, the data will be a string. + * + * If `options` is a string, then it specifies the encoding. + * + * When the `path` is a directory, the behavior of `fsPromises.readFile()` is + * platform-specific. On macOS, Linux, and Windows, the promise will be rejected + * with an error. On FreeBSD, a representation of the directory's contents will be + * returned. + * + * An example of reading a `package.json` file located in the same directory of the + * running code: + * + * ```js + * import { readFile } from 'node:fs/promises'; + * try { + * const filePath = new URL('./package.json', import.meta.url); + * const contents = await readFile(filePath, { encoding: 'utf8' }); + * console.log(contents); + * } catch (err) { + * console.error(err.message); + * } + * ``` + * + * It is possible to abort an ongoing `readFile` using an `AbortSignal`. If a + * request is aborted the promise returned is rejected with an `AbortError`: + * + * ```js + * import { readFile } from 'node:fs/promises'; + * + * try { + * const controller = new AbortController(); + * const { signal } = controller; + * const promise = readFile(fileName, { signal }); + * + * // Abort the request before the promise settles. + * controller.abort(); + * + * await promise; + * } catch (err) { + * // When a request is aborted - err is an AbortError + * console.error(err); + * } + * ``` + * + * Aborting an ongoing request does not abort individual operating + * system requests but rather the internal buffering `fs.readFile` performs. + * + * Any specified `FileHandle` has to support reading. + * @since v10.0.0 + * @param path filename or `FileHandle` + * @return Fulfills with the contents of the file. + */ + function readFile( + path: PathLike | FileHandle, + options: ReadFileOptionsWithBuffer, + ): Promise>; + function readFile( + path: PathLike | FileHandle, + options?: ReadFileOptionsWithBufferEncoding | null, + ): Promise; + function readFile( + path: PathLike | FileHandle, + options: ReadFileOptionsWithStringEncoding | BufferEncoding, + ): Promise; + function readFile( + path: PathLike | FileHandle, + options: ReadFileOptions | BufferEncoding | null, + ): Promise; + /** + * Asynchronously open a directory for iterative scanning. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for more detail. + * + * Creates an `fs.Dir`, which contains all further functions for reading from + * and cleaning up the directory. + * + * The `encoding` option sets the encoding for the `path` while opening the + * directory and subsequent read operations. + * + * Example using async iteration: + * + * ```js + * import { opendir } from 'node:fs/promises'; + * + * try { + * const dir = await opendir('./'); + * for await (const dirent of dir) + * console.log(dirent.name); + * } catch (err) { + * console.error(err); + * } + * ``` + * + * When using the async iterator, the `fs.Dir` object will be automatically + * closed after the iterator exits. + * @since v12.12.0 + * @return Fulfills with an {fs.Dir}. + */ + function opendir(path: PathLike, options?: OpenDirOptions): Promise; + interface WatchOptions extends _WatchOptions { + maxQueue?: number | undefined; + overflow?: "ignore" | "throw" | undefined; + } + interface WatchOptionsWithBufferEncoding extends WatchOptions { + encoding: "buffer"; + } + interface WatchOptionsWithStringEncoding extends WatchOptions { + encoding?: BufferEncoding | undefined; + } + /** + * Returns an async iterator that watches for changes on `filename`, where `filename`is either a file or a directory. + * + * ```js + * import { watch } from 'node:fs/promises'; + * + * const ac = new AbortController(); + * const { signal } = ac; + * setTimeout(() => ac.abort(), 10000); + * + * (async () => { + * try { + * const watcher = watch(__filename, { signal }); + * for await (const event of watcher) + * console.log(event); + * } catch (err) { + * if (err.name === 'AbortError') + * return; + * throw err; + * } + * })(); + * ``` + * + * On most platforms, `'rename'` is emitted whenever a filename appears or + * disappears in the directory. + * + * All the `caveats` for `fs.watch()` also apply to `fsPromises.watch()`. + * @since v15.9.0, v14.18.0 + * @return of objects with the properties: + */ + function watch( + filename: PathLike, + options?: WatchOptionsWithStringEncoding | BufferEncoding, + ): NodeJS.AsyncIterator>; + function watch( + filename: PathLike, + options: WatchOptionsWithBufferEncoding | "buffer", + ): NodeJS.AsyncIterator>; + function watch( + filename: PathLike, + options: WatchOptions | BufferEncoding | "buffer", + ): NodeJS.AsyncIterator>; + /** + * Asynchronously copies the entire directory structure from `src` to `dest`, + * including subdirectories and files. + * + * When copying a directory to another directory, globs are not supported and + * behavior is similar to `cp dir1/ dir2/`. + * @since v16.7.0 + * @param src source path to copy. + * @param dest destination path to copy to. + * @return Fulfills with `undefined` upon success. + */ + function cp(source: string | URL, destination: string | URL, opts?: CopyOptions): Promise; + /** + * When `followSymlinks` is enabled, detected symbolic link cycles are not + * traversed recursively. + * + * ```js + * import { glob } from 'node:fs/promises'; + * + * for await (const entry of glob('*.js')) + * console.log(entry); + * ``` + * @since v22.0.0 + * @returns An AsyncIterator that yields the paths of files + * that match the pattern. + */ + function glob(pattern: string | readonly string[]): NodeJS.AsyncIterator; + function glob( + pattern: string | readonly string[], + options: GlobOptionsWithFileTypes, + ): NodeJS.AsyncIterator; + function glob( + pattern: string | readonly string[], + options: GlobOptionsWithoutFileTypes, + ): NodeJS.AsyncIterator; + function glob( + pattern: string | readonly string[], + options: GlobOptions, + ): NodeJS.AsyncIterator; +} +declare module "fs/promises" { + export * from "node:fs/promises"; +} diff --git a/node_modules/@types/node/globals.d.ts b/node_modules/@types/node/globals.d.ts new file mode 100644 index 0000000..0c2f0b0 --- /dev/null +++ b/node_modules/@types/node/globals.d.ts @@ -0,0 +1,150 @@ +declare var global: typeof globalThis; + +declare var process: NodeJS.Process; + +interface ErrorConstructor { + /** + * Creates a `.stack` property on `targetObject`, which when accessed returns + * a string representing the location in the code at which + * `Error.captureStackTrace()` was called. + * + * ```js + * const myObject = {}; + * Error.captureStackTrace(myObject); + * myObject.stack; // Similar to `new Error().stack` + * ``` + * + * The first line of the trace will be prefixed with + * `${myObject.name}: ${myObject.message}`. + * + * The optional `constructorOpt` argument accepts a function. If given, all frames + * above `constructorOpt`, including `constructorOpt`, will be omitted from the + * generated stack trace. + * + * The `constructorOpt` argument is useful for hiding implementation + * details of error generation from the user. For instance: + * + * ```js + * function a() { + * b(); + * } + * + * function b() { + * c(); + * } + * + * function c() { + * // Create an error without stack trace to avoid calculating the stack trace twice. + * const { stackTraceLimit } = Error; + * Error.stackTraceLimit = 0; + * const error = new Error(); + * Error.stackTraceLimit = stackTraceLimit; + * + * // Capture the stack trace above function b + * Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace + * throw error; + * } + * + * a(); + * ``` + */ + captureStackTrace(targetObject: object, constructorOpt?: Function): void; + /** + * @see https://v8.dev/docs/stack-trace-api#customizing-stack-traces + */ + prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any; + /** + * The `Error.stackTraceLimit` property specifies the number of stack frames + * collected by a stack trace (whether generated by `new Error().stack` or + * `Error.captureStackTrace(obj)`). + * + * The default value is `10` but may be set to any valid JavaScript number. Changes + * will affect any stack trace captured _after_ the value has been changed. + * + * If set to a non-number value, or set to a negative number, stack traces will + * not capture any frames. + */ + stackTraceLimit: number; +} + +/** + * Enable this API with the `--expose-gc` CLI flag. + */ +declare var gc: NodeJS.GCFunction | undefined; + +declare namespace NodeJS { + interface CallSite { + getColumnNumber(): number | null; + getEnclosingColumnNumber(): number | null; + getEnclosingLineNumber(): number | null; + getEvalOrigin(): string | undefined; + getFileName(): string | null; + getFunction(): Function | undefined; + getFunctionName(): string | null; + getLineNumber(): number | null; + getMethodName(): string | null; + getPosition(): number; + getPromiseIndex(): number | null; + getScriptHash(): string; + getScriptNameOrSourceURL(): string | null; + getThis(): unknown; + getTypeName(): string | null; + isAsync(): boolean; + isConstructor(): boolean; + isEval(): boolean; + isNative(): boolean; + isPromiseAll(): boolean; + isToplevel(): boolean; + } + + interface ErrnoException extends Error { + errno?: number; + code?: string; + path?: string; + syscall?: string; + } + + interface RefCounted { + ref(): this; + unref(): this; + } + + interface Dict { + [key: string]: T | undefined; + } + + interface ReadOnlyDict { + readonly [key: string]: T | undefined; + } + + type PartialOptions = { [K in keyof T]?: T[K] | undefined }; + + interface GCFunction { + (minor?: boolean): void; + (options: NodeJS.GCOptions & { execution: "async" }): Promise; + (options: NodeJS.GCOptions): void; + } + + interface GCOptions { + execution?: "sync" | "async" | undefined; + flavor?: "regular" | "last-resort" | undefined; + type?: "major-snapshot" | "major" | "minor" | undefined; + filename?: string | undefined; + } + + /** An iterable iterator returned by the Node.js API. */ + interface Iterator extends IteratorObject { + [Symbol.iterator](): NodeJS.Iterator; + } + + /** An async iterable iterator returned by the Node.js API. */ + interface AsyncIterator extends AsyncIteratorObject { + [Symbol.asyncIterator](): NodeJS.AsyncIterator; + } + + /** The [`BufferSource`](https://webidl.spec.whatwg.org/#BufferSource) type from the Web IDL specification. */ + type BufferSource = NonSharedArrayBufferView | ArrayBuffer; + + /** The [`AllowSharedBufferSource`](https://webidl.spec.whatwg.org/#AllowSharedBufferSource) type from the Web IDL specification. */ + type AllowSharedBufferSource = ArrayBufferView | ArrayBufferLike; +} diff --git a/node_modules/@types/node/globals.typedarray.d.ts b/node_modules/@types/node/globals.typedarray.d.ts new file mode 100644 index 0000000..e69dd0c --- /dev/null +++ b/node_modules/@types/node/globals.typedarray.d.ts @@ -0,0 +1,101 @@ +export {}; // Make this a module + +declare global { + namespace NodeJS { + type TypedArray = + | Uint8Array + | Uint8ClampedArray + | Uint16Array + | Uint32Array + | Int8Array + | Int16Array + | Int32Array + | BigUint64Array + | BigInt64Array + | Float16Array + | Float32Array + | Float64Array; + type ArrayBufferView = + | TypedArray + | DataView; + + // The following aliases are required to allow use of non-shared ArrayBufferViews in @types/node + // while maintaining compatibility with TS <=5.6. + // TODO: remove once @types/node no longer supports TS 5.6, and replace with native types. + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedUint8Array = Uint8Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedUint8ClampedArray = Uint8ClampedArray; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedUint16Array = Uint16Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedUint32Array = Uint32Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedInt8Array = Int8Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedInt16Array = Int16Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedInt32Array = Int32Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedBigUint64Array = BigUint64Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedBigInt64Array = BigInt64Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedFloat16Array = Float16Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedFloat32Array = Float32Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedFloat64Array = Float64Array; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedDataView = DataView; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedTypedArray = TypedArray; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedArrayBufferView = ArrayBufferView; + } +} diff --git a/node_modules/@types/node/http.d.ts b/node_modules/@types/node/http.d.ts new file mode 100644 index 0000000..73a7024 --- /dev/null +++ b/node_modules/@types/node/http.d.ts @@ -0,0 +1,2218 @@ +declare module "node:http" { + import { NonSharedBuffer } from "node:buffer"; + import { LookupOptions } from "node:dns"; + import { EventEmitter } from "node:events"; + import * as net from "node:net"; + import * as stream from "node:stream"; + import { URL } from "node:url"; + // incoming headers will never contain number + interface IncomingHttpHeaders extends NodeJS.Dict { + accept?: string | undefined; + "accept-encoding"?: string | undefined; + "accept-language"?: string | undefined; + "accept-patch"?: string | undefined; + "accept-ranges"?: string | undefined; + "access-control-allow-credentials"?: string | undefined; + "access-control-allow-headers"?: string | undefined; + "access-control-allow-methods"?: string | undefined; + "access-control-allow-origin"?: string | undefined; + "access-control-expose-headers"?: string | undefined; + "access-control-max-age"?: string | undefined; + "access-control-request-headers"?: string | undefined; + "access-control-request-method"?: string | undefined; + age?: string | undefined; + allow?: string | undefined; + "alt-svc"?: string | undefined; + authorization?: string | undefined; + "cache-control"?: string | undefined; + connection?: string | undefined; + "content-disposition"?: string | undefined; + "content-encoding"?: string | undefined; + "content-language"?: string | undefined; + "content-length"?: string | undefined; + "content-location"?: string | undefined; + "content-range"?: string | undefined; + "content-type"?: string | undefined; + cookie?: string | undefined; + date?: string | undefined; + etag?: string | undefined; + expect?: string | undefined; + expires?: string | undefined; + forwarded?: string | undefined; + from?: string | undefined; + host?: string | undefined; + "if-match"?: string | undefined; + "if-modified-since"?: string | undefined; + "if-none-match"?: string | undefined; + "if-unmodified-since"?: string | undefined; + "last-modified"?: string | undefined; + location?: string | undefined; + origin?: string | undefined; + pragma?: string | undefined; + "proxy-authenticate"?: string | undefined; + "proxy-authorization"?: string | undefined; + "public-key-pins"?: string | undefined; + range?: string | undefined; + referer?: string | undefined; + "retry-after"?: string | undefined; + "sec-fetch-site"?: string | undefined; + "sec-fetch-mode"?: string | undefined; + "sec-fetch-user"?: string | undefined; + "sec-fetch-dest"?: string | undefined; + "sec-websocket-accept"?: string | undefined; + "sec-websocket-extensions"?: string | undefined; + "sec-websocket-key"?: string | undefined; + "sec-websocket-protocol"?: string | undefined; + "sec-websocket-version"?: string | undefined; + "set-cookie"?: string[] | undefined; + "strict-transport-security"?: string | undefined; + tk?: string | undefined; + trailer?: string | undefined; + "transfer-encoding"?: string | undefined; + upgrade?: string | undefined; + "user-agent"?: string | undefined; + vary?: string | undefined; + via?: string | undefined; + warning?: string | undefined; + "www-authenticate"?: string | undefined; + } + // outgoing headers allows numbers (as they are converted internally to strings) + type OutgoingHttpHeader = number | string | string[]; + interface OutgoingHttpHeaders extends NodeJS.Dict { + accept?: string | string[] | undefined; + "accept-charset"?: string | string[] | undefined; + "accept-encoding"?: string | string[] | undefined; + "accept-language"?: string | string[] | undefined; + "accept-ranges"?: string | undefined; + "access-control-allow-credentials"?: string | undefined; + "access-control-allow-headers"?: string | undefined; + "access-control-allow-methods"?: string | undefined; + "access-control-allow-origin"?: string | undefined; + "access-control-expose-headers"?: string | undefined; + "access-control-max-age"?: string | undefined; + "access-control-request-headers"?: string | undefined; + "access-control-request-method"?: string | undefined; + age?: string | undefined; + allow?: string | undefined; + authorization?: string | undefined; + "cache-control"?: string | undefined; + "cdn-cache-control"?: string | undefined; + connection?: string | string[] | undefined; + "content-disposition"?: string | undefined; + "content-encoding"?: string | undefined; + "content-language"?: string | undefined; + "content-length"?: string | number | undefined; + "content-location"?: string | undefined; + "content-range"?: string | undefined; + "content-security-policy"?: string | undefined; + "content-security-policy-report-only"?: string | undefined; + "content-type"?: string | undefined; + cookie?: string | string[] | undefined; + dav?: string | string[] | undefined; + dnt?: string | undefined; + date?: string | undefined; + etag?: string | undefined; + expect?: string | undefined; + expires?: string | undefined; + forwarded?: string | undefined; + from?: string | undefined; + host?: string | undefined; + "if-match"?: string | undefined; + "if-modified-since"?: string | undefined; + "if-none-match"?: string | undefined; + "if-range"?: string | undefined; + "if-unmodified-since"?: string | undefined; + "last-modified"?: string | undefined; + link?: string | string[] | undefined; + location?: string | undefined; + "max-forwards"?: string | undefined; + origin?: string | undefined; + pragma?: string | string[] | undefined; + "proxy-authenticate"?: string | string[] | undefined; + "proxy-authorization"?: string | undefined; + "public-key-pins"?: string | undefined; + "public-key-pins-report-only"?: string | undefined; + range?: string | undefined; + referer?: string | undefined; + "referrer-policy"?: string | undefined; + refresh?: string | undefined; + "retry-after"?: string | undefined; + "sec-websocket-accept"?: string | undefined; + "sec-websocket-extensions"?: string | string[] | undefined; + "sec-websocket-key"?: string | undefined; + "sec-websocket-protocol"?: string | string[] | undefined; + "sec-websocket-version"?: string | undefined; + server?: string | undefined; + "set-cookie"?: string | string[] | undefined; + "strict-transport-security"?: string | undefined; + te?: string | undefined; + trailer?: string | undefined; + "transfer-encoding"?: string | undefined; + "user-agent"?: string | undefined; + upgrade?: string | undefined; + "upgrade-insecure-requests"?: string | undefined; + vary?: string | undefined; + via?: string | string[] | undefined; + warning?: string | undefined; + "www-authenticate"?: string | string[] | undefined; + "x-content-type-options"?: string | undefined; + "x-dns-prefetch-control"?: string | undefined; + "x-frame-options"?: string | undefined; + "x-xss-protection"?: string | undefined; + } + interface ClientRequestArgs extends Pick { + _defaultAgent?: Agent | undefined; + agent?: Agent | boolean | undefined; + auth?: string | null | undefined; + createConnection?: + | (( + options: ClientRequestArgs, + oncreate: (err: Error | null, socket: stream.Duplex) => void, + ) => stream.Duplex | null | undefined) + | undefined; + defaultPort?: number | string | undefined; + family?: number | undefined; + headers?: OutgoingHttpHeaders | readonly string[] | undefined; + host?: string | null | undefined; + hostname?: string | null | undefined; + httpValidation?: "strict" | "relaxed" | "insecure" | undefined; + insecureHTTPParser?: boolean | undefined; + localAddress?: string | undefined; + localPort?: number | undefined; + lookup?: net.LookupFunction | undefined; + /** + * @default 16384 + */ + maxHeaderSize?: number | undefined; + method?: string | undefined; + path?: string | null | undefined; + port?: number | string | null | undefined; + protocol?: string | null | undefined; + setDefaultHeaders?: boolean | undefined; + setHost?: boolean | undefined; + signal?: AbortSignal | undefined; + socketPath?: string | undefined; + timeout?: number | undefined; + uniqueHeaders?: Array | undefined; + joinDuplicateHeaders?: boolean | undefined; + } + interface ServerOptions< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse> = typeof ServerResponse, + > { + /** + * Specifies the `IncomingMessage` class to be used. Useful for extending the original `IncomingMessage`. + */ + IncomingMessage?: Request | undefined; + /** + * Specifies the `ServerResponse` class to be used. Useful for extending the original `ServerResponse`. + */ + ServerResponse?: Response | undefined; + /** + * Sets the timeout value in milliseconds for receiving the entire request from the client. + * @see Server.requestTimeout for more information. + * @default 300000 + * @since v18.0.0 + */ + requestTimeout?: number | undefined; + /** + * It joins the field line values of multiple headers in a request with `, ` instead of discarding the duplicates. + * @default false + * @since v18.14.0 + */ + joinDuplicateHeaders?: boolean | undefined; + /** + * The number of milliseconds of inactivity a server needs to wait for additional incoming data, + * after it has finished writing the last response, before a socket will be destroyed. + * @see Server.keepAliveTimeout for more information. + * @default 65000 + * @since v18.0.0 + */ + keepAliveTimeout?: number | undefined; + /** + * An additional buffer time added to the + * `server.keepAliveTimeout` to extend the internal socket timeout. + * @since 24.6.0 + * @default 1000 + */ + keepAliveTimeoutBuffer?: number | undefined; + /** + * Sets the interval value in milliseconds to check for request and headers timeout in incomplete requests. + * @default 30000 + */ + connectionsCheckingInterval?: number | undefined; + /** + * Sets the timeout value in milliseconds for receiving the complete HTTP headers from the client. + * See {@link Server.headersTimeout} for more information. + * @default 60000 + * @since 18.0.0 + */ + headersTimeout?: number | undefined; + /** + * Optionally overrides all `socket`s' `readableHighWaterMark` and `writableHighWaterMark`. + * This affects `highWaterMark` property of both `IncomingMessage` and `ServerResponse`. + * Default: @see stream.getDefaultHighWaterMark(). + * @since v20.1.0 + */ + highWaterMark?: number | undefined; + /** + * Controls HTTP header value validation strictness + * for incoming requests. Accepted values are: + * * `'strict'`: Strictest validation; rejects any non-ASCII or control + * characters in header values. + * * `'relaxed'`: Allows a limited set of non-ASCII characters in header + * values, aligning with the + * [Fetch specification](https://fetch.spec.whatwg.org/). + * * `'insecure'`: Disables all header value validation (equivalent to + * `insecureHTTPParser: true`). + * + * Cannot be used together with `insecureHTTPParser`. **Default:** `'strict'`. + * @since v26.3.0 + */ + httpValidation?: "strict" | "relaxed" | "insecure" | undefined; + /** + * Use an insecure HTTP parser that accepts invalid HTTP headers when `true`. + * Using the insecure parser should be avoided. + * See --insecure-http-parser for more information. + * @default false + */ + insecureHTTPParser?: boolean | undefined; + /** + * Optionally overrides the value of `--max-http-header-size` for requests received by + * this server, i.e. the maximum length of request headers in bytes. + * @default 16384 + * @since v13.3.0 + */ + maxHeaderSize?: number | undefined; + /** + * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received. + * @default true + * @since v16.5.0 + */ + noDelay?: boolean | undefined; + /** + * If set to `true`, it forces the server to respond with a 400 (Bad Request) status code + * to any HTTP/1.1 request message that lacks a Host header (as mandated by the specification). + * @default true + * @since 20.0.0 + */ + requireHostHeader?: boolean | undefined; + /** + * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received, + * similarly on what is done in `socket.setKeepAlive()`. + * @default false + * @since v16.5.0 + */ + keepAlive?: boolean | undefined; + /** + * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket. + * @default 0 + * @since v16.5.0 + */ + keepAliveInitialDelay?: number | undefined; + /** + * A list of response headers that should be sent only once. + * If the header's value is an array, the items will be joined using `; `. + */ + uniqueHeaders?: Array | undefined; + /** + * A callback which receives an + * incoming request and returns a boolean, to control which upgrade attempts + * should be accepted. Accepted upgrades will fire an `'upgrade'` event (or + * their sockets will be destroyed, if no listener is registered) while + * rejected upgrades will fire a `'request'` event like any non-upgrade + * request. + * @since v24.9.0 + * @default () => server.listenerCount('upgrade') > 0 + */ + shouldUpgradeCallback?: ((request: InstanceType) => boolean) | undefined; + /** + * If set to `true`, an error is thrown when writing to an HTTP response which does not have a body. + * @default false + * @since v18.17.0, v20.2.0 + */ + rejectNonStandardBodyWrites?: boolean | undefined; + /** + * If set to `true`, requests without `Content-Length` + * or `Transfer-Encoding` headers (indicating no body) will be initialized with an + * already-ended body stream, so they will never emit any stream events + * (like `'data'` or `'end'`). You can use `req.readableEnded` to detect this case. + * @since v25.1.0 + * @default false + */ + optimizeEmptyRequests?: boolean | undefined; + } + type RequestListener< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse> = typeof ServerResponse, + > = (request: InstanceType, response: InstanceType & { req: InstanceType }) => void; + interface ServerEventMap< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse> = typeof ServerResponse, + > extends net.ServerEventMap { + "checkContinue": Parameters>; + "checkExpectation": Parameters>; + "clientError": [exception: Error, socket: stream.Duplex]; + "connect": [request: InstanceType, socket: stream.Duplex, head: NonSharedBuffer]; + "connection": [socket: net.Socket]; + "dropRequest": [request: InstanceType, socket: stream.Duplex]; + "request": Parameters>; + "upgrade": [req: InstanceType, stream: stream.Duplex, head: NonSharedBuffer]; + } + /** + * @since v0.1.17 + */ + class Server< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse> = typeof ServerResponse, + > extends net.Server { + constructor(requestListener?: RequestListener); + constructor(options: ServerOptions, requestListener?: RequestListener); + /** + * Sets the timeout value for sockets, and emits a `'timeout'` event on + * the Server object, passing the socket as an argument, if a timeout + * occurs. + * + * If there is a `'timeout'` event listener on the Server object, then it + * will be called with the timed-out socket as an argument. + * + * By default, the Server does not timeout sockets. However, if a callback + * is assigned to the Server's `'timeout'` event, timeouts must be handled + * explicitly. + * @since v0.9.12 + * @param [msecs=0 (no timeout)] + */ + setTimeout(msecs?: number, callback?: (socket: net.Socket) => void): this; + setTimeout(callback: (socket: net.Socket) => void): this; + /** + * Limits maximum incoming headers count. If set to 0, no limit will be applied. + * @since v0.7.0 + */ + maxHeadersCount: number | null; + /** + * The maximum number of requests socket can handle + * before closing keep alive connection. + * + * A value of `0` will disable the limit. + * + * When the limit is reached it will set the `Connection` header value to `close`, + * but will not actually close the connection, subsequent requests sent + * after the limit is reached will get `503 Service Unavailable` as a response. + * @since v16.10.0 + */ + maxRequestsPerSocket: number | null; + /** + * The number of milliseconds of inactivity before a socket is presumed + * to have timed out. + * + * A value of `0` will disable the timeout behavior on incoming connections. + * + * The socket timeout logic is set up on connection, so changing this + * value only affects new connections to the server, not any existing connections. + * @since v0.9.12 + */ + timeout: number; + /** + * Limit the amount of time the parser will wait to receive the complete HTTP + * headers. + * + * If the timeout expires, the server responds with status 408 without + * forwarding the request to the request listener and then closes the connection. + * + * It must be set to a non-zero value (e.g. 120 seconds) to protect against + * potential Denial-of-Service attacks in case the server is deployed without a + * reverse proxy in front. + * @since v11.3.0, v10.14.0 + */ + headersTimeout: number; + /** + * The number of milliseconds of inactivity a server needs to wait for additional + * incoming data, after it has finished writing the last response, before a socket + * will be destroyed. + * + * This timeout value is combined with the + * `server.keepAliveTimeoutBuffer` option to determine the actual socket + * timeout, calculated as: + * socketTimeout = keepAliveTimeout + keepAliveTimeoutBuffer + * If the server receives new data before the keep-alive timeout has fired, it + * will reset the regular inactivity timeout, i.e., `server.timeout`. + * + * A value of `0` will disable the keep-alive timeout behavior on incoming + * connections. + * A value of `0` makes the HTTP server behave similarly to Node.js versions prior + * to 8.0.0, which did not have a keep-alive timeout. + * + * The socket timeout logic is set up on connection, so changing this value only + * affects new connections to the server, not any existing connections. + * @since v8.0.0 + */ + keepAliveTimeout: number; + /** + * An additional buffer time added to the + * `server.keepAliveTimeout` to extend the internal socket timeout. + * + * This buffer helps reduce connection reset (`ECONNRESET`) errors by increasing + * the socket timeout slightly beyond the advertised keep-alive timeout. + * + * This option applies only to new incoming connections. + * @since v24.6.0 + * @default 1000 + */ + keepAliveTimeoutBuffer: number; + /** + * Sets the timeout value in milliseconds for receiving the entire request from + * the client. + * + * If the timeout expires, the server responds with status 408 without + * forwarding the request to the request listener and then closes the connection. + * + * It must be set to a non-zero value (e.g. 120 seconds) to protect against + * potential Denial-of-Service attacks in case the server is deployed without a + * reverse proxy in front. + * @since v14.11.0 + */ + requestTimeout: number; + /** + * Closes all connections connected to this server. + * @since v18.2.0 + */ + closeAllConnections(): void; + /** + * Closes all connections connected to this server which are not sending a request + * or waiting for a response. + * @since v18.2.0 + */ + closeIdleConnections(): void; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: ServerEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: ServerEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners( + eventName: E, + ): ((...args: ServerEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): ((...args: ServerEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface OutgoingMessageEventMap extends stream.WritableEventMap { + "prefinish": []; + } + /** + * This class serves as the parent class of {@link ClientRequest} and {@link ServerResponse}. It is an abstract outgoing message from + * the perspective of the participants of an HTTP transaction. + * @since v0.1.17 + */ + class OutgoingMessage extends stream.Writable { + constructor(); + readonly req: Request; + chunkedEncoding: boolean; + shouldKeepAlive: boolean; + useChunkedEncodingByDefault: boolean; + sendDate: boolean; + /** + * @deprecated Use `writableEnded` instead. + */ + finished: boolean; + /** + * Read-only. `true` if the headers were sent, otherwise `false`. + * @since v0.9.3 + */ + readonly headersSent: boolean; + /** + * Alias of `outgoingMessage.socket`. + * @since v0.3.0 + * @deprecated Since v15.12.0,v14.17.1 - Use `socket` instead. + */ + readonly connection: net.Socket | null; + /** + * Reference to the underlying socket. Usually, users will not want to access + * this property. + * + * After calling `outgoingMessage.end()`, this property will be nulled. + * @since v0.3.0 + */ + readonly socket: net.Socket | null; + /** + * Once a socket is associated with the message and is connected, `socket.setTimeout()` will be called with `msecs` as the first parameter. + * @since v0.9.12 + * @param callback Optional function to be called when a timeout occurs. Same as binding to the `timeout` event. + */ + setTimeout(msecs: number, callback?: () => void): this; + /** + * Sets a single header value. If the header already exists in the to-be-sent + * headers, its value will be replaced. Use an array of strings to send multiple + * headers with the same name. + * @since v0.4.0 + * @param name Header name + * @param value Header value + */ + setHeader(name: string, value: number | string | readonly string[]): this; + /** + * Sets multiple header values for implicit headers. headers must be an instance of + * `Headers` or `Map`, if a header already exists in the to-be-sent headers, its + * value will be replaced. + * + * ```js + * const headers = new Headers({ foo: 'bar' }); + * outgoingMessage.setHeaders(headers); + * ``` + * + * or + * + * ```js + * const headers = new Map([['foo', 'bar']]); + * outgoingMessage.setHeaders(headers); + * ``` + * + * When headers have been set with `outgoingMessage.setHeaders()`, they will be + * merged with any headers passed to `response.writeHead()`, with the headers passed + * to `response.writeHead()` given precedence. + * + * ```js + * // Returns content-type = text/plain + * const server = http.createServer((req, res) => { + * const headers = new Headers({ 'Content-Type': 'text/html' }); + * res.setHeaders(headers); + * res.writeHead(200, { 'Content-Type': 'text/plain' }); + * res.end('ok'); + * }); + * ``` + * + * @since v19.6.0, v18.15.0 + * @param name Header name + * @param value Header value + */ + setHeaders(headers: Headers | Map): this; + /** + * Append a single header value to the header object. + * + * If the value is an array, this is equivalent to calling this method multiple + * times. + * + * If there were no previous values for the header, this is equivalent to calling `outgoingMessage.setHeader(name, value)`. + * + * Depending of the value of `options.uniqueHeaders` when the client request or the + * server were created, this will end up in the header being sent multiple times or + * a single time with values joined using `; `. + * @since v18.3.0, v16.17.0 + * @param name Header name + * @param value Header value + */ + appendHeader(name: string, value: string | readonly string[]): this; + /** + * Gets the value of the HTTP header with the given name. If that header is not + * set, the returned value will be `undefined`. + * @since v0.4.0 + * @param name Name of header + */ + getHeader(name: string): number | string | string[] | undefined; + /** + * Returns a shallow copy of the current outgoing headers. Since a shallow + * copy is used, array values may be mutated without additional calls to + * various header-related HTTP module methods. The keys of the returned + * object are the header names and the values are the respective header + * values. All header names are lowercase. + * + * The object returned by the `outgoingMessage.getHeaders()` method does + * not prototypically inherit from the JavaScript `Object`. This means that + * typical `Object` methods such as `obj.toString()`, `obj.hasOwnProperty()`, + * and others are not defined and will not work. + * + * ```js + * outgoingMessage.setHeader('Foo', 'bar'); + * outgoingMessage.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); + * + * const headers = outgoingMessage.getHeaders(); + * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] } + * ``` + * @since v7.7.0 + */ + getHeaders(): OutgoingHttpHeaders; + /** + * Returns an array containing the unique names of the current outgoing headers. + * All names are lowercase. + * @since v7.7.0 + */ + getHeaderNames(): string[]; + /** + * Returns `true` if the header identified by `name` is currently set in the + * outgoing headers. The header name is case-insensitive. + * + * ```js + * const hasContentType = outgoingMessage.hasHeader('content-type'); + * ``` + * @since v7.7.0 + */ + hasHeader(name: string): boolean; + /** + * Removes a header that is queued for implicit sending. + * + * ```js + * outgoingMessage.removeHeader('Content-Encoding'); + * ``` + * @since v0.4.0 + * @param name Header name + */ + removeHeader(name: string): void; + /** + * Adds HTTP trailers (headers but at the end of the message) to the message. + * + * Trailers will **only** be emitted if the message is chunked encoded. If not, + * the trailers will be silently discarded. + * + * HTTP requires the `Trailer` header to be sent to emit trailers, + * with a list of header field names in its value, e.g. + * + * ```js + * message.writeHead(200, { 'Content-Type': 'text/plain', + * 'Trailer': 'Content-MD5' }); + * message.write(fileData); + * message.addTrailers({ 'Content-MD5': '7895bf4b8828b55ceaf47747b4bca667' }); + * message.end(); + * ``` + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `TypeError` being thrown. + * @since v0.3.0 + */ + addTrailers(headers: OutgoingHttpHeaders | ReadonlyArray<[string, string]>): void; + /** + * Flushes the message headers. + * + * For efficiency reason, Node.js normally buffers the message headers + * until `outgoingMessage.end()` is called or the first chunk of message data + * is written. It then tries to pack the headers and data into a single TCP + * packet. + * + * It is usually desired (it saves a TCP round-trip), but not when the first + * data is not sent until possibly much later. `outgoingMessage.flushHeaders()` bypasses the optimization and kickstarts the message. + * @since v1.6.0 + */ + flushHeaders(): void; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: OutgoingMessageEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: OutgoingMessageEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: OutgoingMessageEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners( + eventName: E, + ): ((...args: OutgoingMessageEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: OutgoingMessageEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: OutgoingMessageEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: OutgoingMessageEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: OutgoingMessageEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: OutgoingMessageEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): ((...args: OutgoingMessageEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: OutgoingMessageEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + /** + * This object is created internally by an HTTP server, not by the user. It is + * passed as the second parameter to the `'request'` event. + * @since v0.1.17 + */ + class ServerResponse extends OutgoingMessage { + /** + * When using implicit headers (not calling `response.writeHead()` explicitly), + * this property controls the status code that will be sent to the client when + * the headers get flushed. + * + * ```js + * response.statusCode = 404; + * ``` + * + * After response header was sent to the client, this property indicates the + * status code which was sent out. + * @since v0.4.0 + */ + statusCode: number; + /** + * When using implicit headers (not calling `response.writeHead()` explicitly), + * this property controls the status message that will be sent to the client when + * the headers get flushed. If this is left as `undefined` then the standard + * message for the status code will be used. + * + * ```js + * response.statusMessage = 'Not found'; + * ``` + * + * After response header was sent to the client, this property indicates the + * status message which was sent out. + * @since v0.11.8 + */ + statusMessage: string; + /** + * If set to `true`, Node.js will check whether the `Content-Length` header value and the size of the body, in bytes, are equal. + * Mismatching the `Content-Length` header value will result + * in an `Error` being thrown, identified by `code:``'ERR_HTTP_CONTENT_LENGTH_MISMATCH'`. + * @since v18.10.0, v16.18.0 + */ + strictContentLength: boolean; + constructor(req: Request); + assignSocket(socket: net.Socket): void; + detachSocket(socket: net.Socket): void; + /** + * Sends an HTTP/1.1 100 Continue message to the client, indicating that + * the request body should be sent. See the `'checkContinue'` event on `Server`. + * @since v0.3.0 + */ + writeContinue(callback?: () => void): void; + /** + * Sends an HTTP/1.1 103 Early Hints message to the client with a Link header, + * indicating that the user agent can preload/preconnect the linked resources. + * The `hints` is an object containing the values of headers to be sent with + * early hints message. The optional `callback` argument will be called when + * the response message has been written. + * + * **Example** + * + * ```js + * const earlyHintsLink = '; rel=preload; as=style'; + * response.writeEarlyHints({ + * 'link': earlyHintsLink, + * }); + * + * const earlyHintsLinks = [ + * '; rel=preload; as=style', + * '; rel=preload; as=script', + * ]; + * response.writeEarlyHints({ + * 'link': earlyHintsLinks, + * 'x-trace-id': 'id for diagnostics', + * }); + * + * const earlyHintsCallback = () => console.log('early hints message sent'); + * response.writeEarlyHints({ + * 'link': earlyHintsLinks, + * }, earlyHintsCallback); + * ``` + * @since v18.11.0 + * @param hints An object containing the values of headers + * @param callback Will be called when the response message has been written + */ + writeEarlyHints(hints: Record, callback?: () => void): void; + /** + * Sends a response header to the request. The status code is a 3-digit HTTP + * status code, like `404`. The last argument, `headers`, are the response headers. + * Optionally one can give a human-readable `statusMessage` as the second + * argument. + * + * `headers` may be an `Array` where the keys and values are in the same list. + * It is _not_ a list of tuples. So, the even-numbered offsets are key values, + * and the odd-numbered offsets are the associated values. The array is in the same + * format as `request.rawHeaders`. + * + * Returns a reference to the `ServerResponse`, so that calls can be chained. + * + * ```js + * const body = 'hello world'; + * response + * .writeHead(200, { + * 'Content-Length': Buffer.byteLength(body), + * 'Content-Type': 'text/plain', + * }) + * .end(body); + * ``` + * + * This method must only be called once on a message and it must + * be called before `response.end()` is called. + * + * If `response.write()` or `response.end()` are called before calling + * this, the implicit/mutable headers will be calculated and call this function. + * + * When headers have been set with `response.setHeader()`, they will be merged + * with any headers passed to `response.writeHead()`, with the headers passed + * to `response.writeHead()` given precedence. + * + * If this method is called and `response.setHeader()` has not been called, + * it will directly write the supplied header values onto the network channel + * without caching internally, and the `response.getHeader()` on the header + * will not yield the expected result. If progressive population of headers is + * desired with potential future retrieval and modification, use `response.setHeader()` instead. + * + * ```js + * // Returns content-type = text/plain + * const server = http.createServer((req, res) => { + * res.setHeader('Content-Type', 'text/html'); + * res.setHeader('X-Foo', 'bar'); + * res.writeHead(200, { 'Content-Type': 'text/plain' }); + * res.end('ok'); + * }); + * ``` + * + * `Content-Length` is read in bytes, not characters. Use `Buffer.byteLength()` to determine the length of the body in bytes. Node.js + * will check whether `Content-Length` and the length of the body which has + * been transmitted are equal or not. + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `Error` being thrown. + * @since v0.1.30 + */ + writeHead( + statusCode: number, + statusMessage?: string, + headers?: OutgoingHttpHeaders | OutgoingHttpHeader[], + ): this; + writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this; + /** + * Sends an arbitrary HTTP/1.1 1xx informational response to the client. This + * is a generic equivalent of `response.writeContinue()`, + * `response.writeProcessing()` and `response.writeEarlyHints()`, and + * can be called multiple times before the final response. After the final + * response headers have been sent (via `response.writeHead()` or an + * implicit header), calling this method throws `ERR_HTTP_HEADERS_SENT`. + * + * Clients receive these responses via the [`'information'`](https://nodejs.org/docs/latest-v26.x/api/http.html#event-information) + * event on `http.ClientRequest`. + * + * ```js + * response.writeInformation(110, { 'X-Progress': '50%' }); + * ``` + * @since v26.2.0 + * @param statusCode An HTTP 1xx informational status code, between `100` + * and `199` inclusive, excluding `101` (Switching Protocols) which is only + * available through the [`'upgrade'`](https://nodejs.org/docs/latest-v26.x/api/http.html#event-upgrade) event. + * @param headers An optional set of headers to send with the + * informational response. Accepts the same shapes as + * `response.writeHead()`. + * @param callback Optional, called once the message has been written + * to the socket. + */ + writeInformation( + statusCode: number, + headers?: OutgoingHttpHeaders | readonly string[], + callback?: () => void, + ): void; + writeInformation(statusCode: number, callback: () => void): void; + /** + * Sends a HTTP/1.1 102 Processing message to the client, indicating that + * the request body should be sent. + * @since v10.0.0 + */ + writeProcessing(callback?: () => void): void; + } + interface InformationEvent { + httpVersion: string; + httpVersionMajor: number; + httpVersionMinor: number; + statusCode: number; + statusMessage: string; + headers: IncomingHttpHeaders; + rawHeaders: string[]; + } + interface ClientRequestEventMap extends stream.WritableEventMap { + /** @deprecated Listen for the `'close'` event instead. */ + "abort": []; + "connect": [response: IncomingMessage, socket: net.Socket, head: NonSharedBuffer]; + "continue": []; + "information": [info: InformationEvent]; + "response": [response: IncomingMessage]; + "socket": [socket: net.Socket]; + "timeout": []; + "upgrade": [response: IncomingMessage, stream: net.Socket, head: NonSharedBuffer]; + } + /** + * This object is created internally and returned from {@link request}. It + * represents an _in-progress_ request whose header has already been queued. The + * header is still mutable using the `setHeader(name, value)`, `getHeader(name)`, `removeHeader(name)` API. The actual header will + * be sent along with the first data chunk or when calling `request.end()`. + * + * To get the response, add a listener for `'response'` to the request object. `'response'` will be emitted from the request object when the response + * headers have been received. The `'response'` event is executed with one + * argument which is an instance of {@link IncomingMessage}. + * + * During the `'response'` event, one can add listeners to the + * response object; particularly to listen for the `'data'` event. + * + * If no `'response'` handler is added, then the response will be + * entirely discarded. However, if a `'response'` event handler is added, + * then the data from the response object **must** be consumed, either by + * calling `response.read()` whenever there is a `'readable'` event, or + * by adding a `'data'` handler, or by calling the `.resume()` method. + * Until the data is consumed, the `'end'` event will not fire. Also, until + * the data is read it will consume memory that can eventually lead to a + * 'process out of memory' error. + * + * For backward compatibility, `res` will only emit `'error'` if there is an `'error'` listener registered. + * + * Set `Content-Length` header to limit the response body size. + * If `response.strictContentLength` is set to `true`, mismatching the `Content-Length` header value will result in an `Error` being thrown, + * identified by `code:``'ERR_HTTP_CONTENT_LENGTH_MISMATCH'`. + * + * `Content-Length` value should be in bytes, not characters. Use `Buffer.byteLength()` to determine the length of the body in bytes. + * @since v0.1.17 + */ + class ClientRequest extends OutgoingMessage { + /** + * The `request.aborted` property will be `true` if the request has + * been aborted. + * @since v0.11.14 + * @deprecated Since v17.0.0, v16.12.0 - Check `destroyed` instead. + */ + aborted: boolean; + /** + * The request host. + * @since v14.5.0, v12.19.0 + */ + host: string; + /** + * The request protocol. + * @since v14.5.0, v12.19.0 + */ + protocol: string; + /** + * When sending request through a keep-alive enabled agent, the underlying socket + * might be reused. But if server closes connection at unfortunate time, client + * may run into a 'ECONNRESET' error. + * + * ```js + * import http from 'node:http'; + * const agent = new http.Agent({ keepAlive: true }); + * + * // Server has a 5 seconds keep-alive timeout by default + * http + * .createServer((req, res) => { + * res.write('hello\n'); + * res.end(); + * }) + * .listen(3000); + * + * setInterval(() => { + * // Adapting a keep-alive agent + * http.get('http://localhost:3000', { agent }, (res) => { + * res.on('data', (data) => { + * // Do nothing + * }); + * }); + * }, 5000); // Sending request on 5s interval so it's easy to hit idle timeout + * ``` + * + * By marking a request whether it reused socket or not, we can do + * automatic error retry base on it. + * + * ```js + * import http from 'node:http'; + * const agent = new http.Agent({ keepAlive: true }); + * + * function retriableRequest() { + * const req = http + * .get('http://localhost:3000', { agent }, (res) => { + * // ... + * }) + * .on('error', (err) => { + * // Check if retry is needed + * if (req.reusedSocket && err.code === 'ECONNRESET') { + * retriableRequest(); + * } + * }); + * } + * + * retriableRequest(); + * ``` + * @since v13.0.0, v12.16.0 + */ + reusedSocket: boolean; + /** + * Limits maximum response headers count. If set to 0, no limit will be applied. + */ + maxHeadersCount: number; + constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void); + /** + * The request method. + * @since v0.1.97 + */ + method: string; + /** + * The request path. + * @since v0.4.0 + */ + path: string; + /** + * Marks the request as aborting. Calling this will cause remaining data + * in the response to be dropped and the socket to be destroyed. + * @since v0.3.8 + * @deprecated Since v14.1.0,v13.14.0 - Use `destroy` instead. + */ + abort(): void; + onSocket(socket: net.Socket): void; + /** + * Once a socket is assigned to this request and is connected `socket.setTimeout()` will be called. + * @since v0.5.9 + * @param timeout Milliseconds before a request times out. + * @param callback Optional function to be called when a timeout occurs. Same as binding to the `'timeout'` event. + */ + setTimeout(timeout: number, callback?: () => void): this; + /** + * Once a socket is assigned to this request and is connected `socket.setNoDelay()` will be called. + * @since v0.5.9 + */ + setNoDelay(noDelay?: boolean): void; + /** + * Once a socket is assigned to this request and is connected `socket.setKeepAlive()` will be called. + * @since v0.5.9 + */ + setSocketKeepAlive(enable?: boolean, initialDelay?: number): void; + /** + * Returns an array containing the unique names of the current outgoing raw + * headers. Header names are returned with their exact casing being set. + * + * ```js + * request.setHeader('Foo', 'bar'); + * request.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); + * + * const headerNames = request.getRawHeaderNames(); + * // headerNames === ['Foo', 'Set-Cookie'] + * ``` + * @since v15.13.0, v14.17.0 + */ + getRawHeaderNames(): string[]; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: ClientRequestEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: ClientRequestEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: ClientRequestEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: ClientRequestEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: ClientRequestEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: ClientRequestEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: ClientRequestEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: ClientRequestEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: ClientRequestEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): ((...args: ClientRequestEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: ClientRequestEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface IncomingMessageEventMap extends stream.ReadableEventMap { + /** @deprecated Listen for `'close'` event instead. */ + "aborted": []; + } + /** + * An `IncomingMessage` object is created by {@link Server} or {@link ClientRequest} and passed as the first argument to the `'request'` and `'response'` event respectively. It may be used to + * access response + * status, headers, and data. + * + * Different from its `socket` value which is a subclass of `stream.Duplex`, the `IncomingMessage` itself extends `stream.Readable` and is created separately to + * parse and emit the incoming HTTP headers and payload, as the underlying socket + * may be reused multiple times in case of keep-alive. + * @since v0.1.17 + */ + class IncomingMessage extends stream.Readable { + constructor(socket: net.Socket); + /** + * The `message.aborted` property will be `true` if the request has + * been aborted. + * @since v10.1.0 + * @deprecated Since v17.0.0,v16.12.0 - Check `message.destroyed` from stream.Readable. + */ + aborted: boolean; + /** + * In case of server request, the HTTP version sent by the client. In the case of + * client response, the HTTP version of the connected-to server. + * Probably either `'1.1'` or `'1.0'`. + * + * Also `message.httpVersionMajor` is the first integer and `message.httpVersionMinor` is the second. + * @since v0.1.1 + */ + httpVersion: string; + httpVersionMajor: number; + httpVersionMinor: number; + /** + * The `message.complete` property will be `true` if a complete HTTP message has + * been received and successfully parsed. + * + * This property is particularly useful as a means of determining if a client or + * server fully transmitted a message before a connection was terminated: + * + * ```js + * const req = http.request({ + * host: '127.0.0.1', + * port: 8080, + * method: 'POST', + * }, (res) => { + * res.resume(); + * res.on('end', () => { + * if (!res.complete) + * console.error( + * 'The connection was terminated while the message was still being sent'); + * }); + * }); + * ``` + * @since v0.3.0 + */ + complete: boolean; + /** + * Alias for `message.socket`. + * @since v0.1.90 + * @deprecated Since v16.0.0 - Use `socket`. + */ + connection: net.Socket; + /** + * The `net.Socket` object associated with the connection. + * + * With HTTPS support, use `request.socket.getPeerCertificate()` to obtain the + * client's authentication details. + * + * This property is guaranteed to be an instance of the `net.Socket` class, + * a subclass of `stream.Duplex`, unless the user specified a socket + * type other than `net.Socket` or internally nulled. + * @since v0.3.0 + */ + socket: net.Socket; + /** + * The request/response headers object. + * + * Key-value pairs of header names and values. Header names are lower-cased. + * + * ```js + * // Prints something like: + * // + * // { 'user-agent': 'curl/7.22.0', + * // host: '127.0.0.1:8000', + * // accept: '*' } + * console.log(request.headers); + * ``` + * + * Duplicates in raw headers are handled in the following ways, depending on the + * header name: + * + * * Duplicates of `age`, `authorization`, `content-length`, `content-type`, `etag`, `expires`, `from`, `host`, `if-modified-since`, `if-unmodified-since`, `last-modified`, `location`, + * `max-forwards`, `proxy-authorization`, `referer`, `retry-after`, `server`, or `user-agent` are discarded. + * To allow duplicate values of the headers listed above to be joined, + * use the option `joinDuplicateHeaders` in {@link request} and {@link createServer}. See RFC 9110 Section 5.3 for more + * information. + * * `set-cookie` is always an array. Duplicates are added to the array. + * * For duplicate `cookie` headers, the values are joined together with `; `. + * * For all other headers, the values are joined together with `, `. + * @since v0.1.5 + */ + headers: IncomingHttpHeaders; + /** + * Similar to `message.headers`, but there is no join logic and the values are + * always arrays of strings, even for headers received just once. + * + * ```js + * // Prints something like: + * // + * // { 'user-agent': ['curl/7.22.0'], + * // host: ['127.0.0.1:8000'], + * // accept: ['*'] } + * console.log(request.headersDistinct); + * ``` + * @since v18.3.0, v16.17.0 + */ + headersDistinct: NodeJS.Dict; + /** + * The raw request/response headers list exactly as they were received. + * + * The keys and values are in the same list. It is _not_ a + * list of tuples. So, the even-numbered offsets are key values, and the + * odd-numbered offsets are the associated values. + * + * Header names are not lowercased, and duplicates are not merged. + * + * ```js + * // Prints something like: + * // + * // [ 'user-agent', + * // 'this is invalid because there can be only one', + * // 'User-Agent', + * // 'curl/7.22.0', + * // 'Host', + * // '127.0.0.1:8000', + * // 'ACCEPT', + * // '*' ] + * console.log(request.rawHeaders); + * ``` + * @since v0.11.6 + */ + rawHeaders: string[]; + /** + * The request/response trailers object. Only populated at the `'end'` event. + * @since v0.3.0 + */ + trailers: NodeJS.Dict; + /** + * Similar to `message.trailers`, but there is no join logic and the values are + * always arrays of strings, even for headers received just once. + * Only populated at the `'end'` event. + * @since v18.3.0, v16.17.0 + */ + trailersDistinct: NodeJS.Dict; + /** + * The raw request/response trailer keys and values exactly as they were + * received. Only populated at the `'end'` event. + * @since v0.11.6 + */ + rawTrailers: string[]; + /** + * Calls `message.socket.setTimeout(msecs, callback)`. + * @since v0.5.9 + */ + setTimeout(msecs: number, callback?: () => void): this; + /** + * An `AbortSignal` that is aborted when the underlying socket closes or the + * request is destroyed. The signal is created lazily on first access — no + * `AbortController` is allocated for requests that never use this property. + * + * This is useful for cancelling downstream asynchronous work such as database + * queries or `fetch` calls when a client disconnects mid-request. + * + * ```js + * import http from 'node:http'; + * + * http.createServer(async (req, res) => { + * try { + * const data = await fetch('https://example.com/api', { signal: req.signal }); + * res.end(JSON.stringify(await data.json())); + * } catch (err) { + * if (err.name === 'AbortError') return; + * res.statusCode = 500; + * res.end('Internal Server Error'); + * } + * }).listen(3000); + * ``` + * @since v26.1.0 + */ + readonly signal: AbortSignal; + /** + * **Only valid for request obtained from {@link Server}.** + * + * The request method as a string. Read only. Examples: `'GET'`, `'DELETE'`. + * @since v0.1.1 + */ + method?: string | undefined; + /** + * **Only valid for request obtained from {@link Server}.** + * + * Request URL string. This contains only the URL that is present in the actual + * HTTP request. Take the following request: + * + * ```http + * GET /status?name=ryan HTTP/1.1 + * Accept: text/plain + * ``` + * + * To parse the URL into its parts: + * + * ```js + * new URL(`http://${process.env.HOST ?? 'localhost'}${request.url}`); + * ``` + * + * When `request.url` is `'/status?name=ryan'` and `process.env.HOST` is undefined: + * + * ```console + * $ node + * > new URL(`http://${process.env.HOST ?? 'localhost'}${request.url}`); + * URL { + * href: 'http://localhost/status?name=ryan', + * origin: 'http://localhost', + * protocol: 'http:', + * username: '', + * password: '', + * host: 'localhost', + * hostname: 'localhost', + * port: '', + * pathname: '/status', + * search: '?name=ryan', + * searchParams: URLSearchParams { 'name' => 'ryan' }, + * hash: '' + * } + * ``` + * + * Ensure that you set `process.env.HOST` to the server's host name, or consider replacing this part entirely. If using `req.headers.host`, ensure proper + * validation is used, as clients may specify a custom `Host` header. + * @since v0.1.90 + */ + url?: string | undefined; + /** + * **Only valid for response obtained from {@link ClientRequest}.** + * + * The 3-digit HTTP response status code. E.G. `404`. + * @since v0.1.1 + */ + statusCode?: number | undefined; + /** + * **Only valid for response obtained from {@link ClientRequest}.** + * + * The HTTP response status message (reason phrase). E.G. `OK` or `Internal Server Error`. + * @since v0.11.10 + */ + statusMessage?: string | undefined; + /** + * Calls `destroy()` on the socket that received the `IncomingMessage`. If `error` is provided, an `'error'` event is emitted on the socket and `error` is passed + * as an argument to any listeners on the event. + * @since v0.3.0 + */ + destroy(error?: Error): this; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: IncomingMessageEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: IncomingMessageEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: IncomingMessageEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners( + eventName: E, + ): ((...args: IncomingMessageEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: IncomingMessageEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: IncomingMessageEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: IncomingMessageEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: IncomingMessageEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: IncomingMessageEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): ((...args: IncomingMessageEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: IncomingMessageEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface ProxyEnv extends NodeJS.ProcessEnv { + HTTP_PROXY?: string | undefined; + HTTPS_PROXY?: string | undefined; + NO_PROXY?: string | undefined; + http_proxy?: string | undefined; + https_proxy?: string | undefined; + no_proxy?: string | undefined; + } + interface AgentOptions extends NodeJS.PartialOptions { + /** + * Keep sockets around in a pool to be used by other requests in the future. Default = false + */ + keepAlive?: boolean | undefined; + /** + * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. + * Only relevant if keepAlive is set to true. + */ + keepAliveMsecs?: number | undefined; + /** + * Milliseconds to subtract from + * the server-provided `keep-alive: timeout=...` hint when determining socket + * expiration time. This buffer helps ensure the agent closes the socket + * slightly before the server does, reducing the chance of sending a request + * on a socket that’s about to be closed by the server. + * @since v24.7.0 + * @default 1000 + */ + agentKeepAliveTimeoutBuffer?: number | undefined; + /** + * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity + */ + maxSockets?: number | undefined; + /** + * Maximum number of sockets allowed for all hosts in total. Each request will use a new socket until the maximum is reached. Default: Infinity. + */ + maxTotalSockets?: number | undefined; + /** + * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256. + */ + maxFreeSockets?: number | undefined; + /** + * Socket timeout in milliseconds. This will set the timeout after the socket is connected. + */ + timeout?: number | undefined; + /** + * Scheduling strategy to apply when picking the next free socket to use. + * @default `lifo` + */ + scheduling?: "fifo" | "lifo" | undefined; + /** + * Environment variables for proxy configuration. See + * [Built-in Proxy Support](https://nodejs.org/docs/latest-v26.x/api/http.html#built-in-proxy-support) for details. + * @since v24.5.0 + */ + proxyEnv?: ProxyEnv | undefined; + /** + * Default port to use when the port is not specified in requests. + * @since v24.5.0 + */ + defaultPort?: number | undefined; + /** + * The protocol to use for the agent. + * @since v24.5.0 + */ + protocol?: string | undefined; + } + /** + * An `Agent` is responsible for managing connection persistence + * and reuse for HTTP clients. It maintains a queue of pending requests + * for a given host and port, reusing a single socket connection for each + * until the queue is empty, at which time the socket is either destroyed + * or put into a pool where it is kept to be used again for requests to the + * same host and port. Whether it is destroyed or pooled depends on the `keepAlive` `option`. + * + * Pooled connections have TCP Keep-Alive enabled for them, but servers may + * still close idle connections, in which case they will be removed from the + * pool and a new connection will be made when a new HTTP request is made for + * that host and port. Servers may also refuse to allow multiple requests + * over the same connection, in which case the connection will have to be + * remade for every request and cannot be pooled. The `Agent` will still make + * the requests to that server, but each one will occur over a new connection. + * + * When a connection is closed by the client or the server, it is removed + * from the pool. Any unused sockets in the pool will be unrefed so as not + * to keep the Node.js process running when there are no outstanding requests. + * (see `socket.unref()`). + * + * It is good practice, to `destroy()` an `Agent` instance when it is no + * longer in use, because unused sockets consume OS resources. + * + * Sockets are removed from an agent when the socket emits either + * a `'close'` event or an `'agentRemove'` event. When intending to keep one + * HTTP request open for a long time without keeping it in the agent, something + * like the following may be done: + * + * ```js + * http.get(options, (res) => { + * // Do stuff + * }).on('socket', (socket) => { + * socket.emit('agentRemove'); + * }); + * ``` + * + * An agent may also be used for an individual request. By providing `{agent: false}` as an option to the `http.get()` or `http.request()` functions, a one-time use `Agent` with default options + * will be used + * for the client connection. + * + * `agent:false`: + * + * ```js + * http.get({ + * hostname: 'localhost', + * port: 80, + * path: '/', + * agent: false, // Create a new agent just for this one request + * }, (res) => { + * // Do stuff with response + * }); + * ``` + * + * `options` in [`socket.connect()`](https://nodejs.org/docs/latest-v26.x/api/net.html#socketconnectoptions-connectlistener) are also supported. + * + * To configure any of them, a custom {@link Agent} instance must be created. + * + * ```js + * import http from 'node:http'; + * const keepAliveAgent = new http.Agent({ keepAlive: true }); + * options.agent = keepAliveAgent; + * http.request(options, onResponseCallback) + * ``` + * @since v0.3.4 + */ + class Agent extends EventEmitter { + /** + * By default set to 256. For agents with `keepAlive` enabled, this + * sets the maximum number of sockets that will be left open in the free + * state. + * @since v0.11.7 + */ + maxFreeSockets: number; + /** + * By default set to `Infinity`. Determines how many concurrent sockets the agent + * can have open per origin. Origin is the returned value of `agent.getName()`. + * @since v0.3.6 + */ + maxSockets: number; + /** + * By default set to `Infinity`. Determines how many concurrent sockets the agent + * can have open. Unlike `maxSockets`, this parameter applies across all origins. + * @since v14.5.0, v12.19.0 + */ + maxTotalSockets: number; + /** + * An object which contains arrays of sockets currently awaiting use by + * the agent when `keepAlive` is enabled. Do not modify. + * + * Sockets in the `freeSockets` list will be automatically destroyed and + * removed from the array on `'timeout'`. + * @since v0.11.4 + */ + readonly freeSockets: NodeJS.ReadOnlyDict; + /** + * An object which contains arrays of sockets currently in use by the + * agent. Do not modify. + * @since v0.3.6 + */ + readonly sockets: NodeJS.ReadOnlyDict; + /** + * An object which contains queues of requests that have not yet been assigned to + * sockets. Do not modify. + * @since v0.5.9 + */ + readonly requests: NodeJS.ReadOnlyDict; + constructor(opts?: AgentOptions); + /** + * Destroy any sockets that are currently in use by the agent. + * + * It is usually not necessary to do this. However, if using an + * agent with `keepAlive` enabled, then it is best to explicitly shut down + * the agent when it is no longer needed. Otherwise, + * sockets might stay open for quite a long time before the server + * terminates them. + * @since v0.11.4 + */ + destroy(): void; + /** + * Produces a socket/stream to be used for HTTP requests. + * + * By default, this function behaves identically to `net.createConnection()`, + * synchronously returning the created socket. The optional `callback` parameter in the + * signature is **not** used by this default implementation. + * + * However, custom agents may override this method to provide greater flexibility, + * for example, to create sockets asynchronously. When overriding `createConnection`: + * + * 1. **Synchronous socket creation**: The overriding method can return the + * socket/stream directly. + * 2. **Asynchronous socket creation**: The overriding method can accept the `callback` + * and pass the created socket/stream to it (e.g., `callback(null, newSocket)`). + * If an error occurs during socket creation, it should be passed as the first + * argument to the `callback` (e.g., `callback(err)`). + * + * The agent will call the provided `createConnection` function with `options` and + * this internal `callback`. The `callback` provided by the agent has a signature + * of `(err, stream)`. + * @since v0.11.4 + * @param options Options containing connection details. Check + * `net.createConnection` for the format of the options. For custom agents, + * this object is passed to the custom `createConnection` function. + * @param callback (Optional, primarily for custom agents) A function to be + * called by a custom `createConnection` implementation when the socket is + * created, especially for asynchronous operations. + * @returns The created socket. This is returned by the default + * implementation or by a custom synchronous `createConnection` implementation. + * If a custom `createConnection` uses the `callback` for asynchronous + * operation, this return value might not be the primary way to obtain the socket. + */ + createConnection( + options: ClientRequestArgs, + callback?: (err: Error | null, stream: stream.Duplex) => void, + ): stream.Duplex | null | undefined; + /** + * Called when `socket` is detached from a request and could be persisted by the`Agent`. Default behavior is to: + * + * ```js + * socket.setKeepAlive(true, this.keepAliveMsecs); + * socket.unref(); + * return true; + * ``` + * + * This method can be overridden by a particular `Agent` subclass. If this + * method returns a falsy value, the socket will be destroyed instead of persisting + * it for use with the next request. + * + * The `socket` argument can be an instance of `net.Socket`, a subclass of `stream.Duplex`. + * @since v8.1.0 + */ + keepSocketAlive(socket: stream.Duplex): void; + /** + * Called when `socket` is attached to `request` after being persisted because of + * the keep-alive options. Default behavior is to: + * + * ```js + * socket.ref(); + * ``` + * + * This method can be overridden by a particular `Agent` subclass. + * + * The `socket` argument can be an instance of `net.Socket`, a subclass of `stream.Duplex`. + * @since v8.1.0 + */ + reuseSocket(socket: stream.Duplex, request: ClientRequest): void; + /** + * Get a unique name for a set of request options, to determine whether a + * connection can be reused. For an HTTP agent, this returns`host:port:localAddress` or `host:port:localAddress:family`. For an HTTPS agent, + * the name includes the CA, cert, ciphers, and other HTTPS/TLS-specific options + * that determine socket reusability. + * @since v0.11.4 + * @param options A set of options providing information for name generation + */ + getName(options?: ClientRequestArgs): string; + } + const METHODS: string[]; + const STATUS_CODES: { + [errorCode: number]: string | undefined; + [errorCode: string]: string | undefined; + }; + /** + * Returns a new instance of {@link Server}. + * + * The `requestListener` is a function which is automatically + * added to the `'request'` event. + * + * ```js + * import http from 'node:http'; + * + * // Create a local server to receive data from + * const server = http.createServer((req, res) => { + * res.writeHead(200, { 'Content-Type': 'application/json' }); + * res.end(JSON.stringify({ + * data: 'Hello World!', + * })); + * }); + * + * server.listen(8000); + * ``` + * + * ```js + * import http from 'node:http'; + * + * // Create a local server to receive data from + * const server = http.createServer(); + * + * // Listen to the request event + * server.on('request', (request, res) => { + * res.writeHead(200, { 'Content-Type': 'application/json' }); + * res.end(JSON.stringify({ + * data: 'Hello World!', + * })); + * }); + * + * server.listen(8000); + * ``` + * @since v0.1.13 + */ + function createServer< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse> = typeof ServerResponse, + >(requestListener?: RequestListener): Server; + function createServer< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse> = typeof ServerResponse, + >( + options: ServerOptions, + requestListener?: RequestListener, + ): Server; + // although RequestOptions are passed as ClientRequestArgs to ClientRequest directly, + // create interface RequestOptions would make the naming more clear to developers + interface RequestOptions extends ClientRequestArgs {} + /** + * `options` in `socket.connect()` are also supported. + * + * Node.js maintains several connections per server to make HTTP requests. + * This function allows one to transparently issue requests. + * + * `url` can be a string or a `URL` object. If `url` is a + * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. + * + * If both `url` and `options` are specified, the objects are merged, with the `options` properties taking precedence. + * + * The optional `callback` parameter will be added as a one-time listener for + * the `'response'` event. + * + * `http.request()` returns an instance of the {@link ClientRequest} class. The `ClientRequest` instance is a writable stream. If one needs to + * upload a file with a POST request, then write to the `ClientRequest` object. + * + * ```js + * import http from 'node:http'; + * import { Buffer } from 'node:buffer'; + * + * const postData = JSON.stringify({ + * 'msg': 'Hello World!', + * }); + * + * const options = { + * hostname: 'www.google.com', + * port: 80, + * path: '/upload', + * method: 'POST', + * headers: { + * 'Content-Type': 'application/json', + * 'Content-Length': Buffer.byteLength(postData), + * }, + * }; + * + * const req = http.request(options, (res) => { + * console.log(`STATUS: ${res.statusCode}`); + * console.log(`HEADERS: ${JSON.stringify(res.headers)}`); + * res.setEncoding('utf8'); + * res.on('data', (chunk) => { + * console.log(`BODY: ${chunk}`); + * }); + * res.on('end', () => { + * console.log('No more data in response.'); + * }); + * }); + * + * req.on('error', (e) => { + * console.error(`problem with request: ${e.message}`); + * }); + * + * // Write data to request body + * req.write(postData); + * req.end(); + * ``` + * + * In the example `req.end()` was called. With `http.request()` one + * must always call `req.end()` to signify the end of the request - + * even if there is no data being written to the request body. + * + * If any error is encountered during the request (be that with DNS resolution, + * TCP level errors, or actual HTTP parse errors) an `'error'` event is emitted + * on the returned request object. As with all `'error'` events, if no listeners + * are registered the error will be thrown. + * + * There are a few special headers that should be noted. + * + * * Sending a 'Connection: keep-alive' will notify Node.js that the connection to + * the server should be persisted until the next request. + * * Sending a 'Content-Length' header will disable the default chunked encoding. + * * Sending an 'Expect' header will immediately send the request headers. + * Usually, when sending 'Expect: 100-continue', both a timeout and a listener + * for the `'continue'` event should be set. See RFC 2616 Section 8.2.3 for more + * information. + * * Sending an Authorization header will override using the `auth` option + * to compute basic authentication. + * + * Example using a `URL` as `options`: + * + * ```js + * const options = new URL('http://abc:xyz@example.com'); + * + * const req = http.request(options, (res) => { + * // ... + * }); + * ``` + * + * In a successful request, the following events will be emitted in the following + * order: + * + * * `'socket'` + * * `'response'` + * * `'data'` any number of times, on the `res` object + * (`'data'` will not be emitted at all if the response body is empty, for + * instance, in most redirects) + * * `'end'` on the `res` object + * * `'close'` + * + * In the case of a connection error, the following events will be emitted: + * + * * `'socket'` + * * `'error'` + * * `'close'` + * + * In the case of a premature connection close before the response is received, + * the following events will be emitted in the following order: + * + * * `'socket'` + * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'` + * * `'close'` + * + * In the case of a premature connection close after the response is received, + * the following events will be emitted in the following order: + * + * * `'socket'` + * * `'response'` + * * `'data'` any number of times, on the `res` object + * * (connection closed here) + * * `'aborted'` on the `res` object + * * `'close'` + * * `'error'` on the `res` object with an error with message `'Error: aborted'` and code `'ECONNRESET'` + * * `'close'` on the `res` object + * + * If `req.destroy()` is called before a socket is assigned, the following + * events will be emitted in the following order: + * + * * (`req.destroy()` called here) + * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'`, or the error with which `req.destroy()` was called + * * `'close'` + * + * If `req.destroy()` is called before the connection succeeds, the following + * events will be emitted in the following order: + * + * * `'socket'` + * * (`req.destroy()` called here) + * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'`, or the error with which `req.destroy()` was called + * * `'close'` + * + * If `req.destroy()` is called after the response is received, the following + * events will be emitted in the following order: + * + * * `'socket'` + * * `'response'` + * * `'data'` any number of times, on the `res` object + * * (`req.destroy()` called here) + * * `'aborted'` on the `res` object + * * `'close'` + * * `'error'` on the `res` object with an error with message `'Error: aborted'` and code `'ECONNRESET'`, or the error with which `req.destroy()` was called + * * `'close'` on the `res` object + * + * If `req.abort()` is called before a socket is assigned, the following + * events will be emitted in the following order: + * + * * (`req.abort()` called here) + * * `'abort'` + * * `'close'` + * + * If `req.abort()` is called before the connection succeeds, the following + * events will be emitted in the following order: + * + * * `'socket'` + * * (`req.abort()` called here) + * * `'abort'` + * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'` + * * `'close'` + * + * If `req.abort()` is called after the response is received, the following + * events will be emitted in the following order: + * + * * `'socket'` + * * `'response'` + * * `'data'` any number of times, on the `res` object + * * (`req.abort()` called here) + * * `'abort'` + * * `'aborted'` on the `res` object + * * `'error'` on the `res` object with an error with message `'Error: aborted'` and code `'ECONNRESET'`. + * * `'close'` + * * `'close'` on the `res` object + * + * Setting the `timeout` option or using the `setTimeout()` function will + * not abort the request or do anything besides add a `'timeout'` event. + * + * Passing an `AbortSignal` and then calling `abort()` on the corresponding `AbortController` will behave the same way as calling `.destroy()` on the + * request. Specifically, the `'error'` event will be emitted with an error with + * the message `'AbortError: The operation was aborted'`, the code `'ABORT_ERR'` and the `cause`, if one was provided. + * @since v0.3.6 + */ + function request(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; + function request( + url: string | URL, + options: RequestOptions, + callback?: (res: IncomingMessage) => void, + ): ClientRequest; + /** + * Since most requests are GET requests without bodies, Node.js provides this + * convenience method. The only difference between this method and {@link request} is that it sets the method to GET by default and calls `req.end()` automatically. The callback must take care to + * consume the response + * data for reasons stated in {@link ClientRequest} section. + * + * The `callback` is invoked with a single argument that is an instance of {@link IncomingMessage}. + * + * JSON fetching example: + * + * ```js + * http.get('http://localhost:8000/', (res) => { + * const { statusCode } = res; + * const contentType = res.headers['content-type']; + * + * let error; + * // Any 2xx status code signals a successful response but + * // here we're only checking for 200. + * if (statusCode !== 200) { + * error = new Error('Request Failed.\n' + + * `Status Code: ${statusCode}`); + * } else if (!/^application\/json/.test(contentType)) { + * error = new Error('Invalid content-type.\n' + + * `Expected application/json but received ${contentType}`); + * } + * if (error) { + * console.error(error.message); + * // Consume response data to free up memory + * res.resume(); + * return; + * } + * + * res.setEncoding('utf8'); + * let rawData = ''; + * res.on('data', (chunk) => { rawData += chunk; }); + * res.on('end', () => { + * try { + * const parsedData = JSON.parse(rawData); + * console.log(parsedData); + * } catch (e) { + * console.error(e.message); + * } + * }); + * }).on('error', (e) => { + * console.error(`Got error: ${e.message}`); + * }); + * + * // Create a local server to receive data from + * const server = http.createServer((req, res) => { + * res.writeHead(200, { 'Content-Type': 'application/json' }); + * res.end(JSON.stringify({ + * data: 'Hello World!', + * })); + * }); + * + * server.listen(8000); + * ``` + * @since v0.3.6 + * @param options Accepts the same `options` as {@link request}, with the method set to GET by default. + */ + function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; + function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest; + /** + * Performs the low-level validations on the provided `name` that are done when `res.setHeader(name, value)` is called. + * + * Passing illegal value as `name` will result in a `TypeError` being thrown, + * identified by `code: 'ERR_INVALID_HTTP_TOKEN'`. + * + * It is not necessary to use this method before passing headers to an HTTP request + * or response. The HTTP module will automatically validate such headers. + * + * Example: + * + * ```js + * import { validateHeaderName } from 'node:http'; + * + * try { + * validateHeaderName(''); + * } catch (err) { + * console.error(err instanceof TypeError); // --> true + * console.error(err.code); // --> 'ERR_INVALID_HTTP_TOKEN' + * console.error(err.message); // --> 'Header name must be a valid HTTP token [""]' + * } + * ``` + * @since v14.3.0 + * @param [label='Header name'] Label for error message. + */ + function validateHeaderName(name: string): void; + /** + * Performs the low-level validations on the provided `value` that are done when `res.setHeader(name, value)` is called. + * + * Passing illegal value as `value` will result in a `TypeError` being thrown. + * + * * Undefined value error is identified by `code: 'ERR_HTTP_INVALID_HEADER_VALUE'`. + * * Invalid value character error is identified by `code: 'ERR_INVALID_CHAR'`. + * + * It is not necessary to use this method before passing headers to an HTTP request + * or response. The HTTP module will automatically validate such headers. + * + * Examples: + * + * ```js + * import { validateHeaderValue } from 'node:http'; + * + * try { + * validateHeaderValue('x-my-header', undefined); + * } catch (err) { + * console.error(err instanceof TypeError); // --> true + * console.error(err.code === 'ERR_HTTP_INVALID_HEADER_VALUE'); // --> true + * console.error(err.message); // --> 'Invalid value "undefined" for header "x-my-header"' + * } + * + * try { + * validateHeaderValue('x-my-header', 'oʊmɪɡə'); + * } catch (err) { + * console.error(err instanceof TypeError); // --> true + * console.error(err.code === 'ERR_INVALID_CHAR'); // --> true + * console.error(err.message); // --> 'Invalid character in header content ["x-my-header"]' + * } + * ``` + * @since v14.3.0 + * @param name Header name + * @param value Header value + */ + function validateHeaderValue(name: string, value: string): void; + /** + * Set the maximum number of idle HTTP parsers. + * @since v18.8.0, v16.18.0 + * @param [max=1000] + */ + function setMaxIdleHTTPParsers(max: number): void; + /** + * Dynamically resets the global configurations to enable built-in proxy support for + * `fetch()` and `http.request()`/`https.request()` at runtime, as an alternative + * to using the `--use-env-proxy` flag or `NODE_USE_ENV_PROXY` environment variable. + * It can also be used to override settings configured from the environment variables. + * + * As this function resets the global configurations, any previously configured + * `http.globalAgent`, `https.globalAgent` or undici global dispatcher would be + * overridden after this function is invoked. It's recommended to invoke it before any + * requests are made and avoid invoking it in the middle of any requests. + * + * See [Built-in Proxy Support](https://nodejs.org/docs/latest-v26.x/api/http.html#built-in-proxy-support) for details on proxy URL formats and `NO_PROXY` + * syntax. + * @since v25.4.0 + * @param proxyEnv An object containing proxy configuration. This accepts the + * same options as the `proxyEnv` option accepted by {@link Agent}. **Default:** + * `process.env`. + * @returns A function that restores the original agent and dispatcher + * settings to the state before this `http.setGlobalProxyFromEnv()` is invoked. + */ + function setGlobalProxyFromEnv(proxyEnv?: ProxyEnv): () => void; + /** + * Global instance of `Agent` which is used as the default for all HTTP client + * requests. Diverges from a default `Agent` configuration by having `keepAlive` + * enabled and a `timeout` of 5 seconds. + * @since v0.5.9 + */ + let globalAgent: Agent; + /** + * Read-only property specifying the maximum allowed size of HTTP headers in bytes. + * Defaults to 16KB. Configurable using the `--max-http-header-size` CLI option. + */ + const maxHeaderSize: number; + /** + * A browser-compatible implementation of `WebSocket`. + * @since v22.5.0 + */ + const WebSocket: typeof import("undici-types").WebSocket; + /** + * @since v22.5.0 + */ + const CloseEvent: typeof import("undici-types").CloseEvent; + /** + * @since v22.5.0 + */ + const MessageEvent: typeof import("undici-types").MessageEvent; +} +declare module "http" { + export * from "node:http"; +} diff --git a/node_modules/@types/node/http2.d.ts b/node_modules/@types/node/http2.d.ts new file mode 100644 index 0000000..1899b0e --- /dev/null +++ b/node_modules/@types/node/http2.d.ts @@ -0,0 +1,2498 @@ +declare module "node:http2" { + import { NonSharedBuffer } from "node:buffer"; + import { InternalEventEmitter } from "node:events"; + import * as fs from "node:fs"; + import * as net from "node:net"; + import * as stream from "node:stream"; + import * as tls from "node:tls"; + import * as url from "node:url"; + import { + IncomingHttpHeaders as Http1IncomingHttpHeaders, + IncomingMessage, + OutgoingHttpHeaders, + ServerResponse, + } from "node:http"; + interface IncomingHttpStatusHeader { + ":status"?: number | undefined; + } + interface IncomingHttpHeaders extends Http1IncomingHttpHeaders { + ":path"?: string | undefined; + ":method"?: string | undefined; + ":authority"?: string | undefined; + ":scheme"?: string | undefined; + ":protocol"?: string | undefined; + } + // Http2Stream + interface StreamState { + localWindowSize?: number | undefined; + state?: number | undefined; + localClose?: number | undefined; + remoteClose?: number | undefined; + /** @deprecated */ + sumDependencyWeight?: number | undefined; + /** @deprecated */ + weight?: number | undefined; + } + interface ServerStreamResponseOptions { + endStream?: boolean | undefined; + waitForTrailers?: boolean | undefined; + } + interface StatOptions { + offset: number; + length: number; + } + interface ServerStreamFileResponseOptions { + statCheck?: + | ((stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions) => void) + | undefined; + waitForTrailers?: boolean | undefined; + offset?: number | undefined; + length?: number | undefined; + } + interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions { + onError?: ((err: NodeJS.ErrnoException) => void) | undefined; + } + interface Http2StreamEventMap extends stream.DuplexEventMap { + "aborted": []; + "data": [chunk: string | NonSharedBuffer]; + "frameError": [type: number, code: number, id: number]; + "ready": []; + "streamClosed": [code: number]; + "timeout": []; + "trailers": [headers: IncomingHttpHeaders, flags: number, rawHeaders: string[]]; + "wantTrailers": []; + } + interface Http2Stream extends stream.Duplex { + /** + * Set to `true` if the `Http2Stream` instance was aborted abnormally. When set, + * the `'aborted'` event will have been emitted. + * @since v8.4.0 + */ + readonly aborted: boolean; + /** + * This property shows the number of characters currently buffered to be written. + * See `net.Socket.bufferSize` for details. + * @since v11.2.0, v10.16.0 + */ + readonly bufferSize: number; + /** + * Set to `true` if the `Http2Stream` instance has been closed. + * @since v9.4.0 + */ + readonly closed: boolean; + /** + * Set to `true` if the `Http2Stream` instance has been destroyed and is no longer + * usable. + * @since v8.4.0 + */ + readonly destroyed: boolean; + /** + * Set to `true` if the `END_STREAM` flag was set in the request or response + * HEADERS frame received, indicating that no additional data should be received + * and the readable side of the `Http2Stream` will be closed. + * @since v10.11.0 + */ + readonly endAfterHeaders: boolean; + /** + * The numeric stream identifier of this `Http2Stream` instance. Set to `undefined` if the stream identifier has not yet been assigned. + * @since v8.4.0 + */ + readonly id?: number | undefined; + /** + * Set to `true` if the `Http2Stream` instance has not yet been assigned a + * numeric stream identifier. + * @since v9.4.0 + */ + readonly pending: boolean; + /** + * Set to the `RST_STREAM` `error code` reported when the `Http2Stream` is + * destroyed after either receiving an `RST_STREAM` frame from the connected peer, + * calling `http2stream.close()`, or `http2stream.destroy()`. Will be `undefined` if the `Http2Stream` has not been closed. + * @since v8.4.0 + */ + readonly rstCode: number; + /** + * An object containing the outbound headers sent for this `Http2Stream`. + * @since v9.5.0 + */ + readonly sentHeaders: OutgoingHttpHeaders; + /** + * An array of objects containing the outbound informational (additional) headers + * sent for this `Http2Stream`. + * @since v9.5.0 + */ + readonly sentInfoHeaders?: OutgoingHttpHeaders[] | undefined; + /** + * An object containing the outbound trailers sent for this `HttpStream`. + * @since v9.5.0 + */ + readonly sentTrailers?: OutgoingHttpHeaders | undefined; + /** + * A reference to the `Http2Session` instance that owns this `Http2Stream`. The + * value will be `undefined` after the `Http2Stream` instance is destroyed. + * @since v8.4.0 + */ + readonly session: Http2Session | undefined; + /** + * Provides miscellaneous information about the current state of the `Http2Stream`. + * + * A current state of this `Http2Stream`. + * @since v8.4.0 + */ + readonly state: StreamState; + /** + * Closes the `Http2Stream` instance by sending an `RST_STREAM` frame to the + * connected HTTP/2 peer. + * @since v8.4.0 + * @param [code=http2.constants.NGHTTP2_NO_ERROR] Unsigned 32-bit integer identifying the error code. + * @param callback An optional function registered to listen for the `'close'` event. + */ + close(code?: number, callback?: () => void): void; + /** + * @deprecated Priority signaling is no longer supported in Node.js. + */ + priority(options: unknown): void; + /** + * ```js + * import http2 from 'node:http2'; + * const client = http2.connect('http://example.org:8000'); + * const { NGHTTP2_CANCEL } = http2.constants; + * const req = client.request({ ':path': '/' }); + * + * // Cancel the stream if there's no activity after 5 seconds + * req.setTimeout(5000, () => req.close(NGHTTP2_CANCEL)); + * ``` + * @since v8.4.0 + */ + setTimeout(msecs: number, callback?: () => void): void; + /** + * Sends a trailing `HEADERS` frame to the connected HTTP/2 peer. This method + * will cause the `Http2Stream` to be immediately closed and must only be + * called after the `'wantTrailers'` event has been emitted. When sending a + * request or sending a response, the `options.waitForTrailers` option must be set + * in order to keep the `Http2Stream` open after the final `DATA` frame so that + * trailers can be sent. + * + * ```js + * import http2 from 'node:http2'; + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respond(undefined, { waitForTrailers: true }); + * stream.on('wantTrailers', () => { + * stream.sendTrailers({ xyz: 'abc' }); + * }); + * stream.end('Hello World'); + * }); + * ``` + * + * The HTTP/1 specification forbids trailers from containing HTTP/2 pseudo-header + * fields (e.g. `':method'`, `':path'`, etc). + * @since v10.0.0 + */ + sendTrailers(headers: OutgoingHttpHeaders): void; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: Http2StreamEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: Http2StreamEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: Http2StreamEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: Http2StreamEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: Http2StreamEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: Http2StreamEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: Http2StreamEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: Http2StreamEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: Http2StreamEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: Http2StreamEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: Http2StreamEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface ClientHttp2StreamEventMap extends Http2StreamEventMap { + "continue": []; + "headers": [headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number, rawHeaders: string[]]; + "push": [headers: IncomingHttpHeaders, flags: number, rawHeaders: string[]]; + "response": [headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number, rawHeaders: string[]]; + } + interface ClientHttp2Stream extends Http2Stream { + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: ClientHttp2StreamEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: ClientHttp2StreamEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners( + eventName: E, + ): ((...args: ClientHttp2StreamEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): ((...args: ClientHttp2StreamEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface ServerHttp2Stream extends Http2Stream { + /** + * True if headers were sent, false otherwise (read-only). + * @since v8.4.0 + */ + readonly headersSent: boolean; + /** + * Read-only property mapped to the `SETTINGS_ENABLE_PUSH` flag of the remote + * client's most recent `SETTINGS` frame. Will be `true` if the remote peer + * accepts push streams, `false` otherwise. Settings are the same for every `Http2Stream` in the same `Http2Session`. + * @since v8.4.0 + */ + readonly pushAllowed: boolean; + /** + * Sends an additional informational `HEADERS` frame to the connected HTTP/2 peer. + * @since v8.4.0 + */ + additionalHeaders(headers: OutgoingHttpHeaders): void; + /** + * Initiates a push stream. The callback is invoked with the new `Http2Stream` instance created for the push stream passed as the second argument, or an `Error` passed as the first argument. + * + * ```js + * import http2 from 'node:http2'; + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respond({ ':status': 200 }); + * stream.pushStream({ ':path': '/' }, (err, pushStream, headers) => { + * if (err) throw err; + * pushStream.respond({ ':status': 200 }); + * pushStream.end('some pushed data'); + * }); + * stream.end('some data'); + * }); + * ``` + * + * Setting the weight of a push stream is not allowed in the `HEADERS` frame. Pass + * a `weight` value to `http2stream.priority` with the `silent` option set to `true` to enable server-side bandwidth balancing between concurrent streams. + * + * Calling `http2stream.pushStream()` from within a pushed stream is not permitted + * and will throw an error. + * @since v8.4.0 + * @param callback Callback that is called once the push stream has been initiated. + */ + pushStream( + headers: OutgoingHttpHeaders, + callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void, + ): void; + pushStream( + headers: OutgoingHttpHeaders, + options?: Pick, + callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void, + ): void; + /** + * ```js + * import http2 from 'node:http2'; + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respond({ ':status': 200 }); + * stream.end('some data'); + * }); + * ``` + * + * Initiates a response. When the `options.waitForTrailers` option is set, the `'wantTrailers'` event + * will be emitted immediately after queuing the last chunk of payload data to be sent. + * The `http2stream.sendTrailers()` method can then be used to send trailing header fields to the peer. + * + * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically + * close when the final `DATA` frame is transmitted. User code must call either `http2stream.sendTrailers()` or `http2stream.close()` to close the `Http2Stream`. + * + * ```js + * import http2 from 'node:http2'; + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respond({ ':status': 200 }, { waitForTrailers: true }); + * stream.on('wantTrailers', () => { + * stream.sendTrailers({ ABC: 'some value to send' }); + * }); + * stream.end('some data'); + * }); + * ``` + * @since v8.4.0 + */ + respond(headers?: OutgoingHttpHeaders | readonly string[], options?: ServerStreamResponseOptions): void; + /** + * Initiates a response whose data is read from the given file descriptor. No + * validation is performed on the given file descriptor. If an error occurs while + * attempting to read data using the file descriptor, the `Http2Stream` will be + * closed using an `RST_STREAM` frame using the standard `INTERNAL_ERROR` code. + * + * When used, the `Http2Stream` object's `Duplex` interface will be closed + * automatically. + * + * ```js + * import http2 from 'node:http2'; + * import fs from 'node:fs'; + * + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * const fd = fs.openSync('/some/file', 'r'); + * + * const stat = fs.fstatSync(fd); + * const headers = { + * 'content-length': stat.size, + * 'last-modified': stat.mtime.toUTCString(), + * 'content-type': 'text/plain; charset=utf-8', + * }; + * stream.respondWithFD(fd, headers); + * stream.on('close', () => fs.closeSync(fd)); + * }); + * ``` + * + * The optional `options.statCheck` function may be specified to give user code + * an opportunity to set additional content headers based on the `fs.Stat` details + * of the given fd. If the `statCheck` function is provided, the `http2stream.respondWithFD()` method will + * perform an `fs.fstat()` call to collect details on the provided file descriptor. + * + * The `offset` and `length` options may be used to limit the response to a + * specific range subset. This can be used, for instance, to support HTTP Range + * requests. + * + * The file descriptor or `FileHandle` is not closed when the stream is closed, + * so it will need to be closed manually once it is no longer needed. + * Using the same file descriptor concurrently for multiple streams + * is not supported and may result in data loss. Re-using a file descriptor + * after a stream has finished is supported. + * + * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event + * will be emitted immediately after queuing the last chunk of payload data to be + * sent. The `http2stream.sendTrailers()` method can then be used to send trailing + * header fields to the peer. + * + * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically + * close when the final `DATA` frame is transmitted. User code _must_ call either `http2stream.sendTrailers()` + * or `http2stream.close()` to close the `Http2Stream`. + * + * ```js + * import http2 from 'node:http2'; + * import fs from 'node:fs'; + * + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * const fd = fs.openSync('/some/file', 'r'); + * + * const stat = fs.fstatSync(fd); + * const headers = { + * 'content-length': stat.size, + * 'last-modified': stat.mtime.toUTCString(), + * 'content-type': 'text/plain; charset=utf-8', + * }; + * stream.respondWithFD(fd, headers, { waitForTrailers: true }); + * stream.on('wantTrailers', () => { + * stream.sendTrailers({ ABC: 'some value to send' }); + * }); + * + * stream.on('close', () => fs.closeSync(fd)); + * }); + * ``` + * @since v8.4.0 + * @param fd A readable file descriptor. + */ + respondWithFD( + fd: number | fs.promises.FileHandle, + headers?: OutgoingHttpHeaders, + options?: ServerStreamFileResponseOptions, + ): void; + /** + * Sends a regular file as the response. The `path` must specify a regular file + * or an `'error'` event will be emitted on the `Http2Stream` object. + * + * When used, the `Http2Stream` object's `Duplex` interface will be closed + * automatically. + * + * The optional `options.statCheck` function may be specified to give user code + * an opportunity to set additional content headers based on the `fs.Stat` details + * of the given file: + * + * If an error occurs while attempting to read the file data, the `Http2Stream` will be closed using an + * `RST_STREAM` frame using the standard `INTERNAL_ERROR` code. + * If the `onError` callback is defined, then it will be called. Otherwise, the stream will be destroyed. + * + * Example using a file path: + * + * ```js + * import http2 from 'node:http2'; + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * function statCheck(stat, headers) { + * headers['last-modified'] = stat.mtime.toUTCString(); + * } + * + * function onError(err) { + * // stream.respond() can throw if the stream has been destroyed by + * // the other side. + * try { + * if (err.code === 'ENOENT') { + * stream.respond({ ':status': 404 }); + * } else { + * stream.respond({ ':status': 500 }); + * } + * } catch (err) { + * // Perform actual error handling. + * console.error(err); + * } + * stream.end(); + * } + * + * stream.respondWithFile('/some/file', + * { 'content-type': 'text/plain; charset=utf-8' }, + * { statCheck, onError }); + * }); + * ``` + * + * The `options.statCheck` function may also be used to cancel the send operation + * by returning `false`. For instance, a conditional request may check the stat + * results to determine if the file has been modified to return an appropriate `304` response: + * + * ```js + * import http2 from 'node:http2'; + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * function statCheck(stat, headers) { + * // Check the stat here... + * stream.respond({ ':status': 304 }); + * return false; // Cancel the send operation + * } + * stream.respondWithFile('/some/file', + * { 'content-type': 'text/plain; charset=utf-8' }, + * { statCheck }); + * }); + * ``` + * + * The `content-length` header field will be automatically set. + * + * The `offset` and `length` options may be used to limit the response to a + * specific range subset. This can be used, for instance, to support HTTP Range + * requests. + * + * The `options.onError` function may also be used to handle all the errors + * that could happen before the delivery of the file is initiated. The + * default behavior is to destroy the stream. + * + * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event + * will be emitted immediately after queuing the last chunk of payload data to be + * sent. The `http2stream.sendTrailers()` method can then be used to send trailing + * header fields to the peer. + * + * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically + * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`. + * + * ```js + * import http2 from 'node:http2'; + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respondWithFile('/some/file', + * { 'content-type': 'text/plain; charset=utf-8' }, + * { waitForTrailers: true }); + * stream.on('wantTrailers', () => { + * stream.sendTrailers({ ABC: 'some value to send' }); + * }); + * }); + * ``` + * @since v8.4.0 + */ + respondWithFile( + path: string, + headers?: OutgoingHttpHeaders, + options?: ServerStreamFileResponseOptionsWithError, + ): void; + } + // Http2Session + interface Settings { + headerTableSize?: number | undefined; + enablePush?: boolean | undefined; + initialWindowSize?: number | undefined; + maxFrameSize?: number | undefined; + maxConcurrentStreams?: number | undefined; + maxHeaderListSize?: number | undefined; + enableConnectProtocol?: boolean | undefined; + customSettings?: { [key: number]: number }; + } + interface ClientSessionRequestOptions { + endStream?: boolean | undefined; + exclusive?: boolean | undefined; + parent?: number | undefined; + waitForTrailers?: boolean | undefined; + signal?: AbortSignal | undefined; + } + interface SessionState { + effectiveLocalWindowSize?: number | undefined; + effectiveRecvDataLength?: number | undefined; + nextStreamID?: number | undefined; + localWindowSize?: number | undefined; + lastProcStreamID?: number | undefined; + remoteWindowSize?: number | undefined; + outboundQueueSize?: number | undefined; + deflateDynamicTableSize?: number | undefined; + inflateDynamicTableSize?: number | undefined; + } + interface Http2SessionEventMap { + "close": []; + "connect": [session: Http2Session, socket: net.Socket | tls.TLSSocket]; + "error": [err: Error]; + "frameError": [type: number, code: number, id: number]; + "goaway": [errorCode: number, lastStreamID: number, opaqueData?: NonSharedBuffer]; + "localSettings": [settings: Settings]; + "ping": [payload: Buffer]; + "remoteSettings": [settings: Settings]; + "stream": [ + stream: Http2Stream, + headers: IncomingHttpHeaders & IncomingHttpStatusHeader, + flags: number, + rawHeaders: string[], + ]; + "timeout": []; + } + interface Http2Session extends InternalEventEmitter { + /** + * Value will be `undefined` if the `Http2Session` is not yet connected to a + * socket, `h2c` if the `Http2Session` is not connected to a `TLSSocket`, or + * will return the value of the connected `TLSSocket`'s own `alpnProtocol` property. + * @since v9.4.0 + */ + readonly alpnProtocol?: string | undefined; + /** + * Will be `true` if this `Http2Session` instance has been closed, otherwise `false`. + * @since v9.4.0 + */ + readonly closed: boolean; + /** + * Will be `true` if this `Http2Session` instance is still connecting, will be set + * to `false` before emitting `connect` event and/or calling the `http2.connect` callback. + * @since v10.0.0 + */ + readonly connecting: boolean; + /** + * Will be `true` if this `Http2Session` instance has been destroyed and must no + * longer be used, otherwise `false`. + * @since v8.4.0 + */ + readonly destroyed: boolean; + /** + * Value is `undefined` if the `Http2Session` session socket has not yet been + * connected, `true` if the `Http2Session` is connected with a `TLSSocket`, + * and `false` if the `Http2Session` is connected to any other kind of socket + * or stream. + * @since v9.4.0 + */ + readonly encrypted?: boolean | undefined; + /** + * A prototype-less object describing the current local settings of this `Http2Session`. + * The local settings are local to _this_`Http2Session` instance. + * @since v8.4.0 + */ + readonly localSettings: Settings; + /** + * If the `Http2Session` is connected to a `TLSSocket`, the `originSet` property + * will return an `Array` of origins for which the `Http2Session` may be + * considered authoritative. + * + * The `originSet` property is only available when using a secure TLS connection. + * @since v9.4.0 + */ + readonly originSet?: string[] | undefined; + /** + * Indicates whether the `Http2Session` is currently waiting for acknowledgment of + * a sent `SETTINGS` frame. Will be `true` after calling the `http2session.settings()` method. + * Will be `false` once all sent `SETTINGS` frames have been acknowledged. + * @since v8.4.0 + */ + readonly pendingSettingsAck: boolean; + /** + * A prototype-less object describing the current remote settings of this`Http2Session`. + * The remote settings are set by the _connected_ HTTP/2 peer. + * @since v8.4.0 + */ + readonly remoteSettings: Settings; + /** + * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but + * limits available methods to ones safe to use with HTTP/2. + * + * `emit`, `end`, `pause`, `read`, `resume`, and `write` will throw + * an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for more information. + * + * `destroy`, `setTimeout`, `ref`, and `unref` methods will be called on this + * `Http2Session`. + * + * All other interactions will be routed directly to the socket. + * @since v8.4.0 + */ + readonly socket: net.Socket | tls.TLSSocket; + /** + * Provides miscellaneous information about the current state of the`Http2Session`. + * + * An object describing the current status of this `Http2Session`. + * @since v8.4.0 + */ + readonly state: SessionState; + /** + * The `http2session.type` will be equal to `http2.constants.NGHTTP2_SESSION_SERVER` if this `Http2Session` instance is a + * server, and `http2.constants.NGHTTP2_SESSION_CLIENT` if the instance is a + * client. + * @since v8.4.0 + */ + readonly type: number; + /** + * Gracefully closes the `Http2Session`, allowing any existing streams to + * complete on their own and preventing new `Http2Stream` instances from being + * created. Once closed, `http2session.destroy()`_might_ be called if there + * are no open `Http2Stream` instances. + * + * If specified, the `callback` function is registered as a handler for the`'close'` event. + * @since v9.4.0 + */ + close(callback?: () => void): void; + /** + * Immediately terminates the `Http2Session` and the associated `net.Socket` or `tls.TLSSocket`. + * + * Once destroyed, the `Http2Session` will emit the `'close'` event. If `error` is not undefined, an `'error'` event will be emitted immediately before the `'close'` event. + * + * If there are any remaining open `Http2Streams` associated with the `Http2Session`, those will also be destroyed. + * @since v8.4.0 + * @param error An `Error` object if the `Http2Session` is being destroyed due to an error. + * @param code The HTTP/2 error code to send in the final `GOAWAY` frame. If unspecified, and `error` is not undefined, the default is `INTERNAL_ERROR`, otherwise defaults to `NO_ERROR`. + */ + destroy(error?: Error, code?: number): void; + /** + * Transmits a `GOAWAY` frame to the connected peer _without_ shutting down the`Http2Session`. + * @since v9.4.0 + * @param code An HTTP/2 error code + * @param lastStreamID The numeric ID of the last processed `Http2Stream` + * @param opaqueData A `TypedArray` or `DataView` instance containing additional data to be carried within the `GOAWAY` frame. + */ + goaway(code?: number, lastStreamID?: number, opaqueData?: NodeJS.ArrayBufferView): void; + /** + * Sends a `PING` frame to the connected HTTP/2 peer. A `callback` function must + * be provided. The method will return `true` if the `PING` was sent, `false` otherwise. + * + * The maximum number of outstanding (unacknowledged) pings is determined by the `maxOutstandingPings` configuration option. The default maximum is 10. + * + * If provided, the `payload` must be a `Buffer`, `TypedArray`, or `DataView` containing 8 bytes of data that will be transmitted with the `PING` and + * returned with the ping acknowledgment. + * + * The callback will be invoked with three arguments: an error argument that will + * be `null` if the `PING` was successfully acknowledged, a `duration` argument + * that reports the number of milliseconds elapsed since the ping was sent and the + * acknowledgment was received, and a `Buffer` containing the 8-byte `PING` payload. + * + * ```js + * session.ping(Buffer.from('abcdefgh'), (err, duration, payload) => { + * if (!err) { + * console.log(`Ping acknowledged in ${duration} milliseconds`); + * console.log(`With payload '${payload.toString()}'`); + * } + * }); + * ``` + * + * If the `payload` argument is not specified, the default payload will be the + * 64-bit timestamp (little endian) marking the start of the `PING` duration. + * @since v8.9.3 + * @param payload Optional ping payload. + */ + ping(callback: (err: Error | null, duration: number, payload: NonSharedBuffer) => void): boolean; + ping( + payload: NodeJS.ArrayBufferView, + callback: (err: Error | null, duration: number, payload: NonSharedBuffer) => void, + ): boolean; + /** + * Calls `ref()` on this `Http2Session` instance's underlying `net.Socket`. + * @since v9.4.0 + */ + ref(): void; + /** + * Sets the local endpoint's window size. + * The `windowSize` is the total window size to set, not + * the delta. + * + * ```js + * import http2 from 'node:http2'; + * + * const server = http2.createServer(); + * const expectedWindowSize = 2 ** 20; + * server.on('connect', (session) => { + * + * // Set local window size to be 2 ** 20 + * session.setLocalWindowSize(expectedWindowSize); + * }); + * ``` + * @since v15.3.0, v14.18.0 + */ + setLocalWindowSize(windowSize: number): void; + /** + * Used to set a callback function that is called when there is no activity on + * the `Http2Session` after `msecs` milliseconds. The given `callback` is + * registered as a listener on the `'timeout'` event. + * @since v8.4.0 + */ + setTimeout(msecs: number, callback?: () => void): void; + /** + * Updates the current local settings for this `Http2Session` and sends a new `SETTINGS` frame to the connected HTTP/2 peer. + * + * Once called, the `http2session.pendingSettingsAck` property will be `true` while the session is waiting for the remote peer to acknowledge the new + * settings. + * + * The new settings will not become effective until the `SETTINGS` acknowledgment + * is received and the `'localSettings'` event is emitted. It is possible to send + * multiple `SETTINGS` frames while acknowledgment is still pending. + * @since v8.4.0 + * @param callback Callback that is called once the session is connected or right away if the session is already connected. + */ + settings( + settings: Settings, + callback?: (err: Error | null, settings: Settings, duration: number) => void, + ): void; + /** + * Calls `unref()` on this `Http2Session`instance's underlying `net.Socket`. + * @since v9.4.0 + */ + unref(): void; + } + interface ClientHttp2SessionEventMap extends Http2SessionEventMap { + "altsvc": [alt: string, origin: string, streamId: number]; + "connect": [session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket]; + "origin": [origins: string[]]; + "stream": [ + stream: ClientHttp2Stream, + headers: IncomingHttpHeaders & IncomingHttpStatusHeader, + flags: number, + rawHeaders: string[], + ]; + } + interface ClientHttp2Session extends Http2Session { + /** + * For HTTP/2 Client `Http2Session` instances only, the `http2session.request()` creates and returns an `Http2Stream` instance that can be used to send an + * HTTP/2 request to the connected server. + * + * When a `ClientHttp2Session` is first created, the socket may not yet be + * connected. If `clienthttp2session.request()` is called during this time, the + * actual request will be deferred until the socket is ready to go. + * + * If the session becomes unavailable before the request can be created, the + * returned stream will emit `ERR_HTTP2_GOAWAY_SESSION` or + * `ERR_HTTP2_INVALID_SESSION` asynchronously. + * + * This method is only available if `http2session.type` is equal to `http2.constants.NGHTTP2_SESSION_CLIENT`. + * + * ```js + * import http2 from 'node:http2'; + * const clientSession = http2.connect('https://localhost:1234'); + * const { + * HTTP2_HEADER_PATH, + * HTTP2_HEADER_STATUS, + * } = http2.constants; + * + * const req = clientSession.request({ [HTTP2_HEADER_PATH]: '/' }); + * req.on('response', (headers) => { + * console.log(headers[HTTP2_HEADER_STATUS]); + * req.on('data', (chunk) => { // .. }); + * req.on('end', () => { // .. }); + * }); + * ``` + * + * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event + * is emitted immediately after queuing the last chunk of payload data to be sent. + * The `http2stream.sendTrailers()` method can then be called to send trailing + * headers to the peer. + * + * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically + * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`. + * + * When `options.signal` is set with an `AbortSignal` and then `abort` on the + * corresponding `AbortController` is called, the request will emit an `'error'`event with an `AbortError` error. + * + * The `:method` and `:path` pseudo-headers are not specified within `headers`, + * they respectively default to: + * + * * `:method` \= `'GET'` + * * `:path` \= `/` + * @since v8.4.0 + */ + request( + headers?: OutgoingHttpHeaders | readonly string[], + options?: ClientSessionRequestOptions, + ): ClientHttp2Stream; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: ClientHttp2StreamEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: ClientHttp2StreamEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners( + eventName: E, + ): ((...args: ClientHttp2StreamEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): ((...args: ClientHttp2StreamEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: ClientHttp2StreamEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface AlternativeServiceOptions { + origin: number | string | url.URL; + } + interface ServerHttp2SessionEventMap< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends Http2SessionEventMap { + "connect": [ + session: ServerHttp2Session, + socket: net.Socket | tls.TLSSocket, + ]; + "stream": [stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number, rawHeaders: string[]]; + } + interface ServerHttp2Session< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends Http2Session { + readonly server: + | Http2Server + | Http2SecureServer; + /** + * Submits an `ALTSVC` frame (as defined by [RFC 7838](https://tools.ietf.org/html/rfc7838)) to the connected client. + * + * ```js + * import http2 from 'node:http2'; + * + * const server = http2.createServer(); + * server.on('session', (session) => { + * // Set altsvc for origin https://example.org:80 + * session.altsvc('h2=":8000"', 'https://example.org:80'); + * }); + * + * server.on('stream', (stream) => { + * // Set altsvc for a specific stream + * stream.session.altsvc('h2=":8000"', stream.id); + * }); + * ``` + * + * Sending an `ALTSVC` frame with a specific stream ID indicates that the alternate + * service is associated with the origin of the given `Http2Stream`. + * + * The `alt` and origin string _must_ contain only ASCII bytes and are + * strictly interpreted as a sequence of ASCII bytes. The special value `'clear'`may be passed to clear any previously set alternative service for a given + * domain. + * + * When a string is passed for the `originOrStream` argument, it will be parsed as + * a URL and the origin will be derived. For instance, the origin for the + * HTTP URL `'https://example.org/foo/bar'` is the ASCII string`'https://example.org'`. An error will be thrown if either the given string + * cannot be parsed as a URL or if a valid origin cannot be derived. + * + * A `URL` object, or any object with an `origin` property, may be passed as`originOrStream`, in which case the value of the `origin` property will be + * used. The value of the `origin` property _must_ be a properly serialized + * ASCII origin. + * @since v9.4.0 + * @param alt A description of the alternative service configuration as defined by `RFC 7838`. + * @param originOrStream Either a URL string specifying the origin (or an `Object` with an `origin` property) or the numeric identifier of an active `Http2Stream` as given by the + * `http2stream.id` property. + */ + altsvc(alt: string, originOrStream: number | string | url.URL | AlternativeServiceOptions): void; + /** + * Submits an `ORIGIN` frame (as defined by [RFC 8336](https://tools.ietf.org/html/rfc8336)) to the connected client + * to advertise the set of origins for which the server is capable of providing + * authoritative responses. + * + * ```js + * import http2 from 'node:http2'; + * const options = getSecureOptionsSomehow(); + * const server = http2.createSecureServer(options); + * server.on('stream', (stream) => { + * stream.respond(); + * stream.end('ok'); + * }); + * server.on('session', (session) => { + * session.origin('https://example.com', 'https://example.org'); + * }); + * ``` + * + * When a string is passed as an `origin`, it will be parsed as a URL and the + * origin will be derived. For instance, the origin for the HTTP URL `'https://example.org/foo/bar'` is the ASCII string` 'https://example.org'`. An error will be thrown if either the given + * string + * cannot be parsed as a URL or if a valid origin cannot be derived. + * + * A `URL` object, or any object with an `origin` property, may be passed as + * an `origin`, in which case the value of the `origin` property will be + * used. The value of the `origin` property _must_ be a properly serialized + * ASCII origin. + * + * Alternatively, the `origins` option may be used when creating a new HTTP/2 + * server using the `http2.createSecureServer()` method: + * + * ```js + * import http2 from 'node:http2'; + * const options = getSecureOptionsSomehow(); + * options.origins = ['https://example.com', 'https://example.org']; + * const server = http2.createSecureServer(options); + * server.on('stream', (stream) => { + * stream.respond(); + * stream.end('ok'); + * }); + * ``` + * @since v10.12.0 + * @param origins One or more URL Strings passed as separate arguments. + */ + origin( + ...origins: Array< + | string + | url.URL + | { + origin: string; + } + > + ): void; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: ( + ...args: ServerHttp2SessionEventMap[E] + ) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit( + eventName: E, + ...args: ServerHttp2SessionEventMap[E] + ): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: ( + ...args: ServerHttp2SessionEventMap[E] + ) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners( + eventName: E, + ): (( + ...args: ServerHttp2SessionEventMap[E] + ) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: ( + ...args: ServerHttp2SessionEventMap[E] + ) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: ( + ...args: ServerHttp2SessionEventMap[E] + ) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: ( + ...args: ServerHttp2SessionEventMap[E] + ) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: ( + ...args: ServerHttp2SessionEventMap[E] + ) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: ( + ...args: ServerHttp2SessionEventMap[E] + ) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): (( + ...args: ServerHttp2SessionEventMap[E] + ) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: ( + ...args: ServerHttp2SessionEventMap[E] + ) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + // Http2Server + interface SessionOptions { + /** + * Sets the maximum dynamic table size for deflating header fields. + * @default 4Kib + */ + maxDeflateDynamicTableSize?: number | undefined; + /** + * Sets the maximum number of settings entries per `SETTINGS` frame. + * The minimum value allowed is `1`. + * @default 32 + */ + maxSettings?: number | undefined; + /** + * Sets the maximum memory that the `Http2Session` is permitted to use. + * The value is expressed in terms of number of megabytes, e.g. `1` equal 1 megabyte. + * The minimum value allowed is `1`. + * This is a credit based limit, existing `Http2Stream`s may cause this limit to be exceeded, + * but new `Http2Stream` instances will be rejected while this limit is exceeded. + * The current number of `Http2Stream` sessions, the current memory use of the header compression tables, + * current data queued to be sent, and unacknowledged `PING` and `SETTINGS` frames are all counted towards the current limit. + * @default 10 + */ + maxSessionMemory?: number | undefined; + /** + * Sets the maximum number of header entries. + * This is similar to `server.maxHeadersCount` or `request.maxHeadersCount` in the `node:http` module. + * The minimum value is `1`. + * @default 128 + */ + maxHeaderListPairs?: number | undefined; + /** + * Sets the maximum number of uniq origin the sever + * can send via ORIGIN frames. **Default:** `128`. + */ + maxOriginSetSize?: number | undefined; + /** + * Sets the maximum number of outstanding, unacknowledged pings. + * @default 10 + */ + maxOutstandingPings?: number | undefined; + /** + * Sets the maximum allowed size for a serialized, compressed block of headers. + * Attempts to send headers that exceed this limit will result in + * a `'frameError'` event being emitted and the stream being closed and destroyed. + */ + maxSendHeaderBlockLength?: number | undefined; + /** + * Strategy used for determining the amount of padding to use for `HEADERS` and `DATA` frames. + * @default http2.constants.PADDING_STRATEGY_NONE + */ + paddingStrategy?: number | undefined; + /** + * Sets the maximum number of concurrent streams for the remote peer as if a `SETTINGS` frame had been received. + * Will be overridden if the remote peer sets its own value for `maxConcurrentStreams`. + * @default 100 + */ + peerMaxConcurrentStreams?: number | undefined; + /** + * The initial settings to send to the remote peer upon connection. + */ + settings?: Settings | undefined; + /** + * The array of integer values determines the settings types, + * which are included in the `CustomSettings`-property of the received remoteSettings. + * Please see the `CustomSettings`-property of the `Http2Settings` object for more information, on the allowed setting types. + */ + remoteCustomSettings?: number[] | undefined; + /** + * Specifies a timeout in milliseconds that + * a server should wait when an [`'unknownProtocol'`][] is emitted. If the + * socket has not been destroyed by that time the server will destroy it. + * @default 100000 + */ + unknownProtocolTimeout?: number | undefined; + /** + * If `true`, it turns on strict leading + * and trailing whitespace validation for HTTP/2 header field names and values + * as per [RFC-9113](https://www.rfc-editor.org/rfc/rfc9113.html#section-8.2.1). + * @since v24.2.0 + * @default true + */ + strictFieldWhitespaceValidation?: boolean | undefined; + } + interface ClientSessionOptions extends SessionOptions { + /** + * Sets the maximum number of reserved push streams the client will accept at any given time. + * Once the current number of currently reserved push streams exceeds reaches this limit, + * new push streams sent by the server will be automatically rejected. + * The minimum allowed value is 0. The maximum allowed value is 232-1. + * A negative value sets this option to the maximum allowed value. + * @default 200 + */ + maxReservedRemoteStreams?: number | undefined; + /** + * An optional callback that receives the `URL` instance passed to `connect` and the `options` object, + * and returns any `Duplex` stream that is to be used as the connection for this session. + */ + createConnection?: ((authority: url.URL, option: SessionOptions) => stream.Duplex) | undefined; + /** + * The protocol to connect with, if not set in the `authority`. + * Value may be either `'http:'` or `'https:'`. + * @default 'https:' + */ + protocol?: "http:" | "https:" | undefined; + } + interface ServerSessionOptions< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends SessionOptions { + maxSessionRejectedStreams?: number | undefined; + maxSessionInvalidFrames?: number | undefined; + streamResetBurst?: number | undefined; + streamResetRate?: number | undefined; + /** @deprecated Use `http1Options.IncomingMessage` instead. */ + Http1IncomingMessage?: Http1Request | undefined; + /** @deprecated Use `http1Options.ServerResponse` instead. */ + Http1ServerResponse?: Http1Response | undefined; + http1Options?: Http1Options | undefined; + Http2ServerRequest?: Http2Request | undefined; + Http2ServerResponse?: Http2Response | undefined; + strictSingleValueFields?: boolean | undefined; + } + interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions {} + interface SecureServerSessionOptions< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends ServerSessionOptions, tls.TlsOptions {} + interface ServerOptions< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends ServerSessionOptions {} + interface SecureServerOptions< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends SecureServerSessionOptions { + allowHTTP1?: boolean | undefined; + origins?: string[] | undefined; + } + interface Http1Options< + Request extends typeof IncomingMessage, + Response extends typeof ServerResponse>, + > { + IncomingMessage?: Request | undefined; + ServerResponse?: Response | undefined; + keepAliveTimeout?: number | undefined; + } + interface Http2ServerCommon { + setTimeout(msec?: number, callback?: () => void): this; + /** + * Throws ERR_HTTP2_INVALID_SETTING_VALUE for invalid settings values. + * Throws ERR_INVALID_ARG_TYPE for invalid settings argument. + */ + updateSettings(settings: Settings): void; + } + interface Http2ServerEventMap< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends net.ServerEventMap, Pick { + "checkContinue": [request: InstanceType, response: InstanceType]; + "request": [request: InstanceType, response: InstanceType]; + "session": [session: ServerHttp2Session]; + "sessionError": [ + err: Error, + session: ServerHttp2Session, + ]; + } + interface Http2Server< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends net.Server, Http2ServerCommon { + // #region InternalEventEmitter + addListener( + eventName: E, + listener: ( + ...args: Http2ServerEventMap[E] + ) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit( + eventName: E, + ...args: Http2ServerEventMap[E] + ): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: ( + ...args: Http2ServerEventMap[E] + ) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners( + eventName: E, + ): ((...args: Http2ServerEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: ( + ...args: Http2ServerEventMap[E] + ) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: ( + ...args: Http2ServerEventMap[E] + ) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: ( + ...args: Http2ServerEventMap[E] + ) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: ( + ...args: Http2ServerEventMap[E] + ) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: ( + ...args: Http2ServerEventMap[E] + ) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): ((...args: Http2ServerEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: ( + ...args: Http2ServerEventMap[E] + ) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface Http2SecureServerEventMap< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends tls.ServerEventMap, Http2ServerEventMap { + "unknownProtocol": [socket: tls.TLSSocket]; + } + interface Http2SecureServer< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + > extends tls.Server, Http2ServerCommon { + // #region InternalEventEmitter + addListener( + eventName: E, + listener: ( + ...args: Http2SecureServerEventMap[E] + ) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit( + eventName: E, + ...args: Http2SecureServerEventMap[E] + ): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: ( + ...args: Http2SecureServerEventMap[E] + ) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners( + eventName: E, + ): (( + ...args: Http2SecureServerEventMap[E] + ) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: ( + ...args: Http2SecureServerEventMap[E] + ) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: ( + ...args: Http2SecureServerEventMap[E] + ) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: ( + ...args: Http2SecureServerEventMap[E] + ) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: ( + ...args: Http2SecureServerEventMap[E] + ) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: ( + ...args: Http2SecureServerEventMap[E] + ) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): (( + ...args: Http2SecureServerEventMap[E] + ) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: ( + ...args: Http2SecureServerEventMap[E] + ) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface Http2ServerRequestEventMap extends stream.ReadableEventMap { + "aborted": [hadError: boolean, code: number]; + "data": [chunk: string | NonSharedBuffer]; + } + /** + * A `Http2ServerRequest` object is created by {@link Server} or {@link SecureServer} and passed as the first argument to the `'request'` event. It may be used to access a request status, + * headers, and + * data. + * @since v8.4.0 + */ + class Http2ServerRequest extends stream.Readable { + constructor( + stream: ServerHttp2Stream, + headers: IncomingHttpHeaders, + options: stream.ReadableOptions, + rawHeaders: readonly string[], + ); + /** + * The `request.aborted` property will be `true` if the request has + * been aborted. + * @since v10.1.0 + */ + readonly aborted: boolean; + /** + * The request authority pseudo header field. Because HTTP/2 allows requests + * to set either `:authority` or `host`, this value is derived from `req.headers[':authority']` if present. Otherwise, it is derived from `req.headers['host']`. + * @since v8.4.0 + */ + readonly authority: string; + /** + * See `request.socket`. + * @since v8.4.0 + * @deprecated Since v13.0.0 - Use `socket`. + */ + readonly connection: net.Socket | tls.TLSSocket; + /** + * The `request.complete` property will be `true` if the request has + * been completed, aborted, or destroyed. + * @since v12.10.0 + */ + readonly complete: boolean; + /** + * The request/response headers object. + * + * Key-value pairs of header names and values. Header names are lower-cased. + * + * ```js + * // Prints something like: + * // + * // { 'user-agent': 'curl/7.22.0', + * // host: '127.0.0.1:8000', + * // accept: '*' } + * console.log(request.headers); + * ``` + * + * See `HTTP/2 Headers Object`. + * + * In HTTP/2, the request path, host name, protocol, and method are represented as + * special headers prefixed with the `:` character (e.g. `':path'`). These special + * headers will be included in the `request.headers` object. Care must be taken not + * to inadvertently modify these special headers or errors may occur. For instance, + * removing all headers from the request will cause errors to occur: + * + * ```js + * removeAllHeaders(request.headers); + * assert(request.url); // Fails because the :path header has been removed + * ``` + * @since v8.4.0 + */ + readonly headers: IncomingHttpHeaders; + /** + * In case of server request, the HTTP version sent by the client. In the case of + * client response, the HTTP version of the connected-to server. Returns `'2.0'`. + * + * Also `message.httpVersionMajor` is the first integer and `message.httpVersionMinor` is the second. + * @since v8.4.0 + */ + readonly httpVersion: string; + readonly httpVersionMinor: number; + readonly httpVersionMajor: number; + /** + * The request method as a string. Read-only. Examples: `'GET'`, `'DELETE'`. + * @since v8.4.0 + */ + readonly method: string; + /** + * The raw request/response headers list exactly as they were received. + * + * The keys and values are in the same list. It is _not_ a + * list of tuples. So, the even-numbered offsets are key values, and the + * odd-numbered offsets are the associated values. + * + * Header names are not lowercased, and duplicates are not merged. + * + * ```js + * // Prints something like: + * // + * // [ 'user-agent', + * // 'this is invalid because there can be only one', + * // 'User-Agent', + * // 'curl/7.22.0', + * // 'Host', + * // '127.0.0.1:8000', + * // 'ACCEPT', + * // '*' ] + * console.log(request.rawHeaders); + * ``` + * @since v8.4.0 + */ + readonly rawHeaders: string[]; + /** + * The raw request/response trailer keys and values exactly as they were + * received. Only populated at the `'end'` event. + * @since v8.4.0 + */ + readonly rawTrailers: string[]; + /** + * The request scheme pseudo header field indicating the scheme + * portion of the target URL. + * @since v8.4.0 + */ + readonly scheme: string; + /** + * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but + * applies getters, setters, and methods based on HTTP/2 logic. + * + * `destroyed`, `readable`, and `writable` properties will be retrieved from and + * set on `request.stream`. + * + * `destroy`, `emit`, `end`, `on` and `once` methods will be called on `request.stream`. + * + * `setTimeout` method will be called on `request.stream.session`. + * + * `pause`, `read`, `resume`, and `write` will throw an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for + * more information. + * + * All other interactions will be routed directly to the socket. With TLS support, + * use `request.socket.getPeerCertificate()` to obtain the client's + * authentication details. + * @since v8.4.0 + */ + readonly socket: net.Socket | tls.TLSSocket; + /** + * The `Http2Stream` object backing the request. + * @since v8.4.0 + */ + readonly stream: ServerHttp2Stream; + /** + * The request/response trailers object. Only populated at the `'end'` event. + * @since v8.4.0 + */ + readonly trailers: IncomingHttpHeaders; + /** + * Request URL string. This contains only the URL that is present in the actual + * HTTP request. If the request is: + * + * ```http + * GET /status?name=ryan HTTP/1.1 + * Accept: text/plain + * ``` + * + * Then `request.url` will be: + * + * ```json + * "/status?name=ryan" + * ``` + * + * To parse the url into its parts, `new URL()` can be used: + * + * ```console + * $ node + * > new URL('/status?name=ryan', 'http://example.com') + * URL { + * href: 'http://example.com/status?name=ryan', + * origin: 'http://example.com', + * protocol: 'http:', + * username: '', + * password: '', + * host: 'example.com', + * hostname: 'example.com', + * port: '', + * pathname: '/status', + * search: '?name=ryan', + * searchParams: URLSearchParams { 'name' => 'ryan' }, + * hash: '' + * } + * ``` + * @since v8.4.0 + */ + url: string; + /** + * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is + * provided, then it is added as a listener on the `'timeout'` event on + * the response object. + * + * If no `'timeout'` listener is added to the request, the response, or + * the server, then `Http2Stream`s are destroyed when they time out. If a + * handler is assigned to the request, the response, or the server's `'timeout'`events, timed out sockets must be handled explicitly. + * @since v8.4.0 + */ + setTimeout(msecs: number, callback?: () => void): void; + read(size?: number): Buffer | string | null; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: Http2ServerRequestEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: Http2ServerRequestEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: Http2ServerRequestEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners( + eventName: E, + ): ((...args: Http2ServerRequestEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: Http2ServerRequestEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: Http2ServerRequestEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: Http2ServerRequestEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: Http2ServerRequestEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: Http2ServerRequestEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): ((...args: Http2ServerRequestEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: Http2ServerRequestEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + /** + * This object is created internally by an HTTP server, not by the user. It is + * passed as the second parameter to the `'request'` event. + * @since v8.4.0 + */ + class Http2ServerResponse extends stream.Writable { + constructor(stream: ServerHttp2Stream); + /** + * See `response.socket`. + * @since v8.4.0 + * @deprecated Since v13.0.0 - Use `socket`. + */ + readonly connection: net.Socket | tls.TLSSocket; + /** + * Append a single header value to the header object. + * + * If the value is an array, this is equivalent to calling this method multiple times. + * + * If there were no previous values for the header, this is equivalent to calling {@link setHeader}. + * + * Attempting to set a header field name or value that contains invalid characters will result in a + * [TypeError](https://nodejs.org/docs/latest-v26.x/api/errors.html#class-typeerror) being thrown. + * + * ```js + * // Returns headers including "set-cookie: a" and "set-cookie: b" + * const server = http2.createServer((req, res) => { + * res.setHeader('set-cookie', 'a'); + * res.appendHeader('set-cookie', 'b'); + * res.writeHead(200); + * res.end('ok'); + * }); + * ``` + * @since v20.12.0 + */ + appendHeader(name: string, value: string | string[]): void; + /** + * Boolean value that indicates whether the response has completed. Starts + * as `false`. After `response.end()` executes, the value will be `true`. + * @since v8.4.0 + * @deprecated Since v13.4.0,v12.16.0 - Use `writableEnded`. + */ + readonly finished: boolean; + /** + * True if headers were sent, false otherwise (read-only). + * @since v8.4.0 + */ + readonly headersSent: boolean; + /** + * A reference to the original HTTP2 `request` object. + * @since v15.7.0 + */ + readonly req: Request; + /** + * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but + * applies getters, setters, and methods based on HTTP/2 logic. + * + * `destroyed`, `readable`, and `writable` properties will be retrieved from and + * set on `response.stream`. + * + * `destroy`, `emit`, `end`, `on` and `once` methods will be called on `response.stream`. + * + * `setTimeout` method will be called on `response.stream.session`. + * + * `pause`, `read`, `resume`, and `write` will throw an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for + * more information. + * + * All other interactions will be routed directly to the socket. + * + * ```js + * import http2 from 'node:http2'; + * const server = http2.createServer((req, res) => { + * const ip = req.socket.remoteAddress; + * const port = req.socket.remotePort; + * res.end(`Your IP address is ${ip} and your source port is ${port}.`); + * }).listen(3000); + * ``` + * @since v8.4.0 + */ + readonly socket: net.Socket | tls.TLSSocket; + /** + * The `Http2Stream` object backing the response. + * @since v8.4.0 + */ + readonly stream: ServerHttp2Stream; + /** + * When true, the Date header will be automatically generated and sent in + * the response if it is not already present in the headers. Defaults to true. + * + * This should only be disabled for testing; HTTP requires the Date header + * in responses. + * @since v8.4.0 + */ + sendDate: boolean; + /** + * When using implicit headers (not calling `response.writeHead()` explicitly), + * this property controls the status code that will be sent to the client when + * the headers get flushed. + * + * ```js + * response.statusCode = 404; + * ``` + * + * After response header was sent to the client, this property indicates the + * status code which was sent out. + * @since v8.4.0 + */ + statusCode: number; + /** + * Status message is not supported by HTTP/2 (RFC 7540 8.1.2.4). It returns + * an empty string. + * @since v8.4.0 + */ + statusMessage: ""; + /** + * This method adds HTTP trailing headers (a header but at the end of the + * message) to the response. + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `TypeError` being thrown. + * @since v8.4.0 + */ + addTrailers(trailers: OutgoingHttpHeaders): void; + /** + * This method signals to the server that all of the response headers and body + * have been sent; that server should consider this message complete. + * The method, `response.end()`, MUST be called on each response. + * + * If `data` is specified, it is equivalent to calling `response.write(data, encoding)` followed by `response.end(callback)`. + * + * If `callback` is specified, it will be called when the response stream + * is finished. + * @since v8.4.0 + */ + end(callback?: () => void): this; + end(data: string | Uint8Array, callback?: () => void): this; + end(data: string | Uint8Array, encoding: BufferEncoding, callback?: () => void): this; + /** + * Reads out a header that has already been queued but not sent to the client. + * The name is case-insensitive. + * + * ```js + * const contentType = response.getHeader('content-type'); + * ``` + * @since v8.4.0 + */ + getHeader(name: string): string; + /** + * Returns an array containing the unique names of the current outgoing headers. + * All header names are lowercase. + * + * ```js + * response.setHeader('Foo', 'bar'); + * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); + * + * const headerNames = response.getHeaderNames(); + * // headerNames === ['foo', 'set-cookie'] + * ``` + * @since v8.4.0 + */ + getHeaderNames(): string[]; + /** + * Returns a shallow copy of the current outgoing headers. Since a shallow copy + * is used, array values may be mutated without additional calls to various + * header-related http module methods. The keys of the returned object are the + * header names and the values are the respective header values. All header names + * are lowercase. + * + * The object returned by the `response.getHeaders()` method _does not_ prototypically inherit from the JavaScript `Object`. This means that typical `Object` methods such as `obj.toString()`, + * `obj.hasOwnProperty()`, and others + * are not defined and _will not work_. + * + * ```js + * response.setHeader('Foo', 'bar'); + * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); + * + * const headers = response.getHeaders(); + * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] } + * ``` + * @since v8.4.0 + */ + getHeaders(): OutgoingHttpHeaders; + /** + * Returns `true` if the header identified by `name` is currently set in the + * outgoing headers. The header name matching is case-insensitive. + * + * ```js + * const hasContentType = response.hasHeader('content-type'); + * ``` + * @since v8.4.0 + */ + hasHeader(name: string): boolean; + /** + * Removes a header that has been queued for implicit sending. + * + * ```js + * response.removeHeader('Content-Encoding'); + * ``` + * @since v8.4.0 + */ + removeHeader(name: string): void; + /** + * Sets a single header value for implicit headers. If this header already exists + * in the to-be-sent headers, its value will be replaced. Use an array of strings + * here to send multiple headers with the same name. + * + * ```js + * response.setHeader('Content-Type', 'text/html; charset=utf-8'); + * ``` + * + * or + * + * ```js + * response.setHeader('Set-Cookie', ['type=ninja', 'language=javascript']); + * ``` + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `TypeError` being thrown. + * + * When headers have been set with `response.setHeader()`, they will be merged + * with any headers passed to `response.writeHead()`, with the headers passed + * to `response.writeHead()` given precedence. + * + * ```js + * // Returns content-type = text/plain + * const server = http2.createServer((req, res) => { + * res.setHeader('Content-Type', 'text/html; charset=utf-8'); + * res.setHeader('X-Foo', 'bar'); + * res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' }); + * res.end('ok'); + * }); + * ``` + * @since v8.4.0 + */ + setHeader(name: string, value: number | string | readonly string[]): void; + /** + * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is + * provided, then it is added as a listener on the `'timeout'` event on + * the response object. + * + * If no `'timeout'` listener is added to the request, the response, or + * the server, then `Http2Stream` s are destroyed when they time out. If a + * handler is assigned to the request, the response, or the server's `'timeout'` events, timed out sockets must be handled explicitly. + * @since v8.4.0 + */ + setTimeout(msecs: number, callback?: () => void): void; + /** + * If this method is called and `response.writeHead()` has not been called, + * it will switch to implicit header mode and flush the implicit headers. + * + * This sends a chunk of the response body. This method may + * be called multiple times to provide successive parts of the body. + * + * In the `node:http` module, the response body is omitted when the + * request is a HEAD request. Similarly, the `204` and `304` responses _must not_ include a message body. + * + * `chunk` can be a string or a buffer. If `chunk` is a string, + * the second parameter specifies how to encode it into a byte stream. + * By default the `encoding` is `'utf8'`. `callback` will be called when this chunk + * of data is flushed. + * + * This is the raw HTTP body and has nothing to do with higher-level multi-part + * body encodings that may be used. + * + * The first time `response.write()` is called, it will send the buffered + * header information and the first chunk of the body to the client. The second + * time `response.write()` is called, Node.js assumes data will be streamed, + * and sends the new data separately. That is, the response is buffered up to the + * first chunk of the body. + * + * Returns `true` if the entire data was flushed successfully to the kernel + * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is free again. + * @since v8.4.0 + */ + write(chunk: string | Uint8Array, callback?: (err: Error) => void): boolean; + write(chunk: string | Uint8Array, encoding: BufferEncoding, callback?: (err: Error) => void): boolean; + /** + * Sends a status `100 Continue` to the client, indicating that the request body + * should be sent. See the `'checkContinue'` event on `Http2Server` and `Http2SecureServer`. + * @since v8.4.0 + */ + writeContinue(): void; + /** + * Sends a status `103 Early Hints` to the client with a Link header, + * indicating that the user agent can preload/preconnect the linked resources. + * The `hints` is an object containing the values of headers to be sent with + * early hints message. + * + * **Example** + * + * ```js + * const earlyHintsLink = '; rel=preload; as=style'; + * response.writeEarlyHints({ + * 'link': earlyHintsLink, + * }); + * + * const earlyHintsLinks = [ + * '; rel=preload; as=style', + * '; rel=preload; as=script', + * ]; + * response.writeEarlyHints({ + * 'link': earlyHintsLinks, + * }); + * ``` + * @since v18.11.0 + */ + writeEarlyHints(hints: Record): void; + /** + * Sends a response header to the request. The status code is a 3-digit HTTP + * status code, like `404`. The last argument, `headers`, are the response headers. + * + * Returns a reference to the `Http2ServerResponse`, so that calls can be chained. + * + * For compatibility with `HTTP/1`, a human-readable `statusMessage` may be + * passed as the second argument. However, because the `statusMessage` has no + * meaning within HTTP/2, the argument will have no effect and a process warning + * will be emitted. + * + * ```js + * const body = 'hello world'; + * response.writeHead(200, { + * 'Content-Length': Buffer.byteLength(body), + * 'Content-Type': 'text/plain; charset=utf-8', + * }); + * ``` + * + * `Content-Length` is given in bytes not characters. The`Buffer.byteLength()` API may be used to determine the number of bytes in a + * given encoding. On outbound messages, Node.js does not check if Content-Length + * and the length of the body being transmitted are equal or not. However, when + * receiving messages, Node.js will automatically reject messages when the `Content-Length` does not match the actual payload size. + * + * This method may be called at most one time on a message before `response.end()` is called. + * + * If `response.write()` or `response.end()` are called before calling + * this, the implicit/mutable headers will be calculated and call this function. + * + * When headers have been set with `response.setHeader()`, they will be merged + * with any headers passed to `response.writeHead()`, with the headers passed + * to `response.writeHead()` given precedence. + * + * ```js + * // Returns content-type = text/plain + * const server = http2.createServer((req, res) => { + * res.setHeader('Content-Type', 'text/html; charset=utf-8'); + * res.setHeader('X-Foo', 'bar'); + * res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' }); + * res.end('ok'); + * }); + * ``` + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `TypeError` being thrown. + * @since v8.4.0 + */ + writeHead(statusCode: number, headers?: OutgoingHttpHeaders | readonly string[]): this; + writeHead(statusCode: number, statusMessage: string, headers?: OutgoingHttpHeaders | readonly string[]): this; + /** + * Call `http2stream.pushStream()` with the given headers, and wrap the + * given `Http2Stream` on a newly created `Http2ServerResponse` as the callback + * parameter if successful. When `Http2ServerRequest` is closed, the callback is + * called with an error `ERR_HTTP2_INVALID_STREAM`. + * @since v8.4.0 + * @param headers An object describing the headers + * @param callback Called once `http2stream.pushStream()` is finished, or either when the attempt to create the pushed `Http2Stream` has failed or has been rejected, or the state of + * `Http2ServerRequest` is closed prior to calling the `http2stream.pushStream()` method + */ + createPushResponse( + headers: OutgoingHttpHeaders, + callback: (err: Error | null, res: Http2ServerResponse) => void, + ): void; + } + namespace constants { + const NGHTTP2_SESSION_SERVER: number; + const NGHTTP2_SESSION_CLIENT: number; + const NGHTTP2_STREAM_STATE_IDLE: number; + const NGHTTP2_STREAM_STATE_OPEN: number; + const NGHTTP2_STREAM_STATE_RESERVED_LOCAL: number; + const NGHTTP2_STREAM_STATE_RESERVED_REMOTE: number; + const NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCAL: number; + const NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTE: number; + const NGHTTP2_STREAM_STATE_CLOSED: number; + const NGHTTP2_NO_ERROR: number; + const NGHTTP2_PROTOCOL_ERROR: number; + const NGHTTP2_INTERNAL_ERROR: number; + const NGHTTP2_FLOW_CONTROL_ERROR: number; + const NGHTTP2_SETTINGS_TIMEOUT: number; + const NGHTTP2_STREAM_CLOSED: number; + const NGHTTP2_FRAME_SIZE_ERROR: number; + const NGHTTP2_REFUSED_STREAM: number; + const NGHTTP2_CANCEL: number; + const NGHTTP2_COMPRESSION_ERROR: number; + const NGHTTP2_CONNECT_ERROR: number; + const NGHTTP2_ENHANCE_YOUR_CALM: number; + const NGHTTP2_INADEQUATE_SECURITY: number; + const NGHTTP2_HTTP_1_1_REQUIRED: number; + const NGHTTP2_ERR_FRAME_SIZE_ERROR: number; + const NGHTTP2_FLAG_NONE: number; + const NGHTTP2_FLAG_END_STREAM: number; + const NGHTTP2_FLAG_END_HEADERS: number; + const NGHTTP2_FLAG_ACK: number; + const NGHTTP2_FLAG_PADDED: number; + const NGHTTP2_FLAG_PRIORITY: number; + const DEFAULT_SETTINGS_HEADER_TABLE_SIZE: number; + const DEFAULT_SETTINGS_ENABLE_PUSH: number; + const DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE: number; + const DEFAULT_SETTINGS_MAX_FRAME_SIZE: number; + const MAX_MAX_FRAME_SIZE: number; + const MIN_MAX_FRAME_SIZE: number; + const MAX_INITIAL_WINDOW_SIZE: number; + const NGHTTP2_DEFAULT_WEIGHT: number; + const NGHTTP2_SETTINGS_HEADER_TABLE_SIZE: number; + const NGHTTP2_SETTINGS_ENABLE_PUSH: number; + const NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS: number; + const NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE: number; + const NGHTTP2_SETTINGS_MAX_FRAME_SIZE: number; + const NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE: number; + const PADDING_STRATEGY_NONE: number; + const PADDING_STRATEGY_MAX: number; + const PADDING_STRATEGY_CALLBACK: number; + const HTTP2_HEADER_STATUS: string; + const HTTP2_HEADER_METHOD: string; + const HTTP2_HEADER_AUTHORITY: string; + const HTTP2_HEADER_SCHEME: string; + const HTTP2_HEADER_PATH: string; + const HTTP2_HEADER_ACCEPT_CHARSET: string; + const HTTP2_HEADER_ACCEPT_ENCODING: string; + const HTTP2_HEADER_ACCEPT_LANGUAGE: string; + const HTTP2_HEADER_ACCEPT_RANGES: string; + const HTTP2_HEADER_ACCEPT: string; + const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALS: string; + const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_HEADERS: string; + const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_METHODS: string; + const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN: string; + const HTTP2_HEADER_ACCESS_CONTROL_EXPOSE_HEADERS: string; + const HTTP2_HEADER_ACCESS_CONTROL_REQUEST_HEADERS: string; + const HTTP2_HEADER_ACCESS_CONTROL_REQUEST_METHOD: string; + const HTTP2_HEADER_AGE: string; + const HTTP2_HEADER_ALLOW: string; + const HTTP2_HEADER_AUTHORIZATION: string; + const HTTP2_HEADER_CACHE_CONTROL: string; + const HTTP2_HEADER_CONNECTION: string; + const HTTP2_HEADER_CONTENT_DISPOSITION: string; + const HTTP2_HEADER_CONTENT_ENCODING: string; + const HTTP2_HEADER_CONTENT_LANGUAGE: string; + const HTTP2_HEADER_CONTENT_LENGTH: string; + const HTTP2_HEADER_CONTENT_LOCATION: string; + const HTTP2_HEADER_CONTENT_MD5: string; + const HTTP2_HEADER_CONTENT_RANGE: string; + const HTTP2_HEADER_CONTENT_TYPE: string; + const HTTP2_HEADER_COOKIE: string; + const HTTP2_HEADER_DATE: string; + const HTTP2_HEADER_ETAG: string; + const HTTP2_HEADER_EXPECT: string; + const HTTP2_HEADER_EXPIRES: string; + const HTTP2_HEADER_FROM: string; + const HTTP2_HEADER_HOST: string; + const HTTP2_HEADER_IF_MATCH: string; + const HTTP2_HEADER_IF_MODIFIED_SINCE: string; + const HTTP2_HEADER_IF_NONE_MATCH: string; + const HTTP2_HEADER_IF_RANGE: string; + const HTTP2_HEADER_IF_UNMODIFIED_SINCE: string; + const HTTP2_HEADER_LAST_MODIFIED: string; + const HTTP2_HEADER_LINK: string; + const HTTP2_HEADER_LOCATION: string; + const HTTP2_HEADER_MAX_FORWARDS: string; + const HTTP2_HEADER_PREFER: string; + const HTTP2_HEADER_PROXY_AUTHENTICATE: string; + const HTTP2_HEADER_PROXY_AUTHORIZATION: string; + const HTTP2_HEADER_RANGE: string; + const HTTP2_HEADER_REFERER: string; + const HTTP2_HEADER_REFRESH: string; + const HTTP2_HEADER_RETRY_AFTER: string; + const HTTP2_HEADER_SERVER: string; + const HTTP2_HEADER_SET_COOKIE: string; + const HTTP2_HEADER_STRICT_TRANSPORT_SECURITY: string; + const HTTP2_HEADER_TRANSFER_ENCODING: string; + const HTTP2_HEADER_TE: string; + const HTTP2_HEADER_UPGRADE: string; + const HTTP2_HEADER_USER_AGENT: string; + const HTTP2_HEADER_VARY: string; + const HTTP2_HEADER_VIA: string; + const HTTP2_HEADER_WWW_AUTHENTICATE: string; + const HTTP2_HEADER_HTTP2_SETTINGS: string; + const HTTP2_HEADER_KEEP_ALIVE: string; + const HTTP2_HEADER_PROXY_CONNECTION: string; + const HTTP2_METHOD_ACL: string; + const HTTP2_METHOD_BASELINE_CONTROL: string; + const HTTP2_METHOD_BIND: string; + const HTTP2_METHOD_CHECKIN: string; + const HTTP2_METHOD_CHECKOUT: string; + const HTTP2_METHOD_CONNECT: string; + const HTTP2_METHOD_COPY: string; + const HTTP2_METHOD_DELETE: string; + const HTTP2_METHOD_GET: string; + const HTTP2_METHOD_HEAD: string; + const HTTP2_METHOD_LABEL: string; + const HTTP2_METHOD_LINK: string; + const HTTP2_METHOD_LOCK: string; + const HTTP2_METHOD_MERGE: string; + const HTTP2_METHOD_MKACTIVITY: string; + const HTTP2_METHOD_MKCALENDAR: string; + const HTTP2_METHOD_MKCOL: string; + const HTTP2_METHOD_MKREDIRECTREF: string; + const HTTP2_METHOD_MKWORKSPACE: string; + const HTTP2_METHOD_MOVE: string; + const HTTP2_METHOD_OPTIONS: string; + const HTTP2_METHOD_ORDERPATCH: string; + const HTTP2_METHOD_PATCH: string; + const HTTP2_METHOD_POST: string; + const HTTP2_METHOD_PRI: string; + const HTTP2_METHOD_PROPFIND: string; + const HTTP2_METHOD_PROPPATCH: string; + const HTTP2_METHOD_PUT: string; + const HTTP2_METHOD_REBIND: string; + const HTTP2_METHOD_REPORT: string; + const HTTP2_METHOD_SEARCH: string; + const HTTP2_METHOD_TRACE: string; + const HTTP2_METHOD_UNBIND: string; + const HTTP2_METHOD_UNCHECKOUT: string; + const HTTP2_METHOD_UNLINK: string; + const HTTP2_METHOD_UNLOCK: string; + const HTTP2_METHOD_UPDATE: string; + const HTTP2_METHOD_UPDATEREDIRECTREF: string; + const HTTP2_METHOD_VERSION_CONTROL: string; + const HTTP_STATUS_CONTINUE: number; + const HTTP_STATUS_SWITCHING_PROTOCOLS: number; + const HTTP_STATUS_PROCESSING: number; + const HTTP_STATUS_OK: number; + const HTTP_STATUS_CREATED: number; + const HTTP_STATUS_ACCEPTED: number; + const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION: number; + const HTTP_STATUS_NO_CONTENT: number; + const HTTP_STATUS_RESET_CONTENT: number; + const HTTP_STATUS_PARTIAL_CONTENT: number; + const HTTP_STATUS_MULTI_STATUS: number; + const HTTP_STATUS_ALREADY_REPORTED: number; + const HTTP_STATUS_IM_USED: number; + const HTTP_STATUS_MULTIPLE_CHOICES: number; + const HTTP_STATUS_MOVED_PERMANENTLY: number; + const HTTP_STATUS_FOUND: number; + const HTTP_STATUS_SEE_OTHER: number; + const HTTP_STATUS_NOT_MODIFIED: number; + const HTTP_STATUS_USE_PROXY: number; + const HTTP_STATUS_TEMPORARY_REDIRECT: number; + const HTTP_STATUS_PERMANENT_REDIRECT: number; + const HTTP_STATUS_BAD_REQUEST: number; + const HTTP_STATUS_UNAUTHORIZED: number; + const HTTP_STATUS_PAYMENT_REQUIRED: number; + const HTTP_STATUS_FORBIDDEN: number; + const HTTP_STATUS_NOT_FOUND: number; + const HTTP_STATUS_METHOD_NOT_ALLOWED: number; + const HTTP_STATUS_NOT_ACCEPTABLE: number; + const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED: number; + const HTTP_STATUS_REQUEST_TIMEOUT: number; + const HTTP_STATUS_CONFLICT: number; + const HTTP_STATUS_GONE: number; + const HTTP_STATUS_LENGTH_REQUIRED: number; + const HTTP_STATUS_PRECONDITION_FAILED: number; + const HTTP_STATUS_PAYLOAD_TOO_LARGE: number; + const HTTP_STATUS_URI_TOO_LONG: number; + const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE: number; + const HTTP_STATUS_RANGE_NOT_SATISFIABLE: number; + const HTTP_STATUS_EXPECTATION_FAILED: number; + const HTTP_STATUS_TEAPOT: number; + const HTTP_STATUS_MISDIRECTED_REQUEST: number; + const HTTP_STATUS_UNPROCESSABLE_ENTITY: number; + const HTTP_STATUS_LOCKED: number; + const HTTP_STATUS_FAILED_DEPENDENCY: number; + const HTTP_STATUS_UNORDERED_COLLECTION: number; + const HTTP_STATUS_UPGRADE_REQUIRED: number; + const HTTP_STATUS_PRECONDITION_REQUIRED: number; + const HTTP_STATUS_TOO_MANY_REQUESTS: number; + const HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE: number; + const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS: number; + const HTTP_STATUS_INTERNAL_SERVER_ERROR: number; + const HTTP_STATUS_NOT_IMPLEMENTED: number; + const HTTP_STATUS_BAD_GATEWAY: number; + const HTTP_STATUS_SERVICE_UNAVAILABLE: number; + const HTTP_STATUS_GATEWAY_TIMEOUT: number; + const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED: number; + const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES: number; + const HTTP_STATUS_INSUFFICIENT_STORAGE: number; + const HTTP_STATUS_LOOP_DETECTED: number; + const HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED: number; + const HTTP_STATUS_NOT_EXTENDED: number; + const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED: number; + } + /** + * This symbol can be set as a property on the HTTP/2 headers object with + * an array value in order to provide a list of headers considered sensitive. + */ + const sensitiveHeaders: symbol; + /** + * Returns an object containing the default settings for an `Http2Session` instance. This method returns a new object instance every time it is called + * so instances returned may be safely modified for use. + * @since v8.4.0 + */ + function getDefaultSettings(): Settings; + /** + * Returns a `Buffer` instance containing serialized representation of the given + * HTTP/2 settings as specified in the [HTTP/2](https://tools.ietf.org/html/rfc7540) specification. This is intended + * for use with the `HTTP2-Settings` header field. + * + * ```js + * import http2 from 'node:http2'; + * + * const packed = http2.getPackedSettings({ enablePush: false }); + * + * console.log(packed.toString('base64')); + * // Prints: AAIAAAAA + * ``` + * @since v8.4.0 + */ + function getPackedSettings(settings: Settings): NonSharedBuffer; + /** + * Returns a `HTTP/2 Settings Object` containing the deserialized settings from + * the given `Buffer` as generated by `http2.getPackedSettings()`. + * @since v8.4.0 + * @param buf The packed settings. + */ + function getUnpackedSettings(buf: Uint8Array): Settings; + /** + * Returns a `net.Server` instance that creates and manages `Http2Session` instances. + * + * Since there are no browsers known that support [unencrypted HTTP/2](https://http2.github.io/faq/#does-http2-require-encryption), the use of {@link createSecureServer} is necessary when + * communicating + * with browser clients. + * + * ```js + * import http2 from 'node:http2'; + * + * // Create an unencrypted HTTP/2 server. + * // Since there are no browsers known that support + * // unencrypted HTTP/2, the use of `http2.createSecureServer()` + * // is necessary when communicating with browser clients. + * const server = http2.createServer(); + * + * server.on('stream', (stream, headers) => { + * stream.respond({ + * 'content-type': 'text/html; charset=utf-8', + * ':status': 200, + * }); + * stream.end('

Hello World

'); + * }); + * + * server.listen(8000); + * ``` + * @since v8.4.0 + * @param onRequestHandler See `Compatibility API` + */ + function createServer( + onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + ): Http2Server; + function createServer< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + >( + options: ServerOptions, + onRequestHandler?: (request: InstanceType, response: InstanceType) => void, + ): Http2Server; + /** + * Returns a `tls.Server` instance that creates and manages `Http2Session` instances. + * + * ```js + * import http2 from 'node:http2'; + * import fs from 'node:fs'; + * + * const options = { + * key: fs.readFileSync('server-key.pem'), + * cert: fs.readFileSync('server-cert.pem'), + * }; + * + * // Create a secure HTTP/2 server + * const server = http2.createSecureServer(options); + * + * server.on('stream', (stream, headers) => { + * stream.respond({ + * 'content-type': 'text/html; charset=utf-8', + * ':status': 200, + * }); + * stream.end('

Hello World

'); + * }); + * + * server.listen(8443); + * ``` + * @since v8.4.0 + * @param onRequestHandler See `Compatibility API` + */ + function createSecureServer( + onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + ): Http2SecureServer; + function createSecureServer< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + >( + options: SecureServerOptions, + onRequestHandler?: (request: InstanceType, response: InstanceType) => void, + ): Http2SecureServer; + /** + * Returns a `ClientHttp2Session` instance. + * + * ```js + * import http2 from 'node:http2'; + * const client = http2.connect('https://localhost:1234'); + * + * // Use the client + * + * client.close(); + * ``` + * @since v8.4.0 + * @param authority The remote HTTP/2 server to connect to. This must be in the form of a minimal, valid URL with the `http://` or `https://` prefix, host name, and IP port (if a non-default port + * is used). Userinfo (user ID and password), path, querystring, and fragment details in the URL will be ignored. + * @param listener Will be registered as a one-time listener of the {@link 'connect'} event. + */ + function connect( + authority: string | url.URL, + listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void, + ): ClientHttp2Session; + function connect( + authority: string | url.URL, + options?: ClientSessionOptions | SecureClientSessionOptions, + listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void, + ): ClientHttp2Session; + /** + * Create an HTTP/2 server session from an existing socket. + * @param socket A Duplex Stream + * @param options Any `{@link createServer}` options can be provided. + * @since v20.12.0 + */ + function performServerHandshake< + Http1Request extends typeof IncomingMessage = typeof IncomingMessage, + Http1Response extends typeof ServerResponse> = typeof ServerResponse, + Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, + Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, + >( + socket: stream.Duplex, + options?: ServerOptions, + ): ServerHttp2Session; +} +declare module "node:http2" { + export { OutgoingHttpHeaders } from "node:http"; +} +declare module "http2" { + export * from "node:http2"; +} diff --git a/node_modules/@types/node/https.d.ts b/node_modules/@types/node/https.d.ts new file mode 100644 index 0000000..b10aad0 --- /dev/null +++ b/node_modules/@types/node/https.d.ts @@ -0,0 +1,400 @@ +declare module "node:https" { + import * as http from "node:http"; + import { Duplex } from "node:stream"; + import * as tls from "node:tls"; + import { URL } from "node:url"; + interface ServerOptions< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse> = typeof http.ServerResponse, + > extends http.ServerOptions, tls.TlsOptions {} + interface RequestOptions extends http.RequestOptions, tls.SecureContextOptions { + checkServerIdentity?: + | ((hostname: string, cert: tls.DetailedPeerCertificate) => Error | undefined) + | undefined; + rejectUnauthorized?: boolean | undefined; // Defaults to true + servername?: string | undefined; // SNI TLS Extension + } + interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions { + maxCachedSessions?: number | undefined; + } + /** + * An `Agent` object for HTTPS similar to `http.Agent`. See {@link request} for more information. + * + * Like `http.Agent`, the `createConnection(options[, callback])` method can be overridden + * to customize how TLS connections are established. + * + * > See `agent.createConnection()` for details on overriding this method, + * > including asynchronous socket creation with a callback. + * @since v0.4.5 + */ + class Agent extends http.Agent { + constructor(options?: AgentOptions); + options: AgentOptions; + createConnection( + options: RequestOptions, + callback?: (err: Error | null, stream: Duplex) => void, + ): Duplex | null | undefined; + getName(options?: RequestOptions): string; + } + interface ServerEventMap< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse> = typeof http.ServerResponse, + > extends http.ServerEventMap, tls.ServerEventMap {} + /** + * See `http.Server` for more information. + * @since v0.3.4 + */ + class Server< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse> = typeof http.ServerResponse, + > extends tls.Server { + constructor(requestListener?: http.RequestListener); + constructor( + options: ServerOptions, + requestListener?: http.RequestListener, + ); + /** + * Closes all connections connected to this server. + * @since v18.2.0 + */ + closeAllConnections(): void; + /** + * Closes all connections connected to this server which are not sending a request or waiting for a response. + * @since v18.2.0 + */ + closeIdleConnections(): void; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: ServerEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: ServerEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners( + eventName: E, + ): ((...args: ServerEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): ((...args: ServerEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface Server< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse> = typeof http.ServerResponse, + > extends http.Server {} + /** + * ```js + * // curl -k https://localhost:8000/ + * import https from 'node:https'; + * import fs from 'node:fs'; + * + * const options = { + * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), + * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'), + * }; + * + * https.createServer(options, (req, res) => { + * res.writeHead(200); + * res.end('hello world\n'); + * }).listen(8000); + * ``` + * + * Or + * + * ```js + * import https from 'node:https'; + * import fs from 'node:fs'; + * + * const options = { + * pfx: fs.readFileSync('test/fixtures/test_cert.pfx'), + * passphrase: 'sample', + * }; + * + * https.createServer(options, (req, res) => { + * res.writeHead(200); + * res.end('hello world\n'); + * }).listen(8000); + * ``` + * @since v0.3.4 + * @param options Accepts `options` from `createServer`, `createSecureContext` and `createServer`. + * @param requestListener A listener to be added to the `'request'` event. + */ + function createServer< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse> = typeof http.ServerResponse, + >(requestListener?: http.RequestListener): Server; + function createServer< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse> = typeof http.ServerResponse, + >( + options: ServerOptions, + requestListener?: http.RequestListener, + ): Server; + /** + * Makes a request to a secure web server. + * + * The following additional `options` from `tls.connect()` are also accepted: `ca`, `cert`, `ciphers`, `clientCertEngine`, `crl`, `dhparam`, `ecdhCurve`, `honorCipherOrder`, `key`, `passphrase`, + * `pfx`, `rejectUnauthorized`, `secureOptions`, `secureProtocol`, `servername`, `sessionIdContext`, `highWaterMark`. + * + * `options` can be an object, a string, or a `URL` object. If `options` is a + * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. + * + * `https.request()` returns an instance of the `http.ClientRequest` class. The `ClientRequest` instance is a writable stream. If one needs to + * upload a file with a POST request, then write to the `ClientRequest` object. + * + * ```js + * import https from 'node:https'; + * + * const options = { + * hostname: 'encrypted.google.com', + * port: 443, + * path: '/', + * method: 'GET', + * }; + * + * const req = https.request(options, (res) => { + * console.log('statusCode:', res.statusCode); + * console.log('headers:', res.headers); + * + * res.on('data', (d) => { + * process.stdout.write(d); + * }); + * }); + * + * req.on('error', (e) => { + * console.error(e); + * }); + * req.end(); + * ``` + * + * Example using options from `tls.connect()`: + * + * ```js + * const options = { + * hostname: 'encrypted.google.com', + * port: 443, + * path: '/', + * method: 'GET', + * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), + * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'), + * }; + * options.agent = new https.Agent(options); + * + * const req = https.request(options, (res) => { + * // ... + * }); + * ``` + * + * Alternatively, opt out of connection pooling by not using an `Agent`. + * + * ```js + * const options = { + * hostname: 'encrypted.google.com', + * port: 443, + * path: '/', + * method: 'GET', + * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), + * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'), + * agent: false, + * }; + * + * const req = https.request(options, (res) => { + * // ... + * }); + * ``` + * + * Example using a `URL` as `options`: + * + * ```js + * const options = new URL('https://abc:xyz@example.com'); + * + * const req = https.request(options, (res) => { + * // ... + * }); + * ``` + * + * Example pinning on certificate fingerprint, or the public key (similar to`pin-sha256`): + * + * ```js + * import tls from 'node:tls'; + * import https from 'node:https'; + * import crypto from 'node:crypto'; + * + * function sha256(s) { + * return crypto.createHash('sha256').update(s).digest('base64'); + * } + * const options = { + * hostname: 'github.com', + * port: 443, + * path: '/', + * method: 'GET', + * checkServerIdentity: function(host, cert) { + * // Make sure the certificate is issued to the host we are connected to + * const err = tls.checkServerIdentity(host, cert); + * if (err) { + * return err; + * } + * + * // Pin the public key, similar to HPKP pin-sha256 pinning + * const pubkey256 = 'pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU='; + * if (sha256(cert.pubkey) !== pubkey256) { + * const msg = 'Certificate verification error: ' + + * `The public key of '${cert.subject.CN}' ` + + * 'does not match our pinned fingerprint'; + * return new Error(msg); + * } + * + * // Pin the exact certificate, rather than the pub key + * const cert256 = '25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:' + + * 'D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16'; + * if (cert.fingerprint256 !== cert256) { + * const msg = 'Certificate verification error: ' + + * `The certificate of '${cert.subject.CN}' ` + + * 'does not match our pinned fingerprint'; + * return new Error(msg); + * } + * + * // This loop is informational only. + * // Print the certificate and public key fingerprints of all certs in the + * // chain. Its common to pin the public key of the issuer on the public + * // internet, while pinning the public key of the service in sensitive + * // environments. + * do { + * console.log('Subject Common Name:', cert.subject.CN); + * console.log(' Certificate SHA256 fingerprint:', cert.fingerprint256); + * + * hash = crypto.createHash('sha256'); + * console.log(' Public key ping-sha256:', sha256(cert.pubkey)); + * + * lastprint256 = cert.fingerprint256; + * cert = cert.issuerCertificate; + * } while (cert.fingerprint256 !== lastprint256); + * + * }, + * }; + * + * options.agent = new https.Agent(options); + * const req = https.request(options, (res) => { + * console.log('All OK. Server matched our pinned cert or public key'); + * console.log('statusCode:', res.statusCode); + * // Print the HPKP values + * console.log('headers:', res.headers['public-key-pins']); + * + * res.on('data', (d) => {}); + * }); + * + * req.on('error', (e) => { + * console.error(e.message); + * }); + * req.end(); + * ``` + * + * Outputs for example: + * + * ```text + * Subject Common Name: github.com + * Certificate SHA256 fingerprint: 25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16 + * Public key ping-sha256: pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU= + * Subject Common Name: DigiCert SHA2 Extended Validation Server CA + * Certificate SHA256 fingerprint: 40:3E:06:2A:26:53:05:91:13:28:5B:AF:80:A0:D4:AE:42:2C:84:8C:9F:78:FA:D0:1F:C9:4B:C5:B8:7F:EF:1A + * Public key ping-sha256: RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho= + * Subject Common Name: DigiCert High Assurance EV Root CA + * Certificate SHA256 fingerprint: 74:31:E5:F4:C3:C1:CE:46:90:77:4F:0B:61:E0:54:40:88:3B:A9:A0:1E:D0:0B:A6:AB:D7:80:6E:D3:B1:18:CF + * Public key ping-sha256: WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18= + * All OK. Server matched our pinned cert or public key + * statusCode: 200 + * headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho="; + * pin-sha256="k2v657xBsOVe1PQRwOsHsw3bsGT2VzIqz5K+59sNQws="; pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="IQBnNBEiFuhj+8x6X8XLgh01V9Ic5/V3IRQLNFFc7v4="; + * pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0="; pin-sha256="LvRiGEjRqfzurezaWuj8Wie2gyHMrW5Q06LspMnox7A="; includeSubDomains + * ``` + * @since v0.3.6 + * @param options Accepts all `options` from `request`, with some differences in default values: + */ + function request( + options: RequestOptions | string | URL, + callback?: (res: http.IncomingMessage) => void, + ): http.ClientRequest; + function request( + url: string | URL, + options: RequestOptions, + callback?: (res: http.IncomingMessage) => void, + ): http.ClientRequest; + /** + * Like `http.get()` but for HTTPS. + * + * `options` can be an object, a string, or a `URL` object. If `options` is a + * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. + * + * ```js + * import https from 'node:https'; + * + * https.get('https://encrypted.google.com/', (res) => { + * console.log('statusCode:', res.statusCode); + * console.log('headers:', res.headers); + * + * res.on('data', (d) => { + * process.stdout.write(d); + * }); + * + * }).on('error', (e) => { + * console.error(e); + * }); + * ``` + * @since v0.3.6 + * @param options Accepts the same `options` as {@link request}, with the `method` always set to `GET`. + */ + function get( + options: RequestOptions | string | URL, + callback?: (res: http.IncomingMessage) => void, + ): http.ClientRequest; + function get( + url: string | URL, + options: RequestOptions, + callback?: (res: http.IncomingMessage) => void, + ): http.ClientRequest; + let globalAgent: Agent; +} +declare module "https" { + export * from "node:https"; +} diff --git a/node_modules/@types/node/index.d.ts b/node_modules/@types/node/index.d.ts new file mode 100644 index 0000000..c8cdf6b --- /dev/null +++ b/node_modules/@types/node/index.d.ts @@ -0,0 +1,116 @@ +/** + * License for programmatically and manually incorporated + * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc + * + * Copyright Node.js contributors. All rights reserved. + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +// NOTE: These definitions support Node.js and TypeScript 5.8+. + +// Reference required TypeScript libraries: +/// +/// +/// + +// Definitions for Node.js modules specific to TypeScript 5.7+: +/// +/// + +// Definitions for Node.js modules that are not specific to any version of TypeScript: +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// diff --git a/node_modules/@types/node/inspector.d.ts b/node_modules/@types/node/inspector.d.ts new file mode 100644 index 0000000..0dd4ca9 --- /dev/null +++ b/node_modules/@types/node/inspector.d.ts @@ -0,0 +1,265 @@ +declare module "node:inspector" { + import { EventEmitter } from "node:events"; + /** + * The `inspector.Session` is used for dispatching messages to the V8 inspector + * back-end and receiving message responses and notifications. + */ + class Session extends EventEmitter { + /** + * Create a new instance of the inspector.Session class. + * The inspector session needs to be connected through `session.connect()` before the messages can be dispatched to the inspector backend. + */ + constructor(); + /** + * Connects a session to the inspector back-end. + */ + connect(): void; + /** + * Connects a session to the inspector back-end. + * An exception will be thrown if this API was not called on a Worker thread. + * @since v12.11.0 + */ + connectToMainThread(): void; + /** + * Immediately close the session. All pending message callbacks will be called with an error. + * `session.connect()` will need to be called to be able to send messages again. + * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints. + */ + disconnect(): void; + } + /** + * Activate inspector on host and port. Equivalent to `node --inspect=[[host:]port]`, but can be done programmatically after node has + * started. + * + * If wait is `true`, will block until a client has connected to the inspect port + * and flow control has been passed to the debugger client. + * + * See the [security warning](https://nodejs.org/docs/latest-v26.x/api/cli.html#warning-binding-inspector-to-a-public-ipport-combination-is-insecure) + * regarding the `host` parameter usage. + * @param port Port to listen on for inspector connections. Defaults to what was specified on the CLI. + * @param host Host to listen on for inspector connections. Defaults to what was specified on the CLI. + * @param wait Block until a client has connected. Defaults to what was specified on the CLI. + * @returns Disposable that calls `inspector.close()`. + */ + function open(port?: number, host?: string, wait?: boolean): Disposable; + /** + * Deactivates the inspector. If there are active connections, they are forcibly + * terminated. Blocks until the inspector server has fully stopped. + */ + function close(): void; + /** + * Return the URL of the active inspector, or `undefined` if there is none. + * + * ```console + * $ node --inspect -p 'inspector.url()' + * Debugger listening on ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34 + * For help, see: https://nodejs.org/en/docs/inspector + * ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34 + * + * $ node --inspect=localhost:3000 -p 'inspector.url()' + * Debugger listening on ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a + * For help, see: https://nodejs.org/en/docs/inspector + * ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a + * + * $ node -p 'inspector.url()' + * undefined + * ``` + */ + function url(): string | undefined; + /** + * Blocks until a client (existing or connected later) has sent `Runtime.runIfWaitingForDebugger` command. + * + * An exception will be thrown if there is no active inspector. + * @since v12.7.0 + */ + function waitForDebugger(): void; + // These methods are exposed by the V8 inspector console API (inspector/v8-console.h). + // The method signatures differ from those of the Node.js console, and are deliberately + // typed permissively. + interface InspectorConsole { + debug(...data: any[]): void; + error(...data: any[]): void; + info(...data: any[]): void; + log(...data: any[]): void; + warn(...data: any[]): void; + dir(...data: any[]): void; + dirxml(...data: any[]): void; + table(...data: any[]): void; + trace(...data: any[]): void; + group(...data: any[]): void; + groupCollapsed(...data: any[]): void; + groupEnd(...data: any[]): void; + clear(...data: any[]): void; + count(label?: any): void; + countReset(label?: any): void; + assert(value?: any, ...data: any[]): void; + profile(label?: any): void; + profileEnd(label?: any): void; + time(label?: any): void; + timeLog(label?: any): void; + timeStamp(label?: any): void; + } + /** + * An object to send messages to the remote inspector console. + * @since v11.0.0 + */ + const console: InspectorConsole; + // DevTools protocol event broadcast methods + namespace Network { + /** + * This feature is only available with the `--experimental-network-inspection` flag enabled. + * + * Broadcasts the `Network.requestWillBeSent` event to connected frontends. This event indicates that + * the application is about to send an HTTP request. + * @since v22.6.0 + */ + function requestWillBeSent(params: RequestWillBeSentEventDataType): void; + /** + * This feature is only available with the `--experimental-network-inspection` flag enabled. + * + * Broadcasts the `Network.dataReceived` event to connected frontends, or buffers the data if + * `Network.streamResourceContent` command was not invoked for the given request yet. + * + * Also enables `Network.getResponseBody` command to retrieve the response data. + * @since v24.2.0 + */ + function dataReceived(params: DataReceivedEventDataType): void; + /** + * This feature is only available with the `--experimental-network-inspection` flag enabled. + * + * Enables `Network.getRequestPostData` command to retrieve the request data. + * @since v24.3.0 + */ + function dataSent(params: unknown): void; + /** + * This feature is only available with the `--experimental-network-inspection` flag enabled. + * + * Broadcasts the `Network.responseReceived` event to connected frontends. This event indicates that + * HTTP response is available. + * @since v22.6.0 + */ + function responseReceived(params: ResponseReceivedEventDataType): void; + /** + * This feature is only available with the `--experimental-network-inspection` flag enabled. + * + * Broadcasts the `Network.loadingFinished` event to connected frontends. This event indicates that + * HTTP request has finished loading. + * @since v22.6.0 + */ + function loadingFinished(params: LoadingFinishedEventDataType): void; + /** + * This feature is only available with the `--experimental-network-inspection` flag enabled. + * + * Broadcasts the `Network.loadingFailed` event to connected frontends. This event indicates that + * HTTP request has failed to load. + * @since v22.7.0 + */ + function loadingFailed(params: LoadingFailedEventDataType): void; + /** + * This feature is only available with the `--experimental-network-inspection` flag enabled. + * + * Broadcasts the `Network.webSocketCreated` event to connected frontends. This event indicates that + * a WebSocket connection has been initiated. + * @since v24.7.0 + */ + function webSocketCreated(params: WebSocketCreatedEventDataType): void; + /** + * This feature is only available with the `--experimental-network-inspection` flag enabled. + * + * Broadcasts the `Network.webSocketHandshakeResponseReceived` event to connected frontends. + * This event indicates that the WebSocket handshake response has been received. + * @since v24.7.0 + */ + function webSocketHandshakeResponseReceived(params: WebSocketHandshakeResponseReceivedEventDataType): void; + /** + * This feature is only available with the `--experimental-network-inspection` flag enabled. + * + * Broadcasts the `Network.webSocketClosed` event to connected frontends. + * This event indicates that a WebSocket connection has been closed. + * @since v24.7.0 + */ + function webSocketClosed(params: WebSocketClosedEventDataType): void; + } + namespace NetworkResources { + /** + * This feature is only available with the `--experimental-inspector-network-resource` flag enabled. + * + * The inspector.NetworkResources.put method is used to provide a response for a loadNetworkResource + * request issued via the Chrome DevTools Protocol (CDP). + * This is typically triggered when a source map is specified by URL, and a DevTools frontend—such as + * Chrome—requests the resource to retrieve the source map. + * + * This method allows developers to predefine the resource content to be served in response to such CDP requests. + * + * ```js + * const inspector = require('node:inspector'); + * // By preemptively calling put to register the resource, a source map can be resolved when + * // a loadNetworkResource request is made from the frontend. + * async function setNetworkResources() { + * const mapUrl = 'http://localhost:3000/dist/app.js.map'; + * const tsUrl = 'http://localhost:3000/src/app.ts'; + * const distAppJsMap = await fetch(mapUrl).then((res) => res.text()); + * const srcAppTs = await fetch(tsUrl).then((res) => res.text()); + * inspector.NetworkResources.put(mapUrl, distAppJsMap); + * inspector.NetworkResources.put(tsUrl, srcAppTs); + * }; + * setNetworkResources().then(() => { + * require('./dist/app'); + * }); + * ``` + * + * For more details, see the official CDP documentation: [Network.loadNetworkResource](https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-loadNetworkResource) + * @since v24.5.0 + * @experimental + */ + function put(url: string, data: string): void; + } + namespace DOMStorage { + /** + * This feature is only available with the + * `--experimental-storage-inspection` flag enabled. + * + * Broadcasts the `DOMStorage.domStorageItemAdded` event to connected frontends. + * This event indicates that a new item has been added to the storage. + * @since v25.5.0 + */ + function domStorageItemAdded(params: DomStorageItemAddedEventDataType): void; + /** + * This feature is only available with the + * `--experimental-storage-inspection` flag enabled. + * + * Broadcasts the `DOMStorage.domStorageItemRemoved` event to connected frontends. + * This event indicates that an item has been removed from the storage. + * @since v25.5.0 + */ + function domStorageItemRemoved(params: DomStorageItemRemovedEventDataType): void; + /** + * This feature is only available with the + * `--experimental-storage-inspection` flag enabled. + + * Broadcasts the `DOMStorage.domStorageItemUpdated` event to connected frontends. + * This event indicates that a storage item has been updated. + * @since v25.5.0 + */ + function domStorageItemUpdated(params: DomStorageItemUpdatedEventDataType): void; + /** + * This feature is only available with the + * `--experimental-storage-inspection` flag enabled. + * + * Broadcasts the `DOMStorage.domStorageItemsCleared` event to connected + * frontends. This event indicates that all items have been cleared from the + * storage. + * @since v25.5.0 + */ + function domStorageItemsCleared(params: DomStorageItemsClearedEventDataType): void; + /** + * This feature is only available with the + * `--experimental-storage-inspection` flag enabled. + * @since v25.5.0 + */ + function registerStorage(params: unknown): void; + } +} +declare module "inspector" { + export * from "node:inspector"; +} diff --git a/node_modules/@types/node/inspector.generated.d.ts b/node_modules/@types/node/inspector.generated.d.ts new file mode 100644 index 0000000..0e2e441 --- /dev/null +++ b/node_modules/@types/node/inspector.generated.d.ts @@ -0,0 +1,4406 @@ +// These definitions are automatically generated by the generate-inspector script. +// Do not edit this file directly. +// See scripts/generate-inspector/README.md for information on how to update the protocol definitions. +// Changes to the module itself should be added to the generator template (scripts/generate-inspector/inspector.d.ts.template). + +declare module "node:inspector" { + interface InspectorNotification { + method: string; + params: T; + } + namespace Schema { + /** + * Description of the protocol domain. + */ + interface Domain { + /** + * Domain name. + */ + name: string; + /** + * Domain version. + */ + version: string; + } + interface GetDomainsReturnType { + /** + * List of supported domains. + */ + domains: Domain[]; + } + } + namespace Runtime { + /** + * Unique script identifier. + */ + type ScriptId = string; + /** + * Unique object identifier. + */ + type RemoteObjectId = string; + /** + * Primitive value which cannot be JSON-stringified. + */ + type UnserializableValue = string; + /** + * Mirror object referencing original JavaScript object. + */ + interface RemoteObject { + /** + * Object type. + */ + type: string; + /** + * Object subtype hint. Specified for object type values only. + */ + subtype?: string | undefined; + /** + * Object class (constructor) name. Specified for object type values only. + */ + className?: string | undefined; + /** + * Remote object value in case of primitive values or JSON values (if it was requested). + */ + value?: any; + /** + * Primitive value which can not be JSON-stringified does not have value, but gets this property. + */ + unserializableValue?: UnserializableValue | undefined; + /** + * String representation of the object. + */ + description?: string | undefined; + /** + * Unique object identifier (for non-primitive values). + */ + objectId?: RemoteObjectId | undefined; + /** + * Preview containing abbreviated property values. Specified for object type values only. + * @experimental + */ + preview?: ObjectPreview | undefined; + /** + * @experimental + */ + customPreview?: CustomPreview | undefined; + } + /** + * @experimental + */ + interface CustomPreview { + header: string; + hasBody: boolean; + formatterObjectId: RemoteObjectId; + bindRemoteObjectFunctionId: RemoteObjectId; + configObjectId?: RemoteObjectId | undefined; + } + /** + * Object containing abbreviated remote object value. + * @experimental + */ + interface ObjectPreview { + /** + * Object type. + */ + type: string; + /** + * Object subtype hint. Specified for object type values only. + */ + subtype?: string | undefined; + /** + * String representation of the object. + */ + description?: string | undefined; + /** + * True iff some of the properties or entries of the original object did not fit. + */ + overflow: boolean; + /** + * List of the properties. + */ + properties: PropertyPreview[]; + /** + * List of the entries. Specified for map and set subtype values only. + */ + entries?: EntryPreview[] | undefined; + } + /** + * @experimental + */ + interface PropertyPreview { + /** + * Property name. + */ + name: string; + /** + * Object type. Accessor means that the property itself is an accessor property. + */ + type: string; + /** + * User-friendly property value string. + */ + value?: string | undefined; + /** + * Nested value preview. + */ + valuePreview?: ObjectPreview | undefined; + /** + * Object subtype hint. Specified for object type values only. + */ + subtype?: string | undefined; + } + /** + * @experimental + */ + interface EntryPreview { + /** + * Preview of the key. Specified for map-like collection entries. + */ + key?: ObjectPreview | undefined; + /** + * Preview of the value. + */ + value: ObjectPreview; + } + /** + * Object property descriptor. + */ + interface PropertyDescriptor { + /** + * Property name or symbol description. + */ + name: string; + /** + * The value associated with the property. + */ + value?: RemoteObject | undefined; + /** + * True if the value associated with the property may be changed (data descriptors only). + */ + writable?: boolean | undefined; + /** + * A function which serves as a getter for the property, or undefined if there is no getter (accessor descriptors only). + */ + get?: RemoteObject | undefined; + /** + * A function which serves as a setter for the property, or undefined if there is no setter (accessor descriptors only). + */ + set?: RemoteObject | undefined; + /** + * True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object. + */ + configurable: boolean; + /** + * True if this property shows up during enumeration of the properties on the corresponding object. + */ + enumerable: boolean; + /** + * True if the result was thrown during the evaluation. + */ + wasThrown?: boolean | undefined; + /** + * True if the property is owned for the object. + */ + isOwn?: boolean | undefined; + /** + * Property symbol object, if the property is of the symbol type. + */ + symbol?: RemoteObject | undefined; + } + /** + * Object internal property descriptor. This property isn't normally visible in JavaScript code. + */ + interface InternalPropertyDescriptor { + /** + * Conventional property name. + */ + name: string; + /** + * The value associated with the property. + */ + value?: RemoteObject | undefined; + } + /** + * Represents function call argument. Either remote object id objectId, primitive value, unserializable primitive value or neither of (for undefined) them should be specified. + */ + interface CallArgument { + /** + * Primitive value or serializable javascript object. + */ + value?: any; + /** + * Primitive value which can not be JSON-stringified. + */ + unserializableValue?: UnserializableValue | undefined; + /** + * Remote object handle. + */ + objectId?: RemoteObjectId | undefined; + } + /** + * Id of an execution context. + */ + type ExecutionContextId = number; + /** + * Description of an isolated world. + */ + interface ExecutionContextDescription { + /** + * Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed. + */ + id: ExecutionContextId; + /** + * Execution context origin. + */ + origin: string; + /** + * Human readable name describing given context. + */ + name: string; + /** + * Embedder-specific auxiliary data. + */ + auxData?: object | undefined; + } + /** + * Detailed information about exception (or error) that was thrown during script compilation or execution. + */ + interface ExceptionDetails { + /** + * Exception id. + */ + exceptionId: number; + /** + * Exception text, which should be used together with exception object when available. + */ + text: string; + /** + * Line number of the exception location (0-based). + */ + lineNumber: number; + /** + * Column number of the exception location (0-based). + */ + columnNumber: number; + /** + * Script ID of the exception location. + */ + scriptId?: ScriptId | undefined; + /** + * URL of the exception location, to be used when the script was not reported. + */ + url?: string | undefined; + /** + * JavaScript stack trace if available. + */ + stackTrace?: StackTrace | undefined; + /** + * Exception object if available. + */ + exception?: RemoteObject | undefined; + /** + * Identifier of the context where exception happened. + */ + executionContextId?: ExecutionContextId | undefined; + } + /** + * Number of milliseconds since epoch. + */ + type Timestamp = number; + /** + * Stack entry for runtime errors and assertions. + */ + interface CallFrame { + /** + * JavaScript function name. + */ + functionName: string; + /** + * JavaScript script id. + */ + scriptId: ScriptId; + /** + * JavaScript script name or url. + */ + url: string; + /** + * JavaScript script line number (0-based). + */ + lineNumber: number; + /** + * JavaScript script column number (0-based). + */ + columnNumber: number; + } + /** + * Call frames for assertions or error messages. + */ + interface StackTrace { + /** + * String label of this stack trace. For async traces this may be a name of the function that initiated the async call. + */ + description?: string | undefined; + /** + * JavaScript function name. + */ + callFrames: CallFrame[]; + /** + * Asynchronous JavaScript stack trace that preceded this stack, if available. + */ + parent?: StackTrace | undefined; + /** + * Asynchronous JavaScript stack trace that preceded this stack, if available. + * @experimental + */ + parentId?: StackTraceId | undefined; + } + /** + * Unique identifier of current debugger. + * @experimental + */ + type UniqueDebuggerId = string; + /** + * If debuggerId is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See Runtime.StackTrace and Debugger.paused for usages. + * @experimental + */ + interface StackTraceId { + id: string; + debuggerId?: UniqueDebuggerId | undefined; + } + interface EvaluateParameterType { + /** + * Expression to evaluate. + */ + expression: string; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string | undefined; + /** + * Determines whether Command Line API should be available during the evaluation. + */ + includeCommandLineAPI?: boolean | undefined; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean | undefined; + /** + * Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page. + */ + contextId?: ExecutionContextId | undefined; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean | undefined; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean | undefined; + /** + * Whether execution should be treated as initiated by user in the UI. + */ + userGesture?: boolean | undefined; + /** + * Whether execution should await for resulting value and return once awaited promise is resolved. + */ + awaitPromise?: boolean | undefined; + } + interface AwaitPromiseParameterType { + /** + * Identifier of the promise. + */ + promiseObjectId: RemoteObjectId; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean | undefined; + /** + * Whether preview should be generated for the result. + */ + generatePreview?: boolean | undefined; + } + interface CallFunctionOnParameterType { + /** + * Declaration of the function to call. + */ + functionDeclaration: string; + /** + * Identifier of the object to call function on. Either objectId or executionContextId should be specified. + */ + objectId?: RemoteObjectId | undefined; + /** + * Call arguments. All call arguments must belong to the same JavaScript world as the target object. + */ + arguments?: CallArgument[] | undefined; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean | undefined; + /** + * Whether the result is expected to be a JSON object which should be sent by value. + */ + returnByValue?: boolean | undefined; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean | undefined; + /** + * Whether execution should be treated as initiated by user in the UI. + */ + userGesture?: boolean | undefined; + /** + * Whether execution should await for resulting value and return once awaited promise is resolved. + */ + awaitPromise?: boolean | undefined; + /** + * Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified. + */ + executionContextId?: ExecutionContextId | undefined; + /** + * Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object. + */ + objectGroup?: string | undefined; + } + interface GetPropertiesParameterType { + /** + * Identifier of the object to return properties for. + */ + objectId: RemoteObjectId; + /** + * If true, returns properties belonging only to the element itself, not to its prototype chain. + */ + ownProperties?: boolean | undefined; + /** + * If true, returns accessor properties (with getter/setter) only; internal properties are not returned either. + * @experimental + */ + accessorPropertiesOnly?: boolean | undefined; + /** + * Whether preview should be generated for the results. + * @experimental + */ + generatePreview?: boolean | undefined; + } + interface ReleaseObjectParameterType { + /** + * Identifier of the object to release. + */ + objectId: RemoteObjectId; + } + interface ReleaseObjectGroupParameterType { + /** + * Symbolic object group name. + */ + objectGroup: string; + } + interface SetCustomObjectFormatterEnabledParameterType { + enabled: boolean; + } + interface CompileScriptParameterType { + /** + * Expression to compile. + */ + expression: string; + /** + * Source url to be set for the script. + */ + sourceURL: string; + /** + * Specifies whether the compiled script should be persisted. + */ + persistScript: boolean; + /** + * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. + */ + executionContextId?: ExecutionContextId | undefined; + } + interface RunScriptParameterType { + /** + * Id of the script to run. + */ + scriptId: ScriptId; + /** + * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. + */ + executionContextId?: ExecutionContextId | undefined; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string | undefined; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean | undefined; + /** + * Determines whether Command Line API should be available during the evaluation. + */ + includeCommandLineAPI?: boolean | undefined; + /** + * Whether the result is expected to be a JSON object which should be sent by value. + */ + returnByValue?: boolean | undefined; + /** + * Whether preview should be generated for the result. + */ + generatePreview?: boolean | undefined; + /** + * Whether execution should await for resulting value and return once awaited promise is resolved. + */ + awaitPromise?: boolean | undefined; + } + interface QueryObjectsParameterType { + /** + * Identifier of the prototype to return objects for. + */ + prototypeObjectId: RemoteObjectId; + } + interface GlobalLexicalScopeNamesParameterType { + /** + * Specifies in which execution context to lookup global scope variables. + */ + executionContextId?: ExecutionContextId | undefined; + } + interface EvaluateReturnType { + /** + * Evaluation result. + */ + result: RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface AwaitPromiseReturnType { + /** + * Promise result. Will contain rejected value if promise was rejected. + */ + result: RemoteObject; + /** + * Exception details if stack strace is available. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface CallFunctionOnReturnType { + /** + * Call result. + */ + result: RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface GetPropertiesReturnType { + /** + * Object properties. + */ + result: PropertyDescriptor[]; + /** + * Internal object properties (only of the element itself). + */ + internalProperties?: InternalPropertyDescriptor[] | undefined; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface CompileScriptReturnType { + /** + * Id of the script. + */ + scriptId?: ScriptId | undefined; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface RunScriptReturnType { + /** + * Run result. + */ + result: RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface QueryObjectsReturnType { + /** + * Array with objects. + */ + objects: RemoteObject; + } + interface GlobalLexicalScopeNamesReturnType { + names: string[]; + } + interface ExecutionContextCreatedEventDataType { + /** + * A newly created execution context. + */ + context: ExecutionContextDescription; + } + interface ExecutionContextDestroyedEventDataType { + /** + * Id of the destroyed context + */ + executionContextId: ExecutionContextId; + } + interface ExceptionThrownEventDataType { + /** + * Timestamp of the exception. + */ + timestamp: Timestamp; + exceptionDetails: ExceptionDetails; + } + interface ExceptionRevokedEventDataType { + /** + * Reason describing why exception was revoked. + */ + reason: string; + /** + * The id of revoked exception, as reported in exceptionThrown. + */ + exceptionId: number; + } + interface ConsoleAPICalledEventDataType { + /** + * Type of the call. + */ + type: string; + /** + * Call arguments. + */ + args: RemoteObject[]; + /** + * Identifier of the context where the call was made. + */ + executionContextId: ExecutionContextId; + /** + * Call timestamp. + */ + timestamp: Timestamp; + /** + * Stack trace captured when the call was made. + */ + stackTrace?: StackTrace | undefined; + /** + * Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context. + * @experimental + */ + context?: string | undefined; + } + interface InspectRequestedEventDataType { + object: RemoteObject; + hints: object; + } + } + namespace Debugger { + /** + * Breakpoint identifier. + */ + type BreakpointId = string; + /** + * Call frame identifier. + */ + type CallFrameId = string; + /** + * Location in the source code. + */ + interface Location { + /** + * Script identifier as reported in the Debugger.scriptParsed. + */ + scriptId: Runtime.ScriptId; + /** + * Line number in the script (0-based). + */ + lineNumber: number; + /** + * Column number in the script (0-based). + */ + columnNumber?: number | undefined; + } + /** + * Location in the source code. + * @experimental + */ + interface ScriptPosition { + lineNumber: number; + columnNumber: number; + } + /** + * JavaScript call frame. Array of call frames form the call stack. + */ + interface CallFrame { + /** + * Call frame identifier. This identifier is only valid while the virtual machine is paused. + */ + callFrameId: CallFrameId; + /** + * Name of the JavaScript function called on this call frame. + */ + functionName: string; + /** + * Location in the source code. + */ + functionLocation?: Location | undefined; + /** + * Location in the source code. + */ + location: Location; + /** + * JavaScript script name or url. + */ + url: string; + /** + * Scope chain for this call frame. + */ + scopeChain: Scope[]; + /** + * this object for this call frame. + */ + this: Runtime.RemoteObject; + /** + * The value being returned, if the function is at return point. + */ + returnValue?: Runtime.RemoteObject | undefined; + } + /** + * Scope description. + */ + interface Scope { + /** + * Scope type. + */ + type: string; + /** + * Object representing the scope. For global and with scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties. + */ + object: Runtime.RemoteObject; + name?: string | undefined; + /** + * Location in the source code where scope starts + */ + startLocation?: Location | undefined; + /** + * Location in the source code where scope ends + */ + endLocation?: Location | undefined; + } + /** + * Search match for resource. + */ + interface SearchMatch { + /** + * Line number in resource content. + */ + lineNumber: number; + /** + * Line with match content. + */ + lineContent: string; + } + interface BreakLocation { + /** + * Script identifier as reported in the Debugger.scriptParsed. + */ + scriptId: Runtime.ScriptId; + /** + * Line number in the script (0-based). + */ + lineNumber: number; + /** + * Column number in the script (0-based). + */ + columnNumber?: number | undefined; + type?: string | undefined; + } + interface SetBreakpointsActiveParameterType { + /** + * New value for breakpoints active state. + */ + active: boolean; + } + interface SetSkipAllPausesParameterType { + /** + * New value for skip pauses state. + */ + skip: boolean; + } + interface SetBreakpointByUrlParameterType { + /** + * Line number to set breakpoint at. + */ + lineNumber: number; + /** + * URL of the resources to set breakpoint on. + */ + url?: string | undefined; + /** + * Regex pattern for the URLs of the resources to set breakpoints on. Either url or urlRegex must be specified. + */ + urlRegex?: string | undefined; + /** + * Script hash of the resources to set breakpoint on. + */ + scriptHash?: string | undefined; + /** + * Offset in the line to set breakpoint at. + */ + columnNumber?: number | undefined; + /** + * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. + */ + condition?: string | undefined; + } + interface SetBreakpointParameterType { + /** + * Location to set breakpoint in. + */ + location: Location; + /** + * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. + */ + condition?: string | undefined; + } + interface RemoveBreakpointParameterType { + breakpointId: BreakpointId; + } + interface GetPossibleBreakpointsParameterType { + /** + * Start of range to search possible breakpoint locations in. + */ + start: Location; + /** + * End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range. + */ + end?: Location | undefined; + /** + * Only consider locations which are in the same (non-nested) function as start. + */ + restrictToFunction?: boolean | undefined; + } + interface ContinueToLocationParameterType { + /** + * Location to continue to. + */ + location: Location; + targetCallFrames?: string | undefined; + } + interface PauseOnAsyncCallParameterType { + /** + * Debugger will pause when async call with given stack trace is started. + */ + parentStackTraceId: Runtime.StackTraceId; + } + interface StepIntoParameterType { + /** + * Debugger will issue additional Debugger.paused notification if any async task is scheduled before next pause. + * @experimental + */ + breakOnAsyncCall?: boolean | undefined; + } + interface GetStackTraceParameterType { + stackTraceId: Runtime.StackTraceId; + } + interface SearchInContentParameterType { + /** + * Id of the script to search in. + */ + scriptId: Runtime.ScriptId; + /** + * String to search for. + */ + query: string; + /** + * If true, search is case sensitive. + */ + caseSensitive?: boolean | undefined; + /** + * If true, treats string parameter as regex. + */ + isRegex?: boolean | undefined; + } + interface SetScriptSourceParameterType { + /** + * Id of the script to edit. + */ + scriptId: Runtime.ScriptId; + /** + * New content of the script. + */ + scriptSource: string; + /** + * If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code. + */ + dryRun?: boolean | undefined; + } + interface RestartFrameParameterType { + /** + * Call frame identifier to evaluate on. + */ + callFrameId: CallFrameId; + } + interface GetScriptSourceParameterType { + /** + * Id of the script to get source for. + */ + scriptId: Runtime.ScriptId; + } + interface SetPauseOnExceptionsParameterType { + /** + * Pause on exceptions mode. + */ + state: string; + } + interface EvaluateOnCallFrameParameterType { + /** + * Call frame identifier to evaluate on. + */ + callFrameId: CallFrameId; + /** + * Expression to evaluate. + */ + expression: string; + /** + * String object group name to put result into (allows rapid releasing resulting object handles using releaseObjectGroup). + */ + objectGroup?: string | undefined; + /** + * Specifies whether command line API should be available to the evaluated expression, defaults to false. + */ + includeCommandLineAPI?: boolean | undefined; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean | undefined; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean | undefined; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean | undefined; + /** + * Whether to throw an exception if side effect cannot be ruled out during evaluation. + */ + throwOnSideEffect?: boolean | undefined; + } + interface SetVariableValueParameterType { + /** + * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually. + */ + scopeNumber: number; + /** + * Variable name. + */ + variableName: string; + /** + * New variable value. + */ + newValue: Runtime.CallArgument; + /** + * Id of callframe that holds variable. + */ + callFrameId: CallFrameId; + } + interface SetReturnValueParameterType { + /** + * New return value. + */ + newValue: Runtime.CallArgument; + } + interface SetAsyncCallStackDepthParameterType { + /** + * Maximum depth of async call stacks. Setting to 0 will effectively disable collecting async call stacks (default). + */ + maxDepth: number; + } + interface SetBlackboxPatternsParameterType { + /** + * Array of regexps that will be used to check script url for blackbox state. + */ + patterns: string[]; + } + interface SetBlackboxedRangesParameterType { + /** + * Id of the script. + */ + scriptId: Runtime.ScriptId; + positions: ScriptPosition[]; + } + interface EnableReturnType { + /** + * Unique identifier of the debugger. + * @experimental + */ + debuggerId: Runtime.UniqueDebuggerId; + } + interface SetBreakpointByUrlReturnType { + /** + * Id of the created breakpoint for further reference. + */ + breakpointId: BreakpointId; + /** + * List of the locations this breakpoint resolved into upon addition. + */ + locations: Location[]; + } + interface SetBreakpointReturnType { + /** + * Id of the created breakpoint for further reference. + */ + breakpointId: BreakpointId; + /** + * Location this breakpoint resolved into. + */ + actualLocation: Location; + } + interface GetPossibleBreakpointsReturnType { + /** + * List of the possible breakpoint locations. + */ + locations: BreakLocation[]; + } + interface GetStackTraceReturnType { + stackTrace: Runtime.StackTrace; + } + interface SearchInContentReturnType { + /** + * List of search matches. + */ + result: SearchMatch[]; + } + interface SetScriptSourceReturnType { + /** + * New stack trace in case editing has happened while VM was stopped. + */ + callFrames?: CallFrame[] | undefined; + /** + * Whether current call stack was modified after applying the changes. + */ + stackChanged?: boolean | undefined; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace | undefined; + /** + * Async stack trace, if any. + * @experimental + */ + asyncStackTraceId?: Runtime.StackTraceId | undefined; + /** + * Exception details if any. + */ + exceptionDetails?: Runtime.ExceptionDetails | undefined; + } + interface RestartFrameReturnType { + /** + * New stack trace. + */ + callFrames: CallFrame[]; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace | undefined; + /** + * Async stack trace, if any. + * @experimental + */ + asyncStackTraceId?: Runtime.StackTraceId | undefined; + } + interface GetScriptSourceReturnType { + /** + * Script source. + */ + scriptSource: string; + } + interface EvaluateOnCallFrameReturnType { + /** + * Object wrapper for the evaluation result. + */ + result: Runtime.RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: Runtime.ExceptionDetails | undefined; + } + interface ScriptParsedEventDataType { + /** + * Identifier of the script parsed. + */ + scriptId: Runtime.ScriptId; + /** + * URL or name of the script parsed (if any). + */ + url: string; + /** + * Line offset of the script within the resource with given URL (for script tags). + */ + startLine: number; + /** + * Column offset of the script within the resource with given URL. + */ + startColumn: number; + /** + * Last line of the script. + */ + endLine: number; + /** + * Length of the last line of the script. + */ + endColumn: number; + /** + * Specifies script creation context. + */ + executionContextId: Runtime.ExecutionContextId; + /** + * Content hash of the script. + */ + hash: string; + /** + * Embedder-specific auxiliary data. + */ + executionContextAuxData?: object | undefined; + /** + * True, if this script is generated as a result of the live edit operation. + * @experimental + */ + isLiveEdit?: boolean | undefined; + /** + * URL of source map associated with script (if any). + */ + sourceMapURL?: string | undefined; + /** + * True, if this script has sourceURL. + */ + hasSourceURL?: boolean | undefined; + /** + * True, if this script is ES6 module. + */ + isModule?: boolean | undefined; + /** + * This script length. + */ + length?: number | undefined; + /** + * JavaScript top stack frame of where the script parsed event was triggered if available. + * @experimental + */ + stackTrace?: Runtime.StackTrace | undefined; + } + interface ScriptFailedToParseEventDataType { + /** + * Identifier of the script parsed. + */ + scriptId: Runtime.ScriptId; + /** + * URL or name of the script parsed (if any). + */ + url: string; + /** + * Line offset of the script within the resource with given URL (for script tags). + */ + startLine: number; + /** + * Column offset of the script within the resource with given URL. + */ + startColumn: number; + /** + * Last line of the script. + */ + endLine: number; + /** + * Length of the last line of the script. + */ + endColumn: number; + /** + * Specifies script creation context. + */ + executionContextId: Runtime.ExecutionContextId; + /** + * Content hash of the script. + */ + hash: string; + /** + * Embedder-specific auxiliary data. + */ + executionContextAuxData?: object | undefined; + /** + * URL of source map associated with script (if any). + */ + sourceMapURL?: string | undefined; + /** + * True, if this script has sourceURL. + */ + hasSourceURL?: boolean | undefined; + /** + * True, if this script is ES6 module. + */ + isModule?: boolean | undefined; + /** + * This script length. + */ + length?: number | undefined; + /** + * JavaScript top stack frame of where the script parsed event was triggered if available. + * @experimental + */ + stackTrace?: Runtime.StackTrace | undefined; + } + interface BreakpointResolvedEventDataType { + /** + * Breakpoint unique identifier. + */ + breakpointId: BreakpointId; + /** + * Actual breakpoint location. + */ + location: Location; + } + interface PausedEventDataType { + /** + * Call stack the virtual machine stopped on. + */ + callFrames: CallFrame[]; + /** + * Pause reason. + */ + reason: string; + /** + * Object containing break-specific auxiliary properties. + */ + data?: object | undefined; + /** + * Hit breakpoints IDs + */ + hitBreakpoints?: string[] | undefined; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace | undefined; + /** + * Async stack trace, if any. + * @experimental + */ + asyncStackTraceId?: Runtime.StackTraceId | undefined; + /** + * Just scheduled async call will have this stack trace as parent stack during async execution. This field is available only after Debugger.stepInto call with breakOnAsynCall flag. + * @experimental + */ + asyncCallStackTraceId?: Runtime.StackTraceId | undefined; + } + } + namespace Console { + /** + * Console message. + */ + interface ConsoleMessage { + /** + * Message source. + */ + source: string; + /** + * Message severity. + */ + level: string; + /** + * Message text. + */ + text: string; + /** + * URL of the message origin. + */ + url?: string | undefined; + /** + * Line number in the resource that generated this message (1-based). + */ + line?: number | undefined; + /** + * Column number in the resource that generated this message (1-based). + */ + column?: number | undefined; + } + interface MessageAddedEventDataType { + /** + * Console message that has been added. + */ + message: ConsoleMessage; + } + } + namespace Profiler { + /** + * Profile node. Holds callsite information, execution statistics and child nodes. + */ + interface ProfileNode { + /** + * Unique id of the node. + */ + id: number; + /** + * Function location. + */ + callFrame: Runtime.CallFrame; + /** + * Number of samples where this node was on top of the call stack. + */ + hitCount?: number | undefined; + /** + * Child node ids. + */ + children?: number[] | undefined; + /** + * The reason of being not optimized. The function may be deoptimized or marked as don't optimize. + */ + deoptReason?: string | undefined; + /** + * An array of source position ticks. + */ + positionTicks?: PositionTickInfo[] | undefined; + } + /** + * Profile. + */ + interface Profile { + /** + * The list of profile nodes. First item is the root node. + */ + nodes: ProfileNode[]; + /** + * Profiling start timestamp in microseconds. + */ + startTime: number; + /** + * Profiling end timestamp in microseconds. + */ + endTime: number; + /** + * Ids of samples top nodes. + */ + samples?: number[] | undefined; + /** + * Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime. + */ + timeDeltas?: number[] | undefined; + } + /** + * Specifies a number of samples attributed to a certain source position. + */ + interface PositionTickInfo { + /** + * Source line number (1-based). + */ + line: number; + /** + * Number of samples attributed to the source line. + */ + ticks: number; + } + /** + * Coverage data for a source range. + */ + interface CoverageRange { + /** + * JavaScript script source offset for the range start. + */ + startOffset: number; + /** + * JavaScript script source offset for the range end. + */ + endOffset: number; + /** + * Collected execution count of the source range. + */ + count: number; + } + /** + * Coverage data for a JavaScript function. + */ + interface FunctionCoverage { + /** + * JavaScript function name. + */ + functionName: string; + /** + * Source ranges inside the function with coverage data. + */ + ranges: CoverageRange[]; + /** + * Whether coverage data for this function has block granularity. + */ + isBlockCoverage: boolean; + } + /** + * Coverage data for a JavaScript script. + */ + interface ScriptCoverage { + /** + * JavaScript script id. + */ + scriptId: Runtime.ScriptId; + /** + * JavaScript script name or url. + */ + url: string; + /** + * Functions contained in the script that has coverage data. + */ + functions: FunctionCoverage[]; + } + interface SetSamplingIntervalParameterType { + /** + * New sampling interval in microseconds. + */ + interval: number; + } + interface StartPreciseCoverageParameterType { + /** + * Collect accurate call counts beyond simple 'covered' or 'not covered'. + */ + callCount?: boolean | undefined; + /** + * Collect block-based coverage. + */ + detailed?: boolean | undefined; + } + interface StopReturnType { + /** + * Recorded profile. + */ + profile: Profile; + } + interface TakePreciseCoverageReturnType { + /** + * Coverage data for the current isolate. + */ + result: ScriptCoverage[]; + } + interface GetBestEffortCoverageReturnType { + /** + * Coverage data for the current isolate. + */ + result: ScriptCoverage[]; + } + interface ConsoleProfileStartedEventDataType { + id: string; + /** + * Location of console.profile(). + */ + location: Debugger.Location; + /** + * Profile title passed as an argument to console.profile(). + */ + title?: string | undefined; + } + interface ConsoleProfileFinishedEventDataType { + id: string; + /** + * Location of console.profileEnd(). + */ + location: Debugger.Location; + profile: Profile; + /** + * Profile title passed as an argument to console.profile(). + */ + title?: string | undefined; + } + } + namespace HeapProfiler { + /** + * Heap snapshot object id. + */ + type HeapSnapshotObjectId = string; + /** + * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes. + */ + interface SamplingHeapProfileNode { + /** + * Function location. + */ + callFrame: Runtime.CallFrame; + /** + * Allocations size in bytes for the node excluding children. + */ + selfSize: number; + /** + * Child nodes. + */ + children: SamplingHeapProfileNode[]; + } + /** + * Profile. + */ + interface SamplingHeapProfile { + head: SamplingHeapProfileNode; + } + interface StartTrackingHeapObjectsParameterType { + trackAllocations?: boolean | undefined; + } + interface StopTrackingHeapObjectsParameterType { + /** + * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped. + */ + reportProgress?: boolean | undefined; + } + interface TakeHeapSnapshotParameterType { + /** + * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken. + */ + reportProgress?: boolean | undefined; + } + interface GetObjectByHeapObjectIdParameterType { + objectId: HeapSnapshotObjectId; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string | undefined; + } + interface AddInspectedHeapObjectParameterType { + /** + * Heap snapshot object id to be accessible by means of $x command line API. + */ + heapObjectId: HeapSnapshotObjectId; + } + interface GetHeapObjectIdParameterType { + /** + * Identifier of the object to get heap object id for. + */ + objectId: Runtime.RemoteObjectId; + } + interface StartSamplingParameterType { + /** + * Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes. + */ + samplingInterval?: number | undefined; + } + interface GetObjectByHeapObjectIdReturnType { + /** + * Evaluation result. + */ + result: Runtime.RemoteObject; + } + interface GetHeapObjectIdReturnType { + /** + * Id of the heap snapshot object corresponding to the passed remote object id. + */ + heapSnapshotObjectId: HeapSnapshotObjectId; + } + interface StopSamplingReturnType { + /** + * Recorded sampling heap profile. + */ + profile: SamplingHeapProfile; + } + interface GetSamplingProfileReturnType { + /** + * Return the sampling profile being collected. + */ + profile: SamplingHeapProfile; + } + interface AddHeapSnapshotChunkEventDataType { + chunk: string; + } + interface ReportHeapSnapshotProgressEventDataType { + done: number; + total: number; + finished?: boolean | undefined; + } + interface LastSeenObjectIdEventDataType { + lastSeenObjectId: number; + timestamp: number; + } + interface HeapStatsUpdateEventDataType { + /** + * An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment. + */ + statsUpdate: number[]; + } + } + namespace IO { + type StreamHandle = string; + interface ReadParameterType { + /** + * Handle of the stream to read. + */ + handle: StreamHandle; + /** + * Seek to the specified offset before reading (if not specified, proceed with offset + * following the last read). Some types of streams may only support sequential reads. + */ + offset?: number | undefined; + /** + * Maximum number of bytes to read (left upon the agent discretion if not specified). + */ + size?: number | undefined; + } + interface CloseParameterType { + /** + * Handle of the stream to close. + */ + handle: StreamHandle; + } + interface ReadReturnType { + /** + * Data that were read. + */ + data: string; + /** + * Set if the end-of-file condition occurred while reading. + */ + eof: boolean; + } + } + namespace Network { + /** + * Resource type as it was perceived by the rendering engine. + */ + type ResourceType = string; + /** + * Unique request identifier. + */ + type RequestId = string; + /** + * UTC time in seconds, counted from January 1, 1970. + */ + type TimeSinceEpoch = number; + /** + * Monotonically increasing time in seconds since an arbitrary point in the past. + */ + type MonotonicTime = number; + /** + * Information about the request initiator. + */ + interface Initiator { + /** + * Type of this initiator. + */ + type: string; + /** + * Initiator JavaScript stack trace, set for Script only. + * Requires the Debugger domain to be enabled. + */ + stack?: Runtime.StackTrace | undefined; + /** + * Initiator URL, set for Parser type or for Script type (when script is importing module) or for SignedExchange type. + */ + url?: string | undefined; + /** + * Initiator line number, set for Parser type or for Script type (when script is importing + * module) (0-based). + */ + lineNumber?: number | undefined; + /** + * Initiator column number, set for Parser type or for Script type (when script is importing + * module) (0-based). + */ + columnNumber?: number | undefined; + /** + * Set if another request triggered this request (e.g. preflight). + */ + requestId?: RequestId | undefined; + } + /** + * HTTP request data. + */ + interface Request { + url: string; + method: string; + headers: Headers; + hasPostData: boolean; + } + /** + * HTTP response data. + */ + interface Response { + url: string; + status: number; + statusText: string; + headers: Headers; + mimeType: string; + charset: string; + } + /** + * Request / response headers as keys / values of JSON object. + */ + interface Headers { + } + interface LoadNetworkResourcePageResult { + success: boolean; + stream?: IO.StreamHandle | undefined; + } + /** + * WebSocket response data. + */ + interface WebSocketResponse { + /** + * HTTP response status code. + */ + status: number; + /** + * HTTP response status text. + */ + statusText: string; + /** + * HTTP response headers. + */ + headers: Headers; + } + interface EnableParameterType { + /** + * Buffer size in bytes to use when preserving network payloads (XHRs, etc). + * @experimental + */ + maxTotalBufferSize?: number | undefined; + /** + * Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc). + * @experimental + */ + maxResourceBufferSize?: number | undefined; + } + interface GetRequestPostDataParameterType { + /** + * Identifier of the network request to get content for. + */ + requestId: RequestId; + } + interface GetResponseBodyParameterType { + /** + * Identifier of the network request to get content for. + */ + requestId: RequestId; + } + interface StreamResourceContentParameterType { + /** + * Identifier of the request to stream. + */ + requestId: RequestId; + } + interface LoadNetworkResourceParameterType { + /** + * URL of the resource to get content for. + */ + url: string; + } + interface GetRequestPostDataReturnType { + /** + * Request body string, omitting files from multipart requests + */ + postData: string; + } + interface GetResponseBodyReturnType { + /** + * Response body. + */ + body: string; + /** + * True, if content was sent as base64. + */ + base64Encoded: boolean; + } + interface StreamResourceContentReturnType { + /** + * Data that has been buffered until streaming is enabled. + */ + bufferedData: string; + } + interface LoadNetworkResourceReturnType { + resource: LoadNetworkResourcePageResult; + } + interface RequestWillBeSentEventDataType { + /** + * Request identifier. + */ + requestId: RequestId; + /** + * Request data. + */ + request: Request; + /** + * Request initiator. + */ + initiator: Initiator; + /** + * Timestamp. + */ + timestamp: MonotonicTime; + /** + * Timestamp. + */ + wallTime: TimeSinceEpoch; + } + interface ResponseReceivedEventDataType { + /** + * Request identifier. + */ + requestId: RequestId; + /** + * Timestamp. + */ + timestamp: MonotonicTime; + /** + * Resource type. + */ + type: ResourceType; + /** + * Response data. + */ + response: Response; + } + interface LoadingFailedEventDataType { + /** + * Request identifier. + */ + requestId: RequestId; + /** + * Timestamp. + */ + timestamp: MonotonicTime; + /** + * Resource type. + */ + type: ResourceType; + /** + * Error message. + */ + errorText: string; + } + interface LoadingFinishedEventDataType { + /** + * Request identifier. + */ + requestId: RequestId; + /** + * Timestamp. + */ + timestamp: MonotonicTime; + } + interface DataReceivedEventDataType { + /** + * Request identifier. + */ + requestId: RequestId; + /** + * Timestamp. + */ + timestamp: MonotonicTime; + /** + * Data chunk length. + */ + dataLength: number; + /** + * Actual bytes received (might be less than dataLength for compressed encodings). + */ + encodedDataLength: number; + /** + * Data that was received. + * @experimental + */ + data?: string | undefined; + } + interface WebSocketCreatedEventDataType { + /** + * Request identifier. + */ + requestId: RequestId; + /** + * WebSocket request URL. + */ + url: string; + /** + * Request initiator. + */ + initiator: Initiator; + } + interface WebSocketClosedEventDataType { + /** + * Request identifier. + */ + requestId: RequestId; + /** + * Timestamp. + */ + timestamp: MonotonicTime; + } + interface WebSocketHandshakeResponseReceivedEventDataType { + /** + * Request identifier. + */ + requestId: RequestId; + /** + * Timestamp. + */ + timestamp: MonotonicTime; + /** + * WebSocket response data. + */ + response: WebSocketResponse; + } + } + namespace NodeRuntime { + interface NotifyWhenWaitingForDisconnectParameterType { + enabled: boolean; + } + } + namespace NodeTracing { + interface TraceConfig { + /** + * Controls how the trace buffer stores data. + */ + recordMode?: string | undefined; + /** + * Included category filters. + */ + includedCategories: string[]; + } + interface StartParameterType { + traceConfig: TraceConfig; + } + interface GetCategoriesReturnType { + /** + * A list of supported tracing categories. + */ + categories: string[]; + } + interface DataCollectedEventDataType { + value: object[]; + } + } + namespace NodeWorker { + type WorkerID = string; + /** + * Unique identifier of attached debugging session. + */ + type SessionID = string; + interface WorkerInfo { + workerId: WorkerID; + type: string; + title: string; + url: string; + } + interface SendMessageToWorkerParameterType { + message: string; + /** + * Identifier of the session. + */ + sessionId: SessionID; + } + interface EnableParameterType { + /** + * Whether to new workers should be paused until the frontend sends `Runtime.runIfWaitingForDebugger` + * message to run them. + */ + waitForDebuggerOnStart: boolean; + } + interface DetachParameterType { + sessionId: SessionID; + } + interface AttachedToWorkerEventDataType { + /** + * Identifier assigned to the session used to send/receive messages. + */ + sessionId: SessionID; + workerInfo: WorkerInfo; + waitingForDebugger: boolean; + } + interface DetachedFromWorkerEventDataType { + /** + * Detached session identifier. + */ + sessionId: SessionID; + } + interface ReceivedMessageFromWorkerEventDataType { + /** + * Identifier of a session which sends a message. + */ + sessionId: SessionID; + message: string; + } + } + namespace Target { + type SessionID = string; + type TargetID = string; + interface TargetInfo { + targetId: TargetID; + type: string; + title: string; + url: string; + attached: boolean; + canAccessOpener: boolean; + } + interface SetAutoAttachParameterType { + autoAttach: boolean; + waitForDebuggerOnStart: boolean; + } + interface GetTargetsReturnType { + targetInfos: TargetInfo[]; + } + interface TargetCreatedEventDataType { + targetInfo: TargetInfo; + } + interface AttachedToTargetEventDataType { + sessionId: SessionID; + targetInfo: TargetInfo; + waitingForDebugger: boolean; + } + } + namespace DOMStorage { + type SerializedStorageKey = string; + /** + * DOM Storage identifier. + */ + interface StorageId { + /** + * Security origin for the storage. + */ + securityOrigin?: string | undefined; + /** + * Represents a key by which DOM Storage keys its CachedStorageAreas + */ + storageKey?: SerializedStorageKey | undefined; + /** + * Whether the storage is local storage (not session storage). + */ + isLocalStorage: boolean; + } + /** + * DOM Storage item. + */ + type Item = string[]; + interface ClearParameterType { + storageId: StorageId; + } + interface GetDOMStorageItemsParameterType { + storageId: StorageId; + } + interface RemoveDOMStorageItemParameterType { + storageId: StorageId; + key: string; + } + interface SetDOMStorageItemParameterType { + storageId: StorageId; + key: string; + value: string; + } + interface GetDOMStorageItemsReturnType { + entries: Item[]; + } + interface DomStorageItemAddedEventDataType { + storageId: StorageId; + key: string; + newValue: string; + } + interface DomStorageItemRemovedEventDataType { + storageId: StorageId; + key: string; + } + interface DomStorageItemUpdatedEventDataType { + storageId: StorageId; + key: string; + oldValue: string; + newValue: string; + } + interface DomStorageItemsClearedEventDataType { + storageId: StorageId; + } + } + namespace Storage { + type SerializedStorageKey = string; + interface GetStorageKeyParameterType { + frameId?: string | undefined; + } + interface GetStorageKeyReturnType { + storageKey: SerializedStorageKey; + } + } + interface Session { + /** + * Posts a message to the inspector back-end. `callback` will be notified when + * a response is received. `callback` is a function that accepts two optional + * arguments: error and message-specific result. + * + * ```js + * session.post('Runtime.evaluate', { expression: '2 + 2' }, + * (error, { result }) => console.log(result)); + * // Output: { type: 'number', value: 4, description: '4' } + * ``` + * + * The latest version of the V8 inspector protocol is published on the + * [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/v8/). + * + * Node.js inspector supports all the Chrome DevTools Protocol domains declared + * by V8. Chrome DevTools Protocol domain provides an interface for interacting + * with one of the runtime agents used to inspect the application state and listen + * to the run-time events. + */ + post(method: string, callback?: (err: Error | null, params?: object) => void): void; + post(method: string, params?: object, callback?: (err: Error | null, params?: object) => void): void; + /** + * Returns supported domains. + */ + post(method: "Schema.getDomains", callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void; + /** + * Evaluates expression on global object. + */ + post(method: "Runtime.evaluate", params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; + post(method: "Runtime.evaluate", callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; + /** + * Add handler to promise with given promise object id. + */ + post(method: "Runtime.awaitPromise", params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; + post(method: "Runtime.awaitPromise", callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; + /** + * Calls function with given declaration on the given object. Object group of the result is inherited from the target object. + */ + post(method: "Runtime.callFunctionOn", params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; + post(method: "Runtime.callFunctionOn", callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; + /** + * Returns properties of a given object. Object group of the result is inherited from the target object. + */ + post(method: "Runtime.getProperties", params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; + post(method: "Runtime.getProperties", callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; + /** + * Releases remote object with given id. + */ + post(method: "Runtime.releaseObject", params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.releaseObject", callback?: (err: Error | null) => void): void; + /** + * Releases all remote objects that belong to a given group. + */ + post(method: "Runtime.releaseObjectGroup", params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.releaseObjectGroup", callback?: (err: Error | null) => void): void; + /** + * Tells inspected instance to run if it was waiting for debugger to attach. + */ + post(method: "Runtime.runIfWaitingForDebugger", callback?: (err: Error | null) => void): void; + /** + * Enables reporting of execution contexts creation by means of executionContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing execution context. + */ + post(method: "Runtime.enable", callback?: (err: Error | null) => void): void; + /** + * Disables reporting of execution contexts creation. + */ + post(method: "Runtime.disable", callback?: (err: Error | null) => void): void; + /** + * Discards collected exceptions and console API calls. + */ + post(method: "Runtime.discardConsoleEntries", callback?: (err: Error | null) => void): void; + /** + * @experimental + */ + post(method: "Runtime.setCustomObjectFormatterEnabled", params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.setCustomObjectFormatterEnabled", callback?: (err: Error | null) => void): void; + /** + * Compiles expression. + */ + post(method: "Runtime.compileScript", params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; + post(method: "Runtime.compileScript", callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; + /** + * Runs script with given id in a given context. + */ + post(method: "Runtime.runScript", params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; + post(method: "Runtime.runScript", callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; + post(method: "Runtime.queryObjects", params?: Runtime.QueryObjectsParameterType, callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; + post(method: "Runtime.queryObjects", callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; + /** + * Returns all let, const and class variables from global scope. + */ + post( + method: "Runtime.globalLexicalScopeNames", + params?: Runtime.GlobalLexicalScopeNamesParameterType, + callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void + ): void; + post(method: "Runtime.globalLexicalScopeNames", callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void): void; + /** + * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received. + */ + post(method: "Debugger.enable", callback?: (err: Error | null, params: Debugger.EnableReturnType) => void): void; + /** + * Disables debugger for given page. + */ + post(method: "Debugger.disable", callback?: (err: Error | null) => void): void; + /** + * Activates / deactivates all breakpoints on the page. + */ + post(method: "Debugger.setBreakpointsActive", params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setBreakpointsActive", callback?: (err: Error | null) => void): void; + /** + * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). + */ + post(method: "Debugger.setSkipAllPauses", params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setSkipAllPauses", callback?: (err: Error | null) => void): void; + /** + * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in locations property. Further matching script parsing will result in subsequent breakpointResolved events issued. This logical breakpoint will survive page reloads. + */ + post(method: "Debugger.setBreakpointByUrl", params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; + post(method: "Debugger.setBreakpointByUrl", callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; + /** + * Sets JavaScript breakpoint at a given location. + */ + post(method: "Debugger.setBreakpoint", params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; + post(method: "Debugger.setBreakpoint", callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; + /** + * Removes JavaScript breakpoint. + */ + post(method: "Debugger.removeBreakpoint", params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.removeBreakpoint", callback?: (err: Error | null) => void): void; + /** + * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. + */ + post( + method: "Debugger.getPossibleBreakpoints", + params?: Debugger.GetPossibleBreakpointsParameterType, + callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void + ): void; + post(method: "Debugger.getPossibleBreakpoints", callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void; + /** + * Continues execution until specific location is reached. + */ + post(method: "Debugger.continueToLocation", params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.continueToLocation", callback?: (err: Error | null) => void): void; + /** + * @experimental + */ + post(method: "Debugger.pauseOnAsyncCall", params?: Debugger.PauseOnAsyncCallParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.pauseOnAsyncCall", callback?: (err: Error | null) => void): void; + /** + * Steps over the statement. + */ + post(method: "Debugger.stepOver", callback?: (err: Error | null) => void): void; + /** + * Steps into the function call. + */ + post(method: "Debugger.stepInto", params?: Debugger.StepIntoParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.stepInto", callback?: (err: Error | null) => void): void; + /** + * Steps out of the function call. + */ + post(method: "Debugger.stepOut", callback?: (err: Error | null) => void): void; + /** + * Stops on the next JavaScript statement. + */ + post(method: "Debugger.pause", callback?: (err: Error | null) => void): void; + /** + * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called. + * @experimental + */ + post(method: "Debugger.scheduleStepIntoAsync", callback?: (err: Error | null) => void): void; + /** + * Resumes JavaScript execution. + */ + post(method: "Debugger.resume", callback?: (err: Error | null) => void): void; + /** + * Returns stack trace with given stackTraceId. + * @experimental + */ + post(method: "Debugger.getStackTrace", params?: Debugger.GetStackTraceParameterType, callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; + post(method: "Debugger.getStackTrace", callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; + /** + * Searches for given string in script content. + */ + post(method: "Debugger.searchInContent", params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; + post(method: "Debugger.searchInContent", callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; + /** + * Edits JavaScript source live. + */ + post(method: "Debugger.setScriptSource", params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; + post(method: "Debugger.setScriptSource", callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; + /** + * Restarts particular call frame from the beginning. + */ + post(method: "Debugger.restartFrame", params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; + post(method: "Debugger.restartFrame", callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; + /** + * Returns source for the script with given id. + */ + post(method: "Debugger.getScriptSource", params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; + post(method: "Debugger.getScriptSource", callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; + /** + * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is none. + */ + post(method: "Debugger.setPauseOnExceptions", params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setPauseOnExceptions", callback?: (err: Error | null) => void): void; + /** + * Evaluates expression on a given call frame. + */ + post(method: "Debugger.evaluateOnCallFrame", params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; + post(method: "Debugger.evaluateOnCallFrame", callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; + /** + * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. + */ + post(method: "Debugger.setVariableValue", params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setVariableValue", callback?: (err: Error | null) => void): void; + /** + * Changes return value in top frame. Available only at return break position. + * @experimental + */ + post(method: "Debugger.setReturnValue", params?: Debugger.SetReturnValueParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setReturnValue", callback?: (err: Error | null) => void): void; + /** + * Enables or disables async call stacks tracking. + */ + post(method: "Debugger.setAsyncCallStackDepth", params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setAsyncCallStackDepth", callback?: (err: Error | null) => void): void; + /** + * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. + * @experimental + */ + post(method: "Debugger.setBlackboxPatterns", params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setBlackboxPatterns", callback?: (err: Error | null) => void): void; + /** + * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted. + * @experimental + */ + post(method: "Debugger.setBlackboxedRanges", params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setBlackboxedRanges", callback?: (err: Error | null) => void): void; + /** + * Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification. + */ + post(method: "Console.enable", callback?: (err: Error | null) => void): void; + /** + * Disables console domain, prevents further console messages from being reported to the client. + */ + post(method: "Console.disable", callback?: (err: Error | null) => void): void; + /** + * Does nothing. + */ + post(method: "Console.clearMessages", callback?: (err: Error | null) => void): void; + post(method: "Profiler.enable", callback?: (err: Error | null) => void): void; + post(method: "Profiler.disable", callback?: (err: Error | null) => void): void; + /** + * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. + */ + post(method: "Profiler.setSamplingInterval", params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void; + post(method: "Profiler.setSamplingInterval", callback?: (err: Error | null) => void): void; + post(method: "Profiler.start", callback?: (err: Error | null) => void): void; + post(method: "Profiler.stop", callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void; + /** + * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters. + */ + post(method: "Profiler.startPreciseCoverage", params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void; + post(method: "Profiler.startPreciseCoverage", callback?: (err: Error | null) => void): void; + /** + * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code. + */ + post(method: "Profiler.stopPreciseCoverage", callback?: (err: Error | null) => void): void; + /** + * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started. + */ + post(method: "Profiler.takePreciseCoverage", callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void; + /** + * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection. + */ + post(method: "Profiler.getBestEffortCoverage", callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void; + post(method: "HeapProfiler.enable", callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.disable", callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.startTrackingHeapObjects", params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.startTrackingHeapObjects", callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.stopTrackingHeapObjects", params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.stopTrackingHeapObjects", callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.takeHeapSnapshot", params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.takeHeapSnapshot", callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.collectGarbage", callback?: (err: Error | null) => void): void; + post( + method: "HeapProfiler.getObjectByHeapObjectId", + params?: HeapProfiler.GetObjectByHeapObjectIdParameterType, + callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void + ): void; + post(method: "HeapProfiler.getObjectByHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void; + /** + * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). + */ + post(method: "HeapProfiler.addInspectedHeapObject", params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.addInspectedHeapObject", callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.getHeapObjectId", params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; + post(method: "HeapProfiler.getHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; + post(method: "HeapProfiler.startSampling", params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.startSampling", callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.stopSampling", callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void; + post(method: "HeapProfiler.getSamplingProfile", callback?: (err: Error | null, params: HeapProfiler.GetSamplingProfileReturnType) => void): void; + /** + * Read a chunk of the stream + */ + post(method: "IO.read", params?: IO.ReadParameterType, callback?: (err: Error | null, params: IO.ReadReturnType) => void): void; + post(method: "IO.read", callback?: (err: Error | null, params: IO.ReadReturnType) => void): void; + post(method: "IO.close", params?: IO.CloseParameterType, callback?: (err: Error | null) => void): void; + post(method: "IO.close", callback?: (err: Error | null) => void): void; + /** + * Disables network tracking, prevents network events from being sent to the client. + */ + post(method: "Network.disable", callback?: (err: Error | null) => void): void; + /** + * Enables network tracking, network events will now be delivered to the client. + */ + post(method: "Network.enable", params?: Network.EnableParameterType, callback?: (err: Error | null) => void): void; + post(method: "Network.enable", callback?: (err: Error | null) => void): void; + /** + * Returns post data sent with the request. Returns an error when no data was sent with the request. + */ + post(method: "Network.getRequestPostData", params?: Network.GetRequestPostDataParameterType, callback?: (err: Error | null, params: Network.GetRequestPostDataReturnType) => void): void; + post(method: "Network.getRequestPostData", callback?: (err: Error | null, params: Network.GetRequestPostDataReturnType) => void): void; + /** + * Returns content served for the given request. + */ + post(method: "Network.getResponseBody", params?: Network.GetResponseBodyParameterType, callback?: (err: Error | null, params: Network.GetResponseBodyReturnType) => void): void; + post(method: "Network.getResponseBody", callback?: (err: Error | null, params: Network.GetResponseBodyReturnType) => void): void; + /** + * Enables streaming of the response for the given requestId. + * If enabled, the dataReceived event contains the data that was received during streaming. + * @experimental + */ + post( + method: "Network.streamResourceContent", + params?: Network.StreamResourceContentParameterType, + callback?: (err: Error | null, params: Network.StreamResourceContentReturnType) => void + ): void; + post(method: "Network.streamResourceContent", callback?: (err: Error | null, params: Network.StreamResourceContentReturnType) => void): void; + /** + * Fetches the resource and returns the content. + */ + post(method: "Network.loadNetworkResource", params?: Network.LoadNetworkResourceParameterType, callback?: (err: Error | null, params: Network.LoadNetworkResourceReturnType) => void): void; + post(method: "Network.loadNetworkResource", callback?: (err: Error | null, params: Network.LoadNetworkResourceReturnType) => void): void; + /** + * Enable the NodeRuntime events except by `NodeRuntime.waitingForDisconnect`. + */ + post(method: "NodeRuntime.enable", callback?: (err: Error | null) => void): void; + /** + * Disable NodeRuntime events + */ + post(method: "NodeRuntime.disable", callback?: (err: Error | null) => void): void; + /** + * Enable the `NodeRuntime.waitingForDisconnect`. + */ + post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType, callback?: (err: Error | null) => void): void; + post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", callback?: (err: Error | null) => void): void; + /** + * Gets supported tracing categories. + */ + post(method: "NodeTracing.getCategories", callback?: (err: Error | null, params: NodeTracing.GetCategoriesReturnType) => void): void; + /** + * Start trace events collection. + */ + post(method: "NodeTracing.start", params?: NodeTracing.StartParameterType, callback?: (err: Error | null) => void): void; + post(method: "NodeTracing.start", callback?: (err: Error | null) => void): void; + /** + * Stop trace events collection. Remaining collected events will be sent as a sequence of + * dataCollected events followed by tracingComplete event. + */ + post(method: "NodeTracing.stop", callback?: (err: Error | null) => void): void; + /** + * Sends protocol message over session with given id. + */ + post(method: "NodeWorker.sendMessageToWorker", params?: NodeWorker.SendMessageToWorkerParameterType, callback?: (err: Error | null) => void): void; + post(method: "NodeWorker.sendMessageToWorker", callback?: (err: Error | null) => void): void; + /** + * Instructs the inspector to attach to running workers. Will also attach to new workers + * as they start + */ + post(method: "NodeWorker.enable", params?: NodeWorker.EnableParameterType, callback?: (err: Error | null) => void): void; + post(method: "NodeWorker.enable", callback?: (err: Error | null) => void): void; + /** + * Detaches from all running workers and disables attaching to new workers as they are started. + */ + post(method: "NodeWorker.disable", callback?: (err: Error | null) => void): void; + /** + * Detached from the worker with given sessionId. + */ + post(method: "NodeWorker.detach", params?: NodeWorker.DetachParameterType, callback?: (err: Error | null) => void): void; + post(method: "NodeWorker.detach", callback?: (err: Error | null) => void): void; + post(method: "Target.getTargets", callback?: (err: Error | null, params: Target.GetTargetsReturnType) => void): void; + post(method: "Target.setAutoAttach", params?: Target.SetAutoAttachParameterType, callback?: (err: Error | null) => void): void; + post(method: "Target.setAutoAttach", callback?: (err: Error | null) => void): void; + post(method: "DOMStorage.clear", params?: DOMStorage.ClearParameterType, callback?: (err: Error | null) => void): void; + post(method: "DOMStorage.clear", callback?: (err: Error | null) => void): void; + /** + * Disables storage tracking, prevents storage events from being sent to the client. + */ + post(method: "DOMStorage.disable", callback?: (err: Error | null) => void): void; + /** + * Enables storage tracking, storage events will now be delivered to the client. + */ + post(method: "DOMStorage.enable", callback?: (err: Error | null) => void): void; + post( + method: "DOMStorage.getDOMStorageItems", + params?: DOMStorage.GetDOMStorageItemsParameterType, + callback?: (err: Error | null, params: DOMStorage.GetDOMStorageItemsReturnType) => void + ): void; + post(method: "DOMStorage.getDOMStorageItems", callback?: (err: Error | null, params: DOMStorage.GetDOMStorageItemsReturnType) => void): void; + post(method: "DOMStorage.removeDOMStorageItem", params?: DOMStorage.RemoveDOMStorageItemParameterType, callback?: (err: Error | null) => void): void; + post(method: "DOMStorage.removeDOMStorageItem", callback?: (err: Error | null) => void): void; + post(method: "DOMStorage.setDOMStorageItem", params?: DOMStorage.SetDOMStorageItemParameterType, callback?: (err: Error | null) => void): void; + post(method: "DOMStorage.setDOMStorageItem", callback?: (err: Error | null) => void): void; + /** + * @experimental + */ + post(method: "Storage.getStorageKey", params?: Storage.GetStorageKeyParameterType, callback?: (err: Error | null, params: Storage.GetStorageKeyReturnType) => void): void; + post(method: "Storage.getStorageKey", callback?: (err: Error | null, params: Storage.GetStorageKeyReturnType) => void): void; + addListener(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + addListener(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; + /** + * Issued when new execution context is created. + */ + addListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + addListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + addListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + addListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + addListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + addListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + addListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + addListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + addListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + addListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + addListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + addListener(event: "Debugger.resumed", listener: () => void): this; + /** + * Issued when new console message is added. + */ + addListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + addListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + addListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + addListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + addListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + addListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + addListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + addListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + addListener(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; + addListener(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; + addListener(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; + /** + * Fired when data chunk was received over the network. + */ + addListener(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; + /** + * Fired upon WebSocket creation. + */ + addListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket is closed. + */ + addListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket handshake response becomes available. + */ + addListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + addListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + /** + * This event is fired when the runtime is waiting for the debugger. For + * example, when inspector.waitingForDebugger is called + */ + addListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; + /** + * Contains an bucket of collected trace events. + */ + addListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + addListener(event: "NodeTracing.tracingComplete", listener: () => void): this; + /** + * Issued when attached to a worker. + */ + addListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + addListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + addListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + addListener(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; + addListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; + addListener(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; + addListener(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; + addListener(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; + addListener(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "inspectorNotification", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextCreated", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextDestroyed", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextsCleared"): boolean; + emit(event: "Runtime.exceptionThrown", message: InspectorNotification): boolean; + emit(event: "Runtime.exceptionRevoked", message: InspectorNotification): boolean; + emit(event: "Runtime.consoleAPICalled", message: InspectorNotification): boolean; + emit(event: "Runtime.inspectRequested", message: InspectorNotification): boolean; + emit(event: "Debugger.scriptParsed", message: InspectorNotification): boolean; + emit(event: "Debugger.scriptFailedToParse", message: InspectorNotification): boolean; + emit(event: "Debugger.breakpointResolved", message: InspectorNotification): boolean; + emit(event: "Debugger.paused", message: InspectorNotification): boolean; + emit(event: "Debugger.resumed"): boolean; + emit(event: "Console.messageAdded", message: InspectorNotification): boolean; + emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification): boolean; + emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.addHeapSnapshotChunk", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.resetProfiles"): boolean; + emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification): boolean; + emit(event: "Network.requestWillBeSent", message: InspectorNotification): boolean; + emit(event: "Network.responseReceived", message: InspectorNotification): boolean; + emit(event: "Network.loadingFailed", message: InspectorNotification): boolean; + emit(event: "Network.loadingFinished", message: InspectorNotification): boolean; + emit(event: "Network.dataReceived", message: InspectorNotification): boolean; + emit(event: "Network.webSocketCreated", message: InspectorNotification): boolean; + emit(event: "Network.webSocketClosed", message: InspectorNotification): boolean; + emit(event: "Network.webSocketHandshakeResponseReceived", message: InspectorNotification): boolean; + emit(event: "NodeRuntime.waitingForDisconnect"): boolean; + emit(event: "NodeRuntime.waitingForDebugger"): boolean; + emit(event: "NodeTracing.dataCollected", message: InspectorNotification): boolean; + emit(event: "NodeTracing.tracingComplete"): boolean; + emit(event: "NodeWorker.attachedToWorker", message: InspectorNotification): boolean; + emit(event: "NodeWorker.detachedFromWorker", message: InspectorNotification): boolean; + emit(event: "NodeWorker.receivedMessageFromWorker", message: InspectorNotification): boolean; + emit(event: "Target.targetCreated", message: InspectorNotification): boolean; + emit(event: "Target.attachedToTarget", message: InspectorNotification): boolean; + emit(event: "DOMStorage.domStorageItemAdded", message: InspectorNotification): boolean; + emit(event: "DOMStorage.domStorageItemRemoved", message: InspectorNotification): boolean; + emit(event: "DOMStorage.domStorageItemUpdated", message: InspectorNotification): boolean; + emit(event: "DOMStorage.domStorageItemsCleared", message: InspectorNotification): boolean; + on(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + on(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; + /** + * Issued when new execution context is created. + */ + on(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + on(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + on(event: "Runtime.executionContextsCleared", listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + on(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + on(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + on(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + on(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + on(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + on(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + on(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + on(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + on(event: "Debugger.resumed", listener: () => void): this; + /** + * Issued when new console message is added. + */ + on(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + on(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + on(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + on(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + on(event: "HeapProfiler.resetProfiles", listener: () => void): this; + on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + on(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + on(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + on(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + on(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; + on(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; + on(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; + /** + * Fired when data chunk was received over the network. + */ + on(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; + /** + * Fired upon WebSocket creation. + */ + on(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket is closed. + */ + on(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket handshake response becomes available. + */ + on(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + on(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + /** + * This event is fired when the runtime is waiting for the debugger. For + * example, when inspector.waitingForDebugger is called + */ + on(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; + /** + * Contains an bucket of collected trace events. + */ + on(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + on(event: "NodeTracing.tracingComplete", listener: () => void): this; + /** + * Issued when attached to a worker. + */ + on(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + on(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + on(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + on(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; + on(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; + on(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; + on(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; + on(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; + on(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + once(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; + /** + * Issued when new execution context is created. + */ + once(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + once(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + once(event: "Runtime.executionContextsCleared", listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + once(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + once(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + once(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + once(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + once(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + once(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + once(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + once(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + once(event: "Debugger.resumed", listener: () => void): this; + /** + * Issued when new console message is added. + */ + once(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + once(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + once(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + once(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + once(event: "HeapProfiler.resetProfiles", listener: () => void): this; + once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + once(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + once(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + once(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + once(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; + once(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; + once(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; + /** + * Fired when data chunk was received over the network. + */ + once(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; + /** + * Fired upon WebSocket creation. + */ + once(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket is closed. + */ + once(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket handshake response becomes available. + */ + once(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + once(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + /** + * This event is fired when the runtime is waiting for the debugger. For + * example, when inspector.waitingForDebugger is called + */ + once(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; + /** + * Contains an bucket of collected trace events. + */ + once(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + once(event: "NodeTracing.tracingComplete", listener: () => void): this; + /** + * Issued when attached to a worker. + */ + once(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + once(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + once(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + once(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; + once(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; + once(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; + once(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; + once(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; + once(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + prependListener(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; + /** + * Issued when new execution context is created. + */ + prependListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + prependListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + prependListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + prependListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + prependListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + prependListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + prependListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + prependListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + prependListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + prependListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + prependListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + prependListener(event: "Debugger.resumed", listener: () => void): this; + /** + * Issued when new console message is added. + */ + prependListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + prependListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + prependListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + prependListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + prependListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + prependListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + prependListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + prependListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + prependListener(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; + prependListener(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; + prependListener(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; + /** + * Fired when data chunk was received over the network. + */ + prependListener(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; + /** + * Fired upon WebSocket creation. + */ + prependListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket is closed. + */ + prependListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket handshake response becomes available. + */ + prependListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + prependListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + /** + * This event is fired when the runtime is waiting for the debugger. For + * example, when inspector.waitingForDebugger is called + */ + prependListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; + /** + * Contains an bucket of collected trace events. + */ + prependListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + prependListener(event: "NodeTracing.tracingComplete", listener: () => void): this; + /** + * Issued when attached to a worker. + */ + prependListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + prependListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + prependListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + prependListener(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; + prependListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; + prependListener(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; + prependListener(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; + prependListener(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; + prependListener(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + prependOnceListener(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; + /** + * Issued when new execution context is created. + */ + prependOnceListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + prependOnceListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + prependOnceListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + prependOnceListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + prependOnceListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + prependOnceListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + prependOnceListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + prependOnceListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + prependOnceListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + prependOnceListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + prependOnceListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + prependOnceListener(event: "Debugger.resumed", listener: () => void): this; + /** + * Issued when new console message is added. + */ + prependOnceListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + prependOnceListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + prependOnceListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + prependOnceListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + prependOnceListener(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; + /** + * Fired when data chunk was received over the network. + */ + prependOnceListener(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; + /** + * Fired upon WebSocket creation. + */ + prependOnceListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket is closed. + */ + prependOnceListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket handshake response becomes available. + */ + prependOnceListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + prependOnceListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + /** + * This event is fired when the runtime is waiting for the debugger. For + * example, when inspector.waitingForDebugger is called + */ + prependOnceListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; + /** + * Contains an bucket of collected trace events. + */ + prependOnceListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + prependOnceListener(event: "NodeTracing.tracingComplete", listener: () => void): this; + /** + * Issued when attached to a worker. + */ + prependOnceListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + prependOnceListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + prependOnceListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; + } +} +declare module "node:inspector/promises" { + export { + Schema, + Runtime, + Debugger, + Console, + Profiler, + HeapProfiler, + IO, + Network, + NodeRuntime, + NodeTracing, + NodeWorker, + Target, + DOMStorage, + Storage, + } from 'inspector'; +} +declare module "node:inspector/promises" { + import { + InspectorNotification, + Schema, + Runtime, + Debugger, + Console, + Profiler, + HeapProfiler, + IO, + Network, + NodeRuntime, + NodeTracing, + NodeWorker, + Target, + DOMStorage, + Storage, + } from "inspector"; + /** + * The `inspector.Session` is used for dispatching messages to the V8 inspector + * back-end and receiving message responses and notifications. + * @since v19.0.0 + */ + interface Session { + /** + * Posts a message to the inspector back-end. + * + * ```js + * import { Session } from 'node:inspector/promises'; + * try { + * const session = new Session(); + * session.connect(); + * const result = await session.post('Runtime.evaluate', { expression: '2 + 2' }); + * console.log(result); + * } catch (error) { + * console.error(error); + * } + * // Output: { result: { type: 'number', value: 4, description: '4' } } + * ``` + * + * The latest version of the V8 inspector protocol is published on the + * [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/v8/). + * + * Node.js inspector supports all the Chrome DevTools Protocol domains declared + * by V8. Chrome DevTools Protocol domain provides an interface for interacting + * with one of the runtime agents used to inspect the application state and listen + * to the run-time events. + */ + post(method: string, params?: object): Promise; + /** + * Returns supported domains. + */ + post(method: "Schema.getDomains"): Promise; + /** + * Evaluates expression on global object. + */ + post(method: "Runtime.evaluate", params?: Runtime.EvaluateParameterType): Promise; + /** + * Add handler to promise with given promise object id. + */ + post(method: "Runtime.awaitPromise", params?: Runtime.AwaitPromiseParameterType): Promise; + /** + * Calls function with given declaration on the given object. Object group of the result is inherited from the target object. + */ + post(method: "Runtime.callFunctionOn", params?: Runtime.CallFunctionOnParameterType): Promise; + /** + * Returns properties of a given object. Object group of the result is inherited from the target object. + */ + post(method: "Runtime.getProperties", params?: Runtime.GetPropertiesParameterType): Promise; + /** + * Releases remote object with given id. + */ + post(method: "Runtime.releaseObject", params?: Runtime.ReleaseObjectParameterType): Promise; + /** + * Releases all remote objects that belong to a given group. + */ + post(method: "Runtime.releaseObjectGroup", params?: Runtime.ReleaseObjectGroupParameterType): Promise; + /** + * Tells inspected instance to run if it was waiting for debugger to attach. + */ + post(method: "Runtime.runIfWaitingForDebugger"): Promise; + /** + * Enables reporting of execution contexts creation by means of executionContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing execution context. + */ + post(method: "Runtime.enable"): Promise; + /** + * Disables reporting of execution contexts creation. + */ + post(method: "Runtime.disable"): Promise; + /** + * Discards collected exceptions and console API calls. + */ + post(method: "Runtime.discardConsoleEntries"): Promise; + /** + * @experimental + */ + post(method: "Runtime.setCustomObjectFormatterEnabled", params?: Runtime.SetCustomObjectFormatterEnabledParameterType): Promise; + /** + * Compiles expression. + */ + post(method: "Runtime.compileScript", params?: Runtime.CompileScriptParameterType): Promise; + /** + * Runs script with given id in a given context. + */ + post(method: "Runtime.runScript", params?: Runtime.RunScriptParameterType): Promise; + post(method: "Runtime.queryObjects", params?: Runtime.QueryObjectsParameterType): Promise; + /** + * Returns all let, const and class variables from global scope. + */ + post(method: "Runtime.globalLexicalScopeNames", params?: Runtime.GlobalLexicalScopeNamesParameterType): Promise; + /** + * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received. + */ + post(method: "Debugger.enable"): Promise; + /** + * Disables debugger for given page. + */ + post(method: "Debugger.disable"): Promise; + /** + * Activates / deactivates all breakpoints on the page. + */ + post(method: "Debugger.setBreakpointsActive", params?: Debugger.SetBreakpointsActiveParameterType): Promise; + /** + * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). + */ + post(method: "Debugger.setSkipAllPauses", params?: Debugger.SetSkipAllPausesParameterType): Promise; + /** + * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in locations property. Further matching script parsing will result in subsequent breakpointResolved events issued. This logical breakpoint will survive page reloads. + */ + post(method: "Debugger.setBreakpointByUrl", params?: Debugger.SetBreakpointByUrlParameterType): Promise; + /** + * Sets JavaScript breakpoint at a given location. + */ + post(method: "Debugger.setBreakpoint", params?: Debugger.SetBreakpointParameterType): Promise; + /** + * Removes JavaScript breakpoint. + */ + post(method: "Debugger.removeBreakpoint", params?: Debugger.RemoveBreakpointParameterType): Promise; + /** + * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. + */ + post(method: "Debugger.getPossibleBreakpoints", params?: Debugger.GetPossibleBreakpointsParameterType): Promise; + /** + * Continues execution until specific location is reached. + */ + post(method: "Debugger.continueToLocation", params?: Debugger.ContinueToLocationParameterType): Promise; + /** + * @experimental + */ + post(method: "Debugger.pauseOnAsyncCall", params?: Debugger.PauseOnAsyncCallParameterType): Promise; + /** + * Steps over the statement. + */ + post(method: "Debugger.stepOver"): Promise; + /** + * Steps into the function call. + */ + post(method: "Debugger.stepInto", params?: Debugger.StepIntoParameterType): Promise; + /** + * Steps out of the function call. + */ + post(method: "Debugger.stepOut"): Promise; + /** + * Stops on the next JavaScript statement. + */ + post(method: "Debugger.pause"): Promise; + /** + * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called. + * @experimental + */ + post(method: "Debugger.scheduleStepIntoAsync"): Promise; + /** + * Resumes JavaScript execution. + */ + post(method: "Debugger.resume"): Promise; + /** + * Returns stack trace with given stackTraceId. + * @experimental + */ + post(method: "Debugger.getStackTrace", params?: Debugger.GetStackTraceParameterType): Promise; + /** + * Searches for given string in script content. + */ + post(method: "Debugger.searchInContent", params?: Debugger.SearchInContentParameterType): Promise; + /** + * Edits JavaScript source live. + */ + post(method: "Debugger.setScriptSource", params?: Debugger.SetScriptSourceParameterType): Promise; + /** + * Restarts particular call frame from the beginning. + */ + post(method: "Debugger.restartFrame", params?: Debugger.RestartFrameParameterType): Promise; + /** + * Returns source for the script with given id. + */ + post(method: "Debugger.getScriptSource", params?: Debugger.GetScriptSourceParameterType): Promise; + /** + * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is none. + */ + post(method: "Debugger.setPauseOnExceptions", params?: Debugger.SetPauseOnExceptionsParameterType): Promise; + /** + * Evaluates expression on a given call frame. + */ + post(method: "Debugger.evaluateOnCallFrame", params?: Debugger.EvaluateOnCallFrameParameterType): Promise; + /** + * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. + */ + post(method: "Debugger.setVariableValue", params?: Debugger.SetVariableValueParameterType): Promise; + /** + * Changes return value in top frame. Available only at return break position. + * @experimental + */ + post(method: "Debugger.setReturnValue", params?: Debugger.SetReturnValueParameterType): Promise; + /** + * Enables or disables async call stacks tracking. + */ + post(method: "Debugger.setAsyncCallStackDepth", params?: Debugger.SetAsyncCallStackDepthParameterType): Promise; + /** + * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. + * @experimental + */ + post(method: "Debugger.setBlackboxPatterns", params?: Debugger.SetBlackboxPatternsParameterType): Promise; + /** + * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted. + * @experimental + */ + post(method: "Debugger.setBlackboxedRanges", params?: Debugger.SetBlackboxedRangesParameterType): Promise; + /** + * Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification. + */ + post(method: "Console.enable"): Promise; + /** + * Disables console domain, prevents further console messages from being reported to the client. + */ + post(method: "Console.disable"): Promise; + /** + * Does nothing. + */ + post(method: "Console.clearMessages"): Promise; + post(method: "Profiler.enable"): Promise; + post(method: "Profiler.disable"): Promise; + /** + * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. + */ + post(method: "Profiler.setSamplingInterval", params?: Profiler.SetSamplingIntervalParameterType): Promise; + post(method: "Profiler.start"): Promise; + post(method: "Profiler.stop"): Promise; + /** + * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters. + */ + post(method: "Profiler.startPreciseCoverage", params?: Profiler.StartPreciseCoverageParameterType): Promise; + /** + * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code. + */ + post(method: "Profiler.stopPreciseCoverage"): Promise; + /** + * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started. + */ + post(method: "Profiler.takePreciseCoverage"): Promise; + /** + * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection. + */ + post(method: "Profiler.getBestEffortCoverage"): Promise; + post(method: "HeapProfiler.enable"): Promise; + post(method: "HeapProfiler.disable"): Promise; + post(method: "HeapProfiler.startTrackingHeapObjects", params?: HeapProfiler.StartTrackingHeapObjectsParameterType): Promise; + post(method: "HeapProfiler.stopTrackingHeapObjects", params?: HeapProfiler.StopTrackingHeapObjectsParameterType): Promise; + post(method: "HeapProfiler.takeHeapSnapshot", params?: HeapProfiler.TakeHeapSnapshotParameterType): Promise; + post(method: "HeapProfiler.collectGarbage"): Promise; + post(method: "HeapProfiler.getObjectByHeapObjectId", params?: HeapProfiler.GetObjectByHeapObjectIdParameterType): Promise; + /** + * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). + */ + post(method: "HeapProfiler.addInspectedHeapObject", params?: HeapProfiler.AddInspectedHeapObjectParameterType): Promise; + post(method: "HeapProfiler.getHeapObjectId", params?: HeapProfiler.GetHeapObjectIdParameterType): Promise; + post(method: "HeapProfiler.startSampling", params?: HeapProfiler.StartSamplingParameterType): Promise; + post(method: "HeapProfiler.stopSampling"): Promise; + post(method: "HeapProfiler.getSamplingProfile"): Promise; + /** + * Read a chunk of the stream + */ + post(method: "IO.read", params?: IO.ReadParameterType): Promise; + post(method: "IO.close", params?: IO.CloseParameterType): Promise; + /** + * Disables network tracking, prevents network events from being sent to the client. + */ + post(method: "Network.disable"): Promise; + /** + * Enables network tracking, network events will now be delivered to the client. + */ + post(method: "Network.enable", params?: Network.EnableParameterType): Promise; + /** + * Returns post data sent with the request. Returns an error when no data was sent with the request. + */ + post(method: "Network.getRequestPostData", params?: Network.GetRequestPostDataParameterType): Promise; + /** + * Returns content served for the given request. + */ + post(method: "Network.getResponseBody", params?: Network.GetResponseBodyParameterType): Promise; + /** + * Enables streaming of the response for the given requestId. + * If enabled, the dataReceived event contains the data that was received during streaming. + * @experimental + */ + post(method: "Network.streamResourceContent", params?: Network.StreamResourceContentParameterType): Promise; + /** + * Fetches the resource and returns the content. + */ + post(method: "Network.loadNetworkResource", params?: Network.LoadNetworkResourceParameterType): Promise; + /** + * Enable the NodeRuntime events except by `NodeRuntime.waitingForDisconnect`. + */ + post(method: "NodeRuntime.enable"): Promise; + /** + * Disable NodeRuntime events + */ + post(method: "NodeRuntime.disable"): Promise; + /** + * Enable the `NodeRuntime.waitingForDisconnect`. + */ + post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType): Promise; + /** + * Gets supported tracing categories. + */ + post(method: "NodeTracing.getCategories"): Promise; + /** + * Start trace events collection. + */ + post(method: "NodeTracing.start", params?: NodeTracing.StartParameterType): Promise; + /** + * Stop trace events collection. Remaining collected events will be sent as a sequence of + * dataCollected events followed by tracingComplete event. + */ + post(method: "NodeTracing.stop"): Promise; + /** + * Sends protocol message over session with given id. + */ + post(method: "NodeWorker.sendMessageToWorker", params?: NodeWorker.SendMessageToWorkerParameterType): Promise; + /** + * Instructs the inspector to attach to running workers. Will also attach to new workers + * as they start + */ + post(method: "NodeWorker.enable", params?: NodeWorker.EnableParameterType): Promise; + /** + * Detaches from all running workers and disables attaching to new workers as they are started. + */ + post(method: "NodeWorker.disable"): Promise; + /** + * Detached from the worker with given sessionId. + */ + post(method: "NodeWorker.detach", params?: NodeWorker.DetachParameterType): Promise; + post(method: "Target.getTargets"): Promise; + post(method: "Target.setAutoAttach", params?: Target.SetAutoAttachParameterType): Promise; + post(method: "DOMStorage.clear", params?: DOMStorage.ClearParameterType): Promise; + /** + * Disables storage tracking, prevents storage events from being sent to the client. + */ + post(method: "DOMStorage.disable"): Promise; + /** + * Enables storage tracking, storage events will now be delivered to the client. + */ + post(method: "DOMStorage.enable"): Promise; + post(method: "DOMStorage.getDOMStorageItems", params?: DOMStorage.GetDOMStorageItemsParameterType): Promise; + post(method: "DOMStorage.removeDOMStorageItem", params?: DOMStorage.RemoveDOMStorageItemParameterType): Promise; + post(method: "DOMStorage.setDOMStorageItem", params?: DOMStorage.SetDOMStorageItemParameterType): Promise; + /** + * @experimental + */ + post(method: "Storage.getStorageKey", params?: Storage.GetStorageKeyParameterType): Promise; + addListener(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + addListener(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; + /** + * Issued when new execution context is created. + */ + addListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + addListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + addListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + addListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + addListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + addListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + addListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + addListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + addListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + addListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + addListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + addListener(event: "Debugger.resumed", listener: () => void): this; + /** + * Issued when new console message is added. + */ + addListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + addListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + addListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + addListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + addListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + addListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + addListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + addListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + addListener(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; + addListener(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; + addListener(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; + /** + * Fired when data chunk was received over the network. + */ + addListener(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; + /** + * Fired upon WebSocket creation. + */ + addListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket is closed. + */ + addListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket handshake response becomes available. + */ + addListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + addListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + /** + * This event is fired when the runtime is waiting for the debugger. For + * example, when inspector.waitingForDebugger is called + */ + addListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; + /** + * Contains an bucket of collected trace events. + */ + addListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + addListener(event: "NodeTracing.tracingComplete", listener: () => void): this; + /** + * Issued when attached to a worker. + */ + addListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + addListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + addListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + addListener(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; + addListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; + addListener(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; + addListener(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; + addListener(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; + addListener(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "inspectorNotification", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextCreated", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextDestroyed", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextsCleared"): boolean; + emit(event: "Runtime.exceptionThrown", message: InspectorNotification): boolean; + emit(event: "Runtime.exceptionRevoked", message: InspectorNotification): boolean; + emit(event: "Runtime.consoleAPICalled", message: InspectorNotification): boolean; + emit(event: "Runtime.inspectRequested", message: InspectorNotification): boolean; + emit(event: "Debugger.scriptParsed", message: InspectorNotification): boolean; + emit(event: "Debugger.scriptFailedToParse", message: InspectorNotification): boolean; + emit(event: "Debugger.breakpointResolved", message: InspectorNotification): boolean; + emit(event: "Debugger.paused", message: InspectorNotification): boolean; + emit(event: "Debugger.resumed"): boolean; + emit(event: "Console.messageAdded", message: InspectorNotification): boolean; + emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification): boolean; + emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.addHeapSnapshotChunk", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.resetProfiles"): boolean; + emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification): boolean; + emit(event: "Network.requestWillBeSent", message: InspectorNotification): boolean; + emit(event: "Network.responseReceived", message: InspectorNotification): boolean; + emit(event: "Network.loadingFailed", message: InspectorNotification): boolean; + emit(event: "Network.loadingFinished", message: InspectorNotification): boolean; + emit(event: "Network.dataReceived", message: InspectorNotification): boolean; + emit(event: "Network.webSocketCreated", message: InspectorNotification): boolean; + emit(event: "Network.webSocketClosed", message: InspectorNotification): boolean; + emit(event: "Network.webSocketHandshakeResponseReceived", message: InspectorNotification): boolean; + emit(event: "NodeRuntime.waitingForDisconnect"): boolean; + emit(event: "NodeRuntime.waitingForDebugger"): boolean; + emit(event: "NodeTracing.dataCollected", message: InspectorNotification): boolean; + emit(event: "NodeTracing.tracingComplete"): boolean; + emit(event: "NodeWorker.attachedToWorker", message: InspectorNotification): boolean; + emit(event: "NodeWorker.detachedFromWorker", message: InspectorNotification): boolean; + emit(event: "NodeWorker.receivedMessageFromWorker", message: InspectorNotification): boolean; + emit(event: "Target.targetCreated", message: InspectorNotification): boolean; + emit(event: "Target.attachedToTarget", message: InspectorNotification): boolean; + emit(event: "DOMStorage.domStorageItemAdded", message: InspectorNotification): boolean; + emit(event: "DOMStorage.domStorageItemRemoved", message: InspectorNotification): boolean; + emit(event: "DOMStorage.domStorageItemUpdated", message: InspectorNotification): boolean; + emit(event: "DOMStorage.domStorageItemsCleared", message: InspectorNotification): boolean; + on(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + on(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; + /** + * Issued when new execution context is created. + */ + on(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + on(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + on(event: "Runtime.executionContextsCleared", listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + on(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + on(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + on(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + on(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + on(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + on(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + on(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + on(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + on(event: "Debugger.resumed", listener: () => void): this; + /** + * Issued when new console message is added. + */ + on(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + on(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + on(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + on(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + on(event: "HeapProfiler.resetProfiles", listener: () => void): this; + on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + on(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + on(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + on(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + on(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; + on(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; + on(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; + /** + * Fired when data chunk was received over the network. + */ + on(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; + /** + * Fired upon WebSocket creation. + */ + on(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket is closed. + */ + on(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket handshake response becomes available. + */ + on(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + on(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + /** + * This event is fired when the runtime is waiting for the debugger. For + * example, when inspector.waitingForDebugger is called + */ + on(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; + /** + * Contains an bucket of collected trace events. + */ + on(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + on(event: "NodeTracing.tracingComplete", listener: () => void): this; + /** + * Issued when attached to a worker. + */ + on(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + on(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + on(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + on(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; + on(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; + on(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; + on(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; + on(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; + on(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + once(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; + /** + * Issued when new execution context is created. + */ + once(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + once(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + once(event: "Runtime.executionContextsCleared", listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + once(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + once(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + once(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + once(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + once(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + once(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + once(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + once(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + once(event: "Debugger.resumed", listener: () => void): this; + /** + * Issued when new console message is added. + */ + once(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + once(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + once(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + once(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + once(event: "HeapProfiler.resetProfiles", listener: () => void): this; + once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + once(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + once(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + once(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + once(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; + once(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; + once(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; + /** + * Fired when data chunk was received over the network. + */ + once(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; + /** + * Fired upon WebSocket creation. + */ + once(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket is closed. + */ + once(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket handshake response becomes available. + */ + once(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + once(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + /** + * This event is fired when the runtime is waiting for the debugger. For + * example, when inspector.waitingForDebugger is called + */ + once(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; + /** + * Contains an bucket of collected trace events. + */ + once(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + once(event: "NodeTracing.tracingComplete", listener: () => void): this; + /** + * Issued when attached to a worker. + */ + once(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + once(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + once(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + once(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; + once(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; + once(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; + once(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; + once(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; + once(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + prependListener(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; + /** + * Issued when new execution context is created. + */ + prependListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + prependListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + prependListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + prependListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + prependListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + prependListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + prependListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + prependListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + prependListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + prependListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + prependListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + prependListener(event: "Debugger.resumed", listener: () => void): this; + /** + * Issued when new console message is added. + */ + prependListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + prependListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + prependListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + prependListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + prependListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + prependListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + prependListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + prependListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + prependListener(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; + prependListener(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; + prependListener(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; + /** + * Fired when data chunk was received over the network. + */ + prependListener(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; + /** + * Fired upon WebSocket creation. + */ + prependListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket is closed. + */ + prependListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket handshake response becomes available. + */ + prependListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + prependListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + /** + * This event is fired when the runtime is waiting for the debugger. For + * example, when inspector.waitingForDebugger is called + */ + prependListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; + /** + * Contains an bucket of collected trace events. + */ + prependListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + prependListener(event: "NodeTracing.tracingComplete", listener: () => void): this; + /** + * Issued when attached to a worker. + */ + prependListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + prependListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + prependListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + prependListener(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; + prependListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; + prependListener(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; + prependListener(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; + prependListener(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; + prependListener(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + prependOnceListener(event: "inspectorNotification", listener: (message: InspectorNotification) => void): this; + /** + * Issued when new execution context is created. + */ + prependOnceListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + prependOnceListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + prependOnceListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + prependOnceListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + prependOnceListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + prependOnceListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + prependOnceListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + prependOnceListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + prependOnceListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + prependOnceListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + prependOnceListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + prependOnceListener(event: "Debugger.resumed", listener: () => void): this; + /** + * Issued when new console message is added. + */ + prependOnceListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + prependOnceListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + prependOnceListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + /** + * Fired when page is about to send HTTP request. + */ + prependOnceListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification) => void): this; + /** + * Fired when HTTP response is available. + */ + prependOnceListener(event: "Network.responseReceived", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "Network.loadingFailed", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "Network.loadingFinished", listener: (message: InspectorNotification) => void): this; + /** + * Fired when data chunk was received over the network. + */ + prependOnceListener(event: "Network.dataReceived", listener: (message: InspectorNotification) => void): this; + /** + * Fired upon WebSocket creation. + */ + prependOnceListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket is closed. + */ + prependOnceListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification) => void): this; + /** + * Fired when WebSocket handshake response becomes available. + */ + prependOnceListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + prependOnceListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; + /** + * This event is fired when the runtime is waiting for the debugger. For + * example, when inspector.waitingForDebugger is called + */ + prependOnceListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this; + /** + * Contains an bucket of collected trace events. + */ + prependOnceListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + prependOnceListener(event: "NodeTracing.tracingComplete", listener: () => void): this; + /** + * Issued when attached to a worker. + */ + prependOnceListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + prependOnceListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + prependOnceListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "Target.targetCreated", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification) => void): this; + } +} diff --git a/node_modules/@types/node/inspector/promises.d.ts b/node_modules/@types/node/inspector/promises.d.ts new file mode 100644 index 0000000..e75ff20 --- /dev/null +++ b/node_modules/@types/node/inspector/promises.d.ts @@ -0,0 +1,35 @@ +declare module "node:inspector/promises" { + import { EventEmitter } from "node:events"; + export { close, console, NetworkResources, open, url, waitForDebugger } from "node:inspector"; + /** + * The `inspector.Session` is used for dispatching messages to the V8 inspector + * back-end and receiving message responses and notifications. + * @since v19.0.0 + */ + export class Session extends EventEmitter { + /** + * Create a new instance of the inspector.Session class. + * The inspector session needs to be connected through `session.connect()` before the messages can be dispatched to the inspector backend. + */ + constructor(); + /** + * Connects a session to the inspector back-end. + */ + connect(): void; + /** + * Connects a session to the inspector back-end. + * An exception will be thrown if this API was not called on a Worker thread. + * @since v12.11.0 + */ + connectToMainThread(): void; + /** + * Immediately close the session. All pending message callbacks will be called with an error. + * `session.connect()` will need to be called to be able to send messages again. + * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints. + */ + disconnect(): void; + } +} +declare module "inspector/promises" { + export * from "node:inspector/promises"; +} diff --git a/node_modules/@types/node/module.d.ts b/node_modules/@types/node/module.d.ts new file mode 100644 index 0000000..792a0bd --- /dev/null +++ b/node_modules/@types/node/module.d.ts @@ -0,0 +1,726 @@ +declare module "node:module" { + import { URL } from "node:url"; + class Module { + constructor(id: string, parent?: Module); + } + interface Module extends NodeJS.Module {} + namespace Module { + export { Module }; + } + namespace Module { + /** + * A list of the names of all modules provided by Node.js. Can be used to verify + * if a module is maintained by a third party or not. + * + * Note: the list doesn't contain prefix-only modules like `node:test`. + * @since v9.3.0, v8.10.0, v6.13.0 + */ + const builtinModules: readonly string[]; + /** + * @since v12.2.0 + * @param path Filename to be used to construct the require + * function. Must be a file URL object, file URL string, or absolute path + * string. + */ + function createRequire(path: string | URL): NodeJS.Require; + namespace constants { + /** + * The following constants are returned as the `status` field in the object returned by + * {@link enableCompileCache} to indicate the result of the attempt to enable the + * [module compile cache](https://nodejs.org/docs/latest-v26.x/api/module.html#module-compile-cache). + * @since v22.8.0 + */ + namespace compileCacheStatus { + /** + * Node.js has enabled the compile cache successfully. The directory used to store the + * compile cache will be returned in the `directory` field in the + * returned object. + */ + const ENABLED: number; + /** + * The compile cache has already been enabled before, either by a previous call to + * {@link enableCompileCache}, or by the `NODE_COMPILE_CACHE=dir` + * environment variable. The directory used to store the + * compile cache will be returned in the `directory` field in the + * returned object. + */ + const ALREADY_ENABLED: number; + /** + * Node.js fails to enable the compile cache. This can be caused by the lack of + * permission to use the specified directory, or various kinds of file system errors. + * The detail of the failure will be returned in the `message` field in the + * returned object. + */ + const FAILED: number; + /** + * Node.js cannot enable the compile cache because the environment variable + * `NODE_DISABLE_COMPILE_CACHE=1` has been set. + */ + const DISABLED: number; + } + } + interface EnableCompileCacheOptions { + /** + * Optional. Directory to store the compile cache. If not specified, + * the directory specified by the `NODE_COMPILE_CACHE=dir` environment variable + * will be used if it's set, or `path.join(os.tmpdir(), 'node-compile-cache')` + * otherwise. + * @since v25.0.0 + */ + directory?: string | undefined; + /** + * Optional. If `true`, enables portable compile cache so that + * the cache can be reused even if the project directory is moved. This is a best-effort + * feature. If not specified, it will depend on whether the environment variable + * `NODE_COMPILE_CACHE_PORTABLE=1` is set. + * @since v25.0.0 + */ + portable?: boolean | undefined; + } + interface EnableCompileCacheResult { + /** + * One of the {@link constants.compileCacheStatus} + */ + status: number; + /** + * If Node.js cannot enable the compile cache, this contains + * the error message. Only set if `status` is `module.constants.compileCacheStatus.FAILED`. + */ + message?: string; + /** + * If the compile cache is enabled, this contains the directory + * where the compile cache is stored. Only set if `status` is + * `module.constants.compileCacheStatus.ENABLED` or + * `module.constants.compileCacheStatus.ALREADY_ENABLED`. + */ + directory?: string; + } + /** + * Enable [module compile cache](https://nodejs.org/docs/latest-v26.x/api/module.html#module-compile-cache) + * in the current Node.js instance. + * + * For general use cases, it's recommended to call `module.enableCompileCache()` without + * specifying the `options.directory`, so that the directory can be overridden by the + * `NODE_COMPILE_CACHE` environment variable when necessary. + * + * Since compile cache is supposed to be a optimization that is not mission critical, this + * method is designed to not throw any exception when the compile cache cannot be enabled. + * Instead, it will return an object containing an error message in the `message` field to + * aid debugging. If compile cache is enabled successfully, the `directory` field in the + * returned object contains the path to the directory where the compile cache is stored. The + * `status` field in the returned object would be one of the `module.constants.compileCacheStatus` + * values to indicate the result of the attempt to enable the + * [module compile cache](https://nodejs.org/docs/latest-v26.x/api/module.html#module-compile-cache). + * + * This method only affects the current Node.js instance. To enable it in child worker threads, + * either call this method in child worker threads too, or set the + * `process.env.NODE_COMPILE_CACHE` value to compile cache directory so the behavior can + * be inherited into the child workers. The directory can be obtained either from the + * `directory` field returned by this method, or with {@link getCompileCacheDir}. + * @since v22.8.0 + * @param options Optional. If a string is passed, it is considered to be `options.directory`. + */ + function enableCompileCache(options?: string | EnableCompileCacheOptions): EnableCompileCacheResult; + /** + * Flush the [module compile cache](https://nodejs.org/docs/latest-v26.x/api/module.html#module-compile-cache) + * accumulated from modules already loaded + * in the current Node.js instance to disk. This returns after all the flushing + * file system operations come to an end, no matter they succeed or not. If there + * are any errors, this will fail silently, since compile cache misses should not + * interfere with the actual operation of the application. + * @since v22.10.0 + */ + function flushCompileCache(): void; + /** + * @since v22.8.0 + * @return Path to the [module compile cache](https://nodejs.org/docs/latest-v26.x/api/module.html#module-compile-cache) + * directory if it is enabled, or `undefined` otherwise. + */ + function getCompileCacheDir(): string | undefined; + /** + * ```text + * /path/to/project + * ├ packages/ + * ├ bar/ + * ├ bar.js + * └ package.json // name = '@foo/bar' + * └ qux/ + * ├ node_modules/ + * └ some-package/ + * └ package.json // name = 'some-package' + * ├ qux.js + * └ package.json // name = '@foo/qux' + * ├ main.js + * └ package.json // name = '@foo' + * ``` + * ```js + * // /path/to/project/packages/bar/bar.js + * import { findPackageJSON } from 'node:module'; + * + * findPackageJSON('..', import.meta.url); + * // '/path/to/project/package.json' + * // Same result when passing an absolute specifier instead: + * findPackageJSON(new URL('../', import.meta.url)); + * findPackageJSON(import.meta.resolve('../')); + * + * findPackageJSON('some-package', import.meta.url); + * // '/path/to/project/packages/bar/node_modules/some-package/package.json' + * // When passing an absolute specifier, you might get a different result if the + * // resolved module is inside a subfolder that has nested `package.json`. + * findPackageJSON(import.meta.resolve('some-package')); + * // '/path/to/project/packages/bar/node_modules/some-package/some-subfolder/package.json' + * + * findPackageJSON('@foo/qux', import.meta.url); + * // '/path/to/project/packages/qux/package.json' + * ``` + * @since v22.14.0 + * @param specifier The specifier for the module whose `package.json` to + * retrieve. When passing a _bare specifier_, the `package.json` at the root of + * the package is returned. When passing a _relative specifier_ or an _absolute specifier_, + * the closest parent `package.json` is returned. + * @param base The absolute location (`file:` URL string or FS path) of the + * containing module. For CJS, use `__filename` (not `__dirname`!); for ESM, use + * `import.meta.url`. You do not need to pass it if `specifier` is an _absolute specifier_. + * @returns A path if the `package.json` is found. When `startLocation` + * is a package, the package's root `package.json`; when a relative or unresolved, the closest + * `package.json` to the `startLocation`. + */ + function findPackageJSON(specifier: string | URL, base?: string | URL): string | undefined; + /** + * @since v18.6.0, v16.17.0 + */ + function isBuiltin(moduleName: string): boolean; + interface RegisterOptions { + /** + * If you want to resolve `specifier` relative to a + * base URL, such as `import.meta.url`, you can pass that URL here. This + * property is ignored if the `parentURL` is supplied as the second argument. + * @default 'data:' + */ + parentURL?: string | URL | undefined; + /** + * Any arbitrary, cloneable JavaScript value to pass into the + * {@link initialize} hook. + */ + data?: Data | undefined; + /** + * [Transferable objects](https://nodejs.org/docs/latest-v26.x/api/worker_threads.html#portpostmessagevalue-transferlist) + * to be passed into the `initialize` hook. + */ + transferList?: any[] | undefined; + } + /* eslint-disable @definitelytyped/no-unnecessary-generics */ + /** + * Register a module that exports hooks that customize Node.js module + * resolution and loading behavior. See + * [Customization hooks](https://nodejs.org/docs/latest-v26.x/api/module.html#customization-hooks). + * + * This feature requires `--allow-worker` if used with the + * [Permission Model](https://nodejs.org/docs/latest-v26.x/api/permissions.html#permission-model). + * @since v20.6.0, v18.19.0 + * @deprecated Use `module.registerHooks()` instead. + * @param specifier Customization hooks to be registered; this should be + * the same string that would be passed to `import()`, except that if it is + * relative, it is resolved relative to `parentURL`. + * @param parentURL f you want to resolve `specifier` relative to a base + * URL, such as `import.meta.url`, you can pass that URL here. + */ + function register( + specifier: string | URL, + parentURL?: string | URL, + options?: RegisterOptions, + ): void; + function register(specifier: string | URL, options?: RegisterOptions): void; + interface RegisterHooksOptions { + /** + * See [load hook](https://nodejs.org/docs/latest-v26.x/api/module.html#loadurl-context-nextload). + * @default undefined + */ + load?: LoadHookSync | undefined; + /** + * See [resolve hook](https://nodejs.org/docs/latest-v26.x/api/module.html#resolvespecifier-context-nextresolve). + * @default undefined + */ + resolve?: ResolveHookSync | undefined; + } + interface ModuleHooks { + /** + * Deregister the hook instance. + */ + deregister(): void; + } + /** + * Register [hooks](https://nodejs.org/docs/latest-v26.x/api/module.html#customization-hooks) + * that customize Node.js module resolution and loading behavior. + * @since v22.15.0 + * @experimental + */ + function registerHooks(options: RegisterHooksOptions): ModuleHooks; + interface StripTypeScriptTypesOptions { + /** + * Possible values are: + * * `'strip'` Only strip type annotations without performing the transformation of TypeScript features. + * @default 'strip' + */ + mode?: "strip" | undefined; + /** + * Specifies the source url used in the source map. + */ + sourceUrl?: string | undefined; + } + /** + * `module.stripTypeScriptTypes()` removes type annotations from TypeScript code. It + * can be used to strip type annotations from TypeScript code before running it + * with `vm.runInContext()` or `vm.compileFunction()`. + * + * By default, it will throw an error if the code contains TypeScript features + * that require transformation, such as `enum`s. See [type-stripping](https://nodejs.org/docs/latest-v26.x/api/typescript.md#type-stripping) for more information. + * + * _WARNING_: The output of this function should not be considered stable across Node.js versions, + * due to changes in the TypeScript parser. + * + * ```js + * import { stripTypeScriptTypes } from 'node:module'; + * const code = 'const a: number = 1;'; + * const strippedCode = stripTypeScriptTypes(code); + * console.log(strippedCode); + * // Prints: const a = 1; + * ``` + * + * If `sourceUrl` is provided, it will be used appended as a comment at the end of the output: + * + * ```js + * import { stripTypeScriptTypes } from 'node:module'; + * const code = 'const a: number = 1;'; + * const strippedCode = stripTypeScriptTypes(code, { mode: 'strip', sourceUrl: 'source.ts' }); + * console.log(strippedCode); + * // Prints: const a = 1\n\n//# sourceURL=source.ts; + * ``` + * @since v22.13.0 + * @param code The code to strip type annotations from. + * @returns The code with type annotations stripped. + */ + function stripTypeScriptTypes(code: string, options?: StripTypeScriptTypesOptions): string; + /* eslint-enable @definitelytyped/no-unnecessary-generics */ + /** + * The `module.syncBuiltinESMExports()` method updates all the live bindings for + * builtin `ES Modules` to match the properties of the `CommonJS` exports. It + * does not add or remove exported names from the `ES Modules`. + * + * ```js + * import fs from 'node:fs'; + * import assert from 'node:assert'; + * import { syncBuiltinESMExports } from 'node:module'; + * + * fs.readFile = newAPI; + * + * delete fs.readFileSync; + * + * function newAPI() { + * // ... + * } + * + * fs.newAPI = newAPI; + * + * syncBuiltinESMExports(); + * + * import('node:fs').then((esmFS) => { + * // It syncs the existing readFile property with the new value + * assert.strictEqual(esmFS.readFile, newAPI); + * // readFileSync has been deleted from the required fs + * assert.strictEqual('readFileSync' in fs, false); + * // syncBuiltinESMExports() does not remove readFileSync from esmFS + * assert.strictEqual('readFileSync' in esmFS, true); + * // syncBuiltinESMExports() does not add names + * assert.strictEqual(esmFS.newAPI, undefined); + * }); + * ``` + * @since v12.12.0 + */ + function syncBuiltinESMExports(): void; + interface ImportAttributes extends NodeJS.Dict { + type?: string | undefined; + } + type ImportPhase = "source" | "evaluation"; + type ModuleFormat = + | "addon" + | "builtin" + | "commonjs" + | "commonjs-typescript" + | "json" + | "module" + | "module-typescript" + | "wasm"; + type ModuleSource = string | ArrayBuffer | NodeJS.TypedArray; + type InitializeHook = (data: Data) => void | Promise; + interface ResolveHookContext { + conditions: string[]; + importAttributes: ImportAttributes; + parentURL: string | undefined; + } + interface ResolveFnOutput { + format?: string | null | undefined; + importAttributes?: ImportAttributes | undefined; + shortCircuit?: boolean | undefined; + url: string; + } + type ResolveHook = ( + specifier: string, + context: ResolveHookContext, + nextResolve: ( + specifier: string, + context?: Partial, + ) => ResolveFnOutput | Promise, + ) => ResolveFnOutput | Promise; + type ResolveHookSync = ( + specifier: string, + context: ResolveHookContext, + nextResolve: ( + specifier: string, + context?: Partial, + ) => ResolveFnOutput, + ) => ResolveFnOutput; + interface LoadHookContext { + conditions: string[]; + format: string | null | undefined; + importAttributes: ImportAttributes; + } + interface LoadFnOutput { + format: string | null | undefined; + shortCircuit?: boolean | undefined; + source?: ModuleSource | undefined; + } + type LoadHook = ( + url: string, + context: LoadHookContext, + nextLoad: ( + url: string, + context?: Partial, + ) => LoadFnOutput | Promise, + ) => LoadFnOutput | Promise; + type LoadHookSync = ( + url: string, + context: LoadHookContext, + nextLoad: ( + url: string, + context?: Partial, + ) => LoadFnOutput, + ) => LoadFnOutput; + interface SourceMapsSupport { + /** + * If the source maps support is enabled + */ + enabled: boolean; + /** + * If the support is enabled for files in `node_modules`. + */ + nodeModules: boolean; + /** + * If the support is enabled for generated code from `eval` or `new Function`. + */ + generatedCode: boolean; + } + /** + * This method returns whether the [Source Map v3](https://tc39.es/ecma426/) support for stack + * traces is enabled. + * @since v23.7.0, v22.14.0 + */ + function getSourceMapsSupport(): SourceMapsSupport; + /** + * `path` is the resolved path for the file for which a corresponding source map + * should be fetched. + * @since v13.7.0, v12.17.0 + * @return Returns `module.SourceMap` if a source map is found, `undefined` otherwise. + */ + function findSourceMap(path: string): SourceMap | undefined; + interface SetSourceMapsSupportOptions { + /** + * If enabling the support for files in `node_modules`. + * @default false + */ + nodeModules?: boolean | undefined; + /** + * If enabling the support for generated code from `eval` or `new Function`. + * @default false + */ + generatedCode?: boolean | undefined; + } + /** + * This function enables or disables the [Source Map v3](https://tc39.es/ecma426/) support for + * stack traces. + * + * It provides same features as launching Node.js process with commandline options + * `--enable-source-maps`, with additional options to alter the support for files + * in `node_modules` or generated codes. + * + * Only source maps in JavaScript files that are loaded after source maps has been + * enabled will be parsed and loaded. Preferably, use the commandline options + * `--enable-source-maps` to avoid losing track of source maps of modules loaded + * before this API call. + * @since v23.7.0, v22.14.0 + */ + function setSourceMapsSupport(enabled: boolean, options?: SetSourceMapsSupportOptions): void; + interface SourceMapConstructorOptions { + /** + * @since v21.0.0, v20.5.0 + */ + lineLengths?: readonly number[] | undefined; + } + interface SourceMapPayload { + file: string; + version: number; + sources: string[]; + sourcesContent: string[]; + names: string[]; + mappings: string; + sourceRoot: string; + } + interface SourceMapping { + generatedLine: number; + generatedColumn: number; + originalSource: string; + originalLine: number; + originalColumn: number; + } + interface SourceOrigin { + /** + * The name of the range in the source map, if one was provided + */ + name: string | undefined; + /** + * The file name of the original source, as reported in the SourceMap + */ + fileName: string; + /** + * The 1-indexed lineNumber of the corresponding call site in the original source + */ + lineNumber: number; + /** + * The 1-indexed columnNumber of the corresponding call site in the original source + */ + columnNumber: number; + } + /** + * @since v13.7.0, v12.17.0 + */ + class SourceMap { + constructor(payload: SourceMapPayload, options?: SourceMapConstructorOptions); + /** + * Getter for the payload used to construct the `SourceMap` instance. + */ + readonly payload: SourceMapPayload; + /** + * Given a line offset and column offset in the generated source + * file, returns an object representing the SourceMap range in the + * original file if found, or an empty object if not. + * + * The object returned contains the following keys: + * + * The returned value represents the raw range as it appears in the + * SourceMap, based on zero-indexed offsets, _not_ 1-indexed line and + * column numbers as they appear in Error messages and CallSite + * objects. + * + * To get the corresponding 1-indexed line and column numbers from a + * lineNumber and columnNumber as they are reported by Error stacks + * and CallSite objects, use `sourceMap.findOrigin(lineNumber, columnNumber)` + * @param lineOffset The zero-indexed line number offset in the generated source + * @param columnOffset The zero-indexed column number offset in the generated source + */ + findEntry(lineOffset: number, columnOffset: number): SourceMapping | {}; + /** + * Given a 1-indexed `lineNumber` and `columnNumber` from a call site in the generated source, + * find the corresponding call site location in the original source. + * + * If the `lineNumber` and `columnNumber` provided are not found in any source map, + * then an empty object is returned. + * @param lineNumber The 1-indexed line number of the call site in the generated source + * @param columnNumber The 1-indexed column number of the call site in the generated source + */ + findOrigin(lineNumber: number, columnNumber: number): SourceOrigin | {}; + } + function runMain(main?: string): void; + function wrap(script: string): string; + } + global { + namespace NodeJS { + interface Module { + /** + * The module objects required for the first time by this one. + * @since v0.1.16 + */ + children: Module[]; + /** + * The `module.exports` object is created by the `Module` system. Sometimes this is + * not acceptable; many want their module to be an instance of some class. To do + * this, assign the desired export object to `module.exports`. + * @since v0.1.16 + */ + exports: any; + /** + * The fully resolved filename of the module. + * @since v0.1.16 + */ + filename: string; + /** + * The identifier for the module. Typically this is the fully resolved + * filename. + * @since v0.1.16 + */ + id: string; + /** + * `true` if the module is running during the Node.js preload + * phase. + * @since v15.4.0, v14.17.0 + */ + isPreloading: boolean; + /** + * Whether or not the module is done loading, or is in the process of + * loading. + * @since v0.1.16 + */ + loaded: boolean; + /** + * The module that first required this one, or `null` if the current module is the + * entry point of the current process, or `undefined` if the module was loaded by + * something that is not a CommonJS module (e.g. REPL or `import`). + * @since v0.1.16 + * @deprecated Please use `require.main` and `module.children` instead. + */ + parent: Module | null | undefined; + /** + * The directory name of the module. This is usually the same as the + * `path.dirname()` of the `module.id`. + * @since v11.14.0 + */ + path: string; + /** + * The search paths for the module. + * @since v0.4.0 + */ + paths: string[]; + /** + * The `module.require()` method provides a way to load a module as if + * `require()` was called from the original module. + * @since v0.5.1 + */ + require(id: string): any; + } + interface Require { + /** + * Used to import modules, `JSON`, and local files. + * @since v0.1.13 + */ + (id: string): any; + /** + * Modules are cached in this object when they are required. By deleting a key + * value from this object, the next `require` will reload the module. + * This does not apply to + * [native addons](https://nodejs.org/docs/latest-v26.x/api/addons.html), + * for which reloading will result in an error. + * @since v0.3.0 + */ + cache: Dict; + /** + * Instruct `require` on how to handle certain file extensions. + * @since v0.3.0 + * @deprecated + */ + extensions: RequireExtensions; + /** + * The `Module` object representing the entry script loaded when the Node.js + * process launched, or `undefined` if the entry point of the program is not a + * CommonJS module. + * @since v0.1.17 + */ + main: Module | undefined; + /** + * @since v0.3.0 + */ + resolve: RequireResolve; + } + /** @deprecated */ + interface RequireExtensions extends Dict<(module: Module, filename: string) => any> { + ".js": (module: Module, filename: string) => any; + ".json": (module: Module, filename: string) => any; + ".node": (module: Module, filename: string) => any; + } + interface RequireResolveOptions { + /** + * Paths to resolve module location from. If present, these + * paths are used instead of the default resolution paths, with the exception + * of + * [GLOBAL\_FOLDERS](https://nodejs.org/docs/latest-v26.x/api/modules.html#loading-from-the-global-folders) + * like `$HOME/.node_modules`, which are + * always included. Each of these paths is used as a starting point for + * the module resolution algorithm, meaning that the `node_modules` hierarchy + * is checked from this location. + * @since v8.9.0 + */ + paths?: string[] | undefined; + } + interface RequireResolve { + /** + * Use the internal `require()` machinery to look up the location of a module, + * but rather than loading the module, just return the resolved filename. + * + * If the module can not be found, a `MODULE_NOT_FOUND` error is thrown. + * @since v0.3.0 + * @param request The module path to resolve. + */ + (request: string, options?: RequireResolveOptions): string; + /** + * Returns an array containing the paths searched during resolution of `request` or + * `null` if the `request` string references a core module, for example `http` or + * `fs`. + * @since v8.9.0 + * @param request The module path whose lookup paths are being retrieved. + */ + paths(request: string): string[] | null; + } + } + /** + * The directory name of the current module. This is the same as the + * `path.dirname()` of the `__filename`. + * @since v0.1.27 + */ + var __dirname: string; + /** + * The file name of the current module. This is the current module file's absolute + * path with symlinks resolved. + * + * For a main program this is not necessarily the same as the file name used in the + * command line. + * @since v0.0.1 + */ + var __filename: string; + /** + * The `exports` variable is available within a module's file-level scope, and is + * assigned the value of `module.exports` before the module is evaluated. + * @since v0.1.16 + */ + var exports: NodeJS.Module["exports"]; + /** + * A reference to the current module. + * @since v0.1.16 + */ + var module: NodeJS.Module; + /** + * @since v0.1.13 + */ + var require: NodeJS.Require; + // Global-scope aliases for backwards compatibility with @types/node <13.0.x + // TODO: consider removing in a future major version update + /** @deprecated Use `NodeJS.Module` instead. */ + interface NodeModule extends NodeJS.Module {} + /** @deprecated Use `NodeJS.Require` instead. */ + interface NodeRequire extends NodeJS.Require {} + /** @deprecated Use `NodeJS.RequireResolve` instead. */ + interface RequireResolve extends NodeJS.RequireResolve {} + } + export = Module; +} +declare module "module" { + import module = require("node:module"); + export = module; +} diff --git a/node_modules/@types/node/net.d.ts b/node_modules/@types/node/net.d.ts new file mode 100644 index 0000000..3f104c5 --- /dev/null +++ b/node_modules/@types/node/net.d.ts @@ -0,0 +1,1074 @@ +declare module "node:net" { + import { NonSharedBuffer } from "node:buffer"; + import * as dns from "node:dns"; + import { Abortable, EventEmitter, InternalEventEmitter } from "node:events"; + import * as stream from "node:stream"; + type LookupFunction = ( + hostname: string, + options: dns.LookupOptions, + callback: (err: NodeJS.ErrnoException | null, address: string | dns.LookupAddress[], family?: number) => void, + ) => void; + interface AddressInfo { + address: string; + family: string; + port: number; + } + interface SocketConstructorOpts { + fd?: number | undefined; + allowHalfOpen?: boolean | undefined; + onread?: OnReadOpts | undefined; + readable?: boolean | undefined; + writable?: boolean | undefined; + signal?: AbortSignal | undefined; + noDelay?: boolean | undefined; + keepAlive?: boolean | undefined; + keepAliveInitialDelay?: number | undefined; + blockList?: BlockList | undefined; + typeOfService?: number | undefined; + handle?: BoundSocket | undefined; + } + interface OnReadOpts { + buffer: Uint8Array | (() => Uint8Array); + /** + * This function is called for every chunk of incoming data. + * Two arguments are passed to it: the number of bytes written to `buffer` and a reference to `buffer`. + * Return `false` from this function to implicitly `pause()` the socket. + */ + callback(bytesWritten: number, buffer: Uint8Array): boolean; + } + interface TcpSocketConnectOpts { + port: number; + host?: string | undefined; + localAddress?: string | undefined; + localPort?: number | undefined; + hints?: number | undefined; + family?: number | undefined; + lookup?: LookupFunction | undefined; + /** + * @since v18.13.0 + */ + autoSelectFamily?: boolean | undefined; + /** + * @since v18.13.0 + */ + autoSelectFamilyAttemptTimeout?: number | undefined; + } + interface IpcSocketConnectOpts { + path: string; + } + type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts; + type SocketReadyState = "opening" | "open" | "readOnly" | "writeOnly" | "closed"; + interface SetKeepAliveOptions { + enable?: boolean | undefined; + initialDelay?: number | undefined; + interval?: number | undefined; + count?: number | undefined; + } + interface SocketEventMap extends Omit { + "close": [hadError: boolean]; + "connect": []; + "connectionAttempt": [ip: string, port: number, family: number]; + "connectionAttemptFailed": [ip: string, port: number, family: number, error: Error]; + "connectionAttemptTimeout": [ip: string, port: number, family: number]; + "data": [data: string | NonSharedBuffer]; + "lookup": [err: Error | null, address: string, family: number | null, host: string]; + "ready": []; + "timeout": []; + } + /** + * This class is an abstraction of a TCP socket or a streaming `IPC` endpoint + * (uses named pipes on Windows, and Unix domain sockets otherwise). It is also + * an `EventEmitter`. + * + * A `net.Socket` can be created by the user and used directly to interact with + * a server. For example, it is returned by {@link createConnection}, + * so the user can use it to talk to the server. + * + * It can also be created by Node.js and passed to the user when a connection + * is received. For example, it is passed to the listeners of a `'connection'` event emitted on a {@link Server}, so the user can use + * it to interact with the client. + * @since v0.3.4 + */ + class Socket extends stream.Duplex { + constructor(options?: SocketConstructorOpts); + /** + * Destroys the socket after all data is written. If the `finish` event was already emitted the socket is destroyed immediately. + * If the socket is still writable it implicitly calls `socket.end()`. + * @since v0.3.4 + */ + destroySoon(): void; + /** + * Sends data on the socket. The second parameter specifies the encoding in the + * case of a string. It defaults to UTF8 encoding. + * + * Returns `true` if the entire data was flushed successfully to the kernel + * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is again free. + * + * The optional `callback` parameter will be executed when the data is finally + * written out, which may not be immediately. + * + * See `Writable` stream `write()` method for more + * information. + * @since v0.1.90 + */ + write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean; + /** + * Sends data on the socket, with an explicit encoding for string data. + * @see {@link Socket.write} for full details. + * @since v0.1.90 + * @param [encoding='utf8'] Only used when data is `string`. + */ + write(str: Uint8Array | string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean; + /** + * Initiate a connection on a given socket. + * + * Possible signatures: + * + * * `socket.connect(options[, connectListener])` + * * `socket.connect(path[, connectListener])` for `IPC` connections. + * * `socket.connect(port[, host][, connectListener])` for TCP connections. + * * Returns: `net.Socket` The socket itself. + * + * This function is asynchronous. When the connection is established, the `'connect'` event will be emitted. If there is a problem connecting, + * instead of a `'connect'` event, an `'error'` event will be emitted with + * the error passed to the `'error'` listener. + * The last parameter `connectListener`, if supplied, will be added as a listener + * for the `'connect'` event **once**. + * + * This function should only be used for reconnecting a socket after`'close'` has been emitted or otherwise it may lead to undefined + * behavior. + */ + connect(options: SocketConnectOpts, connectionListener?: () => void): this; + connect(port: number, host: string, connectionListener?: () => void): this; + connect(port: number, connectionListener?: () => void): this; + connect(path: string, connectionListener?: () => void): this; + /** + * Set the encoding for the socket as a `Readable Stream`. See `readable.setEncoding()` for more information. + * @since v0.1.90 + * @return The socket itself. + */ + setEncoding(encoding?: BufferEncoding): this; + /** + * Pauses the reading of data. That is, `'data'` events will not be emitted. + * Useful to throttle back an upload. + * @return The socket itself. + */ + pause(): this; + /** + * Close the TCP connection by sending an RST packet and destroy the stream. + * If this TCP socket is in connecting status, it will send an RST packet and destroy this TCP socket once it is connected. + * Otherwise, it will call `socket.destroy` with an `ERR_SOCKET_CLOSED` Error. + * If this is not a TCP socket (for example, a pipe), calling this method will immediately throw an `ERR_INVALID_HANDLE_TYPE` Error. + * @since v18.3.0, v16.17.0 + */ + resetAndDestroy(): this; + /** + * Resumes reading after a call to `socket.pause()`. + * @return The socket itself. + */ + resume(): this; + /** + * Sets the socket to timeout after `timeout` milliseconds of inactivity on + * the socket. By default `net.Socket` do not have a timeout. + * + * When an idle timeout is triggered the socket will receive a `'timeout'` event but the connection will not be severed. The user must manually call `socket.end()` or `socket.destroy()` to + * end the connection. + * + * ```js + * socket.setTimeout(3000); + * socket.on('timeout', () => { + * console.log('socket timeout'); + * socket.end(); + * }); + * ``` + * + * If `timeout` is 0, then the existing idle timeout is disabled. + * + * The optional `callback` parameter will be added as a one-time listener for the `'timeout'` event. + * @since v0.1.90 + * @return The socket itself. + */ + setTimeout(timeout: number, callback?: () => void): this; + /** + * Enable/disable the use of Nagle's algorithm. + * + * When a TCP connection is created, it will have Nagle's algorithm enabled. + * + * Nagle's algorithm delays data before it is sent via the network. It attempts + * to optimize throughput at the expense of latency. + * + * Passing `true` for `noDelay` or not passing an argument will disable Nagle's + * algorithm for the socket. Passing `false` for `noDelay` will enable Nagle's + * algorithm. + * @since v0.1.90 + * @param [noDelay=true] + * @return The socket itself. + */ + setNoDelay(noDelay?: boolean): this; + /** + * Configure keep-alive using an options object. See `socket.setKeepAlive()` + * for a description of each property. + * + * ```js + * socket.setKeepAlive({ enable: true, initialDelay: 1000, interval: 1000, count: 10 }); + * ``` + * @since v26.4.0 + * @returns The socket itself. + */ + setKeepAlive(options: SetKeepAliveOptions): this; + /** + * Configure keep-alive using positional arguments. See + * `socket.setKeepAlive()` for a description of each argument. + * @since v0.1.92 + * @param enable **Default:** `false` + * @param initialDelay **Default:** `0` + * @param interval **Default:** `1000` + * @param count **Default:** `10` + * @returns The socket itself. + */ + setKeepAlive(enable?: boolean, initialDelay?: number, interval?: number, count?: number): this; + /** + * Returns the current Type of Service (TOS) field for IPv4 packets or Traffic + * Class for IPv6 packets for this socket. + * + * `setTypeOfService()` may be called before the socket is connected; the value + * will be cached and applied when the socket establishes a connection. + * `getTypeOfService()` will return the currently set value even before connection. + * + * On some platforms (e.g., Linux), certain TOS/ECN bits may be masked or ignored, + * and behavior can differ between IPv4 and IPv6 or dual-stack sockets. Callers + * should verify platform-specific semantics. + * @since v25.6.0 + * @returns The current TOS value. + */ + getTypeOfService(): number; + /** + * Sets the Type of Service (TOS) field for IPv4 packets or Traffic Class for IPv6 + * Packets sent from this socket. This can be used to prioritize network traffic. + * + * `setTypeOfService()` may be called before the socket is connected; the value + * will be cached and applied when the socket establishes a connection. + * `getTypeOfService()` will return the currently set value even before connection. + * + * On some platforms (e.g., Linux), certain TOS/ECN bits may be masked or ignored, + * and behavior can differ between IPv4 and IPv6 or dual-stack sockets. Callers + * should verify platform-specific semantics. + * @since v25.6.0 + * @param tos The TOS value to set (0-255). + * @returns The socket itself. + */ + setTypeOfService(tos: number): this; + /** + * Returns the bound `address`, the address `family` name and `port` of the + * socket as reported by the operating system:`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }` + * @since v0.1.90 + */ + address(): AddressInfo | {}; + /** + * Calling `unref()` on a socket will allow the program to exit if this is the only + * active socket in the event system. If the socket is already `unref`ed calling`unref()` again will have no effect. + * @since v0.9.1 + * @return The socket itself. + */ + unref(): this; + /** + * Opposite of `unref()`, calling `ref()` on a previously `unref`ed socket will _not_ let the program exit if it's the only socket left (the default behavior). + * If the socket is `ref`ed calling `ref` again will have no effect. + * @since v0.9.1 + * @return The socket itself. + */ + ref(): this; + /** + * This property is only present if the family autoselection algorithm is enabled in `socket.connect(options)` + * and it is an array of the addresses that have been attempted. + * + * Each address is a string in the form of `$IP:$PORT`. + * If the connection was successful, then the last address is the one that the socket is currently connected to. + * @since v19.4.0 + */ + readonly autoSelectFamilyAttemptedAddresses: string[]; + /** + * This property shows the number of characters buffered for writing. The buffer + * may contain strings whose length after encoding is not yet known. So this number + * is only an approximation of the number of bytes in the buffer. + * + * `net.Socket` has the property that `socket.write()` always works. This is to + * help users get up and running quickly. The computer cannot always keep up + * with the amount of data that is written to a socket. The network connection + * simply might be too slow. Node.js will internally queue up the data written to a + * socket and send it out over the wire when it is possible. + * + * The consequence of this internal buffering is that memory may grow. + * Users who experience large or growing `bufferSize` should attempt to + * "throttle" the data flows in their program with `socket.pause()` and `socket.resume()`. + * @since v0.3.8 + * @deprecated Since v14.6.0 - Use `writableLength` instead. + */ + readonly bufferSize: number; + /** + * The amount of received bytes. + * @since v0.5.3 + */ + readonly bytesRead: number; + /** + * The amount of bytes sent. + * @since v0.5.3 + */ + readonly bytesWritten: number; + /** + * If `true`, `socket.connect(options[, connectListener])` was + * called and has not yet finished. It will stay `true` until the socket becomes + * connected, then it is set to `false` and the `'connect'` event is emitted. Note + * that the `socket.connect(options[, connectListener])` callback is a listener for the `'connect'` event. + * @since v6.1.0 + */ + readonly connecting: boolean; + /** + * This is `true` if the socket is not connected yet, either because `.connect()`has not yet been called or because it is still in the process of connecting + * (see `socket.connecting`). + * @since v11.2.0, v10.16.0 + */ + readonly pending: boolean; + /** + * See `writable.destroyed` for further details. + */ + readonly destroyed: boolean; + /** + * The string representation of the local IP address the remote client is + * connecting on. For example, in a server listening on `'0.0.0.0'`, if a client + * connects on `'192.168.1.1'`, the value of `socket.localAddress` would be`'192.168.1.1'`. + * @since v0.9.6 + */ + readonly localAddress?: string; + /** + * The numeric representation of the local port. For example, `80` or `21`. + * @since v0.9.6 + */ + readonly localPort?: number; + /** + * The string representation of the local IP family. `'IPv4'` or `'IPv6'`. + * @since v18.8.0, v16.18.0 + */ + readonly localFamily?: string; + /** + * This property represents the state of the connection as a string. + * + * * If the socket is connecting, `socket.readyState` is `opening`. + * * If the socket is readable and writable, it is `open`. + * * If the socket is readable and not writable, it is `readOnly`. + * * If the socket is not readable and writable, it is `writeOnly`. + * * Otherwise, it is `closed`. + * @since v0.5.0 + */ + readonly readyState: SocketReadyState; + /** + * The string representation of the remote IP address. For example,`'74.125.127.100'` or `'2001:4860:a005::68'`. Value may be `undefined` if + * the socket is destroyed (for example, if the client disconnected). + * @since v0.5.10 + */ + readonly remoteAddress: string | undefined; + /** + * The string representation of the remote IP family. `'IPv4'` or `'IPv6'`. Value may be `undefined` if + * the socket is destroyed (for example, if the client disconnected). + * @since v0.11.14 + */ + readonly remoteFamily: string | undefined; + /** + * The numeric representation of the remote port. For example, `80` or `21`. Value may be `undefined` if + * the socket is destroyed (for example, if the client disconnected). + * @since v0.5.10 + */ + readonly remotePort: number | undefined; + /** + * Reference to the server that accepted the socket. This is `null` for sockets + * that were not accepted by a server. + * @since v0.3.4 + */ + readonly server: Server | null; + /** + * The socket timeout in milliseconds as set by `socket.setTimeout()`. + * It is `undefined` if a timeout has not been set. + * @since v10.7.0 + */ + readonly timeout?: number; + /** + * Half-closes the socket. i.e., it sends a FIN packet. It is possible the + * server will still send some data. + * + * See `writable.end()` for further details. + * @since v0.1.90 + * @param callback Optional callback for when the socket is finished. + * @return The socket itself. + */ + end(callback?: () => void): this; + /** + * Half-closes the socket, with one final chunk of data. + * @see {@link Socket.end} for full details. + * @since v0.1.90 + * @param callback Optional callback for when the socket is finished. + * @return The socket itself. + */ + end(buffer: Uint8Array | string, callback?: () => void): this; + /** + * Half-closes the socket, with one final chunk of data. + * @see {@link Socket.end} for full details. + * @since v0.1.90 + * @param [encoding='utf8'] Only used when data is `string`. + * @param callback Optional callback for when the socket is finished. + * @return The socket itself. + */ + end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): this; + // #region InternalEventEmitter + addListener(eventName: E, listener: (...args: SocketEventMap[E]) => void): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: SocketEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: SocketEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: SocketEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off(eventName: E, listener: (...args: SocketEventMap[E]) => void): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on(eventName: E, listener: (...args: SocketEventMap[E]) => void): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once(eventName: E, listener: (...args: SocketEventMap[E]) => void): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: SocketEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: SocketEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: SocketEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: SocketEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface BoundSocketOptions { + /** + * Local address to bind. Must be a numeric IP literal; no DNS + * resolution is performed. **Default:** `'0.0.0.0'`, or `'::'` when + * `ipv6Only` is `true`. + */ + host?: string | undefined; + /** + * Local port. `0` requests an OS-assigned ephemeral port. + * **Default:** `0`. + */ + port?: number | undefined; + /** + * Sets `IPV6_V6ONLY`, disabling dual-stack support so the + * socket binds IPv6 only. Only meaningful for IPv6 binds. **Default:** + * `false`. + */ + ipv6Only?: boolean | undefined; + /** + * Sets `SO_REUSEPORT`, allowing multiple sockets to bind + * the same address and port for kernel-level load balancing. Support is + * platform-dependent. **Default:** `false`. + */ + reusePort?: boolean | undefined; + } + /** + * Allows for the synchronous creation of a pre-bound socket, that can be passed + * to `listen()` or `new net.Socket()` later on. For `listen()` this enables + * synchronous port reservation, while for `new net.Socket()`, it allows control + * over the local egress port/IP, via `bind(2)` semantics. + * + * Adoption transfers ownership of the socket; afterwards `address()` and `close()` + * throw `ERR_SOCKET_HANDLE_ADOPTED`. A handle that is never adopted must be + * closed to avoid leaking the socket. + * + * When an adopted `BoundSocket` connects to a numeric IP literal, `connect(2)` is + * issued synchronously, so `socket.localAddress` is resolved once + * `socket.connect()` returns. Connection failures are still reported via a + * deferred `'error'` event. + * + * ```js + * import net from 'node:net'; + * + * const bound = new net.BoundSocket(); + * const { port } = bound.address(); + * console.log(`Reserved port ${port} for server`); + * + * const server = net.createServer(); + * server.listen(bound); // Adopt as a server, or pass to new net.Socket() instead. + * ``` + * @since v26.4.0 + */ + class BoundSocket { + /** + * @since v26.4.0 + */ + constructor(options?: BoundSocketOptions); + /** + * Returns the bound local address. When bound with `port: 0`, `port` is the + * OS-assigned ephemeral port. + * @since v26.4.0 + * @returns An object with `address`, `family`, and `port` properties, + * as `server.address()` returns. + */ + address(): AddressInfo; + /** + * Returns the file descriptor of the bound socket. Ownership remains with the + * `BoundSocket`, so the descriptor must not be closed by the caller. The + * descriptor is only available before the handle is adopted; afterwards it belongs + * to the adopting `net.Server` or `net.Socket` and `fd()` throws + * `ERR_SOCKET_HANDLE_ADOPTED`. + * @since v26.4.0 + * @returns The underlying OS file descriptor, or `-1` on platforms + * that do not expose one for sockets (such as Windows). + */ + fd(): number; + /** + * Releases the bound socket. Only needed when the handle is never adopted. + * @since v26.4.0 + */ + close(): void; + /** + * Closes the handle if it has not been adopted or closed; otherwise a no-op. + * @since v26.4.0 + */ + [Symbol.dispose](): void; + } + interface ListenOptions extends Abortable { + backlog?: number | undefined; + exclusive?: boolean | undefined; + handle?: BoundSocket | undefined; + host?: string | undefined; + /** + * @default false + */ + ipv6Only?: boolean | undefined; + reusePort?: boolean | undefined; + path?: string | undefined; + port?: number | undefined; + readableAll?: boolean | undefined; + writableAll?: boolean | undefined; + } + interface ServerOpts { + /** + * Indicates whether half-opened TCP connections are allowed. + * @default false + */ + allowHalfOpen?: boolean | undefined; + /** + * Indicates whether the socket should be paused on incoming connections. + * @default false + */ + pauseOnConnect?: boolean | undefined; + /** + * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received. + * @default false + * @since v16.5.0 + */ + noDelay?: boolean | undefined; + /** + * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received, + * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`. + * @default false + * @since v16.5.0 + */ + keepAlive?: boolean | undefined; + /** + * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket. + * @default 0 + * @since v16.5.0 + */ + keepAliveInitialDelay?: number | undefined; + /** + * Optionally overrides all `net.Socket`s' `readableHighWaterMark` and `writableHighWaterMark`. + * @default See [stream.getDefaultHighWaterMark()](https://nodejs.org/docs/latest-v26.x/api/stream.html#streamgetdefaulthighwatermarkobjectmode). + * @since v18.17.0, v20.1.0 + */ + highWaterMark?: number | undefined; + /** + * `blockList` can be used for disabling inbound + * access to specific IP addresses, IP ranges, or IP subnets. This does not + * work if the server is behind a reverse proxy, NAT, etc. because the address + * checked against the block list is the address of the proxy, or the one + * specified by the NAT. + * @since v22.13.0 + */ + blockList?: BlockList | undefined; + } + interface DropArgument { + localAddress?: string; + localPort?: number; + localFamily?: string; + remoteAddress?: string; + remotePort?: number; + remoteFamily?: string; + } + interface ServerEventMap { + "close": []; + "connection": [socket: Socket]; + "error": [err: Error]; + "listening": []; + "drop": [data?: DropArgument]; + } + /** + * This class is used to create a TCP or `IPC` server. + * @since v0.1.90 + */ + class Server implements EventEmitter { + constructor(connectionListener?: (socket: Socket) => void); + constructor(options?: ServerOpts, connectionListener?: (socket: Socket) => void); + /** + * Start a server listening for connections. A `net.Server` can be a TCP or + * an `IPC` server depending on what it listens to. + * + * Possible signatures: + * + * * `server.listen(handle[, backlog][, callback])` + * * `server.listen(options[, callback])` + * * `server.listen(path[, backlog][, callback])` for `IPC` servers + * * `server.listen([port[, host[, backlog]]][, callback])` for TCP servers + * + * This function is asynchronous. When the server starts listening, the `'listening'` event will be emitted. The last parameter `callback`will be added as a listener for the `'listening'` + * event. + * + * All `listen()` methods can take a `backlog` parameter to specify the maximum + * length of the queue of pending connections. The actual length will be determined + * by the OS through sysctl settings such as `tcp_max_syn_backlog` and `somaxconn` on Linux. The default value of this parameter is 511 (not 512). + * + * All {@link Socket} are set to `SO_REUSEADDR` (see [`socket(7)`](https://man7.org/linux/man-pages/man7/socket.7.html) for + * details). + * + * The `server.listen()` method can be called again if and only if there was an + * error during the first `server.listen()` call or `server.close()` has been + * called. Otherwise, an `ERR_SERVER_ALREADY_LISTEN` error will be thrown. + * + * One of the most common errors raised when listening is `EADDRINUSE`. + * This happens when another server is already listening on the requested`port`/`path`/`handle`. One way to handle this would be to retry + * after a certain amount of time: + * + * ```js + * server.on('error', (e) => { + * if (e.code === 'EADDRINUSE') { + * console.error('Address in use, retrying...'); + * setTimeout(() => { + * server.close(); + * server.listen(PORT, HOST); + * }, 1000); + * } + * }); + * ``` + */ + listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): this; + listen(port?: number, hostname?: string, listeningListener?: () => void): this; + listen(port?: number, backlog?: number, listeningListener?: () => void): this; + listen(port?: number, listeningListener?: () => void): this; + listen(path: string, backlog?: number, listeningListener?: () => void): this; + listen(path: string, listeningListener?: () => void): this; + listen(options: ListenOptions, listeningListener?: () => void): this; + listen(handle: any, backlog?: number, listeningListener?: () => void): this; + listen(handle: any, listeningListener?: () => void): this; + /** + * Stops the server from accepting new connections and keeps existing + * connections. This function is asynchronous, the server is finally closed + * when all connections are ended and the server emits a `'close'` event. + * The optional `callback` will be called once the `'close'` event occurs. Unlike + * that event, it will be called with an `Error` as its only argument if the server + * was not open when it was closed. + * @since v0.1.90 + * @param callback Called when the server is closed. + */ + close(callback?: (err?: Error) => void): this; + /** + * Returns the bound `address`, the address `family` name, and `port` of the server + * as reported by the operating system if listening on an IP socket + * (useful to find which port was assigned when getting an OS-assigned address):`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`. + * + * For a server listening on a pipe or Unix domain socket, the name is returned + * as a string. + * + * ```js + * const server = net.createServer((socket) => { + * socket.end('goodbye\n'); + * }).on('error', (err) => { + * // Handle errors here. + * throw err; + * }); + * + * // Grab an arbitrary unused port. + * server.listen(() => { + * console.log('opened server on', server.address()); + * }); + * ``` + * + * `server.address()` returns `null` before the `'listening'` event has been + * emitted or after calling `server.close()`. + * @since v0.1.90 + */ + address(): AddressInfo | string | null; + /** + * Asynchronously get the number of concurrent connections on the server. Works + * when sockets were sent to forks. + * + * Callback should take two arguments `err` and `count`. + * @since v0.9.7 + */ + getConnections(cb: (error: Error | null, count: number) => void): this; + /** + * Opposite of `unref()`, calling `ref()` on a previously `unref`ed server will _not_ let the program exit if it's the only server left (the default behavior). + * If the server is `ref`ed calling `ref()` again will have no effect. + * @since v0.9.1 + */ + ref(): this; + /** + * Calling `unref()` on a server will allow the program to exit if this is the only + * active server in the event system. If the server is already `unref`ed calling`unref()` again will have no effect. + * @since v0.9.1 + */ + unref(): this; + /** + * Set this property to reject connections when the server's connection count gets + * high. + * + * It is not recommended to use this option once a socket has been sent to a child + * with `child_process.fork()`. + * @since v0.2.0 + */ + maxConnections: number; + connections: number; + /** + * Indicates whether or not the server is listening for connections. + * @since v5.7.0 + */ + readonly listening: boolean; + /** + * Calls {@link Server.close()} and returns a promise that fulfills when the server has closed. + * @since v20.5.0 + */ + [Symbol.asyncDispose](): Promise; + } + interface Server extends InternalEventEmitter {} + type IPVersion = "ipv4" | "ipv6"; + /** + * The `BlockList` object can be used with some network APIs to specify rules for + * disabling inbound or outbound access to specific IP addresses, IP ranges, or + * IP subnets. + * @since v15.0.0, v14.18.0 + */ + class BlockList { + /** + * Adds a rule to block the given IP address. + * @since v15.0.0, v14.18.0 + * @param address An IPv4 or IPv6 address. + * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. + */ + addAddress(address: string, type?: IPVersion): void; + addAddress(address: SocketAddress): void; + /** + * Adds a rule to block a range of IP addresses from `start` (inclusive) to`end` (inclusive). + * @since v15.0.0, v14.18.0 + * @param start The starting IPv4 or IPv6 address in the range. + * @param end The ending IPv4 or IPv6 address in the range. + * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. + */ + addRange(start: string, end: string, type?: IPVersion): void; + addRange(start: SocketAddress, end: SocketAddress): void; + /** + * Adds a rule to block a range of IP addresses specified as a subnet mask. + * @since v15.0.0, v14.18.0 + * @param net The network IPv4 or IPv6 address. + * @param prefix The number of CIDR prefix bits. For IPv4, this must be a value between `0` and `32`. For IPv6, this must be between `0` and `128`. + * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. + */ + addSubnet(net: SocketAddress, prefix: number): void; + addSubnet(net: string, prefix: number, type?: IPVersion): void; + /** + * Returns `true` if the given IP address matches any of the rules added to the`BlockList`. + * + * ```js + * const blockList = new net.BlockList(); + * blockList.addAddress('123.123.123.123'); + * blockList.addRange('10.0.0.1', '10.0.0.10'); + * blockList.addSubnet('8592:757c:efae:4e45::', 64, 'ipv6'); + * + * console.log(blockList.check('123.123.123.123')); // Prints: true + * console.log(blockList.check('10.0.0.3')); // Prints: true + * console.log(blockList.check('222.111.111.222')); // Prints: false + * + * // IPv6 notation for IPv4 addresses works: + * console.log(blockList.check('::ffff:7b7b:7b7b', 'ipv6')); // Prints: true + * console.log(blockList.check('::ffff:123.123.123.123', 'ipv6')); // Prints: true + * ``` + * @since v15.0.0, v14.18.0 + * @param address The IP address to check + * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. + */ + check(address: SocketAddress): boolean; + check(address: string, type?: IPVersion): boolean; + /** + * The list of rules added to the blocklist. + * @since v15.0.0, v14.18.0 + */ + rules: readonly string[]; + /** + * Returns `true` if the `value` is a `net.BlockList`. + * @since v22.13.0 + * @param value Any JS value + */ + static isBlockList(value: unknown): value is BlockList; + /** + * ```js + * const blockList = new net.BlockList(); + * const data = [ + * 'Subnet: IPv4 192.168.1.0/24', + * 'Address: IPv4 10.0.0.5', + * 'Range: IPv4 192.168.2.1-192.168.2.10', + * 'Range: IPv4 10.0.0.1-10.0.0.10', + * ]; + * blockList.fromJSON(data); + * blockList.fromJSON(JSON.stringify(data)); + * ``` + * @since v24.5.0 + * @experimental + */ + fromJSON(data: string | readonly string[]): void; + /** + * @since v24.5.0 + * @experimental + */ + toJSON(): readonly string[]; + } + interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts { + timeout?: number | undefined; + } + interface IpcNetConnectOpts extends IpcSocketConnectOpts, SocketConstructorOpts { + timeout?: number | undefined; + } + type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts; + /** + * Creates a new TCP or `IPC` server. + * + * If `allowHalfOpen` is set to `true`, when the other end of the socket + * signals the end of transmission, the server will only send back the end of + * transmission when `socket.end()` is explicitly called. For example, in the + * context of TCP, when a FIN packed is received, a FIN packed is sent + * back only when `socket.end()` is explicitly called. Until then the + * connection is half-closed (non-readable but still writable). See `'end'` event and [RFC 1122](https://tools.ietf.org/html/rfc1122) (section 4.2.2.13) for more information. + * + * If `pauseOnConnect` is set to `true`, then the socket associated with each + * incoming connection will be paused, and no data will be read from its handle. + * This allows connections to be passed between processes without any data being + * read by the original process. To begin reading data from a paused socket, call `socket.resume()`. + * + * The server can be a TCP server or an `IPC` server, depending on what it `listen()` to. + * + * Here is an example of a TCP echo server which listens for connections + * on port 8124: + * + * ```js + * import net from 'node:net'; + * const server = net.createServer((c) => { + * // 'connection' listener. + * console.log('client connected'); + * c.on('end', () => { + * console.log('client disconnected'); + * }); + * c.write('hello\r\n'); + * c.pipe(c); + * }); + * server.on('error', (err) => { + * throw err; + * }); + * server.listen(8124, () => { + * console.log('server bound'); + * }); + * ``` + * + * Test this by using `telnet`: + * + * ```bash + * telnet localhost 8124 + * ``` + * + * To listen on the socket `/tmp/echo.sock`: + * + * ```js + * server.listen('/tmp/echo.sock', () => { + * console.log('server bound'); + * }); + * ``` + * + * Use `nc` to connect to a Unix domain socket server: + * + * ```bash + * nc -U /tmp/echo.sock + * ``` + * @since v0.5.0 + * @param connectionListener Automatically set as a listener for the {@link 'connection'} event. + */ + function createServer(connectionListener?: (socket: Socket) => void): Server; + function createServer(options?: ServerOpts, connectionListener?: (socket: Socket) => void): Server; + /** + * Aliases to {@link createConnection}. + * + * Possible signatures: + * + * * {@link connect} + * * {@link connect} for `IPC` connections. + * * {@link connect} for TCP connections. + */ + function connect(options: NetConnectOpts, connectionListener?: () => void): Socket; + function connect(port: number, host?: string, connectionListener?: () => void): Socket; + function connect(path: string, connectionListener?: () => void): Socket; + /** + * A factory function, which creates a new {@link Socket}, + * immediately initiates connection with `socket.connect()`, + * then returns the `net.Socket` that starts the connection. + * + * When the connection is established, a `'connect'` event will be emitted + * on the returned socket. The last parameter `connectListener`, if supplied, + * will be added as a listener for the `'connect'` event **once**. + * + * Possible signatures: + * + * * {@link createConnection} + * * {@link createConnection} for `IPC` connections. + * * {@link createConnection} for TCP connections. + * + * The {@link connect} function is an alias to this function. + */ + function createConnection(options: NetConnectOpts, connectionListener?: () => void): Socket; + function createConnection(port: number, host?: string, connectionListener?: () => void): Socket; + function createConnection(path: string, connectionListener?: () => void): Socket; + /** + * Gets the current default value of the `autoSelectFamily` option of `socket.connect(options)`. + * The initial default value is `true`, unless the command line option`--no-network-family-autoselection` is provided. + * @since v19.4.0 + */ + function getDefaultAutoSelectFamily(): boolean; + /** + * Sets the default value of the `autoSelectFamily` option of `socket.connect(options)`. + * @param value The new default value. + * The initial default value is `true`, unless the command line option + * `--no-network-family-autoselection` is provided. + * @since v19.4.0 + */ + function setDefaultAutoSelectFamily(value: boolean): void; + /** + * Gets the current default value of the `autoSelectFamilyAttemptTimeout` option of `socket.connect(options)`. + * The initial default value is `500` or the value specified via the command line option `--network-family-autoselection-attempt-timeout`. + * @returns The current default value of the `autoSelectFamilyAttemptTimeout` option. + * @since v19.8.0, v18.8.0 + */ + function getDefaultAutoSelectFamilyAttemptTimeout(): number; + /** + * Sets the default value of the `autoSelectFamilyAttemptTimeout` option of `socket.connect(options)`. + * @param value The new default value, which must be a positive number. If the number is less than `10`, the value `10` is used instead. The initial default value is `250` or the value specified via the command line + * option `--network-family-autoselection-attempt-timeout`. + * @since v19.8.0, v18.8.0 + */ + function setDefaultAutoSelectFamilyAttemptTimeout(value: number): void; + /** + * Returns `6` if `input` is an IPv6 address. Returns `4` if `input` is an IPv4 + * address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no leading zeroes. Otherwise, returns`0`. + * + * ```js + * net.isIP('::1'); // returns 6 + * net.isIP('127.0.0.1'); // returns 4 + * net.isIP('127.000.000.001'); // returns 0 + * net.isIP('127.0.0.1/24'); // returns 0 + * net.isIP('fhqwhgads'); // returns 0 + * ``` + * @since v0.3.0 + */ + function isIP(input: string): number; + /** + * Returns `true` if `input` is an IPv4 address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no + * leading zeroes. Otherwise, returns `false`. + * + * ```js + * net.isIPv4('127.0.0.1'); // returns true + * net.isIPv4('127.000.000.001'); // returns false + * net.isIPv4('127.0.0.1/24'); // returns false + * net.isIPv4('fhqwhgads'); // returns false + * ``` + * @since v0.3.0 + */ + function isIPv4(input: string): boolean; + /** + * Returns `true` if `input` is an IPv6 address. Otherwise, returns `false`. + * + * ```js + * net.isIPv6('::1'); // returns true + * net.isIPv6('fhqwhgads'); // returns false + * ``` + * @since v0.3.0 + */ + function isIPv6(input: string): boolean; + interface SocketAddressInitOptions { + /** + * The network address as either an IPv4 or IPv6 string. + * @default 127.0.0.1 + */ + address?: string | undefined; + /** + * @default `'ipv4'` + */ + family?: IPVersion | undefined; + /** + * An IPv6 flow-label used only if `family` is `'ipv6'`. + * @default 0 + */ + flowlabel?: number | undefined; + /** + * An IP port. + * @default 0 + */ + port?: number | undefined; + } + /** + * @since v15.14.0, v14.18.0 + */ + class SocketAddress { + constructor(options: SocketAddressInitOptions); + /** + * Either \`'ipv4'\` or \`'ipv6'\`. + * @since v15.14.0, v14.18.0 + */ + readonly address: string; + /** + * Either \`'ipv4'\` or \`'ipv6'\`. + * @since v15.14.0, v14.18.0 + */ + readonly family: IPVersion; + /** + * @since v15.14.0, v14.18.0 + */ + readonly port: number; + /** + * @since v15.14.0, v14.18.0 + */ + readonly flowlabel: number; + /** + * @since v22.13.0 + * @param input An input string containing an IP address and optional port, + * e.g. `123.1.2.3:1234` or `[1::1]:1234`. + * @returns Returns a `SocketAddress` if parsing was successful. + * Otherwise returns `undefined`. + */ + static parse(input: string): SocketAddress | undefined; + } +} +declare module "net" { + export * from "node:net"; +} diff --git a/node_modules/@types/node/os.d.ts b/node_modules/@types/node/os.d.ts new file mode 100644 index 0000000..751d4b4 --- /dev/null +++ b/node_modules/@types/node/os.d.ts @@ -0,0 +1,498 @@ +declare module "node:os" { + import { NonSharedBuffer } from "buffer"; + interface CpuInfo { + model: string; + speed: number; + times: { + /** The number of milliseconds the CPU has spent in user mode. */ + user: number; + /** The number of milliseconds the CPU has spent in nice mode. */ + nice: number; + /** The number of milliseconds the CPU has spent in sys mode. */ + sys: number; + /** The number of milliseconds the CPU has spent in idle mode. */ + idle: number; + /** The number of milliseconds the CPU has spent in irq mode. */ + irq: number; + }; + } + interface NetworkInterfaceBase { + address: string; + netmask: string; + mac: string; + internal: boolean; + cidr: string | null; + scopeid?: number; + } + interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase { + family: "IPv4"; + } + interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase { + family: "IPv6"; + scopeid: number; + } + interface UserInfo { + username: T; + uid: number; + gid: number; + shell: T | null; + homedir: T; + } + type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6; + /** + * Returns the host name of the operating system as a string. + * @since v0.3.3 + */ + function hostname(): string; + /** + * Returns an array containing the 1, 5, and 15 minute load averages. + * + * The load average is a measure of system activity calculated by the operating + * system and expressed as a fractional number. + * + * The load average is a Unix-specific concept. On Windows, the return value is + * always `[0, 0, 0]`. + * @since v0.3.3 + */ + function loadavg(): number[]; + /** + * Returns the system uptime in number of seconds. + * @since v0.3.3 + */ + function uptime(): number; + /** + * Returns the amount of free system memory in bytes as an integer. + * @since v0.3.3 + */ + function freemem(): number; + /** + * Returns the total amount of system memory in bytes as an integer. + * @since v0.3.3 + */ + function totalmem(): number; + /** + * Returns an array of objects containing information about each logical CPU core. + * The array will be empty if no CPU information is available, such as if the `/proc` file system is unavailable. + * + * The properties included on each object include: + * + * ```js + * [ + * { + * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', + * speed: 2926, + * times: { + * user: 252020, + * nice: 0, + * sys: 30340, + * idle: 1070356870, + * irq: 0, + * }, + * }, + * { + * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', + * speed: 2926, + * times: { + * user: 306960, + * nice: 0, + * sys: 26980, + * idle: 1071569080, + * irq: 0, + * }, + * }, + * { + * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', + * speed: 2926, + * times: { + * user: 248450, + * nice: 0, + * sys: 21750, + * idle: 1070919370, + * irq: 0, + * }, + * }, + * { + * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', + * speed: 2926, + * times: { + * user: 256880, + * nice: 0, + * sys: 19430, + * idle: 1070905480, + * irq: 20, + * }, + * }, + * ]; + * ``` + * + * `nice` values are POSIX-only. On Windows, the `nice` values of all processors + * are always 0. + * + * `os.cpus().length` should not be used to calculate the amount of parallelism + * available to an application. Use {@link availableParallelism} for this purpose. + * @since v0.3.3 + */ + function cpus(): CpuInfo[]; + /** + * Returns an estimate of the default amount of parallelism a program should use. + * Always returns a value greater than zero. + * + * This function is a small wrapper about libuv's [`uv_available_parallelism()`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_available_parallelism). + * @since v19.4.0, v18.14.0 + */ + function availableParallelism(): number; + /** + * Returns the operating system name as returned by [`uname(3)`](https://linux.die.net/man/3/uname). For example, it + * returns `'Linux'` on Linux, `'Darwin'` on macOS, and `'Windows_NT'` on Windows. + * + * See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for additional information + * about the output of running [`uname(3)`](https://linux.die.net/man/3/uname) on various operating systems. + * @since v0.3.3 + */ + function type(): string; + /** + * Returns the operating system as a string. + * + * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `GetVersionExW()` is used. See + * [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. + * @since v0.3.3 + */ + function release(): string; + /** + * Returns an object containing network interfaces that have been assigned a + * network address. + * + * Each key on the returned object identifies a network interface. The associated + * value is an array of objects that each describe an assigned network address. + * + * The properties available on the assigned network address object include: + * + * ```json + * { + * "lo": [ + * { + * "address:": "127.0.0.1", + * "netmask:": "255.0.0.0", + * "family:": "IPv4", + * "mac:": "00:00:00:00:00:00", + * "internal:": true, + * "cidr:": "127.0.0.1/8" + * }, + * { + * "address:": "::1", + * "netmask:": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", + * "family:": "IPv6", + * "mac:": "00:00:00:00:00:00", + * "scopeid:": 0, + * "internal:": true, + * "cidr:": "::1/128" + * } + * ], + * "eth0": [ + * { + * "address:": "192.168.1.108", + * "netmask:": "255.255.255.0", + * "family:": "IPv4", + * "mac:": "01:02:03:0a:0b:0c", + * "internal:": false, + * "cidr:": "192.168.1.108/24" + * }, + * { + * "address:": "fe80::a00:27ff:fe4e:66a1", + * "netmask:": "ffff:ffff:ffff:ffff::", + * "family:": "IPv6", + * "mac:": "01:02:03:0a:0b:0c", + * "scopeid:": 1, + * "internal:": false, + * "cidr:": "fe80::a00:27ff:fe4e:66a1/64" + * } + * ] + * } + * ``` + * @since v0.6.0 + */ + function networkInterfaces(): NodeJS.Dict; + /** + * Returns the string path of the current user's home directory. + * + * On POSIX, it uses the `$HOME` environment variable if defined. Otherwise it + * uses the [effective UID](https://en.wikipedia.org/wiki/User_identifier#Effective_user_ID) to look up the user's home directory. + * + * On Windows, it uses the `USERPROFILE` environment variable if defined. + * Otherwise it uses the path to the profile directory of the current user. + * @since v2.3.0 + */ + function homedir(): string; + interface UserInfoOptions { + encoding?: BufferEncoding | "buffer" | undefined; + } + interface UserInfoOptionsWithBufferEncoding extends UserInfoOptions { + encoding: "buffer"; + } + interface UserInfoOptionsWithStringEncoding extends UserInfoOptions { + encoding?: BufferEncoding | undefined; + } + /** + * Returns information about the currently effective user. On POSIX platforms, + * this is typically a subset of the password file. The returned object includes + * the `username`, `uid`, `gid`, `shell`, and `homedir`. On Windows, the `uid` and `gid` fields are `-1`, and `shell` is `null`. + * + * The value of `homedir` returned by `os.userInfo()` is provided by the operating + * system. This differs from the result of `os.homedir()`, which queries + * environment variables for the home directory before falling back to the + * operating system response. + * + * Throws a [`SystemError`](https://nodejs.org/docs/latest-v26.x/api/errors.html#class-systemerror) if a user has no `username` or `homedir`. + * @since v6.0.0 + */ + function userInfo(options?: UserInfoOptionsWithStringEncoding): UserInfo; + function userInfo(options: UserInfoOptionsWithBufferEncoding): UserInfo; + function userInfo(options: UserInfoOptions): UserInfo; + type SignalConstants = { + [key in NodeJS.Signals]: number; + }; + namespace constants { + const UV_UDP_REUSEADDR: number; + namespace signals {} + const signals: SignalConstants; + namespace errno { + const E2BIG: number; + const EACCES: number; + const EADDRINUSE: number; + const EADDRNOTAVAIL: number; + const EAFNOSUPPORT: number; + const EAGAIN: number; + const EALREADY: number; + const EBADF: number; + const EBADMSG: number; + const EBUSY: number; + const ECANCELED: number; + const ECHILD: number; + const ECONNABORTED: number; + const ECONNREFUSED: number; + const ECONNRESET: number; + const EDEADLK: number; + const EDESTADDRREQ: number; + const EDOM: number; + const EDQUOT: number; + const EEXIST: number; + const EFAULT: number; + const EFBIG: number; + const EHOSTUNREACH: number; + const EIDRM: number; + const EILSEQ: number; + const EINPROGRESS: number; + const EINTR: number; + const EINVAL: number; + const EIO: number; + const EISCONN: number; + const EISDIR: number; + const ELOOP: number; + const EMFILE: number; + const EMLINK: number; + const EMSGSIZE: number; + const EMULTIHOP: number; + const ENAMETOOLONG: number; + const ENETDOWN: number; + const ENETRESET: number; + const ENETUNREACH: number; + const ENFILE: number; + const ENOBUFS: number; + const ENODATA: number; + const ENODEV: number; + const ENOENT: number; + const ENOEXEC: number; + const ENOLCK: number; + const ENOLINK: number; + const ENOMEM: number; + const ENOMSG: number; + const ENOPROTOOPT: number; + const ENOSPC: number; + const ENOSR: number; + const ENOSTR: number; + const ENOSYS: number; + const ENOTCONN: number; + const ENOTDIR: number; + const ENOTEMPTY: number; + const ENOTSOCK: number; + const ENOTSUP: number; + const ENOTTY: number; + const ENXIO: number; + const EOPNOTSUPP: number; + const EOVERFLOW: number; + const EPERM: number; + const EPIPE: number; + const EPROTO: number; + const EPROTONOSUPPORT: number; + const EPROTOTYPE: number; + const ERANGE: number; + const EROFS: number; + const ESPIPE: number; + const ESRCH: number; + const ESTALE: number; + const ETIME: number; + const ETIMEDOUT: number; + const ETXTBSY: number; + const EWOULDBLOCK: number; + const EXDEV: number; + const WSAEINTR: number; + const WSAEBADF: number; + const WSAEACCES: number; + const WSAEFAULT: number; + const WSAEINVAL: number; + const WSAEMFILE: number; + const WSAEWOULDBLOCK: number; + const WSAEINPROGRESS: number; + const WSAEALREADY: number; + const WSAENOTSOCK: number; + const WSAEDESTADDRREQ: number; + const WSAEMSGSIZE: number; + const WSAEPROTOTYPE: number; + const WSAENOPROTOOPT: number; + const WSAEPROTONOSUPPORT: number; + const WSAESOCKTNOSUPPORT: number; + const WSAEOPNOTSUPP: number; + const WSAEPFNOSUPPORT: number; + const WSAEAFNOSUPPORT: number; + const WSAEADDRINUSE: number; + const WSAEADDRNOTAVAIL: number; + const WSAENETDOWN: number; + const WSAENETUNREACH: number; + const WSAENETRESET: number; + const WSAECONNABORTED: number; + const WSAECONNRESET: number; + const WSAENOBUFS: number; + const WSAEISCONN: number; + const WSAENOTCONN: number; + const WSAESHUTDOWN: number; + const WSAETOOMANYREFS: number; + const WSAETIMEDOUT: number; + const WSAECONNREFUSED: number; + const WSAELOOP: number; + const WSAENAMETOOLONG: number; + const WSAEHOSTDOWN: number; + const WSAEHOSTUNREACH: number; + const WSAENOTEMPTY: number; + const WSAEPROCLIM: number; + const WSAEUSERS: number; + const WSAEDQUOT: number; + const WSAESTALE: number; + const WSAEREMOTE: number; + const WSASYSNOTREADY: number; + const WSAVERNOTSUPPORTED: number; + const WSANOTINITIALISED: number; + const WSAEDISCON: number; + const WSAENOMORE: number; + const WSAECANCELLED: number; + const WSAEINVALIDPROCTABLE: number; + const WSAEINVALIDPROVIDER: number; + const WSAEPROVIDERFAILEDINIT: number; + const WSASYSCALLFAILURE: number; + const WSASERVICE_NOT_FOUND: number; + const WSATYPE_NOT_FOUND: number; + const WSA_E_NO_MORE: number; + const WSA_E_CANCELLED: number; + const WSAEREFUSED: number; + } + namespace dlopen { + const RTLD_LAZY: number; + const RTLD_NOW: number; + const RTLD_GLOBAL: number; + const RTLD_LOCAL: number; + const RTLD_DEEPBIND: number; + } + namespace priority { + const PRIORITY_LOW: number; + const PRIORITY_BELOW_NORMAL: number; + const PRIORITY_NORMAL: number; + const PRIORITY_ABOVE_NORMAL: number; + const PRIORITY_HIGH: number; + const PRIORITY_HIGHEST: number; + } + } + const devNull: string; + /** + * The operating system-specific end-of-line marker. + * * `\n` on POSIX + * * `\r\n` on Windows + */ + const EOL: string; + /** + * Returns the operating system CPU architecture for which the Node.js binary was + * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, + * `'mips'`, `'mipsel'`, `'ppc64'`, `'riscv64'`, `'s390x'`, and `'x64'`. + * + * The return value is equivalent to [process.arch](https://nodejs.org/docs/latest-v26.x/api/process.html#processarch). + * @since v0.5.0 + */ + function arch(): NodeJS.Architecture; + /** + * Returns a string identifying the kernel version. + * + * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not + * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. + * @since v13.11.0, v12.17.0 + */ + function version(): string; + /** + * Returns a string identifying the operating system platform for which + * the Node.js binary was compiled. The value is set at compile time. + * Possible values are `'aix'`, `'darwin'`, `'freebsd'`, `'linux'`, `'openbsd'`, `'sunos'`, and `'win32'`. + * + * The return value is equivalent to `process.platform`. + * + * The value `'android'` may also be returned if Node.js is built on the Android + * operating system. [Android support is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os). + * @since v0.5.0 + */ + function platform(): NodeJS.Platform; + /** + * Returns the machine type as a string, such as `arm`, `arm64`, `aarch64`, + * `mips`, `mips64`, `ppc64`, `ppc64le`, `s390x`, `i386`, `i686`, `x86_64`. + * + * On POSIX systems, the machine type is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not + * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. + * @since v18.9.0, v16.18.0 + */ + function machine(): string; + /** + * Returns the operating system's default directory for temporary files as a + * string. + * @since v0.9.9 + */ + function tmpdir(): string; + /** + * Returns a string identifying the endianness of the CPU for which the Node.js + * binary was compiled. + * + * Possible values are `'BE'` for big endian and `'LE'` for little endian. + * @since v0.9.4 + */ + function endianness(): "BE" | "LE"; + /** + * Returns the scheduling priority for the process specified by `pid`. If `pid` is + * not provided or is `0`, the priority of the current process is returned. + * @since v10.10.0 + * @param [pid=0] The process ID to retrieve scheduling priority for. + */ + function getPriority(pid?: number): number; + /** + * Attempts to set the scheduling priority for the process specified by `pid`. If `pid` is not provided or is `0`, the process ID of the current process is used. + * + * The `priority` input must be an integer between `-20` (high priority) and `19` (low priority). Due to differences between Unix priority levels and Windows + * priority classes, `priority` is mapped to one of six priority constants in `os.constants.priority`. When retrieving a process priority level, this range + * mapping may cause the return value to be slightly different on Windows. To avoid + * confusion, set `priority` to one of the priority constants. + * + * On Windows, setting priority to `PRIORITY_HIGHEST` requires elevated user + * privileges. Otherwise the set priority will be silently reduced to `PRIORITY_HIGH`. + * @since v10.10.0 + * @param [pid=0] The process ID to set scheduling priority for. + * @param priority The scheduling priority to assign to the process. + */ + function setPriority(priority: number): void; + function setPriority(pid: number, priority: number): void; +} +declare module "os" { + export * from "node:os"; +} diff --git a/node_modules/@types/node/package.json b/node_modules/@types/node/package.json new file mode 100644 index 0000000..bed9e75 --- /dev/null +++ b/node_modules/@types/node/package.json @@ -0,0 +1,140 @@ +{ + "name": "@types/node", + "version": "26.6.2", + "description": "TypeScript definitions for node", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node", + "license": "MIT", + "contributors": [ + { + "name": "Microsoft TypeScript", + "githubUsername": "Microsoft", + "url": "https://github.com/Microsoft" + }, + { + "name": "Alberto Schiabel", + "githubUsername": "jkomyno", + "url": "https://github.com/jkomyno" + }, + { + "name": "Andrew Makarov", + "githubUsername": "r3nya", + "url": "https://github.com/r3nya" + }, + { + "name": "Benjamin Toueg", + "githubUsername": "btoueg", + "url": "https://github.com/btoueg" + }, + { + "name": "David Junger", + "githubUsername": "touffy", + "url": "https://github.com/touffy" + }, + { + "name": "Mohsen Azimi", + "githubUsername": "mohsen1", + "url": "https://github.com/mohsen1" + }, + { + "name": "Nikita Galkin", + "githubUsername": "galkin", + "url": "https://github.com/galkin" + }, + { + "name": "Sebastian Silbermann", + "githubUsername": "eps1lon", + "url": "https://github.com/eps1lon" + }, + { + "name": "Wilco Bakker", + "githubUsername": "WilcoBakker", + "url": "https://github.com/WilcoBakker" + }, + { + "name": "Trivikram Kamat", + "githubUsername": "trivikr", + "url": "https://github.com/trivikr" + }, + { + "name": "Junxiao Shi", + "githubUsername": "yoursunny", + "url": "https://github.com/yoursunny" + }, + { + "name": "ExE Boss", + "githubUsername": "ExE-Boss", + "url": "https://github.com/ExE-Boss" + }, + { + "name": "Piotr Błażejewicz", + "githubUsername": "peterblazejewicz", + "url": "https://github.com/peterblazejewicz" + }, + { + "name": "Anna Henningsen", + "githubUsername": "addaleax", + "url": "https://github.com/addaleax" + }, + { + "name": "NodeJS Contributors", + "githubUsername": "NodeJS", + "url": "https://github.com/NodeJS" + }, + { + "name": "Linus Unnebäck", + "githubUsername": "LinusU", + "url": "https://github.com/LinusU" + }, + { + "name": "wafuwafu13", + "githubUsername": "wafuwafu13", + "url": "https://github.com/wafuwafu13" + }, + { + "name": "Matteo Collina", + "githubUsername": "mcollina", + "url": "https://github.com/mcollina" + }, + { + "name": "Dmitry Semigradsky", + "githubUsername": "Semigradsky", + "url": "https://github.com/Semigradsky" + }, + { + "name": "René", + "githubUsername": "Renegade334", + "url": "https://github.com/Renegade334" + }, + { + "name": "Yagiz Nizipli", + "githubUsername": "anonrig", + "url": "https://github.com/anonrig" + } + ], + "main": "", + "types": "index.d.ts", + "typesVersions": { + "<=5.6": { + "*": [ + "ts5.6/*" + ] + }, + "<=5.7": { + "*": [ + "ts5.7/*" + ] + } + }, + "repository": { + "type": "git", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/node" + }, + "scripts": {}, + "dependencies": { + "undici-types": "~8.9.0" + }, + "peerDependencies": {}, + "typesPublisherContentHash": "6fd8885e736abe0d2ec8284c43e09a6a80eeced090dc6974536c890169d46439", + "typeScriptVersion": "5.6" +} \ No newline at end of file diff --git a/node_modules/@types/node/path.d.ts b/node_modules/@types/node/path.d.ts new file mode 100644 index 0000000..ae8fd97 --- /dev/null +++ b/node_modules/@types/node/path.d.ts @@ -0,0 +1,178 @@ +declare module "node:path" { + namespace path { + /** + * A parsed path object generated by path.parse() or consumed by path.format(). + */ + interface ParsedPath { + /** + * The root of the path such as '/' or 'c:\' + */ + root: string; + /** + * The full directory path such as '/home/user/dir' or 'c:\path\dir' + */ + dir: string; + /** + * The file name including extension (if any) such as 'index.html' + */ + base: string; + /** + * The file extension (if any) such as '.html' + */ + ext: string; + /** + * The file name without extension (if any) such as 'index' + */ + name: string; + } + interface FormatInputPathObject { + /** + * The root of the path such as '/' or 'c:\' + */ + root?: string | undefined; + /** + * The full directory path such as '/home/user/dir' or 'c:\path\dir' + */ + dir?: string | undefined; + /** + * The file name including extension (if any) such as 'index.html' + */ + base?: string | undefined; + /** + * The file extension (if any) such as '.html' + */ + ext?: string | undefined; + /** + * The file name without extension (if any) such as 'index' + */ + name?: string | undefined; + } + /** + * Normalize a string path, reducing '..' and '.' parts. + * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. If the path is a zero-length string, '.' is returned, representing the current working directory. + * + * @param path string path to normalize. + * @throws {TypeError} if `path` is not a string. + */ + function normalize(path: string): string; + /** + * Join all arguments together and normalize the resulting path. + * + * @param paths paths to join. + * @throws {TypeError} if any of the path segments is not a string. + */ + function join(...paths: string[]): string; + /** + * The right-most parameter is considered {to}. Other parameters are considered an array of {from}. + * + * Starting from leftmost {from} parameter, resolves {to} to an absolute path. + * + * If {to} isn't already absolute, {from} arguments are prepended in right to left order, + * until an absolute path is found. If after using all {from} paths still no absolute path is found, + * the current working directory is used as well. The resulting path is normalized, + * and trailing slashes are removed unless the path gets resolved to the root directory. + * + * @param paths A sequence of paths or path segments. + * @throws {TypeError} if any of the arguments is not a string. + */ + function resolve(...paths: string[]): string; + /** + * The `path.matchesGlob()` method determines if `path` matches the `pattern`. + * @param path The path to glob-match against. + * @param pattern The glob to check the path against. + * @returns Whether or not the `path` matched the `pattern`. + * @throws {TypeError} if `path` or `pattern` are not strings. + * @since v22.5.0 + */ + function matchesGlob(path: string, pattern: string): boolean; + /** + * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory. + * + * If the given {path} is a zero-length string, `false` will be returned. + * + * @param path path to test. + * @throws {TypeError} if `path` is not a string. + */ + function isAbsolute(path: string): boolean; + /** + * Solve the relative path from {from} to {to} based on the current working directory. + * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve. + * + * @throws {TypeError} if either `from` or `to` is not a string. + */ + function relative(from: string, to: string): string; + /** + * Return the directory name of a path. Similar to the Unix dirname command. + * + * @param path the path to evaluate. + * @throws {TypeError} if `path` is not a string. + */ + function dirname(path: string): string; + /** + * Return the last portion of a path. Similar to the Unix basename command. + * Often used to extract the file name from a fully qualified path. + * + * @param path the path to evaluate. + * @param suffix optionally, an extension to remove from the result. + * @throws {TypeError} if `path` is not a string or if `ext` is given and is not a string. + */ + function basename(path: string, suffix?: string): string; + /** + * Return the extension of the path, from the last '.' to end of string in the last portion of the path. + * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string. + * + * @param path the path to evaluate. + * @throws {TypeError} if `path` is not a string. + */ + function extname(path: string): string; + /** + * The platform-specific file separator. '\\' or '/'. + */ + const sep: "\\" | "/"; + /** + * The platform-specific file delimiter. ';' or ':'. + */ + const delimiter: ";" | ":"; + /** + * Returns an object from a path string - the opposite of format(). + * + * @param path path to evaluate. + * @throws {TypeError} if `path` is not a string. + */ + function parse(path: string): ParsedPath; + /** + * Returns a path string from an object - the opposite of parse(). + * + * @param pathObject path to evaluate. + */ + function format(pathObject: FormatInputPathObject): string; + /** + * On Windows systems only, returns an equivalent namespace-prefixed path for the given path. + * If path is not a string, path will be returned without modifications. + * This method is meaningful only on Windows system. + * On POSIX systems, the method is non-operational and always returns path without modifications. + */ + function toNamespacedPath(path: string): string; + } + namespace path { + export { + /** + * The `path.posix` property provides access to POSIX specific implementations of the `path` methods. + * + * The API is accessible via `require('node:path').posix` or `require('node:path/posix')`. + */ + path as posix, + /** + * The `path.win32` property provides access to Windows-specific implementations of the `path` methods. + * + * The API is accessible via `require('node:path').win32` or `require('node:path/win32')`. + */ + path as win32, + }; + } + export = path; +} +declare module "path" { + import path = require("node:path"); + export = path; +} diff --git a/node_modules/@types/node/path/posix.d.ts b/node_modules/@types/node/path/posix.d.ts new file mode 100644 index 0000000..d60f629 --- /dev/null +++ b/node_modules/@types/node/path/posix.d.ts @@ -0,0 +1,8 @@ +declare module "node:path/posix" { + import path = require("node:path"); + export = path.posix; +} +declare module "path/posix" { + import path = require("path"); + export = path.posix; +} diff --git a/node_modules/@types/node/path/win32.d.ts b/node_modules/@types/node/path/win32.d.ts new file mode 100644 index 0000000..e6aa9fa --- /dev/null +++ b/node_modules/@types/node/path/win32.d.ts @@ -0,0 +1,8 @@ +declare module "node:path/win32" { + import path = require("node:path"); + export = path.win32; +} +declare module "path/win32" { + import path = require("path"); + export = path.win32; +} diff --git a/node_modules/@types/node/perf_hooks.d.ts b/node_modules/@types/node/perf_hooks.d.ts new file mode 100644 index 0000000..e4bea8f --- /dev/null +++ b/node_modules/@types/node/perf_hooks.d.ts @@ -0,0 +1,617 @@ +declare module "node:perf_hooks" { + import { InternalEventTargetEventProperties } from "node:events"; + // #region web types + type EntryType = + | "dns" // Node.js only + | "function" // Node.js only + | "gc" // Node.js only + | "http2" // Node.js only + | "http" // Node.js only + | "mark" // available on the Web + | "measure" // available on the Web + | "net" // Node.js only + | "node" // Node.js only + | "quic" // Node.js only + | "resource"; // available on the Web + interface ConnectionTimingInfo { + domainLookupStartTime: number; + domainLookupEndTime: number; + connectionStartTime: number; + connectionEndTime: number; + secureConnectionStartTime: number; + ALPNNegotiatedProtocol: string; + } + interface FetchTimingInfo { + startTime: number; + redirectStartTime: number; + redirectEndTime: number; + postRedirectStartTime: number; + finalServiceWorkerStartTime: number; + finalNetworkRequestStartTime: number; + finalNetworkResponseStartTime: number; + endTime: number; + finalConnectionTimingInfo: ConnectionTimingInfo | null; + encodedBodySize: number; + decodedBodySize: number; + } + type PerformanceEntryList = PerformanceEntry[]; + interface PerformanceMarkOptions { + detail?: any; + startTime?: number; + } + interface PerformanceMeasureOptions { + detail?: any; + duration?: number; + end?: string | number; + start?: string | number; + } + interface PerformanceObserverCallback { + (entries: PerformanceObserverEntryList, observer: PerformanceObserver): void; + } + interface PerformanceObserverInit { + buffered?: boolean; + entryTypes?: EntryType[]; + type?: EntryType; + } + interface PerformanceEventMap { + "resourcetimingbufferfull": Event; + } + interface Performance extends EventTarget, InternalEventTargetEventProperties { + readonly nodeTiming: PerformanceNodeTiming; + readonly timeOrigin: number; + clearMarks(markName?: string): void; + clearMeasures(measureName?: string): void; + clearResourceTimings(resourceTimingName?: string): void; + getEntries(): PerformanceEntryList; + getEntriesByName(name: string, type?: EntryType): PerformanceEntryList; + getEntriesByType(type: EntryType): PerformanceEntryList; + mark(markName: string, markOptions?: PerformanceMarkOptions): PerformanceMark; + markResourceTiming( + timingInfo: FetchTimingInfo, + requestedUrl: string, + initiatorType: string, + global: unknown, + cacheMode: string, + bodyInfo: unknown, + responseStatus: number, + deliveryType?: string, + ): PerformanceResourceTiming; + measure(measureName: string, startMark?: string, endMark?: string): PerformanceMeasure; + measure(measureName: string, options: PerformanceMeasureOptions, endMark?: string): PerformanceMeasure; + now(): number; + setResourceTimingBufferSize(maxSize: number): void; + toJSON(): any; + addEventListener( + type: K, + listener: (ev: PerformanceEventMap[K]) => void, + options?: AddEventListenerOptions | boolean, + ): void; + addEventListener( + type: string, + listener: EventListener | EventListenerObject, + options?: AddEventListenerOptions | boolean, + ): void; + removeEventListener( + type: K, + listener: (ev: PerformanceEventMap[K]) => void, + options?: EventListenerOptions | boolean, + ): void; + removeEventListener( + type: string, + listener: EventListener | EventListenerObject, + options?: EventListenerOptions | boolean, + ): void; + /** + * This is an alias of `perf_hooks.eventLoopUtilization()`. + * + * _This property is an extension by Node.js. It is not available in Web browsers._ + * @since v14.10.0, v12.19.0 + * @param utilization1 The result of a previous call to + * `eventLoopUtilization()`. + * @param utilization2 The result of a previous call to + * `eventLoopUtilization()` prior to `utilization1`. + */ + eventLoopUtilization( + utilization1?: EventLoopUtilization, + utilization2?: EventLoopUtilization, + ): EventLoopUtilization; + /** + * This is an alias of `perf_hooks.timerify()`. + * + * _This property is an extension by Node.js. It is not available in Web browsers._ + * @since v8.5.0 + */ + timerify any>(fn: T, options?: TimerifyOptions): T; + } + var Performance: { + prototype: Performance; + new(): Performance; + }; + interface PerformanceEntry { + readonly duration: number; + readonly entryType: EntryType; + readonly name: string; + readonly startTime: number; + toJSON(): any; + } + var PerformanceEntry: { + prototype: PerformanceEntry; + new(): PerformanceEntry; + }; + interface PerformanceMark extends PerformanceEntry { + readonly detail: any; + readonly entryType: "mark"; + } + var PerformanceMark: { + prototype: PerformanceMark; + new(markName: string, markOptions?: PerformanceMarkOptions): PerformanceMark; + }; + interface PerformanceMeasure extends PerformanceEntry { + readonly detail: any; + readonly entryType: "measure"; + } + var PerformanceMeasure: { + prototype: PerformanceMeasure; + new(): PerformanceMeasure; + }; + interface PerformanceObserver { + disconnect(): void; + observe(options: PerformanceObserverInit): void; + takeRecords(): PerformanceEntryList; + } + var PerformanceObserver: { + prototype: PerformanceObserver; + new(callback: PerformanceObserverCallback): PerformanceObserver; + readonly supportedEntryTypes: readonly EntryType[]; + }; + interface PerformanceObserverEntryList { + getEntries(): PerformanceEntryList; + getEntriesByName(name: string, type?: EntryType): PerformanceEntryList; + getEntriesByType(type: EntryType): PerformanceEntryList; + } + var PerformanceObserverEntryList: { + prototype: PerformanceObserverEntryList; + new(): PerformanceObserverEntryList; + }; + interface PerformanceResourceTiming extends PerformanceEntry { + readonly connectEnd: number; + readonly connectStart: number; + readonly decodedBodySize: number; + readonly domainLookupEnd: number; + readonly domainLookupStart: number; + readonly encodedBodySize: number; + readonly entryType: "resource"; + readonly fetchStart: number; + readonly initiatorType: string; + readonly nextHopProtocol: string; + readonly redirectEnd: number; + readonly redirectStart: number; + readonly requestStart: number; + readonly responseEnd: number; + readonly responseStart: number; + readonly responseStatus: number; + readonly secureConnectionStart: number; + readonly transferSize: number; + readonly workerStart: number; + toJSON(): any; + } + var PerformanceResourceTiming: { + prototype: PerformanceResourceTiming; + new(): PerformanceResourceTiming; + }; + var performance: Performance; + // #endregion + /** + * _This class is an extension by Node.js. It is not available in Web browsers._ + * + * Provides detailed Node.js timing data. + * + * The constructor of this class is not exposed to users directly. + * @since v19.0.0 + */ + class PerformanceNodeEntry extends PerformanceEntry { + /** + * Additional detail specific to the `entryType`. + * @since v16.0.0 + */ + readonly detail: any; + readonly entryType: "dns" | "function" | "gc" | "http2" | "http" | "net" | "node" | "quic"; + } + interface UVMetrics { + /** + * Number of event loop iterations. + */ + readonly loopCount: number; + /** + * Number of events that have been processed by the event handler. + */ + readonly events: number; + /** + * Number of events that were waiting to be processed when the event provider was called. + */ + readonly eventsWaiting: number; + } + /** + * _This property is an extension by Node.js. It is not available in Web browsers._ + * + * Provides timing details for Node.js itself. The constructor of this class + * is not exposed to users. + * @since v8.5.0 + */ + interface PerformanceNodeTiming extends PerformanceEntry { + /** + * The high resolution millisecond timestamp at which the Node.js process + * completed bootstrapping. If bootstrapping has not yet finished, the property + * has the value of -1. + * @since v8.5.0 + */ + readonly bootstrapComplete: number; + readonly entryType: "node"; + /** + * The high resolution millisecond timestamp at which the Node.js environment was + * initialized. + * @since v8.5.0 + */ + readonly environment: number; + /** + * The high resolution millisecond timestamp of the amount of time the event loop + * has been idle within the event loop's event provider (e.g. `epoll_wait`). This + * does not take CPU usage into consideration. If the event loop has not yet + * started (e.g., in the first tick of the main script), the property has the + * value of 0. + * @since v14.10.0, v12.19.0 + */ + readonly idleTime: number; + /** + * The high resolution millisecond timestamp at which the Node.js event loop + * exited. If the event loop has not yet exited, the property has the value of -1\. + * It can only have a value of not -1 in a handler of the `'exit'` event. + * @since v8.5.0 + */ + readonly loopExit: number; + /** + * The high resolution millisecond timestamp at which the Node.js event loop + * started. If the event loop has not yet started (e.g., in the first tick of the + * main script), the property has the value of -1. + * @since v8.5.0 + */ + readonly loopStart: number; + /** + * The high resolution millisecond timestamp at which the Node.js process was initialized. + * @since v8.5.0 + */ + readonly nodeStart: number; + /** + * This is a wrapper to the `uv_metrics_info` function. + * It returns the current set of event loop metrics. + * + * It is recommended to use this property inside a function whose execution was + * scheduled using `setImmediate` to avoid collecting metrics before finishing all + * operations scheduled during the current loop iteration. + * @since v22.8.0, v20.18.0 + */ + readonly uvMetricsInfo: UVMetrics; + /** + * The high resolution millisecond timestamp at which the V8 platform was + * initialized. + * @since v8.5.0 + */ + readonly v8Start: number; + } + namespace constants { + const NODE_PERFORMANCE_GC_MAJOR: number; + const NODE_PERFORMANCE_GC_MINOR: number; + const NODE_PERFORMANCE_GC_MINOR_MARK_SWEEP: number; + const NODE_PERFORMANCE_GC_INCREMENTAL: number; + const NODE_PERFORMANCE_GC_WEAKCB: number; + const NODE_PERFORMANCE_GC_FLAGS_NO: number; + const NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED: number; + const NODE_PERFORMANCE_GC_FLAGS_FORCED: number; + const NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING: number; + const NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE: number; + const NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY: number; + const NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE: number; + } + interface EventLoopMonitorOptions { + /** + * When `true`, samples are taken once per + * event loop iteration. **Default:** `false`. + */ + samplePerIteration?: boolean | undefined; + /** + * The sampling rate in milliseconds for interval-based + * sampling. Must be greater than zero. This option is ignored when + * `samplePerIteration` is `true`. **Default:** `10`. + */ + resolution?: number | undefined; + } + interface Histogram { + /** + * The number of samples recorded by the histogram. + * @since v17.4.0, v16.14.0 + */ + readonly count: number; + /** + * The number of samples recorded by the histogram. + * v17.4.0, v16.14.0 + */ + readonly countBigInt: bigint; + /** + * The number of times the event loop delay exceeded the maximum 1 hour event + * loop delay threshold. + * @since v11.10.0 + */ + readonly exceeds: number; + /** + * The number of times the event loop delay exceeded the maximum 1 hour event loop delay threshold. + * @since v17.4.0, v16.14.0 + */ + readonly exceedsBigInt: bigint; + /** + * The maximum recorded event loop delay. + * @since v11.10.0 + */ + readonly max: number; + /** + * The maximum recorded event loop delay. + * v17.4.0, v16.14.0 + */ + readonly maxBigInt: number; + /** + * The mean of the recorded event loop delays. + * @since v11.10.0 + */ + readonly mean: number; + /** + * The minimum recorded event loop delay. + * @since v11.10.0 + */ + readonly min: number; + /** + * The minimum recorded event loop delay. + * v17.4.0, v16.14.0 + */ + readonly minBigInt: bigint; + /** + * Returns the value at the given percentile. + * @since v11.10.0 + * @param percentile A percentile value in the range (0, 100]. + */ + percentile(percentile: number): number; + /** + * Returns the value at the given percentile. + * @since v17.4.0, v16.14.0 + * @param percentile A percentile value in the range (0, 100]. + */ + percentileBigInt(percentile: number): bigint; + /** + * Returns a `Map` object detailing the accumulated percentile distribution. + * @since v11.10.0 + */ + readonly percentiles: Map; + /** + * Returns a `Map` object detailing the accumulated percentile distribution. + * @since v17.4.0, v16.14.0 + */ + readonly percentilesBigInt: Map; + /** + * Resets the collected histogram data. + * @since v11.10.0 + */ + reset(): void; + /** + * The standard deviation of the recorded event loop delays. + * @since v11.10.0 + */ + readonly stddev: number; + } + /** + * A `Histogram` that records event loop delay, returned by + * `perf_hooks.monitorEventLoopDelay()`. + */ + interface ELDHistogram extends Histogram { + /** + * Disables event loop delay sampling. Returns `true` if sampling was + * stopped, `false` if it was already stopped. + * @since v11.10.0 + */ + disable(): boolean; + /** + * Enables event loop delay sampling. Returns `true` if sampling was + * started, `false` if it was already started. + * @since v11.10.0 + */ + enable(): boolean; + /** + * Disables event loop delay sampling when the histogram is disposed. + * + * ```js + * const { monitorEventLoopDelay } = require('node:perf_hooks'); + * { + * using hist = monitorEventLoopDelay({ resolution: 20 }); + * hist.enable(); + * // The histogram will be disabled when the block is exited. + * } + * ``` + * @since v24.2.0 + */ + [Symbol.dispose](): void; + } + interface RecordableHistogram extends Histogram { + /** + * @since v15.9.0, v14.18.0 + * @param val The amount to record in the histogram. + */ + record(val: number | bigint): void; + /** + * Calculates the amount of time (in nanoseconds) that has passed since the + * previous call to `recordDelta()` and records that amount in the histogram. + * @since v15.9.0, v14.18.0 + */ + recordDelta(): void; + /** + * Adds the values from `other` to this histogram. + * @since v17.4.0, v16.14.0 + */ + add(other: RecordableHistogram): void; + } + interface EventLoopUtilization { + idle: number; + active: number; + utilization: number; + } + /** + * The `eventLoopUtilization()` function returns an object that contains the + * cumulative duration of time the event loop has been both idle and active as a + * high resolution milliseconds timer. The `utilization` value is the calculated + * Event Loop Utilization (ELU). + * + * If bootstrapping has not yet finished on the main thread the properties have + * the value of `0`. The ELU is immediately available on [Worker threads](https://nodejs.org/docs/latest-v26.x/api/worker_threads.html#worker-threads) since + * bootstrap happens within the event loop. + * + * Both `utilization1` and `utilization2` are optional parameters. + * + * If `utilization1` is passed, then the delta between the current call's `active` + * and `idle` times, as well as the corresponding `utilization` value are + * calculated and returned (similar to `process.hrtime()`). + * + * If `utilization1` and `utilization2` are both passed, then the delta is + * calculated between the two arguments. This is a convenience option because, + * unlike `process.hrtime()`, calculating the ELU is more complex than a + * single subtraction. + * + * ELU is similar to CPU utilization, except that it only measures event loop + * statistics and not CPU usage. It represents the percentage of time the event + * loop has spent outside the event loop's event provider (e.g. `epoll_wait`). + * No other CPU idle time is taken into consideration. The following is an example + * of how a mostly idle process will have a high ELU. + * + * ```js + * import { eventLoopUtilization } from 'node:perf_hooks'; + * import { spawnSync } from 'node:child_process'; + * + * setImmediate(() => { + * const elu = eventLoopUtilization(); + * spawnSync('sleep', ['5']); + * console.log(eventLoopUtilization(elu).utilization); + * }); + * ``` + * + * Although the CPU is mostly idle while running this script, the value of + * `utilization` is `1`. This is because the call to + * `child_process.spawnSync()` blocks the event loop from proceeding. + * + * Passing in a user-defined object instead of the result of a previous call to + * `eventLoopUtilization()` will lead to undefined behavior. The return values + * are not guaranteed to reflect any correct state of the event loop. + * @since v25.2.0 + * @param utilization1 The result of a previous call to + * `eventLoopUtilization()`. + * @param utilization2 The result of a previous call to + * `eventLoopUtilization()` prior to `utilization1`. + */ + function eventLoopUtilization( + utilization1?: EventLoopUtilization, + utilization2?: EventLoopUtilization, + ): EventLoopUtilization; + /** + * _This property is an extension by Node.js. It is not available in Web browsers._ + * + * Creates a histogram object that samples and reports the event loop delay over + * time. The delays will be reported in nanoseconds. + * + * By default, the histogram is updated by a timer using the configured + * `resolution`. When `samplePerIteration` is `true`, samples are taken once per + * event loop iteration using `uv_prepare_t` and `uv_check_t` hooks. In that mode, + * the histogram does not keep the loop alive or force additional iterations when + * the application is idle. + * The two sampling modes produce significantly different results and should not + * be compared directly. + * + * ```js + * import { monitorEventLoopDelay } from 'node:perf_hooks'; + * const h = monitorEventLoopDelay({ resolution: 20 }); + * h.enable(); + * // Do something. + * h.disable(); + * console.log(h.min); + * console.log(h.max); + * console.log(h.mean); + * console.log(h.stddev); + * console.log(h.percentiles); + * console.log(h.percentile(50)); + * console.log(h.percentile(99)); + * ``` + * @since v11.10.0 + */ + function monitorEventLoopDelay(options?: EventLoopMonitorOptions): ELDHistogram; + interface TimerifyOptions { + /** + * A histogram object created using + * `perf_hooks.createHistogram()` that will record runtime durations in + * nanoseconds. + */ + histogram?: RecordableHistogram | undefined; + } + /** + * _This property is an extension by Node.js. It is not available in Web browsers._ + * + * Wraps a function within a new function that measures the running time of the + * wrapped function. A `PerformanceObserver` must be subscribed to the `'function'` + * event type in order for the timing details to be accessed. + * + * ```js + * import { timerify, performance, PerformanceObserver } from 'node:perf_hooks'; + * + * function someFunction() { + * console.log('hello world'); + * } + * + * const wrapped = timerify(someFunction); + * + * const obs = new PerformanceObserver((list) => { + * console.log(list.getEntries()[0].duration); + * + * performance.clearMarks(); + * performance.clearMeasures(); + * obs.disconnect(); + * }); + * obs.observe({ entryTypes: ['function'] }); + * + * // A performance timeline entry will be created + * wrapped(); + * ``` + * + * If the wrapped function returns a promise, a finally handler will be attached + * to the promise and the duration will be reported once the finally handler is + * invoked. + * @since v25.2.0 + */ + function timerify any>(fn: T, options?: TimerifyOptions): T; + interface CreateHistogramOptions { + /** + * The minimum recordable value. Must be an integer value greater than 0. + * @default 1 + */ + lowest?: number | bigint | undefined; + /** + * The maximum recordable value. Must be an integer value greater than min. + * @default Number.MAX_SAFE_INTEGER + */ + highest?: number | bigint | undefined; + /** + * The number of accuracy digits. Must be a number between 1 and 5. + * @default 3 + */ + figures?: number | undefined; + } + /** + * Returns a `RecordableHistogram`. + * @since v15.9.0, v14.18.0 + */ + function createHistogram(options?: CreateHistogramOptions): RecordableHistogram; +} +declare module "perf_hooks" { + export * from "node:perf_hooks"; +} diff --git a/node_modules/@types/node/process.d.ts b/node_modules/@types/node/process.d.ts new file mode 100644 index 0000000..51a3d61 --- /dev/null +++ b/node_modules/@types/node/process.d.ts @@ -0,0 +1,2269 @@ +declare module "node:process" { + import { Control, MessageOptions, SendHandle } from "node:child_process"; + import { PathLike } from "node:fs"; + import * as tty from "node:tty"; + import { Worker } from "node:worker_threads"; + interface BuiltInModule { + "assert": typeof import("assert"); + "node:assert": typeof import("node:assert"); + "assert/strict": typeof import("assert/strict"); + "node:assert/strict": typeof import("node:assert/strict"); + "async_hooks": typeof import("async_hooks"); + "node:async_hooks": typeof import("node:async_hooks"); + "buffer": typeof import("buffer"); + "node:buffer": typeof import("node:buffer"); + "child_process": typeof import("child_process"); + "node:child_process": typeof import("node:child_process"); + "cluster": typeof import("cluster"); + "node:cluster": typeof import("node:cluster"); + "console": typeof import("console"); + "node:console": typeof import("node:console"); + "constants": typeof import("constants"); + "node:constants": typeof import("node:constants"); + "crypto": typeof import("crypto"); + "node:crypto": typeof import("node:crypto"); + "dgram": typeof import("dgram"); + "node:dgram": typeof import("node:dgram"); + "diagnostics_channel": typeof import("diagnostics_channel"); + "node:diagnostics_channel": typeof import("node:diagnostics_channel"); + "dns": typeof import("dns"); + "node:dns": typeof import("node:dns"); + "dns/promises": typeof import("dns/promises"); + "node:dns/promises": typeof import("node:dns/promises"); + "domain": typeof import("domain"); + "node:domain": typeof import("node:domain"); + "events": typeof import("events"); + "node:events": typeof import("node:events"); + "node:ffi": typeof import("node:ffi"); + "fs": typeof import("fs"); + "node:fs": typeof import("node:fs"); + "fs/promises": typeof import("fs/promises"); + "node:fs/promises": typeof import("node:fs/promises"); + "http": typeof import("http"); + "node:http": typeof import("node:http"); + "http2": typeof import("http2"); + "node:http2": typeof import("node:http2"); + "https": typeof import("https"); + "node:https": typeof import("node:https"); + "inspector": typeof import("inspector"); + "node:inspector": typeof import("node:inspector"); + "inspector/promises": typeof import("inspector/promises"); + "node:inspector/promises": typeof import("node:inspector/promises"); + "module": typeof import("module"); + "node:module": typeof import("node:module"); + "net": typeof import("net"); + "node:net": typeof import("node:net"); + "os": typeof import("os"); + "node:os": typeof import("node:os"); + "path": typeof import("path"); + "node:path": typeof import("node:path"); + "path/posix": typeof import("path/posix"); + "node:path/posix": typeof import("node:path/posix"); + "path/win32": typeof import("path/win32"); + "node:path/win32": typeof import("node:path/win32"); + "perf_hooks": typeof import("perf_hooks"); + "node:perf_hooks": typeof import("node:perf_hooks"); + "process": typeof import("process"); + "node:process": typeof import("node:process"); + "punycode": typeof import("punycode"); + "node:punycode": typeof import("node:punycode"); + "querystring": typeof import("querystring"); + "node:querystring": typeof import("node:querystring"); + "node:quic": typeof import("node:quic"); + "readline": typeof import("readline"); + "node:readline": typeof import("node:readline"); + "readline/promises": typeof import("readline/promises"); + "node:readline/promises": typeof import("node:readline/promises"); + "repl": typeof import("repl"); + "node:repl": typeof import("node:repl"); + "node:sea": typeof import("node:sea"); + "node:sqlite": typeof import("node:sqlite"); + "stream": typeof import("stream"); + "node:stream": typeof import("node:stream"); + "stream/consumers": typeof import("stream/consumers"); + "node:stream/consumers": typeof import("node:stream/consumers"); + "stream/iter": typeof import("stream/iter"); + "node:stream/iter": typeof import("node:stream/iter"); + "stream/promises": typeof import("stream/promises"); + "node:stream/promises": typeof import("node:stream/promises"); + "stream/web": typeof import("stream/web"); + "node:stream/web": typeof import("node:stream/web"); + "string_decoder": typeof import("string_decoder"); + "node:string_decoder": typeof import("node:string_decoder"); + "node:test": typeof import("node:test"); + "node:test/reporters": typeof import("node:test/reporters"); + "timers": typeof import("timers"); + "node:timers": typeof import("node:timers"); + "timers/promises": typeof import("timers/promises"); + "node:timers/promises": typeof import("node:timers/promises"); + "tls": typeof import("tls"); + "node:tls": typeof import("node:tls"); + "trace_events": typeof import("trace_events"); + "node:trace_events": typeof import("node:trace_events"); + "tty": typeof import("tty"); + "node:tty": typeof import("node:tty"); + "url": typeof import("url"); + "node:url": typeof import("node:url"); + "util": typeof import("util"); + "node:util": typeof import("node:util"); + "util/types": typeof import("util/types"); + "node:util/types": typeof import("node:util/types"); + "v8": typeof import("v8"); + "node:v8": typeof import("node:v8"); + "node:vfs": typeof import("node:vfs"); + "vm": typeof import("vm"); + "node:vm": typeof import("node:vm"); + "wasi": typeof import("wasi"); + "node:wasi": typeof import("node:wasi"); + "worker_threads": typeof import("worker_threads"); + "node:worker_threads": typeof import("node:worker_threads"); + "zlib": typeof import("zlib"); + "node:zlib": typeof import("node:zlib"); + } + type SignalsEventMap = { [S in NodeJS.Signals]: [signal: S] }; + interface ProcessEventMap extends SignalsEventMap { + "beforeExit": [code: number]; + "disconnect": []; + "exit": [code: number]; + "message": [ + message: object | boolean | number | string | null, + sendHandle: SendHandle | undefined, + ]; + "rejectionHandled": [promise: Promise]; + "uncaughtException": [error: Error, origin: NodeJS.UncaughtExceptionOrigin]; + "uncaughtExceptionMonitor": [error: Error, origin: NodeJS.UncaughtExceptionOrigin]; + "unhandledRejection": [reason: unknown, promise: Promise]; + "warning": [warning: Error]; + "worker": [worker: Worker]; + "workerMessage": [value: any, source: number]; + } + global { + var process: NodeJS.Process; + namespace process { + export { ProcessEventMap }; + } + namespace NodeJS { + // this namespace merge is here because these are specifically used + // as the type for process.stdin, process.stdout, and process.stderr. + // they can't live in tty.d.ts because we need to disambiguate the imported name. + interface ReadStream extends tty.ReadStream {} + interface WriteStream extends tty.WriteStream {} + interface MemoryUsageFn { + /** + * The `process.memoryUsage()` method iterate over each page to gather informations about memory + * usage which can be slow depending on the program memory allocations. + */ + (): MemoryUsage; + /** + * method returns an integer representing the Resident Set Size (RSS) in bytes. + */ + rss(): number; + } + interface MemoryUsage { + /** + * Resident Set Size, is the amount of space occupied in the main memory device (that is a subset of the total allocated memory) for the + * process, including all C++ and JavaScript objects and code. + */ + rss: number; + /** + * Refers to V8's memory usage. + */ + heapTotal: number; + /** + * Refers to V8's memory usage. + */ + heapUsed: number; + external: number; + /** + * Refers to memory allocated for `ArrayBuffer`s and `SharedArrayBuffer`s, including all Node.js Buffers. This is also included + * in the external value. When Node.js is used as an embedded library, this value may be `0` because allocations for `ArrayBuffer`s + * may not be tracked in that case. + */ + arrayBuffers: number; + } + interface CpuUsage { + user: number; + system: number; + } + interface ProcessRelease { + name: string; + sourceUrl?: string | undefined; + headersUrl?: string | undefined; + libUrl?: string | undefined; + lts?: string | undefined; + } + interface ProcessFeatures { + /** + * A boolean value that is `true` if the current Node.js build is caching builtin modules. + * @since v12.0.0 + */ + readonly cached_builtins: boolean; + /** + * A boolean value that is `true` if the current Node.js build is a debug build. + * @since v0.5.5 + */ + readonly debug: boolean; + /** + * A boolean value that is `true` if the current Node.js build includes the inspector. + * @since v11.10.0 + */ + readonly inspector: boolean; + /** + * A boolean value that is `true` if the current Node.js build includes support for IPv6. + * + * Since all Node.js builds have IPv6 support, this value is always `true`. + * @since v0.5.3 + * @deprecated This property is always true, and any checks based on it are redundant. + */ + readonly ipv6: boolean; + /** + * A boolean value that is `true` if the current Node.js build supports + * [loading ECMAScript modules using `require()`](https://nodejs.org/docs/latest-v26.x/api/modules.md#loading-ecmascript-modules-using-require). + * @since v22.10.0 + */ + readonly require_module: boolean; + /** + * A boolean value that is `true` if the current Node.js build includes support for TLS. + * @since v0.5.3 + */ + readonly tls: boolean; + /** + * A boolean value that is `true` if the current Node.js build includes support for ALPN in TLS. + * + * In Node.js 11.0.0 and later versions, the OpenSSL dependencies feature unconditional ALPN support. + * This value is therefore identical to that of `process.features.tls`. + * @since v4.8.0 + * @deprecated Use `process.features.tls` instead. + */ + readonly tls_alpn: boolean; + /** + * A boolean value that is `true` if the current Node.js build includes support for OCSP in TLS. + * + * In Node.js 11.0.0 and later versions, the OpenSSL dependencies feature unconditional OCSP support. + * This value is therefore identical to that of `process.features.tls`. + * @since v0.11.13 + * @deprecated Use `process.features.tls` instead. + */ + readonly tls_ocsp: boolean; + /** + * A boolean value that is `true` if the current Node.js build includes support for SNI in TLS. + * + * In Node.js 11.0.0 and later versions, the OpenSSL dependencies feature unconditional SNI support. + * This value is therefore identical to that of `process.features.tls`. + * @since v0.5.3 + * @deprecated Use `process.features.tls` instead. + */ + readonly tls_sni: boolean; + /** + * A value that is `"strip"` by default, and `false` if + * Node.js is run with `--no-strip-types`. + * @since v22.10.0 + */ + readonly typescript: "strip" | false; + /** + * A boolean value that is `true` if the current Node.js build includes support for libuv. + * + * Since it's not possible to build Node.js without libuv, this value is always `true`. + * @since v0.5.3 + * @deprecated This property is always true, and any checks based on it are redundant. + */ + readonly uv: boolean; + } + interface ProcessVersions extends Dict { + http_parser: string; + node: string; + v8: string; + ares: string; + uv: string; + zlib: string; + modules: string; + openssl: string; + } + type Platform = + | "aix" + | "android" + | "darwin" + | "freebsd" + | "haiku" + | "linux" + | "openbsd" + | "sunos" + | "win32" + | "cygwin" + | "netbsd"; + type Architecture = + | "arm" + | "arm64" + | "ia32" + | "loong64" + | "mips" + | "mipsel" + | "ppc64" + | "riscv64" + | "s390x" + | "x64"; + type Signals = + | "SIGABRT" + | "SIGALRM" + | "SIGBUS" + | "SIGCHLD" + | "SIGCONT" + | "SIGFPE" + | "SIGHUP" + | "SIGILL" + | "SIGINT" + | "SIGIO" + | "SIGIOT" + | "SIGKILL" + | "SIGPIPE" + | "SIGPOLL" + | "SIGPROF" + | "SIGPWR" + | "SIGQUIT" + | "SIGSEGV" + | "SIGSTKFLT" + | "SIGSTOP" + | "SIGSYS" + | "SIGTERM" + | "SIGTRAP" + | "SIGTSTP" + | "SIGTTIN" + | "SIGTTOU" + | "SIGUNUSED" + | "SIGURG" + | "SIGUSR1" + | "SIGUSR2" + | "SIGVTALRM" + | "SIGWINCH" + | "SIGXCPU" + | "SIGXFSZ" + | "SIGBREAK" + | "SIGLOST" + | "SIGINFO"; + type UncaughtExceptionOrigin = "uncaughtException" | "unhandledRejection"; + /** + * @deprecated Global listener types will be removed in a future version. + * Callbacks passed directly to `process`'s EventEmitter methods + * have their parameter types inferred automatically. + * + * `process` event types are also available via `ProcessEventMap`: + * + * ```ts + * import type { ProcessEventMap } from 'node:process'; + * const listener = (...args: ProcessEventMap['beforeExit']) => { ... }; + * ``` + */ + type BeforeExitListener = (...args: ProcessEventMap["beforeExit"]) => void; + /** + * @deprecated Global listener types will be removed in a future version. + * Callbacks passed directly to `process`'s EventEmitter methods + * have their parameter types inferred automatically. + * + * `process` event types are also available via `ProcessEventMap`: + * + * ```ts + * import type { ProcessEventMap } from 'node:process'; + * const listener = (...args: ProcessEventMap['disconnect']) => { ... }; + * ``` + */ + type DisconnectListener = (...args: ProcessEventMap["disconnect"]) => void; + /** + * @deprecated Global listener types will be removed in a future version. + * Callbacks passed directly to `process`'s EventEmitter methods + * have their parameter types inferred automatically. + * + * `process` event types are also available via `ProcessEventMap`: + * + * ```ts + * import type { ProcessEventMap } from 'node:process'; + * const listener = (...args: ProcessEventMap['exit']) => { ... }; + * ``` + */ + type ExitListener = (...args: ProcessEventMap["exit"]) => void; + /** + * @deprecated Global listener types will be removed in a future version. + * Callbacks passed directly to `process`'s EventEmitter methods + * have their parameter types inferred automatically. + * + * `process` event types are also available via `ProcessEventMap`: + * + * ```ts + * import type { ProcessEventMap } from 'node:process'; + * const listener = (...args: ProcessEventMap['message']) => { ... }; + * ``` + */ + type MessageListener = (...args: ProcessEventMap["message"]) => void; + /** + * @deprecated Global listener types will be removed in a future version. + * Callbacks passed directly to `process`'s EventEmitter methods + * have their parameter types inferred automatically. + * + * `process` event types are also available via `ProcessEventMap`: + * + * ```ts + * import type { ProcessEventMap } from 'node:process'; + * const listener = (...args: ProcessEventMap['rejectionHandled']) => { ... }; + * ``` + */ + type RejectionHandledListener = (...args: ProcessEventMap["rejectionHandled"]) => void; + /** + * @deprecated Global listener types will be removed in a future version. + * Callbacks passed directly to `process`'s EventEmitter methods + * have their parameter types inferred automatically. + */ + type SignalsListener = (signal: Signals) => void; + /** + * @deprecated Global listener types will be removed in a future version. + * Callbacks passed directly to `process`'s EventEmitter methods + * have their parameter types inferred automatically. + * + * `process` event types are also available via `ProcessEventMap`: + * + * ```ts + * import type { ProcessEventMap } from 'node:process'; + * const listener = (...args: ProcessEventMap['uncaughtException']) => { ... }; + * ``` + */ + type UncaughtExceptionListener = (...args: ProcessEventMap["uncaughtException"]) => void; + /** + * @deprecated Global listener types will be removed in a future version. + * Callbacks passed directly to `process`'s EventEmitter methods + * have their parameter types inferred automatically. + * + * `process` event types are also available via `ProcessEventMap`: + * + * ```ts + * import type { ProcessEventMap } from 'node:process'; + * const listener = (...args: ProcessEventMap['unhandledRejection']) => { ... }; + * ``` + */ + type UnhandledRejectionListener = (...args: ProcessEventMap["unhandledRejection"]) => void; + /** + * @deprecated Global listener types will be removed in a future version. + * Callbacks passed directly to `process`'s EventEmitter methods + * have their parameter types inferred automatically. + * + * `process` event types are also available via `ProcessEventMap`: + * + * ```ts + * import type { ProcessEventMap } from 'node:process'; + * const listener = (...args: ProcessEventMap['warning']) => { ... }; + * ``` + */ + type WarningListener = (...args: ProcessEventMap["warning"]) => void; + /** + * @deprecated Global listener types will be removed in a future version. + * Callbacks passed directly to `process`'s EventEmitter methods + * have their parameter types inferred automatically. + * + * `process` event types are also available via `ProcessEventMap`: + * + * ```ts + * import type { ProcessEventMap } from 'node:process'; + * const listener = (...args: ProcessEventMap['worker']) => { ... }; + * ``` + */ + type WorkerListener = (...args: ProcessEventMap["worker"]) => void; + interface Socket extends ReadWriteStream { + isTTY?: true | undefined; + } + // Alias for compatibility + interface ProcessEnv extends Dict {} + interface HRTime { + /** + * This is the legacy version of {@link process.hrtime.bigint()} + * before bigint was introduced in JavaScript. + * + * The `process.hrtime()` method returns the current high-resolution real time in a `[seconds, nanoseconds]` tuple `Array`, + * where `nanoseconds` is the remaining part of the real time that can't be represented in second precision. + * + * `time` is an optional parameter that must be the result of a previous `process.hrtime()` call to diff with the current time. + * If the parameter passed in is not a tuple `Array`, a TypeError will be thrown. + * Passing in a user-defined array instead of the result of a previous call to `process.hrtime()` will lead to undefined behavior. + * + * These times are relative to an arbitrary time in the past, + * and not related to the time of day and therefore not subject to clock drift. + * The primary use is for measuring performance between intervals: + * ```js + * const { hrtime } = require('node:process'); + * const NS_PER_SEC = 1e9; + * const time = hrtime(); + * // [ 1800216, 25 ] + * + * setTimeout(() => { + * const diff = hrtime(time); + * // [ 1, 552 ] + * + * console.log(`Benchmark took ${diff[0] * NS_PER_SEC + diff[1]} nanoseconds`); + * // Benchmark took 1000000552 nanoseconds + * }, 1000); + * ``` + * @since 0.7.6 + * @legacy Use {@link process.hrtime.bigint()} instead. + * @param time The result of a previous call to `process.hrtime()` + */ + (time?: [number, number]): [number, number]; + /** + * The `bigint` version of the {@link process.hrtime()} method returning the current high-resolution real time in nanoseconds as a `bigint`. + * + * Unlike {@link process.hrtime()}, it does not support an additional time argument since the difference can just be computed directly by subtraction of the two `bigint`s. + * ```js + * import { hrtime } from 'node:process'; + * + * const start = hrtime.bigint(); + * // 191051479007711n + * + * setTimeout(() => { + * const end = hrtime.bigint(); + * // 191052633396993n + * + * console.log(`Benchmark took ${end - start} nanoseconds`); + * // Benchmark took 1154389282 nanoseconds + * }, 1000); + * ``` + * @since v10.7.0 + */ + bigint(): bigint; + } + interface ProcessPermission { + /** + * Verifies that the process is able to access the given scope and reference. + * If no reference is provided, a global scope is assumed, for instance, `process.permission.has('fs.read')` + * will check if the process has ALL file system read permissions. + * + * The reference has a meaning based on the provided scope. For example, the reference when the scope is File System means files and folders. + * + * The available scopes are: + * + * * `fs` - All File System + * * `fs.read` - File System read operations + * * `fs.write` - File System write operations + * * `child` - Child process spawning operations + * * `worker` - Worker thread spawning operation + * + * ```js + * // Check if the process has permission to read the README file + * process.permission.has('fs.read', './README.md'); + * // Check if the process has read permission operations + * process.permission.has('fs.read'); + * ``` + * @since v20.0.0 + */ + has(scope: string, reference?: string): boolean; + /** + * Drops the specified permission from the current process. This operation is + * **irreversible** — once a permission is dropped, it cannot be restored through + * any Node.js API. + * + * If no reference is provided, the entire scope is dropped. For example, + * `process.permission.drop('fs.read')` will revoke ALL file system read + * permissions. + * + * When a reference is provided, only the permission for that specific resource + * is dropped. For example, `process.permission.drop('fs.read', '/etc/myapp')` + * will revoke read access to that directory while keeping other read + * permissions intact. + * + * **Important:** You can only drop the exact resource that was explicitly + * granted. The reference passed to `drop()` must match the original grant: + * + * * If a permission was granted using a wildcard (`*`), such as + * `--allow-fs-read=*`, individual paths cannot be dropped - only the entire + * scope can be dropped (by calling `drop()` without a reference). + * * If a directory was granted (e.g. `--allow-fs-read=/my/folder`), you cannot + * drop access to individual files inside it. You must drop the same directory + * that was granted. Any remaining grants continue to apply. + * + * The available scopes are the same as [`process.permission.has()`][]: + * + * `fs` - All File System (drops both read and write) + * * `fs.read` - File System read operations + * * `fs.write` - File System write operations + * * `child` - Child process spawning operations + * * `worker` - Worker thread spawning operation + * * `net` - Network operations + * * `inspector` - Inspector operations + * * `wasi` - WASI operations + * * `addon` - Native addon operations + * + * ```js + * const fs = require('node:fs'); + * + * // Read configuration during startup + * const config = fs.readFileSync('/etc/myapp/config.json', 'utf8'); + * + * // Drop read access to the config directory after initialization + * process.permission.drop('fs.read', '/etc/myapp'); + * + * // This will now throw ERR_ACCESS_DENIED + * fs.readFileSync('/etc/myapp/config.json'); + * ``` + * @since v26.3.0 + * @experimental + */ + drop(scope: string, reference?: string): void; + } + interface ProcessReport { + /** + * Write reports in a compact format, single-line JSON, more easily consumable by log processing systems + * than the default multi-line format designed for human consumption. + * @since v13.12.0, v12.17.0 + */ + compact: boolean; + /** + * Directory where the report is written. + * The default value is the empty string, indicating that reports are written to the current + * working directory of the Node.js process. + */ + directory: string; + /** + * Filename where the report is written. If set to the empty string, the output filename will be comprised + * of a timestamp, PID, and sequence number. The default value is the empty string. + */ + filename: string; + /** + * Returns a JavaScript Object representation of a diagnostic report for the running process. + * The report's JavaScript stack trace is taken from `err`, if present. + */ + getReport(err?: Error): object; + /** + * If true, a diagnostic report is generated on fatal errors, + * such as out of memory errors or failed C++ assertions. + * @default false + */ + reportOnFatalError: boolean; + /** + * If true, a diagnostic report is generated when the process + * receives the signal specified by process.report.signal. + * @default false + */ + reportOnSignal: boolean; + /** + * If true, a diagnostic report is generated on uncaught exception. + * @default false + */ + reportOnUncaughtException: boolean; + /** + * If true, a diagnostic report is generated without the environment variables. + * @default false + */ + excludeEnv: boolean; + /** + * The signal used to trigger the creation of a diagnostic report. + * @default 'SIGUSR2' + */ + signal: Signals; + /** + * Writes a diagnostic report to a file. If filename is not provided, the default filename + * includes the date, time, PID, and a sequence number. + * The report's JavaScript stack trace is taken from `err`, if present. + * + * If the value of filename is set to `'stdout'` or `'stderr'`, the report is written + * to the stdout or stderr of the process respectively. + * @param fileName Name of the file where the report is written. + * This should be a relative path, that will be appended to the directory specified in + * `process.report.directory`, or the current working directory of the Node.js process, + * if unspecified. + * @param err A custom error used for reporting the JavaScript stack. + * @return Filename of the generated report. + */ + writeReport(fileName?: string, err?: Error): string; + writeReport(err?: Error): string; + } + interface ResourceUsage { + fsRead: number; + fsWrite: number; + involuntaryContextSwitches: number; + ipcReceived: number; + ipcSent: number; + majorPageFault: number; + maxRSS: number; + minorPageFault: number; + sharedMemorySize: number; + signalsCount: number; + swappedOut: number; + systemCPUTime: number; + unsharedDataSize: number; + unsharedStackSize: number; + userCPUTime: number; + voluntaryContextSwitches: number; + } + interface EmitWarningOptions { + /** + * When `warning` is a `string`, `type` is the name to use for the _type_ of warning being emitted. + * + * @default 'Warning' + */ + type?: string | undefined; + /** + * A unique identifier for the warning instance being emitted. + */ + code?: string | undefined; + /** + * When `warning` is a `string`, `ctor` is an optional function used to limit the generated stack trace. + * + * @default process.emitWarning + */ + ctor?: Function | undefined; + /** + * Additional text to include with the error. + */ + detail?: string | undefined; + } + interface ProcessConfig { + readonly target_defaults: { + readonly cflags: any[]; + readonly default_configuration: string; + readonly defines: string[]; + readonly include_dirs: string[]; + readonly libraries: string[]; + }; + readonly variables: { + readonly clang: number; + readonly host_arch: string; + readonly node_install_npm: boolean; + readonly node_install_waf: boolean; + readonly node_prefix: string; + readonly node_shared_openssl: boolean; + readonly node_shared_v8: boolean; + readonly node_shared_zlib: boolean; + readonly node_use_dtrace: boolean; + readonly node_use_etw: boolean; + readonly node_use_openssl: boolean; + readonly target_arch: string; + readonly v8_no_strict_aliasing: number; + readonly v8_use_snapshot: boolean; + readonly visibility: string; + }; + } + interface Process extends EventEmitter { + /** + * The `process.stdout` property returns a stream connected to`stdout` (fd `1`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `1` refers to a file, in which case it is + * a `Writable` stream. + * + * For example, to copy `process.stdin` to `process.stdout`: + * + * ```js + * import { stdin, stdout } from 'node:process'; + * + * stdin.pipe(stdout); + * ``` + * + * `process.stdout` differs from other Node.js streams in important ways. See `note on process I/O` for more information. + */ + stdout: WriteStream & { + fd: 1; + }; + /** + * The `process.stderr` property returns a stream connected to`stderr` (fd `2`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `2` refers to a file, in which case it is + * a `Writable` stream. + * + * `process.stderr` differs from other Node.js streams in important ways. See `note on process I/O` for more information. + */ + stderr: WriteStream & { + fd: 2; + }; + /** + * The `process.stdin` property returns a stream connected to`stdin` (fd `0`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `0` refers to a file, in which case it is + * a `Readable` stream. + * + * For details of how to read from `stdin` see `readable.read()`. + * + * As a `Duplex` stream, `process.stdin` can also be used in "old" mode that + * is compatible with scripts written for Node.js prior to v0.10\. + * For more information see `Stream compatibility`. + * + * In "old" streams mode the `stdin` stream is paused by default, so one + * must call `process.stdin.resume()` to read from it. Note also that calling `process.stdin.resume()` itself would switch stream to "old" mode. + */ + stdin: ReadStream & { + fd: 0; + }; + /** + * The `process.argv` property returns an array containing the command-line + * arguments passed when the Node.js process was launched. The first element will + * be {@link execPath}. See `process.argv0` if access to the original value + * of `argv[0]` is needed. The second element will be the path to the JavaScript + * file being executed. If a [program entry point](https://nodejs.org/docs/latest-v26.x/api/cli.html#program-entry-point) was provided, the second element + * will be the absolute path to it. The remaining elements are additional command-line + * arguments. + * + * For example, assuming the following script for `process-args.js`: + * + * ```js + * import { argv } from 'node:process'; + * + * // print process.argv + * argv.forEach((val, index) => { + * console.log(`${index}: ${val}`); + * }); + * ``` + * + * Launching the Node.js process as: + * + * ```bash + * node process-args.js one two=three four + * ``` + * + * Would generate the output: + * + * ```text + * 0: /usr/local/bin/node + * 1: /Users/mjr/work/node/process-args.js + * 2: one + * 3: two=three + * 4: four + * ``` + * @since v0.1.27 + */ + argv: string[]; + /** + * The `process.argv0` property stores a read-only copy of the original value of`argv[0]` passed when Node.js starts. + * + * ```console + * $ bash -c 'exec -a customArgv0 ./node' + * > process.argv[0] + * '/Volumes/code/external/node/out/Release/node' + * > process.argv0 + * 'customArgv0' + * ``` + * @since v6.4.0 + */ + argv0: string; + /** + * The `process.execArgv` property returns the set of Node.js-specific command-line + * options passed when the Node.js process was launched. These options do not + * appear in the array returned by the {@link argv} property, and do not + * include the Node.js executable, the name of the script, or any options following + * the script name. These options are useful in order to spawn child processes with + * the same execution environment as the parent. + * + * ```bash + * node --icu-data-dir=./foo --require ./bar.js script.js --version + * ``` + * + * Results in `process.execArgv`: + * + * ```json + * ["--icu-data-dir=./foo", "--require", "./bar.js"] + * ``` + * + * And `process.argv`: + * + * ```json + * ["/usr/local/bin/node", "script.js", "--version"] + * ``` + * + * Refer to `Worker constructor` for the detailed behavior of worker + * threads with this property. + * @since v0.7.7 + */ + execArgv: string[]; + /** + * The `process.execPath` property returns the absolute pathname of the executable + * that started the Node.js process. Symbolic links, if any, are resolved. + * + * ```json + * "/usr/local/bin/node" + * ``` + * @since v0.1.100 + */ + execPath: string; + /** + * The `process.abort()` method causes the Node.js process to exit immediately and + * generate a core file. + * + * This feature is not available in `Worker` threads. + * @since v0.7.0 + */ + abort(): never; + /** + * The `process.addUncaughtExceptionCaptureCallback()` function adds a callback + * that will be invoked when an uncaught exception occurs, receiving the exception + * value as its first argument. + * + * Unlike `process.setUncaughtExceptionCaptureCallback()`, this function allows + * multiple callbacks to be registered and does not conflict with the + * [`domain`](https://nodejs.org/docs/latest-v26.x/api/domain.html) module. Callbacks are called in reverse order of registration + * (most recent first). If a callback returns `true`, subsequent callbacks + * and the default uncaught exception handling are skipped. + * + * ```js + * import process from 'node:process'; + * + * process.addUncaughtExceptionCaptureCallback((err) => { + * console.error('Caught exception:', err.message); + * return true; // Indicates exception was handled + * }); + * ``` + * @since v25.9.0 + */ + addUncaughtExceptionCaptureCallback(fn: (err: unknown) => boolean): void; + /** + * The `process.chdir()` method changes the current working directory of the + * Node.js process or throws an exception if doing so fails (for instance, if + * the specified `directory` does not exist). + * + * ```js + * import { chdir, cwd } from 'node:process'; + * + * console.log(`Starting directory: ${cwd()}`); + * try { + * chdir('/tmp'); + * console.log(`New directory: ${cwd()}`); + * } catch (err) { + * console.error(`chdir: ${err}`); + * } + * ``` + * + * This feature is not available in `Worker` threads. + * @since v0.1.17 + */ + chdir(directory: string): void; + /** + * The `process.cwd()` method returns the current working directory of the Node.js + * process. + * + * ```js + * import { cwd } from 'node:process'; + * + * console.log(`Current directory: ${cwd()}`); + * ``` + * @since v0.1.8 + */ + cwd(): string; + /** + * The port used by the Node.js debugger when enabled. + * + * ```js + * import process from 'node:process'; + * + * process.debugPort = 5858; + * ``` + * @since v0.7.2 + */ + debugPort: number; + /** + * The `process.dlopen()` method allows dynamically loading shared objects. It is primarily used by `require()` to load C++ Addons, and + * should not be used directly, except in special cases. In other words, `require()` should be preferred over `process.dlopen()` + * unless there are specific reasons such as custom dlopen flags or loading from ES modules. + * + * The `flags` argument is an integer that allows to specify dlopen behavior. See the `[os.constants.dlopen](https://nodejs.org/docs/latest-v26.x/api/os.html#dlopen-constants)` + * documentation for details. + * + * An important requirement when calling `process.dlopen()` is that the `module` instance must be passed. Functions exported by the C++ Addon + * are then accessible via `module.exports`. + * + * The example below shows how to load a C++ Addon, named `local.node`, that exports a `foo` function. All the symbols are loaded before the call returns, by passing the `RTLD_NOW` constant. + * In this example the constant is assumed to be available. + * + * ```js + * import { dlopen } from 'node:process'; + * import { constants } from 'node:os'; + * import { fileURLToPath } from 'node:url'; + * + * const module = { exports: {} }; + * dlopen(module, fileURLToPath(new URL('local.node', import.meta.url)), + * constants.dlopen.RTLD_NOW); + * module.exports.foo(); + * ``` + */ + dlopen(module: object, filename: string, flags?: number): void; + /** + * The `process.emitWarning()` method can be used to emit custom or application + * specific process warnings. These can be listened for by adding a handler to the `'warning'` event. + * + * ```js + * import { emitWarning } from 'node:process'; + * + * // Emit a warning using a string. + * emitWarning('Something happened!'); + * // Emits: (node: 56338) Warning: Something happened! + * ``` + * + * ```js + * import { emitWarning } from 'node:process'; + * + * // Emit a warning using a string and a type. + * emitWarning('Something Happened!', 'CustomWarning'); + * // Emits: (node:56338) CustomWarning: Something Happened! + * ``` + * + * ```js + * import { emitWarning } from 'node:process'; + * + * emitWarning('Something happened!', 'CustomWarning', 'WARN001'); + * // Emits: (node:56338) [WARN001] CustomWarning: Something happened! + * ```js + * + * In each of the previous examples, an `Error` object is generated internally by `process.emitWarning()` and passed through to the `'warning'` handler. + * + * ```js + * import process from 'node:process'; + * + * process.on('warning', (warning) => { + * console.warn(warning.name); // 'Warning' + * console.warn(warning.message); // 'Something happened!' + * console.warn(warning.code); // 'MY_WARNING' + * console.warn(warning.stack); // Stack trace + * console.warn(warning.detail); // 'This is some additional information' + * }); + * ``` + * + * If `warning` is passed as an `Error` object, it will be passed through to the `'warning'` event handler + * unmodified (and the optional `type`, `code` and `ctor` arguments will be ignored): + * + * ```js + * import { emitWarning } from 'node:process'; + * + * // Emit a warning using an Error object. + * const myWarning = new Error('Something happened!'); + * // Use the Error name property to specify the type name + * myWarning.name = 'CustomWarning'; + * myWarning.code = 'WARN001'; + * + * emitWarning(myWarning); + * // Emits: (node:56338) [WARN001] CustomWarning: Something happened! + * ``` + * + * A `TypeError` is thrown if `warning` is anything other than a string or `Error` object. + * + * While process warnings use `Error` objects, the process warning mechanism is not a replacement for normal error handling mechanisms. + * + * The following additional handling is implemented if the warning `type` is `'DeprecationWarning'`: + * * If the `--throw-deprecation` command-line flag is used, the deprecation warning is thrown as an exception rather than being emitted as an event. + * * If the `--no-deprecation` command-line flag is used, the deprecation warning is suppressed. + * * If the `--trace-deprecation` command-line flag is used, the deprecation warning is printed to `stderr` along with the full stack trace. + * @since v8.0.0 + * @param warning The warning to emit. + */ + emitWarning(warning: string | Error, ctor?: Function): void; + emitWarning(warning: string | Error, type?: string, ctor?: Function): void; + emitWarning(warning: string | Error, type?: string, code?: string, ctor?: Function): void; + emitWarning(warning: string | Error, options?: EmitWarningOptions): void; + /** + * The `process.env` property returns an object containing the user environment. + * See [`environ(7)`](http://man7.org/linux/man-pages/man7/environ.7.html). + * + * An example of this object looks like: + * + * ```json + * { + * "TERM": "xterm-256color", + * "SHELL": "/usr/local/bin/bash", + * "USER": "maciej", + * "PATH": "~/.bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin", + * "PWD": "/Users/maciej", + * "EDITOR": "vim", + * "SHLVL": "1", + * "HOME": "/Users/maciej", + * "LOGNAME": "maciej", + * "_": "/usr/local/bin/node" + * } + * ``` + * + * It is possible to modify this object, but such modifications will not be + * reflected outside the Node.js process, or (unless explicitly requested) + * to other `Worker` threads. + * In other words, the following example would not work: + * + * ```bash + * node -e 'process.env.foo = "bar"' && echo $foo + * ``` + * + * While the following will: + * + * ```js + * import { env } from 'node:process'; + * + * env.foo = 'bar'; + * console.log(env.foo); + * ``` + * + * Assigning a property on `process.env` will implicitly convert the value + * to a string. **This behavior is deprecated.** Future versions of Node.js may + * throw an error when the value is not a string, number, or boolean. + * + * ```js + * import { env } from 'node:process'; + * + * env.test = null; + * console.log(env.test); + * // => 'null' + * env.test = undefined; + * console.log(env.test); + * // => 'undefined' + * ``` + * + * Use `delete` to delete a property from `process.env`. + * + * ```js + * import { env } from 'node:process'; + * + * env.TEST = 1; + * delete env.TEST; + * console.log(env.TEST); + * // => undefined + * ``` + * + * On Windows operating systems, environment variables are case-insensitive. + * + * ```js + * import { env } from 'node:process'; + * + * env.TEST = 1; + * console.log(env.test); + * // => 1 + * ``` + * + * Unless explicitly specified when creating a `Worker` instance, + * each `Worker` thread has its own copy of `process.env`, based on its + * parent thread's `process.env`, or whatever was specified as the `env` option + * to the `Worker` constructor. Changes to `process.env` will not be visible + * across `Worker` threads, and only the main thread can make changes that + * are visible to the operating system or to native add-ons. On Windows, a copy of `process.env` on a `Worker` instance operates in a case-sensitive manner + * unlike the main thread. + * @since v0.1.27 + */ + env: ProcessEnv; + /** + * The `process.exit()` method instructs Node.js to terminate the process + * synchronously with an exit status of `code`. If `code` is omitted, exit uses + * either the 'success' code `0` or the value of `process.exitCode` if it has been + * set. Node.js will not terminate until all the `'exit'` event listeners are + * called. + * + * To exit with a 'failure' code: + * + * ```js + * import { exit } from 'node:process'; + * + * exit(1); + * ``` + * + * The shell that executed Node.js should see the exit code as `1`. + * + * Calling `process.exit()` will force the process to exit as quickly as possible + * even if there are still asynchronous operations pending that have not yet + * completed fully, including I/O operations to `process.stdout` and `process.stderr`. + * + * In most situations, it is not actually necessary to call `process.exit()` explicitly. The Node.js process will exit on its own _if there is no additional_ + * _work pending_ in the event loop. The `process.exitCode` property can be set to + * tell the process which exit code to use when the process exits gracefully. + * + * For instance, the following example illustrates a _misuse_ of the `process.exit()` method that could lead to data printed to stdout being + * truncated and lost: + * + * ```js + * import { exit } from 'node:process'; + * + * // This is an example of what *not* to do: + * if (someConditionNotMet()) { + * printUsageToStdout(); + * exit(1); + * } + * ``` + * + * The reason this is problematic is because writes to `process.stdout` in Node.js + * are sometimes _asynchronous_ and may occur over multiple ticks of the Node.js + * event loop. Calling `process.exit()`, however, forces the process to exit _before_ those additional writes to `stdout` can be performed. + * + * Rather than calling `process.exit()` directly, the code _should_ set the `process.exitCode` and allow the process to exit naturally by avoiding + * scheduling any additional work for the event loop: + * + * ```js + * import process from 'node:process'; + * + * // How to properly set the exit code while letting + * // the process exit gracefully. + * if (someConditionNotMet()) { + * printUsageToStdout(); + * process.exitCode = 1; + * } + * ``` + * + * If it is necessary to terminate the Node.js process due to an error condition, + * throwing an _uncaught_ error and allowing the process to terminate accordingly + * is safer than calling `process.exit()`. + * + * In `Worker` threads, this function stops the current thread rather + * than the current process. + * @since v0.1.13 + * @param [code=0] The exit code. For string type, only integer strings (e.g.,'1') are allowed. + */ + exit(code?: number | string | null): never; + /** + * A number which will be the process exit code, when the process either + * exits gracefully, or is exited via {@link exit} without specifying + * a code. + * + * Specifying a code to {@link exit} will override any + * previous setting of `process.exitCode`. + * @default undefined + * @since v0.11.8 + */ + exitCode: number | string | null | undefined; + finalization: { + /** + * This function registers a callback to be called when the process emits the `exit` event if the `ref` object was not garbage collected. + * If the object `ref` was garbage collected before the `exit` event is emitted, the callback will be removed from the finalization registry, and it will not be called on process exit. + * + * Inside the callback you can release the resources allocated by the `ref` object. + * Be aware that all limitations applied to the `beforeExit` event are also applied to the callback function, + * this means that there is a possibility that the callback will not be called under special circumstances. + * + * The idea of ​​this function is to help you free up resources when the starts process exiting, but also let the object be garbage collected if it is no longer being used. + * @param ref The reference to the resource that is being tracked. + * @param callback The callback function to be called when the resource is finalized. + * @since v22.5.0 + * @experimental + */ + register(ref: T, callback: (ref: T, event: "exit") => void): void; + /** + * This function behaves exactly like the `register`, except that the callback will be called when the process emits the `beforeExit` event if `ref` object was not garbage collected. + * + * Be aware that all limitations applied to the `beforeExit` event are also applied to the callback function, this means that there is a possibility that the callback will not be called under special circumstances. + * @param ref The reference to the resource that is being tracked. + * @param callback The callback function to be called when the resource is finalized. + * @since v22.5.0 + * @experimental + */ + registerBeforeExit(ref: T, callback: (ref: T, event: "beforeExit") => void): void; + /** + * This function remove the register of the object from the finalization registry, so the callback will not be called anymore. + * @param ref The reference to the resource that was registered previously. + * @since v22.5.0 + * @experimental + */ + unregister(ref: object): void; + }; + /** + * The `process.getActiveResourcesInfo()` method returns an array of strings containing + * the types of the active resources that are currently keeping the event loop alive. + * + * ```js + * import { getActiveResourcesInfo } from 'node:process'; + * import { setTimeout } from 'node:timers'; + + * console.log('Before:', getActiveResourcesInfo()); + * setTimeout(() => {}, 1000); + * console.log('After:', getActiveResourcesInfo()); + * // Prints: + * // Before: [ 'TTYWrap', 'TTYWrap', 'TTYWrap' ] + * // After: [ 'TTYWrap', 'TTYWrap', 'TTYWrap', 'Timeout' ] + * ``` + * @since v17.3.0, v16.14.0 + */ + getActiveResourcesInfo(): string[]; + /** + * Provides a way to load built-in modules in a globally available function. + * @param id ID of the built-in module being requested. + */ + getBuiltinModule(id: ID): BuiltInModule[ID]; + getBuiltinModule(id: string): object | undefined; + /** + * The `process.getgid()` method returns the numerical group identity of the + * process. (See [`getgid(2)`](http://man7.org/linux/man-pages/man2/getgid.2.html).) + * + * ```js + * import process from 'node:process'; + * + * if (process.getgid) { + * console.log(`Current gid: ${process.getgid()}`); + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v0.1.31 + */ + getgid?: () => number; + /** + * The `process.setgid()` method sets the group identity of the process. (See [`setgid(2)`](http://man7.org/linux/man-pages/man2/setgid.2.html).) The `id` can be passed as either a + * numeric ID or a group name + * string. If a group name is specified, this method blocks while resolving the + * associated numeric ID. + * + * ```js + * import process from 'node:process'; + * + * if (process.getgid && process.setgid) { + * console.log(`Current gid: ${process.getgid()}`); + * try { + * process.setgid(501); + * console.log(`New gid: ${process.getgid()}`); + * } catch (err) { + * console.log(`Failed to set gid: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v0.1.31 + * @param id The group name or ID + */ + setgid?: (id: number | string) => void; + /** + * The `process.getuid()` method returns the numeric user identity of the process. + * (See [`getuid(2)`](http://man7.org/linux/man-pages/man2/getuid.2.html).) + * + * ```js + * import process from 'node:process'; + * + * if (process.getuid) { + * console.log(`Current uid: ${process.getuid()}`); + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v0.1.28 + */ + getuid?: () => number; + /** + * The `process.setuid(id)` method sets the user identity of the process. (See [`setuid(2)`](http://man7.org/linux/man-pages/man2/setuid.2.html).) The `id` can be passed as either a + * numeric ID or a username string. + * If a username is specified, the method blocks while resolving the associated + * numeric ID. + * + * ```js + * import process from 'node:process'; + * + * if (process.getuid && process.setuid) { + * console.log(`Current uid: ${process.getuid()}`); + * try { + * process.setuid(501); + * console.log(`New uid: ${process.getuid()}`); + * } catch (err) { + * console.log(`Failed to set uid: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v0.1.28 + */ + setuid?: (id: number | string) => void; + /** + * The `process.geteuid()` method returns the numerical effective user identity of + * the process. (See [`geteuid(2)`](http://man7.org/linux/man-pages/man2/geteuid.2.html).) + * + * ```js + * import process from 'node:process'; + * + * if (process.geteuid) { + * console.log(`Current uid: ${process.geteuid()}`); + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v2.0.0 + */ + geteuid?: () => number; + /** + * The `process.seteuid()` method sets the effective user identity of the process. + * (See [`seteuid(2)`](http://man7.org/linux/man-pages/man2/seteuid.2.html).) The `id` can be passed as either a numeric ID or a username + * string. If a username is specified, the method blocks while resolving the + * associated numeric ID. + * + * ```js + * import process from 'node:process'; + * + * if (process.geteuid && process.seteuid) { + * console.log(`Current uid: ${process.geteuid()}`); + * try { + * process.seteuid(501); + * console.log(`New uid: ${process.geteuid()}`); + * } catch (err) { + * console.log(`Failed to set uid: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v2.0.0 + * @param id A user name or ID + */ + seteuid?: (id: number | string) => void; + /** + * The `process.getegid()` method returns the numerical effective group identity + * of the Node.js process. (See [`getegid(2)`](http://man7.org/linux/man-pages/man2/getegid.2.html).) + * + * ```js + * import process from 'node:process'; + * + * if (process.getegid) { + * console.log(`Current gid: ${process.getegid()}`); + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v2.0.0 + */ + getegid?: () => number; + /** + * The `process.setegid()` method sets the effective group identity of the process. + * (See [`setegid(2)`](http://man7.org/linux/man-pages/man2/setegid.2.html).) The `id` can be passed as either a numeric ID or a group + * name string. If a group name is specified, this method blocks while resolving + * the associated a numeric ID. + * + * ```js + * import process from 'node:process'; + * + * if (process.getegid && process.setegid) { + * console.log(`Current gid: ${process.getegid()}`); + * try { + * process.setegid(501); + * console.log(`New gid: ${process.getegid()}`); + * } catch (err) { + * console.log(`Failed to set gid: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v2.0.0 + * @param id A group name or ID + */ + setegid?: (id: number | string) => void; + /** + * The `process.getgroups()` method returns an array with the supplementary group + * IDs. POSIX leaves it unspecified if the effective group ID is included but + * Node.js ensures it always is. + * + * ```js + * import process from 'node:process'; + * + * if (process.getgroups) { + * console.log(process.getgroups()); // [ 16, 21, 297 ] + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v0.9.4 + */ + getgroups?: () => number[]; + /** + * The `process.setgroups()` method sets the supplementary group IDs for the + * Node.js process. This is a privileged operation that requires the Node.js + * process to have `root` or the `CAP_SETGID` capability. + * + * The `groups` array can contain numeric group IDs, group names, or both. + * + * ```js + * import process from 'node:process'; + * + * if (process.getgroups && process.setgroups) { + * try { + * process.setgroups([501]); + * console.log(process.getgroups()); // new groups + * } catch (err) { + * console.log(`Failed to set groups: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v0.9.4 + */ + setgroups?: (groups: ReadonlyArray) => void; + /** + * The `process.setUncaughtExceptionCaptureCallback()` function sets a function + * that will be invoked when an uncaught exception occurs, which will receive the + * exception value itself as its first argument. + * + * If such a function is set, the `'uncaughtException'` event will + * not be emitted. If `--abort-on-uncaught-exception` was passed from the + * command line or set through `v8.setFlagsFromString()`, the process will + * not abort. Actions configured to take place on exceptions such as report + * generations will be affected too + * + * To unset the capture function, `process.setUncaughtExceptionCaptureCallback(null)` may be used. Calling this + * method with a non-`null` argument while another capture function is set will + * throw an error. + * + * To register multiple callbacks that can coexist, use + * `process.addUncaughtExceptionCaptureCallback()` instead. + * @since v9.3.0 + */ + setUncaughtExceptionCaptureCallback(cb: ((err: unknown) => void) | null): void; + /** + * Indicates whether a callback has been set using {@link setUncaughtExceptionCaptureCallback}. + * @since v9.3.0 + */ + hasUncaughtExceptionCaptureCallback(): boolean; + /** + * The `process.sourceMapsEnabled` property returns whether the [Source Map v3](https://sourcemaps.info/spec.html) support for stack traces is enabled. + * @since v20.7.0 + * @experimental + */ + readonly sourceMapsEnabled: boolean; + /** + * This function enables or disables the [Source Map v3](https://sourcemaps.info/spec.html) support for + * stack traces. + * + * It provides same features as launching Node.js process with commandline options `--enable-source-maps`. + * + * Only source maps in JavaScript files that are loaded after source maps has been + * enabled will be parsed and loaded. + * @since v16.6.0, v14.18.0 + * @experimental + */ + setSourceMapsEnabled(value: boolean): void; + /** + * The `process.version` property contains the Node.js version string. + * + * ```js + * import { version } from 'node:process'; + * + * console.log(`Version: ${version}`); + * // Version: v14.8.0 + * ``` + * + * To get the version string without the prepended _v_, use`process.versions.node`. + * @since v0.1.3 + */ + readonly version: string; + /** + * The `process.versions` property returns an object listing the version strings of + * Node.js and its dependencies. `process.versions.modules` indicates the current + * ABI version, which is increased whenever a C++ API changes. Node.js will refuse + * to load modules that were compiled against a different module ABI version. + * + * ```js + * import { versions } from 'node:process'; + * + * console.log(versions); + * ``` + * + * Will generate an object similar to: + * + * ```console + * { node: '26.0.0-pre', + * acorn: '8.15.0', + * ada: '3.4.1', + * amaro: '1.1.5', + * ares: '1.34.6', + * brotli: '1.2.0', + * merve: '1.0.0', + * cldr: '48.0', + * icu: '78.2', + * llhttp: '9.3.0', + * modules: '144', + * napi: '10', + * nbytes: '0.1.1', + * ncrypto: '0.0.1', + * nghttp2: '1.68.0', + * nghttp3: '', + * ngtcp2: '', + * openssl: '3.5.4', + * simdjson: '4.2.4', + * simdutf: '7.3.3', + * sqlite: '3.51.2', + * tz: '2025c', + * undici: '7.18.2', + * unicode: '17.0', + * uv: '1.51.0', + * uvwasi: '0.0.23', + * v8: '14.3.127.18-node.10', + * zlib: '1.3.1-e00f703', + * zstd: '1.5.7' } + * ``` + * @since v0.2.0 + */ + readonly versions: ProcessVersions; + /** + * The `process.config` property returns a frozen `Object` containing the + * JavaScript representation of the configure options used to compile the current + * Node.js executable. This is the same as the `config.gypi` file that was produced + * when running the `./configure` script. + * + * An example of the possible output looks like: + * + * ```json + * { + * "target_defaults": + * { "cflags": [], + * "default_configuration": "Release", + * "defines": [], + * "include_dirs": [], + * "libraries": [] }, + * "variables": + * { + * "host_arch": "x64", + * "napi_build_version": 5, + * "node_install_npm": "true", + * "node_prefix": "", + * "node_shared_cares": "false", + * "node_shared_http_parser": "false", + * "node_shared_libuv": "false", + * "node_shared_zlib": "false", + * "node_use_openssl": "true", + * "node_shared_openssl": "false", + * "target_arch": "x64", + * "v8_use_snapshot": 1 + * } + * } + * ``` + * @since v0.7.7 + */ + readonly config: ProcessConfig; + /** + * The `process.kill()` method sends the `signal` to the process identified by`pid`. + * + * Signal names are strings such as `'SIGINT'` or `'SIGHUP'`. See `Signal Events` and [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for more information. + * + * This method will throw an error if the target `pid` does not exist. As a special + * case, a signal of `0` can be used to test for the existence of a process. + * Windows platforms will throw an error if the `pid` is used to kill a process + * group. + * + * Even though the name of this function is `process.kill()`, it is really just a + * signal sender, like the `kill` system call. The signal sent may do something + * other than kill the target process. + * + * ```js + * import process, { kill } from 'node:process'; + * + * process.on('SIGHUP', () => { + * console.log('Got SIGHUP signal.'); + * }); + * + * setTimeout(() => { + * console.log('Exiting.'); + * process.exit(0); + * }, 100); + * + * kill(process.pid, 'SIGHUP'); + * ``` + * + * When `SIGUSR1` is received by a Node.js process, Node.js will start the + * debugger. See `Signal Events`. + * @since v0.0.6 + * @param pid A process ID + * @param [signal='SIGTERM'] The signal to send, either as a string or number. + */ + kill(pid: number, signal?: string | number): true; + /** + * Loads the environment configuration from a `.env` file into `process.env`. If + * the file is not found, error will be thrown. + * + * To load a specific .env file by specifying its path, use the following code: + * + * ```js + * import { loadEnvFile } from 'node:process'; + * + * loadEnvFile('./development.env') + * ``` + * @since v20.12.0 + * @param path The path to the .env file + */ + loadEnvFile(path?: PathLike): void; + /** + * The `process.pid` property returns the PID of the process. + * + * ```js + * import { pid } from 'node:process'; + * + * console.log(`This process is pid ${pid}`); + * ``` + * @since v0.1.15 + */ + readonly pid: number; + /** + * The `process.ppid` property returns the PID of the parent of the + * current process. + * + * ```js + * import { ppid } from 'node:process'; + * + * console.log(`The parent process is pid ${ppid}`); + * ``` + * @since v9.2.0, v8.10.0, v6.13.0 + */ + readonly ppid: number; + /** + * The `process.threadCpuUsage()` method returns the user and system CPU time usage of + * the current worker thread, in an object with properties `user` and `system`, whose + * values are microsecond values (millionth of a second). + * + * The result of a previous call to `process.threadCpuUsage()` can be passed as the + * argument to the function, to get a diff reading. + * @since v23.9.0 + * @param previousValue A previous return value from calling + * `process.threadCpuUsage()` + */ + threadCpuUsage(previousValue?: CpuUsage): CpuUsage; + /** + * The `process.title` property returns the current process title (i.e. returns + * the current value of `ps`). Assigning a new value to `process.title` modifies + * the current value of `ps`. + * + * When a new value is assigned, different platforms will impose different maximum + * length restrictions on the title. Usually such restrictions are quite limited. + * For instance, on Linux and macOS, `process.title` is limited to the size of the + * binary name plus the length of the command-line arguments because setting the `process.title` overwrites the `argv` memory of the process. Node.js v0.8 + * allowed for longer process title strings by also overwriting the `environ` memory but that was potentially insecure and confusing in some (rather obscure) + * cases. + * + * Assigning a value to `process.title` might not result in an accurate label + * within process manager applications such as macOS Activity Monitor or Windows + * Services Manager. + * @since v0.1.104 + */ + title: string; + /** + * The operating system CPU architecture for which the Node.js binary was compiled. + * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`, + * `'mipsel'`, `'ppc64'`, `'riscv64'`, `'s390x'`, and `'x64'`. + * + * ```js + * import { arch } from 'node:process'; + * + * console.log(`This processor architecture is ${arch}`); + * ``` + * @since v0.5.0 + */ + readonly arch: Architecture; + /** + * The `process.platform` property returns a string identifying the operating + * system platform for which the Node.js binary was compiled. + * + * Currently possible values are: + * + * * `'aix'` + * * `'darwin'` + * * `'freebsd'` + * * `'linux'` + * * `'openbsd'` + * * `'sunos'` + * * `'win32'` + * + * ```js + * import { platform } from 'node:process'; + * + * console.log(`This platform is ${platform}`); + * ``` + * + * The value `'android'` may also be returned if the Node.js is built on the + * Android operating system. However, Android support in Node.js [is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os). + * @since v0.1.16 + */ + readonly platform: Platform; + /** + * The `process.mainModule` property provides an alternative way of retrieving `require.main`. The difference is that if the main module changes at + * runtime, `require.main` may still refer to the original main module in + * modules that were required before the change occurred. Generally, it's + * safe to assume that the two refer to the same module. + * + * As with `require.main`, `process.mainModule` will be `undefined` if there + * is no entry script. + * @since v0.1.17 + * @deprecated Since v14.0.0 - Use `main` instead. + */ + mainModule?: Module; + memoryUsage: MemoryUsageFn; + /** + * Gets the amount of memory available to the process (in bytes) based on + * limits imposed by the OS. If there is no such constraint, or the constraint + * is unknown, `0` is returned. + * + * See [`uv_get_constrained_memory`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_get_constrained_memory) for more + * information. + * @since v19.6.0, v18.15.0 + */ + constrainedMemory(): number; + /** + * Gets the amount of free memory that is still available to the process (in bytes). + * See [`uv_get_available_memory`](https://nodejs.org/docs/latest-v26.x/api/process.html#processavailablememory) for more information. + * @since v20.13.0 + */ + availableMemory(): number; + /** + * The `process.cpuUsage()` method returns the user and system CPU time usage of + * the current process, in an object with properties `user` and `system`, whose + * values are microsecond values (millionth of a second). These values measure time + * spent in user and system code respectively, and may end up being greater than + * actual elapsed time if multiple CPU cores are performing work for this process. + * + * The result of a previous call to `process.cpuUsage()` can be passed as the + * argument to the function, to get a diff reading. + * + * ```js + * import { cpuUsage } from 'node:process'; + * + * const startUsage = cpuUsage(); + * // { user: 38579, system: 6986 } + * + * // spin the CPU for 500 milliseconds + * const now = Date.now(); + * while (Date.now() - now < 500); + * + * console.log(cpuUsage(startUsage)); + * // { user: 514883, system: 11226 } + * ``` + * @since v6.1.0 + * @param previousValue A previous return value from calling `process.cpuUsage()` + */ + cpuUsage(previousValue?: CpuUsage): CpuUsage; + /** + * `process.nextTick()` adds `callback` to the "next tick queue". This queue is + * fully drained after the current operation on the JavaScript stack runs to + * completion and before the event loop is allowed to continue. It's possible to + * create an infinite loop if one were to recursively call `process.nextTick()`. + * See the [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#process-nexttick) guide for more background. + * + * ```js + * import { nextTick } from 'node:process'; + * + * console.log('start'); + * nextTick(() => { + * console.log('nextTick callback'); + * }); + * console.log('scheduled'); + * // Output: + * // start + * // scheduled + * // nextTick callback + * ``` + * + * This is important when developing APIs in order to give users the opportunity + * to assign event handlers _after_ an object has been constructed but before any + * I/O has occurred: + * + * ```js + * import { nextTick } from 'node:process'; + * + * function MyThing(options) { + * this.setupOptions(options); + * + * nextTick(() => { + * this.startDoingStuff(); + * }); + * } + * + * const thing = new MyThing(); + * thing.getReadyForStuff(); + * + * // thing.startDoingStuff() gets called now, not before. + * ``` + * + * It is very important for APIs to be either 100% synchronous or 100% + * asynchronous. Consider this example: + * + * ```js + * // WARNING! DO NOT USE! BAD UNSAFE HAZARD! + * function maybeSync(arg, cb) { + * if (arg) { + * cb(); + * return; + * } + * + * fs.stat('file', cb); + * } + * ``` + * + * This API is hazardous because in the following case: + * + * ```js + * const maybeTrue = Math.random() > 0.5; + * + * maybeSync(maybeTrue, () => { + * foo(); + * }); + * + * bar(); + * ``` + * + * It is not clear whether `foo()` or `bar()` will be called first. + * + * The following approach is much better: + * + * ```js + * import { nextTick } from 'node:process'; + * + * function definitelyAsync(arg, cb) { + * if (arg) { + * nextTick(cb); + * return; + * } + * + * fs.stat('file', cb); + * } + * ``` + * @since v0.1.26 + * @param args Additional arguments to pass when invoking the `callback` + */ + nextTick(callback: Function, ...args: any[]): void; + /** + * The process.noDeprecation property indicates whether the --no-deprecation flag is set on the current Node.js process. + * See the documentation for the ['warning' event](https://nodejs.org/docs/latest/api/process.html#event-warning) and the [emitWarning()](https://nodejs.org/docs/latest/api/process.html#processemitwarningwarning-type-code-ctor) method for more information about this flag's behavior. + */ + noDeprecation?: boolean; + /** + * This API is available through the [--permission](https://nodejs.org/api/cli.html#--permission) flag. + * + * `process.permission` is an object whose methods are used to manage permissions for the current process. + * Additional documentation is available in the [Permission Model](https://nodejs.org/api/permissions.html#permission-model). + * @since v20.0.0 + */ + permission: ProcessPermission; + /** + * The `process.release` property returns an `Object` containing metadata related + * to the current release, including URLs for the source tarball and headers-only + * tarball. + * + * `process.release` contains the following properties: + * + * ```json + * { + * "name": "node", + * "lts": "Hydrogen", + * "sourceUrl": "https://nodejs.org/download/release/v18.12.0/node-v18.12.0.tar.gz", + * "headersUrl": "https://nodejs.org/download/release/v18.12.0/node-v18.12.0-headers.tar.gz", + * "libUrl": "https://nodejs.org/download/release/v18.12.0/win-x64/node.lib" + * } + * ``` + * + * In custom builds from non-release versions of the source tree, only the `name` property may be present. The additional properties should not be + * relied upon to exist. + * @since v3.0.0 + */ + readonly release: ProcessRelease; + readonly features: ProcessFeatures; + /** + * The `process.traceProcessWarnings` property indicates whether the `--trace-warnings` flag + * is set on the current Node.js process. This property allows programmatic control over the + * tracing of warnings, enabling or disabling stack traces for warnings at runtime. + * + * ```js + * // Enable trace warnings + * process.traceProcessWarnings = true; + * + * // Emit a warning with a stack trace + * process.emitWarning('Warning with stack trace'); + * + * // Disable trace warnings + * process.traceProcessWarnings = false; + * ``` + * @since v6.10.0 + */ + traceProcessWarnings: boolean; + /** + * `process.umask()` returns the Node.js process's file mode creation mask. Child + * processes inherit the mask from the parent process. + * @since v0.1.19 + * @deprecated Calling `process.umask()` with no argument causes the process-wide umask to be written twice. This introduces a race condition between threads, and is a potential + * security vulnerability. There is no safe, cross-platform alternative API. + */ + umask(): number; + /** + * Can only be set if not in worker thread. + */ + umask(mask: string | number): number; + /** + * The `process.uptime()` method returns the number of seconds the current Node.js + * process has been running. + * + * The return value includes fractions of a second. Use `Math.floor()` to get whole + * seconds. + * @since v0.5.0 + */ + uptime(): number; + hrtime: HRTime; + /** + * If the Node.js process was spawned with an IPC channel, the process.channel property is a reference to the IPC channel. + * If no IPC channel exists, this property is undefined. + * @since v7.1.0 + */ + channel?: Control; + /** + * If Node.js is spawned with an IPC channel, the `process.send()` method can be + * used to send messages to the parent process. Messages will be received as a `'message'` event on the parent's `ChildProcess` object. + * + * If Node.js was not spawned with an IPC channel, `process.send` will be `undefined`. + * + * The message goes through serialization and parsing. The resulting message might + * not be the same as what is originally sent. + * @since v0.5.9 + * @param options used to parameterize the sending of certain types of handles. `options` supports the following properties: + */ + send?( + message: any, + sendHandle?: SendHandle, + options?: MessageOptions, + callback?: (error: Error | null) => void, + ): boolean; + send?( + message: any, + sendHandle: SendHandle, + callback?: (error: Error | null) => void, + ): boolean; + send?( + message: any, + callback: (error: Error | null) => void, + ): boolean; + /** + * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.disconnect()` method will close the + * IPC channel to the parent process, allowing the child process to exit gracefully + * once there are no other connections keeping it alive. + * + * The effect of calling `process.disconnect()` is the same as calling `ChildProcess.disconnect()` from the parent process. + * + * If the Node.js process was not spawned with an IPC channel, `process.disconnect()` will be `undefined`. + * @since v0.7.2 + */ + disconnect?(): void; + /** + * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.connected` property will return `true` so long as the IPC + * channel is connected and will return `false` after `process.disconnect()` is called. + * + * Once `process.connected` is `false`, it is no longer possible to send messages + * over the IPC channel using `process.send()`. + * @since v0.7.2 + */ + connected: boolean; + /** + * The `process.allowedNodeEnvironmentFlags` property is a special, + * read-only `Set` of flags allowable within the `NODE_OPTIONS` environment variable. + * + * `process.allowedNodeEnvironmentFlags` extends `Set`, but overrides `Set.prototype.has` to recognize several different possible flag + * representations. `process.allowedNodeEnvironmentFlags.has()` will + * return `true` in the following cases: + * + * * Flags may omit leading single (`-`) or double (`--`) dashes; e.g., `inspect-brk` for `--inspect-brk`, or `r` for `-r`. + * * Flags passed through to V8 (as listed in `--v8-options`) may replace + * one or more _non-leading_ dashes for an underscore, or vice-versa; + * e.g., `--perf_basic_prof`, `--perf-basic-prof`, `--perf_basic-prof`, + * etc. + * * Flags may contain one or more equals (`=`) characters; all + * characters after and including the first equals will be ignored; + * e.g., `--stack-trace-limit=100`. + * * Flags _must_ be allowable within `NODE_OPTIONS`. + * + * When iterating over `process.allowedNodeEnvironmentFlags`, flags will + * appear only _once_; each will begin with one or more dashes. Flags + * passed through to V8 will contain underscores instead of non-leading + * dashes: + * + * ```js + * import { allowedNodeEnvironmentFlags } from 'node:process'; + * + * allowedNodeEnvironmentFlags.forEach((flag) => { + * // -r + * // --inspect-brk + * // --abort_on_uncaught_exception + * // ... + * }); + * ``` + * + * The methods `add()`, `clear()`, and `delete()` of`process.allowedNodeEnvironmentFlags` do nothing, and will fail + * silently. + * + * If Node.js was compiled _without_ `NODE_OPTIONS` support (shown in {@link config}), `process.allowedNodeEnvironmentFlags` will + * contain what _would have_ been allowable. + * @since v10.10.0 + */ + allowedNodeEnvironmentFlags: ReadonlySet; + /** + * `process.report` is an object whose methods are used to generate diagnostic reports for the current process. + * Additional documentation is available in the [report documentation](https://nodejs.org/docs/latest-v26.x/api/report.html). + * @since v11.8.0 + */ + report: ProcessReport; + /** + * ```js + * import { resourceUsage } from 'node:process'; + * + * console.log(resourceUsage()); + * /* + * Will output: + * { + * userCPUTime: 82872, + * systemCPUTime: 4143, + * maxRSS: 33164, + * sharedMemorySize: 0, + * unsharedDataSize: 0, + * unsharedStackSize: 0, + * minorPageFault: 2469, + * majorPageFault: 0, + * swappedOut: 0, + * fsRead: 0, + * fsWrite: 8, + * ipcSent: 0, + * ipcReceived: 0, + * signalsCount: 0, + * voluntaryContextSwitches: 79, + * involuntaryContextSwitches: 1 + * } + * + * ``` + * @since v12.6.0 + * @return the resource usage for the current process. All of these values come from the `uv_getrusage` call which returns a [`uv_rusage_t` struct][uv_rusage_t]. + */ + resourceUsage(): ResourceUsage; + /** + * The initial value of `process.throwDeprecation` indicates whether the `--throw-deprecation` flag is set on the current Node.js process. `process.throwDeprecation` + * is mutable, so whether or not deprecation warnings result in errors may be altered at runtime. See the documentation for the 'warning' event and the emitWarning() + * method for more information. + * + * ```bash + * $ node --throw-deprecation -p "process.throwDeprecation" + * true + * $ node -p "process.throwDeprecation" + * undefined + * $ node + * > process.emitWarning('test', 'DeprecationWarning'); + * undefined + * > (node:26598) DeprecationWarning: test + * > process.throwDeprecation = true; + * true + * > process.emitWarning('test', 'DeprecationWarning'); + * Thrown: + * [DeprecationWarning: test] { name: 'DeprecationWarning' } + * ``` + * @since v0.9.12 + */ + throwDeprecation: boolean; + /** + * The `process.traceDeprecation` property indicates whether the `--trace-deprecation` flag is set on the current Node.js process. See the + * documentation for the `'warning' event` and the `emitWarning() method` for more information about this + * flag's behavior. + * @since v0.8.0 + */ + traceDeprecation: boolean; + /** + * An object is "refable" if it implements the Node.js "Refable protocol". + * Specifically, this means that the object implements the `Symbol.for('nodejs.ref')` + * and `Symbol.for('nodejs.unref')` methods. "Ref'd" objects will keep the Node.js + * event loop alive, while "unref'd" objects will not. Historically, this was + * implemented by using `ref()` and `unref()` methods directly on the objects. + * This pattern, however, is being deprecated in favor of the "Refable protocol" + * in order to better support Web Platform API types whose APIs cannot be modified + * to add `ref()` and `unref()` methods but still need to support that behavior. + * @since v22.14.0 + * @experimental + * @param maybeRefable An object that may be "refable". + */ + ref(maybeRefable: any): void; + /** + * An object is "unrefable" if it implements the Node.js "Refable protocol". + * Specifically, this means that the object implements the `Symbol.for('nodejs.ref')` + * and `Symbol.for('nodejs.unref')` methods. "Ref'd" objects will keep the Node.js + * event loop alive, while "unref'd" objects will not. Historically, this was + * implemented by using `ref()` and `unref()` methods directly on the objects. + * This pattern, however, is being deprecated in favor of the "Refable protocol" + * in order to better support Web Platform API types whose APIs cannot be modified + * to add `ref()` and `unref()` methods but still need to support that behavior. + * @since v22.14.0 + * @experimental + * @param maybeRefable An object that may be "unref'd". + */ + unref(maybeRefable: any): void; + /** + * Replaces the current process with a new process. + * + * This is achieved by using the `execve` POSIX function and therefore no memory or other + * resources from the current process are preserved, except for the standard input, + * standard output and standard error file descriptor. + * + * All other resources are discarded by the system when the processes are swapped, without triggering + * any exit or close events and without running any cleanup handler. + * + * On success, all other resources are discarded by the system when the + * processes are swapped, without triggering any exit or close events, without + * running any JavaScript cleanup handler (for example `process.on('exit')`), + * and without invoking native `AtExit` callbacks registered through the + * embedder API. Callers that need to run cleanup logic should do so before + * calling `process.execve()`. + * + * This function does not return on success. If the underlying `execve(2)` + * system call fails, an `Error` is thrown whose `code` property is set to the + * corresponding `errno` string (for example, `'ENOENT'` when `file` does not + * exist), with `syscall` set to `'execve'` and `path` set to `file`. When + * `execve(2)` fails the current process continues to run with its state + * unchanged, so a caller may handle the error and take another action. + * + * This function is not available on Windows or IBM i. + * @since v22.15.0 + * @experimental + * @param file The name or path of the executable file to run. + * @param args List of string arguments. No argument can contain a null-byte (`\u0000`). + * @param env Environment key-value pairs. + * No key or value can contain a null-byte (`\u0000`). + * **Default:** `process.env`. + */ + execve?(file: string, args?: readonly string[], env?: ProcessEnv): never; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: ProcessEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: ProcessEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: ProcessEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: ProcessEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: ProcessEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: ProcessEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: ProcessEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: ProcessEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: ProcessEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: ProcessEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: ProcessEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + } + } + export = process; +} +declare module "process" { + import process = require("node:process"); + export = process; +} diff --git a/node_modules/@types/node/punycode.d.ts b/node_modules/@types/node/punycode.d.ts new file mode 100644 index 0000000..87fdec9 --- /dev/null +++ b/node_modules/@types/node/punycode.d.ts @@ -0,0 +1,89 @@ +declare module "node:punycode" { + /** + * The `punycode.decode()` method converts a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only + * characters to the equivalent string of Unicode codepoints. + * + * ```js + * punycode.decode('maana-pta'); // 'mañana' + * punycode.decode('--dqo34k'); // '☃-⌘' + * ``` + * @since v0.5.1 + */ + function decode(string: string): string; + /** + * The `punycode.encode()` method converts a string of Unicode codepoints to a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only characters. + * + * ```js + * punycode.encode('mañana'); // 'maana-pta' + * punycode.encode('☃-⌘'); // '--dqo34k' + * ``` + * @since v0.5.1 + */ + function encode(string: string): string; + /** + * The `punycode.toUnicode()` method converts a string representing a domain name + * containing [Punycode](https://tools.ietf.org/html/rfc3492) encoded characters into Unicode. Only the [Punycode](https://tools.ietf.org/html/rfc3492) encoded parts of the domain name are be + * converted. + * + * ```js + * // decode domain names + * punycode.toUnicode('xn--maana-pta.com'); // 'mañana.com' + * punycode.toUnicode('xn----dqo34k.com'); // '☃-⌘.com' + * punycode.toUnicode('example.com'); // 'example.com' + * ``` + * @since v0.6.1 + */ + function toUnicode(domain: string): string; + /** + * The `punycode.toASCII()` method converts a Unicode string representing an + * Internationalized Domain Name to [Punycode](https://tools.ietf.org/html/rfc3492). Only the non-ASCII parts of the + * domain name will be converted. Calling `punycode.toASCII()` on a string that + * already only contains ASCII characters will have no effect. + * + * ```js + * // encode domain names + * punycode.toASCII('mañana.com'); // 'xn--maana-pta.com' + * punycode.toASCII('☃-⌘.com'); // 'xn----dqo34k.com' + * punycode.toASCII('example.com'); // 'example.com' + * ``` + * @since v0.6.1 + */ + function toASCII(domain: string): string; + /** + * @deprecated since v7.0.0 + * The version of the punycode module bundled in Node.js is being deprecated. + * In a future major version of Node.js this module will be removed. + * Users currently depending on the punycode module should switch to using + * the userland-provided Punycode.js module instead. + */ + const ucs2: ucs2; + interface ucs2 { + /** + * @deprecated since v7.0.0 + * The version of the punycode module bundled in Node.js is being deprecated. + * In a future major version of Node.js this module will be removed. + * Users currently depending on the punycode module should switch to using + * the userland-provided Punycode.js module instead. + */ + decode(string: string): number[]; + /** + * @deprecated since v7.0.0 + * The version of the punycode module bundled in Node.js is being deprecated. + * In a future major version of Node.js this module will be removed. + * Users currently depending on the punycode module should switch to using + * the userland-provided Punycode.js module instead. + */ + encode(codePoints: readonly number[]): string; + } + /** + * @deprecated since v7.0.0 + * The version of the punycode module bundled in Node.js is being deprecated. + * In a future major version of Node.js this module will be removed. + * Users currently depending on the punycode module should switch to using + * the userland-provided Punycode.js module instead. + */ + const version: string; +} +declare module "punycode" { + export * from "node:punycode"; +} diff --git a/node_modules/@types/node/querystring.d.ts b/node_modules/@types/node/querystring.d.ts new file mode 100644 index 0000000..6d821a4 --- /dev/null +++ b/node_modules/@types/node/querystring.d.ts @@ -0,0 +1,139 @@ +declare module "node:querystring" { + interface StringifyOptions { + /** + * The function to use when converting URL-unsafe characters to percent-encoding in the query string. + * @default `querystring.escape()` + */ + encodeURIComponent?: ((str: string) => string) | undefined; + } + interface ParseOptions { + /** + * Specifies the maximum number of keys to parse. Specify `0` to remove key counting limitations. + * @default 1000 + */ + maxKeys?: number | undefined; + /** + * The function to use when decoding percent-encoded characters in the query string. + * @default `querystring.unescape()` + */ + decodeURIComponent?: ((str: string) => string) | undefined; + } + interface ParsedUrlQuery extends NodeJS.Dict {} + interface ParsedUrlQueryInput extends + NodeJS.Dict< + | string + | number + | boolean + | bigint + | ReadonlyArray + | null + > + {} + /** + * The `querystring.stringify()` method produces a URL query string from a + * given `obj` by iterating through the object's "own properties". + * + * It serializes the following types of values passed in `obj`: [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | + * [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) | + * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) | + * [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) | + * [string\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | + * [number\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) | + * [bigint\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) | + * [boolean\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) The numeric values must be finite. Any other input values will be coerced to + * empty strings. + * + * ```js + * querystring.stringify({ foo: 'bar', baz: ['qux', 'quux'], corge: '' }); + * // Returns 'foo=bar&baz=qux&baz=quux&corge=' + * + * querystring.stringify({ foo: 'bar', baz: 'qux' }, ';', ':'); + * // Returns 'foo:bar;baz:qux' + * ``` + * + * By default, characters requiring percent-encoding within the query string will + * be encoded as UTF-8\. If an alternative encoding is required, then an alternative `encodeURIComponent` option will need to be specified: + * + * ```js + * // Assuming gbkEncodeURIComponent function already exists, + * + * querystring.stringify({ w: '中文', foo: 'bar' }, null, null, + * { encodeURIComponent: gbkEncodeURIComponent }); + * ``` + * @since v0.1.25 + * @param obj The object to serialize into a URL query string + * @param [sep='&'] The substring used to delimit key and value pairs in the query string. + * @param [eq='='] . The substring used to delimit keys and values in the query string. + */ + function stringify(obj?: ParsedUrlQueryInput, sep?: string, eq?: string, options?: StringifyOptions): string; + /** + * The `querystring.parse()` method parses a URL query string (`str`) into a + * collection of key and value pairs. + * + * For example, the query string `'foo=bar&abc=xyz&abc=123'` is parsed into: + * + * ```json + * { + * "foo": "bar", + * "abc": ["xyz", "123"] + * } + * ``` + * + * The object returned by the `querystring.parse()` method _does not_ prototypically inherit from the JavaScript `Object`. This means that typical `Object` methods such as `obj.toString()`, + * `obj.hasOwnProperty()`, and others + * are not defined and _will not work_. + * + * By default, percent-encoded characters within the query string will be assumed + * to use UTF-8 encoding. If an alternative character encoding is used, then an + * alternative `decodeURIComponent` option will need to be specified: + * + * ```js + * // Assuming gbkDecodeURIComponent function already exists... + * + * querystring.parse('w=%D6%D0%CE%C4&foo=bar', null, null, + * { decodeURIComponent: gbkDecodeURIComponent }); + * ``` + * @since v0.1.25 + * @param str The URL query string to parse + * @param [sep='&'] The substring used to delimit key and value pairs in the query string. + * @param [eq='='] The substring used to delimit keys and values in the query string. + */ + function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery; + /** + * The querystring.encode() function is an alias for querystring.stringify(). + */ + const encode: typeof stringify; + /** + * The querystring.decode() function is an alias for querystring.parse(). + */ + const decode: typeof parse; + /** + * The `querystring.escape()` method performs URL percent-encoding on the given `str` in a manner that is optimized for the specific requirements of URL + * query strings. + * + * The `querystring.escape()` method is used by `querystring.stringify()` and is + * generally not expected to be used directly. It is exported primarily to allow + * application code to provide a replacement percent-encoding implementation if + * necessary by assigning `querystring.escape` to an alternative function. + * @since v0.1.25 + */ + function escape(str: string): string; + /** + * The `querystring.unescape()` method performs decoding of URL percent-encoded + * characters on the given `str`. + * + * The `querystring.unescape()` method is used by `querystring.parse()` and is + * generally not expected to be used directly. It is exported primarily to allow + * application code to provide a replacement decoding implementation if + * necessary by assigning `querystring.unescape` to an alternative function. + * + * By default, the `querystring.unescape()` method will attempt to use the + * JavaScript built-in `decodeURIComponent()` method to decode. If that fails, + * a safer equivalent that does not throw on malformed URLs will be used. + * @since v0.1.25 + */ + function unescape(str: string): string; +} +declare module "querystring" { + export * from "node:querystring"; +} diff --git a/node_modules/@types/node/quic.d.ts b/node_modules/@types/node/quic.d.ts new file mode 100644 index 0000000..e48ea27 --- /dev/null +++ b/node_modules/@types/node/quic.d.ts @@ -0,0 +1,2191 @@ +declare module "node:quic" { + import { NonSharedBuffer } from "node:buffer"; + import { KeyObject, X509Certificate } from "node:crypto"; + import { FileHandle } from "node:fs/promises"; + import { BlockList, SocketAddress } from "node:net"; + import { Writer } from "node:stream/iter"; + import { CertificateCompressionAlgorithm, EphemeralKeyInfo } from "node:tls"; + /** + * @since v23.8.0 + */ + type OnSessionCallback = (this: QuicEndpoint, session: QuicSession) => void; + /** + * @since v23.8.0 + */ + type OnStreamCallback = (this: QuicSession, stream: QuicStream) => void; + /** + * @since v23.8.0 + */ + type OnDatagramCallback = (this: QuicSession, datagram: NodeJS.NonSharedUint8Array, early: boolean) => void; + /** + * @since v23.8.0 + */ + type OnDatagramStatusCallback = ( + this: QuicSession, + id: bigint, + status: "acknowledged" | "lost" | "abandoned", + ) => void; + /** + * @since v23.8.0 + */ + type OnApplicationCallback = (this: QuicSession, applicationoptions: SessionApplicationOptions) => void; + /** + * @since v23.8.0 + */ + type OnPathValidationCallback = ( + this: QuicSession, + result: "success" | "failure" | "aborted", + newLocalAddress: SocketAddress, + newRemoteAddress: SocketAddress, + oldLocalAddress: SocketAddress | null, + oldRemoteAddress: SocketAddress | null, + preferredAddress: boolean, + ) => void; + /** + * @since v23.8.0 + */ + type OnSessionTicketCallback = (this: QuicSession, ticket: object) => void; + /** + * @since v23.8.0 + */ + type OnVersionNegotiationCallback = ( + this: QuicSession, + version: number, + requestedVersions: number[], + supportedVersions: number[], + ) => void; + /** + * @since v23.8.0 + */ + type OnHandshakeCallback = (this: QuicSession, info: SessionHandshakeInfo) => void; + /** + * @since v26.2.0 + */ + type OnNewTokenCallback = (this: QuicSession, token: NonSharedBuffer, address: SocketAddress) => void; + /** + * @since v26.2.0 + */ + type OnOriginCallback = (this: QuicSession, origins: string[]) => void; + /** + * Called when TLS key material is available. Only fires when + * `sessionOptions.keylog` is `true`. Multiple lines are emitted during the + * TLS 1.3 handshake, each containing a secret label, the client random, and + * the secret value. + * @since v26.2.0 + */ + type OnKeylogCallback = (this: QuicSession, line: string) => void; + /** + * Called when qlog diagnostic data is available. Only fires when + * `sessionOptions.qlog` is `true`. The `data` chunks should be + * concatenated in order to produce the complete qlog output. When `fin` is + * `true`, no more chunks will be emitted and the concatenated result is a + * complete JSON-SEQ document. + * @since v26.2.0 + */ + type OnQlogCallback = (this: QuicSession, data: string, fin: boolean) => void; + /** + * @since v23.8.0 + */ + type OnBlockedCallback = (this: QuicStream) => void; + /** + * @since v23.8.0 + */ + type OnStreamErrorCallback = (this: QuicStream, error: any) => void; + /** + * Called when initial request or response headers are received. For HTTP/3, + * this delivers request pseudo-headers on the server and response headers + * on the client. + * @since v26.2.0 + */ + type OnHeadersCallback = (this: QuicStream, headers: NodeJS.Dict) => void; + /** + * Called when trailing headers are received from the peer. + * @since v26.2.0 + */ + type OnTrailersCallback = (this: QuicStream, trailers: NodeJS.Dict) => void; + /** + * Called when informational (1xx) headers are received from the server + * (e.g., 103 Early Hints). + * @since v26.2.0 + */ + type OnInfoCallback = (this: QuicStream, headers: NodeJS.Dict) => void; + /** + * @since v23.8.0 + */ + interface TransportParams { + /** + * The preferred IPv4 address to advertise (only used by servers). + * @since v23.8.0 + */ + preferredAddressIpv4?: SocketAddress | undefined; + /** + * The preferred IPv6 address to advertise (only used by servers) + * @since v23.8.0 + */ + preferredAddressIpv6?: SocketAddress | undefined; + /** + * @since v23.8.0 + */ + initialMaxStreamDataBidiLocal?: bigint | number | undefined; + /** + * @since v23.8.0 + */ + initialMaxStreamDataBidiRemote?: bigint | number | undefined; + /** + * @since v23.8.0 + */ + initialMaxStreamDataUni?: bigint | number | undefined; + /** + * @since v23.8.0 + */ + initialMaxData?: bigint | number | undefined; + /** + * @since v23.8.0 + */ + initialMaxStreamsBidi?: bigint | number | undefined; + /** + * @since v23.8.0 + */ + initialMaxStreamsUni?: bigint | number | undefined; + /** + * @since v23.8.0 + */ + maxIdleTimeout?: bigint | number | undefined; + /** + * @since v23.8.0 + */ + activeConnectionIDLimit?: bigint | number | undefined; + /** + * @since v23.8.0 + */ + ackDelayExponent?: bigint | number | undefined; + /** + * @since v23.8.0 + */ + maxAckDelay?: bigint | number | undefined; + /** + * The maximum size in bytes of a DATAGRAM frame payload that this endpoint + * is willing to receive. Set to `0` to disable datagram support. The peer + * will not send datagrams larger than this value. The actual maximum size of + * a datagram that can be _sent_ is determined by the peer's + * `maxDatagramFrameSize`, not this endpoint's value. + * @since v23.8.0 + */ + maxDatagramFrameSize?: bigint | number | undefined; + } + interface SNIEntry { + /** + * The TLS private keys. **Required.** + */ + keys: KeyObject | readonly KeyObject[]; + /** + * The TLS certificates. **Required.** + */ + certs: ArrayBuffer | NodeJS.ArrayBufferView | ReadonlyArray; + /** + * Verify the private key. Default: `false`. + */ + verifyPrivateKey?: boolean | undefined; + /** + * The port to advertise in ORIGIN frames (RFC 9412) for this host name. **Default:** `443`. Only used for HTTP/3 sessions. + */ + port?: number | undefined; + /** + * Whether to include this host name in ORIGIN frames. **Default:** `true`. Set to `false` to exclude a host name + * from ORIGIN advertisements. Wildcard (`'*'`) entries are always excluded regardless of this setting. + */ + authoritative?: boolean | undefined; + } + /** + * @since v26.3.0 + */ + interface ApplicationOptions { + /** + * Maximum number of header name-value pairs accepted per header block. + * Headers beyond this limit are silently dropped. **Default:** `128` + */ + maxHeaderPairs?: bigint | number | undefined; + /** + * Maximum total byte length of all header names and values combined per header + * block. Headers that would push the total over this limit are silently + * dropped. **Default:** `8192` + */ + maxHeaderLength?: bigint | number | undefined; + /** + * Maximum size of a compressed header field section (QPACK). `0` means + * unlimited. **Default:** `0` + */ + maxFieldSectionSize?: bigint | number | undefined; + /** + * QPACK dynamic table capacity in bytes. Set to `0` to disable the dynamic + * table. **Default:** `4096` + */ + qpackMaxDTableCapacity?: bigint | number | undefined; + /** + * QPACK encoder maximum dynamic table capacity. **Default:** `4096` + */ + qpackEncoderMaxDTableCapacity?: bigint | number | undefined; + /** + * Maximum number of streams that can e blocked waiting for QPACK dynamic table + * updates. **Default:** `100` + */ + qpackBlockedStreams?: bigint | number | undefined; + /** + * Enable the extended CONNECT protocol (RFC 9220). **Default:** `false` + */ + enableConnectProtocol?: boolean | undefined; + /** + * Enable HTTP/3 datagrams (RFC 9297). **Default:** `false` + */ + enableDatagrams?: boolean | undefined; + } + type SessionApplicationOptions = { [K in keyof ApplicationOptions]-?: ApplicationOptions[K] & (bigint | boolean) }; + /** + * @since v23.8.0 + */ + interface SessionOptions { + /** + * An endpoint to use. + * @since v23.8.0 + */ + endpoint?: EndpointOptions | QuicEndpoint | undefined; + /** + * The ALPN (Application-Layer Protocol Negotiation) identifier(s). + * + * For **client** sessions, this is a single string specifying the protocol + * the client wants to use (e.g. `'h3'`). + * + * For **server** sessions, this is an array of protocol names in preference + * order that the server supports (e.g. `['h3', 'h3-29']`). During the TLS + * handshake, the server selects the first protocol from its list that the + * client also supports. + * + * The negotiated ALPN determines which Application implementation is used + * for the session. `'h3'` and `'h3-*'` variants select the HTTP/3 + * application; all other values select the default application. + * @since v26.1.0 + */ + alpn?: string | readonly string[] | undefined; + /** + * Application-specific options. + * @since v26.2.0 + */ + application?: ApplicationOptions | undefined; + /** + * The CA certificates to use for client sessions. For server sessions, CA + * certificates are specified per-identity in the `sessionOptions.sni` map. + * @since v23.8.0 + */ + ca?: ArrayBuffer | NodeJS.ArrayBufferView | ReadonlyArray | undefined; + /** + * Enables TLS certificate compression ([RFC 8879](https://www.rfc-editor.org/rfc/rfc8879)) for this session. When + * omitted, certificate compression is disabled. + * + * On the server side, the certificate chain is compressed using the first + * listed algorithm that the client advertises support for. On the client side, + * the listed algorithms are advertised to the server so that the server may + * compress its certificate. When client authentication is in use, the option + * also controls compression of the client's certificate. + * + * Compressing the certificate chain is especially useful for QUIC because it + * reduces the size of the server's first flight, which is bounded by the + * anti-amplification limit (see [Certificate size and handshake + * performance](https://nodejs.org/docs/latest-v26.x/api/quic.html#certificate-size-and-handshake-performance)). Certificate compression requires TLS 1.3, which QUIC always + * uses. + * + * At most three algorithms may be specified. The option is silently ignored if + * Node.js was built against a shared OpenSSL that lacks certificate compression + * support. + * @since v26.6.0 + */ + certificateCompression?: readonly CertificateCompressionAlgorithm[] | undefined; + /** + * Specifies the congestion control algorithm that will be used. + * Must be set to one of either `'reno'`, `'cubic'`, or `'bbr'`. + * + * This is an advanced option that users typically won't have need to specify. + * @since v23.8.0 + */ + cc?: `${constants.cc}` | undefined; + /** + * The TLS certificates to use for client sessions. For server sessions, + * certificates are specified per-identity in the `sessionOptions.sni` map. + * @since v23.8.0 + */ + certs?: ArrayBuffer | NodeJS.ArrayBufferView | ReadonlyArray | undefined; + /** + * The list of supported TLS 1.3 cipher algorithms. + * @since v23.8.0 + */ + ciphers?: string | undefined; + /** + * The CRL to use for client sessions. For server sessions, CRLs are specified + * per-identity in the `sessionOptions.sni` map. + * @since v23.8.0 + */ + crl?: ArrayBuffer | NodeJS.ArrayBufferView | ReadonlyArray | undefined; + /** + * When `true`, enables TLS 0-RTT early data for this session. Early data + * allows the client to send application data before the TLS handshake + * completes, reducing latency on reconnection when a valid session ticket + * is available. Set to `false` to disable early data support. + * @since v26.2.0 + */ + enableEarlyData?: boolean | undefined; + /** + * The list of supported TLS 1.3 cipher groups. + * @since v23.8.0 + */ + groups?: string | undefined; + /** + * When `true`, enables TLS key logging for the session. Key material is + * delivered to the `session.onkeylog` callback in [NSS Key Log Format](https://udn.realityripple.com/docs/Mozilla/Projects/NSS/Key_Log_Format). + * Each callback invocation receives a single line of key material. The output + * can be used with tools such as Wireshark to decrypt captured QUIC traffic. + * @since v23.8.0 + */ + keylog?: boolean | undefined; + /** + * The TLS crypto keys to use for client sessions. For server sessions, + * keys are specified per-identity in the `sessionOptions.sni` map. + * @since v23.8.0 + */ + keys?: KeyObject | readonly KeyObject[] | undefined; + /** + * Specifies the maximum UDP packet payload size. + * @since v23.8.0 + */ + maxPayloadSize?: bigint | number | undefined; + /** + * Specifies the maximum stream flow-control window size. + * @since v23.8.0 + */ + maxStreamWindow?: bigint | number | undefined; + /** + * Specifies the maximum session flow-control window size. + * @since v23.8.0 + */ + maxWindow?: bigint | number | undefined; + /** + * The minimum QUIC version number to allow. This is an advanced option that users + * typically won't have need to specify. + * @since v23.8.0 + */ + minVersion?: number | undefined; + /** + * When the remote peer advertises a preferred address, this option specifies whether + * to use it or ignore it. The default is `'ignore'` because honoring a server's + * preferred address causes the client to migrate its connection to a different IP + * address, which can be exploited for data exfiltration attacks that are + * indistinguishable from legitimate QUIC connection migration at the network level. + * Set to `'use'` only when connecting to trusted servers that require preferred + * address migration. + * @since v23.8.0 + */ + preferredAddressPolicy?: "use" | "ignore" | "default" | undefined; + /** + * When `true`, enables [qlog](https://datatracker.ietf.org/doc/draft-ietf-quic-qlog-main-schema/) diagnostic output for the session. Qlog data + * is delivered to the `session.onqlog` callback as chunks of [JSON-SEQ](https://www.rfc-editor.org/rfc/rfc7464) + * formatted text. The output can be analyzed with qlog visualization tools + * such as [qvis](https://qvis.quictools.info/). + * @since v23.8.0 + */ + qlog?: boolean | undefined; + /** + * A session ticket to use for 0RTT session resumption. + * @since v23.8.0 + */ + sessionTicket?: NodeJS.ArrayBufferView | undefined; + /** + * Controls which datagram to drop when the pending datagram queue + * (sized by `session.maxPendingDatagrams`) is full. Must be one of + * `'drop-oldest'` (discard the oldest queued datagram to make room) or + * `'drop-newest'` (reject the incoming datagram). Dropped datagrams are + * reported as lost via the `ondatagramstatus` callback. + * + * This option is immutable after session creation. + * @since v26.2.0 + */ + datagramDropPolicy?: "drop-oldest" | "drop-newest" | undefined; + /** + * The maximum time in milliseconds that a peer-initiated stream can be idle + * (no data received) before it is automatically destroyed. This protects + * against slowloris-style attacks where a remote peer opens streams but never + * sends data, holding server resources indefinitely. Only peer-initiated + * streams are checked — locally-initiated streams are the application's + * responsibility. Set to `0` to disable. + * + * The idle check runs as part of the normal send processing loop, so it adds + * no additional timers or event loop overhead. The + * `session.stats.streamsIdleTimedOut` counter tracks how many streams have been + * destroyed by this mechanism. + * @since v26.3.0 + */ + streamIdleTimeout?: bigint | number | undefined; + /** + * The maximum number of `SendPendingData` cycles a datagram can survive + * without being sent before it is abandoned. When a datagram cannot be + * sent due to congestion control or packet size constraints, it remains + * in the queue and the attempt counter increments. Once the limit is + * reached, the datagram is dropped and reported as `'abandoned'` via the + * `ondatagramstatus` callback. Valid range: `1` to `255`. + * @since v26.2.0 + */ + maxDatagramSendAttempts?: number | undefined; + /** + * A multiplier applied to the Probe Timeout (PTO) to compute the draining + * period duration after receiving a `CONNECTION_CLOSE` frame from the peer. + * RFC 9000 Section 10.2 requires the draining period to persist for at least + * three times the current PTO. The valid range is `3` to `255`. Values below + * `3` are clamped to `3`. + * @since v26.2.0 + */ + drainingPeriodMultiplier?: number | undefined; + /** + * Specifies the keep-alive timeout in milliseconds. When set to a non-zero + * value, PING frames will be sent automatically to keep the connection alive + * before the idle timeout fires. The value should be less than the effective + * idle timeout (`maxIdleTimeout` transport parameter) to be useful. + * @since v23.8.0 + */ + handshakeTimeout?: bigint | number | undefined; + /** + * Controls how the client handles server certificate validation: + * + * * `'strict'` — OpenSSL aborts the TLS handshake immediately if the server's + * certificate fails validation. The `session.opened` promise rejects with a + * TLS error. The application cannot inspect the certificate or the error + * details. This is the most secure mode. + * + * * `'auto'` — The TLS handshake completes regardless of validation result. + * If validation fails, the `session.opened` promise is rejected with an error + * containing the validation reason, and the session is destroyed. The + * `onhandshake` callback (if set) fires before rejection, allowing diagnostic + * logging. This is the default and matches the behavior of `tls.connect()` + * with `rejectUnauthorized: true`. + * + * * `'manual'` — The TLS handshake completes regardless of validation result. + * The `session.opened` promise resolves with the handshake info, which includes + * `validationErrorReason` and `validationErrorCode` if validation failed. The + * application is responsible for checking these values and deciding whether to + * continue. Use this mode for custom validation logic, certificate pinning, or + * intentionally accepting self-signed certificates. + * @since v26.3.0 + */ + verifyPeer?: "strict" | "auto" | "manual" | undefined; + /** + * The peer server name to target (SNI). Defaults to `'localhost'`. + * @since v26.1.0 + */ + servername?: string | undefined; + /** + * An object mapping host names to TLS identity options for Server Name + * Indication (SNI) support. This is required for server sessions and must + * contain at least one entry. The special key `'*'` specifies the optional + * default/fallback identity used when no other host name matches. If no + * wildcard entry is provided, connections with unrecognized server names + * will be rejected with a TLS `unrecognized_name` alert. Each entry may + * contain: + * @since v26.1.0 + */ + sni?: Record | undefined; + /** + * True to enable TLS tracing output. + * @since v23.8.0 + */ + tlsTrace?: boolean | undefined; + /** + * An opaque address validation token previously received from the server + * via the `session.onnewtoken` callback. Providing a valid token on + * reconnection allows the client to skip the server's address validation, + * reducing handshake latency. + * @since v26.2.0 + */ + token?: NodeJS.ArrayBufferView | undefined; + /** + * The QUIC transport parameters to use for the session. + * @since v23.8.0 + */ + transportParams?: TransportParams | undefined; + /** + * Specifies the maximum number of unacknowledged packets a session should allow. + * @since v23.8.0 + */ + unacknowledgedPacketThreshold?: bigint | number | undefined; + /** + * If `true`, the peer certificate is verified against the list of supplied CAs. + * An error is emitted if verification fails; the error can be inspected via + * the `validationErrorReason` and `validationErrorCode` fields in the + * handshake callback. If `false`, peer certificate verification errors are + * ignored. + */ + rejectUnauthorized?: boolean | undefined; + /** + * When `true` (the default), `connect()` will attempt to reuse an existing + * endpoint rather than creating a new one for each session. This provides + * connection pooling behavior — multiple sessions can share a single UDP + * socket. The reuse logic will not return an endpoint that is listening on + * the same address as the connect target (to prevent CID routing conflicts). + * + * Set to `false` to force creation of a new endpoint for the session. This + * is useful when endpoint isolation is required (e.g., testing stateless + * reset behavior where source port identity matters). + * @since v26.2.0 + */ + reuseEndpoint?: boolean | undefined; + /** + * True to require verification of TLS client certificate. + * @since v23.8.0 + */ + verifyClient?: boolean | undefined; + /** + * True to require private key verification for client sessions. For server + * sessions, this option is specified per-identity in the + * `sessionOptions.sni` map. + * @since v23.8.0 + */ + verifyPrivateKey?: boolean | undefined; + /** + * The QUIC version number to use. This is an advanced option that users typically + * won't have need to specify. + * @since v23.8.0 + */ + version?: number | undefined; + // Undocumented + onerror?: QuicSession["onerror"] | undefined; + onstream?: QuicSession["onstream"] | undefined; + ondatagram?: QuicSession["ondatagram"] | undefined; + ondatagramstatus?: QuicSession["ondatagramstatus"] | undefined; + onpathvalidation?: QuicSession["onpathvalidation"] | undefined; + onsessionticket?: QuicSession["onsessionticket"] | undefined; + onversionnegotiation?: QuicSession["onversionnegotiation"] | undefined; + onhandshake?: QuicSession["onhandshake"] | undefined; + onnewtoken?: QuicSession["onnewtoken"] | undefined; + onearlyrejected?: QuicSession["onearlyrejected"] | undefined; + onorigin?: QuicSession["onorigin"] | undefined; + ongoaway?: QuicSession["ongoaway"] | undefined; + onkeylog?: QuicSession["onkeylog"] | undefined; + onqlog?: QuicSession["onqlog"] | undefined; + onapplication?: QuicSession["onapplication"] | undefined; + onheaders?: QuicStream["onheaders"] | undefined; + ontrailers?: QuicStream["ontrailers"] | undefined; + oninfo?: QuicStream["oninfo"] | undefined; + onwanttrailers?: QuicStream["onwanttrailers"] | undefined; + } + /** + * Initiate a new client-side session. + * + * ```js + * import { connect } from 'node:quic'; + * import { Buffer } from 'node:buffer'; + * + * const enc = new TextEncoder(); + * const alpn = 'foo'; + * const client = await connect('123.123.123.123:8888', { alpn }); + * await client.createUnidirectionalStream({ + * body: enc.encode('hello world'), + * }); + * ``` + * + * By default, every call to `connect(...)` will create a new local + * `QuicEndpoint` instance bound to a new random local IP port. To + * specify the exact local address to use, or to multiplex multiple + * QUIC sessions over a single local port, pass the `endpoint` option + * with either a `QuicEndpoint` or `EndpointOptions` as the argument. + * + * ```js + * import { QuicEndpoint, connect } from 'node:quic'; + * + * const endpoint = new QuicEndpoint({ + * address: '127.0.0.1:1234', + * }); + * + * const client = await connect('123.123.123.123:8888', { endpoint }); + * ``` + * @since v23.8.0 + */ + function connect(address: string | SocketAddress, options?: SessionOptions): Promise; + /** + * Configures the endpoint to listen as a server. When a new session is initiated by + * a remote peer, the given `onsession` callback will be invoked with the created + * session. + * + * ```js + * import { listen } from 'node:quic'; + * + * const endpoint = await listen((session) => { + * // ... handle the session + * }); + * + * // Closing the endpoint allows any sessions open when close is called + * // to complete naturally while preventing new sessions from being + * // initiated. Once all existing sessions have finished, the endpoint + * // will be destroyed. The call returns a promise that is resolved once + * // the endpoint is destroyed. + * await endpoint.close(); + * ``` + * + * By default, every call to `listen(...)` will create a new local + * `QuicEndpoint` instance bound to a new random local IP port. To + * specify the exact local address to use, or to multiplex multiple + * QUIC sessions over a single local port, pass the `endpoint` option + * with either a `QuicEndpoint` or `EndpointOptions` as the argument. + * + * At most, any single `QuicEndpoint` can only be configured to listen as + * a server once. + * @since v23.8.0 + */ + function listen(onsession: OnSessionCallback, options?: SessionOptions): Promise; + interface ListEndpointsOptions { + /** + * If `true` (the default), only returns endpoints that are + * active (not destroyed, not closing, and not busy). If `false` returns all + * endpoints. + */ + active?: boolean | undefined; + } + /** + * Returns the list of all `QuicEndpoint` instances. By default, only active + * endpoints are returned. + * @since v26.4.0 + */ + function listEndpoints(options?: ListEndpointsOptions): QuicEndpoint[]; + /** + * The endpoint configuration options passed when constructing a new `QuicEndpoint` instance. + * @since v23.8.0 + */ + interface EndpointOptions { + /** + * If not specified the endpoint will bind to IPv4 `localhost` on a random port. + * @since v23.8.0 + */ + address?: SocketAddress | string | undefined; + /** + * An optional `net.BlockList` instance for filtering incoming packets by + * source address. When configured, every received UDP packet is checked against + * the block list before any QUIC processing occurs, minimizing resource + * expenditure on blocked sources. The block list is evaluated live — rules + * added to the `BlockList` object after the endpoint is created take effect + * immediately. + * + * See `endpointOptions.blockListPolicy` for how matches are interpreted. + * @since v26.3.0 + */ + blockList?: BlockList | undefined; + /** + * Controls how the `endpointOptions.blockList` is interpreted: + * + * * `'deny'` — Packets from addresses matching the block list are dropped. + * All other addresses are accepted. This is the typical blocklist mode. + * * `'allow'` — Only packets from addresses matching the block list are + * accepted. All other addresses are dropped. This is an allowlist mode + * for restricting access to known clients. + * + * If no block list is configured, this option has no effect. + * @since v26.3.0 + */ + blockListPolicy?: "deny" | "allow" | undefined; + /** + * The endpoint maintains an internal cache of validated socket addresses as a + * performance optimization. This option sets the maximum number of addresses + * that are cached. This is an advanced option that users typically won't have + * need to specify. + * @since v23.8.0 + */ + addressLRUSize?: bigint | number | undefined; + /** + * When `true`, the endpoint will not send stateless reset packets in response + * to packets from unknown connections. Stateless resets allow a peer to detect + * that a connection has been lost even when the server has no state for it. + * Disabling them may be useful in testing or when stateless resets are handled + * at a different layer. + * @since v26.2.0 + */ + disableStatelessReset?: boolean | undefined; + /** + * The number of seconds an endpoint will remain alive after all sessions have + * closed and it is no longer listening. A value of `0` (default) means the + * endpoint is only destroyed when explicitly closed via `endpoint.close()` or + * `endpoint.destroy()`. A positive value starts an idle timer when the endpoint + * becomes idle; if no new sessions are created before the timer fires, the + * endpoint is automatically destroyed. This is useful for connection pooling + * where endpoints should linger briefly for reuse by future `connect()` calls. + * @since v26.2.0 + */ + idleTimeout?: number | undefined; + /** + * When `true`, indicates that the endpoint should bind only to IPv6 addresses. + * @since v23.8.0 + */ + ipv6Only?: boolean | undefined; + /** + * Specifies the maximum number of concurrent sessions allowed per remote IP + * address (ignoring port). When the limit is reached, new connections from the + * same IP are refused with `CONNECTION_REFUSED`. A value of `0` disables the + * limit. The maximum value is `65535`. + * + * This limit can also be changed dynamically after construction via + * `endpoint.maxConnectionsPerHost`. + * @since v23.8.0 + */ + maxConnectionsPerHost?: number | undefined; + /** + * Specifies the maximum total number of concurrent sessions across all remote + * addresses. When the limit is reached, new connections are refused with + * `CONNECTION_REFUSED`. A value of `0` disables the limit. The maximum value is + * `65535`. + * + * This limit can also be changed dynamically after construction via + * `endpoint.maxConnectionsTotal`. + * @since v23.8.0 + */ + maxConnectionsTotal?: number | undefined; + /** + * The maximum number of QUIC retry packets the endpoint will send per second. + * This is a global rate limit (not per-host) that caps the total server-wide + * retry response rate, preventing spoofed-source floods from consuming unbounded + * resources. + * @since v26.3.0 + */ + retryRate?: number | undefined; + /** + * The maximum burst of retry packets allowed before rate limiting takes effect. + * @since v26.3.0 + */ + retryBurst?: number | undefined; + /** + * The maximum number of stateless reset packets the endpoint will send per second. + * @since v26.3.0 + */ + statelessResetRate?: number | undefined; + /** + * The maximum burst of stateless reset packets allowed before rate limiting + * takes effect. + * @since v26.3.0 + */ + statelessResetBurst?: number | undefined; + /** + * The maximum number of version negotiation packets the endpoint will send per + * second. + * @since v26.3.0 + */ + versionNegotiationRate?: number | undefined; + /** + * The maximum number of immediate connection close packets the endpoint will + * send per second. + * @since v26.3.0 + */ + versionNegotiationBurst?: number | undefined; + /** + * The maximum number of immediate connection close packets the endpoint will + * send per second. + * @since v26.3.0 + */ + immediateCloseRate?: number | undefined; + /** + * The maximum burst of immediate connection close packets allowed before rate + * limiting takes effect. + * @since v26.3.0 + */ + immediateCloseBurst?: number | undefined; + /** + * The maximum number of new sessions that a single remote address can create per + * second. This is a per-host rate limit tracked in the address validation LRU + * cache. It prevents a validated remote address from churning through sessions + * (rapidly opening and abandoning connections) faster than the server can handle. + * For benchmarking where traffic comes from a single source, set this to a high + * value. + * @since v26.3.0 + */ + sessionCreationRate?: number | undefined; + /** + * The maximum burst of new session creations allowed from a single remote address + * before rate limiting takes effect. + * @since v26.3.0 + */ + sessionCreationBurst?: number | undefined; + /** + * Specifies the length of time a QUIC retry token is considered valid. + * @since v23.8.0 + */ + retryTokenExpiration?: bigint | number | undefined; + /** + * Specifies the 16-byte secret used to generate QUIC retry tokens. + * @since v23.8.0 + */ + resetTokenSecret?: NodeJS.ArrayBufferView | undefined; + /** + * Specifies the length of time a QUIC token is considered valid. + * @since v23.8.0 + */ + tokenExpiration?: bigint | number | undefined; + /** + * Specifies the 16-byte secret used to generate QUIC tokens. + * @since v23.8.0 + */ + tokenSecret?: NodeJS.ArrayBufferView | undefined; + /** + * @since v23.8.0 + */ + udpReceiveBufferSize?: number | undefined; + /** + * @since v23.8.0 + */ + udpSendBufferSize?: number | undefined; + /** + * @since v23.8.0 + */ + udpTTL?: number | undefined; + /** + * When `true`, requires that the endpoint validate peer addresses using retry packets + * while establishing a new connection. + * @since v23.8.0 + */ + validateAddress?: boolean | undefined; + } + interface SetSNIContextsOptions { + replace?: boolean | undefined; + } + /** + * A `QuicEndpoint` encapsulates the local UDP-port binding for QUIC. It can be + * used as both a client and a server. + * @since v23.8.0 + */ + class QuicEndpoint implements AsyncDisposable { + constructor(options?: EndpointOptions); + /** + * The local UDP socket address to which the endpoint is bound, if any. + * + * If the endpoint is not currently bound then the value will be `undefined`. Read only. + * @since v23.8.0 + */ + readonly address: SocketAddress | undefined; + /** + * When `endpoint.busy` is set to true, the endpoint will temporarily reject + * new sessions from being created. Read/write. + * + * ```js + * // Mark the endpoint busy. New sessions will be prevented. + * endpoint.busy = true; + * + * // Mark the endpoint free. New session will be allowed. + * endpoint.busy = false; + * ``` + * + * The `busy` property is useful when the endpoint is under heavy load and needs to + * temporarily reject new sessions while it catches up. + * @since v23.8.0 + */ + busy: boolean; + /** + * Gracefully close the endpoint. The endpoint will close and destroy itself when + * all currently open sessions close. Once called, new sessions will be rejected. + * + * Returns a promise that is fulfilled when the endpoint is destroyed. + * @since v23.8.0 + */ + close(): Promise; + /** + * A promise that is fulfilled when the endpoint is destroyed. This will be the same promise that is + * returned by the `endpoint.close()` function. Read only. + * @since v23.8.0 + */ + readonly closed: Promise; + /** + * True if `endpoint.close()` has been called and closing the endpoint has not yet completed. + * Read only. + * @since v23.8.0 + */ + readonly closing: boolean; + /** + * Forcefully closes the endpoint by forcing all open sessions to be immediately + * closed. + * @since v23.8.0 + */ + destroy(error?: any): void; + /** + * True if `endpoint.destroy()` has been called. Read only. + * @since v23.8.0 + */ + readonly destroyed: boolean; + /** + * True if the endpoint is actively listening for incoming connections. Read only. + * @since v26.2.0 + */ + readonly listening: boolean; + /** + * The maximum number of concurrent connections allowed per remote IP address. + * `0` means unlimited (default). Can be set at construction time via the + * `maxConnectionsPerHost` option and changed dynamically at any time. + * The valid range is `0` to `65535`. + * @since v26.2.0 + */ + maxConnectionsPerHost: number; + /** + * The maximum total number of concurrent connections across all remote + * addresses. `0` means unlimited (default). Can be set at construction time via + * the `maxConnectionsTotal` option and changed dynamically at any time. + * The valid range is `0` to `65535`. + * @since v26.2.0 + */ + maxConnectionsTotal: number; + /** + * Replaces or updates the SNI TLS contexts for this endpoint. This allows + * changing the TLS identity (key/certificate) used for specific host names + * without restarting the endpoint. Existing sessions are unaffected — only + * new sessions will use the updated contexts. + * + * ```js + * endpoint.setSNIContexts({ + * 'api.example.com': { keys: [newApiKey], certs: [newApiCert] }, + * }); + * + * // Replace the entire SNI map + * endpoint.setSNIContexts({ + * 'api.example.com': { keys: [newApiKey], certs: [newApiCert] }, + * }, { replace: true }); + * ``` + * @since v26.1.0 + * @param entries An object mapping host names to TLS identity options. + * Each entry must include `keys` and `certs`. + */ + setSNIContexts(entries: Record, options?: SetSNIContextsOptions): void; + /** + * The statistics collected for an active endpoint. Read only. + * @since v23.8.0 + */ + readonly stats: QuicEndpoint.Stats; + /** + * Calls `endpoint.close()` and returns a promise that fulfills when the + * endpoint has closed. + * @since v23.8.0 + */ + [Symbol.asyncDispose](): Promise; + } + namespace QuicEndpoint { + /** + * A view of the collected statistics for an endpoint. + * @since v23.8.0 + */ + class Stats { + private constructor(); + /** + * A timestamp indicating the moment the endpoint was created. Read only. + * @since v23.8.0 + */ + readonly createdAt: bigint; + /** + * A timestamp indicating the moment the endpoint was destroyed. Read only. + * @since v23.8.0 + */ + readonly destroyedAt: bigint; + /** + * The total number of bytes received by this endpoint. Read only. + * @since v23.8.0 + */ + readonly bytesReceived: bigint; + /** + * The total number of bytes sent by this endpoint. Read only. + * @since v23.8.0 + */ + readonly bytesSent: bigint; + /** + * The total number of QUIC packets successfully received by this endpoint. Read only. + * @since v23.8.0 + */ + readonly packetsReceived: bigint; + /** + * The total number of QUIC packets successfully sent by this endpoint. Read only. + * @since v23.8.0 + */ + readonly packetsSent: bigint; + /** + * The total number of peer-initiated sessions received by this endpoint. Read only. + * @since v23.8.0 + */ + readonly serverSessions: bigint; + /** + * The total number of sessions initiated by this endpoint. Read only. + * @since v23.8.0 + */ + readonly clientSessions: bigint; + /** + * The total number of times an initial packet was rejected due to the + * endpoint being marked busy. Read only. + * @since v23.8.0 + */ + readonly serverBusyCount: bigint; + /** + * The total number of retry packets sent by this endpoint. Read only. + * @since v23.8.0 + */ + readonly retryCount: bigint; + /** + * The total number of retry packets dropped by the global rate + * limiter. Read only. A non-zero value indicates the endpoint is under retry + * flood pressure. + * @since v26.3.0 + */ + readonly retryRateLimited: bigint; + /** + * The total number of version negotiation packets sent by this + * endpoint. Read only. + * @since v23.8.0 + */ + readonly versionNegotiationCount: bigint; + /** + * The total number of version negotiation packets dropped by + * the global rate limiter. Read only. + * @since v26.3.0 + */ + readonly versionNegotiationRateLimited: bigint; + /** + * The total number of stateless reset packets sent by this + * endpoint. Read only. + * @since v23.8.0 + */ + readonly statelessResetCount: bigint; + /** + * The total number of stateless reset packets dropped by the + * global rate limiter. Read only. + * @since v26.3.0 + */ + readonly statelessResetRateLimited: bigint; + /** + * The total number of immediate connection close packets sent + * by this endpoint. Read only. + * @since v23.8.0 + */ + readonly immediateCloseCount: bigint; + /** + * The total number of immediate connection close packets + * dropped by the global rate limiter. Read only. + * @since v26.3.0 + */ + readonly immediateCloseRateLimited: bigint; + /** + * The total number of session creation attempts dropped by the + * per-host rate limiter. Read only. A non-zero value indicates one or more + * remote addresses are creating sessions faster than the configured rate allows. + * @since v26.3.0 + */ + readonly sessionCreationRateLimited: bigint; + /** + * The total number of incoming packets dropped by the + * block list filter. Read only. + * @since v26.3.0 + */ + readonly packetsBlocked: bigint; + } + } + interface CreateStreamOptions { + /** + * The outbound body source. See `stream.setBody()` for details on + * supported types. When omitted, the stream's outgoing side remains + * writable with no body queued; no FIN is sent immediately. + */ + body?: StreamBody | undefined; + /** + * Initial request or response headers to send. Only + * used when the session supports headers (e.g. HTTP/3). If `body` is not + * specified and `headers` is provided, the stream is treated as + * headers-only (terminal). + */ + headers?: NodeJS.Dict | readonly string[] | undefined; + /** + * The priority level of the stream. One of `'high'`, + * `'default'`, or `'low'`. **Default:** `'default'`. + */ + priority?: "high" | "default" | "low" | undefined; + /** + * When `true`, data from this stream may be + * interleaved with data from other streams of the same priority level. + * When `false`, the stream should be completed before same-priority peers. + * **Default:** `false`. + */ + incremental?: boolean | undefined; + /** + * The maximum number of bytes that the writer + * will buffer before `writeSync()` returns `false`. When the buffered + * data exceeds this limit, the caller should wait for drain before + * writing more. **Default:** `65536` (64 KB). + */ + highWaterMark?: number | undefined; + /** + * Callback for received initial response headers. + * Called with `(headers)`. + */ + onheaders?: QuicStream["onheaders"] | undefined; + /** + * Callback for received trailing headers. + * Called with `(trailers)`. + */ + ontrailers?: QuicStream["ontrailers"] | undefined; + /** + * Callback for received informational (1xx) headers. + * Called with `(headers)`. + */ + oninfo?: QuicStream["oninfo"] | undefined; + /** + * Callback when trailers should be sent. + */ + onwanttrailers?: QuicStream["onwanttrailers"] | undefined; + } + interface SessionDestroyOptions { + /** + * The error code to include in the `CONNECTION_CLOSE` + * frame sent to the peer. **Default:** `0` (no error). + */ + code?: bigint | number | undefined; + /** + * Either `'transport'` or `'application'`. Determines the + * error code namespace used in the `CONNECTION_CLOSE` frame. When `'transport'` + * (the default), the frame type is `0x1c` and the code is interpreted as a QUIC + * transport error. When `'application'`, the frame type is `0x1d` and the code + * is application-specific. **Default:** `'transport'`. + */ + type?: "transport" | "application" | undefined; + /** + * An optional human-readable reason string included in + * the `CONNECTION_CLOSE` frame. Per RFC 9000, this is for diagnostic purposes + * only and should not be used for machine-readable error descriptions. + */ + reason?: string | undefined; + } + interface SessionHandshakeInfo { + /** + * The local socket address. + */ + local: SocketAddress; + /** + * The remote socket address. + */ + remote: SocketAddress; + /** + * The SNI server name negotiated during the handshake. + */ + servername: string; + /** + * The ALPN protocol negotiated during the handshake. + */ + protocol: string; + /** + * The name of the negotiated TLS cipher suite. + */ + cipher: string; + /** + * The TLS protocol version of the cipher suite + * (e.g., `'TLSv1.3'`). + */ + cipherVersion: string; + /** + * If certificate validation failed, the + * reason string. Empty string if validation succeeded. + */ + validationErrorReason: string; + /** + * If certificate validation failed, the + * error code. `0` if validation succeeded. + */ + validationErrorCode: number; + /** + * Whether 0-RTT early data was attempted. + */ + earlyDataAttempted: boolean; + /** + * Whether 0-RTT early data was accepted by + * the server. + */ + earlyDataAccepted: boolean; + } + interface SessionPath { + local: SocketAddress; + remote: SocketAddress; + } + /** + * A `QuicSession` represents the local side of a QUIC connection. + * @since v23.8.0 + */ + class QuicSession implements AsyncDisposable { + private constructor(); + /** + * The current application-level options for this session. These include settings + * that are specific to the negotiated application protocol (e.g. HTTP/3) and may + * be negotiated separately from the transport parameters. Read only. + * @since v26.3.0 + */ + readonly applicationOptions: SessionApplicationOptions; + /** + * Initiate a graceful close of the session. Existing streams will be allowed + * to complete but no new streams will be opened. Once all streams have closed, + * the session will be destroyed. The returned promise will be fulfilled once + * the session has been destroyed. If a non-zero `code` is specified, the + * promise will reject with an `ERR_QUIC_TRANSPORT_ERROR` or + * `ERR_QUIC_APPLICATION_ERROR` depending on the `type`. + * @since v23.8.0 + */ + close(options?: SessionDestroyOptions): Promise; + /** + * A promise that is fulfilled once the TLS handshake completes successfully. + * The resolved value contains information about the established session + * including the negotiated protocol, cipher suite, certificate validation + * status, and 0-RTT early data status. + * + * If the handshake fails or the session is destroyed before the handshake + * completes, the promise will be rejected. + * @since v26.2.0 + */ + readonly opened: Promise; + /** + * A promise that is fulfilled once the session is destroyed. + * @since v23.8.0 + */ + readonly closed: Promise; + /** + * True if `session.close()` has been called and the session has not yet + * been destroyed. Read only. + * @since v26.2.0 + */ + readonly closing: boolean; + /** + * Immediately destroy the session. All streams will be destroyed and the + * session will be closed. If `error` is provided and [`session.onerror`][] is + * set, the `onerror` callback is invoked before destruction. The + * `session.closed` promise will reject with the error. If `options` is + * provided, the `CONNECTION_CLOSE` frame sent to the peer will include the + * specified error code, type, and reason. + * @since v23.8.0 + */ + destroy(error?: any, options?: SessionDestroyOptions): void; + /** + * True if `session.destroy()` has been called. Read only. + * @since v23.8.0 + */ + readonly destroyed: boolean; + /** + * The endpoint that created this session. Returns `null` if the session + * has been destroyed. Read only. + * @since v23.8.0 + */ + readonly endpoint: QuicEndpoint | null; + /** + * The callback to invoke when new application options, e.g. HTTP/3 settings arrived. + * @since v26.4 + */ + onapplication: OnApplicationCallback | undefined; + /** + * An optional callback invoked when the session is destroyed with an error. + * This includes errors caused by user callbacks that throw or reject (see + * [Callback error handling](https://nodejs.org/docs/latest-v26.x/api/quic.html#callback-error-handling)). The callback receives a single argument: the + * error that triggered the destruction. If the `onerror` callback itself throws + * or returns a promise that rejects, the error is surfaced as an uncaught + * exception. Read/write. + * + * Can also be set via the `onerror` option in `quic.connect()` or + * `quic.listen()`. + * @since v26.2.0 + */ + onerror: ((this: QuicSession, error: any) => void) | undefined; + /** + * The callback to invoke when a new stream is initiated by a remote peer. Read/write. + * @since v23.8.0 + */ + onstream: OnStreamCallback | undefined; + /** + * The callback to invoke when the server rejects 0-RTT early data. When + * this fires, all streams that were opened during the 0-RTT phase have + * been destroyed. The application should re-open streams if needed. + * Read/write. + * + * This callback only fires on the client side when the server rejects + * the client's 0-RTT attempt. The connection falls back to 1-RTT and + * continues normally. + * @since v26.2.0 + */ + onearlyrejected: ((this: QuicSession) => void) | undefined; + /** + * The callback to invoke when a new datagram is received from a remote peer. Read/write. + * @since v23.8.0 + */ + ondatagram: OnDatagramCallback | undefined; + /** + * The callback to invoke when the status of a datagram is updated. Read/write. + * @since v23.8.0 + */ + ondatagramstatus: OnDatagramStatusCallback | undefined; + /** + * The callback to invoke when the path validation is updated. Read/write. + * @since v23.8.0 + */ + onpathvalidation: OnPathValidationCallback | undefined; + /** + * The callback to invoke when a new session ticket is received. Read/write. + * @since v23.8.0 + */ + onsessionticket: OnSessionTicketCallback | undefined; + /** + * The callback to invoke when a version negotiation is initiated. Read/write. + * @since v23.8.0 + */ + onversionnegotiation: OnVersionNegotiationCallback | undefined; + /** + * The callback to invoke when the TLS handshake is completed. Read/write. + * @since v23.8.0 + */ + onhandshake: OnHandshakeCallback | undefined; + /** + * The callback to invoke when a NEW\_TOKEN token is received from the server. + * The token can be passed as the `token` option on a future connection to + * the same server to skip address validation. Read/write. + * @since v26.2.0 + */ + onnewtoken: OnNewTokenCallback | undefined; + /** + * The callback to invoke when an ORIGIN frame (RFC 9412) is received from + * the server, indicating which origins the server is authoritative for. + * Read/write. + * @since v26.2.0 + */ + onorigin: OnOriginCallback | undefined; + /** + * The callback to invoke when the peer sends an HTTP/3 GOAWAY frame, + * indicating it is initiating a graceful shutdown. The callback receives + * `(lastStreamId)` where `lastStreamId` is a `{bigint}`: + * + * * When `lastStreamId` is `-1n`, the peer sent a shutdown notice (intent + * to close) without specifying a stream boundary. All existing streams + * may still be processed. + * * When `lastStreamId` is `>= 0n`, it is the highest stream ID the peer + * may have processed. Streams with IDs above this value were NOT + * processed and can be safely retried on a new connection. + * + * After GOAWAY is received, `session.createBidirectionalStream()` will + * throw `ERR_INVALID_STATE`. Existing streams continue until they + * complete or the session closes. + * + * This callback is only relevant for HTTP/3 sessions. Read/write. + * @since v26.2.0 + */ + ongoaway: ((this: QuicSession, lastStreamId: bigint) => void) | undefined; + /** + * The callback to invoke when TLS key material is available. Requires + * `sessionOptions.keylog` to be `true`. Each invocation receives a single + * line of [NSS Key Log Format](https://udn.realityripple.com/docs/Mozilla/Projects/NSS/Key_Log_Format) text (including a trailing newline). This is + * useful for decrypting packet captures with tools like Wireshark. Read/write. + * + * Can also be set via the `onkeylog` option in `quic.connect()` or + * `quic.listen()`. + * @since v26.2.0 + */ + onkeylog: OnKeylogCallback | undefined; + /** + * The callback to invoke when qlog data is available. Requires + * `sessionOptions.qlog` to be `true`. The callback receives a string + * chunk of [JSON-SEQ](https://www.rfc-editor.org/rfc/rfc7464) formatted qlog data and a boolean `fin` flag. When + * `fin` is `true`, the chunk is the final qlog output for this session and + * the concatenated chunks form a complete qlog trace. Read/write. + * + * Qlog data arrives during the connection lifecycle. The first chunk contains + * the qlog header with format metadata. Subsequent chunks contain trace + * events. The final chunk (with `fin` set to `true`) is emitted during + * session destruction and completes the JSON-SEQ output. + * + * Can also be set via the `onqlog` option in `quic.connect()` or + * `quic.listen()`. + * @since v26.2.0 + */ + onqlog: OnQlogCallback | undefined; + /** + * Open a new bidirectional stream. If the `body` option is not specified, + * the stream's outgoing side remains writable and no FIN is sent + * immediately. The `priority` and `incremental` + * options are only used when the session supports priority (e.g. HTTP/3). + * The `headers`, `onheaders`, `ontrailers`, `oninfo`, and `onwanttrailers` + * options are only used when the session supports headers (e.g. HTTP/3). + * @since v23.8.0 + */ + createBidirectionalStream(options?: CreateStreamOptions): Promise; + /** + * Open a new unidirectional stream. If the `body` option is not specified, + * the stream's outgoing side remains writable and no FIN is sent + * immediately. The `priority` and `incremental` + * options are only used when the session supports priority (e.g. HTTP/3). + * @since v23.8.0 + */ + createUnidirectionalStream(options?: CreateStreamOptions): Promise; + /** + * The local and remote socket addresses associated with the session. Read only. + * @since v23.8.0 + */ + path: SessionPath | undefined; + /** + * Sends an unreliable datagram to the remote peer, returning a promise for + * the datagram ID. + * + * If `datagram` is a string, it will be encoded using the specified `encoding`. + * + * If `datagram` is an `ArrayBufferView`, the bytes are copied into an + * internal buffer; the caller's source buffer is unchanged and may be reused + * or mutated immediately after the call returns. Callers that want to ensure + * their source cannot be mutated after the call (for example, when handing + * the buffer off to another async consumer) can call + * `ArrayBuffer.prototype.transfer()` themselves before passing the buffer. + * + * If `datagram` is a `Promise`, it will be awaited before sending. If the + * session closes while awaiting, `0n` is returned silently (datagrams are + * inherently unreliable). + * + * If the datagram payload is zero-length (empty string after encoding, detached + * buffer, or zero-length view), `0n` is returned and no datagram is sent. + * + * For HTTP/3 sessions, the peer must advertise `SETTINGS_H3_DATAGRAM=1` + * (via `application: { enableDatagrams: true }`) for datagrams to be sent. + * If the peer's setting is `0`, `sendDatagram()` returns `0n` (per RFC 9297 + * §3, an endpoint MUST NOT send HTTP Datagrams unless the peer indicated + * support). + * + * Datagrams cannot be fragmented — each must fit within a single QUIC packet. + * The maximum datagram size is determined by the peer's + * `maxDatagramFrameSize` transport parameter (which the peer advertises during + * the handshake). If the peer sets this to `0`, datagrams are not supported + * and `0n` will be returned. If the datagram exceeds the peer's limit, it + * will be silently dropped and `0n` returned. The local + * `maxDatagramFrameSize` transport parameter (default: `1200` bytes) controls + * what this endpoint advertises to the peer as its own maximum. + * @since v23.8.0 + * @param encoding The encoding to use if `datagram` is a string. + * **Default:** `'utf8'`. + */ + sendDatagram( + datagram: string | NodeJS.ArrayBufferView | Promise, + encoding?: BufferEncoding, + ): Promise; + /** + * The SNI (Server Name Indication) host name associated with the session. This is + * `null` before the client hello is processed. Once the hello has been + * processed, this is either the host name string or `false` if the handshake + * had no SNI. + * @since v26.6.0 + */ + readonly servername: string | false | null; + /** + * The negotiated ALPN protocol. This is `null` before the client hello is + * processed. Once ALPN has been negotiated, this is the protocol string. ALPN + * is mandatory in QUIC so this is never `false` on successful connections, + * unlike `node:tls` where this is optional. + * @since v26.6.0 + */ + readonly alpnProtocol: string | null; + /** + * The local certificate as a `crypto.X509Certificate` instance. Server + * sessions return the certificate configured for the negotiated SNI host. + * Client sessions return `undefined` unless a client certificate was sent. + * Returns `undefined` if the session is destroyed. + * @since v26.2.0 + */ + readonly certificate: X509Certificate | undefined; + /** + * The peer's certificate as a `crypto.X509Certificate` instance. Returns + * `undefined` if the peer did not present a certificate or the session is + * destroyed. + * @since v26.2.0 + */ + readonly peerCertificate: X509Certificate | undefined; + /** + * The ephemeral key information for the session, with properties such as + * `type`, `name`, and `size`. Only available on client sessions. Returns + * `undefined` for server sessions or if the session is destroyed. + * @since v26.2.0 + */ + readonly ephemeralKeyInfo: EphemeralKeyInfo | undefined; + /** + * The maximum datagram payload size in bytes that the peer will accept. + * This is derived from the peer's `maxDatagramFrameSize` transport + * parameter minus the DATAGRAM frame overhead (type byte and variable-length + * integer encoding). Returns `0` if the peer does not support datagrams or + * if the handshake has not yet completed. Datagrams larger than this value + * will not be sent. + * @since v26.2.0 + */ + readonly maxDatagramSize: number; + /** + * The maximum number of datagrams that can be queued for sending. Datagrams + * are queued when `sendDatagram()` is called and sent opportunistically + * alongside stream data by the packet serialization loop. When the queue + * is full, the `sessionOptions.datagramDropPolicy` determines whether + * the oldest or newest datagram is dropped. Dropped datagrams are reported + * as lost via the `ondatagramstatus` callback. + * + * This property can be changed dynamically to adjust queue capacity + * based on application activity or memory pressure. The valid range + * is `0` to `65535`. + * @since v26.2.0 + */ + maxPendingDatagrams: number; + /** + * Return the current statistics for the session. Read only. + * @since v23.8.0 + */ + readonly stats: QuicSession.Stats; + /** + * Initiate a key update for the session. + * @since v23.8.0 + */ + updateKey(): void; + /** + * Calls `session.close()` and returns a promise that fulfills when the + * session has closed. + * @since v23.8.0 + */ + [Symbol.asyncDispose](): Promise; + } + namespace QuicSession { + /** + * @since v23.8.0 + */ + class Stats { + private constructor(); + /** + * @since v23.8.0 + */ + readonly createdAt: bigint; + /** + * @since v23.8.0 + */ + readonly closingAt: bigint; + /** + * @since v23.8.0 + */ + readonly handshakeCompletedAt: bigint; + /** + * @since v23.8.0 + */ + readonly handshakeConfirmedAt: bigint; + /** + * @since v23.8.0 + */ + readonly bytesReceived: bigint; + /** + * @since v23.8.0 + */ + readonly bytesSent: bigint; + /** + * @since v23.8.0 + */ + readonly bidiInStreamCount: bigint; + /** + * @since v23.8.0 + */ + readonly bidiOutStreamCount: bigint; + /** + * @since v23.8.0 + */ + readonly uniInStreamCount: bigint; + /** + * @since v23.8.0 + */ + readonly uniOutStreamCount: bigint; + /** + * @since v23.8.0 + */ + readonly maxBytesInFlight: bigint; + /** + * @since v23.8.0 + */ + readonly bytesInFlight: bigint; + /** + * @since v23.8.0 + */ + readonly blockCount: bigint; + /** + * @since v23.8.0 + */ + readonly cwnd: bigint; + /** + * @since v23.8.0 + */ + readonly latestRtt: bigint; + /** + * @since v23.8.0 + */ + readonly minRtt: bigint; + /** + * @since v23.8.0 + */ + readonly rttVar: bigint; + /** + * @since v23.8.0 + */ + readonly smoothedRtt: bigint; + /** + * @since v23.8.0 + */ + readonly ssthresh: bigint; + /** + * @since v23.8.0 + */ + readonly datagramsReceived: bigint; + /** + * @since v23.8.0 + */ + readonly datagramsSent: bigint; + /** + * @since v23.8.0 + */ + readonly datagramsAcknowledged: bigint; + /** + * @since v23.8.0 + */ + readonly datagramsLost: bigint; + /** + * The total number of peer-initiated streams destroyed by the + * stream idle timeout. Read only. + * @since v26.3.0 + */ + readonly streamsIdleTimedOut: bigint; + } + } + interface QuicErrorOptions { + /** + * The numeric QUIC error code. Numbers + * are coerced to `BigInt`. Must be a non-negative 62-bit unsigned + * varint (`0n <= errorCode <= 2n ** 62n - 1n`). + */ + errorCode?: bigint | number | undefined; + /** + * The Node.js-style error code string assigned to + * `error.code`. Defaults to `'ERR_QUIC_STREAM_ABORTED'`. + */ + code?: string | undefined; + /** + * Either `'application'` (default) or `'transport'`. + * Indicates whether the code is defined by the negotiated + * application protocol (e.g. RFC 9114 for HTTP/3) or by the QUIC + * transport layer (RFC 9000). Stream resets always carry application + * codes, so the default is `'application'`. + */ + type?: "application" | "transport" | undefined; + } + /** + * A `QuicError` is an `Error` subclass that carries an explicit numeric + * QUIC error code. Use it to abort a QUIC stream or session with a + * specific application-protocol-defined error code rather than letting + * the implementation pick a generic fallback. + * + * The class is exported from `node:quic`: + * + * ```js + * import { QuicError } from 'node:quic'; + * ``` + * + * When a `QuicError` is supplied to APIs that emit a wire frame + * (`writer.fail()`, `stream.destroy()`), the QUIC stack uses + * `error.errorCode` as the wire code for the resulting frame. + * When any other value is supplied (for example a plain `Error`), the + * implementation falls back to the negotiated application protocol's + * "internal error" code (`H3_INTERNAL_ERROR` (`0x102`) for HTTP/3, or + * the QUIC transport-layer `INTERNAL_ERROR` (`0x1`) for raw QUIC). + * + * The Node.js error code (`error.code`) defaults to + * `'ERR_QUIC_STREAM_ABORTED'`. Callers who need a more specific code + * string can override it via `options.code` — the numeric QUIC code + * is unaffected. + * + * The Node.js error code is fixed at `'ERR_QUIC_STREAM_ABORTED'` so that + * catch blocks can distinguish a `QuicError` from other Node.js errors + * without checking the prototype chain. The numeric QUIC code lives on + * the separate `error.errorCode` property to avoid colliding with + * the Node.js convention that `error.code` is a string. + * @since v26.2.0 + * @experimental + */ + class QuicError extends Error { + /** + * ```js + * import { QuicError } from 'node:quic'; + * + * const err = new QuicError('rejecting stream', { errorCode: 0x10cn }); + * console.log(err.code); // 'ERR_QUIC_STREAM_ABORTED' + * console.log(err.errorCode); // 268n + * console.log(err.type); // 'application' + * + * const custom = new QuicError('custom failure', { + * errorCode: 0x10cn, + * code: 'ERR_MY_QUIC_FAILURE', + * }); + * console.log(custom.code); // 'ERR_MY_QUIC_FAILURE' + * ``` + * @param message A human-readable description of the error. + */ + constructor(message: string, options?: QuicErrorOptions); + /** + * The numeric QUIC error code carried by this error. + * @since v26.2.0 + */ + readonly errorCode: bigint; + /** + * Either `'application'` or `'transport'`. Indicates the namespace of + * `error.errorCode`. + * @since v26.2.0 + */ + readonly type: "application" | "transport"; + } + type StreamBody = + | null + | string + | ArrayBufferLike + | NodeJS.ArrayBufferView + | Blob + | FileHandle + | Iterable + | AsyncIterable + | Promise; + interface StreamPriority { + /** + * One of `'high'`, `'default'`, or `'low'`. + */ + level: "high" | "default" | "low"; + /** + * Whether the stream data should be interleaved + * with other streams of the same priority level. + */ + incremental: boolean; + } + interface StreamDestroyOptions { + /** + * The application error code to include in the + * `RESET_STREAM` and `STOP_SENDING` frames sent to the peer. Numbers are + * coerced to `BigInt`. When omitted, the wire code is derived from `error` + * (see below). + */ + code?: bigint | number | undefined; + /** + * An optional human-readable reason string. Accepted for + * symmetry with `session.close()` and `session.destroy()`, but + * **not transmitted on the wire** — neither `RESET_STREAM` nor + * `STOP_SENDING` carry a reason field. Provided for application logging + * and for use by the `stream.onerror` callback. + */ + reason?: string | undefined; + } + interface StreamSendHeadersOptions { + /** + * If `true`, the stream is closed for sending + * after the headers (no body will follow). **Default:** `false`. + */ + terminal?: boolean | undefined; + } + /** + * @since v23.8.0 + */ + class QuicStream { + private constructor(); + /** + * A promise that is fulfilled when the stream is fully closed. It resolves + * when the stream closes cleanly (including idle timeout). It rejects with + * an `ERR_QUIC_APPLICATION_ERROR` or `ERR_QUIC_TRANSPORT_ERROR` when the + * stream is closed due to a QUIC error (e.g., stream reset by the peer, + * CONNECTION\_CLOSE with a non-zero error code). + * @since v23.8.0 + */ + readonly closed: Promise; + /** + * Immediately and abruptly destroys the stream. If `error` is provided and + * `stream.onerror` is set, the `onerror` callback is invoked before + * destruction. The `stream.closed` promise rejects with the error. + * + * When the stream is destroyed with an `error` (or with an explicit + * `options.code`), the QUIC stack signals the abort to the peer: + * + * * If the writable side is still open, a `RESET_STREAM` frame is sent. + * * If the readable side is still open (a bidirectional stream, or a + * remote-initiated unidirectional stream), a `STOP_SENDING` frame is sent. + * + * Both frames carry the same wire code, resolved with the following + * precedence: + * + * 1. `options.code`, when explicitly provided. + * 2. [`error.errorCode`][], when `error` is a [`QuicError`][]. + * 3. The negotiated application protocol's "internal error" code + * (`H3_INTERNAL_ERROR` (`0x102`) for HTTP/3, or the QUIC transport-layer + * `INTERNAL_ERROR` (`0x1`) for raw QUIC). + * + * A clean destroy — no `error` and no `options.code` — does not emit + * `RESET_STREAM` or `STOP_SENDING`; the stream's existing close machinery + * handles teardown. + * + * See [Aborting a stream](https://nodejs.org/docs/latest-v26.x/api/quic.html#aborting-a-stream) for an overview of the available stream-abort + * APIs. + * @since v23.8.0 + */ + destroy(error?: any, options?: StreamDestroyOptions): void; + /** + * True if `stream.destroy()` has been called. + * @since v23.8.0 + */ + readonly destroyed: boolean; + /** + * True if any data on this stream was received as 0-RTT (early data) + * before the TLS handshake completed. Early data is less secure and + * could potentially be replayed by an attacker. Applications should + * treat early data with appropriate caution. + * + * This property is only meaningful on the server side. On the client + * side, it is always `false`. + * @since v26.2.0 + */ + readonly early: boolean; + /** + * The directionality of the stream, or `null` if the stream has been destroyed + * or is still pending. Read only. + * @since v23.8.0 + */ + readonly direction: "bidi" | "uni" | null; + /** + * The maximum number of bytes that the writer will buffer before + * `writeSync()` returns `false`. When the buffered data exceeds this limit, + * the caller should wait for drain before writing more. + * + * The value can be changed dynamically at any time. This is particularly + * useful for streams received via the `onstream` callback, where the + * default (65536) may need to be adjusted based on application needs. + * The valid range is `0` to `4294967295`. + * @since v26.2.0 + */ + highWaterMark: number; + /** + * The stream ID, or `null` if the stream has been destroyed or is still + * pending. Read only. + * @since v23.8.0 + */ + readonly id: bigint | null; + /** + * An optional callback invoked when the stream is destroyed with an error. + * This includes errors caused by user callbacks that throw or reject (see + * [Callback error handling](https://nodejs.org/docs/latest-26.x/api/quic.html#callback-error-handling)). The callback receives a single argument: the + * error that triggered the destruction. If the `onerror` callback itself throws + * or returns a promise that rejects, the error is surfaced as an uncaught + * exception. Read/write. + * @since v26.2.0 + */ + onerror: ((this: QuicStream, error: any) => void) | undefined; + /** + * The callback to invoke when the stream is blocked. Read/write. + * @since v23.8.0 + */ + onblocked: OnBlockedCallback | undefined; + /** + * The callback to invoke when the peer aborts a direction of the stream by + * sending a `RESET_STREAM` frame (the peer abandons their writable side, so + * no further data will arrive on our readable side) or a `STOP_SENDING` + * frame (the peer asks us to stop writing on our writable side). + * + * The callback receives a Node.js error whose `errorCode` (`bigint`) + * property carries the application error code from the wire frame. + * + * The stream is **not** automatically destroyed when this callback fires — + * the application chooses how to react. Common patterns are: ignore (and + * continue using the still-active direction on a bidirectional stream), + * abort the other direction with `writer.fail()`, or tear down the + * whole stream with `stream.destroy()`. Read/write. + * @since v23.8.0 + */ + onreset: OnStreamErrorCallback | undefined; + /** + * The buffered initial headers received on this stream, or `undefined` if the + * application does not support headers or no headers have been received yet. + * For server-side streams, this contains the request headers (e.g., `:method`, + * `:path`, `:scheme`). For client-side streams, this contains the response + * headers (e.g., `:status`). + * + * Header names are lowercase strings. Multi-value headers are represented as + * arrays. The object has `__proto__: null`. + * @since v26.2.0 + */ + readonly headers: NodeJS.Dict | undefined; + /** + * The callback to invoke when initial headers are received on the stream. The + * callback receives `(headers)` where `headers` is an object (same format as + * `stream.headers`). For HTTP/3, this delivers request pseudo-headers on the + * server side and response headers on the client side. Throws + * `ERR_INVALID_STATE` if set on a session that does not support headers. + * Read/write. + * @since v26.2.0 + */ + onheaders: ((this: QuicStream, headers: NodeJS.Dict) => void) | undefined; + /** + * The callback to invoke when trailing headers are received from the peer. + * The callback receives `(trailers)` where `trailers` is an object in the + * same format as `stream.headers`. Throws `ERR_INVALID_STATE` if set on a + * session that does not support headers. Read/write. + * @since v26.2.0 + */ + ontrailers: ((this: QuicStream, trailers: NodeJS.Dict) => void) | undefined; + /** + * The callback to invoke when informational (1xx) headers are received from + * the server. The callback receives `(headers)` where `headers` is an object + * in the same format as `stream.headers`. Informational headers are sent + * before the final response (e.g., 103 Early Hints). Throws + * `ERR_INVALID_STATE` if set on a session that does not support headers. + * Read/write. + * @since v26.2.0 + */ + oninfo: ((this: QuicStream, headers: NodeJS.Dict) => void) | undefined; + /** + * The callback to invoke when the application is ready for trailing headers + * to be sent. This is called synchronously — the user must call + * `stream.sendTrailers()` within this callback. Throws + * `ERR_INVALID_STATE` if set on a session that does not support headers. + * Read/write. + * @since v26.2.0 + */ + onwanttrailers: ((this: QuicStream) => void) | undefined; + /** + * Set trailing headers to be sent automatically when the application requests + * them. This is an alternative to the `stream.onwanttrailers` callback + * for cases where the trailers are known before the body completes. Throws + * `ERR_INVALID_STATE` if set on a session that does not support headers. + * Read/write. + * @since v26.2.0 + */ + pendingTrailers: NodeJS.Dict | undefined; + /** + * Sends initial or response headers on the stream. For client-side streams, + * this sends request headers. For server-side streams, this sends response + * headers. Throws `ERR_INVALID_STATE` if the session does not support headers. + * @since v26.2.0 + * @param headers Header object with string keys and string or + * string-array values. Pseudo-headers (`:method`, `:path`, etc.) must + * appear before regular headers. + */ + sendHeaders(headers: NodeJS.Dict, options?: StreamSendHeadersOptions): boolean; + /** + * Sends informational (1xx) response headers. Server only. Throws + * `ERR_INVALID_STATE` if the session does not support headers. + * @since v26.2.0 + * @param headers Header object. Must include `:status` with a 1xx + * value (e.g., `{ ':status': '103', 'link': '; rel=preload' }`). + */ + sendInformationalHeaders(headers: NodeJS.Dict): boolean; + /** + * Sends trailing headers on the stream. Must be called synchronously during + * the `stream.onwanttrailers` callback, or set ahead of time via + * `stream.pendingTrailers`. Throws `ERR_INVALID_STATE` if the session + * does not support headers. + * @since v26.2.0 + * @param headers Trailing header object. Pseudo-headers must not be + * included in trailers. + */ + sendTrailers(headers: NodeJS.Dict): boolean; + /** + * The current priority of the stream. Returns `null` if the session does not + * support priority (e.g. non-HTTP/3) or if the stream has been destroyed. + * Read only. Use `stream.setPriority()` to change the priority. + * + * On client-side HTTP/3 sessions, the value reflects what was set via + * `stream.setPriority()`. On server-side HTTP/3 sessions, the value + * reflects the peer's requested priority (e.g., from `PRIORITY_UPDATE` frames). + * @since v26.2.0 + */ + readonly priority: StreamPriority | null; + /** + * Sets the priority of the stream. Throws `ERR_INVALID_STATE` if the session + * does not support priority (e.g. non-HTTP/3). Has no effect if the stream + * has been destroyed. + * @since v26.2.0 + */ + setPriority(options?: NodeJS.PartialOptions): void; + /** + * The stream implements `Symbol.asyncIterator`, making it directly usable + * in `for await...of` loops. Each iteration yields a batch of `Uint8Array` + * chunks. + * + * Only one async iterator can be obtained per stream. A second call throws + * `ERR_INVALID_STATE`. Non-readable streams (outbound-only unidirectional + * or closed) return an immediately-finished iterator. + * + * ```js + * for await (const chunks of stream) { + * for (const chunk of chunks) { + * // Process each Uint8Array chunk + * } + * } + * ``` + * + * Compatible with stream/iter utilities: + * + * ```js + * import Stream from 'node:stream/iter'; + * const body = await Stream.bytes(stream); + * const text = await Stream.text(stream); + * await Stream.pipeTo(stream, someWriter); + * ``` + * @since v26.2.0 + */ + [Symbol.asyncIterator](): NodeJS.AsyncIterator; + /** + * Returns a Writer object for pushing data to the stream incrementally. + * The Writer implements the stream/iter Writer interface with the + * try-sync-fallback-to-async pattern. + * + * Only available when no `body` source was provided at creation time or via + * `stream.setBody()`. Non-writable streams return an already-closed + * Writer. Throws `ERR_INVALID_STATE` if the outbound is already configured. + * + * The Writer has the following methods: + * + * * `writeSync(chunk)` — Synchronous write. Returns `true` if accepted, + * `false` if flow-controlled. Data is NOT accepted on `false`. + * * `write(chunk[, options])` — Async write with drain wait. `options.signal` + * is checked at entry but not observed during the write. + * * `writevSync(chunks)` — Synchronous vectored write. All-or-nothing. + * * `writev(chunks[, options])` — Async vectored write. + * * `endSync()` — Synchronous close. Returns total bytes or `-1`. + * * `end([options])` — Async close. + * * `fail(reason)` — Errors the stream (sends `RESET_STREAM` to peer). + * When `reason` is a `QuicError`, its `error.errorCode` is used + * as the wire code on the resulting `RESET_STREAM` frame; otherwise + * the wire code falls back to the negotiated application protocol's + * "internal error" code (`H3_INTERNAL_ERROR` (`0x102`) for HTTP/3, or + * the QUIC transport-layer `INTERNAL_ERROR` (`0x1`) for raw QUIC). + * See `stream.destroy()` for a full-stream abort that also resets + * the readable side via `STOP_SENDING`. + * * `desiredSize` — Available capacity in bytes, or `null` if closed/errored. + * + * The bytes from each `writeSync()` / `writevSync()` / `write()` / `writev()` + * input chunk are copied into an internal buffer, so the caller's source + * buffer is unchanged and may be reused or mutated immediately after the + * call returns. Callers that want to ensure a source buffer cannot be + * mutated after handing it off can call `ArrayBuffer.prototype.transfer()` + * themselves before passing the buffer. + * @since v26.2.0 + */ + readonly writer: Writer; + /** + * Sets the outbound body source for the stream. Can only be called once. + * Mutually exclusive with `stream.writer`. + * + * The following body source types are supported: + * + * * `null` — The writable side is closed immediately (FIN sent with no data). + * * `string` — UTF-8 encoded and sent as a single chunk. + * * `ArrayBuffer`, `SharedArrayBuffer`, `ArrayBufferView` — Sent as a single + * chunk. The bytes are copied into an internal buffer, so the caller's + * source buffer is unchanged and may be reused or mutated immediately + * after the call returns. Callers wanting to ensure their source cannot + * be mutated after handing it off can call + * `ArrayBuffer.prototype.transfer()` themselves before passing the buffer. + * * `Blob` — Sent from the Blob's underlying data queue. + * * {FileHandle} — The file contents are read asynchronously via an + * fd-backed data source. The `FileHandle` must be opened for reading + * (e.g. via [`fs.promises.open(path, 'r')`][]). Once passed as a body, the + * `FileHandle` is locked and cannot be used as a body for another stream. + * The `FileHandle` is automatically closed when the stream finishes. + * * `AsyncIterable`, `Iterable` — Each yielded chunk (string or + * `Uint8Array`) is written incrementally in streaming mode. + * * `Promise` — Awaited; the resolved value is used as the body (subject + * to the same type rules). + * + * Throws `ERR_INVALID_STATE` if the outbound is already configured or if + * the writer has been accessed. + * @since v26.2.0 + */ + setBody(body: StreamBody): void; + /** + * The session that created this stream, or `null` if the stream has been + * destroyed. Read only. + * @since v23.8.0 + */ + readonly session: QuicSession | null; + /** + * The current statistics for the stream. Read only. + * @since v23.8.0 + */ + readonly stats: QuicStream.Stats; + } + namespace QuicStream { + /** + * @since v23.8.0 + */ + class Stats { + private constructor(); + /** + * @since v23.8.0 + */ + readonly ackedAt: bigint; + /** + * @since v23.8.0 + */ + readonly bytesReceived: bigint; + /** + * @since v23.8.0 + */ + readonly bytesSent: bigint; + /** + * @since v23.8.0 + */ + readonly createdAt: bigint; + /** + * @since v23.8.0 + */ + readonly destroyedAt: bigint; + /** + * @since v23.8.0 + */ + readonly finalSize: bigint; + /** + * @since v23.8.0 + */ + readonly isConnected: bigint; + /** + * @since v23.8.0 + */ + readonly maxOffset: bigint; + /** + * @since v23.8.0 + */ + readonly maxOffsetAcknowledged: bigint; + /** + * @since v23.8.0 + */ + readonly maxOffsetReceived: bigint; + /** + * @since v23.8.0 + */ + readonly openedAt: bigint; + /** + * @since v23.8.0 + */ + readonly receivedAt: bigint; + } + } + /** + * An object containing commonly used constants for QUIC configuration. + * @since v26.2.0 + */ + namespace constants { + /** + * Congestion control algorithm identifiers, for use with the + * `sessionOptions.cc` option: + * + * * `quic.constants.cc.RENO` — Reno congestion control. + * * `quic.constants.cc.CUBIC` — CUBIC congestion control. + * * `quic.constants.cc.BBR` — BBR congestion control. + */ + enum cc { + RENO = "reno", + CUBIC = "cubic", + BBR = "bbr", + } + /** + * The default TLS 1.3 cipher suite list used when `sessionOptions.ciphers` + * is not specified. + */ + const DEFAULT_CIPHERS: string; + /** + * The default TLS 1.3 key-exchange group list used when + * `sessionOptions.groups` is not specified. + */ + const DEFAULT_GROUPS: string; + } +} diff --git a/node_modules/@types/node/readline.d.ts b/node_modules/@types/node/readline.d.ts new file mode 100644 index 0000000..a9ad29d --- /dev/null +++ b/node_modules/@types/node/readline.d.ts @@ -0,0 +1,508 @@ +declare module "node:readline" { + import { Abortable, EventEmitter, InternalEventEmitter } from "node:events"; + interface Key { + sequence?: string | undefined; + name?: string | undefined; + ctrl?: boolean | undefined; + meta?: boolean | undefined; + shift?: boolean | undefined; + } + interface InterfaceEventMap { + "close": []; + "error": [error: Error]; + "history": [history: string[]]; + "line": [input: string]; + "pause": []; + "resume": []; + "SIGCONT": []; + "SIGINT": []; + "SIGTSTP": []; + } + /** + * Instances of the `readline.Interface` class are constructed using the `readline.createInterface()` method. Every instance is associated with a + * single `input` [Readable](https://nodejs.org/docs/latest-v26.x/api/stream.html#readable-streams) stream and a single `output` [Writable](https://nodejs.org/docs/latest-v26.x/api/stream.html#writable-streams) stream. + * The `output` stream is used to print prompts for user input that arrives on, + * and is read from, the `input` stream. + * @since v0.1.104 + */ + class Interface implements EventEmitter, Disposable { + /** + * NOTE: According to the documentation: + * + * > Instances of the `readline.Interface` class are constructed using the + * > `readline.createInterface()` method. + * + * @see https://nodejs.org/dist/latest-v26.x/docs/api/readline.html#class-interfaceconstructor + */ + protected constructor( + input: NodeJS.ReadableStream, + output?: NodeJS.WritableStream, + completer?: Completer | AsyncCompleter, + terminal?: boolean, + ); + /** + * NOTE: According to the documentation: + * + * > Instances of the `readline.Interface` class are constructed using the + * > `readline.createInterface()` method. + * + * @see https://nodejs.org/dist/latest-v26.x/docs/api/readline.html#class-interfaceconstructor + */ + protected constructor(options: ReadLineOptions); + readonly terminal: boolean; + /** + * The current input data being processed by node. + * + * This can be used when collecting input from a TTY stream to retrieve the + * current value that has been processed thus far, prior to the `line` event + * being emitted. Once the `line` event has been emitted, this property will + * be an empty string. + * + * Be aware that modifying the value during the instance runtime may have + * unintended consequences if `rl.cursor` is not also controlled. + * + * **If not using a TTY stream for input, use the `'line'` event.** + * + * One possible use case would be as follows: + * + * ```js + * const values = ['lorem ipsum', 'dolor sit amet']; + * const rl = readline.createInterface(process.stdin); + * const showResults = debounce(() => { + * console.log( + * '\n', + * values.filter((val) => val.startsWith(rl.line)).join(' '), + * ); + * }, 300); + * process.stdin.on('keypress', (c, k) => { + * showResults(); + * }); + * ``` + * @since v0.1.98 + */ + readonly line: string; + /** + * The cursor position relative to `rl.line`. + * + * This will track where the current cursor lands in the input string, when + * reading input from a TTY stream. The position of cursor determines the + * portion of the input string that will be modified as input is processed, + * as well as the column where the terminal caret will be rendered. + * @since v0.1.98 + */ + readonly cursor: number; + /** + * The `rl.getPrompt()` method returns the current prompt used by `rl.prompt()`. + * @since v15.3.0, v14.17.0 + * @return the current prompt string + */ + getPrompt(): string; + /** + * The `rl.setPrompt()` method sets the prompt that will be written to `output` whenever `rl.prompt()` is called. + * @since v0.1.98 + */ + setPrompt(prompt: string): void; + /** + * The `rl.prompt()` method writes the `Interface` instances configured`prompt` to a new line in `output` in order to provide a user with a new + * location at which to provide input. + * + * When called, `rl.prompt()` will resume the `input` stream if it has been + * paused. + * + * If the `Interface` was created with `output` set to `null` or `undefined` the prompt is not written. + * @since v0.1.98 + * @param preserveCursor If `true`, prevents the cursor placement from being reset to `0`. + */ + prompt(preserveCursor?: boolean): void; + /** + * The `rl.question()` method displays the `query` by writing it to the `output`, + * waits for user input to be provided on `input`, then invokes the `callback` function passing the provided input as the first argument. + * + * When called, `rl.question()` will resume the `input` stream if it has been + * paused. + * + * If the `Interface` was created with `output` set to `null` or `undefined` the `query` is not written. + * + * The `callback` function passed to `rl.question()` does not follow the typical + * pattern of accepting an `Error` object or `null` as the first argument. + * The `callback` is called with the provided answer as the only argument. + * + * An error will be thrown if calling `rl.question()` after `rl.close()`. + * + * Example usage: + * + * ```js + * rl.question('What is your favorite food? ', (answer) => { + * console.log(`Oh, so your favorite food is ${answer}`); + * }); + * ``` + * + * Using an `AbortController` to cancel a question. + * + * ```js + * const ac = new AbortController(); + * const signal = ac.signal; + * + * rl.question('What is your favorite food? ', { signal }, (answer) => { + * console.log(`Oh, so your favorite food is ${answer}`); + * }); + * + * signal.addEventListener('abort', () => { + * console.log('The food question timed out'); + * }, { once: true }); + * + * setTimeout(() => ac.abort(), 10000); + * ``` + * @since v0.3.3 + * @param query A statement or query to write to `output`, prepended to the prompt. + * @param callback A callback function that is invoked with the user's input in response to the `query`. + */ + question(query: string, callback: (answer: string) => void): void; + question(query: string, options: Abortable, callback: (answer: string) => void): void; + /** + * The `rl.pause()` method pauses the `input` stream, allowing it to be resumed + * later if necessary. + * + * Calling `rl.pause()` does not immediately pause other events (including `'line'`) from being emitted by the `Interface` instance. + * @since v0.3.4 + */ + pause(): this; + /** + * The `rl.resume()` method resumes the `input` stream if it has been paused. + * @since v0.3.4 + */ + resume(): this; + /** + * The `rl.close()` method closes the `Interface` instance and + * relinquishes control over the `input` and `output` streams. When called, + * the `'close'` event will be emitted. + * + * Calling `rl.close()` does not immediately stop other events (including `'line'`) + * from being emitted by the `Interface` instance. + * @since v0.1.98 + */ + close(): void; + /** + * Alias for `rl.close()`. + * @since v22.15.0 + */ + [Symbol.dispose](): void; + /** + * The `rl.write()` method will write either `data` or a key sequence identified + * by `key` to the `output`. The `key` argument is supported only if `output` is + * a `TTY` text terminal. See `TTY keybindings` for a list of key + * combinations. + * + * If `key` is specified, `data` is ignored. + * + * When called, `rl.write()` will resume the `input` stream if it has been + * paused. + * + * If the `Interface` was created with `output` set to `null` or `undefined` the `data` and `key` are not written. + * + * ```js + * rl.write('Delete this!'); + * // Simulate Ctrl+U to delete the line written previously + * rl.write(null, { ctrl: true, name: 'u' }); + * ``` + * + * The `rl.write()` method will write the data to the `readline` `Interface`'s `input` _as if it were provided by the user_. + * @since v0.1.98 + */ + write(data: string | Buffer, key?: Key): void; + write(data: undefined | null | string | Buffer, key: Key): void; + /** + * Returns the real position of the cursor in relation to the input + * prompt + string. Long input (wrapping) strings, as well as multiple + * line prompts are included in the calculations. + * @since v13.5.0, v12.16.0 + */ + getCursorPos(): CursorPos; + [Symbol.asyncIterator](): NodeJS.AsyncIterator; + } + interface Interface extends InternalEventEmitter {} + type Completer = (line: string) => CompleterResult; + type AsyncCompleter = ( + line: string, + callback: (err?: null | Error, result?: CompleterResult) => void, + ) => void; + type CompleterResult = [string[], string]; + interface ReadLineOptions { + /** + * The [`Readable`](https://nodejs.org/docs/latest-v26.x/api/stream.html#readable-streams) stream to listen to + */ + input: NodeJS.ReadableStream; + /** + * The [`Writable`](https://nodejs.org/docs/latest-v26.x/api/stream.html#writable-streams) stream to write readline data to. + */ + output?: NodeJS.WritableStream | undefined; + /** + * An optional function used for Tab autocompletion. + */ + completer?: Completer | AsyncCompleter | undefined; + /** + * `true` if the `input` and `output` streams should be treated like a TTY, + * and have ANSI/VT100 escape codes written to it. + * Default: checking `isTTY` on the `output` stream upon instantiation. + */ + terminal?: boolean | undefined; + /** + * Initial list of history lines. + * This option makes sense only if `terminal` is set to `true` by the user or by an internal `output` check, + * otherwise the history caching mechanism is not initialized at all. + * @default [] + */ + history?: string[] | undefined; + /** + * Maximum number of history lines retained. + * To disable the history set this value to `0`. + * This option makes sense only if `terminal` is set to `true` by the user or by an internal `output` check, + * otherwise the history caching mechanism is not initialized at all. + * @default 30 + */ + historySize?: number | undefined; + /** + * If `true`, when a new input line added to the history list duplicates an older one, + * this removes the older line from the list. + * @default false + */ + removeHistoryDuplicates?: boolean | undefined; + /** + * The prompt string to use. + * @default "> " + */ + prompt?: string | undefined; + /** + * If the delay between `\r` and `\n` exceeds `crlfDelay` milliseconds, + * both `\r` and `\n` will be treated as separate end-of-line input. + * `crlfDelay` will be coerced to a number no less than `100`. + * It can be set to `Infinity`, in which case + * `\r` followed by `\n` will always be considered a single newline + * (which may be reasonable for [reading files](https://nodejs.org/docs/latest-v26.x/api/readline.html#example-read-file-stream-line-by-line) with `\r\n` line delimiter). + * @default 100 + */ + crlfDelay?: number | undefined; + /** + * The duration `readline` will wait for a character + * (when reading an ambiguous key sequence in milliseconds + * one that can both form a complete key sequence using the input read so far + * and can take additional input to complete a longer key sequence). + * @default 500 + */ + escapeCodeTimeout?: number | undefined; + /** + * The number of spaces a tab is equal to (minimum 1). + * @default 8 + */ + tabSize?: number | undefined; + /** + * Allows closing the interface using an AbortSignal. + * Aborting the signal will internally call `close` on the interface. + */ + signal?: AbortSignal | undefined; + } + /** + * The `readline.createInterface()` method creates a new `readline.Interface` instance. + * + * ```js + * import readline from 'node:readline'; + * const rl = readline.createInterface({ + * input: process.stdin, + * output: process.stdout, + * }); + * ``` + * + * Once the `readline.Interface` instance is created, the most common case is to + * listen for the `'line'` event: + * + * ```js + * rl.on('line', (line) => { + * console.log(`Received: ${line}`); + * }); + * ``` + * + * If `terminal` is `true` for this instance then the `output` stream will get + * the best compatibility if it defines an `output.columns` property and emits + * a `'resize'` event on the `output` if or when the columns ever change + * (`process.stdout` does this automatically when it is a TTY). + * + * When creating a `readline.Interface` using `stdin` as input, the program + * will not terminate until it receives an [EOF character](https://en.wikipedia.org/wiki/End-of-file#EOF_character). To exit without + * waiting for user input, call `process.stdin.unref()`. + * @since v0.1.98 + */ + function createInterface( + input: NodeJS.ReadableStream, + output?: NodeJS.WritableStream, + completer?: Completer | AsyncCompleter, + terminal?: boolean, + ): Interface; + function createInterface(options: ReadLineOptions): Interface; + /** + * The `readline.emitKeypressEvents()` method causes the given `Readable` stream to begin emitting `'keypress'` events corresponding to received input. + * + * Optionally, `interface` specifies a `readline.Interface` instance for which + * autocompletion is disabled when copy-pasted input is detected. + * + * If the `stream` is a `TTY`, then it must be in raw mode. + * + * This is automatically called by any readline instance on its `input` if the `input` is a terminal. Closing the `readline` instance does not stop + * the `input` from emitting `'keypress'` events. + * + * ```js + * readline.emitKeypressEvents(process.stdin); + * if (process.stdin.isTTY) + * process.stdin.setRawMode(true); + * ``` + * + * ## Example: Tiny CLI + * + * The following example illustrates the use of `readline.Interface` class to + * implement a small command-line interface: + * + * ```js + * import readline from 'node:readline'; + * const rl = readline.createInterface({ + * input: process.stdin, + * output: process.stdout, + * prompt: 'OHAI> ', + * }); + * + * rl.prompt(); + * + * rl.on('line', (line) => { + * switch (line.trim()) { + * case 'hello': + * console.log('world!'); + * break; + * default: + * console.log(`Say what? I might have heard '${line.trim()}'`); + * break; + * } + * rl.prompt(); + * }).on('close', () => { + * console.log('Have a great day!'); + * process.exit(0); + * }); + * ``` + * + * ## Example: Read file stream line-by-Line + * + * A common use case for `readline` is to consume an input file one line at a + * time. The easiest way to do so is leveraging the `fs.ReadStream` API as + * well as a `for await...of` loop: + * + * ```js + * import fs from 'node:fs'; + * import readline from 'node:readline'; + * + * async function processLineByLine() { + * const fileStream = fs.createReadStream('input.txt'); + * + * const rl = readline.createInterface({ + * input: fileStream, + * crlfDelay: Infinity, + * }); + * // Note: we use the crlfDelay option to recognize all instances of CR LF + * // ('\r\n') in input.txt as a single line break. + * + * for await (const line of rl) { + * // Each line in input.txt will be successively available here as `line`. + * console.log(`Line from file: ${line}`); + * } + * } + * + * processLineByLine(); + * ``` + * + * Alternatively, one could use the `'line'` event: + * + * ```js + * import fs from 'node:fs'; + * import readline from 'node:readline'; + * + * const rl = readline.createInterface({ + * input: fs.createReadStream('sample.txt'), + * crlfDelay: Infinity, + * }); + * + * rl.on('line', (line) => { + * console.log(`Line from file: ${line}`); + * }); + * ``` + * + * Currently, `for await...of` loop can be a bit slower. If `async` / `await` flow and speed are both essential, a mixed approach can be applied: + * + * ```js + * import { once } from 'node:events'; + * import { createReadStream } from 'node:fs'; + * import { createInterface } from 'node:readline'; + * + * (async function processLineByLine() { + * try { + * const rl = createInterface({ + * input: createReadStream('big-file.txt'), + * crlfDelay: Infinity, + * }); + * + * rl.on('line', (line) => { + * // Process the line. + * }); + * + * await once(rl, 'close'); + * + * console.log('File processed.'); + * } catch (err) { + * console.error(err); + * } + * })(); + * ``` + * @since v0.7.7 + */ + function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void; + type Direction = -1 | 0 | 1; + interface CursorPos { + rows: number; + cols: number; + } + /** + * The `readline.clearLine()` method clears current line of given [TTY](https://nodejs.org/docs/latest-v26.x/api/tty.html) stream + * in a specified direction identified by `dir`. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean; + /** + * The `readline.clearScreenDown()` method clears the given [TTY](https://nodejs.org/docs/latest-v26.x/api/tty.html) stream from + * the current position of the cursor down. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean; + /** + * The `readline.cursorTo()` method moves cursor to the specified position in a + * given [TTY](https://nodejs.org/docs/latest-v26.x/api/tty.html) `stream`. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean; + /** + * The `readline.moveCursor()` method moves the cursor _relative_ to its current + * position in a given [TTY](https://nodejs.org/docs/latest-v26.x/api/tty.html) `stream`. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean; + /** @deprecated This alias will be removed in a future version. Use `import { Interface } from 'node:readline'` instead. */ + type ReadLine = Interface; +} +declare module "node:readline" { + export * as promises from "node:readline/promises"; +} +declare module "readline" { + export * from "node:readline"; +} diff --git a/node_modules/@types/node/readline/promises.d.ts b/node_modules/@types/node/readline/promises.d.ts new file mode 100644 index 0000000..ccee490 --- /dev/null +++ b/node_modules/@types/node/readline/promises.d.ts @@ -0,0 +1,158 @@ +declare module "node:readline/promises" { + import { Abortable } from "node:events"; + import { + CompleterResult, + Direction, + Interface as _Interface, + ReadLineOptions as _ReadLineOptions, + } from "node:readline"; + /** + * Instances of the `readlinePromises.Interface` class are constructed using the `readlinePromises.createInterface()` method. Every instance is associated with a + * single `input` `Readable` stream and a single `output` `Writable` stream. + * The `output` stream is used to print prompts for user input that arrives on, + * and is read from, the `input` stream. + * @since v17.0.0 + */ + class Interface extends _Interface { + /** + * The `rl.question()` method displays the `query` by writing it to the `output`, + * waits for user input to be provided on `input`, then invokes the `callback` function passing the provided input as the first argument. + * + * When called, `rl.question()` will resume the `input` stream if it has been + * paused. + * + * If the `Interface` was created with `output` set to `null` or `undefined` the `query` is not written. + * + * If the question is called after `rl.close()`, it returns a rejected promise. + * + * Example usage: + * + * ```js + * const answer = await rl.question('What is your favorite food? '); + * console.log(`Oh, so your favorite food is ${answer}`); + * ``` + * + * Using an `AbortSignal` to cancel a question. + * + * ```js + * const signal = AbortSignal.timeout(10_000); + * + * signal.addEventListener('abort', () => { + * console.log('The food question timed out'); + * }, { once: true }); + * + * const answer = await rl.question('What is your favorite food? ', { signal }); + * console.log(`Oh, so your favorite food is ${answer}`); + * ``` + * @since v17.0.0 + * @param query A statement or query to write to `output`, prepended to the prompt. + * @return A promise that is fulfilled with the user's input in response to the `query`. + */ + question(query: string): Promise; + question(query: string, options: Abortable): Promise; + } + /** + * @since v17.0.0 + */ + class Readline { + /** + * @param stream A TTY stream. + */ + constructor( + stream: NodeJS.WritableStream, + options?: { + autoCommit?: boolean | undefined; + }, + ); + /** + * The `rl.clearLine()` method adds to the internal list of pending action an + * action that clears current line of the associated `stream` in a specified + * direction identified by `dir`. + * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. + * @since v17.0.0 + * @return this + */ + clearLine(dir: Direction): this; + /** + * The `rl.clearScreenDown()` method adds to the internal list of pending action an + * action that clears the associated stream from the current position of the + * cursor down. + * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. + * @since v17.0.0 + * @return this + */ + clearScreenDown(): this; + /** + * The `rl.commit()` method sends all the pending actions to the associated `stream` and clears the internal list of pending actions. + * @since v17.0.0 + */ + commit(): Promise; + /** + * The `rl.cursorTo()` method adds to the internal list of pending action an action + * that moves cursor to the specified position in the associated `stream`. + * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. + * @since v17.0.0 + * @return this + */ + cursorTo(x: number, y?: number): this; + /** + * The `rl.moveCursor()` method adds to the internal list of pending action an + * action that moves the cursor _relative_ to its current position in the + * associated `stream`. + * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. + * @since v17.0.0 + * @return this + */ + moveCursor(dx: number, dy: number): this; + /** + * The `rl.rollback` methods clears the internal list of pending actions without + * sending it to the associated `stream`. + * @since v17.0.0 + * @return this + */ + rollback(): this; + } + type Completer = (line: string) => CompleterResult | Promise; + interface ReadLineOptions extends Omit<_ReadLineOptions, "completer"> { + /** + * An optional function used for Tab autocompletion. + */ + completer?: Completer | undefined; + } + /** + * The `readlinePromises.createInterface()` method creates a new `readlinePromises.Interface` instance. + * + * ```js + * import readlinePromises from 'node:readline/promises'; + * const rl = readlinePromises.createInterface({ + * input: process.stdin, + * output: process.stdout, + * }); + * ``` + * + * Once the `readlinePromises.Interface` instance is created, the most common case + * is to listen for the `'line'` event: + * + * ```js + * rl.on('line', (line) => { + * console.log(`Received: ${line}`); + * }); + * ``` + * + * If `terminal` is `true` for this instance then the `output` stream will get + * the best compatibility if it defines an `output.columns` property and emits + * a `'resize'` event on the `output` if or when the columns ever change + * (`process.stdout` does this automatically when it is a TTY). + * @since v17.0.0 + */ + function createInterface( + input: NodeJS.ReadableStream, + output?: NodeJS.WritableStream, + completer?: Completer, + terminal?: boolean, + ): Interface; + function createInterface(options: ReadLineOptions): Interface; +} +declare module "readline/promises" { + export * from "node:readline/promises"; +} diff --git a/node_modules/@types/node/repl.d.ts b/node_modules/@types/node/repl.d.ts new file mode 100644 index 0000000..33e2fe9 --- /dev/null +++ b/node_modules/@types/node/repl.d.ts @@ -0,0 +1,420 @@ +declare module "node:repl" { + import { AsyncCompleter, Completer, Interface, InterfaceEventMap } from "node:readline"; + import { InspectOptions } from "node:util"; + import { Context } from "node:vm"; + interface ReplOptions { + /** + * The input prompt to display. + * @default "> " + */ + prompt?: string | undefined; + /** + * The `Readable` stream from which REPL input will be read. + * @default process.stdin + */ + input?: NodeJS.ReadableStream | undefined; + /** + * The `Writable` stream to which REPL output will be written. + * @default process.stdout + */ + output?: NodeJS.WritableStream | undefined; + /** + * If `true`, specifies that the output should be treated as a TTY terminal, and have + * ANSI/VT100 escape codes written to it. + * Default: checking the value of the `isTTY` property on the output stream upon + * instantiation. + */ + terminal?: boolean | undefined; + /** + * The function to be used when evaluating each given line of input. + * **Default:** an async wrapper for the JavaScript `eval()` function. An `eval` function can + * error with `repl.Recoverable` to indicate the input was incomplete and prompt for + * additional lines. See the [custom evaluation functions](https://nodejs.org/dist/latest-v26.x/docs/api/repl.html#custom-evaluation-functions) + * section for more details. + */ + eval?: REPLEval | undefined; + /** + * Defines if the repl prints output previews or not. + * @default `true` Always `false` in case `terminal` is falsy. + */ + preview?: boolean | undefined; + /** + * If `true`, specifies that the default `writer` function should include ANSI color + * styling to REPL output. If a custom `writer` function is provided then this has no + * effect. + * @default the REPL instance's `terminal` value + */ + useColors?: boolean | undefined; + /** + * If `true`, specifies that the default evaluation function will use the JavaScript + * `global` as the context as opposed to creating a new separate context for the REPL + * instance. The node CLI REPL sets this value to `true`. + * @default false + */ + useGlobal?: boolean | undefined; + /** + * If `true`, specifies that the default writer will not output the return value of a + * command if it evaluates to `undefined`. + * @default false + */ + ignoreUndefined?: boolean | undefined; + /** + * The function to invoke to format the output of each command before writing to `output`. + * @default a wrapper for `util.inspect` + * + * @see https://nodejs.org/dist/latest-v26.x/docs/api/repl.html#repl_customizing_repl_output + */ + writer?: REPLWriter | undefined; + /** + * An optional function used for custom Tab auto completion. + * + * @see https://nodejs.org/dist/latest-v26.x/docs/api/readline.html#readline_use_of_the_completer_function + */ + completer?: Completer | AsyncCompleter | undefined; + /** + * A flag that specifies whether the default evaluator executes all JavaScript commands in + * strict mode or default (sloppy) mode. + * Accepted values are: + * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode. + * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to + * prefacing every repl statement with `'use strict'`. + */ + replMode?: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT | undefined; + /** + * Stop evaluating the current piece of code when `SIGINT` is received, i.e. `Ctrl+C` is + * pressed. This cannot be used together with a custom `eval` function. + * @default false + */ + breakEvalOnSigint?: boolean | undefined; + /** + * This function customizes error handling in the REPL. + * It receives the thrown exception as its first argument and must return one + * of the following values synchronously: + * * `'print'` to print the error to the output stream (default behavior). + * * `'ignore'` to skip all remaining error handling. + * * `'unhandled'` to treat the exception as fully unhandled. In this case, + * the error will be passed to process-wide exception handlers, such as + * the `'uncaughtException'` event. + * The `'unhandled'` value may or may not be desirable in situations + * where the `REPLServer` instance has been closed, depending on the particular + * use case. + * @since v25.9.0 + */ + handleError?: ((err: unknown) => "print" | "ignore" | "unhandled") | undefined; + } + type REPLEval = ( + this: REPLServer, + evalCmd: string, + context: Context, + file: string, + cb: (err: Error | null, result: any) => void, + ) => void; + type REPLWriter = (this: REPLServer, obj: any) => string; + /** + * This is the default "writer" value, if none is passed in the REPL options, + * and it can be overridden by custom print functions. + */ + const writer: REPLWriter & { + options: InspectOptions; + }; + type REPLCommandAction = (this: REPLServer, text: string) => void; + interface REPLCommand { + /** + * Help text to be displayed when `.help` is entered. + */ + help?: string | undefined; + /** + * The function to execute, optionally accepting a single string argument. + */ + action: REPLCommandAction; + } + interface REPLServerSetupHistoryOptions { + filePath?: string | undefined; + size?: number | undefined; + removeHistoryDuplicates?: boolean | undefined; + onHistoryFileLoaded?: ((err: Error | null, repl: REPLServer) => void) | undefined; + } + interface REPLServerEventMap extends InterfaceEventMap { + "exit": []; + "reset": [context: Context]; + } + /** + * Instances of `repl.REPLServer` are created using the {@link start} method + * or directly using the JavaScript `new` keyword. + * + * ```js + * import repl from 'node:repl'; + * + * const options = { useColors: true }; + * + * const firstInstance = repl.start(options); + * const secondInstance = new repl.REPLServer(options); + * ``` + * @since v0.1.91 + */ + class REPLServer extends Interface { + /** + * NOTE: According to the documentation: + * + * > Instances of `repl.REPLServer` are created using the `repl.start()` method and + * > _should not_ be created directly using the JavaScript `new` keyword. + * + * `REPLServer` cannot be subclassed due to implementation specifics in NodeJS. + * + * @see https://nodejs.org/dist/latest-v26.x/docs/api/repl.html#repl_class_replserver + */ + private constructor(); + /** + * The `vm.Context` provided to the `eval` function to be used for JavaScript + * evaluation. + */ + readonly context: Context; + /** + * @deprecated since v14.3.0 - Use `input` instead. + */ + readonly inputStream: NodeJS.ReadableStream; + /** + * @deprecated since v14.3.0 - Use `output` instead. + */ + readonly outputStream: NodeJS.WritableStream; + /** + * The `Readable` stream from which REPL input will be read. + */ + readonly input: NodeJS.ReadableStream; + /** + * The `Writable` stream to which REPL output will be written. + */ + readonly output: NodeJS.WritableStream; + /** + * The commands registered via `replServer.defineCommand()`. + */ + readonly commands: NodeJS.ReadOnlyDict; + /** + * A value indicating whether the REPL is currently in "editor mode". + * + * @see https://nodejs.org/dist/latest-v26.x/docs/api/repl.html#repl_commands_and_special_keys + */ + readonly editorMode: boolean; + /** + * A value indicating whether the `_` variable has been assigned. + * + * @see https://nodejs.org/dist/latest-v26.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly underscoreAssigned: boolean; + /** + * The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL). + * + * @see https://nodejs.org/dist/latest-v26.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly last: any; + /** + * A value indicating whether the `_error` variable has been assigned. + * + * @since v9.8.0 + * @see https://nodejs.org/dist/latest-v26.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly underscoreErrAssigned: boolean; + /** + * The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL). + * + * @since v9.8.0 + * @see https://nodejs.org/dist/latest-v26.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly lastError: any; + /** + * Specified in the REPL options, this is the function to be used when evaluating each + * given line of input. If not specified in the REPL options, this is an async wrapper + * for the JavaScript `eval()` function. + */ + readonly eval: REPLEval; + /** + * Specified in the REPL options, this is a value indicating whether the default + * `writer` function should include ANSI color styling to REPL output. + */ + readonly useColors: boolean; + /** + * Specified in the REPL options, this is a value indicating whether the default `eval` + * function will use the JavaScript `global` as the context as opposed to creating a new + * separate context for the REPL instance. + */ + readonly useGlobal: boolean; + /** + * Specified in the REPL options, this is a value indicating whether the default `writer` + * function should output the result of a command if it evaluates to `undefined`. + */ + readonly ignoreUndefined: boolean; + /** + * Specified in the REPL options, this is the function to invoke to format the output of + * each command before writing to `outputStream`. If not specified in the REPL options, + * this will be a wrapper for `util.inspect`. + */ + readonly writer: REPLWriter; + /** + * Specified in the REPL options, this is the function to use for custom Tab auto-completion. + */ + readonly completer: Completer | AsyncCompleter; + /** + * Specified in the REPL options, this is a flag that specifies whether the default `eval` + * function should execute all JavaScript commands in strict mode or default (sloppy) mode. + * Possible values are: + * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode. + * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to + * prefacing every repl statement with `'use strict'`. + */ + readonly replMode: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT; + /** + * The `replServer.defineCommand()` method is used to add new `.`\-prefixed commands + * to the REPL instance. Such commands are invoked by typing a `.` followed by the `keyword`. The `cmd` is either a `Function` or an `Object` with the following + * properties: + * + * The following example shows two new commands added to the REPL instance: + * + * ```js + * import repl from 'node:repl'; + * + * const replServer = repl.start({ prompt: '> ' }); + * replServer.defineCommand('sayhello', { + * help: 'Say hello', + * action(name) { + * this.clearBufferedCommand(); + * console.log(`Hello, ${name}!`); + * this.displayPrompt(); + * }, + * }); + * replServer.defineCommand('saybye', function saybye() { + * console.log('Goodbye!'); + * this.close(); + * }); + * ``` + * + * The new commands can then be used from within the REPL instance: + * + * ```console + * > .sayhello Node.js User + * Hello, Node.js User! + * > .saybye + * Goodbye! + * ``` + * @since v0.3.0 + * @param keyword The command keyword (_without_ a leading `.` character). + * @param cmd The function to invoke when the command is processed. + */ + defineCommand(keyword: string, cmd: REPLCommandAction | REPLCommand): void; + /** + * The `replServer.displayPrompt()` method readies the REPL instance for input + * from the user, printing the configured `prompt` to a new line in the `output` and resuming the `input` to accept new input. + * + * When multi-line input is being entered, a pipe `'|'` is printed rather than the + * 'prompt'. + * + * When `preserveCursor` is `true`, the cursor placement will not be reset to `0`. + * + * The `replServer.displayPrompt` method is primarily intended to be called from + * within the action function for commands registered using the `replServer.defineCommand()` method. + * @since v0.1.91 + */ + displayPrompt(preserveCursor?: boolean): void; + /** + * The `replServer.clearBufferedCommand()` method clears any command that has been + * buffered but not yet executed. This method is primarily intended to be + * called from within the action function for commands registered using the `replServer.defineCommand()` method. + * @since v9.0.0 + */ + clearBufferedCommand(): void; + /** + * Initializes a history log file for the REPL instance. When executing the + * Node.js binary and using the command-line REPL, a history file is initialized + * by default. However, this is not the case when creating a REPL + * programmatically. Use this method to initialize a history log file when working + * with REPL instances programmatically. + * @since v11.10.0 + * @param historyPath the path to the history file + * @param callback called when history writes are ready or upon error + */ + setupHistory(historyPath: string, callback: (err: Error | null, repl: this) => void): void; + setupHistory( + historyConfig?: REPLServerSetupHistoryOptions, + callback?: (err: Error | null, repl: this) => void, + ): void; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: REPLServerEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: REPLServerEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: REPLServerEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: REPLServerEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off(eventName: E, listener: (...args: REPLServerEventMap[E]) => void): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on(eventName: E, listener: (...args: REPLServerEventMap[E]) => void): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: REPLServerEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: REPLServerEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: REPLServerEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: REPLServerEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: REPLServerEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + /** + * A flag passed in the REPL options. Evaluates expressions in sloppy mode. + */ + const REPL_MODE_SLOPPY: unique symbol; + /** + * A flag passed in the REPL options. Evaluates expressions in strict mode. + * This is equivalent to prefacing every repl statement with `'use strict'`. + */ + const REPL_MODE_STRICT: unique symbol; + /** + * The `repl.start()` method creates and starts a {@link REPLServer} instance. + * + * If `options` is a string, then it specifies the input prompt: + * + * ```js + * import repl from 'node:repl'; + * + * // a Unix style prompt + * repl.start('$ '); + * ``` + * @since v0.1.91 + */ + function start(options?: string | ReplOptions): REPLServer; + /** + * Indicates a recoverable error that a `REPLServer` can use to support multi-line input. + * + * @see https://nodejs.org/dist/latest-v26.x/docs/api/repl.html#repl_recoverable_errors + */ + class Recoverable extends SyntaxError { + err: Error; + constructor(err: Error); + } +} +declare module "repl" { + export * from "node:repl"; +} diff --git a/node_modules/@types/node/sea.d.ts b/node_modules/@types/node/sea.d.ts new file mode 100644 index 0000000..85ab108 --- /dev/null +++ b/node_modules/@types/node/sea.d.ts @@ -0,0 +1,47 @@ +declare module "node:sea" { + type AssetKey = string; + /** + * @since v20.12.0 + * @return Whether this script is running inside a single-executable application. + */ + function isSea(): boolean; + /** + * This method can be used to retrieve the assets configured to be bundled into the + * single-executable application at build time. + * An error is thrown when no matching asset can be found. + * @since v20.12.0 + */ + function getAsset(key: AssetKey): ArrayBuffer; + function getAsset(key: AssetKey, encoding: string): string; + /** + * Similar to `sea.getAsset()`, but returns the result in a [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob). + * An error is thrown when no matching asset can be found. + * @since v20.12.0 + */ + function getAssetAsBlob(key: AssetKey, options?: { + type: string; + }): Blob; + /** + * This method can be used to retrieve the assets configured to be bundled into the + * single-executable application at build time. + * An error is thrown when no matching asset can be found. + * + * Unlike `sea.getRawAsset()` or `sea.getAssetAsBlob()`, this method does not + * return a copy. Instead, it returns the raw asset bundled inside the executable. + * + * For now, users should avoid writing to the returned array buffer. If the + * injected section is not marked as writable or not aligned properly, + * writes to the returned array buffer is likely to result in a crash. + * @since v20.12.0 + */ + function getRawAsset(key: AssetKey): ArrayBuffer; + /** + * This method can be used to retrieve an array of all the keys of assets + * embedded into the single-executable application. + * An error is thrown when not running inside a single-executable application. + * @since v24.8.0 + * @returns An array containing all the keys of the assets + * embedded in the executable. If no assets are embedded, returns an empty array. + */ + function getAssetKeys(): string[]; +} diff --git a/node_modules/@types/node/sqlite.d.ts b/node_modules/@types/node/sqlite.d.ts new file mode 100644 index 0000000..70493f0 --- /dev/null +++ b/node_modules/@types/node/sqlite.d.ts @@ -0,0 +1,1140 @@ +declare module "node:sqlite" { + import { PathLike } from "node:fs"; + type SQLInputValue = null | number | bigint | string | NodeJS.ArrayBufferView; + type SQLOutputValue = null | number | bigint | string | NodeJS.NonSharedUint8Array; + interface DatabaseSyncOptions { + /** + * If `true`, the database is opened by the constructor. When + * this value is `false`, the database must be opened via the `open()` method. + * @since v22.5.0 + * @default true + */ + open?: boolean | undefined; + /** + * If `true`, foreign key constraints + * are enabled. This is recommended but can be disabled for compatibility with + * legacy database schemas. The enforcement of foreign key constraints can be + * enabled and disabled after opening the database using + * [`PRAGMA foreign_keys`](https://www.sqlite.org/pragma.html#pragma_foreign_keys). + * @since v22.10.0 + * @default true + */ + enableForeignKeyConstraints?: boolean | undefined; + /** + * If `true`, SQLite will accept + * [double-quoted string literals](https://www.sqlite.org/quirks.html#dblquote). + * This is not recommended but can be + * enabled for compatibility with legacy database schemas. + * @since v22.10.0 + * @default false + */ + enableDoubleQuotedStringLiterals?: boolean | undefined; + /** + * If `true`, the database is opened in read-only mode. + * If the database does not exist, opening it will fail. + * @since v22.12.0 + * @default false + */ + readOnly?: boolean | undefined; + /** + * If `true`, the `loadExtension` SQL function + * and the `loadExtension()` method are enabled. + * You can call `enableLoadExtension(false)` later to disable this feature. + * @since v22.13.0 + * @default false + */ + allowExtension?: boolean | undefined; + /** + * The [busy timeout](https://sqlite.org/c3ref/busy_timeout.html) in milliseconds. This is the maximum amount of + * time that SQLite will wait for a database lock to be released before + * returning an error. + * @since v24.0.0 + * @default 0 + */ + timeout?: number | undefined; + /** + * If `true`, integer fields are read as JavaScript `BigInt` values. If `false`, + * integer fields are read as JavaScript numbers. + * @since v24.4.0 + * @default false + */ + readBigInts?: boolean | undefined; + /** + * If `true`, query results are returned as arrays instead of objects. + * @since v24.4.0 + * @default false + */ + returnArrays?: boolean | undefined; + /** + * If `true`, allows binding named parameters without the prefix + * character (e.g., `foo` instead of `:foo`). + * @since v24.4.40 + * @default true + */ + allowBareNamedParameters?: boolean | undefined; + /** + * If `true`, unknown named parameters are ignored when binding. + * If `false`, an exception is thrown for unknown named parameters. + * @since v24.4.40 + * @default false + */ + allowUnknownNamedParameters?: boolean | undefined; + /** + * If `true`, enables the defensive flag. When the defensive flag is enabled, + * language features that allow ordinary SQL to deliberately corrupt the database file are disabled. + * The defensive flag can also be set using `enableDefensive()`. + * @since v25.1.0 + * @default true + */ + defensive?: boolean | undefined; + /** + * Configuration for various SQLite limits. These limits + * can be used to prevent excessive resource consumption when handling + * potentially malicious input. See [Run-Time Limits](https://www.sqlite.org/c3ref/c_limit_attached.html) and [Limit Constants](https://www.sqlite.org/c3ref/limit.html) + * in the SQLite documentation for details. Default values are determined by + * SQLite's compile-time defaults and may vary depending on how SQLite was + * built. The following properties are supported: + * @since v25.8.0 + */ + limits?: NodeJS.PartialOptions | undefined; + } + interface DatabaseLimits { + length: number; + sqlLength: number; + column: number; + exprDepth: number; + compoundSelect: number; + vdbeOp: number; + functionArg: number; + attach: number; + likePatternLength: number; + variableNumber: number; + triggerDepth: number; + } + interface CreateSessionOptions { + /** + * A specific table to track changes for. By default, changes to all tables are tracked. + * @since v22.12.0 + */ + table?: string | undefined; + /** + * Name of the database to track. This is useful when multiple databases have been added using + * [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html). + * @since v22.12.0 + * @default 'main' + */ + db?: string | undefined; + } + interface ApplyChangesetOptions { + /** + * for each table affected by at least + * one change in the changeset, the `filter` callback is invoked with the + * table name as the first argument. If the return value is falsy, then no + * attempt is made to apply any changes to the table. + * Otherwise, if the return value is truthy or no `filter` callback is provided, + * all changes related to the table are attempted. + * @since v22.12.0 + */ + filter?: ((tableName: string) => boolean) | undefined; + /** + * A function that determines how to handle conflicts. The function receives one argument, + * which can be one of the following values: + * + * * `SQLITE_CHANGESET_DATA`: A `DELETE` or `UPDATE` change does not contain the expected "before" values. + * * `SQLITE_CHANGESET_NOTFOUND`: A row matching the primary key of the `DELETE` or `UPDATE` change does not exist. + * * `SQLITE_CHANGESET_CONFLICT`: An `INSERT` change results in a duplicate primary key. + * * `SQLITE_CHANGESET_FOREIGN_KEY`: Applying a change would result in a foreign key violation. + * * `SQLITE_CHANGESET_CONSTRAINT`: Applying a change results in a `UNIQUE`, `CHECK`, or `NOT NULL` constraint + * violation. + * + * The function should return one of the following values: + * + * * `SQLITE_CHANGESET_OMIT`: Omit conflicting changes. + * * `SQLITE_CHANGESET_REPLACE`: Replace existing values with conflicting changes (only valid with + `SQLITE_CHANGESET_DATA` or `SQLITE_CHANGESET_CONFLICT` conflicts). + * * `SQLITE_CHANGESET_ABORT`: Abort on conflict and roll back the database. + * + * When an error is thrown in the conflict handler or when any other value is returned from the handler, + * applying the changeset is aborted and the database is rolled back. + * + * **Default**: A function that returns `SQLITE_CHANGESET_ABORT`. + * @since v22.12.0 + */ + onConflict?: ((conflictType: number) => number) | undefined; + } + interface DeserializeOptions { + /** + * Name of the database to deserialize into. + * @default 'main' + */ + dbName?: string | undefined; + } + interface FunctionOptions { + /** + * If `true`, the [`SQLITE_DETERMINISTIC`](https://www.sqlite.org/c3ref/c_deterministic.html) flag is + * set on the created function. + * @default false + */ + deterministic?: boolean | undefined; + /** + * If `true`, the [`SQLITE_DIRECTONLY`](https://www.sqlite.org/c3ref/c_directonly.html) flag is set on + * the created function. + * @default false + */ + directOnly?: boolean | undefined; + /** + * If `true`, integer arguments to `function` + * are converted to `BigInt`s. If `false`, integer arguments are passed as + * JavaScript numbers. + * @default false + */ + useBigIntArguments?: boolean | undefined; + /** + * If `true`, `function` may be invoked with any number of + * arguments (between zero and + * [`SQLITE_MAX_FUNCTION_ARG`](https://www.sqlite.org/limits.html#max_function_arg)). If `false`, + * `function` must be invoked with exactly `function.length` arguments. + * @default false + */ + varargs?: boolean | undefined; + } + interface AggregateOptions extends FunctionOptions { + /** + * The identity value for the aggregation function. This value is used when the aggregation + * function is initialized. When a `Function` is passed the identity will be its return value. + */ + start: T | (() => T); + /** + * The function to call for each row in the aggregation. The + * function receives the current state and the row value. The return value of + * this function should be the new state. + */ + step: (accumulator: T, ...args: SQLOutputValue[]) => T; + /** + * The function to call to get the result of the + * aggregation. The function receives the final state and should return the + * result of the aggregation. + */ + result?: ((accumulator: T) => SQLInputValue) | undefined; + /** + * When this function is provided, the `aggregate` method will work as a window function. + * The function receives the current state and the dropped row value. The return value of this function should be the + * new state. + */ + inverse?: ((accumulator: T, ...args: SQLOutputValue[]) => T) | undefined; + } + interface PrepareOptions { + /** + * If `true`, integer fields are read as `BigInt`s. + * @since v25.5.0 + */ + readBigInts?: boolean | undefined; + /** + * If `true`, results are returned as arrays. + * @since v25.5.0 + */ + returnArrays?: boolean | undefined; + /** + * If `true`, allows binding named parameters without the prefix character. + * @since v25.5.0 + */ + allowBareNamedParameters?: boolean | undefined; + /** + * If `true`, unknown named parameters are ignored. + * @since v25.5.0 + */ + allowUnknownNamedParameters?: boolean | undefined; + } + /** + * This class represents a single [connection](https://www.sqlite.org/c3ref/sqlite3.html) to a SQLite database. All APIs + * exposed by this class execute synchronously. + * @since v22.5.0 + */ + class DatabaseSync implements Disposable { + /** + * Constructs a new `DatabaseSync` instance. + * @param path The path of the database. + * A SQLite database can be stored in a file or completely [in memory](https://www.sqlite.org/inmemorydb.html). + * To use a file-backed database, the path should be a file path. + * To use an in-memory database, the path should be the special name `':memory:'`. + * @param options Configuration options for the database connection. + */ + constructor(path: PathLike, options?: DatabaseSyncOptions); + /** + * Registers a new aggregate function with the SQLite database. This method is a wrapper around + * [`sqlite3_create_window_function()`](https://www.sqlite.org/c3ref/create_function.html). + * + * When used as a window function, the `result` function will be called multiple times. + * + * ```js + * import { DatabaseSync } from 'node:sqlite'; + * + * const db = new DatabaseSync(':memory:'); + * db.exec(` + * CREATE TABLE t3(x, y); + * INSERT INTO t3 VALUES ('a', 4), + * ('b', 5), + * ('c', 3), + * ('d', 8), + * ('e', 1); + * `); + * + * db.aggregate('sumint', { + * start: 0, + * step: (acc, value) => acc + value, + * }); + * + * db.prepare('SELECT sumint(y) as total FROM t3').get(); // { total: 21 } + * ``` + * @since v24.0.0 + * @param name The name of the SQLite function to create. + * @param options Function configuration settings. + */ + aggregate(name: string, options: AggregateOptions): void; + aggregate(name: string, options: AggregateOptions): void; + /** + * Closes the database connection. An exception is thrown if the database is not + * open. This method is a wrapper around [`sqlite3_close_v2()`](https://www.sqlite.org/c3ref/close.html). + * @since v22.5.0 + */ + close(): void; + /** + * Loads a shared library into the database connection. This method is a wrapper + * around [`sqlite3_load_extension()`](https://www.sqlite.org/c3ref/load_extension.html). It is required to enable the + * `allowExtension` option when constructing the `DatabaseSync` instance. + * + * ```js + * import { DatabaseSync } from 'node:sqlite'; + * const database = new DatabaseSync(':memory:', { allowExtension: true }); + * + * // Load using the entry point derived from the filename. + * database.loadExtension('./decimal.dylib'); + * + * // Override the entry point when the derived name does not match. + * database.loadExtension('./base64.dylib', 'sqlite3_base64_init'); + * @since v22.13.0 + * @param path The path to the shared library to load. + * @param entryPoint The name of the extension's entry-point function. When + * omitted, SQLite derives the entry point from the shared library's filename; + * pass this argument explicitly when the derived name does not match. + */ + loadExtension(path: string, entryPoint?: string): void; + /** + * Enables or disables the `loadExtension` SQL function, and the `loadExtension()` + * method. When `allowExtension` is `false` when constructing, you cannot enable + * loading extensions for security reasons. + * @since v22.13.0 + * @param allow Whether to allow loading extensions. + */ + enableLoadExtension(allow: boolean): void; + /** + * Enables or disables the defensive flag. When the defensive flag is active, + * language features that allow ordinary SQL to deliberately corrupt the database file are disabled. + * See [`SQLITE_DBCONFIG_DEFENSIVE`](https://www.sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfigdefensive) in the SQLite documentation for details. + * @since v25.1.0 + * @param active Whether to set the defensive flag. + */ + enableDefensive(active: boolean): void; + /** + * This method is a wrapper around [`sqlite3_db_filename()`](https://sqlite.org/c3ref/db_filename.html) + * @since v24.0.0 + * @param dbName Name of the database. This can be `'main'` (the default primary database) or any other + * database that has been added with [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html) **Default:** `'main'`. + * @returns The location of the database file. When using an in-memory database, + * this method returns null. + */ + location(dbName?: string): string | null; + /** + * This method allows one or more SQL statements to be executed without returning + * any results. This method is useful when executing SQL statements read from a + * file. This method is a wrapper around [`sqlite3_exec()`](https://www.sqlite.org/c3ref/exec.html). + * @since v22.5.0 + * @param sql A SQL string to execute. + */ + exec(sql: string): void; + /** + * This method is used to create SQLite user-defined functions. This method is a + * wrapper around [`sqlite3_create_function_v2()`](https://www.sqlite.org/c3ref/create_function.html). + * @since v22.13.0 + * @param name The name of the SQLite function to create. + * @param options Optional configuration settings for the function. + * @param fn The JavaScript function to call when the SQLite function is + * invoked. The return value of this function should be a valid SQLite data type: + * see [Type conversion between JavaScript and SQLite](https://nodejs.org/docs/latest-v26.x/api/sqlite.html#type-conversion-between-javascript-and-sqlite). The result defaults to + * `NULL` if the return value is `undefined`. + */ + function( + name: string, + options: FunctionOptions, + fn: (...args: SQLOutputValue[]) => SQLInputValue, + ): void; + function(name: string, fn: (...args: SQLOutputValue[]) => SQLInputValue): void; + /** + * Sets an authorizer callback that SQLite will invoke whenever it attempts to + * access data or modify the database schema through prepared statements. + * This can be used to implement security policies, audit access, or restrict certain operations. + * This method is a wrapper around [`sqlite3_set_authorizer()`](https://sqlite.org/c3ref/set_authorizer.html). + * + * When invoked, the callback receives five arguments: + * + * * `actionCode` {number} The type of operation being performed (e.g., + * `SQLITE_INSERT`, `SQLITE_UPDATE`, `SQLITE_SELECT`). + * * `arg1` {string|null} The first argument (context-dependent, often a table name). + * * `arg2` {string|null} The second argument (context-dependent, often a column name). + * * `dbName` {string|null} The name of the database. + * * `triggerOrView` {string|null} The name of the trigger or view causing the access. + * + * The callback must return one of the following constants: + * + * * `SQLITE_OK` - Allow the operation. + * * `SQLITE_DENY` - Deny the operation (causes an error). + * * `SQLITE_IGNORE` - Ignore the operation (silently skip). + * + * ```js + * import { DatabaseSync, constants } from 'node:sqlite'; + * const db = new DatabaseSync(':memory:'); + * + * // Set up an authorizer that denies all table creation + * db.setAuthorizer((actionCode) => { + * if (actionCode === constants.SQLITE_CREATE_TABLE) { + * return constants.SQLITE_DENY; + * } + * return constants.SQLITE_OK; + * }); + * + * // This will work + * db.prepare('SELECT 1').get(); + * + * // This will throw an error due to authorization denial + * try { + * db.exec('CREATE TABLE blocked (id INTEGER)'); + * } catch (err) { + * console.log('Operation blocked:', err.message); + * } + * ``` + * @since v24.10.0 + * @param callback The authorizer function to set, or `null` to + * clear the current authorizer. + */ + setAuthorizer( + callback: + | (( + actionCode: number, + arg1: string | null, + arg2: string | null, + dbName: string | null, + triggerOrView: string | null, + ) => number) + | null, + ): void; + /** + * Whether the database is currently open or not. + * @since v22.15.0 + */ + readonly isOpen: boolean; + /** + * Whether the database is currently within a transaction. This method + * is a wrapper around [`sqlite3_get_autocommit()`](https://sqlite.org/c3ref/get_autocommit.html). + * @since v24.0.0 + */ + readonly isTransaction: boolean; + /** + * An object for getting and setting SQLite database limits at runtime. + * Each property corresponds to an SQLite limit and can be read or written. + * + * ```js + * const db = new DatabaseSync(':memory:'); + * + * // Read current limit + * console.log(db.limits.length); + * + * // Set a new limit + * db.limits.sqlLength = 100000; + * + * // Reset a limit to its compile-time maximum + * db.limits.sqlLength = Infinity; + * ``` + * + * Available properties: `length`, `sqlLength`, `column`, `exprDepth`, + * `compoundSelect`, `vdbeOp`, `functionArg`, `attach`, `likePatternLength`, + * `variableNumber`, `triggerDepth`. + * + * Setting a property to `Infinity` resets the limit to its compile-time maximum value. + * @since v25.8.0 + */ + readonly limits: DatabaseLimits; + /** + * Opens the database specified in the `path` argument of the `DatabaseSync`constructor. This method should only be used when the database is not opened via + * the constructor. An exception is thrown if the database is already open. + * @since v22.5.0 + */ + open(): void; + /** + * Serializes the database into a binary representation, returned as a + * `Uint8Array`. This is useful for saving, cloning, or transferring an in-memory + * database. This method is a wrapper around [`sqlite3_serialize()`](https://sqlite.org/c3ref/serialize.html). + * + * ```js + * import { DatabaseSync } from 'node:sqlite'; + * + * const db = new DatabaseSync(':memory:'); + * db.exec('CREATE TABLE t(key INTEGER PRIMARY KEY, value TEXT)'); + * db.exec("INSERT INTO t VALUES (1, 'hello')"); + * const buffer = db.serialize(); + * console.log(buffer.length); // Prints the byte length of the database + * ``` + * @since v26.1.0 + * @param dbName Name of the database to serialize. This can be `'main'` + * (the default primary database) or any other database that has been added with + * [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html). **Default:** `'main'`. + * @returns A binary representation of the database. + */ + serialize(dbName?: string): NodeJS.NonSharedUint8Array; + /** + * Loads a serialized database into this connection, replacing the current + * database. The deserialized database is writable. Existing prepared statements + * are finalized before deserialization is attempted, even if the operation + * subsequently fails. This method is a wrapper around + * [`sqlite3_deserialize()`](https://sqlite.org/c3ref/deserialize.html). + * + * ```js + * import { DatabaseSync } from 'node:sqlite'; + * + * const original = new DatabaseSync(':memory:'); + * original.exec('CREATE TABLE t(key INTEGER PRIMARY KEY, value TEXT)'); + * original.exec("INSERT INTO t VALUES (1, 'hello')"); + * const buffer = original.serialize(); + * original.close(); + * + * const clone = new DatabaseSync(':memory:'); + * clone.deserialize(buffer); + * console.log(clone.prepare('SELECT value FROM t').get()); + * // Prints: { value: 'hello' } + * ``` + * @since v26.1.0 + * @param buffer A binary representation of a database, such as the + * output of `database.serialize()`. + * @param options Optional configuration for the deserialization. + */ + deserialize(buffer: Uint8Array, options?: DeserializeOptions): void; + /** + * Compiles a SQL statement into a [prepared statement](https://www.sqlite.org/c3ref/stmt.html). This method is a wrapper + * around [`sqlite3_prepare_v2()`](https://www.sqlite.org/c3ref/prepare.html). + * @since v22.5.0 + * @param sql A SQL string to compile to a prepared statement. + * @param options Optional configuration for the prepared statement. + * @return The prepared statement. + */ + prepare(sql: string, options?: PrepareOptions): StatementSync; + /** + * Creates a new {@link SQLTagStore}, which is a Least Recently Used (LRU) cache + * for storing prepared statements. This allows for the efficient reuse of + * prepared statements by tagging them with a unique identifier. + * + * When a tagged SQL literal is executed, the `SQLTagStore` checks if a prepared + * statement for the corresponding SQL query string already exists in the cache. + * If it does, the cached statement is used. If not, a new prepared statement is + * created, executed, and then stored in the cache for future use. This mechanism + * helps to avoid the overhead of repeatedly parsing and preparing the same SQL + * statements. + * + * Tagged statements bind the placeholder values from the template literal as + * parameters to the underlying prepared statement. For example: + * + * ```js + * sqlTagStore.get`SELECT ${value}`; + * ``` + * + * is equivalent to: + * + * ```js + * db.prepare('SELECT ?').get(value); + * ``` + * + * However, in the first example, the tag store will cache the underlying prepared + * statement for future use. + * + * > **Note:** The `${value}` syntax in tagged statements _binds_ a parameter to + * > the prepared statement. This differs from its behavior in _untagged_ template + * > literals, where it performs string interpolation. + * > + * > ```js + * > // This a safe example of binding a parameter to a tagged statement. + * > sqlTagStore.run`INSERT INTO t1 (id) VALUES (${id})`; + * > + * > // This is an *unsafe* example of an untagged template string. + * > // `id` is interpolated into the query text as a string. + * > // This can lead to SQL injection and data corruption. + * > db.run(`INSERT INTO t1 (id) VALUES (${id})`); + * > ``` + * + * The tag store will match a statement from the cache if the query strings + * (including the positions of any bound placeholders) are identical. + * + * ```js + * // The following statements will match in the cache: + * sqlTagStore.get`SELECT * FROM t1 WHERE id = ${id} AND active = 1`; + * sqlTagStore.get`SELECT * FROM t1 WHERE id = ${12345} AND active = 1`; + * + * // The following statements will not match, as the query strings + * // and bound placeholders differ: + * sqlTagStore.get`SELECT * FROM t1 WHERE id = ${id} AND active = 1`; + * sqlTagStore.get`SELECT * FROM t1 WHERE id = 12345 AND active = 1`; + * + * // The following statements will not match, as matches are case-sensitive: + * sqlTagStore.get`SELECT * FROM t1 WHERE id = ${id} AND active = 1`; + * sqlTagStore.get`select * from t1 where id = ${id} and active = 1`; + * ``` + * + * The only way of binding parameters in tagged statements is with the `${value}` + * syntax. Do not add parameter binding placeholders (`?` etc.) to the SQL query + * string itself. + * + * ```js + * import { DatabaseSync } from 'node:sqlite'; + * + * const db = new DatabaseSync(':memory:'); + * const sql = db.createSQLTagStore(); + * + * db.exec('CREATE TABLE users (id INT, name TEXT)'); + * + * // Using the 'run' method to insert data. + * // The tagged literal is used to identify the prepared statement. + * sql.run`INSERT INTO users VALUES (1, 'Alice')`; + * sql.run`INSERT INTO users VALUES (2, 'Bob')`; + * + * // Using the 'get' method to retrieve a single row. + * const name = 'Alice'; + * const user = sql.get`SELECT * FROM users WHERE name = ${name}`; + * console.log(user); // { id: 1, name: 'Alice' } + * + * // Using the 'all' method to retrieve all rows. + * const allUsers = sql.all`SELECT * FROM users ORDER BY id`; + * console.log(allUsers); + * // [ + * // { id: 1, name: 'Alice' }, + * // { id: 2, name: 'Bob' } + * // ] + * ``` + * @since v24.9.0 + * @returns A new SQL tag store for caching prepared statements. + */ + createTagStore(maxSize?: number): SQLTagStore; + /** + * Creates and attaches a session to the database. This method is a wrapper around + * [`sqlite3session_create()`](https://www.sqlite.org/session/sqlite3session_create.html) and + * [`sqlite3session_attach()`](https://www.sqlite.org/session/sqlite3session_attach.html). + * @param options The configuration options for the session. + * @returns A session handle. + * @since v22.12.0 + */ + createSession(options?: CreateSessionOptions): Session; + /** + * An exception is thrown if the database is not + * open. This method is a wrapper around + * [`sqlite3changeset_apply()`](https://www.sqlite.org/session/sqlite3changeset_apply.html). + * + * ```js + * import { DatabaseSync } from 'node:sqlite'; + * + * const sourceDb = new DatabaseSync(':memory:'); + * const targetDb = new DatabaseSync(':memory:'); + * + * sourceDb.exec('CREATE TABLE data(key INTEGER PRIMARY KEY, value TEXT)'); + * targetDb.exec('CREATE TABLE data(key INTEGER PRIMARY KEY, value TEXT)'); + * + * const session = sourceDb.createSession(); + * + * const insert = sourceDb.prepare('INSERT INTO data (key, value) VALUES (?, ?)'); + * insert.run(1, 'hello'); + * insert.run(2, 'world'); + * + * const changeset = session.changeset(); + * targetDb.applyChangeset(changeset); + * // Now that the changeset has been applied, targetDb contains the same data as sourceDb. + * ``` + * @param changeset A binary changeset or patchset. + * @param options The configuration options for how the changes will be applied. + * @returns Whether the changeset was applied successfully without being aborted. + * @since v22.12.0 + */ + applyChangeset(changeset: Uint8Array, options?: ApplyChangesetOptions): boolean; + /** + * Closes the database connection. If the database connection is already closed + * then this is a no-op. + * @since v22.15.0 + */ + [Symbol.dispose](): void; + } + /** + * @since v22.12.0 + */ + interface Session { + /** + * Retrieves a changeset containing all changes since the changeset was created. Can be called multiple times. + * An exception is thrown if the database or the session is not open. This method is a wrapper around + * [`sqlite3session_changeset()`](https://www.sqlite.org/session/sqlite3session_changeset.html). + * @returns Binary changeset that can be applied to other databases. + * @since v22.12.0 + */ + changeset(): NodeJS.NonSharedUint8Array; + /** + * Similar to the method above, but generates a more compact patchset. See + * [Changesets and Patchsets](https://www.sqlite.org/sessionintro.html#changesets_and_patchsets) + * in the documentation of SQLite. An exception is thrown if the database or the session is not open. This method is a + * wrapper around + * [`sqlite3session_patchset()`](https://www.sqlite.org/session/sqlite3session_patchset.html). + * @returns Binary patchset that can be applied to other databases. + * @since v22.12.0 + */ + patchset(): NodeJS.NonSharedUint8Array; + /** + * Closes the session. An exception is thrown if the database or the session is not open. This method is a + * wrapper around + * [`sqlite3session_delete()`](https://www.sqlite.org/session/sqlite3session_delete.html). + */ + close(): void; + /** + * Closes the session. If the session is already closed, does nothing. + * @since v24.9.0 + */ + [Symbol.dispose](): void; + } + /** + * This class represents a single LRU (Least Recently Used) cache for storing + * prepared statements. + * + * Instances of this class are created via the `database.createTagStore()` + * method, not by using a constructor. The store caches prepared statements based + * on the provided SQL query string. When the same query is seen again, the store + * retrieves the cached statement and safely applies the new values through + * parameter binding, thereby preventing attacks like SQL injection. + * + * The cache has a maxSize that defaults to 1000 statements, but a custom size can + * be provided (e.g., `database.createTagStore(100)`). All APIs exposed by this + * class execute synchronously. + * @since v24.9.0 + */ + interface SQLTagStore { + /** + * Executes the given SQL query and returns all resulting rows as an array of + * objects. + * + * This function is intended to be used as a template literal tag, not to be + * called directly. + * @since v24.9.0 + * @param stringElements Template literal elements containing the SQL + * query. + * @param boundParameters Parameter values to be bound to placeholders in the template string. + * @returns An array of objects representing the rows returned by the query. + */ + all( + stringElements: TemplateStringsArray, + ...boundParameters: SQLInputValue[] + ): Record[]; + /** + * Executes the given SQL query and returns the first resulting row as an object. + * + * This function is intended to be used as a template literal tag, not to be + * called directly. + * @since v24.9.0 + * @param stringElements Template literal elements containing the SQL + * query. + * @param boundParameters Parameter values to be bound to placeholders in the template string. + * @returns An object representing the first row returned by + * the query, or `undefined` if no rows are returned. + */ + get( + stringElements: TemplateStringsArray, + ...boundParameters: SQLInputValue[] + ): Record | undefined; + /** + * Executes the given SQL query and returns an iterator over the resulting rows. + * + * This function is intended to be used as a template literal tag, not to be + * called directly. + * @since v24.9.0 + * @param stringElements Template literal elements containing the SQL + * query. + * @param boundParameters Parameter values to be bound to placeholders in the template string. + * @returns An iterator that yields objects representing the rows returned by the query. + */ + iterate( + stringElements: TemplateStringsArray, + ...boundParameters: SQLInputValue[] + ): NodeJS.Iterator>; + /** + * Executes the given SQL query, which is expected to not return any rows (e.g., INSERT, UPDATE, DELETE). + * + * This function is intended to be used as a template literal tag, not to be + * called directly. + * @since v24.9.0 + * @param stringElements Template literal elements containing the SQL + * query. + * @param boundParameters Parameter values to be bound to placeholders in the template string. + * @returns An object containing information about the execution, including `changes` and `lastInsertRowid`. + */ + run(stringElements: TemplateStringsArray, ...boundParameters: SQLInputValue[]): StatementResultingChanges; + /** + * A read-only property that returns the number of prepared statements currently in the cache. + * @since v24.9.0 + */ + readonly size: number; + /** + * A read-only property that returns the maximum number of prepared statements the cache can hold. + * @since v24.9.0 + */ + readonly capacity: number; + /** + * A read-only property that returns the `DatabaseSync` object associated with this `SQLTagStore`. + * @since v24.9.0 + */ + readonly db: DatabaseSync; + /** + * Resets the LRU cache, clearing all stored prepared statements. + * @since v24.9.0 + */ + clear(): void; + } + interface StatementColumnMetadata { + /** + * The unaliased name of the column in the origin + * table, or `null` if the column is the result of an expression or subquery. + * This property is the result of [`sqlite3_column_origin_name()`](https://www.sqlite.org/c3ref/column_database_name.html). + */ + column: string | null; + /** + * The unaliased name of the origin database, or + * `null` if the column is the result of an expression or subquery. This + * property is the result of [`sqlite3_column_database_name()`](https://www.sqlite.org/c3ref/column_database_name.html). + */ + database: string | null; + /** + * The name assigned to the column in the result set of a + * `SELECT` statement. This property is the result of + * [`sqlite3_column_name()`](https://www.sqlite.org/c3ref/column_name.html). + */ + name: string; + /** + * The unaliased name of the origin table, or `null` if + * the column is the result of an expression or subquery. This property is the + * result of [`sqlite3_column_table_name()`](https://www.sqlite.org/c3ref/column_database_name.html). + */ + table: string | null; + /** + * The declared data type of the column, or `null` if the + * column is the result of an expression or subquery. This property is the + * result of [`sqlite3_column_decltype()`](https://www.sqlite.org/c3ref/column_decltype.html). + */ + type: string | null; + } + interface StatementResultingChanges { + /** + * The number of rows modified, inserted, or deleted by the most recently completed `INSERT`, `UPDATE`, or `DELETE` statement. + * This field is either a number or a `BigInt` depending on the prepared statement's configuration. + * This property is the result of [`sqlite3_changes64()`](https://www.sqlite.org/c3ref/changes.html). + */ + changes: number | bigint; + /** + * The most recently inserted rowid. + * This field is either a number or a `BigInt` depending on the prepared statement's configuration. + * This property is the result of [`sqlite3_last_insert_rowid()`](https://www.sqlite.org/c3ref/last_insert_rowid.html). + */ + lastInsertRowid: number | bigint; + } + /** + * This class represents a single [prepared statement](https://www.sqlite.org/c3ref/stmt.html). This class cannot be + * instantiated via its constructor. Instead, instances are created via the`database.prepare()` method. All APIs exposed by this class execute + * synchronously. + * + * A prepared statement is an efficient binary representation of the SQL used to + * create it. Prepared statements are parameterizable, and can be invoked multiple + * times with different bound values. Parameters also offer protection against [SQL injection](https://en.wikipedia.org/wiki/SQL_injection) attacks. For these reasons, prepared statements are + * preferred + * over hand-crafted SQL strings when handling user input. + * @since v22.5.0 + */ + class StatementSync { + private constructor(); + /** + * This method executes a prepared statement and returns all results as an array of + * objects. If the prepared statement does not return any results, this method + * returns an empty array. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using + * the values in `namedParameters` and `anonymousParameters`. + * @since v22.5.0 + * @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping. + * @param anonymousParameters Zero or more values to bind to anonymous parameters. + * @return An array of objects. Each object corresponds to a row returned by executing the prepared statement. The keys and values of each object correspond to the column names and values of + * the row. + */ + all(...anonymousParameters: SQLInputValue[]): Record[]; + all( + namedParameters: Record, + ...anonymousParameters: SQLInputValue[] + ): Record[]; + /** + * This method is used to retrieve information about the columns returned by the + * prepared statement. + * @since v23.11.0 + * @returns An array of objects. Each object corresponds to a column + * in the prepared statement, and contains the following properties: + */ + columns(): StatementColumnMetadata[]; + /** + * The source SQL text of the prepared statement with parameter + * placeholders replaced by the values that were used during the most recent + * execution of this prepared statement. This property is a wrapper around + * [`sqlite3_expanded_sql()`](https://www.sqlite.org/c3ref/expanded_sql.html). + * @since v22.5.0 + */ + readonly expandedSQL: string; + /** + * This method executes a prepared statement and returns the first result as an + * object. If the prepared statement does not return any results, this method + * returns `undefined`. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using the + * values in `namedParameters` and `anonymousParameters`. + * @since v22.5.0 + * @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping. + * @param anonymousParameters Zero or more values to bind to anonymous parameters. + * @return An object corresponding to the first row returned by executing the prepared statement. The keys and values of the object correspond to the column names and values of the row. If no + * rows were returned from the database then this method returns `undefined`. + */ + get(...anonymousParameters: SQLInputValue[]): Record | undefined; + get( + namedParameters: Record, + ...anonymousParameters: SQLInputValue[] + ): Record | undefined; + /** + * This method executes a prepared statement and returns an iterator of + * objects. If the prepared statement does not return any results, this method + * returns an empty iterator. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using + * the values in `namedParameters` and `anonymousParameters`. + * @since v22.13.0 + * @param namedParameters An optional object used to bind named parameters. + * The keys of this object are used to configure the mapping. + * @param anonymousParameters Zero or more values to bind to anonymous parameters. + * @returns An iterable iterator of objects. Each object corresponds to a row + * returned by executing the prepared statement. The keys and values of each + * object correspond to the column names and values of the row. + */ + iterate(...anonymousParameters: SQLInputValue[]): NodeJS.Iterator>; + iterate( + namedParameters: Record, + ...anonymousParameters: SQLInputValue[] + ): NodeJS.Iterator>; + /** + * This method executes a prepared statement and returns an object summarizing the + * resulting changes. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using the + * values in `namedParameters` and `anonymousParameters`. + * @since v22.5.0 + * @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping. + * @param anonymousParameters Zero or more values to bind to anonymous parameters. + */ + run(...anonymousParameters: SQLInputValue[]): StatementResultingChanges; + run( + namedParameters: Record, + ...anonymousParameters: SQLInputValue[] + ): StatementResultingChanges; + /** + * The names of SQLite parameters begin with a prefix character. By default,`node:sqlite` requires that this prefix character is present when binding + * parameters. However, with the exception of dollar sign character, these + * prefix characters also require extra quoting when used in object keys. + * + * To improve ergonomics, this method can be used to also allow bare named + * parameters, which do not require the prefix character in JavaScript code. There + * are several caveats to be aware of when enabling bare named parameters: + * + * * The prefix character is still required in SQL. + * * The prefix character is still allowed in JavaScript. In fact, prefixed names + * will have slightly better binding performance. + * * Using ambiguous named parameters, such as `$k` and `@k`, in the same prepared + * statement will result in an exception as it cannot be determined how to bind + * a bare name. + * @since v22.5.0 + * @param enabled Enables or disables support for binding named parameters without the prefix character. + */ + setAllowBareNamedParameters(enabled: boolean): void; + /** + * By default, if an unknown name is encountered while binding parameters, an + * exception is thrown. This method allows unknown named parameters to be ignored. + * @since v22.15.0 + * @param enabled Enables or disables support for unknown named parameters. + */ + setAllowUnknownNamedParameters(enabled: boolean): void; + /** + * When enabled, query results returned by the `all()`, `get()`, and `iterate()` methods will be returned as arrays instead + * of objects. + * @since v24.0.0 + * @param enabled Enables or disables the return of query results as arrays. + */ + setReturnArrays(enabled: boolean): void; + /** + * When reading from the database, SQLite `INTEGER`s are mapped to JavaScript + * numbers by default. However, SQLite `INTEGER`s can store values larger than + * JavaScript numbers are capable of representing. In such cases, this method can + * be used to read `INTEGER` data using JavaScript `BigInt`s. This method has no + * impact on database write operations where numbers and `BigInt`s are both + * supported at all times. + * @since v22.5.0 + * @param enabled Enables or disables the use of `BigInt`s when reading `INTEGER` fields from the database. + */ + setReadBigInts(enabled: boolean): void; + /** + * The source SQL text of the prepared statement. This property is a + * wrapper around [`sqlite3_sql()`](https://www.sqlite.org/c3ref/expanded_sql.html). + * @since v22.5.0 + */ + readonly sourceSQL: string; + } + interface BackupOptions { + /** + * Name of the source database. This can be `'main'` (the default primary database) or any other + * database that have been added with [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html) + * @default 'main' + */ + source?: string | undefined; + /** + * Name of the target database. This can be `'main'` (the default primary database) or any other + * database that have been added with [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html) + * @default 'main' + */ + target?: string | undefined; + /** + * Number of pages to be transmitted in each batch of the backup. + * @default 100 + */ + rate?: number | undefined; + /** + * An optional callback function that will be called after each backup step. The argument passed + * to this callback is an `Object` with `remainingPages` and `totalPages` properties, describing the current progress + * of the backup operation. + */ + progress?: ((progressInfo: BackupProgressInfo) => void) | undefined; + } + interface BackupProgressInfo { + totalPages: number; + remainingPages: number; + } + /** + * This method makes a database backup. This method abstracts the + * [`sqlite3_backup_init()`](https://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupinit), + * [`sqlite3_backup_step()`](https://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupstep) + * and [`sqlite3_backup_finish()`](https://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupfinish) functions. + * + * The backed-up database can be used normally during the backup process. Mutations coming from the same connection - same + * `DatabaseSync` - object will be reflected in the backup right away. However, mutations from other connections will cause + * the backup process to restart. + * + * ```js + * import { backup, DatabaseSync } from 'node:sqlite'; + * + * const sourceDb = new DatabaseSync('source.db'); + * const totalPagesTransferred = await backup(sourceDb, 'backup.db', { + * rate: 1, // Copy one page at a time. + * progress: ({ totalPages, remainingPages }) => { + * console.log('Backup in progress', { totalPages, remainingPages }); + * }, + * }); + * + * console.log('Backup completed', totalPagesTransferred); + * ``` + * @since v23.8.0 + * @param sourceDb The database to backup. The source database must be open. + * @param path The path where the backup will be created. If the file already exists, + * the contents will be overwritten. + * @param options Optional configuration for the backup. The + * following properties are supported: + * @returns A promise that fulfills with the total number of backed-up pages upon completion, or rejects if an + * error occurs. + */ + function backup(sourceDb: DatabaseSync, path: PathLike, options?: BackupOptions): Promise; + /** + * @since v22.13.0 + */ + namespace constants { + /** + * The conflict handler is invoked with this constant when processing a DELETE or UPDATE change if a row with the required PRIMARY KEY fields is present in the database, but one or more other (non primary-key) fields modified by the update do not contain the expected "before" values. + * @since v22.14.0 + */ + const SQLITE_CHANGESET_DATA: number; + /** + * The conflict handler is invoked with this constant when processing a DELETE or UPDATE change if a row with the required PRIMARY KEY fields is not present in the database. + * @since v22.14.0 + */ + const SQLITE_CHANGESET_NOTFOUND: number; + /** + * This constant is passed to the conflict handler while processing an INSERT change if the operation would result in duplicate primary key values. + * @since v22.14.0 + */ + const SQLITE_CHANGESET_CONFLICT: number; + /** + * If foreign key handling is enabled, and applying a changeset leaves the database in a state containing foreign key violations, the conflict handler is invoked with this constant exactly once before the changeset is committed. If the conflict handler returns `SQLITE_CHANGESET_OMIT`, the changes, including those that caused the foreign key constraint violation, are committed. Or, if it returns `SQLITE_CHANGESET_ABORT`, the changeset is rolled back. + * @since v22.14.0 + */ + const SQLITE_CHANGESET_FOREIGN_KEY: number; + /** + * Conflicting changes are omitted. + * @since v22.12.0 + */ + const SQLITE_CHANGESET_OMIT: number; + /** + * Conflicting changes replace existing values. Note that this value can only be returned when the type of conflict is either `SQLITE_CHANGESET_DATA` or `SQLITE_CHANGESET_CONFLICT`. + * @since v22.12.0 + */ + const SQLITE_CHANGESET_REPLACE: number; + /** + * Abort when a change encounters a conflict and roll back database. + * @since v22.12.0 + */ + const SQLITE_CHANGESET_ABORT: number; + /** + * Deny the operation and cause an error to be returned. + * @since v24.10.0 + */ + const SQLITE_DENY: number; + /** + * Ignore the operation and continue as if it had never been requested. + * @since 24.10.0 + */ + const SQLITE_IGNORE: number; + /** + * Allow the operation to proceed normally. + * @since v24.10.0 + */ + const SQLITE_OK: number; + const SQLITE_CREATE_INDEX: number; + const SQLITE_CREATE_TABLE: number; + const SQLITE_CREATE_TEMP_INDEX: number; + const SQLITE_CREATE_TEMP_TABLE: number; + const SQLITE_CREATE_TEMP_TRIGGER: number; + const SQLITE_CREATE_TEMP_VIEW: number; + const SQLITE_CREATE_TRIGGER: number; + const SQLITE_CREATE_VIEW: number; + const SQLITE_DELETE: number; + const SQLITE_DROP_INDEX: number; + const SQLITE_DROP_TABLE: number; + const SQLITE_DROP_TEMP_INDEX: number; + const SQLITE_DROP_TEMP_TABLE: number; + const SQLITE_DROP_TEMP_TRIGGER: number; + const SQLITE_DROP_TEMP_VIEW: number; + const SQLITE_DROP_TRIGGER: number; + const SQLITE_DROP_VIEW: number; + const SQLITE_INSERT: number; + const SQLITE_PRAGMA: number; + const SQLITE_READ: number; + const SQLITE_SELECT: number; + const SQLITE_TRANSACTION: number; + const SQLITE_UPDATE: number; + const SQLITE_ATTACH: number; + const SQLITE_DETACH: number; + const SQLITE_ALTER_TABLE: number; + const SQLITE_REINDEX: number; + const SQLITE_ANALYZE: number; + const SQLITE_CREATE_VTABLE: number; + const SQLITE_DROP_VTABLE: number; + const SQLITE_FUNCTION: number; + const SQLITE_SAVEPOINT: number; + const SQLITE_COPY: number; + const SQLITE_RECURSIVE: number; + } +} diff --git a/node_modules/@types/node/stream.d.ts b/node_modules/@types/node/stream.d.ts new file mode 100644 index 0000000..c9b0811 --- /dev/null +++ b/node_modules/@types/node/stream.d.ts @@ -0,0 +1,1806 @@ +declare module "node:stream" { + import { Blob } from "node:buffer"; + import { Abortable, EventEmitter } from "node:events"; + import { ByteReadableStream, toAsyncStreamable } from "node:stream/iter"; + import * as promises from "node:stream/promises"; + import * as web from "node:stream/web"; + class Stream extends EventEmitter { + /** + * @since v0.9.4 + */ + pipe( + destination: T, + options?: Stream.PipeOptions, + ): T; + } + namespace Stream { + export { promises, Stream }; + } + namespace Stream { + interface PipeOptions { + /** + * End the writer when the reader ends. + * @default true + */ + end?: boolean | undefined; + } + interface StreamOptions extends Abortable { + emitClose?: boolean | undefined; + highWaterMark?: number | undefined; + objectMode?: boolean | undefined; + construct?: ((this: T, callback: (error?: Error | null) => void) => void) | undefined; + destroy?: ((this: T, error: Error | null, callback: (error?: Error | null) => void) => void) | undefined; + autoDestroy?: boolean | undefined; + } + interface ReadableOptions extends StreamOptions { + encoding?: BufferEncoding | undefined; + read?: ((this: T, size: number) => void) | undefined; + } + interface ReadableIteratorOptions { + /** + * When set to `false`, calling `return` on the async iterator, + * or exiting a `for await...of` iteration using a `break`, + * `return`, or `throw` will not destroy the stream. + * @default true + */ + destroyOnReturn?: boolean | undefined; + } + interface ReadableOperatorOptions extends Abortable { + /** + * The maximum concurrent invocations of `fn` to call + * on the stream at once. + * @default 1 + */ + concurrency?: number | undefined; + /** + * How many items to buffer while waiting for user consumption + * of the output. + * @default concurrency * 2 - 1 + */ + highWaterMark?: number | undefined; + } + /** @deprecated Use `ReadableOperatorOptions` instead. */ + interface ArrayOptions extends ReadableOperatorOptions {} + interface ReadableToWebOptions { + strategy?: web.QueuingStrategy | undefined; + type?: web.ReadableStreamType | undefined; + } + interface ReadableEventMap { + "close": []; + "data": [chunk: any]; + "end": []; + "error": [err: Error]; + "pause": []; + "readable": []; + "resume": []; + } + /** + * @since v0.9.4 + */ + class Readable extends Stream implements NodeJS.ReadableStream { + constructor(options?: ReadableOptions); + /** + * A utility method for creating Readable Streams out of iterators. + * @since v12.3.0, v10.17.0 + * @param iterable Object implementing the `Symbol.asyncIterator` or `Symbol.iterator` iterable protocol. Emits an 'error' event if a null value is passed. + * @param options Options provided to `new stream.Readable([options])`. By default, `Readable.from()` will set `options.objectMode` to `true`, unless this is explicitly opted out by setting `options.objectMode` to `false`. + */ + static from(iterable: Iterable | AsyncIterable, options?: ReadableOptions): Readable; + /** + * A utility method for creating a `Readable` from a web `ReadableStream`. + * @since v17.0.0 + */ + static fromWeb( + readableStream: web.ReadableStream, + options?: Pick, + ): Readable; + /** + * A utility method for creating a web `ReadableStream` from a `Readable`. + * @since v17.0.0 + */ + static toWeb( + streamReadable: NodeJS.ReadableStream, + options?: ReadableToWebOptions, + ): web.ReadableStream; + /** + * Returns whether the stream has been read from or cancelled. + * @since v16.8.0 + */ + static isDisturbed(stream: NodeJS.ReadableStream | web.ReadableStream): boolean; + /** + * Returns whether the stream was destroyed or errored before emitting `'end'`. + * @since v16.8.0 + */ + readonly readableAborted: boolean; + /** + * Is `true` if it is safe to call {@link read}, which means + * the stream has not been destroyed or emitted `'error'` or `'end'`. + * @since v11.4.0 + */ + readable: boolean; + /** + * Returns whether `'data'` has been emitted. + * @since v16.7.0, v14.18.0 + */ + readonly readableDidRead: boolean; + /** + * Getter for the property `encoding` of a given `Readable` stream. The `encoding` property can be set using the {@link setEncoding} method. + * @since v12.7.0 + */ + readonly readableEncoding: BufferEncoding | null; + /** + * Becomes `true` when [`'end'`](https://nodejs.org/docs/latest-v26.x/api/stream.html#event-end) event is emitted. + * @since v12.9.0 + */ + readonly readableEnded: boolean; + /** + * This property reflects the current state of a `Readable` stream as described + * in the [Three states](https://nodejs.org/docs/latest-v26.x/api/stream.html#three-states) section. + * @since v9.4.0 + */ + readableFlowing: boolean | null; + /** + * Returns the value of `highWaterMark` passed when creating this `Readable`. + * @since v9.3.0 + */ + readonly readableHighWaterMark: number; + /** + * This property contains the number of bytes (or objects) in the queue + * ready to be read. The value provides introspection data regarding + * the status of the `highWaterMark`. + * @since v9.4.0 + */ + readonly readableLength: number; + /** + * Getter for the property `objectMode` of a given `Readable` stream. + * @since v12.3.0 + */ + readonly readableObjectMode: boolean; + /** + * Is `true` after `readable.destroy()` has been called. + * @since v8.0.0 + */ + destroyed: boolean; + /** + * Is `true` after `'close'` has been emitted. + * @since v18.0.0 + */ + readonly closed: boolean; + /** + * Returns error if the stream has been destroyed with an error. + * @since v18.0.0 + */ + readonly errored: Error | null; + _construct?(callback: (error?: Error | null) => void): void; + _read(size: number): void; + /** + * The `readable.read()` method reads data out of the internal buffer and + * returns it. If no data is available to be read, `null` is returned. By default, + * the data is returned as a `Buffer` object unless an encoding has been + * specified using the `readable.setEncoding()` method or the stream is operating + * in object mode. + * + * The optional `size` argument specifies a specific number of bytes to read. If + * `size` bytes are not available to be read, `null` will be returned _unless_ the + * stream has ended, in which case all of the data remaining in the internal buffer + * will be returned. + * + * If the `size` argument is not specified, all of the data contained in the + * internal buffer will be returned. + * + * The `size` argument must be less than or equal to 1 GiB. + * + * The `readable.read()` method should only be called on `Readable` streams + * operating in paused mode. In flowing mode, `readable.read()` is called + * automatically until the internal buffer is fully drained. + * + * ```js + * const readable = getReadableStreamSomehow(); + * + * // 'readable' may be triggered multiple times as data is buffered in + * readable.on('readable', () => { + * let chunk; + * console.log('Stream is readable (new data received in buffer)'); + * // Use a loop to make sure we read all currently available data + * while (null !== (chunk = readable.read())) { + * console.log(`Read ${chunk.length} bytes of data...`); + * } + * }); + * + * // 'end' will be triggered once when there is no more data available + * readable.on('end', () => { + * console.log('Reached end of stream.'); + * }); + * ``` + * + * Each call to `readable.read()` returns a chunk of data, or `null`. The chunks + * are not concatenated. A `while` loop is necessary to consume all data + * currently in the buffer. When reading a large file `.read()` may return `null`, + * having consumed all buffered content so far, but there is still more data to + * come not yet buffered. In this case a new `'readable'` event will be emitted + * when there is more data in the buffer. Finally the `'end'` event will be + * emitted when there is no more data to come. + * + * Therefore to read a file's whole contents from a `readable`, it is necessary + * to collect chunks across multiple `'readable'` events: + * + * ```js + * const chunks = []; + * + * readable.on('readable', () => { + * let chunk; + * while (null !== (chunk = readable.read())) { + * chunks.push(chunk); + * } + * }); + * + * readable.on('end', () => { + * const content = chunks.join(''); + * }); + * ``` + * + * A `Readable` stream in object mode will always return a single item from + * a call to `readable.read(size)`, regardless of the value of the `size` argument. + * + * If the `readable.read()` method returns a chunk of data, a `'data'` event will + * also be emitted. + * + * Calling {@link read} after the `'end'` event has + * been emitted will return `null`. No runtime error will be raised. + * @since v0.9.4 + * @param size Optional argument to specify how much data to read. + */ + read(size?: number): any; + /** + * The `readable.setEncoding()` method sets the character encoding for + * data read from the `Readable` stream. + * + * By default, no encoding is assigned and stream data will be returned as `Buffer` objects. Setting an encoding causes the stream data + * to be returned as strings of the specified encoding rather than as `Buffer` objects. For instance, calling `readable.setEncoding('utf8')` will cause the + * output data to be interpreted as UTF-8 data, and passed as strings. Calling `readable.setEncoding('hex')` will cause the data to be encoded in hexadecimal + * string format. + * + * The `Readable` stream will properly handle multi-byte characters delivered + * through the stream that would otherwise become improperly decoded if simply + * pulled from the stream as `Buffer` objects. + * + * ```js + * const readable = getReadableStreamSomehow(); + * readable.setEncoding('utf8'); + * readable.on('data', (chunk) => { + * assert.equal(typeof chunk, 'string'); + * console.log('Got %d characters of string data:', chunk.length); + * }); + * ``` + * @since v0.9.4 + * @param encoding The encoding to use. + */ + setEncoding(encoding: BufferEncoding): this; + /** + * The `readable.pause()` method will cause a stream in flowing mode to stop + * emitting `'data'` events, switching out of flowing mode. Any data that + * becomes available will remain in the internal buffer. + * + * ```js + * const readable = getReadableStreamSomehow(); + * readable.on('data', (chunk) => { + * console.log(`Received ${chunk.length} bytes of data.`); + * readable.pause(); + * console.log('There will be no additional data for 1 second.'); + * setTimeout(() => { + * console.log('Now data will start flowing again.'); + * readable.resume(); + * }, 1000); + * }); + * ``` + * + * The `readable.pause()` method has no effect if there is a `'readable'` event listener. + * @since v0.9.4 + */ + pause(): this; + /** + * The `readable.resume()` method causes an explicitly paused `Readable` stream to + * resume emitting `'data'` events, switching the stream into flowing mode. + * + * The `readable.resume()` method can be used to fully consume the data from a + * stream without actually processing any of that data: + * + * ```js + * getReadableStreamSomehow() + * .resume() + * .on('end', () => { + * console.log('Reached the end, but did not read anything.'); + * }); + * ``` + * + * The `readable.resume()` method has no effect if there is a `'readable'` event listener. + * @since v0.9.4 + */ + resume(): this; + /** + * The `readable.isPaused()` method returns the current operating state of the `Readable`. + * This is used primarily by the mechanism that underlies the `readable.pipe()` method. + * In most typical cases, there will be no reason to use this method directly. + * + * ```js + * const readable = new stream.Readable(); + * + * readable.isPaused(); // === false + * readable.pause(); + * readable.isPaused(); // === true + * readable.resume(); + * readable.isPaused(); // === false + * ``` + * @since v0.11.14 + */ + isPaused(): boolean; + /** + * The `readable.unpipe()` method detaches a `Writable` stream previously attached + * using the {@link pipe} method. + * + * If the `destination` is not specified, then _all_ pipes are detached. + * + * If the `destination` is specified, but no pipe is set up for it, then + * the method does nothing. + * + * ```js + * import fs from 'node:fs'; + * const readable = getReadableStreamSomehow(); + * const writable = fs.createWriteStream('file.txt'); + * // All the data from readable goes into 'file.txt', + * // but only for the first second. + * readable.pipe(writable); + * setTimeout(() => { + * console.log('Stop writing to file.txt.'); + * readable.unpipe(writable); + * console.log('Manually close the file stream.'); + * writable.end(); + * }, 1000); + * ``` + * @since v0.9.4 + * @param destination Optional specific stream to unpipe + */ + unpipe(destination?: NodeJS.WritableStream): this; + /** + * Passing `chunk` as `null` signals the end of the stream (EOF) and behaves the + * same as `readable.push(null)`, after which no more data can be written. The EOF + * signal is put at the end of the buffer and any buffered data will still be + * flushed. + * + * The `readable.unshift()` method pushes a chunk of data back into the internal + * buffer. This is useful in certain situations where a stream is being consumed by + * code that needs to "un-consume" some amount of data that it has optimistically + * pulled out of the source, so that the data can be passed on to some other party. + * + * The `stream.unshift(chunk)` method cannot be called after the `'end'` event + * has been emitted or a runtime error will be thrown. + * + * Developers using `stream.unshift()` often should consider switching to + * use of a `Transform` stream instead. See the `API for stream implementers` section for more information. + * + * ```js + * // Pull off a header delimited by \n\n. + * // Use unshift() if we get too much. + * // Call the callback with (error, header, stream). + * import { StringDecoder } from 'node:string_decoder'; + * function parseHeader(stream, callback) { + * stream.on('error', callback); + * stream.on('readable', onReadable); + * const decoder = new StringDecoder('utf8'); + * let header = ''; + * function onReadable() { + * let chunk; + * while (null !== (chunk = stream.read())) { + * const str = decoder.write(chunk); + * if (str.includes('\n\n')) { + * // Found the header boundary. + * const split = str.split(/\n\n/); + * header += split.shift(); + * const remaining = split.join('\n\n'); + * const buf = Buffer.from(remaining, 'utf8'); + * stream.removeListener('error', callback); + * // Remove the 'readable' listener before unshifting. + * stream.removeListener('readable', onReadable); + * if (buf.length) + * stream.unshift(buf); + * // Now the body of the message can be read from the stream. + * callback(null, header, stream); + * return; + * } + * // Still reading the header. + * header += str; + * } + * } + * } + * ``` + * + * Unlike {@link push}, `stream.unshift(chunk)` will not + * end the reading process by resetting the internal reading state of the stream. + * This can cause unexpected results if `readable.unshift()` is called during a + * read (i.e. from within a {@link _read} implementation on a + * custom stream). Following the call to `readable.unshift()` with an immediate {@link push} will reset the reading state appropriately, + * however it is best to simply avoid calling `readable.unshift()` while in the + * process of performing a read. + * @since v0.9.11 + * @param chunk Chunk of data to unshift onto the read queue. For streams not operating in object mode, `chunk` must + * be a {string}, {Buffer}, {TypedArray}, {DataView} or `null`. For object mode streams, `chunk` may be any JavaScript value. + * @param encoding Encoding of string chunks. Must be a valid `Buffer` encoding, such as `'utf8'` or `'ascii'`. + */ + unshift(chunk: any, encoding?: BufferEncoding): void; + /** + * Prior to Node.js 0.10, streams did not implement the entire `node:stream` module API as it is currently defined. (See `Compatibility` for more + * information.) + * + * When using an older Node.js library that emits `'data'` events and has a {@link pause} method that is advisory only, the `readable.wrap()` method can be used to create a `Readable` + * stream that uses + * the old stream as its data source. + * + * It will rarely be necessary to use `readable.wrap()` but the method has been + * provided as a convenience for interacting with older Node.js applications and + * libraries. + * + * ```js + * import { OldReader } from './old-api-module.js'; + * import { Readable } from 'node:stream'; + * const oreader = new OldReader(); + * const myReader = new Readable().wrap(oreader); + * + * myReader.on('readable', () => { + * myReader.read(); // etc. + * }); + * ``` + * @since v0.9.4 + * @param stream An "old style" readable stream + */ + wrap(stream: NodeJS.ReadableStream): this; + push(chunk: any, encoding?: BufferEncoding): boolean; + /** + * ```js + * import { Readable } from 'node:stream'; + * + * async function* splitToWords(source) { + * for await (const chunk of source) { + * const words = String(chunk).split(' '); + * + * for (const word of words) { + * yield word; + * } + * } + * } + * + * const wordsStream = Readable.from(['text passed through', 'composed stream']).compose(splitToWords); + * const words = await wordsStream.toArray(); + * + * console.log(words); // prints ['text', 'passed', 'through', 'composed', 'stream'] + * ``` + * + * `readable.compose(s)` is equivalent to `stream.compose(readable, s)`. + * + * This method also allows for an `AbortSignal` to be provided, which will destroy + * the composed stream when aborted. + * + * See [`stream.compose(...streams)`](https://nodejs.org/docs/latest-v26.x/api/stream.html#streamcomposestreams) for more information. + * @since v19.1.0, v18.13.0 + * @returns a stream composed with the stream `stream`. + */ + compose( + stream: NodeJS.WritableStream | web.WritableStream | web.TransformStream | ((source: any) => void), + options?: Abortable, + ): Duplex; + /** + * The iterator created by this method gives users the option to cancel the destruction + * of the stream if the `for await...of` loop is exited by `return`, `break`, or `throw`, + * or if the iterator should destroy the stream if the stream emitted an error during iteration. + * @since v16.3.0 + */ + iterator(options?: ReadableIteratorOptions): NodeJS.AsyncIterator; + /** + * This method allows mapping over the stream. The *fn* function will be called for every chunk in the stream. + * If the *fn* function returns a promise - that promise will be `await`ed before being passed to the result stream. + * @since v17.4.0, v16.14.0 + * @param fn a function to map over every chunk in the stream. Async or not. + * @returns a stream mapped with the function *fn*. + */ + map(fn: (data: any, options?: Abortable) => any, options?: ReadableOperatorOptions): Readable; + /** + * This method allows filtering the stream. For each chunk in the stream the *fn* function will be called + * and if it returns a truthy value, the chunk will be passed to the result stream. + * If the *fn* function returns a promise - that promise will be `await`ed. + * @since v17.4.0, v16.14.0 + * @param fn a function to filter chunks from the stream. Async or not. + * @returns a stream filtered with the predicate *fn*. + */ + filter( + fn: (data: any, options?: Abortable) => boolean | Promise, + options?: ReadableOperatorOptions, + ): Readable; + /** + * This method allows iterating a stream. For each chunk in the stream the *fn* function will be called. + * If the *fn* function returns a promise - that promise will be `await`ed. + * + * This method is different from `for await...of` loops in that it can optionally process chunks concurrently. + * In addition, a `forEach` iteration can only be stopped by having passed a `signal` option + * and aborting the related AbortController while `for await...of` can be stopped with `break` or `return`. + * In either case the stream will be destroyed. + * + * This method is different from listening to the `'data'` event in that it uses the `readable` event + * in the underlying machinary and can limit the number of concurrent *fn* calls. + * @since v17.5.0 + * @param fn a function to call on each chunk of the stream. Async or not. + * @returns a promise for when the stream has finished. + */ + forEach( + fn: (data: any, options?: Abortable) => void | Promise, + options?: Pick, + ): Promise; + /** + * This method allows easily obtaining the contents of a stream. + * + * As this method reads the entire stream into memory, it negates the benefits of streams. It's intended + * for interoperability and convenience, not as the primary way to consume streams. + * @since v17.5.0 + * @returns a promise containing an array with the contents of the stream. + */ + toArray(options?: Abortable): Promise; + /** + * This method is similar to `Array.prototype.some` and calls *fn* on each chunk in the stream + * until the awaited return value is `true` (or any truthy value). Once an *fn* call on a chunk + * `await`ed return value is truthy, the stream is destroyed and the promise is fulfilled with `true`. + * If none of the *fn* calls on the chunks return a truthy value, the promise is fulfilled with `false`. + * @since v17.5.0 + * @param fn a function to call on each chunk of the stream. Async or not. + * @returns a promise evaluating to `true` if *fn* returned a truthy value for at least one of the chunks. + */ + some( + fn: (data: any, options?: Abortable) => boolean | Promise, + options?: Pick, + ): Promise; + /** + * This method is similar to `Array.prototype.find` and calls *fn* on each chunk in the stream + * to find a chunk with a truthy value for *fn*. Once an *fn* call's awaited return value is truthy, + * the stream is destroyed and the promise is fulfilled with value for which *fn* returned a truthy value. + * If all of the *fn* calls on the chunks return a falsy value, the promise is fulfilled with `undefined`. + * @since v17.5.0 + * @param fn a function to call on each chunk of the stream. Async or not. + * @returns a promise evaluating to the first chunk for which *fn* evaluated with a truthy value, + * or `undefined` if no element was found. + */ + find( + fn: (data: any, options?: Abortable) => data is T, + options?: Pick, + ): Promise; + find( + fn: (data: any, options?: Abortable) => boolean | Promise, + options?: Pick, + ): Promise; + /** + * This method is similar to `Array.prototype.every` and calls *fn* on each chunk in the stream + * to check if all awaited return values are truthy value for *fn*. Once an *fn* call on a chunk + * `await`ed return value is falsy, the stream is destroyed and the promise is fulfilled with `false`. + * If all of the *fn* calls on the chunks return a truthy value, the promise is fulfilled with `true`. + * @since v17.5.0 + * @param fn a function to call on each chunk of the stream. Async or not. + * @returns a promise evaluating to `true` if *fn* returned a truthy value for every one of the chunks. + */ + every( + fn: (data: any, options?: Abortable) => boolean | Promise, + options?: Pick, + ): Promise; + /** + * This method returns a new stream by applying the given callback to each chunk of the stream + * and then flattening the result. + * + * It is possible to return a stream or another iterable or async iterable from *fn* and the result streams + * will be merged (flattened) into the returned stream. + * @since v17.5.0 + * @param fn a function to map over every chunk in the stream. May be async. May be a stream or generator. + * @returns a stream flat-mapped with the function *fn*. + */ + flatMap( + fn: (data: any, options?: Abortable) => any, + options?: Pick, + ): Readable; + /** + * This method returns a new stream with the first *limit* chunks dropped from the start. + * @since v17.5.0 + * @param limit the number of chunks to drop from the readable. + * @returns a stream with *limit* chunks dropped from the start. + */ + drop(limit: number, options?: Abortable): Readable; + /** + * This method returns a new stream with the first *limit* chunks. + * @since v17.5.0 + * @param limit the number of chunks to take from the readable. + * @returns a stream with *limit* chunks taken. + */ + take(limit: number, options?: Abortable): Readable; + /** + * This method calls *fn* on each chunk of the stream in order, passing it the result from the calculation + * on the previous element. It returns a promise for the final value of the reduction. + * + * If no *initial* value is supplied the first chunk of the stream is used as the initial value. + * If the stream is empty, the promise is rejected with a `TypeError` with the `ERR_INVALID_ARGS` code property. + * + * The reducer function iterates the stream element-by-element which means that there is no *concurrency* parameter + * or parallelism. To perform a reduce concurrently, you can extract the async function to `readable.map` method. + * @since v17.5.0 + * @param fn a reducer function to call over every chunk in the stream. Async or not. + * @param initial the initial value to use in the reduction. + * @returns a promise for the final value of the reduction. + */ + reduce(fn: (previous: any, data: any, options?: Abortable) => T): Promise; + reduce( + fn: (previous: T, data: any, options?: Abortable) => T, + initial: T, + options?: Abortable, + ): Promise; + _destroy(error: Error | null, callback: (error?: Error | null) => void): void; + /** + * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'` event (unless `emitClose` is set to `false`). After this call, the readable + * stream will release any internal resources and subsequent calls to `push()` will be ignored. + * + * Once `destroy()` has been called any further calls will be a no-op and no + * further errors except from `_destroy()` may be emitted as `'error'`. + * + * Implementors should not override this method, but instead implement `readable._destroy()`. + * @since v8.0.0 + * @param error Error which will be passed as payload in `'error'` event + */ + destroy(error?: Error): this; + /** + * @returns `AsyncIterator` to fully consume the stream. + * @since v10.0.0 + */ + [Symbol.asyncIterator](): NodeJS.AsyncIterator; + /** + * When the `--experimental-stream-iter` flag is enabled, `Readable` streams + * implement the `Stream.toAsyncStreamable` protocol, enabling efficient + * consumption by the `stream/iter` API. + * + * This provides a batched async iterator that drains the stream's internal + * buffer into `Uint8Array[]` batches, amortizing the per-chunk Promise overhead + * of the standard `Symbol.asyncIterator` path. For byte-mode streams, chunks + * are yielded directly as `Buffer` instances (which are `Uint8Array` subclasses). + * For object-mode or encoded streams, each chunk is normalized to `Uint8Array` + * before batching. + * + * The returned iterator is tagged as a validated source, so `from()` + * passes it through without additional normalization. + * + * ```js + * import { Readable } from 'node:stream'; + * import { text, from } from 'node:stream/iter'; + * + * const readable = new Readable({ + * read() { this.push('hello'); this.push(null); }, + * }); + * + * // Readable is automatically consumed via toAsyncStreamable + * console.log(await text(from(readable))); // 'hello' + * ``` + * + * Without the `--experimental-stream-iter` flag, calling this method throws + * `ERR_STREAM_ITER_MISSING_FLAG`. + */ + [toAsyncStreamable](): ByteReadableStream; + /** + * Calls `readable.destroy()` with an `AbortError` and returns + * a promise that fulfills when the stream is finished. + * @since v20.4.0 + */ + [Symbol.asyncDispose](): Promise; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: ReadableEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: ReadableEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: ReadableEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: ReadableEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off(eventName: E, listener: (...args: ReadableEventMap[E]) => void): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on(eventName: E, listener: (...args: ReadableEventMap[E]) => void): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: ReadableEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: ReadableEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: ReadableEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: ReadableEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: ReadableEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface WritableOptions extends StreamOptions { + decodeStrings?: boolean | undefined; + defaultEncoding?: BufferEncoding | undefined; + write?: + | (( + this: T, + chunk: any, + encoding: BufferEncoding, + callback: (error?: Error | null) => void, + ) => void) + | undefined; + writev?: + | (( + this: T, + chunks: { + chunk: any; + encoding: BufferEncoding; + }[], + callback: (error?: Error | null) => void, + ) => void) + | undefined; + final?: ((this: T, callback: (error?: Error | null) => void) => void) | undefined; + } + interface WritableEventMap { + "close": []; + "drain": []; + "error": [err: Error]; + "finish": []; + "pipe": [src: Readable]; + "unpipe": [src: Readable]; + } + /** + * @since v0.9.4 + */ + class Writable extends Stream implements NodeJS.WritableStream { + constructor(options?: WritableOptions); + /** + * A utility method for creating a `Writable` from a web `WritableStream`. + * @since v17.0.0 + */ + static fromWeb( + writableStream: web.WritableStream, + options?: Pick, + ): Writable; + /** + * A utility method for creating a web `WritableStream` from a `Writable`. + * @since v17.0.0 + */ + static toWeb(streamWritable: NodeJS.WritableStream): web.WritableStream; + /** + * Is `true` if it is safe to call `writable.write()`, which means + * the stream has not been destroyed, errored, or ended. + * @since v11.4.0 + */ + writable: boolean; + /** + * Returns whether the stream was destroyed or errored before emitting `'finish'`. + * @since v18.0.0, v16.17.0 + */ + readonly writableAborted: boolean; + /** + * Is `true` after `writable.end()` has been called. This property + * does not indicate whether the data has been flushed, for this use `writable.writableFinished` instead. + * @since v12.9.0 + */ + readonly writableEnded: boolean; + /** + * Is set to `true` immediately before the `'finish'` event is emitted. + * @since v12.6.0 + */ + readonly writableFinished: boolean; + /** + * Return the value of `highWaterMark` passed when creating this `Writable`. + * @since v9.3.0 + */ + readonly writableHighWaterMark: number; + /** + * This property contains the number of bytes (or objects) in the queue + * ready to be written. The value provides introspection data regarding + * the status of the `highWaterMark`. + * @since v9.4.0 + */ + readonly writableLength: number; + /** + * Getter for the property `objectMode` of a given `Writable` stream. + * @since v12.3.0 + */ + readonly writableObjectMode: boolean; + /** + * Number of times `writable.uncork()` needs to be + * called in order to fully uncork the stream. + * @since v13.2.0, v12.16.0 + */ + readonly writableCorked: number; + /** + * Is `true` after `writable.destroy()` has been called. + * @since v8.0.0 + */ + destroyed: boolean; + /** + * Is `true` after `'close'` has been emitted. + * @since v18.0.0 + */ + readonly closed: boolean; + /** + * Returns error if the stream has been destroyed with an error. + * @since v18.0.0 + */ + readonly errored: Error | null; + /** + * Is `true` if the stream's buffer has been full and stream will emit `'drain'`. + * @since v15.2.0, v14.17.0 + */ + readonly writableNeedDrain: boolean; + _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void; + _writev?( + chunks: { + chunk: any; + encoding: BufferEncoding; + }[], + callback: (error?: Error | null) => void, + ): void; + _construct?(callback: (error?: Error | null) => void): void; + _destroy(error: Error | null, callback: (error?: Error | null) => void): void; + _final(callback: (error?: Error | null) => void): void; + /** + * The `writable.write()` method writes some data to the stream, and calls the + * supplied `callback` once the data has been fully handled. If an error + * occurs, the `callback` will be called with the error as its + * first argument. The `callback` is called asynchronously and before `'error'` is + * emitted. + * + * The return value is `true` if the internal buffer is less than the `highWaterMark` configured when the stream was created after admitting `chunk`. + * If `false` is returned, further attempts to write data to the stream should + * stop until the `'drain'` event is emitted. + * + * While a stream is not draining, calls to `write()` will buffer `chunk`, and + * return false. Once all currently buffered chunks are drained (accepted for + * delivery by the operating system), the `'drain'` event will be emitted. + * Once `write()` returns false, do not write more chunks + * until the `'drain'` event is emitted. While calling `write()` on a stream that + * is not draining is allowed, Node.js will buffer all written chunks until + * maximum memory usage occurs, at which point it will abort unconditionally. + * Even before it aborts, high memory usage will cause poor garbage collector + * performance and high RSS (which is not typically released back to the system, + * even after the memory is no longer required). Since TCP sockets may never + * drain if the remote peer does not read the data, writing a socket that is + * not draining may lead to a remotely exploitable vulnerability. + * + * Writing data while the stream is not draining is particularly + * problematic for a `Transform`, because the `Transform` streams are paused + * by default until they are piped or a `'data'` or `'readable'` event handler + * is added. + * + * If the data to be written can be generated or fetched on demand, it is + * recommended to encapsulate the logic into a `Readable` and use {@link pipe}. However, if calling `write()` is preferred, it is + * possible to respect backpressure and avoid memory issues using the `'drain'` event: + * + * ```js + * function write(data, cb) { + * if (!stream.write(data)) { + * stream.once('drain', cb); + * } else { + * process.nextTick(cb); + * } + * } + * + * // Wait for cb to be called before doing any other write. + * write('hello', () => { + * console.log('Write completed, do more writes now.'); + * }); + * ``` + * + * A `Writable` stream in object mode will always ignore the `encoding` argument. + * @since v0.9.4 + * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer}, + * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`. + * @param callback Callback for when this chunk of data is flushed. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + write(chunk: any, callback?: (error: Error | null | undefined) => void): boolean; + /** + * Writes data to the stream, with an explicit encoding for string data. + * @see {@link Writable.write} for full details. + * @since v0.9.4 + * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer}, + * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`. + * @param encoding The encoding, if `chunk` is a string. + * @param callback Callback for when this chunk of data is flushed. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + write(chunk: any, encoding: BufferEncoding, callback?: (error: Error | null | undefined) => void): boolean; + /** + * The `writable.setDefaultEncoding()` method sets the default `encoding` for a `Writable` stream. + * @since v0.11.15 + * @param encoding The new default encoding + */ + setDefaultEncoding(encoding: BufferEncoding): this; + /** + * Calling the `writable.end()` method signals that no more data will be written + * to the `Writable`. The optional `chunk` and `encoding` arguments allow one + * final additional chunk of data to be written immediately before closing the + * stream. + * + * Calling the {@link write} method after calling {@link end} will raise an error. + * + * ```js + * // Write 'hello, ' and then end with 'world!'. + * import fs from 'node:fs'; + * const file = fs.createWriteStream('example.txt'); + * file.write('hello, '); + * file.end('world!'); + * // Writing more now is not allowed! + * ``` + * @since v0.9.4 + * @param cb Callback for when the stream is finished. + */ + end(cb?: () => void): this; + /** + * Signals that no more data will be written, with one final chunk of data. + * @see {@link Writable.end} for full details. + * @since v0.9.4 + * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer}, + * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`. + * @param cb Callback for when the stream is finished. + */ + end(chunk: any, cb?: () => void): this; + /** + * Signals that no more data will be written, with one final chunk of data. + * @see {@link Writable.end} for full details. + * @since v0.9.4 + * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer}, + * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`. + * @param encoding The encoding if `chunk` is a string + * @param cb Callback for when the stream is finished. + */ + end(chunk: any, encoding: BufferEncoding, cb?: () => void): this; + /** + * The `writable.cork()` method forces all written data to be buffered in memory. + * The buffered data will be flushed when either the {@link uncork} or {@link end} methods are called. + * + * The primary intent of `writable.cork()` is to accommodate a situation in which + * several small chunks are written to the stream in rapid succession. Instead of + * immediately forwarding them to the underlying destination, `writable.cork()` buffers all the chunks until `writable.uncork()` is called, which will pass them + * all to `writable._writev()`, if present. This prevents a head-of-line blocking + * situation where data is being buffered while waiting for the first small chunk + * to be processed. However, use of `writable.cork()` without implementing `writable._writev()` may have an adverse effect on throughput. + * + * See also: `writable.uncork()`, `writable._writev()`. + * @since v0.11.2 + */ + cork(): void; + /** + * The `writable.uncork()` method flushes all data buffered since {@link cork} was called. + * + * When using `writable.cork()` and `writable.uncork()` to manage the buffering + * of writes to a stream, defer calls to `writable.uncork()` using `process.nextTick()`. Doing so allows batching of all `writable.write()` calls that occur within a given Node.js event + * loop phase. + * + * ```js + * stream.cork(); + * stream.write('some '); + * stream.write('data '); + * process.nextTick(() => stream.uncork()); + * ``` + * + * If the `writable.cork()` method is called multiple times on a stream, the + * same number of calls to `writable.uncork()` must be called to flush the buffered + * data. + * + * ```js + * stream.cork(); + * stream.write('some '); + * stream.cork(); + * stream.write('data '); + * process.nextTick(() => { + * stream.uncork(); + * // The data will not be flushed until uncork() is called a second time. + * stream.uncork(); + * }); + * ``` + * + * See also: `writable.cork()`. + * @since v0.11.2 + */ + uncork(): void; + /** + * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'` event (unless `emitClose` is set to `false`). After this call, the writable + * stream has ended and subsequent calls to `write()` or `end()` will result in + * an `ERR_STREAM_DESTROYED` error. + * This is a destructive and immediate way to destroy a stream. Previous calls to `write()` may not have drained, and may trigger an `ERR_STREAM_DESTROYED` error. + * Use `end()` instead of destroy if data should flush before close, or wait for + * the `'drain'` event before destroying the stream. + * + * Once `destroy()` has been called any further calls will be a no-op and no + * further errors except from `_destroy()` may be emitted as `'error'`. + * + * Implementors should not override this method, + * but instead implement `writable._destroy()`. + * @since v8.0.0 + * @param error Optional, an error to emit with `'error'` event. + */ + destroy(error?: Error): this; + /** + * Calls `writable.destroy()` with an `AbortError` and returns + * a promise that fulfills when the stream is finished. + * @since v22.4.0, v20.16.0 + */ + [Symbol.asyncDispose](): Promise; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: WritableEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: WritableEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: WritableEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: WritableEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off(eventName: E, listener: (...args: WritableEventMap[E]) => void): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on(eventName: E, listener: (...args: WritableEventMap[E]) => void): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: WritableEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: WritableEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: WritableEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: WritableEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: WritableEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface DuplexOptions extends ReadableOptions, WritableOptions { + allowHalfOpen?: boolean | undefined; + readableObjectMode?: boolean | undefined; + writableObjectMode?: boolean | undefined; + readableHighWaterMark?: number | undefined; + writableHighWaterMark?: number | undefined; + writableCorked?: number | undefined; + } + interface DuplexToWebOptions { + readableType?: web.ReadableStreamType | undefined; + } + interface DuplexEventMap extends ReadableEventMap, WritableEventMap {} + /** + * Duplex streams are streams that implement both the `Readable` and `Writable` interfaces. + * + * Examples of `Duplex` streams include: + * + * * `TCP sockets` + * * `zlib streams` + * * `crypto streams` + * @since v0.9.4 + */ + class Duplex extends Stream implements NodeJS.ReadWriteStream { + constructor(options?: DuplexOptions); + /** + * A utility method for creating duplex streams. + * + * - `Stream` converts writable stream into writable `Duplex` and readable stream + * to `Duplex`. + * - `Blob` converts into readable `Duplex`. + * - `string` converts into readable `Duplex`. + * - `ArrayBuffer` converts into readable `Duplex`. + * - `AsyncIterable` converts into a readable `Duplex`. Cannot yield `null`. + * - `AsyncGeneratorFunction` converts into a readable/writable transform + * `Duplex`. Must take a source `AsyncIterable` as first parameter. Cannot yield + * `null`. + * - `AsyncFunction` converts into a writable `Duplex`. Must return + * either `null` or `undefined` + * - `Object ({ writable, readable })` converts `readable` and + * `writable` into `Stream` and then combines them into `Duplex` where the + * `Duplex` will write to the `writable` and read from the `readable`. + * - `Promise` converts into readable `Duplex`. Value `null` is ignored. + * + * @since v16.8.0 + */ + static from( + src: + | NodeJS.ReadableStream + | NodeJS.WritableStream + | Blob + | string + | Iterable + | AsyncIterable + | ((source: AsyncIterable) => AsyncIterable) + | ((source: AsyncIterable) => Promise) + | Promise + | web.ReadableWritablePair + | web.ReadableStream + | web.WritableStream, + ): Duplex; + /** + * A utility method for creating a web `ReadableStream` and `WritableStream` from a `Duplex`. + * @since v17.0.0 + */ + static toWeb(streamDuplex: NodeJS.ReadWriteStream, options?: DuplexToWebOptions): web.ReadableWritablePair; + /** + * A utility method for creating a `Duplex` from a web `ReadableStream` and `WritableStream`. + * @since v17.0.0 + */ + static fromWeb( + duplexStream: web.ReadableWritablePair, + options?: Pick< + DuplexOptions, + "allowHalfOpen" | "decodeStrings" | "encoding" | "highWaterMark" | "objectMode" | "signal" + >, + ): Duplex; + /** + * If `false` then the stream will automatically end the writable side when the + * readable side ends. Set initially by the `allowHalfOpen` constructor option, + * which defaults to `true`. + * + * This can be changed manually to change the half-open behavior of an existing + * `Duplex` stream instance, but must be changed before the `'end'` event is emitted. + * @since v0.9.4 + */ + allowHalfOpen: boolean; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: DuplexEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: DuplexEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: DuplexEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: DuplexEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off(eventName: E, listener: (...args: DuplexEventMap[E]) => void): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on(eventName: E, listener: (...args: DuplexEventMap[E]) => void): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once(eventName: E, listener: (...args: DuplexEventMap[E]) => void): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: DuplexEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: DuplexEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: DuplexEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: DuplexEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface Duplex extends Readable, Writable {} + /** + * The utility function `duplexPair` returns an Array with two items, + * each being a `Duplex` stream connected to the other side: + * + * ```js + * const [ sideA, sideB ] = duplexPair(); + * ``` + * + * Whatever is written to one stream is made readable on the other. It provides + * behavior analogous to a network connection, where the data written by the client + * becomes readable by the server, and vice-versa. + * + * The Duplex streams are symmetrical; one or the other may be used without any + * difference in behavior. + * @param options A value to pass to both {@link Duplex} constructors, + * to set options such as buffering. + * @since v22.6.0 + */ + function duplexPair(options?: DuplexOptions): [Duplex, Duplex]; + type TransformCallback = (error?: Error | null, data?: any) => void; + interface TransformOptions extends DuplexOptions { + transform?: + | ((this: T, chunk: any, encoding: BufferEncoding, callback: TransformCallback) => void) + | undefined; + flush?: ((this: T, callback: TransformCallback) => void) | undefined; + } + /** + * Transform streams are `Duplex` streams where the output is in some way + * related to the input. Like all `Duplex` streams, `Transform` streams + * implement both the `Readable` and `Writable` interfaces. + * + * Examples of `Transform` streams include: + * + * * `zlib streams` + * * `crypto streams` + * @since v0.9.4 + */ + class Transform extends Duplex { + constructor(options?: TransformOptions); + _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void; + _flush(callback: TransformCallback): void; + } + /** + * The `stream.PassThrough` class is a trivial implementation of a `Transform` stream that simply passes the input bytes across to the output. Its purpose is + * primarily for examples and testing, but there are some use cases where `stream.PassThrough` is useful as a building block for novel sorts of streams. + */ + class PassThrough extends Transform {} + /** + * A stream to attach a signal to. + * + * Attaches an AbortSignal to a readable or writeable stream. This lets code + * control stream destruction using an `AbortController`. + * + * Calling `abort` on the `AbortController` corresponding to the passed `AbortSignal` will behave the same way as calling `.destroy(new AbortError())` on the + * stream, and `controller.error(new AbortError())` for webstreams. + * + * ```js + * import fs from 'node:fs'; + * + * const controller = new AbortController(); + * const read = addAbortSignal( + * controller.signal, + * fs.createReadStream(('object.json')), + * ); + * // Later, abort the operation closing the stream + * controller.abort(); + * ``` + * + * Or using an `AbortSignal` with a readable stream as an async iterable: + * + * ```js + * const controller = new AbortController(); + * setTimeout(() => controller.abort(), 10_000); // set a timeout + * const stream = addAbortSignal( + * controller.signal, + * fs.createReadStream(('object.json')), + * ); + * (async () => { + * try { + * for await (const chunk of stream) { + * await process(chunk); + * } + * } catch (e) { + * if (e.name === 'AbortError') { + * // The operation was cancelled + * } else { + * throw e; + * } + * } + * })(); + * ``` + * + * Or using an `AbortSignal` with a ReadableStream: + * + * ```js + * const controller = new AbortController(); + * const rs = new ReadableStream({ + * start(controller) { + * controller.enqueue('hello'); + * controller.enqueue('world'); + * controller.close(); + * }, + * }); + * + * addAbortSignal(controller.signal, rs); + * + * finished(rs, (err) => { + * if (err) { + * if (err.name === 'AbortError') { + * // The operation was cancelled + * } + * } + * }); + * + * const reader = rs.getReader(); + * + * reader.read().then(({ value, done }) => { + * console.log(value); // hello + * console.log(done); // false + * controller.abort(); + * }); + * ``` + * @since v15.4.0 + * @param signal A signal representing possible cancellation + * @param stream A stream to attach a signal to. + */ + function addAbortSignal< + T extends NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream, + >(signal: AbortSignal, stream: T): T; + /** + * Returns the default highWaterMark used by streams. + * Defaults to `65536` (64 KiB), or `16` for `objectMode`. + * @since v19.9.0 + */ + function getDefaultHighWaterMark(objectMode: boolean): number; + /** + * Sets the default highWaterMark used by streams. + * @since v19.9.0 + * @param value highWaterMark value + */ + function setDefaultHighWaterMark(objectMode: boolean, value: number): void; + interface FinishedOptions extends Abortable { + error?: boolean | undefined; + readable?: boolean | undefined; + writable?: boolean | undefined; + } + /** + * A readable and/or writable stream/webstream. + * + * A function to get notified when a stream is no longer readable, writable + * or has experienced an error or a premature close event. + * + * ```js + * import { finished } from 'node:stream'; + * import fs from 'node:fs'; + * + * const rs = fs.createReadStream('archive.tar'); + * + * finished(rs, (err) => { + * if (err) { + * console.error('Stream failed.', err); + * } else { + * console.log('Stream is done reading.'); + * } + * }); + * + * rs.resume(); // Drain the stream. + * ``` + * + * Especially useful in error handling scenarios where a stream is destroyed + * prematurely (like an aborted HTTP request), and will not emit `'end'` or `'finish'`. + * + * The `finished` API provides [`promise version`](https://nodejs.org/docs/latest-v26.x/api/stream.html#streamfinishedstream-options). + * + * `stream.finished()` leaves dangling event listeners (in particular `'error'`, `'end'`, `'finish'` and `'close'`) after `callback` has been + * invoked. The reason for this is so that unexpected `'error'` events (due to + * incorrect stream implementations) do not cause unexpected crashes. + * If this is unwanted behavior then the returned cleanup function needs to be + * invoked in the callback: + * + * ```js + * const cleanup = finished(rs, (err) => { + * cleanup(); + * // ... + * }); + * ``` + * @since v10.0.0 + * @param stream A readable and/or writable stream. + * @param callback A callback function that takes an optional error argument. + * @returns A cleanup function which removes all registered listeners. + */ + function finished( + stream: NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream, + options: FinishedOptions, + callback: (err?: NodeJS.ErrnoException | null) => void, + ): () => void; + function finished( + stream: NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream, + callback: (err?: NodeJS.ErrnoException | null) => void, + ): () => void; + namespace finished { + import __promisify__ = promises.finished; + export { __promisify__ }; + } + type PipelineSourceFunction = (options?: Abortable) => Iterable | AsyncIterable; + type PipelineSource = + | NodeJS.ReadableStream + | web.ReadableStream + | web.TransformStream + | Iterable + | AsyncIterable + | PipelineSourceFunction; + type PipelineSourceArgument = (T extends (...args: any[]) => infer R ? R : T) extends infer S + ? S extends web.TransformStream ? web.ReadableStream : S + : never; + type PipelineTransformGenerator, O> = ( + source: PipelineSourceArgument, + options?: Abortable, + ) => AsyncIterable; + type PipelineTransformStreams = + | NodeJS.ReadWriteStream + | web.TransformStream; + type PipelineTransform, O> = S extends + PipelineSource | PipelineTransformStreams | ((...args: any[]) => infer I) + ? PipelineTransformStreams | PipelineTransformGenerator + : never; + type PipelineTransformSource = PipelineSource | PipelineTransform; + type PipelineDestinationFunction, R> = ( + source: PipelineSourceArgument, + options?: Abortable, + ) => R; + type PipelineDestination, R> = S extends + PipelineSource | PipelineTransform ? + | NodeJS.WritableStream + | web.WritableStream + | web.TransformStream + | PipelineDestinationFunction + : never; + type PipelineCallback> = ( + err: NodeJS.ErrnoException | null, + value: S extends (...args: any[]) => PromiseLike ? R : undefined, + ) => void; + type PipelineResult> = S extends NodeJS.WritableStream ? S : Duplex; + /** + * A module method to pipe between streams and generators forwarding errors and + * properly cleaning up and provide a callback when the pipeline is complete. + * + * ```js + * import { pipeline } from 'node:stream'; + * import fs from 'node:fs'; + * import zlib from 'node:zlib'; + * + * // Use the pipeline API to easily pipe a series of streams + * // together and get notified when the pipeline is fully done. + * + * // A pipeline to gzip a potentially huge tar file efficiently: + * + * pipeline( + * fs.createReadStream('archive.tar'), + * zlib.createGzip(), + * fs.createWriteStream('archive.tar.gz'), + * (err) => { + * if (err) { + * console.error('Pipeline failed.', err); + * } else { + * console.log('Pipeline succeeded.'); + * } + * }, + * ); + * ``` + * + * The `pipeline` API provides a [`promise version`](https://nodejs.org/docs/latest-v26.x/api/stream.html#streampipelinesource-transforms-destination-options). + * + * `stream.pipeline()` will call `stream.destroy(err)` on all streams except: + * + * * `Readable` streams which have emitted `'end'` or `'close'`. + * * `Writable` streams which have emitted `'finish'` or `'close'`. + * + * `stream.pipeline()` leaves dangling event listeners on the streams + * after the `callback` has been invoked. In the case of reuse of streams after + * failure, this can cause event listener leaks and swallowed errors. If the last + * stream is readable, dangling event listeners will be removed so that the last + * stream can be consumed later. + * + * `stream.pipeline()` closes all the streams when an error is raised. + * The `IncomingRequest` usage with `pipeline` could lead to an unexpected behavior + * once it would destroy the socket without sending the expected response. + * See the example below: + * + * ```js + * import fs from 'node:fs'; + * import http from 'node:http'; + * import { pipeline } from 'node:stream'; + * + * const server = http.createServer((req, res) => { + * const fileStream = fs.createReadStream('./fileNotExist.txt'); + * pipeline(fileStream, res, (err) => { + * if (err) { + * console.log(err); // No such file + * // this message can't be sent once `pipeline` already destroyed the socket + * return res.end('error!!!'); + * } + * }); + * }); + * ``` + * @since v10.0.0 + * @param callback Called when the pipeline is fully done. + */ + function pipeline, D extends PipelineDestination>( + source: S, + destination: D, + callback: PipelineCallback, + ): PipelineResult; + function pipeline< + S extends PipelineSource, + T extends PipelineTransform, + D extends PipelineDestination, + >( + source: S, + transform: T, + destination: D, + callback: PipelineCallback, + ): PipelineResult; + function pipeline< + S extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + D extends PipelineDestination, + >( + source: S, + transform1: T1, + transform2: T2, + destination: D, + callback: PipelineCallback, + ): PipelineResult; + function pipeline< + S extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + D extends PipelineDestination, + >( + source: S, + transform1: T1, + transform2: T2, + transform3: T3, + destination: D, + callback: PipelineCallback, + ): PipelineResult; + function pipeline< + S extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + T4 extends PipelineTransform, + D extends PipelineDestination, + >( + source: S, + transform1: T1, + transform2: T2, + transform3: T3, + transform4: T4, + destination: D, + callback: PipelineCallback, + ): PipelineResult; + function pipeline( + streams: ReadonlyArray | PipelineTransform | PipelineDestination>, + callback: (err: NodeJS.ErrnoException | null) => void, + ): NodeJS.WritableStream; + function pipeline( + ...streams: [ + ...[PipelineSource, ...PipelineTransform[], PipelineDestination], + callback: ((err: NodeJS.ErrnoException | null) => void), + ] + ): NodeJS.WritableStream; + namespace pipeline { + import __promisify__ = promises.pipeline; + export { __promisify__ }; + } + type ComposeSource = + | NodeJS.ReadableStream + | web.ReadableStream + | Iterable + | AsyncIterable + | (() => AsyncIterable); + type ComposeTransformStreams = NodeJS.ReadWriteStream | web.TransformStream; + type ComposeTransformGenerator = (source: AsyncIterable) => AsyncIterable; + type ComposeTransform, O> = S extends + ComposeSource | ComposeTransformStreams | ComposeTransformGenerator + ? ComposeTransformStreams | ComposeTransformGenerator + : never; + type ComposeTransformSource = ComposeSource | ComposeTransform; + type ComposeDestination> = S extends ComposeTransformSource ? + | NodeJS.WritableStream + | web.WritableStream + | web.TransformStream + | ((source: AsyncIterable) => void) + : never; + /** + * Combines two or more streams into a `Duplex` stream that writes to the + * first stream and reads from the last. Each provided stream is piped into + * the next, using `stream.pipeline`. If any of the streams error then all + * are destroyed, including the outer `Duplex` stream. + * + * Because `stream.compose` returns a new stream that in turn can (and + * should) be piped into other streams, it enables composition. In contrast, + * when passing streams to `stream.pipeline`, typically the first stream is + * a readable stream and the last a writable stream, forming a closed + * circuit. + * + * If passed a `Function` it must be a factory method taking a `source` + * `Iterable`. + * + * ```js + * import { compose, Transform } from 'node:stream'; + * + * const removeSpaces = new Transform({ + * transform(chunk, encoding, callback) { + * callback(null, String(chunk).replace(' ', '')); + * }, + * }); + * + * async function* toUpper(source) { + * for await (const chunk of source) { + * yield String(chunk).toUpperCase(); + * } + * } + * + * let res = ''; + * for await (const buf of compose(removeSpaces, toUpper).end('hello world')) { + * res += buf; + * } + * + * console.log(res); // prints 'HELLOWORLD' + * ``` + * + * `stream.compose` can be used to convert async iterables, generators and + * functions into streams. + * + * * `AsyncIterable` converts into a readable `Duplex`. Cannot yield + * `null`. + * * `AsyncGeneratorFunction` converts into a readable/writable transform `Duplex`. + * Must take a source `AsyncIterable` as first parameter. Cannot yield + * `null`. + * * `AsyncFunction` converts into a writable `Duplex`. Must return + * either `null` or `undefined`. + * + * ```js + * import { compose } from 'node:stream'; + * import { finished } from 'node:stream/promises'; + * + * // Convert AsyncIterable into readable Duplex. + * const s1 = compose(async function*() { + * yield 'Hello'; + * yield 'World'; + * }()); + * + * // Convert AsyncGenerator into transform Duplex. + * const s2 = compose(async function*(source) { + * for await (const chunk of source) { + * yield String(chunk).toUpperCase(); + * } + * }); + * + * let res = ''; + * + * // Convert AsyncFunction into writable Duplex. + * const s3 = compose(async function(source) { + * for await (const chunk of source) { + * res += chunk; + * } + * }); + * + * await finished(compose(s1, s2, s3)); + * + * console.log(res); // prints 'HELLOWORLD' + * ``` + * + * For convenience, the `readable.compose(stream)` method is available on + * `Readable` and `Duplex` streams as a wrapper for this function. + * @since v16.9.0 + * @experimental + */ + /* eslint-disable @definitelytyped/no-unnecessary-generics */ + function compose(stream: ComposeSource | ComposeDestination): Duplex; + function compose< + S extends ComposeSource | ComposeTransform, + D extends ComposeTransform | ComposeDestination, + >( + source: S, + destination: D, + ): Duplex; + function compose< + S extends ComposeSource | ComposeTransform, + T extends ComposeTransform, + D extends ComposeTransform | ComposeDestination, + >(source: S, transform: T, destination: D): Duplex; + function compose< + S extends ComposeSource | ComposeTransform, + T1 extends ComposeTransform, + T2 extends ComposeTransform, + D extends ComposeTransform | ComposeDestination, + >(source: S, transform1: T1, transform2: T2, destination: D): Duplex; + function compose< + S extends ComposeSource | ComposeTransform, + T1 extends ComposeTransform, + T2 extends ComposeTransform, + T3 extends ComposeTransform, + D extends ComposeTransform | ComposeDestination, + >(source: S, transform1: T1, transform2: T2, transform3: T3, destination: D): Duplex; + function compose< + S extends ComposeSource | ComposeTransform, + T1 extends ComposeTransform, + T2 extends ComposeTransform, + T3 extends ComposeTransform, + T4 extends ComposeTransform, + D extends ComposeTransform | ComposeDestination, + >(source: S, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: D): Duplex; + function compose( + ...streams: [ + ComposeSource, + ...ComposeTransform[], + ComposeDestination, + ] + ): Duplex; + /* eslint-enable @definitelytyped/no-unnecessary-generics */ + /** + * Returns whether the stream has encountered an error. + * @since v17.3.0, v16.14.0 + */ + function isErrored( + stream: NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream, + ): boolean; + /** + * Returns whether the stream is readable. + * @since v17.4.0, v16.14.0 + * @returns Only returns `null` if `stream` is not a valid `Readable`, `Duplex` or `ReadableStream`. + */ + function isReadable(stream: NodeJS.ReadableStream | web.ReadableStream): boolean | null; + /** + * Returns whether the stream is writable. + * @since v20.0.0 + * @returns Only returns `null` if `stream` is not a valid `Writable`, `Duplex` or `WritableStream`. + */ + function isWritable(stream: NodeJS.WritableStream | web.WritableStream): boolean | null; + } + global { + namespace NodeJS { + // These interfaces are vestigial, and correspond roughly to the "streams2" interfaces + // from early versions of Node.js, but they are still used widely across the ecosystem. + // Accordingly, they are commonly used as "in-types" for @types/node APIs, so that + // eg. streams returned from older libraries will still be considered valid input to + // functions which accept stream arguments. + // It's not possible to change or remove these without astronomical levels of breakage. + interface ReadableStream extends EventEmitter { + readable: boolean; + read(size?: number): string | Buffer; + setEncoding(encoding: BufferEncoding): this; + pause(): this; + resume(): this; + isPaused(): boolean; + pipe(destination: T, options?: { end?: boolean | undefined }): T; + unpipe(destination?: WritableStream): this; + unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void; + wrap(oldStream: ReadableStream): this; + [Symbol.asyncIterator](): AsyncIterableIterator; + } + interface WritableStream extends EventEmitter { + writable: boolean; + write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean; + write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean; + end(cb?: () => void): this; + end(data: string | Uint8Array, cb?: () => void): this; + end(str: string, encoding?: BufferEncoding, cb?: () => void): this; + } + interface ReadWriteStream extends ReadableStream, WritableStream {} + } + } + export = Stream; +} +declare module "stream" { + import stream = require("node:stream"); + export = stream; +} diff --git a/node_modules/@types/node/stream/consumers.d.ts b/node_modules/@types/node/stream/consumers.d.ts new file mode 100644 index 0000000..27a474c --- /dev/null +++ b/node_modules/@types/node/stream/consumers.d.ts @@ -0,0 +1,114 @@ +declare module "node:stream/consumers" { + import { Blob, NonSharedBuffer } from "node:buffer"; + import { ReadableStream } from "node:stream/web"; + /** + * ```js + * import { arrayBuffer } from 'node:stream/consumers'; + * import { Readable } from 'node:stream'; + * import { TextEncoder } from 'node:util'; + * + * const encoder = new TextEncoder(); + * const dataArray = encoder.encode('hello world from consumers!'); + * + * const readable = Readable.from(dataArray); + * const data = await arrayBuffer(readable); + * console.log(`from readable: ${data.byteLength}`); + * // Prints: from readable: 76 + * ``` + * @since v16.7.0 + * @returns Fulfills with an `ArrayBuffer` containing the full contents of the stream. + */ + function arrayBuffer(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable): Promise; + /** + * ```js + * import { blob } from 'node:stream/consumers'; + * + * const dataBlob = new Blob(['hello world from consumers!']); + * + * const readable = dataBlob.stream(); + * const data = await blob(readable); + * console.log(`from readable: ${data.size}`); + * // Prints: from readable: 27 + * ``` + * @since v16.7.0 + * @returns Fulfills with a `Blob` containing the full contents of the stream. + */ + function blob(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable): Promise; + /** + * ```js + * import { buffer } from 'node:stream/consumers'; + * import { Readable } from 'node:stream'; + * import { Buffer } from 'node:buffer'; + * + * const dataBuffer = Buffer.from('hello world from consumers!'); + * + * const readable = Readable.from(dataBuffer); + * const data = await buffer(readable); + * console.log(`from readable: ${data.length}`); + * // Prints: from readable: 27 + * ``` + * @since v16.7.0 + * @returns Fulfills with a `Buffer` containing the full contents of the stream. + */ + function buffer(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable): Promise; + /** + * ```js + * import { bytes } from 'node:stream/consumers'; + * import { Readable } from 'node:stream'; + * import { Buffer } from 'node:buffer'; + * + * const dataBuffer = Buffer.from('hello world from consumers!'); + * + * const readable = Readable.from(dataBuffer); + * const data = await bytes(readable); + * console.log(`from readable: ${data.length}`); + * // Prints: from readable: 27 + * ``` + * @since v25.6.0 + * @returns Fulfills with a `Uint8Array` containing the full contents of the stream. + */ + function bytes( + stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable, + ): Promise; + /** + * ```js + * import { json } from 'node:stream/consumers'; + * import { Readable } from 'node:stream'; + * + * const items = Array.from( + * { + * length: 100, + * }, + * () => ({ + * message: 'hello world from consumers!', + * }), + * ); + * + * const readable = Readable.from(JSON.stringify(items)); + * const data = await json(readable); + * console.log(`from readable: ${data.length}`); + * // Prints: from readable: 100 + * ``` + * @since v16.7.0 + * @returns Fulfills with the contents of the stream parsed as a + * UTF-8 encoded string that is then passed through `JSON.parse()`. + */ + function json(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable): Promise; + /** + * ```js + * import { text } from 'node:stream/consumers'; + * import { Readable } from 'node:stream'; + * + * const readable = Readable.from('Hello world from consumers!'); + * const data = await text(readable); + * console.log(`from readable: ${data.length}`); + * // Prints: from readable: 27 + * ``` + * @since v16.7.0 + * @returns Fulfills with the contents of the stream parsed as a UTF-8 encoded string. + */ + function text(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable): Promise; +} +declare module "stream/consumers" { + export * from "node:stream/consumers"; +} diff --git a/node_modules/@types/node/stream/iter.d.ts b/node_modules/@types/node/stream/iter.d.ts new file mode 100644 index 0000000..f42fb52 --- /dev/null +++ b/node_modules/@types/node/stream/iter.d.ts @@ -0,0 +1,449 @@ +declare module "node:stream/iter" { + import { Abortable } from "node:events"; + import { Readable, Writable } from "node:stream"; + // Symbols and custom typedefs + const broadcastProtocol: unique symbol; + const drainableProtocol: unique symbol; + const shareProtocol: unique symbol; + const shareSyncProtocol: unique symbol; + const toAsyncStreamable: unique symbol; + const toStreamable: unique symbol; + type Source = + | string + | ArrayBufferLike + | ArrayBufferView + | Iterable + | AsyncIterable + | Streamable + | AsyncStreamable; + type SyncSource = string | ArrayBufferLike | ArrayBufferView | Iterable | Streamable; + type Transform = StatelessTransformFn | StatefulTransform; + type SyncTransform = SyncStatelessTransformFn | SyncStatefulTransform; + type TransformResult = + | string + | ArrayBufferLike + | ArrayBufferView + | Iterable + | AsyncIterable; + type SyncTransformResult = string | ArrayBufferLike | ArrayBufferView | Iterable; + interface AsyncStreamable { + [toAsyncStreamable](): Source; + } + interface Broadcastable { + [broadcastProtocol](options: BroadcastOptions): Broadcast; + } + interface Drainable { + [drainableProtocol](): Promise | null; + } + interface Shareable { + [shareProtocol](options: ShareOptions): Share; + } + interface Streamable { + [toStreamable](): SyncSource; + } + interface SyncShareable { + [shareSyncProtocol](options: ShareSyncOptions): SyncShare; + } + // IDL dictionaries, enums, typedefs + type BackpressurePolicy = "strict" | "unbounded" | "drop-oldest" | "drop-newest"; + type ByteReadableStream = AsyncIterable; + type SyncByteReadableStream = Iterable; + interface WriteOptions { + signal?: AbortSignal; + } + interface PushStreamOptions { + budget?: number; + backpressure?: BackpressurePolicy; + signal?: AbortSignal; + } + interface PullOptions { + signal?: AbortSignal; + } + interface PipeToOptions { + signal?: AbortSignal; + preventClose?: boolean; + preventFail?: boolean; + } + interface PipeToSyncOptions { + preventClose?: boolean; + preventFail?: boolean; + } + interface ConsumeOptions { + signal?: AbortSignal; + limit?: number; + } + interface ConsumeSyncOptions { + limit?: number; + } + interface TextConsumeOptions extends ConsumeOptions { + encoding?: string; + } + interface TextConsumeSyncOptions extends ConsumeSyncOptions { + encoding?: string; + } + interface MergeOptions { + signal?: AbortSignal; + } + interface BroadcastOptions { + budget?: number; + backpressure?: BackpressurePolicy; + signal?: AbortSignal; + } + interface ShareOptions { + budget?: number; + backpressure?: BackpressurePolicy; + signal?: AbortSignal; + } + interface ShareSyncOptions { + budget?: number; + backpressure?: BackpressurePolicy; + } + interface DuplexDirectionOptions { + budget?: number; + backpressure?: BackpressurePolicy; + } + interface DuplexOptions { + highWaterMark?: number; + backpressure?: BackpressurePolicy; + a?: DuplexDirectionOptions; + b?: DuplexDirectionOptions; + signal?: AbortSignal; + } + interface TransformCallbackOptions { + signal: AbortSignal; + } + interface StatelessTransformFn { + ( + chunks: Uint8Array[] | null, + options: TransformCallbackOptions, + ): Promise | TransformResult | null; + } + interface SyncStatelessTransformFn { + (chunks: Uint8Array[] | null): SyncTransformResult | null; + } + interface StatefulTransform { + transform( + source: AsyncIterable, + options: TransformCallbackOptions, + ): AsyncIterable; + } + interface SyncStatefulTransform { + transform(source: Iterable): Iterable; + } + // IDL interfaces + interface PushWriter extends Writer, Drainable {} + interface PushStreamResult { + writer: PushWriter; + readable: ByteReadableStream; + } + interface BroadcastWriter extends Writer, Drainable {} + interface BroadcastResult { + writer: BroadcastWriter; + broadcast: Broadcast; + } + interface Writer extends Disposable, AsyncDisposable { + readonly canWrite: boolean | null; + write(chunk: Uint8Array | string, options?: WriteOptions): Promise; + writev(chunks: Array, options?: WriteOptions): Promise; + writeSync(chunk: Uint8Array | string): boolean; + writevSync(chunks: Array): boolean; + end(options?: WriteOptions): Promise; + endSync(): number; + fail(reason?: any): void; + } + interface PartialWriter extends Partial { + write(chunk: Uint8Array | string, options?: WriteOptions): Promise; + } + interface SyncWriter extends Disposable { + readonly canWrite: boolean | null; + writeSync(chunk: Uint8Array | string): number; + writevSync(chunks: Array): number; + endSync(): number; + fail(reason?: any): void; + } + interface PartialSyncWriter extends Partial { + writeSync(chunk: Uint8Array | string): number; + } + interface Broadcast extends Disposable { + readonly consumerCount: number; + push(...args: any[]): ByteReadableStream; + cancel(reason?: any): void; + } + interface Share extends Disposable { + readonly consumerCount: number; + pull(...args: any[]): ByteReadableStream; + cancel(reason?: any): void; + } + interface SyncShare extends Disposable { + readonly consumerCount: number; + pull(...args: any): SyncByteReadableStream; + cancel(reason?: any): void; + } + interface DuplexChannel extends AsyncDisposable { + readonly writer: Writer; + readonly readable: ByteReadableStream; + close(): Promise; + } + // Push stream creation + function push(...transforms: Transform[]): PushStreamResult; + function push(...args: [...transforms: Transform[], options: PushStreamOptions]): PushStreamResult; + // Stream factories + function from(input: Source): ByteReadableStream; + function fromSync(input: SyncSource): SyncByteReadableStream; + // Pull pipelines + function pull(source: Source, ...transforms: Transform[]): ByteReadableStream; + function pull( + source: Source, + ...args: [...transforms: Transform[], options: PullOptions] + ): ByteReadableStream; + function pullSync(source: SyncSource, ...transforms: SyncTransform[]): SyncByteReadableStream; + // Pipe operations + function pipeTo(source: Source, writer: PartialWriter, options?: PipeToOptions): Promise; + function pipeTo(source: Source, ...args: [...transforms: Transform[], writer: PartialWriter]): Promise; + function pipeTo( + source: Source, + ...args: [...transforms: Transform[], writer: PartialWriter, options: PipeToOptions] + ): Promise; + function pipeToSync(source: SyncSource, writer: PartialSyncWriter, options?: PipeToSyncOptions): number; + function pipeToSync( + source: SyncSource, + ...args: [...transforms: SyncTransform[], writer: PartialSyncWriter] + ): number; + function pipeToSync( + source: SyncSource, + ...args: [...transforms: SyncTransform[], writer: PartialSyncWriter, options: PipeToSyncOptions] + ): number; + // Consumers + function bytes(source: Source, options?: ConsumeOptions): Promise; + function bytesSync(source: SyncSource, options?: ConsumeSyncOptions): Uint8Array; + function text(source: Source, options?: TextConsumeOptions): Promise; + function textSync(source: SyncSource, options?: TextConsumeSyncOptions): string; + function arrayBuffer(source: Source, options?: ConsumeOptions): Promise; + function arrayBufferSync(source: SyncSource, options?: ConsumeSyncOptions): ArrayBuffer; + function array(source: Source, options?: ConsumeOptions): Promise; + function arraySync(source: SyncSource, options?: ConsumeSyncOptions): Uint8Array[]; + // Utilities + function tap(callback: StatelessTransformFn): StatelessTransformFn; + function tapSync(callback: SyncStatelessTransformFn): SyncStatelessTransformFn; + function merge(...sources: Source[]): ByteReadableStream; + function merge(...args: [...sources: Source[], options: MergeOptions]): ByteReadableStream; + function ondrain(drainable: any): Promise | null; + // Multi-consumer + function broadcast(options?: BroadcastOptions): BroadcastResult; + function share(source: Source, options?: ShareOptions): Share; + function shareSync(source: SyncSource, options?: ShareSyncOptions): SyncShare; + // Duplex + function duplex(options?: DuplexOptions): [DuplexChannel, DuplexChannel]; + // Node.js-specific extensions + namespace Broadcast { + /** + * Create a `Broadcast` from an existing source. The source is consumed + * automatically and pushed to all subscribers. + * @since v25.9.0 + * @param options Same as `broadcast()`. + */ + function from( + input: ByteReadableStream | SyncByteReadableStream | Broadcastable, + options?: BroadcastOptions, + ): BroadcastResult; + } + namespace Share { + /** + * Create a `Share` from an existing source. + * @since v25.9.0 + * @param options Same as `share()`. + */ + function from(input: ByteReadableStream | SyncByteReadableStream | Shareable, options?: ShareOptions): Share; + } + namespace SyncShare { + /** + * @since v25.9.0 + */ + function from(input: SyncByteReadableStream | SyncShareable, options?: ShareSyncOptions): SyncShare; + } + /** + * Converts a classic Readable stream (or duck-typed equivalent) into a + * stream/iter async iterable source that can be passed to `from()`, + * `pull()`, `text()`, etc. + * + * If the object implements the `toAsyncStreamable` protocol (as + * `stream.Readable` does), that protocol is used. Otherwise, the function + * duck-types on `read()`, `on()`, and `off()` (EventEmitter) and wraps the + * stream with a batched async iterator. + * + * The result is cached per instance -- calling `fromReadable()` twice with the + * same stream returns the same iterable. + * + * For object-mode or encoded Readable streams, chunks are automatically + * normalized to `Uint8Array`. + * + * ```js + * import { Readable } from 'node:stream'; + * import { fromReadable, text } from 'node:stream/iter'; + * + * const readable = new Readable({ + * read() { this.push('hello world'); this.push(null); }, + * }); + * + * const result = await text(fromReadable(readable)); + * console.log(result); // 'hello world' + * ``` + * @since v26.1.0 + * @experimental + * @param readable A classic Readable stream or any object + * with `read()`, `on()` and `off()` methods. + * @returns A stream/iter async iterable source. + */ + function fromReadable(readable: NodeJS.ReadableStream): ByteReadableStream; + interface FromWritableOptions { + backpressure?: BackpressurePolicy | undefined; + } + /** + * Creates a stream/iter Writer adapter from a classic Writable stream (or + * duck-typed equivalent). The adapter can be passed to `pipeTo()` as a + * destination. + * + * Since all writes on a classic Writable are fundamentally asynchronous, + * the synchronous Writer methods (`writeSync`, `writevSync`, `endSync`) always + * return `false` or `-1`, deferring to the async path. The per-write + * `options.signal` parameter from the Writer interface is also ignored. + * + * The result is cached per instance and backpressure policy -- calling + * `fromWritable()` twice with the same stream and `backpressure` option returns + * the same Writer. + * + * For duck-typed streams that do not expose `writableHighWaterMark`, + * `writableLength`, or similar properties, sensible defaults are used. + * Object-mode writables (if detectable) are rejected since the Writer + * interface is bytes-only. + * + * ```js + * import { Writable } from 'node:stream'; + * import { from, fromWritable, pipeTo } from 'node:stream/iter'; + * + * const writable = new Writable({ + * write(chunk, encoding, cb) { console.log(chunk.toString()); cb(); }, + * }); + * + * await pipeTo(from('hello world'), + * fromWritable(writable, { backpressure: 'unbounded' })); + * ``` + * @since v26.1.0 + * @experimental + * @param writable A classic Writable stream or any object + * with `write()` and `on()` methods. + * @returns A stream/iter Writer adapter. + */ + function fromWritable(writable: NodeJS.WritableStream, options?: FromWritableOptions): Writer; + interface ToReadableOptions extends Abortable { + highWaterMark?: number | undefined; + } + /** + * Creates a byte-mode `stream.Readable` from an `AsyncIterable` + * (the native batch format used by the stream/iter API). Each `Uint8Array` in a + * yielded batch is pushed as a separate chunk into the Readable. + * + * ```js + * import { createWriteStream } from 'node:fs'; + * import { from, pull, toReadable } from 'node:stream/iter'; + * import { compressGzip } from 'node:zlib/iter'; + * + * const source = pull(from('hello world'), compressGzip()); + * const readable = toReadable(source); + * + * readable.pipe(createWriteStream('output.gz')); + * ``` + * @since v26.1.0 + * @experimental + * @param source An `AsyncIterable` source, such as + * the return value of `pull()` or `from()`. + */ + function toReadable(source: Source, options?: ToReadableOptions): Readable; + interface ToReadableSyncOptions { + highWaterMark?: number | undefined; + } + /** + * Creates a byte-mode `stream.Readable` from a synchronous + * `Iterable`. The `_read()` method pulls from the iterator + * synchronously, so data is available immediately via `readable.read()`. + * + * ```js + * import { fromSync, toReadableSync } from 'node:stream/iter'; + * + * const source = fromSync('hello world'); + * const readable = toReadableSync(source); + * + * console.log(readable.read().toString()); // 'hello world' + * ``` + * @since v26.1.0 + * @experimental + * @param source An `Iterable` source, such as the + * return value of `pullSync()` or `fromSync()`. + */ + function toReadableSync(source: SyncSource, options?: ToReadableSyncOptions): Readable; + /** + * Creates a classic `stream.Writable` backed by a stream/iter Writer. + * + * Each `_write()` / `_writev()` call attempts the Writer's synchronous method + * first (`writeSync` / `writevSync`), falling back to the async method if the + * sync path returns `false`. Similarly, `_final()` tries `endSync()` + * before `end()`. When the sync path succeeds, the callback is deferred via + * `queueMicrotask` to preserve the async resolution contract. + * + * The Writable's `highWaterMark` is set to `Number.MAX_SAFE_INTEGER` to + * effectively disable its internal buffering, allowing the underlying Writer + * to manage backpressure directly. + * + * ```js + * import { push, toWritable } from 'node:stream/iter'; + * + * const { writer, readable } = push(); + * const writable = toWritable(writer); + * + * writable.write('hello'); + * writable.end(); + * ``` + * @since v26.1.0 + * @experimental + * @param writer A stream/iter Writer. Only the `write()` method is + * required; `end()`, `fail()`, `writeSync()`, `writevSync()`, `endSync()`, + * and `writev()` are optional. + */ + function toWritable(writer: PartialWriter): Writable; + namespace Stream { + export { + array, + arrayBuffer, + arrayBufferSync, + arraySync, + broadcast, + broadcastProtocol, + bytes, + bytesSync, + drainableProtocol, + duplex, + from, + fromSync, + merge, + ondrain, + pipeTo, + pipeToSync, + pull, + pullSync, + push, + share, + shareProtocol, + shareSync, + shareSyncProtocol, + tap, + tapSync, + text, + textSync, + toAsyncStreamable, + toStreamable, + }; + } +} +declare module "stream/iter" { + export * from "node:stream/iter"; +} diff --git a/node_modules/@types/node/stream/promises.d.ts b/node_modules/@types/node/stream/promises.d.ts new file mode 100644 index 0000000..c57fe1e --- /dev/null +++ b/node_modules/@types/node/stream/promises.d.ts @@ -0,0 +1,211 @@ +declare module "node:stream/promises" { + import { Abortable } from "node:events"; + import { + FinishedOptions as _FinishedOptions, + PipelineDestination, + PipelineSource, + PipelineTransform, + } from "node:stream"; + import { ReadableStream, WritableStream } from "node:stream/web"; + interface FinishedOptions extends _FinishedOptions { + /** + * If true, removes the listeners registered by this function before the promise is fulfilled. + * @default false + */ + cleanup?: boolean | undefined; + } + /** + * ```js + * import { finished } from 'node:stream/promises'; + * import { createReadStream } from 'node:fs'; + * + * const rs = createReadStream('archive.tar'); + * + * async function run() { + * await finished(rs); + * console.log('Stream is done reading.'); + * } + * + * run().catch(console.error); + * rs.resume(); // Drain the stream. + * ``` + * + * The `finished` API also provides a [callback version](https://nodejs.org/docs/latest-v26.x/api/stream.html#streamfinishedstream-options-callback). + * + * `stream.finished()` leaves dangling event listeners (in particular + * `'error'`, `'end'`, `'finish'` and `'close'`) after the returned promise is + * resolved or rejected. The reason for this is so that unexpected `'error'` + * events (due to incorrect stream implementations) do not cause unexpected + * crashes. If this is unwanted behavior then `options.cleanup` should be set to + * `true`: + * + * ```js + * await finished(rs, { cleanup: true }); + * ``` + * @since v15.0.0 + * @returns Fulfills when the stream is no longer readable or writable. + */ + function finished( + stream: NodeJS.ReadableStream | NodeJS.WritableStream | ReadableStream | WritableStream, + options?: FinishedOptions, + ): Promise; + interface PipelineOptions extends Abortable { + end?: boolean | undefined; + } + type PipelineResult> = S extends (...args: any[]) => PromiseLike + ? Promise + : Promise; + /** + * ```js + * import { pipeline } from 'node:stream/promises'; + * import { createReadStream, createWriteStream } from 'node:fs'; + * import { createGzip } from 'node:zlib'; + * + * await pipeline( + * createReadStream('archive.tar'), + * createGzip(), + * createWriteStream('archive.tar.gz'), + * ); + * console.log('Pipeline succeeded.'); + * ``` + * + * To use an `AbortSignal`, pass it inside an options object, as the last argument. + * When the signal is aborted, `destroy` will be called on the underlying pipeline, + * with an `AbortError`. + * + * ```js + * import { pipeline } from 'node:stream/promises'; + * import { createReadStream, createWriteStream } from 'node:fs'; + * import { createGzip } from 'node:zlib'; + * + * const ac = new AbortController(); + * const { signal } = ac; + * setImmediate(() => ac.abort()); + * try { + * await pipeline( + * createReadStream('archive.tar'), + * createGzip(), + * createWriteStream('archive.tar.gz'), + * { signal }, + * ); + * } catch (err) { + * console.error(err); // AbortError + * } + * ``` + * + * The `pipeline` API also supports async generators: + * + * ```js + * import { pipeline } from 'node:stream/promises'; + * import { createReadStream, createWriteStream } from 'node:fs'; + * + * await pipeline( + * createReadStream('lowercase.txt'), + * async function* (source, { signal }) { + * source.setEncoding('utf8'); // Work with strings rather than `Buffer`s. + * for await (const chunk of source) { + * yield await processChunk(chunk, { signal }); + * } + * }, + * createWriteStream('uppercase.txt'), + * ); + * console.log('Pipeline succeeded.'); + * ``` + * + * Remember to handle the `signal` argument passed into the async generator. + * Especially in the case where the async generator is the source for the + * pipeline (i.e. first argument) or the pipeline will never complete. + * + * ```js + * import { pipeline } from 'node:stream/promises'; + * import fs from 'node:fs'; + * await pipeline( + * async function* ({ signal }) { + * await someLongRunningfn({ signal }); + * yield 'asd'; + * }, + * fs.createWriteStream('uppercase.txt'), + * ); + * console.log('Pipeline succeeded.'); + * ``` + * + * The `pipeline` API provides [callback version](https://nodejs.org/docs/latest-v26.x/api/stream.html#streampipelinesource-transforms-destination-callback): + * @since v15.0.0 + * @returns Fulfills when the pipeline is complete. + */ + function pipeline, B extends PipelineDestination>( + source: A, + destination: B, + options?: PipelineOptions, + ): PipelineResult; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + B extends PipelineDestination, + >( + source: A, + transform1: T1, + destination: B, + options?: PipelineOptions, + ): PipelineResult; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + B extends PipelineDestination, + >( + source: A, + transform1: T1, + transform2: T2, + destination: B, + options?: PipelineOptions, + ): PipelineResult; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + B extends PipelineDestination, + >( + source: A, + transform1: T1, + transform2: T2, + transform3: T3, + destination: B, + options?: PipelineOptions, + ): PipelineResult; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + T4 extends PipelineTransform, + B extends PipelineDestination, + >( + source: A, + transform1: T1, + transform2: T2, + transform3: T3, + transform4: T4, + destination: B, + options?: PipelineOptions, + ): PipelineResult; + function pipeline( + streams: readonly [PipelineSource, ...PipelineTransform[], PipelineDestination], + options?: PipelineOptions, + ): Promise; + function pipeline( + ...streams: [PipelineSource, ...PipelineTransform[], PipelineDestination] + ): Promise; + function pipeline( + ...streams: [ + PipelineSource, + ...PipelineTransform[], + PipelineDestination, + options: PipelineOptions, + ] + ): Promise; +} +declare module "stream/promises" { + export * from "node:stream/promises"; +} diff --git a/node_modules/@types/node/stream/web.d.ts b/node_modules/@types/node/stream/web.d.ts new file mode 100644 index 0000000..e3a6125 --- /dev/null +++ b/node_modules/@types/node/stream/web.d.ts @@ -0,0 +1,320 @@ +declare module "node:stream/web" { + import { TextDecoderCommon, TextDecoderOptions, TextEncoderCommon } from "node:util"; + type CompressionFormat = "brotli" | "deflate" | "deflate-raw" | "gzip"; + type ReadableStreamController = ReadableStreamDefaultController | ReadableByteStreamController; + type ReadableStreamReader = ReadableStreamDefaultReader | ReadableStreamBYOBReader; + type ReadableStreamReaderMode = "byob"; + type ReadableStreamReadResult = ReadableStreamReadValueResult | ReadableStreamReadDoneResult; + type ReadableStreamType = "bytes"; + interface GenericTransformStream { + readonly readable: ReadableStream; + readonly writable: WritableStream; + } + interface QueuingStrategy { + highWaterMark?: number; + size?: QueuingStrategySize; + } + interface QueuingStrategyInit { + highWaterMark: number; + } + interface QueuingStrategySize { + (chunk: T): number; + } + interface ReadableStreamBYOBReaderReadOptions { + min?: number; + } + interface ReadableStreamGenericReader { + readonly closed: Promise; + cancel(reason?: any): Promise; + } + interface ReadableStreamGetReaderOptions { + mode?: ReadableStreamReaderMode; + } + interface ReadableStreamIteratorOptions { + preventCancel?: boolean; + } + interface ReadableStreamReadDoneResult { + done: true; + value: T | undefined; + } + interface ReadableStreamReadValueResult { + done: false; + value: T; + } + interface ReadableWritablePair { + readable: ReadableStream; + writable: WritableStream; + } + interface StreamPipeOptions { + preventAbort?: boolean; + preventCancel?: boolean; + preventClose?: boolean; + signal?: AbortSignal; + } + interface Transformer { + cancel?: TransformerCancelCallback; + flush?: TransformerFlushCallback; + readableType?: undefined; + start?: TransformerStartCallback; + transform?: TransformerTransformCallback; + writableType?: undefined; + } + interface TransformerCancelCallback { + (reason: any): void | PromiseLike; + } + interface TransformerFlushCallback { + (controller: TransformStreamDefaultController): void | PromiseLike; + } + interface TransformerStartCallback { + (controller: TransformStreamDefaultController): any; + } + interface TransformerTransformCallback { + (chunk: I, controller: TransformStreamDefaultController): void | PromiseLike; + } + interface UnderlyingByteSource { + autoAllocateChunkSize?: number; + cancel?: UnderlyingSourceCancelCallback; + pull?: (controller: ReadableByteStreamController) => void | PromiseLike; + start?: (controller: ReadableByteStreamController) => any; + type: "bytes"; + } + interface UnderlyingDefaultSource { + cancel?: UnderlyingSourceCancelCallback; + pull?: (controller: ReadableStreamDefaultController) => void | PromiseLike; + start?: (controller: ReadableStreamDefaultController) => any; + type?: undefined; + } + interface UnderlyingSink { + abort?: UnderlyingSinkAbortCallback; + close?: UnderlyingSinkCloseCallback; + start?: UnderlyingSinkStartCallback; + type?: undefined; + write?: UnderlyingSinkWriteCallback; + } + interface UnderlyingSinkAbortCallback { + (reason?: any): void | PromiseLike; + } + interface UnderlyingSinkCloseCallback { + (): void | PromiseLike; + } + interface UnderlyingSinkStartCallback { + (controller: WritableStreamDefaultController): any; + } + interface UnderlyingSinkWriteCallback { + (chunk: W, controller: WritableStreamDefaultController): void | PromiseLike; + } + interface UnderlyingSource { + autoAllocateChunkSize?: number; + cancel?: UnderlyingSourceCancelCallback; + pull?: UnderlyingSourcePullCallback; + start?: UnderlyingSourceStartCallback; + type?: ReadableStreamType; + } + interface UnderlyingSourceCancelCallback { + (reason?: any): void | PromiseLike; + } + interface UnderlyingSourcePullCallback { + (controller: ReadableStreamController): void | PromiseLike; + } + interface UnderlyingSourceStartCallback { + (controller: ReadableStreamController): any; + } + interface ByteLengthQueuingStrategy extends QueuingStrategy { + readonly highWaterMark: number; + readonly size: QueuingStrategySize; + } + var ByteLengthQueuingStrategy: { + prototype: ByteLengthQueuingStrategy; + new(init: QueuingStrategyInit): ByteLengthQueuingStrategy; + }; + interface CompressionStream extends GenericTransformStream { + readonly readable: ReadableStream; + readonly writable: WritableStream; + } + var CompressionStream: { + prototype: CompressionStream; + new(format: CompressionFormat): CompressionStream; + }; + interface CountQueuingStrategy extends QueuingStrategy { + readonly highWaterMark: number; + readonly size: QueuingStrategySize; + } + var CountQueuingStrategy: { + prototype: CountQueuingStrategy; + new(init: QueuingStrategyInit): CountQueuingStrategy; + }; + interface DecompressionStream extends GenericTransformStream { + readonly readable: ReadableStream; + readonly writable: WritableStream; + } + var DecompressionStream: { + prototype: DecompressionStream; + new(format: CompressionFormat): DecompressionStream; + }; + interface ReadableByteStreamController { + readonly byobRequest: ReadableStreamBYOBRequest | null; + readonly desiredSize: number | null; + close(): void; + enqueue(chunk: NodeJS.NonSharedArrayBufferView): void; + error(e?: any): void; + } + var ReadableByteStreamController: { + prototype: ReadableByteStreamController; + new(): ReadableByteStreamController; + }; + interface ReadableStream { + readonly locked: boolean; + cancel(reason?: any): Promise; + getReader(options: { mode: "byob" }): ReadableStreamBYOBReader; + getReader(): ReadableStreamDefaultReader; + getReader(options?: ReadableStreamGetReaderOptions): ReadableStreamReader; + pipeThrough(transform: ReadableWritablePair, options?: StreamPipeOptions): ReadableStream; + pipeTo(destination: WritableStream, options?: StreamPipeOptions): Promise; + tee(): [ReadableStream, ReadableStream]; + [Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; + values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; + } + var ReadableStream: { + prototype: ReadableStream; + new( + underlyingSource: UnderlyingByteSource, + strategy?: { highWaterMark?: number }, + ): ReadableStream; + new(underlyingSource: UnderlyingDefaultSource, strategy?: QueuingStrategy): ReadableStream; + new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; + from(iterable: Iterable | AsyncIterable): ReadableStream; + }; + interface ReadableStreamAsyncIterator extends NodeJS.AsyncIterator { + [Symbol.asyncIterator](): ReadableStreamAsyncIterator; + } + interface ReadableStreamBYOBReader extends ReadableStreamGenericReader { + read( + view: T, + options?: ReadableStreamBYOBReaderReadOptions, + ): Promise>; + releaseLock(): void; + } + var ReadableStreamBYOBReader: { + prototype: ReadableStreamBYOBReader; + new(stream: ReadableStream): ReadableStreamBYOBReader; + }; + interface ReadableStreamBYOBRequest { + readonly view: NodeJS.NonSharedArrayBufferView | null; + respond(bytesWritten: number): void; + respondWithNewView(view: NodeJS.NonSharedArrayBufferView): void; + } + var ReadableStreamBYOBRequest: { + prototype: ReadableStreamBYOBRequest; + new(): ReadableStreamBYOBRequest; + }; + interface ReadableStreamDefaultController { + readonly desiredSize: number | null; + close(): void; + enqueue(chunk: R): void; + error(e?: any): void; + } + var ReadableStreamDefaultController: { + prototype: ReadableStreamDefaultController; + new(): ReadableStreamDefaultController; + }; + interface ReadableStreamDefaultReader extends ReadableStreamGenericReader { + read(): Promise>; + releaseLock(): void; + } + var ReadableStreamDefaultReader: { + prototype: ReadableStreamDefaultReader; + new(stream: ReadableStream): ReadableStreamDefaultReader; + }; + interface TextDecoderStream extends GenericTransformStream, TextDecoderCommon { + readonly readable: ReadableStream; + readonly writable: WritableStream; + } + var TextDecoderStream: { + prototype: TextDecoderStream; + new(label?: string, options?: TextDecoderOptions): TextDecoderStream; + }; + interface TextEncoderStream extends GenericTransformStream, TextEncoderCommon { + readonly readable: ReadableStream; + readonly writable: WritableStream; + } + var TextEncoderStream: { + prototype: TextEncoderStream; + new(): TextEncoderStream; + }; + interface TransformStream { + readonly readable: ReadableStream; + readonly writable: WritableStream; + } + var TransformStream: { + prototype: TransformStream; + new( + transformer?: Transformer, + writableStrategy?: QueuingStrategy, + readableStrategy?: QueuingStrategy, + ): TransformStream; + }; + interface TransformStreamDefaultController { + readonly desiredSize: number | null; + enqueue(chunk: O): void; + error(reason?: any): void; + terminate(): void; + } + var TransformStreamDefaultController: { + prototype: TransformStreamDefaultController; + new(): TransformStreamDefaultController; + }; + interface WritableStream { + readonly locked: boolean; + abort(reason?: any): Promise; + close(): Promise; + getWriter(): WritableStreamDefaultWriter; + } + var WritableStream: { + prototype: WritableStream; + new(underlyingSink?: UnderlyingSink, strategy?: QueuingStrategy): WritableStream; + }; + interface WritableStreamDefaultController { + readonly signal: AbortSignal; + error(e?: any): void; + } + var WritableStreamDefaultController: { + prototype: WritableStreamDefaultController; + new(): WritableStreamDefaultController; + }; + interface WritableStreamDefaultWriter { + readonly closed: Promise; + readonly desiredSize: number | null; + readonly ready: Promise; + abort(reason?: any): Promise; + close(): Promise; + releaseLock(): void; + write(chunk: W): Promise; + } + var WritableStreamDefaultWriter: { + prototype: WritableStreamDefaultWriter; + new(stream: WritableStream): WritableStreamDefaultWriter; + }; + // Node.js extensions + /** + * Runs the WHATWG `ReadableStreamTee` abstract operation on `stream`. + * + * This differs from `readableStream.tee()` only when `cloneForBranch2` is + * `true`. The `tee()` method always passes `false`, while other web platform + * specifications, such as Fetch body cloning, pass `true` so that the second + * branch receives cloned chunks and consumption of one branch cannot mutate chunks + * seen by the other. + * @since v26.5.0 + * @experimental + * @param cloneForBranch2 When `true`, chunks enqueued into the second + * branch are cloned from chunks enqueued into the first branch. **Default:** + * `false`. + * @returns Two `ReadableStream` branches. + */ + function ReadableStreamTee( + stream: ReadableStream, + cloneForBranch2?: boolean, + ): [ReadableStream, ReadableStream]; +} +declare module "stream/web" { + export * from "node:stream/web"; +} diff --git a/node_modules/@types/node/string_decoder.d.ts b/node_modules/@types/node/string_decoder.d.ts new file mode 100644 index 0000000..568e3f6 --- /dev/null +++ b/node_modules/@types/node/string_decoder.d.ts @@ -0,0 +1,27 @@ +declare module "node:string_decoder" { + class StringDecoder { + constructor(encoding?: BufferEncoding); + /** + * Returns a decoded string, ensuring that any incomplete multibyte characters at + * the end of the `Buffer`, or `TypedArray`, or `DataView` are omitted from the + * returned string and stored in an internal buffer for the next call to `stringDecoder.write()` or `stringDecoder.end()`. + * @since v0.1.99 + * @param buffer The bytes to decode. + */ + write(buffer: string | NodeJS.ArrayBufferView): string; + /** + * Returns any remaining input stored in the internal buffer as a string. Bytes + * representing incomplete UTF-8 and UTF-16 characters will be replaced with + * substitution characters appropriate for the character encoding. + * + * If the `buffer` argument is provided, one final call to `stringDecoder.write()` is performed before returning the remaining input. + * After `end()` is called, the `stringDecoder` object can be reused for new input. + * @since v0.9.3 + * @param buffer The bytes to decode. + */ + end(buffer?: string | NodeJS.ArrayBufferView): string; + } +} +declare module "string_decoder" { + export * from "node:string_decoder"; +} diff --git a/node_modules/@types/node/test.d.ts b/node_modules/@types/node/test.d.ts new file mode 100644 index 0000000..22acc43 --- /dev/null +++ b/node_modules/@types/node/test.d.ts @@ -0,0 +1,2558 @@ +declare module "node:test" { + import { AssertMethodNames, AssertPredicate } from "node:assert"; + import { Readable, ReadableEventMap } from "node:stream"; + import { TestEvent } from "node:test/reporters"; + import { URL } from "node:url"; + import TestFn = test.TestFn; + import TestOptions = test.TestOptions; + /** + * The `test()` function is the value imported from the `test` module. Each + * invocation of this function results in reporting the test to the `TestsStream`. + * + * The `TestContext` object passed to the `fn` argument can be used to perform + * actions related to the current test. Examples include skipping the test, adding + * additional diagnostic information, or creating subtests. + * + * `test()` returns a `Promise` that fulfills once the test completes. + * if `test()` is called within a suite, it fulfills immediately. + * The return value can usually be discarded for top level tests. + * However, the return value from subtests should be used to prevent the parent + * test from finishing first and cancelling the subtest + * as shown in the following example. + * + * ```js + * test('top level test', async (t) => { + * // The setTimeout() in the following subtest would cause it to outlive its + * // parent test if 'await' is removed on the next line. Once the parent test + * // completes, it will cancel any outstanding subtests. + * await t.test('longer running subtest', async (t) => { + * return new Promise((resolve, reject) => { + * setTimeout(resolve, 1000); + * }); + * }); + * }); + * ``` + * + * The `timeout` option can be used to fail the test if it takes longer than `timeout` milliseconds to complete. However, it is not a reliable mechanism for + * canceling tests because a running test might block the application thread and + * thus prevent the scheduled cancellation. + * @since v18.0.0, v16.17.0 + * @param name The name of the test, which is displayed when reporting test results. + * Defaults to the `name` property of `fn`, or `''` if `fn` does not have a name. + * @param options Configuration options for the test. + * @param fn The function under test. The first argument to this function is a {@link TestContext} object. + * If the test uses callbacks, the callback function is passed as the second argument. + * @return Fulfilled with `undefined` once the test completes, or immediately if the test runs within a suite. + */ + function test(name?: string, fn?: TestFn): Promise; + function test(name?: string, options?: TestOptions, fn?: TestFn): Promise; + function test(options?: TestOptions, fn?: TestFn): Promise; + function test(fn?: TestFn): Promise; + namespace test { + export { test }; + export { suite as describe, test as it }; + } + namespace test { + /** + * **Note:** `shard` is used to horizontally parallelize test running across + * machines or processes, ideal for large-scale executions across varied + * environments. It's incompatible with `watch` mode, tailored for rapid + * code iteration by automatically rerunning tests on file changes. + * + * ```js + * import { tap } from 'node:test/reporters'; + * import { run } from 'node:test'; + * import process from 'node:process'; + * import path from 'node:path'; + * + * run({ files: [path.resolve('./tests/test.js')] }) + * .compose(tap) + * .pipe(process.stdout); + * ``` + * @since v18.9.0, v16.19.0 + * @param options Configuration options for running tests. + */ + function run(options?: RunOptions): TestsStream; + /** + * The `suite()` function is imported from the `node:test` module. + * @param name The name of the suite, which is displayed when reporting test results. + * Defaults to the `name` property of `fn`, or `''` if `fn` does not have a name. + * @param options Configuration options for the suite. This supports the same options as {@link test}. + * @param fn The suite function declaring nested tests and suites. The first argument to this function is a {@link SuiteContext} object. + * @return Immediately fulfilled with `undefined`. + * @since v20.13.0 + */ + function suite(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; + function suite(name?: string, fn?: SuiteFn): Promise; + function suite(options?: TestOptions, fn?: SuiteFn): Promise; + function suite(fn?: SuiteFn): Promise; + namespace suite { + /** + * Shorthand for skipping a suite. This is the same as calling {@link suite} with `options.skip` set to `true`. + * @since v20.13.0 + */ + function skip(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; + function skip(name?: string, fn?: SuiteFn): Promise; + function skip(options?: TestOptions, fn?: SuiteFn): Promise; + function skip(fn?: SuiteFn): Promise; + /** + * Shorthand for marking a suite as `TODO`. This is the same as calling {@link suite} with `options.todo` set to `true`. + * @since v20.13.0 + */ + function todo(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; + function todo(name?: string, fn?: SuiteFn): Promise; + function todo(options?: TestOptions, fn?: SuiteFn): Promise; + function todo(fn?: SuiteFn): Promise; + /** + * Shorthand for marking a suite as `only`. This is the same as calling {@link suite} with `options.only` set to `true`. + * @since v20.13.0 + */ + function only(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; + function only(name?: string, fn?: SuiteFn): Promise; + function only(options?: TestOptions, fn?: SuiteFn): Promise; + function only(fn?: SuiteFn): Promise; + /** + * This flips the pass/fail reporting for a specific test or suite: a flagged test + * case must throw in order to pass, and a flagged test case that does not throw + * fails. + * @since v25.5.0 + */ + function expectFailure(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; + function expectFailure(name?: string, fn?: SuiteFn): Promise; + function expectFailure(options?: TestOptions, fn?: SuiteFn): Promise; + function expectFailure(fn?: SuiteFn): Promise; + } + /** + * Shorthand for skipping a test. This is the same as calling {@link test} with `options.skip` set to `true`. + * @since v20.2.0 + */ + function skip(name?: string, options?: TestOptions, fn?: TestFn): Promise; + function skip(name?: string, fn?: TestFn): Promise; + function skip(options?: TestOptions, fn?: TestFn): Promise; + function skip(fn?: TestFn): Promise; + /** + * Shorthand for marking a test as `TODO`. This is the same as calling {@link test} with `options.todo` set to `true`. + * @since v20.2.0 + */ + function todo(name?: string, options?: TestOptions, fn?: TestFn): Promise; + function todo(name?: string, fn?: TestFn): Promise; + function todo(options?: TestOptions, fn?: TestFn): Promise; + function todo(fn?: TestFn): Promise; + /** + * Shorthand for marking a test as `only`. This is the same as calling {@link test} with `options.only` set to `true`. + * @since v20.2.0 + */ + function only(name?: string, options?: TestOptions, fn?: TestFn): Promise; + function only(name?: string, fn?: TestFn): Promise; + function only(options?: TestOptions, fn?: TestFn): Promise; + function only(fn?: TestFn): Promise; + // added in v25.5.0, undocumented + function expectFailure(name?: string, options?: TestOptions, fn?: TestFn): Promise; + function expectFailure(name?: string, fn?: TestFn): Promise; + function expectFailure(options?: TestOptions, fn?: TestFn): Promise; + function expectFailure(fn?: TestFn): Promise; + /** + * The type of a function passed to {@link test}. The first argument to this function is a {@link TestContext} object. + * If the test uses callbacks, the callback function is passed as the second argument. + */ + type TestFn = (t: TestContext, done: (result?: any) => void) => void | Promise; + /** + * The type of a suite test function. The argument to this function is a {@link SuiteContext} object. + */ + type SuiteFn = (s: SuiteContext) => void | Promise; + interface TestShard { + /** + * A positive integer between 1 and `total` that specifies the index of the shard to run. + */ + index: number; + /** + * A positive integer that specifies the total number of shards to split the test files to. + */ + total: number; + } + interface RunOptions { + /** + * If a number is provided, then that many tests would run asynchronously (they are still managed by the single-threaded event loop). + * If `true`, it would run `os.availableParallelism() - 1` test files in parallel. If `false`, it would only run one test file at a time. + * @default false + */ + concurrency?: number | boolean | undefined; + /** + * Specifies the current working directory to be used by the test runner. + * Serves as the base path for resolving files according to the + * [test runner execution model](https://nodejs.org/docs/latest-v26.x/api/test.html#test-runner-execution-model). + * @since v23.0.0 + * @default process.cwd() + */ + cwd?: string | undefined; + /** + * An array containing the list of files to run. If omitted, files are run according to the + * [test runner execution model](https://nodejs.org/docs/latest-v26.x/api/test.html#test-runner-execution-model). + */ + files?: readonly string[] | undefined; + /** + * Configures the test runner to exit the process once all known + * tests have finished executing even if the event loop would + * otherwise remain active. + * @default false + */ + forceExit?: boolean | undefined; + /** + * An array containing the list of glob patterns to match test files. + * This option cannot be used together with `files`. If omitted, files are run according to the + * [test runner execution model](https://nodejs.org/docs/latest-v26.x/api/test.html#test-runner-execution-model). + * @since v22.6.0 + */ + globPatterns?: readonly string[] | undefined; + /** + * Sets inspector port of test child process. + * This can be a number, or a function that takes no arguments and returns a + * number. If a nullish value is provided, each process gets its own port, + * incremented from the primary's `process.debugPort`. This option is ignored + * if the `isolation` option is set to `'none'` as no child processes are + * spawned. + * @default undefined + */ + inspectPort?: number | (() => number) | undefined; + /** + * Configures the type of test isolation. If set to + * `'process'`, each test file is run in a separate child process. If set to + * `'none'`, all test files run in the current process. + * @default 'process' + * @since v22.8.0 + */ + isolation?: "process" | "none" | undefined; + /** + * If truthy, the test context will only run tests that have the `only` option set + */ + only?: boolean | undefined; + /** + * A function that accepts the `TestsStream` instance and can be used to setup listeners before any tests are run. + * @default undefined + */ + setup?: ((reporter: TestsStream) => void | Promise) | undefined; + /** + * An array of CLI flags to pass to the `node` executable when + * spawning the subprocesses. This option has no effect when `isolation` is `'none`'. + * @since v22.10.0 + * @default [] + */ + execArgv?: readonly string[] | undefined; + /** + * An array of CLI flags to pass to each test file when spawning the + * subprocesses. This option has no effect when `isolation` is `'none'`. + * @since v22.10.0 + * @default [] + */ + argv?: readonly string[] | undefined; + /** + * Allows aborting an in-progress test execution. + */ + signal?: AbortSignal | undefined; + /** + * If provided, only run tests whose name matches the provided pattern. + * Strings are interpreted as JavaScript regular expressions. + * @default undefined + */ + testNamePatterns?: string | RegExp | ReadonlyArray | undefined; + /** + * A String, RegExp or a RegExp Array, that can be used to exclude running tests whose + * name matches the provided pattern. Test name patterns are interpreted as JavaScript + * regular expressions. For each test that is executed, any corresponding test hooks, + * such as `beforeEach()`, are also run. + * @default undefined + * @since v22.1.0 + */ + testSkipPatterns?: string | RegExp | ReadonlyArray | undefined; + /** + * A tag name, or an array of tag names, + * used to filter tests by their declared tags. Tests must contain every + * listed tag to run. Equivalent to passing `--experimental-test-tag-filter` + * on the command line. See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags). + * @default undefined + * @since v26.2.0 + */ + testTagFilters?: string | readonly string[] | undefined; + /** + * The number of milliseconds after which the test execution will fail. + * If unspecified, subtests inherit this value from their parent. + * @default Infinity + */ + timeout?: number | undefined; + /** + * Whether to run in watch mode or not. + * @default false + */ + watch?: boolean | undefined; + /** + * Running tests in a specific shard. + * @default undefined + */ + shard?: TestShard | undefined; + /** + * Randomize execution order for test files and queued tests. + * This option is not supported with `watch: true`. + * @since v26.1.0 + * @default false + */ + randomize?: boolean | undefined; + /** + * Seed used when randomizing execution order. If this + * option is set, runs can replay the same randomized order deterministically, + * and setting this option also enables randomization. The value must be an + * integer between `0` and `4294967295`. + */ + randomSeed?: number | undefined; + /** + * A file path where the test runner will + * store the state of the tests to allow rerunning only the failed tests on a next run. + * @since v24.7.0 + * @default undefined + */ + rerunFailuresFilePath?: string | undefined; + /** + * enable [code coverage](https://nodejs.org/docs/latest-v26.x/api/test.html#collecting-code-coverage) collection. + * @since v22.10.0 + * @default false + */ + coverage?: boolean | undefined; + /** + * Excludes specific files from code coverage + * using a glob pattern, which can match both absolute and relative file paths. + * This property is only applicable when `coverage` was set to `true`. + * If both `coverageExcludeGlobs` and `coverageIncludeGlobs` are provided, + * files must meet **both** criteria to be included in the coverage report. + * @since v22.10.0 + * @default undefined + */ + coverageExcludeGlobs?: string | readonly string[] | undefined; + /** + * Includes specific files in code coverage + * using a glob pattern, which can match both absolute and relative file paths. + * This property is only applicable when `coverage` was set to `true`. + * If both `coverageExcludeGlobs` and `coverageIncludeGlobs` are provided, + * files must meet **both** criteria to be included in the coverage report. + * @since v22.10.0 + * @default undefined + */ + coverageIncludeGlobs?: string | readonly string[] | undefined; + /** + * Require a minimum percent of covered lines. If code + * coverage does not reach the threshold specified, the process will exit with code `1`. + * @since v22.10.0 + * @default 0 + */ + lineCoverage?: number | undefined; + /** + * Require a minimum percent of covered branches. If code + * coverage does not reach the threshold specified, the process will exit with code `1`. + * @since v22.10.0 + * @default 0 + */ + branchCoverage?: number | undefined; + /** + * Require a minimum percent of covered functions. If code + * coverage does not reach the threshold specified, the process will exit with code `1`. + * @since v22.10.0 + * @default 0 + */ + functionCoverage?: number | undefined; + /** + * Specify environment variables to be passed along to the test process. + * This option is not compatible with `isolation='none'`. These variables will override + * those from the main process, and are not merged with `process.env`. + * @since v25.6.0 + * @default process.env + */ + env?: NodeJS.ProcessEnv | undefined; + } + interface TestsStreamEventMap extends ReadableEventMap { + "data": [data: TestEvent]; + "test:coverage": [data: EventData.TestCoverage]; + "test:complete": [data: EventData.TestComplete]; + "test:dequeue": [data: EventData.TestDequeue]; + "test:diagnostic": [data: EventData.TestDiagnostic]; + "test:enqueue": [data: EventData.TestEnqueue]; + "test:fail": [data: EventData.TestFail]; + "test:interrupted": [data: EventData.TestInterrupted]; + "test:log": [data: EventData.TestLog]; + "test:pass": [data: EventData.TestPass]; + "test:plan": [data: EventData.TestPlan]; + "test:start": [data: EventData.TestStart]; + "test:stderr": [data: EventData.TestStderr]; + "test:stdout": [data: EventData.TestStdout]; + "test:summary": [data: EventData.TestSummary]; + "test:watch:drained": []; + "test:watch:restarted": []; + } + /** + * A successful call to `run()` will return a new `TestsStream` object, streaming a series of events representing the execution of the tests. + * + * Some of the events are guaranteed to be emitted in the same order as the tests are defined, while others are emitted in the order that the tests execute. + * @since v18.9.0, v16.19.0 + */ + interface TestsStream extends Readable { + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: TestsStreamEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: TestsStreamEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: TestsStreamEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: TestsStreamEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: TestsStreamEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: TestsStreamEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: TestsStreamEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: TestsStreamEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: TestsStreamEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners( + eventName: E, + ): ((...args: TestsStreamEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: TestsStreamEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + namespace EventData { + interface Error extends globalThis.Error { + cause: unknown; + } + interface LocationInfo { + /** + * The column number where the test is defined, or + * `undefined` if the test was run through the REPL. + */ + column?: number; + /** + * The path of the test file that was + * executed as the entry point of the child process that emitted this event. + * Only present when tests run with process isolation. May differ from + * `file` when the test is defined in a module imported by the entry file. + */ + entryFile?: string; + /** + * The path of the test file, `undefined` if test was run through the REPL. + */ + file?: string; + /** + * The line number where the test is defined, or `undefined` if the test was run through the REPL. + */ + line?: number; + } + interface TestDiagnostic extends LocationInfo { + /** + * The diagnostic message. + */ + message: string; + /** + * The nesting level of the test. + */ + nesting: number; + /** + * The severity level of the diagnostic message. + * Possible values are: + * * `'info'`: Informational messages. + * * `'warn'`: Warnings. + * * `'error'`: Errors. + */ + level: "info" | "warn" | "error"; + } + interface TestCoverage { + /** + * An object containing the coverage report. + */ + summary: { + /** + * An array of coverage reports for individual files. + */ + files: Array<{ + /** + * The absolute path of the file. + */ + path: string; + /** + * The total number of lines. + */ + totalLineCount: number; + /** + * The total number of branches. + */ + totalBranchCount: number; + /** + * The total number of functions. + */ + totalFunctionCount: number; + /** + * The number of covered lines. + */ + coveredLineCount: number; + /** + * The number of covered branches. + */ + coveredBranchCount: number; + /** + * The number of covered functions. + */ + coveredFunctionCount: number; + /** + * The percentage of lines covered. + */ + coveredLinePercent: number; + /** + * The percentage of branches covered. + */ + coveredBranchPercent: number; + /** + * The percentage of functions covered. + */ + coveredFunctionPercent: number; + /** + * An array of functions representing function coverage. + */ + functions: Array<{ + /** + * The name of the function. + */ + name: string; + /** + * The line number where the function is defined. + */ + line: number; + /** + * The number of times the function was called. + */ + count: number; + }>; + /** + * An array of branches representing branch coverage. + */ + branches: Array<{ + /** + * The line number where the branch is defined. + */ + line: number; + /** + * The number of times the branch was taken. + */ + count: number; + }>; + /** + * An array of lines representing line numbers and the number of times they were covered. + */ + lines: Array<{ + /** + * The line number. + */ + line: number; + /** + * The number of times the line was covered. + */ + count: number; + }>; + }>; + /** + * An object containing whether or not the coverage for + * each coverage type. + * @since v22.9.0 + */ + thresholds: { + /** + * The function coverage threshold. + */ + function: number; + /** + * The branch coverage threshold. + */ + branch: number; + /** + * The line coverage threshold. + */ + line: number; + }; + /** + * An object containing a summary of coverage for all files. + */ + totals: { + /** + * The total number of lines. + */ + totalLineCount: number; + /** + * The total number of branches. + */ + totalBranchCount: number; + /** + * The total number of functions. + */ + totalFunctionCount: number; + /** + * The number of covered lines. + */ + coveredLineCount: number; + /** + * The number of covered branches. + */ + coveredBranchCount: number; + /** + * The number of covered functions. + */ + coveredFunctionCount: number; + /** + * The percentage of lines covered. + */ + coveredLinePercent: number; + /** + * The percentage of branches covered. + */ + coveredBranchPercent: number; + /** + * The percentage of functions covered. + */ + coveredFunctionPercent: number; + }; + /** + * The working directory when code coverage began. This + * is useful for displaying relative path names in case + * the tests changed the working directory of the Node.js process. + */ + workingDirectory: string; + }; + /** + * The nesting level of the test. + */ + nesting: number; + } + interface TestComplete extends LocationInfo { + /** + * Additional execution metadata. + */ + details: { + /** + * Whether the test passed or not. + */ + passed: boolean; + /** + * The duration of the test in milliseconds. + */ + duration_ms: number; + /** + * An error wrapping the error thrown by the test if it did not pass. + */ + error?: Error; + /** + * The type of the test, used to denote whether this is a suite. + */ + type?: "suite" | "test"; + }; + /** + * The test name. + */ + name: string; + /** + * The nesting level of the test. + */ + nesting: number; + /** + * The `testId` of the enclosing test, or + * `undefined` for top-level tests. Lets custom reporters track lineage + * when concurrent siblings at the same nesting level interleave. + */ + parentId: number | undefined; + /** + * The flattened lowercased tags declared on the test + * and its ancestor suites, in declaration order. Empty for untagged tests. + * See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags). + */ + tags: string[]; + /** + * A numeric identifier for this test instance, unique + * within the test file's process. Consistent across all events for the same + * test instance, enabling reliable correlation in custom reporters. + */ + testId: number; + /** + * The ordinal number of the test. + */ + testNumber: number; + /** + * Present if `context.todo` is called. + */ + todo?: string | boolean; + /** + * Present if `context.skip` is called. + */ + skip?: string | boolean; + } + interface TestDequeue extends LocationInfo { + /** + * The test name. + */ + name: string; + /** + * The nesting level of the test. + */ + nesting: number; + /** + * The `testId` of the enclosing test, or + * `undefined` for top-level tests. Lets custom reporters track lineage + * when concurrent siblings at the same nesting level interleave. + */ + parentId: number | undefined; + /** + * The flattened lowercased tags declared on the test + * and its ancestor suites, in declaration order. Empty for untagged tests. + * See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags). + */ + tags: string[]; + /** + * A numeric identifier for this test instance, unique + * within the test file's process. Consistent across all events for the same + * test instance, enabling reliable correlation in custom reporters. + */ + testId: number; + /** + * The test type. Either `'suite'` or `'test'`. + * @since v22.15.0 + */ + type: "suite" | "test"; + } + interface TestEnqueue extends LocationInfo { + /** + * The test name. + */ + name: string; + /** + * The nesting level of the test. + */ + nesting: number; + /** + * The `testId` of the enclosing test, or + * `undefined` for top-level tests. Lets custom reporters track lineage + * when concurrent siblings at the same nesting level interleave. + */ + parentId: number | undefined; + /** + * The flattened lowercased tags declared on the test + * and its ancestor suites, in declaration order. Empty for untagged tests. + * See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags). + */ + tags: string[]; + /** + * A numeric identifier for this test instance, unique + * within the test file's process. Consistent across all events for the same + * test instance, enabling reliable correlation in custom reporters. + */ + testId: number; + /** + * The test type. Either `'suite'` or `'test'`. + * @since v22.15.0 + */ + type: "suite" | "test"; + } + interface TestFail extends LocationInfo { + /** + * Additional execution metadata. + */ + details: { + /** + * The duration of the test in milliseconds. + */ + duration_ms: number; + /** + * An error wrapping the error thrown by the test. + */ + error: Error; + /** + * The type of the test, used to denote whether this is a suite. + * @since v20.0.0, v19.9.0, v18.17.0 + */ + type?: "suite" | "test"; + /** + * The attempt number of the test run, + * present only when using the `--test-rerun-failures` flag. + * @since v24.7.0 + */ + attempt?: number; + }; + /** + * The test name. + */ + name: string; + /** + * The nesting level of the test. + */ + nesting: number; + /** + * The `testId` of the enclosing test, or + * `undefined` for top-level tests. Lets custom reporters track lineage + * when concurrent siblings at the same nesting level interleave. + */ + parentId: number | undefined; + /** + * The flattened lowercased tags declared on the test + * and its ancestor suites, in declaration order. Empty for untagged tests. + * See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags). + */ + tags: string[]; + /** + * A numeric identifier for this test instance, unique + * within the test file's process. Consistent across all events for the same + * test instance, enabling reliable correlation in custom reporters. + */ + testId: number; + /** + * The ordinal number of the test. + */ + testNumber: number; + /** + * Present if `context.todo` is called. + */ + todo?: string | boolean; + /** + * Present if `context.skip` is called. + */ + skip?: string | boolean; + } + interface TestInterrupted { + /** + * An array of objects containing information about the + * interrupted tests. + */ + tests: TestStart[]; + } + interface TestLog extends LocationInfo { + /** + * The structured payload passed to `context.log`, or + * `undefined` if none was provided. The test runner does not interpret this + * value. + */ + data: unknown; + /** + * The log message. + */ + message: string; + /** + * The test name. + */ + name: string; + /** + * The nesting level of the test. + */ + nesting: number; + /** + * The `testId` of the enclosing test, or + * `undefined` for top-level tests. + */ + parentId: number | undefined; + /** + * A numeric identifier for the test instance that emitted + * the log message. + */ + testId: number; + } + interface TestPass extends LocationInfo { + /** + * Additional execution metadata. + */ + details: { + /** + * The duration of the test in milliseconds. + */ + duration_ms: number; + /** + * The type of the test, used to denote whether this is a suite. + * @since 20.0.0, 19.9.0, 18.17.0 + */ + type?: "suite" | "test"; + /** + * The attempt number of the test run, + * present only when using the `--test-rerun-failures` flag. + * @since v24.7.0 + */ + attempt?: number; + /** + * The attempt number the test passed on, + * present only when using the `--test-rerun-failures` flag. + * @since v24.7.0 + */ + passed_on_attempt?: number; + }; + /** + * The test name. + */ + name: string; + /** + * The nesting level of the test. + */ + nesting: number; + /** + * The `testId` of the enclosing test, or + * `undefined` for top-level tests. Lets custom reporters track lineage + * when concurrent siblings at the same nesting level interleave. + */ + parentId: number | undefined; + /** + * The flattened lowercased tags declared on the test + * and its ancestor suites, in declaration order. Empty for untagged tests. + * See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags). + */ + tags: string[]; + /** + * A numeric identifier for this test instance, unique + * within the test file's process. Consistent across all events for the same + * test instance, enabling reliable correlation in custom reporters. + */ + testId: number; + /** + * The ordinal number of the test. + */ + testNumber: number; + /** + * Present if `context.todo` is called. + */ + todo?: string | boolean; + /** + * Present if `context.skip` is called. + */ + skip?: string | boolean; + } + interface TestPlan extends LocationInfo { + /** + * The nesting level of the test. + */ + nesting: number; + /** + * The number of subtests that have ran. + */ + count: number; + } + interface TestStart extends LocationInfo { + /** + * The test name. + */ + name: string; + /** + * The nesting level of the test. + */ + nesting: number; + /** + * The `testId` of the enclosing test, or + * `undefined` for top-level tests. Lets custom reporters track lineage + * when concurrent siblings at the same nesting level interleave. + */ + parentId: number | undefined; + /** + * The flattened lowercased tags declared on the test + * and its ancestor suites, in declaration order. Empty for untagged tests. + * See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags). + */ + tags: string[]; + /** + * A numeric identifier for this test instance, unique + * within the test file's process. Consistent across all events for the same + * test instance, enabling reliable correlation in custom reporters. + */ + testId: number; + } + interface TestStderr { + /** + * The path of the test file. + */ + file: string; + /** + * The message written to `stderr`. + */ + message: string; + } + interface TestStdout { + /** + * The path of the test file. + */ + file: string; + /** + * The message written to `stdout`. + */ + message: string; + } + interface TestSummary { + /** + * An object containing the counts of various test results. + */ + counts: { + /** + * The total number of cancelled tests. + */ + cancelled: number; + /** + * The total number of passed tests. + */ + passed: number; + /** + * The total number of skipped tests. + */ + skipped: number; + /** + * The total number of suites run. + */ + suites: number; + /** + * The total number of tests run, excluding suites. + */ + tests: number; + /** + * The total number of TODO tests. + */ + todo: number; + /** + * The total number of top level tests and suites. + */ + topLevel: number; + }; + /** + * The duration of the test run in milliseconds. + */ + duration_ms: number; + /** + * The path of the test file that generated the + * summary. If the summary corresponds to multiple files, this value is + * `undefined`. + */ + file: string | undefined; + /** + * Indicates whether or not the test run is considered + * successful or not. If any error condition occurs, such as a failing test or + * unmet coverage threshold, this value will be set to `false`. + */ + success: boolean; + } + } + /** + * Returns the {@link TestContext} or {@link SuiteContext} object associated with the + * currently executing test or suite, or `undefined` if called outside of a test or + * suite. This function can be used to access context information from within the + * test or suite function or any async operations within them. + + * ```js + * import { getTestContext } from 'node:test'; + * + * test('example test', async () => { + * const ctx = getTestContext(); + * console.log(`Running test: ${ctx.name}`); + * }); + * + * describe('example suite', () => { + * const ctx = getTestContext(); + * console.log(`Running suite: ${ctx.name}`); + * }); + * ``` + * + * When called from a test, returns a `TestContext`. + * When called from a suite, returns a `SuiteContext`. + * + * If called from outside a test or suite (e.g., at the top level of a module or in + * a setTimeout callback after execution has completed), this function returns + * `undefined`. + * + * When called from within a hook (before, beforeEach, after, afterEach), this + * function returns the context of the test or suite that the hook is associated + * with. + * @since v26.1.0 + */ + function getTestContext(): TestContext | SuiteContext | undefined; + /** + * An instance of `TestContext` is passed to each test function in order to + * interact with the test runner. However, the `TestContext` constructor is not + * exposed as part of the API. + * @since v18.0.0, v16.17.0 + */ + interface TestContext { + /** + * An object containing assertion methods bound to the test context. + * The top-level functions from the `node:assert` module are exposed here for the purpose of creating test plans. + * + * **Note:** Some of the functions from `node:assert` contain type assertions. If these are called via the + * TestContext `assert` object, then the context parameter in the test's function signature **must be explicitly typed** + * (ie. the parameter must have a type annotation), otherwise an error will be raised by the TypeScript compiler: + * ```ts + * import { test, type TestContext } from 'node:test'; + * + * // The test function's context parameter must have a type annotation. + * test('example', (t: TestContext) => { + * t.assert.deepStrictEqual(actual, expected); + * }); + * + * // Omitting the type annotation will result in a compilation error. + * test('example', t => { + * t.assert.deepStrictEqual(actual, expected); // Error: 't' needs an explicit type annotation. + * }); + * ``` + * @since v22.2.0, v20.15.0 + */ + readonly assert: TestContextAssert; + /** + * This function is used to create a hook running before subtest of the current test. + * @param fn The hook function. The first argument to this function is a `TestContext` object. + * If the hook uses callbacks, the callback function is passed as the second argument. + * @param options Configuration options for the hook. + * @since v20.1.0, v18.17.0 + */ + before(fn?: TestContextHookFn, options?: HookOptions): void; + /** + * This function is used to create a hook running before each subtest of the current test. + * @param fn The hook function. The first argument to this function is a `TestContext` object. + * If the hook uses callbacks, the callback function is passed as the second argument. + * @param options Configuration options for the hook. + * @since v18.8.0 + */ + beforeEach(fn?: TestContextHookFn, options?: HookOptions): void; + /** + * This function is used to create a hook that runs after the current test finishes. + * @param fn The hook function. The first argument to this function is a `TestContext` object. + * If the hook uses callbacks, the callback function is passed as the second argument. + * @param options Configuration options for the hook. + * @since v18.13.0 + */ + after(fn?: TestContextHookFn, options?: HookOptions): void; + /** + * This function is used to create a hook running after each subtest of the current test. + * @param fn The hook function. The first argument to this function is a `TestContext` object. + * If the hook uses callbacks, the callback function is passed as the second argument. + * @param options Configuration options for the hook. + * @since v18.8.0 + */ + afterEach(fn?: TestContextHookFn, options?: HookOptions): void; + /** + * This function is used to write diagnostics to the output. Any diagnostic + * information is included at the end of the test's results. This function does + * not return a value. + * + * ```js + * test('top level test', (t) => { + * t.diagnostic('A diagnostic message'); + * }); + * ``` + * @since v18.0.0, v16.17.0 + * @param message Message to be reported. + */ + diagnostic(message: string): void; + /** + * This function is used to write a log message to the output. Unlike + * `context.diagnostic`, the resulting `'test:log'` event is emitted + * immediately, in the order that the tests execute, rather than being buffered + * until the test reports its results. This function does not return a value. + * + * ```js + * test('top level test', (t) => { + * t.log('fetched user', { userId: 42 }); + * t.log('retrying flaky endpoint', { attempt: 3 }); + * }); + * ``` + * @since v26.6.0 + * @param message Message to be reported. + * @param data Optional structured payload attached to the message. The test + * runner passes it through untouched. When tests run with process isolation, + * this value must be compatible with the [HTML structured clone algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm). + */ + log(message: string, data?: unknown): void; + /** + * The absolute path of the test file that created the current test. If a test file imports + * additional modules that generate tests, the imported tests will return the path of the root test file. + * @since v22.6.0 + */ + readonly filePath: string | undefined; + /** + * The name of the test and each of its ancestors, separated by `>`. + * @since v22.3.0 + */ + readonly fullName: string; + /** + * The name of the test. + * @since v18.8.0, v16.18.0 + */ + readonly name: string; + /** + * Indicated whether the test succeeded. + * @since v21.7.0, v20.12.0 + */ + readonly passed: boolean; + /** + * The failure reason for the test/case; wrapped and available via `context.error.cause`. + * @since v21.7.0, v20.12.0 + */ + readonly error: EventData.Error | null; + /** + * The attempt number of the test. This value is zero-based, so the first attempt is `0`, + * the second attempt is `1`, and so on. This property is useful in conjunction with the + * `--test-rerun-failures` option to determine which attempt the test is currently running. + * @since v21.7.0, v20.12.0 + */ + readonly attempt: number; + /** + * A frozen array of the test's flattened lowercased tags, in declaration + * order, including any tags inherited from ancestor suites. Empty when the + * test has no tags. See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags). + * @since v26.2.0 + */ + readonly tags: readonly string[]; + /** + * The unique identifier of the worker running the current test file. This value is + * derived from the `NODE_TEST_WORKER_ID` environment variable. When running tests + * with `--test-isolation=process` (the default), each test file runs in a separate + * child process and is assigned a worker ID from 1 to N, where N is the number of + * concurrent workers. When running with `--test-isolation=none`, all tests run in + * the same process and the worker ID is always 1. This value is `undefined` when + * not running in a test context. + * + * This property is useful for splitting resources (like database connections or + * server ports) across concurrent test files: + * + * ```js + * import { test } from 'node:test'; + * import { process } from 'node:process'; + * + * test('database operations', async (t) => { + * // Worker ID is available via context + * console.log(`Running in worker ${t.workerId}`); + * + * // Or via environment variable (available at import time) + * const workerId = process.env.NODE_TEST_WORKER_ID; + * // Use workerId to allocate separate resources per worker + * }); + * ``` + * @since v25.8.0 + */ + readonly workerId: number | undefined; + /** + * This function is used to set the number of assertions and subtests that are expected to run + * within the test. If the number of assertions and subtests that run does not match the + * expected count, the test will fail. + * + * > Note: To make sure assertions are tracked, `t.assert` must be used instead of `assert` directly. + * + * ```js + * test('top level test', (t) => { + * t.plan(2); + * t.assert.ok('some relevant assertion here'); + * t.test('subtest', () => {}); + * }); + * ``` + * + * When working with asynchronous code, the `plan` function can be used to ensure that the + * correct number of assertions are run: + * + * ```js + * test('planning with streams', (t, done) => { + * function* generate() { + * yield 'a'; + * yield 'b'; + * yield 'c'; + * } + * const expected = ['a', 'b', 'c']; + * t.plan(expected.length); + * const stream = Readable.from(generate()); + * stream.on('data', (chunk) => { + * t.assert.strictEqual(chunk, expected.shift()); + * }); + * + * stream.on('end', () => { + * done(); + * }); + * }); + * ``` + * + * When using the `wait` option, you can control how long the test will wait for the expected assertions. + * For example, setting a maximum wait time ensures that the test will wait for asynchronous assertions + * to complete within the specified timeframe: + * + * ```js + * test('plan with wait: 2000 waits for async assertions', (t) => { + * t.plan(1, { wait: 2000 }); // Waits for up to 2 seconds for the assertion to complete. + * + * const asyncActivity = () => { + * setTimeout(() => { + * * t.assert.ok(true, 'Async assertion completed within the wait time'); + * }, 1000); // Completes after 1 second, within the 2-second wait time. + * }; + * + * asyncActivity(); // The test will pass because the assertion is completed in time. + * }); + * ``` + * + * Note: If a `wait` timeout is specified, it begins counting down only after the test function finishes executing. + * @since v22.2.0 + */ + plan(count: number, options?: TestContextPlanOptions): void; + /** + * If `shouldRunOnlyTests` is truthy, the test context will only run tests that + * have the `only` option set. Otherwise, all tests are run. If Node.js was not + * started with the `--test-only` command-line option, this function is a + * no-op. + * + * ```js + * test('top level test', (t) => { + * // The test context can be set to run subtests with the 'only' option. + * t.runOnly(true); + * return Promise.all([ + * t.test('this subtest is now skipped'), + * t.test('this subtest is run', { only: true }), + * ]); + * }); + * ``` + * @since v18.0.0, v16.17.0 + * @param shouldRunOnlyTests Whether or not to run `only` tests. + */ + runOnly(shouldRunOnlyTests: boolean): void; + /** + * ```js + * test('top level test', async (t) => { + * await fetch('some/uri', { signal: t.signal }); + * }); + * ``` + * @since v18.7.0, v16.17.0 + */ + readonly signal: AbortSignal; + /** + * This function causes the test's output to indicate the test as skipped. If `message` is provided, it is included in the output. Calling `skip()` does + * not terminate execution of the test function. This function does not return a + * value. + * + * ```js + * test('top level test', (t) => { + * // Make sure to return here as well if the test contains additional logic. + * t.skip('this is skipped'); + * }); + * ``` + * @since v18.0.0, v16.17.0 + * @param message Optional skip message. + */ + skip(message?: string): void; + /** + * This function adds a `TODO` directive to the test's output. If `message` is + * provided, it is included in the output. Calling `todo()` does not terminate + * execution of the test function. This function does not return a value. + * + * ```js + * test('top level test', (t) => { + * // This test is marked as `TODO` + * t.todo('this is a todo'); + * }); + * ``` + * @since v18.0.0, v16.17.0 + * @param message Optional `TODO` message. + */ + todo(message?: string): void; + /** + * This function is used to create subtests under the current test. This function behaves in + * the same fashion as the top level {@link test} function. + * @since v18.0.0 + * @param name The name of the test, which is displayed when reporting test results. + * Defaults to the `name` property of `fn`, or `''` if `fn` does not have a name. + * @param options Configuration options for the test. + * @param fn The function under test. This first argument to this function is a {@link TestContext} object. + * If the test uses callbacks, the callback function is passed as the second argument. + * @returns A {@link Promise} resolved with `undefined` once the test completes. + */ + test: typeof test; + /** + * This method polls a `condition` function until that function either returns + * successfully or the operation times out. + * @since v22.14.0 + * @param condition An assertion function that is invoked + * periodically until it completes successfully or the defined polling timeout + * elapses. Successful completion is defined as not throwing or rejecting. This + * function does not accept any arguments, and is allowed to return any value. + * @param options An optional configuration object for the polling operation. + * @returns Fulfilled with the value returned by `condition`. + */ + waitFor(condition: () => T, options?: TestContextWaitForOptions): Promise>; + /** + * Each test provides its own MockTracker instance. + */ + readonly mock: MockTracker; + } + interface TestContextAssert extends Pick { + /** + * This function serializes `value` and writes it to the file specified by `path`. + * + * ```js + * test('snapshot test with default serialization', (t) => { + * t.assert.fileSnapshot({ value1: 1, value2: 2 }, './snapshots/snapshot.json'); + * }); + * ``` + * + * This function differs from `context.assert.snapshot()` in the following ways: + * + * * The snapshot file path is explicitly provided by the user. + * * Each snapshot file is limited to a single snapshot value. + * * No additional escaping is performed by the test runner. + * + * These differences allow snapshot files to better support features such as syntax + * highlighting. + * @since v22.14.0 + * @param value A value to serialize to a string. If Node.js was started with + * the [`--test-update-snapshots`](https://nodejs.org/docs/latest-v26.x/api/cli.html#--test-update-snapshots) + * flag, the serialized value is written to + * `path`. Otherwise, the serialized value is compared to the contents of the + * existing snapshot file. + * @param path The file where the serialized `value` is written. + * @param options Optional configuration options. + */ + fileSnapshot(value: any, path: string, options?: AssertSnapshotOptions): void; + /** + * This function implements assertions for snapshot testing. + * ```js + * test('snapshot test with default serialization', (t) => { + * t.assert.snapshot({ value1: 1, value2: 2 }); + * }); + * + * test('snapshot test with custom serialization', (t) => { + * t.assert.snapshot({ value3: 3, value4: 4 }, { + * serializers: [(value) => JSON.stringify(value)] + * }); + * }); + * ``` + * @since v22.3.0 + * @param value A value to serialize to a string. If Node.js was started with + * the [`--test-update-snapshots`](https://nodejs.org/docs/latest-v26.x/api/cli.html#--test-update-snapshots) + * flag, the serialized value is written to + * the snapshot file. Otherwise, the serialized value is compared to the + * corresponding value in the existing snapshot file. + */ + snapshot(value: any, options?: AssertSnapshotOptions): void; + /** + * A custom assertion function registered with `assert.register()`. + */ + [name: string]: (...args: any[]) => void; + } + interface AssertSnapshotOptions { + /** + * An array of synchronous functions used to serialize `value` into a string. + * `value` is passed as the only argument to the first serializer function. + * The return value of each serializer is passed as input to the next serializer. + * Once all serializers have run, the resulting value is coerced to a string. + * + * If no serializers are provided, the test runner's default serializers are used. + */ + serializers?: ReadonlyArray<(value: any) => any> | undefined; + } + interface TestContextPlanOptions { + /** + * The wait time for the plan: + * * If `true`, the plan waits indefinitely for all assertions and subtests to run. + * * If `false`, the plan performs an immediate check after the test function completes, + * without waiting for any pending assertions or subtests. + * Any assertions or subtests that complete after this check will not be counted towards the plan. + * * If a number, it specifies the maximum wait time in milliseconds + * before timing out while waiting for expected assertions and subtests to be matched. + * If the timeout is reached, the test will fail. + * @default false + */ + wait?: boolean | number | undefined; + } + interface TestContextWaitForOptions { + /** + * The number of milliseconds to wait after an unsuccessful + * invocation of `condition` before trying again. + * @default 50 + */ + interval?: number | undefined; + /** + * The poll timeout in milliseconds. If `condition` has not + * succeeded by the time this elapses, an error occurs. + * @default 1000 + */ + timeout?: number | undefined; + } + /** + * An instance of `SuiteContext` is passed to each suite function in order to + * interact with the test runner. However, the `SuiteContext` constructor is not + * exposed as part of the API. + * @since v18.7.0, v16.17.0 + */ + interface SuiteContext { + /** + * The absolute path of the test file that created the current suite. If a test file imports + * additional modules that generate suites, the imported suites will return the path of the root test file. + * @since v22.6.0 + */ + readonly filePath: string | undefined; + /** + * The name of the suite and each of its ancestors, separated by `>`. + * @since v22.3.0, v20.16.0 + */ + readonly fullName: string; + /** + * The name of the suite. + * @since v18.8.0, v16.18.0 + */ + readonly name: string; + /** + * Can be used to abort test subtasks when the test has been aborted. + * @since v18.7.0, v16.17.0 + */ + readonly signal: AbortSignal; + /** + * Indicates whether the suite and all of its subtests have passed. + * @since v26.1.0 + */ + readonly passed: boolean; + /** + * The attempt number of the suite. This value is zero-based, so the first attempt is `0`, + * the second attempt is `1`, and so on. This property is useful in conjunction with the + * `--test-rerun-failures` option to determine the attempt number of the current run. + * @since v26.1.0 + */ + readonly attempt: number; + /** + * Output a diagnostic message. This is typically used for logging information + * about the current suite or its tests. + * + * ```js + * test.describe('my suite', (suite) => { + * suite.diagnostic('Suite diagnostic message'); + * }); + * ``` + * @since v26.1.0 + * @param message A diagnostic message to output. + */ + diagnostic(message: string): void; + /** + * Write a log message to the output. The resulting `'test:log'` event is + * emitted immediately, in the order that the tests execute. + * + * ```js + * test.describe('my suite', (suite) => { + * suite.log('Suite log message'); + * }); + * ``` + * @since v26.6.0 + * @param message Message to be reported. + * @param data Optional structured payload attached to the message. The test + * runner passes it through untouched. + */ + log(message: string, data?: unknown): void; + } + interface TestOptions { + /** + * If a number is provided, then that many tests would run in parallel. + * If truthy, it would run (number of cpu cores - 1) tests in parallel. + * For subtests, it will be `Infinity` tests in parallel. + * If falsy, it would only run one test at a time. + * If unspecified, subtests inherit this value from their parent. + * @default false + */ + concurrency?: number | boolean | undefined; + /** + * If truthy, the test is expected to fail. If a non-empty string is provided, that string is displayed + * in the test results as the reason why the test is expected to fail. If a + * `RegExp`, `Function`, `Object`, or `Error` is provided directly (without wrapping in `{ match: … }`), the test passes + * only if the thrown error matches, following the behavior of + * `assert.throws`. To provide both a reason and validation, pass an object + * with `label` (string) and `match` (RegExp, Function, Object, or Error). + * @since v25.5.0 + * @default false + */ + expectFailure?: boolean | string | AssertPredicate | undefined; + /** + * If truthy, and the test context is configured to run `only` tests, then this test will be + * run. Otherwise, the test is skipped. + * @default false + */ + only?: boolean | undefined; + /** + * Allows aborting an in-progress test. + * @since v18.8.0 + */ + signal?: AbortSignal | undefined; + /** + * If truthy, the test is skipped. If a string is provided, that string is displayed in the + * test results as the reason for skipping the test. + * @default false + */ + skip?: boolean | string | undefined; + /** + * An array of string labels associated with the test. + * Used together with `--experimental-test-tag-filter` to filter which + * tests run. Tags inherit from suites to nested tests by union. See + * [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags). + * @default [] + * @since v26.2.0 + */ + tags?: readonly string[] | undefined; + /** + * A number of milliseconds the test will fail after. If unspecified, subtests inherit this + * value from their parent. + * @default Infinity + * @since v18.7.0 + */ + timeout?: number | undefined; + /** + * If truthy, the test marked as `TODO`. If a string is provided, that string is displayed in + * the test results as the reason why the test is `TODO`. + * @default false + */ + todo?: boolean | string | undefined; + /** + * The number of assertions and subtests expected to be run in the test. + * If the number of assertions run in the test does not match the number + * specified in the plan, the test will fail. + * @default undefined + * @since v22.2.0 + */ + plan?: number | undefined; + } + /** + * This function creates a hook that runs before executing a suite. + * + * ```js + * describe('tests', async () => { + * before(() => console.log('about to run some test')); + * it('is a subtest', () => { + * // Some relevant assertion here + * }); + * }); + * ``` + * @since v18.8.0, v16.18.0 + * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument. + * @param options Configuration options for the hook. + */ + function before(fn?: HookFn, options?: HookOptions): void; + /** + * This function creates a hook that runs after executing a suite. + * + * ```js + * describe('tests', async () => { + * after(() => console.log('finished running tests')); + * it('is a subtest', () => { + * // Some relevant assertion here + * }); + * }); + * ``` + * @since v18.8.0, v16.18.0 + * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument. + * @param options Configuration options for the hook. + */ + function after(fn?: HookFn, options?: HookOptions): void; + /** + * This function creates a hook that runs before each test in the current suite. + * + * ```js + * describe('tests', async () => { + * beforeEach(() => console.log('about to run a test')); + * it('is a subtest', () => { + * // Some relevant assertion here + * }); + * }); + * ``` + * @since v18.8.0, v16.18.0 + * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument. + * @param options Configuration options for the hook. + */ + function beforeEach(fn?: HookFn, options?: HookOptions): void; + /** + * This function creates a hook that runs after each test in the current suite. + * The `afterEach()` hook is run even if the test fails. + * + * ```js + * describe('tests', async () => { + * afterEach(() => console.log('finished running a test')); + * it('is a subtest', () => { + * // Some relevant assertion here + * }); + * }); + * ``` + * @since v18.8.0, v16.18.0 + * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument. + * @param options Configuration options for the hook. + */ + function afterEach(fn?: HookFn, options?: HookOptions): void; + /** + * The hook function. The first argument is the context in which the hook is called. + * If the hook uses callbacks, the callback function is passed as the second argument. + */ + type HookFn = (c: TestContext | SuiteContext, done: (result?: any) => void) => any; + /** + * The hook function. The first argument is a `TestContext` object. + * If the hook uses callbacks, the callback function is passed as the second argument. + */ + type TestContextHookFn = (t: TestContext, done: (result?: any) => void) => any; + /** + * Configuration options for hooks. + * @since v18.8.0 + */ + interface HookOptions { + /** + * Allows aborting an in-progress hook. + */ + signal?: AbortSignal | undefined; + /** + * A number of milliseconds the hook will fail after. If unspecified, subtests inherit this + * value from their parent. + * @default Infinity + */ + timeout?: number | undefined; + } + interface MockFunctionOptions { + /** + * The number of times that the mock will use the behavior of `implementation`. + * Once the mock function has been called `times` times, + * it will automatically restore the behavior of `original`. + * This value must be an integer greater than zero. + * @default Infinity + */ + times?: number | undefined; + } + interface MockMethodOptions extends MockFunctionOptions { + /** + * If `true`, `object[methodName]` is treated as a getter. + * This option cannot be used with the `setter` option. + */ + getter?: boolean | undefined; + /** + * If `true`, `object[methodName]` is treated as a setter. + * This option cannot be used with the `getter` option. + */ + setter?: boolean | undefined; + } + type Mock = F & { + mock: MockFunctionContext; + }; + interface MockModuleOptions { + /** + * If false, each call to `require()` or `import()` generates a new mock module. + * If true, subsequent calls will return the same module mock, and the mock module is inserted into the CommonJS cache. + * @default false + */ + cache?: boolean | undefined; + /** + * Optional mocked exports. The `default` property, if + * provided, is used as the mocked module's default export. All other own + * enumerable properties are used as named exports. + * **This option cannot be used with `defaultExport` or `namedExports`.** + * * If the mock is a CommonJS or builtin module, `exports.default` is used as + * the value of `module.exports`. + * * If `exports.default` is not provided for a CommonJS or builtin mock, + * `module.exports` defaults to an empty object. + * * If named exports are provided with a non-object default export, the mock + * throws an exception when used as a CommonJS or builtin module. + */ + exports?: object | undefined; + /** + * An optional value used as the mocked module's default + * export. If this value is not provided, ESM mocks do not include a default + * export. If the mock is a CommonJS or builtin module, this setting is used as + * the value of `module.exports`. If this value is not provided, CJS and builtin + * mocks use an empty object as the value of `module.exports`. + * **This option cannot be used with `options.exports`.** + * This option is deprecated and will be removed in a later version. + * Prefer `options.exports.default`. + * @deprecated + */ + defaultExport?: any; + /** + * An optional object whose keys and values are used to + * create the named exports of the mock module. If the mock is a CommonJS or + * builtin module, these values are copied onto `module.exports`. Therefore, if a + * mock is created with both named exports and a non-object default export, the + * mock will throw an exception when used as a CJS or builtin module. + * **This option cannot be used with `options.exports`.** + * This option is deprecated and will be removed in a later version. + * Prefer `options.exports`. + * @deprecated + */ + namedExports?: object | undefined; + } + /** + * The `MockTracker` class is used to manage mocking functionality. The test runner + * module provides a top level `mock` export which is a `MockTracker` instance. + * Each test also provides its own `MockTracker` instance via the test context's `mock` property. + * @since v19.1.0, v18.13.0 + */ + interface MockTracker { + /** + * This function is used to create a mock function. + * + * The following example creates a mock function that increments a counter by one + * on each invocation. The `times` option is used to modify the mock behavior such + * that the first two invocations add two to the counter instead of one. + * + * ```js + * test('mocks a counting function', (t) => { + * let cnt = 0; + * + * function addOne() { + * cnt++; + * return cnt; + * } + * + * function addTwo() { + * cnt += 2; + * return cnt; + * } + * + * const fn = t.mock.fn(addOne, addTwo, { times: 2 }); + * + * assert.strictEqual(fn(), 2); + * assert.strictEqual(fn(), 4); + * assert.strictEqual(fn(), 5); + * assert.strictEqual(fn(), 6); + * }); + * ``` + * @since v19.1.0, v18.13.0 + * @param original An optional function to create a mock on. + * @param implementation An optional function used as the mock implementation for `original`. This is useful for creating mocks that exhibit one behavior for a specified number of calls and + * then restore the behavior of `original`. + * @param options Optional configuration options for the mock function. + * @return The mocked function. The mocked function contains a special `mock` property, which is an instance of {@link MockFunctionContext}, and can be used for inspecting and changing the + * behavior of the mocked function. + */ + fn undefined>( + original?: F, + options?: MockFunctionOptions, + ): Mock; + fn undefined, Implementation extends Function = F>( + original?: F, + implementation?: Implementation, + options?: MockFunctionOptions, + ): Mock; + /** + * This function is used to create a mock on an existing object method. The + * following example demonstrates how a mock is created on an existing object + * method. + * + * ```js + * test('spies on an object method', (t) => { + * const number = { + * value: 5, + * subtract(a) { + * return this.value - a; + * }, + * }; + * + * t.mock.method(number, 'subtract'); + * assert.strictEqual(number.subtract.mock.calls.length, 0); + * assert.strictEqual(number.subtract(3), 2); + * assert.strictEqual(number.subtract.mock.calls.length, 1); + * + * const call = number.subtract.mock.calls[0]; + * + * assert.deepStrictEqual(call.arguments, [3]); + * assert.strictEqual(call.result, 2); + * assert.strictEqual(call.error, undefined); + * assert.strictEqual(call.target, undefined); + * assert.strictEqual(call.this, number); + * }); + * ``` + * @since v19.1.0, v18.13.0 + * @param object The object whose method is being mocked. + * @param methodName The identifier of the method on `object` to mock. If `object[methodName]` is not a function, an error is thrown. + * @param implementation An optional function used as the mock implementation for `object[methodName]`. + * @param options Optional configuration options for the mock method. + * @return The mocked method. The mocked method contains a special `mock` property, which is an instance of {@link MockFunctionContext}, and can be used for inspecting and changing the + * behavior of the mocked method. + */ + method< + MockedObject extends object, + MethodName extends FunctionPropertyNames, + >( + object: MockedObject, + methodName: MethodName, + options?: MockFunctionOptions, + ): MockedObject[MethodName] extends Function ? Mock + : never; + method< + MockedObject extends object, + MethodName extends FunctionPropertyNames, + Implementation extends Function, + >( + object: MockedObject, + methodName: MethodName, + implementation: Implementation, + options?: MockFunctionOptions, + ): MockedObject[MethodName] extends Function ? Mock + : never; + method( + object: MockedObject, + methodName: keyof MockedObject, + options: MockMethodOptions, + ): Mock; + method( + object: MockedObject, + methodName: keyof MockedObject, + implementation: Function, + options: MockMethodOptions, + ): Mock; + /** + * This function is syntax sugar for `MockTracker.method` with `options.getter` set to `true`. + * @since v19.3.0, v18.13.0 + */ + getter< + MockedObject extends object, + MethodName extends keyof MockedObject, + >( + object: MockedObject, + methodName: MethodName, + options?: MockFunctionOptions, + ): Mock<() => MockedObject[MethodName]>; + getter< + MockedObject extends object, + MethodName extends keyof MockedObject, + Implementation extends Function, + >( + object: MockedObject, + methodName: MethodName, + implementation?: Implementation, + options?: MockFunctionOptions, + ): Mock<(() => MockedObject[MethodName]) | Implementation>; + /** + * This function is syntax sugar for `MockTracker.method` with `options.setter` set to `true`. + * @since v19.3.0, v18.13.0 + */ + setter< + MockedObject extends object, + MethodName extends keyof MockedObject, + >( + object: MockedObject, + methodName: MethodName, + options?: MockFunctionOptions, + ): Mock<(value: MockedObject[MethodName]) => void>; + setter< + MockedObject extends object, + MethodName extends keyof MockedObject, + Implementation extends Function, + >( + object: MockedObject, + methodName: MethodName, + implementation?: Implementation, + options?: MockFunctionOptions, + ): Mock<((value: MockedObject[MethodName]) => void) | Implementation>; + /** + * This function is used to mock the exports of ECMAScript modules, CommonJS modules, JSON modules, and + * Node.js builtin modules. Any references to the original module prior to mocking are not impacted. In + * order to enable module mocking, Node.js must be started with the + * [`--experimental-test-module-mocks`](https://nodejs.org/docs/latest-v26.x/api/cli.html#--experimental-test-module-mocks) + * command-line flag. + * + * **Note**: [module customization hooks](https://nodejs.org/docs/latest-v26.x/api/module.html#customization-hooks) registered via the **synchronous** API effect resolution of + * the `specifier` provided to `mock.module`. Customization hooks registered via the **asynchronous** + * API are currently ignored (because the test runner's loader is synchronous, and node does not + * support multi-chain / cross-chain loading). + * + * The following example demonstrates how a mock is created for a module. + * + * ```js + * test('mocks a builtin module in both module systems', async (t) => { + * // Create a mock of 'node:readline' with a named export named 'foo', which + * // does not exist in the original 'node:readline' module. + * const mock = t.mock.module('node:readline', { + * exports: { foo: () => 42 }, + * }); + * + * let esmImpl = await import('node:readline'); + * let cjsImpl = require('node:readline'); + * + * // cursorTo() is an export of the original 'node:readline' module. + * assert.strictEqual(esmImpl.cursorTo, undefined); + * assert.strictEqual(cjsImpl.cursorTo, undefined); + * assert.strictEqual(esmImpl.fn(), 42); + * assert.strictEqual(cjsImpl.fn(), 42); + * + * mock.restore(); + * + * // The mock is restored, so the original builtin module is returned. + * esmImpl = await import('node:readline'); + * cjsImpl = require('node:readline'); + * + * assert.strictEqual(typeof esmImpl.cursorTo, 'function'); + * assert.strictEqual(typeof cjsImpl.cursorTo, 'function'); + * assert.strictEqual(esmImpl.fn, undefined); + * assert.strictEqual(cjsImpl.fn, undefined); + * }); + * ``` + * @since v22.3.0 + * @experimental + * @param specifier A string identifying the module to mock. + * @param options Optional configuration options for the mock module. + */ + module(specifier: string | URL, options?: MockModuleOptions): MockModuleContext; + /** + * Creates a mock for a property value on an object. This allows you to track and control access to a specific property, + * including how many times it is read (getter) or written (setter), and to restore the original value after mocking. + * + * ```js + * test('mocks a property value', (t) => { + * const obj = { foo: 42 }; + * const prop = t.mock.property(obj, 'foo', 100); + * + * assert.strictEqual(obj.foo, 100); + * assert.strictEqual(prop.mock.accessCount(), 1); + * assert.strictEqual(prop.mock.accesses[0].type, 'get'); + * assert.strictEqual(prop.mock.accesses[0].value, 100); + * + * obj.foo = 200; + * assert.strictEqual(prop.mock.accessCount(), 2); + * assert.strictEqual(prop.mock.accesses[1].type, 'set'); + * assert.strictEqual(prop.mock.accesses[1].value, 200); + * + * prop.mock.restore(); + * assert.strictEqual(obj.foo, 42); + * }); + * ``` + * @since v24.3.0 + * @param object The object whose value is being mocked. + * @param propertyName The identifier of the property on `object` to mock. + * @param value An optional value used as the mock value + * for `object[propertyName]`. **Default:** The original property value. + * @returns A proxy to the mocked object. The mocked object contains a + * special `mock` property, which is an instance of [`MockPropertyContext`][], and + * can be used for inspecting and changing the behavior of the mocked property. + */ + property< + MockedObject extends object, + PropertyName extends keyof MockedObject, + >( + object: MockedObject, + property: PropertyName, + value?: MockedObject[PropertyName], + ): MockedObject & { mock: MockPropertyContext }; + /** + * This function restores the default behavior of all mocks that were previously + * created by this `MockTracker` and disassociates the mocks from the `MockTracker` instance. Once disassociated, the mocks can still be used, but the `MockTracker` instance can no longer be + * used to reset their behavior or + * otherwise interact with them. + * + * After each test completes, this function is called on the test context's `MockTracker`. If the global `MockTracker` is used extensively, calling this + * function manually is recommended. + * @since v19.1.0, v18.13.0 + */ + reset(): void; + /** + * This function restores the default behavior of all mocks that were previously + * created by this `MockTracker`. Unlike `mock.reset()`, `mock.restoreAll()` does + * not disassociate the mocks from the `MockTracker` instance. + * @since v19.1.0, v18.13.0 + */ + restoreAll(): void; + readonly timers: MockTimers; + } + const mock: MockTracker; + interface MockFunctionCall< + F extends Function, + ReturnType = F extends (...args: any) => infer T ? T + : F extends abstract new(...args: any) => infer T ? T + : unknown, + Args = F extends (...args: infer Y) => any ? Y + : F extends abstract new(...args: infer Y) => any ? Y + : unknown[], + > { + /** + * An array of the arguments passed to the mock function. + */ + arguments: Args; + /** + * If the mocked function threw then this property contains the thrown value. + */ + error: unknown | undefined; + /** + * The value returned by the mocked function. + * + * If the mocked function threw, it will be `undefined`. + */ + result: ReturnType | undefined; + /** + * An `Error` object whose stack can be used to determine the callsite of the mocked function invocation. + */ + stack: Error; + /** + * If the mocked function is a constructor, this field contains the class being constructed. + * Otherwise this will be `undefined`. + */ + target: F extends abstract new(...args: any) => any ? F : undefined; + /** + * The mocked function's `this` value. + */ + this: unknown; + } + /** + * The `MockFunctionContext` class is used to inspect or manipulate the behavior of + * mocks created via the `MockTracker` APIs. + * @since v19.1.0, v18.13.0 + */ + interface MockFunctionContext { + /** + * A getter that returns a copy of the internal array used to track calls to the + * mock. Each entry in the array is an object with the following properties. + * @since v19.1.0, v18.13.0 + */ + readonly calls: MockFunctionCall[]; + /** + * This function returns the number of times that this mock has been invoked. This + * function is more efficient than checking `ctx.calls.length` because `ctx.calls` is a getter that creates a copy of the internal call tracking array. + * @since v19.1.0, v18.13.0 + * @return The number of times that this mock has been invoked. + */ + callCount(): number; + /** + * This function is used to change the behavior of an existing mock. + * + * The following example creates a mock function using `t.mock.fn()`, calls the + * mock function, and then changes the mock implementation to a different function. + * + * ```js + * test('changes a mock behavior', (t) => { + * let cnt = 0; + * + * function addOne() { + * cnt++; + * return cnt; + * } + * + * function addTwo() { + * cnt += 2; + * return cnt; + * } + * + * const fn = t.mock.fn(addOne); + * + * assert.strictEqual(fn(), 1); + * fn.mock.mockImplementation(addTwo); + * assert.strictEqual(fn(), 3); + * assert.strictEqual(fn(), 5); + * }); + * ``` + * @since v19.1.0, v18.13.0 + * @param implementation The function to be used as the mock's new implementation. + */ + mockImplementation(implementation: F): void; + /** + * This function is used to change the behavior of an existing mock for a single + * invocation. Once invocation `onCall` has occurred, the mock will revert to + * whatever behavior it would have used had `mockImplementationOnce()` not been + * called. + * + * The following example creates a mock function using `t.mock.fn()`, calls the + * mock function, changes the mock implementation to a different function for the + * next invocation, and then resumes its previous behavior. + * + * ```js + * test('changes a mock behavior once', (t) => { + * let cnt = 0; + * + * function addOne() { + * cnt++; + * return cnt; + * } + * + * function addTwo() { + * cnt += 2; + * return cnt; + * } + * + * const fn = t.mock.fn(addOne); + * + * assert.strictEqual(fn(), 1); + * fn.mock.mockImplementationOnce(addTwo); + * assert.strictEqual(fn(), 3); + * assert.strictEqual(fn(), 4); + * }); + * ``` + * @since v19.1.0, v18.13.0 + * @param implementation The function to be used as the mock's implementation for the invocation number specified by `onCall`. + * @param onCall The invocation number that will use `implementation`. If the specified invocation has already occurred then an exception is thrown. + */ + mockImplementationOnce(implementation: F, onCall?: number): void; + /** + * Resets the call history of the mock function. + * @since v19.3.0, v18.13.0 + */ + resetCalls(): void; + /** + * Resets the implementation of the mock function to its original behavior. The + * mock can still be used after calling this function. + * @since v19.1.0, v18.13.0 + */ + restore(): void; + } + /** + * @since v22.3.0 + * @experimental + */ + interface MockModuleContext { + /** + * Resets the implementation of the mock module. + * @since v22.3.0 + */ + restore(): void; + } + /** + * @since v24.3.0 + */ + class MockPropertyContext { + /** + * A getter that returns a copy of the internal array used to track accesses (get/set) to + * the mocked property. Each entry in the array is an object with the following properties: + */ + readonly accesses: Array<{ + type: "get" | "set"; + value: PropertyType; + stack: Error; + }>; + /** + * This function returns the number of times that the property was accessed. + * This function is more efficient than checking `ctx.accesses.length` because + * `ctx.accesses` is a getter that creates a copy of the internal access tracking array. + * @returns The number of times that the property was accessed (read or written). + */ + accessCount(): number; + /** + * This function is used to change the value returned by the mocked property getter. + * @param value The new value to be set as the mocked property value. + */ + mockImplementation(value: PropertyType): void; + /** + * This function is used to change the behavior of an existing mock for a single + * invocation. Once invocation `onAccess` has occurred, the mock will revert to + * whatever behavior it would have used had `mockImplementationOnce()` not been + * called. + * + * The following example creates a mock function using `t.mock.property()`, calls the + * mock property, changes the mock implementation to a different value for the + * next invocation, and then resumes its previous behavior. + * + * ```js + * test('changes a mock behavior once', (t) => { + * const obj = { foo: 1 }; + * + * const prop = t.mock.property(obj, 'foo', 5); + * + * assert.strictEqual(obj.foo, 5); + * prop.mock.mockImplementationOnce(25); + * assert.strictEqual(obj.foo, 25); + * assert.strictEqual(obj.foo, 5); + * }); + * ``` + * @param value The value to be used as the mock's + * implementation for the invocation number specified by `onAccess`. + * @param onAccess The invocation number that will use `value`. If + * the specified invocation has already occurred then an exception is thrown. + * **Default:** The number of the next invocation. + */ + mockImplementationOnce(value: PropertyType, onAccess?: number): void; + /** + * Resets the access history of the mocked property. + */ + resetAccesses(): void; + /** + * Resets the implementation of the mock property to its original behavior. The + * mock can still be used after calling this function. + */ + restore(): void; + } + interface MockTimersOptions { + apis: ReadonlyArray<"setInterval" | "setTimeout" | "setImmediate" | "Date">; + now?: number | Date | undefined; + } + /** + * Mocking timers is a technique commonly used in software testing to simulate and + * control the behavior of timers, such as `setInterval` and `setTimeout`, + * without actually waiting for the specified time intervals. + * + * The MockTimers API also allows for mocking of the `Date` constructor and + * `setImmediate`/`clearImmediate` functions. + * + * The `MockTracker` provides a top-level `timers` export + * which is a `MockTimers` instance. + * @since v20.4.0 + */ + interface MockTimers { + /** + * Enables timer mocking for the specified timers. + * + * **Note:** When you enable mocking for a specific timer, its associated + * clear function will also be implicitly mocked. + * + * **Note:** Mocking `Date` will affect the behavior of the mocked timers + * as they use the same internal clock. + * + * Example usage without setting initial time: + * + * ```js + * import { mock } from 'node:test'; + * mock.timers.enable({ apis: ['setInterval', 'Date'], now: 1234 }); + * ``` + * + * The above example enables mocking for the `Date` constructor, `setInterval` timer and + * implicitly mocks the `clearInterval` function. Only the `Date` constructor from `globalThis`, + * `setInterval` and `clearInterval` functions from `node:timers`, `node:timers/promises`, and `globalThis` will be mocked. + * + * Example usage with initial time set + * + * ```js + * import { mock } from 'node:test'; + * mock.timers.enable({ apis: ['Date'], now: 1000 }); + * ``` + * + * Example usage with initial Date object as time set + * + * ```js + * import { mock } from 'node:test'; + * mock.timers.enable({ apis: ['Date'], now: new Date() }); + * ``` + * + * Alternatively, if you call `mock.timers.enable()` without any parameters: + * + * All timers (`'setInterval'`, `'clearInterval'`, `'Date'`, `'setImmediate'`, `'clearImmediate'`, `'setTimeout'`, and `'clearTimeout'`) + * will be mocked. + * + * The `setInterval`, `clearInterval`, `setTimeout`, and `clearTimeout` functions from `node:timers`, `node:timers/promises`, + * and `globalThis` will be mocked. + * The `Date` constructor from `globalThis` will be mocked. + * + * If there is no initial epoch set, the initial date will be based on 0 in the Unix epoch. This is `January 1st, 1970, 00:00:00 UTC`. You can + * set an initial date by passing a now property to the `.enable()` method. This value will be used as the initial date for the mocked Date + * object. It can either be a positive integer, or another Date object. + * @since v20.4.0 + */ + enable(options?: MockTimersOptions): void; + /** + * Sets the current Unix timestamp that will be used as reference for any mocked + * `Date` objects. + * + * ```js + * import assert from 'node:assert'; + * import { test } from 'node:test'; + * + * test('runAll functions following the given order', (context) => { + * const now = Date.now(); + * const setTime = 1000; + * // Date.now is not mocked + * assert.deepStrictEqual(Date.now(), now); + * + * context.mock.timers.enable({ apis: ['Date'] }); + * context.mock.timers.setTime(setTime); + * // Date.now is now 1000 + * assert.strictEqual(Date.now(), setTime); + * }); + * ``` + * @since v21.2.0, v20.11.0 + */ + setTime(milliseconds: number): void; + /** + * This function restores the default behavior of all mocks that were previously + * created by this `MockTimers` instance and disassociates the mocks + * from the `MockTracker` instance. + * + * **Note:** After each test completes, this function is called on + * the test context's `MockTracker`. + * + * ```js + * import { mock } from 'node:test'; + * mock.timers.reset(); + * ``` + * @since v20.4.0 + */ + reset(): void; + /** + * Advances time for all mocked timers. + * + * **Note:** This diverges from how `setTimeout` in Node.js behaves and accepts + * only positive numbers. In Node.js, `setTimeout` with negative numbers is + * only supported for web compatibility reasons. + * + * The following example mocks a `setTimeout` function and + * by using `.tick` advances in + * time triggering all pending timers. + * + * ```js + * import assert from 'node:assert'; + * import { test } from 'node:test'; + * + * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => { + * const fn = context.mock.fn(); + * + * context.mock.timers.enable({ apis: ['setTimeout'] }); + * + * setTimeout(fn, 9999); + * + * assert.strictEqual(fn.mock.callCount(), 0); + * + * // Advance in time + * context.mock.timers.tick(9999); + * + * assert.strictEqual(fn.mock.callCount(), 1); + * }); + * ``` + * + * Alternativelly, the `.tick` function can be called many times + * + * ```js + * import assert from 'node:assert'; + * import { test } from 'node:test'; + * + * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => { + * const fn = context.mock.fn(); + * context.mock.timers.enable({ apis: ['setTimeout'] }); + * const nineSecs = 9000; + * setTimeout(fn, nineSecs); + * + * const twoSeconds = 3000; + * context.mock.timers.tick(twoSeconds); + * context.mock.timers.tick(twoSeconds); + * context.mock.timers.tick(twoSeconds); + * + * assert.strictEqual(fn.mock.callCount(), 1); + * }); + * ``` + * + * Advancing time using `.tick` will also advance the time for any `Date` object + * created after the mock was enabled (if `Date` was also set to be mocked). + * + * ```js + * import assert from 'node:assert'; + * import { test } from 'node:test'; + * + * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => { + * const fn = context.mock.fn(); + * + * context.mock.timers.enable({ apis: ['setTimeout', 'Date'] }); + * setTimeout(fn, 9999); + * + * assert.strictEqual(fn.mock.callCount(), 0); + * assert.strictEqual(Date.now(), 0); + * + * // Advance in time + * context.mock.timers.tick(9999); + * assert.strictEqual(fn.mock.callCount(), 1); + * assert.strictEqual(Date.now(), 9999); + * }); + * ``` + * @since v20.4.0 + */ + tick(milliseconds: number): void; + /** + * Triggers all pending mocked timers immediately. If the `Date` object is also + * mocked, it will also advance the `Date` object to the furthest timer's time. + * + * The example below triggers all pending timers immediately, + * causing them to execute without any delay. + * + * ```js + * import assert from 'node:assert'; + * import { test } from 'node:test'; + * + * test('runAll functions following the given order', (context) => { + * context.mock.timers.enable({ apis: ['setTimeout', 'Date'] }); + * const results = []; + * setTimeout(() => results.push(1), 9999); + * + * // Notice that if both timers have the same timeout, + * // the order of execution is guaranteed + * setTimeout(() => results.push(3), 8888); + * setTimeout(() => results.push(2), 8888); + * + * assert.deepStrictEqual(results, []); + * + * context.mock.timers.runAll(); + * assert.deepStrictEqual(results, [3, 2, 1]); + * // The Date object is also advanced to the furthest timer's time + * assert.strictEqual(Date.now(), 9999); + * }); + * ``` + * + * **Note:** The `runAll()` function is specifically designed for + * triggering timers in the context of timer mocking. + * It does not have any effect on real-time system + * clocks or actual timers outside of the mocking environment. + * @since v20.4.0 + */ + runAll(): void; + /** + * Calls {@link MockTimers.reset()}. + */ + [Symbol.dispose](): void; + } + /** + * An object whose methods are used to configure available assertions on the + * `TestContext` objects in the current process. The methods from `node:assert` + * and snapshot testing functions are available by default. + * + * It is possible to apply the same configuration to all files by placing common + * configuration code in a module + * preloaded with `--require` or `--import`. + * @since v22.14.0 + */ + namespace assert { + /** + * Defines a new assertion function with the provided name and function. If an + * assertion already exists with the same name, it is overwritten. + * @since v22.14.0 + */ + function register(name: string, fn: (this: TestContext, ...args: any[]) => void): void; + } + /** + * @since v22.3.0 + */ + namespace snapshot { + /** + * This function is used to customize the default serialization mechanism used by the test runner. + * + * By default, the test runner performs serialization by calling `JSON.stringify(value, null, 2)` on the provided value. + * `JSON.stringify()` does have limitations regarding circular structures and supported data types. + * If a more robust serialization mechanism is required, this function should be used to specify a list of custom serializers. + * + * Serializers are called in order, with the output of the previous serializer passed as input to the next. + * The final result must be a string value. + * @since v22.3.0 + * @param serializers An array of synchronous functions used as the default serializers for snapshot tests. + */ + function setDefaultSnapshotSerializers(serializers: ReadonlyArray<(value: any) => any>): void; + /** + * This function is used to set a custom resolver for the location of the snapshot file used for snapshot testing. + * By default, the snapshot filename is the same as the entry point filename with `.snapshot` appended. + * @since v22.3.0 + * @param fn A function used to compute the location of the snapshot file. + * The function receives the path of the test file as its only argument. If the + * test is not associated with a file (for example in the REPL), the input is + * undefined. `fn()` must return a string specifying the location of the snapshot file. + */ + function setResolveSnapshotPath(fn: (path: string | undefined) => string): void; + } + } + type FunctionPropertyNames = { + [K in keyof T]: T[K] extends Function ? K : never; + }[keyof T]; + export = test; +} diff --git a/node_modules/@types/node/test/reporters.d.ts b/node_modules/@types/node/test/reporters.d.ts new file mode 100644 index 0000000..36ca28f --- /dev/null +++ b/node_modules/@types/node/test/reporters.d.ts @@ -0,0 +1,60 @@ +declare module "node:test/reporters" { + import { Transform, TransformOptions } from "node:stream"; + import { EventData } from "node:test"; + type TestEvent = + | { type: "test:coverage"; data: EventData.TestCoverage } + | { type: "test:complete"; data: EventData.TestComplete } + | { type: "test:dequeue"; data: EventData.TestDequeue } + | { type: "test:diagnostic"; data: EventData.TestDiagnostic } + | { type: "test:enqueue"; data: EventData.TestEnqueue } + | { type: "test:fail"; data: EventData.TestFail } + | { type: "test:interrupted"; data: EventData.TestInterrupted } + | { type: "test:log"; data: EventData.TestLog } + | { type: "test:pass"; data: EventData.TestPass } + | { type: "test:plan"; data: EventData.TestPlan } + | { type: "test:start"; data: EventData.TestStart } + | { type: "test:stderr"; data: EventData.TestStderr } + | { type: "test:stdout"; data: EventData.TestStdout } + | { type: "test:summary"; data: EventData.TestSummary } + | { type: "test:watch:drained"; data: undefined } + | { type: "test:watch:restarted"; data: undefined }; + interface ReporterConstructorWrapper Transform> { + new(...args: ConstructorParameters): InstanceType; + (...args: ConstructorParameters): InstanceType; + } + /** + * The `dot` reporter outputs the test results in a compact format, + * where each passing test is represented by a `.`, + * and each failing test is represented by a `X`. + * @since v20.0.0 + */ + function dot(source: AsyncIterable): NodeJS.AsyncIterator; + /** + * The `tap` reporter outputs the test results in the [TAP](https://testanything.org/) format. + * @since v20.0.0 + */ + function tap(source: AsyncIterable): NodeJS.AsyncIterator; + class SpecReporter extends Transform { + constructor(); + } + /** + * The `spec` reporter outputs the test results in a human-readable format. + * @since v20.0.0 + */ + const spec: ReporterConstructorWrapper; + /** + * The `junit` reporter outputs test results in a jUnit XML format. + * @since v21.0.0 + */ + function junit(source: AsyncIterable): NodeJS.AsyncIterator; + class LcovReporter extends Transform { + constructor(options?: Omit); + } + /** + * The `lcov` reporter outputs test coverage when used with the + * [`--experimental-test-coverage`](https://nodejs.org/docs/latest-v26.x/api/cli.html#--experimental-test-coverage) flag. + * @since v22.0.0 + */ + const lcov: ReporterConstructorWrapper; + export { dot, junit, lcov, spec, tap, TestEvent }; +} diff --git a/node_modules/@types/node/timers.d.ts b/node_modules/@types/node/timers.d.ts new file mode 100644 index 0000000..5b74b89 --- /dev/null +++ b/node_modules/@types/node/timers.d.ts @@ -0,0 +1,149 @@ +declare module "node:timers" { + import { Abortable } from "node:events"; + import * as promises from "node:timers/promises"; + export interface TimerOptions extends Abortable { + /** + * Set to `false` to indicate that the scheduled `Timeout` + * should not require the Node.js event loop to remain active. + * @default true + */ + ref?: boolean | undefined; + } + global { + namespace NodeJS { + /** + * This object is created internally and is returned from `setImmediate()`. It + * can be passed to `clearImmediate()` in order to cancel the scheduled + * actions. + * + * By default, when an immediate is scheduled, the Node.js event loop will continue + * running as long as the immediate is active. The `Immediate` object returned by + * `setImmediate()` exports both `immediate.ref()` and `immediate.unref()` + * functions that can be used to control this default behavior. + */ + interface Immediate extends RefCounted, Disposable { + /** + * If true, the `Immediate` object will keep the Node.js event loop active. + * @since v11.0.0 + */ + hasRef(): boolean; + /** + * When called, requests that the Node.js event loop _not_ exit so long as the + * `Immediate` is active. Calling `immediate.ref()` multiple times will have no + * effect. + * + * By default, all `Immediate` objects are "ref'ed", making it normally unnecessary + * to call `immediate.ref()` unless `immediate.unref()` had been called previously. + * @since v9.7.0 + * @returns a reference to `immediate` + */ + ref(): this; + /** + * When called, the active `Immediate` object will not require the Node.js event + * loop to remain active. If there is no other activity keeping the event loop + * running, the process may exit before the `Immediate` object's callback is + * invoked. Calling `immediate.unref()` multiple times will have no effect. + * @since v9.7.0 + * @returns a reference to `immediate` + */ + unref(): this; + /** + * Cancels the immediate. This is similar to calling `clearImmediate()`. + * @since v20.5.0, v18.18.0 + */ + [Symbol.dispose](): void; + _onImmediate(...args: any[]): void; + } + // Legacy interface used in Node.js v9 and prior + // TODO: remove in a future major version bump + /** @deprecated Use `NodeJS.Timeout` instead. */ + interface Timer extends RefCounted { + hasRef(): boolean; + refresh(): this; + [Symbol.toPrimitive](): number; + } + /** + * This object is created internally and is returned from `setTimeout()` and + * `setInterval()`. It can be passed to either `clearTimeout()` or + * `clearInterval()` in order to cancel the scheduled actions. + * + * By default, when a timer is scheduled using either `setTimeout()` or + * `setInterval()`, the Node.js event loop will continue running as long as the + * timer is active. Each of the `Timeout` objects returned by these functions + * export both `timeout.ref()` and `timeout.unref()` functions that can be used to + * control this default behavior. + */ + interface Timeout extends RefCounted, Disposable, Timer { + /** + * Cancels the timeout. + * @since v0.9.1 + * @legacy Use `clearTimeout()` instead. + * @returns a reference to `timeout` + */ + close(): this; + /** + * If true, the `Timeout` object will keep the Node.js event loop active. + * @since v11.0.0 + */ + hasRef(): boolean; + /** + * When called, requests that the Node.js event loop _not_ exit so long as the + * `Timeout` is active. Calling `timeout.ref()` multiple times will have no effect. + * + * By default, all `Timeout` objects are "ref'ed", making it normally unnecessary + * to call `timeout.ref()` unless `timeout.unref()` had been called previously. + * @since v0.9.1 + * @returns a reference to `timeout` + */ + ref(): this; + /** + * Sets the timer's start time to the current time, and reschedules the timer to + * call its callback at the previously specified duration adjusted to the current + * time. This is useful for refreshing a timer without allocating a new + * JavaScript object. + * + * Using this on a timer that has already called its callback will reactivate the + * timer. + * @since v10.2.0 + * @returns a reference to `timeout` + */ + refresh(): this; + /** + * When called, the active `Timeout` object will not require the Node.js event loop + * to remain active. If there is no other activity keeping the event loop running, + * the process may exit before the `Timeout` object's callback is invoked. Calling + * `timeout.unref()` multiple times will have no effect. + * @since v0.9.1 + * @returns a reference to `timeout` + */ + unref(): this; + /** + * Coerce a `Timeout` to a primitive. The primitive can be used to + * clear the `Timeout`. The primitive can only be used in the + * same thread where the timeout was created. Therefore, to use it + * across `worker_threads` it must first be passed to the correct + * thread. This allows enhanced compatibility with browser + * `setTimeout()` and `setInterval()` implementations. + * @since v14.9.0, v12.19.0 + */ + [Symbol.toPrimitive](): number; + /** + * Cancels the timeout. + * @since v20.5.0, v18.18.0 + */ + [Symbol.dispose](): void; + _onTimeout(...args: any[]): void; + } + } + } + import clearImmediate = globalThis.clearImmediate; + import clearInterval = globalThis.clearInterval; + import clearTimeout = globalThis.clearTimeout; + import setImmediate = globalThis.setImmediate; + import setInterval = globalThis.setInterval; + import setTimeout = globalThis.setTimeout; + export { clearImmediate, clearInterval, clearTimeout, promises, setImmediate, setInterval, setTimeout }; +} +declare module "timers" { + export * from "node:timers"; +} diff --git a/node_modules/@types/node/timers/promises.d.ts b/node_modules/@types/node/timers/promises.d.ts new file mode 100644 index 0000000..8e178ea --- /dev/null +++ b/node_modules/@types/node/timers/promises.d.ts @@ -0,0 +1,93 @@ +declare module "node:timers/promises" { + import { TimerOptions } from "node:timers"; + /** + * ```js + * import { + * setTimeout, + * } from 'node:timers/promises'; + * + * const res = await setTimeout(100, 'result'); + * + * console.log(res); // Prints 'result' + * ``` + * @since v15.0.0 + * @param delay The number of milliseconds to wait before fulfilling the + * promise. **Default:** `1`. + * @param value A value with which the promise is fulfilled. + */ + function setTimeout(delay?: number, value?: T, options?: TimerOptions): Promise; + /** + * ```js + * import { + * setImmediate, + * } from 'node:timers/promises'; + * + * const res = await setImmediate('result'); + * + * console.log(res); // Prints 'result' + * ``` + * @since v15.0.0 + * @param value A value with which the promise is fulfilled. + */ + function setImmediate(value?: T, options?: TimerOptions): Promise; + /** + * Returns an async iterator that generates values in an interval of `delay` ms. + * If `ref` is `true`, you need to call `next()` of async iterator explicitly + * or implicitly to keep the event loop alive. + * + * ```js + * import { + * setInterval, + * } from 'node:timers/promises'; + * + * const interval = 100; + * for await (const startTime of setInterval(interval, Date.now())) { + * const now = Date.now(); + * console.log(now); + * if ((now - startTime) > 1000) + * break; + * } + * console.log(Date.now()); + * ``` + * @since v15.9.0 + * @param delay The number of milliseconds to wait between iterations. + * **Default:** `1`. + * @param value A value with which the iterator returns. + */ + function setInterval(delay?: number, value?: T, options?: TimerOptions): NodeJS.AsyncIterator; + interface Scheduler { + /** + * An experimental API defined by the [Scheduling APIs](https://github.com/WICG/scheduling-apis) draft specification + * being developed as a standard Web Platform API. + * + * Calling `timersPromises.scheduler.wait(delay, options)` is roughly equivalent + * to calling `timersPromises.setTimeout(delay, undefined, options)` except that + * the `ref` option is not supported. + * + * ```js + * import { scheduler } from 'node:timers/promises'; + * + * await scheduler.wait(1000); // Wait one second before continuing + * ``` + * @since v17.3.0, v16.14.0 + * @experimental + * @param delay The number of milliseconds to wait before resolving the + * promise. + */ + wait(delay: number, options?: { signal?: AbortSignal }): Promise; + /** + * An experimental API defined by the [Scheduling APIs](https://github.com/WICG/scheduling-apis) draft specification + * being developed as a standard Web Platform API. + * + * Calling `timersPromises.scheduler.yield()` is equivalent to calling + * `timersPromises.setImmediate()` with no arguments. + * @since v17.3.0, v16.14.0 + * @experimental + */ + yield(): Promise; + } + const scheduler: Scheduler; +} +declare module "timers/promises" { + export * from "node:timers/promises"; +} diff --git a/node_modules/@types/node/tls.d.ts b/node_modules/@types/node/tls.d.ts new file mode 100644 index 0000000..773a69f --- /dev/null +++ b/node_modules/@types/node/tls.d.ts @@ -0,0 +1,1232 @@ +declare module "node:tls" { + import { NonSharedBuffer } from "node:buffer"; + import { X509Certificate } from "node:crypto"; + import * as net from "node:net"; + import * as stream from "stream"; + const CLIENT_RENEG_LIMIT: number; + const CLIENT_RENEG_WINDOW: number; + interface Certificate extends NodeJS.Dict { + /** + * Country code. + */ + C?: string | string[]; + /** + * Street. + */ + ST?: string | string[]; + /** + * Locality. + */ + L?: string | string[]; + /** + * Organization. + */ + O?: string | string[]; + /** + * Organizational unit. + */ + OU?: string | string[]; + /** + * Common name. + */ + CN?: string | string[]; + } + interface PeerCertificate { + /** + * `true` if a Certificate Authority (CA), `false` otherwise. + * @since v18.13.0 + */ + ca: boolean; + /** + * The DER encoded X.509 certificate data. + */ + raw: NonSharedBuffer; + /** + * The certificate subject. + */ + subject: Certificate; + /** + * The certificate issuer, described in the same terms as the `subject`. + */ + issuer: Certificate; + /** + * The date-time the certificate is valid from. + */ + valid_from: string; + /** + * The date-time the certificate is valid to. + */ + valid_to: string; + /** + * The certificate serial number, as a hex string. + */ + serialNumber: string; + /** + * The SHA-1 digest of the DER encoded certificate. + * It is returned as a `:` separated hexadecimal string. + */ + fingerprint: string; + /** + * The SHA-256 digest of the DER encoded certificate. + * It is returned as a `:` separated hexadecimal string. + */ + fingerprint256: string; + /** + * The SHA-512 digest of the DER encoded certificate. + * It is returned as a `:` separated hexadecimal string. + */ + fingerprint512: string; + /** + * The extended key usage, a set of OIDs. + */ + ext_key_usage?: string[]; + /** + * A string containing concatenated names for the subject, + * an alternative to the `subject` names. + */ + subjectaltname?: string; + /** + * An array describing the AuthorityInfoAccess, used with OCSP. + */ + infoAccess?: NodeJS.Dict; + /** + * For RSA keys: The RSA bit size. + * + * For EC keys: The key size in bits. + */ + bits?: number; + /** + * The RSA exponent, as a string in hexadecimal number notation. + */ + exponent?: string; + /** + * The RSA modulus, as a hexadecimal string. + */ + modulus?: string; + /** + * The public key. + */ + pubkey?: NonSharedBuffer; + /** + * The ASN.1 name of the OID of the elliptic curve. + * Well-known curves are identified by an OID. + * While it is unusual, it is possible that the curve + * is identified by its mathematical properties, + * in which case it will not have an OID. + */ + asn1Curve?: string; + /** + * The NIST name for the elliptic curve, if it has one + * (not all well-known curves have been assigned names by NIST). + */ + nistCurve?: string; + } + interface DetailedPeerCertificate extends PeerCertificate { + /** + * The issuer certificate object. + * For self-signed certificates, this may be a circular reference. + */ + issuerCertificate: DetailedPeerCertificate; + } + interface CipherNameAndProtocol { + /** + * The cipher name. + */ + name: string; + /** + * SSL/TLS protocol version. + */ + version: string; + /** + * IETF name for the cipher suite. + */ + standardName: string; + } + interface EphemeralKeyInfo { + /** + * The supported types are 'DH' and 'ECDH'. + */ + type: string; + /** + * The name property is available only when type is 'ECDH'. + */ + name?: string | undefined; + /** + * The size of parameter of an ephemeral key exchange. + */ + size: number; + } + interface KeyObject { + /** + * Private keys in PEM format. + */ + pem: string | Buffer; + /** + * Optional passphrase. + */ + passphrase?: string | undefined; + } + interface PxfObject { + /** + * PFX or PKCS12 encoded private key and certificate chain. + */ + buf: string | Buffer; + /** + * Optional passphrase. + */ + passphrase?: string | undefined; + } + interface TLSSocketOptions extends SecureContextOptions, CommonConnectionOptions { + /** + * If true the TLS socket will be instantiated in server-mode. + * Defaults to false. + */ + isServer?: boolean | undefined; + /** + * An optional net.Server instance. + */ + server?: net.Server | undefined; + /** + * An optional Buffer instance containing a TLS session. + */ + session?: Buffer | undefined; + } + interface TLSSocketEventMap extends net.SocketEventMap { + "keylog": [line: NonSharedBuffer]; + "OCSPResponse": [response: NonSharedBuffer]; + "secure": []; + "secureConnect": []; + "session": [session: NonSharedBuffer]; + } + /** + * Performs transparent encryption of written data and all required TLS + * negotiation. + * + * Instances of `tls.TLSSocket` implement the duplex `Stream` interface. + * + * Methods that return TLS connection metadata (e.g.{@link TLSSocket.getPeerCertificate}) will only return data while the + * connection is open. + * @since v0.11.4 + */ + class TLSSocket extends net.Socket { + /** + * Construct a new tls.TLSSocket object from an existing TCP socket. + */ + constructor(socket: net.Socket | stream.Duplex, options?: TLSSocketOptions); + /** + * This property is `true` if the peer certificate was signed by one of the CAs + * specified when creating the `tls.TLSSocket` instance, otherwise `false`. + * @since v0.11.4 + */ + authorized: boolean; + /** + * The negotiated ALPN protocol. This is `null` before the handshake completes. + * Once the handshake completes, it settles as either the negotiated protocol + * name, or `false` if the peers did not negotiate an ALPN protocol. + * @since v6.0.0 + */ + alpnProtocol: string | false | null; + /** + * Returns the reason why the peer's certificate was not been verified. This + * property is set only when `tlsSocket.authorized === false`. + * @since v0.11.4 + */ + authorizationError: Error; + /** + * Always returns `true`. This may be used to distinguish TLS sockets from regular`net.Socket` instances. + * @since v0.11.4 + */ + encrypted: true; + /** + * Returns an object representing the local certificate. The returned object has + * some properties corresponding to the fields of the certificate. + * + * See {@link TLSSocket.getPeerCertificate} for an example of the certificate + * structure. + * + * If there is no local certificate, an empty object will be returned. If the + * socket has been destroyed, `null` will be returned. + * @since v11.2.0 + */ + getCertificate(): PeerCertificate | object | null; + /** + * Returns an object containing information on the negotiated cipher suite. + * + * For example, a TLSv1.2 protocol with AES256-SHA cipher: + * + * ```json + * { + * "name": "AES256-SHA", + * "standardName": "TLS_RSA_WITH_AES_256_CBC_SHA", + * "version": "SSLv3" + * } + * ``` + * + * See [SSL\_CIPHER\_get\_name](https://www.openssl.org/docs/man1.1.1/man3/SSL_CIPHER_get_name.html) for more information. + * @since v0.11.4 + */ + getCipher(): CipherNameAndProtocol; + /** + * Returns an object describing ephemeral key agreement in [perfect forward + * secrecy](https://nodejs.org/docs/latest-v26.x/api/tls.html#perfect-forward-secrecy) on a client connection. It returns an empty object when the key + * agreement is not ephemeral. As this is only supported on a client socket; + * `null` is returned if called on a server socket. The supported types are `'DH'`, + * `'ECDH'`, and `'TLSGroup'`. For `'DH'` and `'ECDH'`, the object describes peer + * temporary key parameters. For `'TLSGroup'`, the object identifies the negotiated + * TLS Supported Group used for key agreement when a peer temporary key object is + * not available. + * + * The `name` property is available only when type is `'ECDH'` or `'TLSGroup'`. The + * `size` property is not available when type is `'TLSGroup'`. For `'TLSGroup'`, + * `name` is the negotiated TLS Supported Group name. Standardized TLS group names + * and code points are listed in the [IANA TLS Supported Groups registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-8). + * + * For example: `{ type: 'ECDH', name: 'prime256v1', size: 256 }`. + * @since v5.0.0 + */ + getEphemeralKeyInfo(): EphemeralKeyInfo | object | null; + /** + * As the `Finished` messages are message digests of the complete handshake + * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can + * be used for external authentication procedures when the authentication + * provided by SSL/TLS is not desired or is not enough. + * + * Corresponds to the `SSL_get_finished` routine in OpenSSL and may be used + * to implement the `tls-unique` channel binding from [RFC 5929](https://tools.ietf.org/html/rfc5929). + * @since v9.9.0 + * @return The latest `Finished` message that has been sent to the socket as part of a SSL/TLS handshake, or `undefined` if no `Finished` message has been sent yet. + */ + getFinished(): NonSharedBuffer | undefined; + /** + * Returns an object representing the peer's certificate. If the peer does not + * provide a certificate, an empty object will be returned. If the socket has been + * destroyed, `null` will be returned. + * + * If the full certificate chain was requested, each certificate will include an`issuerCertificate` property containing an object representing its issuer's + * certificate. + * @since v0.11.4 + * @param detailed Include the full certificate chain if `true`, otherwise include just the peer's certificate. + * @return A certificate object. + */ + getPeerCertificate(detailed: true): DetailedPeerCertificate; + getPeerCertificate(detailed?: false): PeerCertificate; + getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificate; + /** + * As the `Finished` messages are message digests of the complete handshake + * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can + * be used for external authentication procedures when the authentication + * provided by SSL/TLS is not desired or is not enough. + * + * Corresponds to the `SSL_get_peer_finished` routine in OpenSSL and may be used + * to implement the `tls-unique` channel binding from [RFC 5929](https://tools.ietf.org/html/rfc5929). + * @since v9.9.0 + * @return The latest `Finished` message that is expected or has actually been received from the socket as part of a SSL/TLS handshake, or `undefined` if there is no `Finished` message so + * far. + */ + getPeerFinished(): NonSharedBuffer | undefined; + /** + * Returns a string containing the negotiated SSL/TLS protocol version of the + * current connection. The value `'unknown'` will be returned for connected + * sockets that have not completed the handshaking process. The value `null` will + * be returned for server sockets or disconnected client sockets. + * + * Protocol versions are: + * + * * `'SSLv3'` + * * `'TLSv1'` + * * `'TLSv1.1'` + * * `'TLSv1.2'` + * * `'TLSv1.3'` + * + * See the OpenSSL [`SSL_get_version`](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html) documentation for more information. + * @since v5.7.0 + */ + getProtocol(): string | null; + /** + * Returns the TLS session data or `undefined` if no session was + * negotiated. On the client, the data can be provided to the `session` option of {@link connect} to resume the connection. On the server, it may be useful + * for debugging. + * + * See `Session Resumption` for more information. + * + * Note: `getSession()` works only for TLSv1.2 and below. For TLSv1.3, applications + * must use the `'session'` event (it also works for TLSv1.2 and below). + * @since v0.11.4 + */ + getSession(): NonSharedBuffer | undefined; + /** + * See [SSL\_get\_shared\_sigalgs](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_shared_sigalgs.html) for more information. + * @since v12.11.0 + * @return List of signature algorithms shared between the server and the client in the order of decreasing preference. + */ + getSharedSigalgs(): string[]; + /** + * For a client, returns the TLS session ticket if one is available, or`undefined`. For a server, always returns `undefined`. + * + * It may be useful for debugging. + * + * See `Session Resumption` for more information. + * @since v0.11.4 + */ + getTLSTicket(): NonSharedBuffer | undefined; + /** + * See `Session Resumption` for more information. + * @since v0.5.6 + * @return `true` if the session was reused, `false` otherwise. + */ + isSessionReused(): boolean; + /** + * The `tlsSocket.renegotiate()` method initiates a TLS renegotiation process. + * Upon completion, the `callback` function will be passed a single argument + * that is either an `Error` (if the request failed) or `null`. + * + * This method can be used to request a peer's certificate after the secure + * connection has been established. + * + * When running as the server, the socket will be destroyed with an error after `handshakeTimeout` timeout. + * + * For TLSv1.3, renegotiation cannot be initiated, it is not supported by the + * protocol. + * @since v0.11.8 + * @param callback If `renegotiate()` returned `true`, callback is attached once to the `'secure'` event. If `renegotiate()` returned `false`, `callback` will be called in the next tick with + * an error, unless the `tlsSocket` has been destroyed, in which case `callback` will not be called at all. + * @return `true` if renegotiation was initiated, `false` otherwise. + */ + renegotiate( + options: { + rejectUnauthorized?: boolean | undefined; + requestCert?: boolean | undefined; + }, + callback: (err: Error | null) => void, + ): undefined | boolean; + /** + * The SNI (Server Name Indication) host name associated with the socket. This is + * `null` before the handshake completes. Once the handshake completes it settles + * as either the host name string, or `false` if SNI was not used. + * @since v0.11.3 + */ + servername: string | false | null; + /** + * The `tlsSocket.setKeyCert()` method sets the private key and certificate to use for the socket. + * This is mainly useful if you wish to select a server certificate from a TLS server's `ALPNCallback`. + * @since v22.5.0, v20.17.0 + * @param context An object containing at least `key` and `cert` properties from the {@link createSecureContext()} `options`, + * or a TLS context object created with {@link createSecureContext()} itself. + */ + setKeyCert(context: SecureContextOptions | SecureContext): void; + /** + * The `tlsSocket.setMaxSendFragment()` method sets the maximum TLS fragment size. + * Returns `true` if setting the limit succeeded; `false` otherwise. + * + * Smaller fragment sizes decrease the buffering latency on the client: larger + * fragments are buffered by the TLS layer until the entire fragment is received + * and its integrity is verified; large fragments can span multiple roundtrips + * and their processing can be delayed due to packet loss or reordering. However, + * smaller fragments add extra TLS framing bytes and CPU overhead, which may + * decrease overall server throughput. + * @since v0.11.11 + * @param [size=16384] The maximum TLS fragment size. The maximum value is `16384`. + */ + setMaxSendFragment(size: number): boolean; + /** + * Disables TLS renegotiation for this `TLSSocket` instance. Once called, attempts + * to renegotiate will trigger an `'error'` event on the `TLSSocket`. + * @since v8.4.0 + */ + disableRenegotiation(): void; + /** + * When enabled, TLS packet trace information is written to `stderr`. This can be + * used to debug TLS connection problems. + * + * The format of the output is identical to the output of`openssl s_client -trace` or `openssl s_server -trace`. While it is produced by + * OpenSSL's `SSL_trace()` function, the format is undocumented, can change + * without notice, and should not be relied on. + * @since v12.2.0 + */ + enableTrace(): void; + /** + * Returns the peer certificate as an `X509Certificate` object. + * + * If there is no peer certificate, or the socket has been destroyed,`undefined` will be returned. + * @since v15.9.0 + */ + getPeerX509Certificate(): X509Certificate | undefined; + /** + * Returns the local certificate as an `X509Certificate` object. + * + * If there is no local certificate, or the socket has been destroyed,`undefined` will be returned. + * @since v15.9.0 + */ + getX509Certificate(): X509Certificate | undefined; + /** + * Keying material is used for validations to prevent different kind of attacks in + * network protocols, for example in the specifications of IEEE 802.1X. + * + * Example + * + * ```js + * const keyingMaterial = tlsSocket.exportKeyingMaterial( + * 128, + * 'client finished'); + * + * /* + * Example return value of keyingMaterial: + * + * + * ``` + * + * See the OpenSSL [`SSL_export_keying_material`](https://www.openssl.org/docs/man1.1.1/man3/SSL_export_keying_material.html) documentation for more + * information. + * @since v13.10.0, v12.17.0 + * @param length number of bytes to retrieve from keying material + * @param label an application specific label, typically this will be a value from the [IANA Exporter Label + * Registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#exporter-labels). + * @param context Optionally provide a context. + * @return requested bytes of the keying material + */ + exportKeyingMaterial(length: number, label: string, context: Buffer): NonSharedBuffer; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: TLSSocketEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: TLSSocketEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: TLSSocketEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: TLSSocketEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off(eventName: E, listener: (...args: TLSSocketEventMap[E]) => void): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on(eventName: E, listener: (...args: TLSSocketEventMap[E]) => void): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once(eventName: E, listener: (...args: TLSSocketEventMap[E]) => void): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: TLSSocketEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: TLSSocketEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: TLSSocketEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: TLSSocketEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + interface CommonConnectionOptions { + /** + * An optional TLS context object from tls.createSecureContext() + */ + secureContext?: SecureContext | undefined; + /** + * When enabled, TLS packet trace information is written to `stderr`. This can be + * used to debug TLS connection problems. + * @default false + */ + enableTrace?: boolean | undefined; + /** + * If true the server will request a certificate from clients that + * connect and attempt to verify that certificate. Defaults to + * false. + */ + requestCert?: boolean | undefined; + /** + * An array of strings, or a single `Buffer`, `TypedArray`, or `DataView` containing the supported + * ALPN protocols. Buffers should have the format `[len][name][len][name]...` + * e.g. `'\x08http/1.1\x08http/1.0'`, where the `len` byte is the length of the + * next protocol name. Passing an array is usually much simpler, e.g. + * `['http/1.1', 'http/1.0']`. Protocols earlier in the list have higher + * preference than those later. + */ + ALPNProtocols?: readonly string[] | NodeJS.ArrayBufferView | undefined; + /** + * SNICallback(servername, cb) A function that will be + * called if the client supports SNI TLS extension. Two arguments + * will be passed when called: servername and cb. SNICallback should + * invoke cb(null, ctx), where ctx is a SecureContext instance. + * (tls.createSecureContext(...) can be used to get a proper + * SecureContext.) If SNICallback wasn't provided the default callback + * with high-level API will be used (see below). + */ + SNICallback?: ((servername: string, cb: (err: Error | null, ctx?: SecureContext) => void) => void) | undefined; + /** + * If true the server will reject any connection which is not + * authorized with the list of supplied CAs. This option only has an + * effect if requestCert is true. + * @default true + */ + rejectUnauthorized?: boolean | undefined; + /** + * If true, specifies that the OCSP status request extension will be + * added to the client hello and an 'OCSPResponse' event will be + * emitted on the socket before establishing a secure communication. + */ + requestOCSP?: boolean | undefined; + } + interface TlsOptions extends SecureContextOptions, CommonConnectionOptions, net.ServerOpts { + /** + * Abort the connection if the SSL/TLS handshake does not finish in the + * specified number of milliseconds. A 'tlsClientError' is emitted on + * the tls.Server object whenever a handshake times out. Default: + * 120000 (120 seconds). + */ + handshakeTimeout?: number | undefined; + /** + * The number of seconds after which a TLS session created by the + * server will no longer be resumable. See Session Resumption for more + * information. Default: 300. + */ + sessionTimeout?: number | undefined; + /** + * 48-bytes of cryptographically strong pseudo-random data. + */ + ticketKeys?: Buffer | undefined; + /** + * @param socket + * @param identity identity parameter sent from the client. + * @return pre-shared key that must either be + * a buffer or `null` to stop the negotiation process. Returned PSK must be + * compatible with the selected cipher's digest. + * + * When negotiating TLS-PSK (pre-shared keys), this function is called + * with the identity provided by the client. + * If the return value is `null` the negotiation process will stop and an + * "unknown_psk_identity" alert message will be sent to the other party. + * If the server wishes to hide the fact that the PSK identity was not known, + * the callback must provide some random data as `psk` to make the connection + * fail with "decrypt_error" before negotiation is finished. + * PSK ciphers are disabled by default, and using TLS-PSK thus + * requires explicitly specifying a cipher suite with the `ciphers` option. + * More information can be found in the RFC 4279. + */ + pskCallback?: ((socket: TLSSocket, identity: string) => NodeJS.ArrayBufferView | null) | undefined; + /** + * hint to send to a client to help + * with selecting the identity during TLS-PSK negotiation. Will be ignored + * in TLS 1.3. Upon failing to set pskIdentityHint `tlsClientError` will be + * emitted with `ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED` code. + */ + pskIdentityHint?: string | undefined; + } + interface PSKCallbackNegotation { + psk: NodeJS.ArrayBufferView; + identity: string; + } + interface ConnectionOptions extends SecureContextOptions, CommonConnectionOptions { + host?: string | undefined; + port?: number | undefined; + path?: string | undefined; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored. + socket?: stream.Duplex | undefined; // Establish secure connection on a given socket rather than creating a new socket + checkServerIdentity?: typeof checkServerIdentity | undefined; + servername?: string | undefined; // SNI TLS Extension + session?: Buffer | undefined; + minDHSize?: number | undefined; + lookup?: net.LookupFunction | undefined; + timeout?: number | undefined; + /** + * When negotiating TLS-PSK (pre-shared keys), this function is called + * with optional identity `hint` provided by the server or `null` + * in case of TLS 1.3 where `hint` was removed. + * It will be necessary to provide a custom `tls.checkServerIdentity()` + * for the connection as the default one will try to check hostname/IP + * of the server against the certificate but that's not applicable for PSK + * because there won't be a certificate present. + * More information can be found in the RFC 4279. + * + * @param hint message sent from the server to help client + * decide which identity to use during negotiation. + * Always `null` if TLS 1.3 is used. + * @returns Return `null` to stop the negotiation process. `psk` must be + * compatible with the selected cipher's digest. + * `identity` must use UTF-8 encoding. + */ + pskCallback?: ((hint: string | null) => PSKCallbackNegotation | null) | undefined; + } + interface ServerEventMap extends net.ServerEventMap { + "connection": [socket: net.Socket]; + "keylog": [line: NonSharedBuffer, tlsSocket: TLSSocket]; + "newSession": [sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void]; + "OCSPRequest": [ + certificate: NonSharedBuffer, + issuer: NonSharedBuffer, + callback: (err: Error | null, resp: Buffer | null) => void, + ]; + "resumeSession": [sessionId: Buffer, callback: (err: Error | null, sessionData?: Buffer) => void]; + "secureConnection": [tlsSocket: TLSSocket]; + "tlsClientError": [exception: Error, tlsSocket: TLSSocket]; + } + /** + * Accepts encrypted connections using TLS or SSL. + * @since v0.3.2 + */ + class Server extends net.Server { + constructor(secureConnectionListener?: (socket: TLSSocket) => void); + constructor(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void); + /** + * The `server.addContext()` method adds a secure context that will be used if + * the client request's SNI name matches the supplied `hostname` (or wildcard). + * + * When there are multiple matching contexts, the most recently added one is + * used. + * @since v0.5.3 + * @param hostname A SNI host name or wildcard (e.g. `'*'`) + * @param context An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc), or a TLS context object created + * with {@link createSecureContext} itself. + */ + addContext(hostname: string, context: SecureContextOptions | SecureContext): void; + /** + * Returns the session ticket keys. + * + * See `Session Resumption` for more information. + * @since v3.0.0 + * @return A 48-byte buffer containing the session ticket keys. + */ + getTicketKeys(): NonSharedBuffer; + /** + * The `server.setSecureContext()` method replaces the secure context of an + * existing server. Existing connections to the server are not interrupted. + * @since v11.0.0 + * @param options An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc). + */ + setSecureContext(options: SecureContextOptions): void; + /** + * Sets the session ticket keys. + * + * Changes to the ticket keys are effective only for future server connections. + * Existing or currently pending server connections will use the previous keys. + * + * See `Session Resumption` for more information. + * @since v3.0.0 + * @param keys A 48-byte buffer containing the session ticket keys. + */ + setTicketKeys(keys: Buffer): void; + // #region InternalEventEmitter + addListener(eventName: E, listener: (...args: ServerEventMap[E]) => void): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: ServerEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: ServerEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: ServerEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off(eventName: E, listener: (...args: ServerEventMap[E]) => void): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on(eventName: E, listener: (...args: ServerEventMap[E]) => void): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once(eventName: E, listener: (...args: ServerEventMap[E]) => void): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: ServerEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: ServerEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } + type SecureVersion = "TLSv1.3" | "TLSv1.2" | "TLSv1.1" | "TLSv1"; + type CertificateCompressionAlgorithm = "zlib" | "brotli" | "zstd"; + interface SecureContextOptions { + /** + * If set, this will be called when a client opens a connection using the ALPN extension. + * One argument will be passed to the callback: an object containing `servername` and `protocols` fields, + * respectively containing the server name from the SNI extension (if any) and an array of + * ALPN protocol name strings. The callback must return either one of the strings listed in `protocols`, + * which will be returned to the client as the selected ALPN protocol, or `undefined`, + * to reject the connection with a fatal alert. If a string is returned that does not match one of + * the client's ALPN protocols, an error will be thrown. + * This option cannot be used with the `ALPNProtocols` option, and setting both options will throw an error. + */ + ALPNCallback?: ((arg: { servername: string; protocols: string[] }) => string | undefined) | undefined; + /** + * Treat intermediate (non-self-signed) + * certificates in the trust CA certificate list as trusted. + * @since v22.9.0, v20.18.0 + */ + allowPartialTrustChain?: boolean | undefined; + /** + * Optionally override the trusted CA certificates. Default is to trust + * the well-known CAs curated by Mozilla. Mozilla's CAs are completely + * replaced when CAs are explicitly specified using this option. + */ + ca?: string | Buffer | Array | undefined; + /** + * Cert chains in PEM format. One cert chain should be provided per + * private key. Each cert chain should consist of the PEM formatted + * certificate for a provided private key, followed by the PEM + * formatted intermediate certificates (if any), in order, and not + * including the root CA (the root CA must be pre-known to the peer, + * see ca). When providing multiple cert chains, they do not have to + * be in the same order as their private keys in key. If the + * intermediate certificates are not provided, the peer will not be + * able to validate the certificate, and the handshake will fail. + */ + cert?: string | Buffer | Array | undefined; + /** + * An array of supported certificate + * compression algorithm names, in preference order. Supported values are + * `'zlib'`, `'brotli'`, and `'zstd'`. When set, enables TLS certificate + * compression ([RFC 8879](https://tools.ietf.org/html/rfc8879)) which compresses certificates during the TLS + * handshake, reducing handshake size. Only effective with TLSv1.3. + * **Default:** `[]` (disabled). + */ + certificateCompression?: readonly CertificateCompressionAlgorithm[] | undefined; + /** + * Colon-separated list of supported signature algorithms. The list + * can contain digest algorithms (SHA256, MD5 etc.), public key + * algorithms (RSA-PSS, ECDSA etc.), combination of both (e.g + * 'RSA+SHA384') or TLS v1.3 scheme names (e.g. rsa_pss_pss_sha512). + */ + sigalgs?: string | undefined; + /** + * Cipher suite specification, replacing the default. For more + * information, see modifying the default cipher suite. Permitted + * ciphers can be obtained via tls.getCiphers(). Cipher names must be + * uppercased in order for OpenSSL to accept them. + */ + ciphers?: string | undefined; + /** + * Name of an OpenSSL engine which can provide the client certificate. + * @deprecated + */ + clientCertEngine?: string | undefined; + /** + * PEM formatted CRLs (Certificate Revocation Lists). + */ + crl?: string | Buffer | Array | undefined; + /** + * `'auto'` or custom Diffie-Hellman parameters, required for non-ECDHE perfect forward secrecy. + * If omitted or invalid, the parameters are silently discarded and DHE ciphers will not be available. + * ECDHE-based perfect forward secrecy will still be available. + */ + dhparam?: string | Buffer | undefined; + /** + * A string describing a named curve, TLS group, or + * colon-separated list of named curves or TLS groups to use for key agreement, + * for example `P-521:P-384:P-256`, `X25519`, or `X25519MLKEM768`. The + * historical name of this option refers to ECDH key agreement in TLSv1.2 and + * below. In TLSv1.3, this option configures the TLS Supported Groups and + * key share groups offered or accepted by the TLS stack. Set to `auto` to + * select the group automatically. Use `crypto.getCurves()` to obtain a + * list of available elliptic curve names. For TLS group names, use + * `openssl list -tls-groups` or consult the [IANA TLS Supported Groups + * registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-8). + */ + ecdhCurve?: string | undefined; + /** + * Attempt to use the server's cipher suite preferences instead of the + * client's. When true, causes SSL_OP_CIPHER_SERVER_PREFERENCE to be + * set in secureOptions + */ + honorCipherOrder?: boolean | undefined; + /** + * Private keys in PEM format. PEM allows the option of private keys + * being encrypted. Encrypted keys will be decrypted with + * options.passphrase. Multiple keys using different algorithms can be + * provided either as an array of unencrypted key strings or buffers, + * or an array of objects in the form {pem: [, + * passphrase: ]}. The object form can only occur in an array. + * object.passphrase is optional. Encrypted keys will be decrypted with + * object.passphrase if provided, or options.passphrase if it is not. + */ + key?: string | Buffer | Array | undefined; + /** + * Name of an OpenSSL engine to get private key from. Should be used + * together with privateKeyIdentifier. + * @deprecated + */ + privateKeyEngine?: string | undefined; + /** + * Identifier of a private key managed by an OpenSSL engine. Should be + * used together with privateKeyEngine. Should not be set together with + * key, because both options define a private key in different ways. + * @deprecated + */ + privateKeyIdentifier?: string | undefined; + /** + * Optionally set the maximum TLS version to allow. One + * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the + * `secureProtocol` option, use one or the other. + * **Default:** `'TLSv1.3'`, unless changed using CLI options. Using + * `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using `--tls-max-v1.3` sets the default to + * `'TLSv1.3'`. If multiple of the options are provided, the highest maximum is used. + */ + maxVersion?: SecureVersion | undefined; + /** + * Optionally set the minimum TLS version to allow. One + * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the + * `secureProtocol` option, use one or the other. It is not recommended to use + * less than TLSv1.2, but it may be required for interoperability. + * **Default:** `'TLSv1.2'`, unless changed using CLI options. Using + * `--tls-v1.0` sets the default to `'TLSv1'`. Using `--tls-v1.1` sets the default to + * `'TLSv1.1'`. Using `--tls-min-v1.3` sets the default to + * 'TLSv1.3'. If multiple of the options are provided, the lowest minimum is used. + */ + minVersion?: SecureVersion | undefined; + /** + * Shared passphrase used for a single private key and/or a PFX. + */ + passphrase?: string | undefined; + /** + * PFX or PKCS12 encoded private key and certificate chain. pfx is an + * alternative to providing key and cert individually. PFX is usually + * encrypted, if it is, passphrase will be used to decrypt it. Multiple + * PFX can be provided either as an array of unencrypted PFX buffers, + * or an array of objects in the form {buf: [, + * passphrase: ]}. The object form can only occur in an array. + * object.passphrase is optional. Encrypted PFX will be decrypted with + * object.passphrase if provided, or options.passphrase if it is not. + */ + pfx?: string | Buffer | Array | undefined; + /** + * Optionally affect the OpenSSL protocol behavior, which is not + * usually necessary. This should be used carefully if at all! Value is + * a numeric bitmask of the SSL_OP_* options from OpenSSL Options + */ + secureOptions?: number | undefined; // Value is a numeric bitmask of the `SSL_OP_*` options + /** + * Legacy mechanism to select the TLS protocol version to use, it does + * not support independent control of the minimum and maximum version, + * and does not support limiting the protocol to TLSv1.3. Use + * minVersion and maxVersion instead. The possible values are listed as + * SSL_METHODS, use the function names as strings. For example, use + * 'TLSv1_1_method' to force TLS version 1.1, or 'TLS_method' to allow + * any TLS protocol version up to TLSv1.3. It is not recommended to use + * TLS versions less than 1.2, but it may be required for + * interoperability. Default: none, see minVersion. + */ + secureProtocol?: string | undefined; + /** + * Opaque identifier used by servers to ensure session state is not + * shared between applications. Unused by clients. + */ + sessionIdContext?: string | undefined; + /** + * 48-bytes of cryptographically strong pseudo-random data. + * See Session Resumption for more information. + */ + ticketKeys?: Buffer | undefined; + /** + * The number of seconds after which a TLS session created by the + * server will no longer be resumable. See Session Resumption for more + * information. Default: 300. + */ + sessionTimeout?: number | undefined; + } + interface SecureContext { + context: any; + } + /** + * Verifies the certificate `cert` is issued to `hostname`. + * + * Returns [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object, populating it with `reason`, `host`, and `cert` on + * failure. On success, returns [undefined](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type). + * + * This function is intended to be used in combination with the`checkServerIdentity` option that can be passed to {@link connect} and as + * such operates on a `certificate object`. For other purposes, consider using `x509.checkHost()` instead. + * + * This function can be overwritten by providing an alternative function as the `options.checkServerIdentity` option that is passed to `tls.connect()`. The + * overwriting function can call `tls.checkServerIdentity()` of course, to augment + * the checks done with additional verification. + * + * This function is only called if the certificate passed all other checks, such as + * being issued by trusted CA (`options.ca`). + * + * Earlier versions of Node.js incorrectly accepted certificates for a given`hostname` if a matching `uniformResourceIdentifier` subject alternative name + * was present (see [CVE-2021-44531](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44531)). Applications that wish to accept`uniformResourceIdentifier` subject alternative names can use + * a custom `options.checkServerIdentity` function that implements the desired behavior. + * @since v0.8.4 + * @param hostname The host name or IP address to verify the certificate against. + * @param cert A `certificate object` representing the peer's certificate. + */ + function checkServerIdentity(hostname: string, cert: PeerCertificate): Error | undefined; + /** + * Creates a new {@link Server}. The `secureConnectionListener`, if provided, is + * automatically set as a listener for the `'secureConnection'` event. + * + * The `ticketKeys` options is automatically shared between `node:cluster` module + * workers. + * + * The following illustrates a simple echo server: + * + * ```js + * import tls from 'node:tls'; + * import fs from 'node:fs'; + * + * const options = { + * key: fs.readFileSync('server-key.pem'), + * cert: fs.readFileSync('server-cert.pem'), + * + * // This is necessary only if using client certificate authentication. + * requestCert: true, + * + * // This is necessary only if the client uses a self-signed certificate. + * ca: [ fs.readFileSync('client-cert.pem') ], + * }; + * + * const server = tls.createServer(options, (socket) => { + * console.log('server connected', + * socket.authorized ? 'authorized' : 'unauthorized'); + * socket.write('welcome!\n'); + * socket.setEncoding('utf8'); + * socket.pipe(socket); + * }); + * server.listen(8000, () => { + * console.log('server bound'); + * }); + * ``` + * + * The server can be tested by connecting to it using the example client from {@link connect}. + * @since v0.3.2 + */ + function createServer(secureConnectionListener?: (socket: TLSSocket) => void): Server; + function createServer(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void): Server; + /** + * The `callback` function, if specified, will be added as a listener for the `'secureConnect'` event. + * + * `tls.connect()` returns a {@link TLSSocket} object. + * + * Unlike the `https` API, `tls.connect()` does not enable the + * SNI (Server Name Indication) extension by default, which may cause some + * servers to return an incorrect certificate or reject the connection + * altogether. To enable SNI, set the `servername` option in addition + * to `host`. + * + * The following illustrates a client for the echo server example from {@link createServer}: + * + * ```js + * // Assumes an echo server that is listening on port 8000. + * import tls from 'node:tls'; + * import fs from 'node:fs'; + * + * const options = { + * // Necessary only if the server requires client certificate authentication. + * key: fs.readFileSync('client-key.pem'), + * cert: fs.readFileSync('client-cert.pem'), + * + * // Necessary only if the server uses a self-signed certificate. + * ca: [ fs.readFileSync('server-cert.pem') ], + * + * // Necessary only if the server's cert isn't for "localhost". + * checkServerIdentity: () => { return null; }, + * }; + * + * const socket = tls.connect(8000, options, () => { + * console.log('client connected', + * socket.authorized ? 'authorized' : 'unauthorized'); + * process.stdin.pipe(socket); + * process.stdin.resume(); + * }); + * socket.setEncoding('utf8'); + * socket.on('data', (data) => { + * console.log(data); + * }); + * socket.on('end', () => { + * console.log('server ends connection'); + * }); + * ``` + * @since v0.11.3 + */ + function connect(options: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; + function connect( + port: number, + host?: string, + options?: ConnectionOptions, + secureConnectListener?: () => void, + ): TLSSocket; + function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; + /** + * `{@link createServer}` sets the default value of the `honorCipherOrder` option + * to `true`, other APIs that create secure contexts leave it unset. + * + * `{@link createServer}` uses a 128 bit truncated SHA1 hash value generated + * from `process.argv` as the default value of the `sessionIdContext` option, other + * APIs that create secure contexts have no default value. + * + * The `tls.createSecureContext()` method creates a `SecureContext` object. It is + * usable as an argument to several `tls` APIs, such as `server.addContext()`, + * but has no public methods. The {@link Server} constructor and the {@link createServer} method do not support the `secureContext` option. + * + * A key is _required_ for ciphers that use certificates. Either `key` or `pfx` can be used to provide it. + * + * If the `ca` option is not given, then Node.js will default to using [Mozilla's publicly trusted list of + * CAs](https://hg.mozilla.org/mozilla-central/raw-file/tip/security/nss/lib/ckfw/builtins/certdata.txt). + * + * Custom DHE parameters are discouraged in favor of the new `dhparam: 'auto' `option. When set to `'auto'`, well-known DHE parameters of sufficient strength + * will be selected automatically. Otherwise, if necessary, `openssl dhparam` can + * be used to create custom parameters. The key length must be greater than or + * equal to 1024 bits or else an error will be thrown. Although 1024 bits is + * permissible, use 2048 bits or larger for stronger security. + * @since v0.11.13 + */ + function createSecureContext(options?: SecureContextOptions): SecureContext; + /** + * Returns an array containing the CA certificates from various sources, depending on `type`: + * + * * `"default"`: return the CA certificates that will be used by the Node.js TLS clients by default. + * * When `--use-bundled-ca` is enabled (default), or `--use-openssl-ca` is not enabled, + * this would include CA certificates from the bundled Mozilla CA store. + * * When `--use-system-ca` is enabled, this would also include certificates from the system's + * trusted store. + * * When `NODE_EXTRA_CA_CERTS` is used, this would also include certificates loaded from the specified + * file. + * * `"system"`: return the CA certificates that are loaded from the system's trusted store, according + * to rules set by `--use-system-ca`. This can be used to get the certificates from the system + * when `--use-system-ca` is not enabled. + * * `"bundled"`: return the CA certificates from the bundled Mozilla CA store. This would be the same + * as `tls.rootCertificates`. + * * `"extra"`: return the CA certificates loaded from `NODE_EXTRA_CA_CERTS`. It's an empty array if + * `NODE_EXTRA_CA_CERTS` is not set. + * @since v22.15.0 + * @param type The type of CA certificates that will be returned. Valid values + * are `"default"`, `"system"`, `"bundled"` and `"extra"`. + * **Default:** `"default"`. + * @returns An array of PEM-encoded certificates. The array may contain duplicates + * if the same certificate is repeatedly stored in multiple sources. + */ + function getCACertificates(type?: "default" | "system" | "bundled" | "extra"): string[]; + /** + * Returns an array with the names of the supported TLS ciphers. The names are + * lower-case for historical reasons, but must be uppercased to be used in + * the `ciphers` option of `{@link createSecureContext}`. + * + * Not all supported ciphers are enabled by default. See + * [Modifying the default TLS cipher suite](https://nodejs.org/docs/latest-v26.x/api/tls.html#modifying-the-default-tls-cipher-suite). + * + * Cipher names that start with `'tls_'` are for TLSv1.3, all the others are for + * TLSv1.2 and below. + * + * ```js + * console.log(tls.getCiphers()); // ['aes128-gcm-sha256', 'aes128-sha', ...] + * ``` + * @since v0.10.2 + */ + function getCiphers(): string[]; + /** + * Returns an array with the names of the RFC 8879 certificate compression + * algorithms supported by the current OpenSSL build, suitable for use in the + * `certificateCompression` option of `tls.createSecureContext()`. Possible + * values include `'zlib'`, `'brotli'`, and `'zstd'`. + * + * The array is empty when certificate compression is unavailable. + * + * ```js + * console.log(tls.getCertificateCompressionAlgorithms()); // ['zlib', 'brotli', 'zstd'] + * ``` + * @since v26.4.0 + */ + function getCertificateCompressionAlgorithms(): CertificateCompressionAlgorithm[]; + /** + * Sets the default CA certificates used by Node.js TLS clients. If the provided + * certificates are parsed successfully, they will become the default CA + * certificate list returned by {@link getCACertificates} and used + * by subsequent TLS connections that don't specify their own CA certificates. + * The certificates will be deduplicated before being set as the default. + * + * This function only affects the current Node.js thread. Previous + * sessions cached by the HTTPS agent won't be affected by this change, so + * this method should be called before any unwanted cachable TLS connections are + * made. + * + * To use system CA certificates as the default: + * + * ```js + * import tls from 'node:tls'; + * tls.setDefaultCACertificates(tls.getCACertificates('system')); + * ``` + * + * This function completely replaces the default CA certificate list. To add additional + * certificates to the existing defaults, get the current certificates and append to them: + * + * ```js + * import tls from 'node:tls'; + * const currentCerts = tls.getCACertificates('default'); + * const additionalCerts = ['-----BEGIN CERTIFICATE-----\n...']; + * tls.setDefaultCACertificates([...currentCerts, ...additionalCerts]); + * ``` + * @since v24.5.0 + * @param certs An array of CA certificates in PEM format. + */ + function setDefaultCACertificates(certs: ReadonlyArray): void; + /** + * The default named curve or TLS group list to use for key agreement in a TLS + * server. The default value is `'auto'`. See `tls.createSecureContext()` for + * further information. + * @since v0.11.13 + */ + let DEFAULT_ECDH_CURVE: string; + /** + * The default value of the `maxVersion` option of `{@link createSecureContext()}`. + * It can be assigned any of the supported TLS protocol versions, + * `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. **Default:** `'TLSv1.3'`, unless + * changed using CLI options. Using `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using + * `--tls-max-v1.3` sets the default to `'TLSv1.3'`. If multiple of the options + * are provided, the highest maximum is used. + * @since v11.4.0 + */ + let DEFAULT_MAX_VERSION: SecureVersion; + /** + * The default value of the `minVersion` option of `{@link createSecureContext()}`. + * It can be assigned any of the supported TLS protocol versions, + * `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. **Default:** `'TLSv1.2'`, unless + * changed using CLI options. Using `--tls-min-v1.0` sets the default to + * `'TLSv1'`. Using `--tls-min-v1.1` sets the default to `'TLSv1.1'`. Using + * `--tls-min-v1.3` sets the default to `'TLSv1.3'`. If multiple of the options + * are provided, the lowest minimum is used. + * @since v11.4.0 + */ + let DEFAULT_MIN_VERSION: SecureVersion; + /** + * The default value of the `ciphers` option of `{@link createSecureContext()}`. + * It can be assigned any of the supported OpenSSL ciphers. + * Defaults to the content of `crypto.constants.defaultCoreCipherList`, unless + * changed using CLI options using `--tls-default-ciphers`. + * @since v19.8.0 + */ + let DEFAULT_CIPHERS: string; + /** + * An immutable array of strings representing the root certificates (in PEM format) + * from the bundled Mozilla CA store as supplied by the current Node.js version. + * + * The bundled CA store, as supplied by Node.js, is a snapshot of Mozilla CA store + * that is fixed at release time. It is identical on all supported platforms. + * @since v12.3.0 + */ + const rootCertificates: readonly string[]; +} +declare module "tls" { + export * from "node:tls"; +} diff --git a/node_modules/@types/node/trace_events.d.ts b/node_modules/@types/node/trace_events.d.ts new file mode 100644 index 0000000..5fa7a39 --- /dev/null +++ b/node_modules/@types/node/trace_events.d.ts @@ -0,0 +1,103 @@ +declare module "node:trace_events" { + /** + * The `Tracing` object is used to enable or disable tracing for sets of + * categories. Instances are created using the + * `trace_events.createTracing()` method. + * + * When created, the `Tracing` object is disabled. Calling the + * `tracing.enable()` method adds the categories to the set of enabled trace + * event categories. Calling `tracing.disable()` will remove the categories + * from the set of enabled trace event categories. + */ + interface Tracing { + /** + * A comma-separated list of the trace event categories covered by this + * `Tracing` object. + * @since v10.0.0 + */ + readonly categories: string; + /** + * Disables this `Tracing` object. + * + * Only trace event categories _not_ covered by other enabled `Tracing` + * objects and _not_ specified by the `--trace-event-categories` flag + * will be disabled. + * + * ```js + * import trace_events from 'node:trace_events'; + * const t1 = trace_events.createTracing({ categories: ['node', 'v8'] }); + * const t2 = trace_events.createTracing({ categories: ['node.perf', 'node'] }); + * t1.enable(); + * t2.enable(); + * + * // Prints 'node,node.perf,v8' + * console.log(trace_events.getEnabledCategories()); + * + * t2.disable(); // Will only disable emission of the 'node.perf' category + * + * // Prints 'node,v8' + * console.log(trace_events.getEnabledCategories()); + * ``` + * @since v10.0.0 + */ + disable(): void; + /** + * Enables this `Tracing` object for the set of categories covered by + * the `Tracing` object. + * @since v10.0.0 + */ + enable(): void; + /** + * `true` only if the `Tracing` object has been enabled. + * @since v10.0.0 + */ + readonly enabled: boolean; + } + interface CreateTracingOptions { + /** + * An array of trace category names. Values included in the array are + * coerced to a string when possible. An error will be thrown if the + * value cannot be coerced. + */ + categories: string[]; + } + /** + * Creates and returns a `Tracing` object for the given set of `categories`. + * + * ```js + * import trace_events from 'node:trace_events'; + * const categories = ['node.perf', 'node.async_hooks']; + * const tracing = trace_events.createTracing({ categories }); + * tracing.enable(); + * // do stuff + * tracing.disable(); + * ``` + * @since v10.0.0 + */ + function createTracing(options: CreateTracingOptions): Tracing; + /** + * Returns a comma-separated list of all currently-enabled trace event + * categories. The current set of enabled trace event categories is determined + * by the _union_ of all currently-enabled `Tracing` objects and any categories + * enabled using the `--trace-event-categories` flag. + * + * Given the file `test.js` below, the command `node --trace-event-categories node.perf test.js` will print `'node.async_hooks,node.perf'` to the console. + * + * ```js + * import trace_events from 'node:trace_events'; + * const t1 = trace_events.createTracing({ categories: ['node.async_hooks'] }); + * const t2 = trace_events.createTracing({ categories: ['node.perf'] }); + * const t3 = trace_events.createTracing({ categories: ['v8'] }); + * + * t1.enable(); + * t2.enable(); + * + * console.log(trace_events.getEnabledCategories()); + * ``` + * @since v10.0.0 + */ + function getEnabledCategories(): string | undefined; +} +declare module "trace_events" { + export * from "node:trace_events"; +} diff --git a/node_modules/@types/node/ts5.6/buffer.buffer.d.ts b/node_modules/@types/node/ts5.6/buffer.buffer.d.ts new file mode 100644 index 0000000..626ec28 --- /dev/null +++ b/node_modules/@types/node/ts5.6/buffer.buffer.d.ts @@ -0,0 +1,467 @@ +declare module "node:buffer" { + global { + interface BufferConstructor { + // see ../buffer.d.ts for implementation shared with all TypeScript versions + + /** + * Allocates a new buffer containing the given {str}. + * + * @param str String to store in buffer. + * @param encoding encoding to use, optional. Default is 'utf8' + * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead. + */ + new(str: string, encoding?: BufferEncoding): Buffer; + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`). + */ + new(size: number): Buffer; + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. + */ + new(array: ArrayLike): Buffer; + /** + * Produces a Buffer backed by the same allocated memory as + * the given {ArrayBuffer}/{SharedArrayBuffer}. + * + * @param arrayBuffer The ArrayBuffer with which to share memory. + * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead. + */ + new(arrayBuffer: ArrayBufferLike): Buffer; + /** + * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`. + * Array entries outside that range will be truncated to fit into it. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'. + * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]); + * ``` + * + * If `array` is an `Array`-like object (that is, one with a `length` property of + * type `number`), it is treated as if it is an array, unless it is a `Buffer` or + * a `Uint8Array`. This means all other `TypedArray` variants get treated as an + * `Array`. To create a `Buffer` from the bytes backing a `TypedArray`, use + * `Buffer.copyBytesFrom()`. + * + * A `TypeError` will be thrown if `array` is not an `Array` or another type + * appropriate for `Buffer.from()` variants. + * + * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal + * `Buffer` pool like `Buffer.allocUnsafe()` does. + * @since v5.10.0 + */ + from(array: WithImplicitCoercion>): Buffer; + /** + * This creates a view of the `ArrayBuffer` without copying the underlying + * memory. For example, when passed a reference to the `.buffer` property of a + * `TypedArray` instance, the newly created `Buffer` will share the same + * allocated memory as the `TypedArray`'s underlying `ArrayBuffer`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const arr = new Uint16Array(2); + * + * arr[0] = 5000; + * arr[1] = 4000; + * + * // Shares memory with `arr`. + * const buf = Buffer.from(arr.buffer); + * + * console.log(buf); + * // Prints: + * + * // Changing the original Uint16Array changes the Buffer also. + * arr[1] = 6000; + * + * console.log(buf); + * // Prints: + * ``` + * + * The optional `byteOffset` and `length` arguments specify a memory range within + * the `arrayBuffer` that will be shared by the `Buffer`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const ab = new ArrayBuffer(10); + * const buf = Buffer.from(ab, 0, 2); + * + * console.log(buf.length); + * // Prints: 2 + * ``` + * + * A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer` or a + * `SharedArrayBuffer` or another type appropriate for `Buffer.from()` + * variants. + * + * It is important to remember that a backing `ArrayBuffer` can cover a range + * of memory that extends beyond the bounds of a `TypedArray` view. A new + * `Buffer` created using the `buffer` property of a `TypedArray` may extend + * beyond the range of the `TypedArray`: + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const arrA = Uint8Array.from([0x63, 0x64, 0x65, 0x66]); // 4 elements + * const arrB = new Uint8Array(arrA.buffer, 1, 2); // 2 elements + * console.log(arrA.buffer === arrB.buffer); // true + * + * const buf = Buffer.from(arrB.buffer); + * console.log(buf); + * // Prints: + * ``` + * @since v5.10.0 + * @param arrayBuffer An `ArrayBuffer`, `SharedArrayBuffer`, for example the + * `.buffer` property of a `TypedArray`. + * @param byteOffset Index of first byte to expose. **Default:** `0`. + * @param length Number of bytes to expose. **Default:** + * `arrayBuffer.byteLength - byteOffset`. + */ + from( + arrayBuffer: WithImplicitCoercion, + byteOffset?: number, + length?: number, + ): Buffer; + /** + * Creates a new `Buffer` containing `string`. The `encoding` parameter identifies + * the character encoding to be used when converting `string` into bytes. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from('this is a tést'); + * const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); + * + * console.log(buf1.toString()); + * // Prints: this is a tést + * console.log(buf2.toString()); + * // Prints: this is a tést + * console.log(buf1.toString('latin1')); + * // Prints: this is a tést + * ``` + * + * A `TypeError` will be thrown if `string` is not a string or another type + * appropriate for `Buffer.from()` variants. + * + * `Buffer.from(string)` may also use the internal `Buffer` pool like + * `Buffer.allocUnsafe()` does. + * @since v5.10.0 + * @param string A string to encode. + * @param encoding The encoding of `string`. **Default:** `'utf8'`. + */ + from(string: WithImplicitCoercion, encoding?: BufferEncoding): Buffer; + from(arrayOrString: WithImplicitCoercion | string>): Buffer; + /** + * Creates a new Buffer using the passed {data} + * @param values to create a new Buffer + */ + of(...items: number[]): Buffer; + /** + * Returns a new `Buffer` which is the result of concatenating all the `Buffer` instances in the `list` together. + * + * If the list has no items, or if the `totalLength` is 0, then a new zero-length `Buffer` is returned. + * + * If `totalLength` is not provided, it is calculated from the `Buffer` instances + * in `list` by adding their lengths. + * + * If `totalLength` is provided, it must be an unsigned integer. If the + * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is + * truncated to `totalLength`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Create a single `Buffer` from a list of three `Buffer` instances. + * + * const buf1 = Buffer.alloc(10); + * const buf2 = Buffer.alloc(14); + * const buf3 = Buffer.alloc(18); + * const totalLength = buf1.length + buf2.length + buf3.length; + * + * console.log(totalLength); + * // Prints: 42 + * + * const bufA = Buffer.concat([buf1, buf2, buf3], totalLength); + * + * console.log(bufA); + * // Prints: + * console.log(bufA.length); + * // Prints: 42 + * ``` + * + * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does. + * @since v0.7.11 + * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate. + * @param totalLength Total length of the `Buffer` instances in `list` when concatenated. + */ + concat(list: readonly Uint8Array[], totalLength?: number): Buffer; + /** + * Copies the underlying memory of `view` into a new `Buffer`. + * + * ```js + * const u16 = new Uint16Array([0, 0xffff]); + * const buf = Buffer.copyBytesFrom(u16, 1, 1); + * u16[1] = 0; + * console.log(buf.length); // 2 + * console.log(buf[0]); // 255 + * console.log(buf[1]); // 255 + * ``` + * @since v19.8.0 + * @param view The {TypedArray} to copy. + * @param [offset=0] The starting offset within `view`. + * @param [length=view.length - offset] The number of elements from `view` to copy. + */ + copyBytesFrom(view: NodeJS.TypedArray, offset?: number, length?: number): Buffer; + /** + * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.alloc(5); + * + * console.log(buf); + * // Prints: + * ``` + * + * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. + * + * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.alloc(5, 'a'); + * + * console.log(buf); + * // Prints: + * ``` + * + * If both `fill` and `encoding` are specified, the allocated `Buffer` will be + * initialized by calling `buf.fill(fill, encoding)`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); + * + * console.log(buf); + * // Prints: + * ``` + * + * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance + * contents will never contain sensitive data from previous allocations, including + * data that might not have been allocated for `Buffer`s. + * + * A `TypeError` will be thrown if `size` is not a number. + * @since v5.10.0 + * @param size The desired length of the new `Buffer`. + * @param [fill=0] A value to pre-fill the new `Buffer` with. + * @param [encoding='utf8'] If `fill` is a string, this is its encoding. + */ + alloc(size: number, fill?: string | Uint8Array | number, encoding?: BufferEncoding): Buffer; + /** + * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. + * + * The underlying memory for `Buffer` instances created in this way is _not_ + * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(10); + * + * console.log(buf); + * // Prints (contents may vary): + * + * buf.fill(0); + * + * console.log(buf); + * // Prints: + * ``` + * + * A `TypeError` will be thrown if `size` is not a number. + * + * The `Buffer` module pre-allocates an internal `Buffer` instance of + * size `Buffer.poolSize` that is used as a pool for the fast allocation of new `Buffer` instances created using `Buffer.allocUnsafe()`, `Buffer.from(array)`, + * and `Buffer.concat()` only when `size` is less than `Buffer.poolSize >>> 1` (floor of `Buffer.poolSize` divided by two). + * + * Use of this pre-allocated internal memory pool is a key difference between + * calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. + * Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less + * than or equal to half `Buffer.poolSize`. The + * difference is subtle but can be important when an application requires the + * additional performance that `Buffer.allocUnsafe()` provides. + * @since v5.10.0 + * @param size The desired length of the new `Buffer`. + */ + allocUnsafe(size: number): Buffer; + /** + * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. A zero-length `Buffer` is created if + * `size` is 0. + * + * The underlying memory for `Buffer` instances created in this way is _not_ + * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize + * such `Buffer` instances with zeroes. + * + * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, + * allocations under 4 KiB are sliced from a single pre-allocated `Buffer`. This + * allows applications to avoid the garbage collection overhead of creating many + * individually allocated `Buffer` instances. This approach improves both + * performance and memory usage by eliminating the need to track and clean up as + * many individual `ArrayBuffer` objects. + * + * However, in the case where a developer may need to retain a small chunk of + * memory from a pool for an indeterminate amount of time, it may be appropriate + * to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and + * then copying out the relevant bits. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Need to keep around a few small chunks of memory. + * const store = []; + * + * socket.on('readable', () => { + * let data; + * while (null !== (data = readable.read())) { + * // Allocate for retained data. + * const sb = Buffer.allocUnsafeSlow(10); + * + * // Copy the data into the new allocation. + * data.copy(sb, 0, 0, 10); + * + * store.push(sb); + * } + * }); + * ``` + * + * A `TypeError` will be thrown if `size` is not a number. + * @since v5.12.0 + * @param size The desired length of the new `Buffer`. + */ + allocUnsafeSlow(size: number): Buffer; + } + interface Buffer extends Uint8Array { + // see ../buffer.d.ts for implementation shared with all TypeScript versions + + /** + * Returns a new `Buffer` that references the same memory as the original, but + * offset and cropped by the `start` and `end` indices. + * + * This method is not compatible with the `Uint8Array.prototype.slice()`, + * which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('buffer'); + * + * const copiedBuf = Uint8Array.prototype.slice.call(buf); + * copiedBuf[0]++; + * console.log(copiedBuf.toString()); + * // Prints: cuffer + * + * console.log(buf.toString()); + * // Prints: buffer + * + * // With buf.slice(), the original buffer is modified. + * const notReallyCopiedBuf = buf.slice(); + * notReallyCopiedBuf[0]++; + * console.log(notReallyCopiedBuf.toString()); + * // Prints: cuffer + * console.log(buf.toString()); + * // Also prints: cuffer (!) + * ``` + * @since v0.3.0 + * @deprecated Use `subarray` instead. + * @param [start=0] Where the new `Buffer` will start. + * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). + */ + slice(start?: number, end?: number): Buffer; + /** + * Returns a new `Buffer` that references the same memory as the original, but + * offset and cropped by the `start` and `end` indices. + * + * Specifying `end` greater than `buf.length` will return the same result as + * that of `end` equal to `buf.length`. + * + * This method is inherited from [`TypedArray.prototype.subarray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray). + * + * Modifying the new `Buffer` slice will modify the memory in the original `Buffer`because the allocated memory of the two objects overlap. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte + * // from the original `Buffer`. + * + * const buf1 = Buffer.allocUnsafe(26); + * + * for (let i = 0; i < 26; i++) { + * // 97 is the decimal ASCII value for 'a'. + * buf1[i] = i + 97; + * } + * + * const buf2 = buf1.subarray(0, 3); + * + * console.log(buf2.toString('ascii', 0, buf2.length)); + * // Prints: abc + * + * buf1[0] = 33; + * + * console.log(buf2.toString('ascii', 0, buf2.length)); + * // Prints: !bc + * ``` + * + * Specifying negative indexes causes the slice to be generated relative to the + * end of `buf` rather than the beginning. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('buffer'); + * + * console.log(buf.subarray(-6, -1).toString()); + * // Prints: buffe + * // (Equivalent to buf.subarray(0, 5).) + * + * console.log(buf.subarray(-6, -2).toString()); + * // Prints: buff + * // (Equivalent to buf.subarray(0, 4).) + * + * console.log(buf.subarray(-5, -2).toString()); + * // Prints: uff + * // (Equivalent to buf.subarray(1, 4).) + * ``` + * @since v3.0.0 + * @param [start=0] Where the new `Buffer` will start. + * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). + */ + subarray(start?: number, end?: number): Buffer; + } + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type NonSharedBuffer = Buffer; + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type AllowSharedBuffer = Buffer; + } + /** + * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports + * TypeScript versions earlier than 5.7. + */ + type BufferView = Buffer; +} diff --git a/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts b/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts new file mode 100644 index 0000000..f148cc4 --- /dev/null +++ b/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts @@ -0,0 +1,71 @@ +// Interface declaration for Float16Array, required in @types/node v24+. +// These definitions are specific to TS <=5.6. + +// This needs all of the "common" properties/methods of the TypedArrays, +// otherwise the type unions `TypedArray` and `ArrayBufferView` will be +// empty objects. +interface Float16Array extends Pick { + readonly BYTES_PER_ELEMENT: number; + readonly buffer: ArrayBufferLike; + readonly byteLength: number; + readonly byteOffset: number; + readonly length: number; + readonly [Symbol.toStringTag]: "Float16Array"; + at(index: number): number | undefined; + copyWithin(target: number, start: number, end?: number): this; + every(predicate: (value: number, index: number, array: Float16Array) => unknown, thisArg?: any): boolean; + fill(value: number, start?: number, end?: number): this; + filter(predicate: (value: number, index: number, array: Float16Array) => any, thisArg?: any): Float16Array; + find(predicate: (value: number, index: number, obj: Float16Array) => boolean, thisArg?: any): number | undefined; + findIndex(predicate: (value: number, index: number, obj: Float16Array) => boolean, thisArg?: any): number; + findLast( + predicate: (value: number, index: number, array: Float16Array) => value is S, + thisArg?: any, + ): S | undefined; + findLast( + predicate: (value: number, index: number, array: Float16Array) => unknown, + thisArg?: any, + ): number | undefined; + findLastIndex(predicate: (value: number, index: number, array: Float16Array) => unknown, thisArg?: any): number; + forEach(callbackfn: (value: number, index: number, array: Float16Array) => void, thisArg?: any): void; + includes(searchElement: number, fromIndex?: number): boolean; + indexOf(searchElement: number, fromIndex?: number): number; + join(separator?: string): string; + lastIndexOf(searchElement: number, fromIndex?: number): number; + map(callbackfn: (value: number, index: number, array: Float16Array) => number, thisArg?: any): Float16Array; + reduce( + callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number, + ): number; + reduce( + callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number, + initialValue: number, + ): number; + reduce( + callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float16Array) => U, + initialValue: U, + ): U; + reduceRight( + callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number, + ): number; + reduceRight( + callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number, + initialValue: number, + ): number; + reduceRight( + callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float16Array) => U, + initialValue: U, + ): U; + reverse(): Float16Array; + set(array: ArrayLike, offset?: number): void; + slice(start?: number, end?: number): Float16Array; + some(predicate: (value: number, index: number, array: Float16Array) => unknown, thisArg?: any): boolean; + sort(compareFn?: (a: number, b: number) => number): this; + subarray(begin?: number, end?: number): Float16Array; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toReversed(): Float16Array; + toSorted(compareFn?: (a: number, b: number) => number): Float16Array; + toString(): string; + valueOf(): Float16Array; + with(index: number, value: number): Float16Array; + [index: number]: number; +} diff --git a/node_modules/@types/node/ts5.6/globals.typedarray.d.ts b/node_modules/@types/node/ts5.6/globals.typedarray.d.ts new file mode 100644 index 0000000..57a1ab4 --- /dev/null +++ b/node_modules/@types/node/ts5.6/globals.typedarray.d.ts @@ -0,0 +1,36 @@ +export {}; // Make this a module + +declare global { + namespace NodeJS { + type TypedArray = + | Uint8Array + | Uint8ClampedArray + | Uint16Array + | Uint32Array + | Int8Array + | Int16Array + | Int32Array + | BigUint64Array + | BigInt64Array + | Float16Array + | Float32Array + | Float64Array; + type ArrayBufferView = TypedArray | DataView; + + type NonSharedUint8Array = Uint8Array; + type NonSharedUint8ClampedArray = Uint8ClampedArray; + type NonSharedUint16Array = Uint16Array; + type NonSharedUint32Array = Uint32Array; + type NonSharedInt8Array = Int8Array; + type NonSharedInt16Array = Int16Array; + type NonSharedInt32Array = Int32Array; + type NonSharedBigUint64Array = BigUint64Array; + type NonSharedBigInt64Array = BigInt64Array; + type NonSharedFloat16Array = Float16Array; + type NonSharedFloat32Array = Float32Array; + type NonSharedFloat64Array = Float64Array; + type NonSharedDataView = DataView; + type NonSharedTypedArray = TypedArray; + type NonSharedArrayBufferView = ArrayBufferView; + } +} diff --git a/node_modules/@types/node/ts5.6/index.d.ts b/node_modules/@types/node/ts5.6/index.d.ts new file mode 100644 index 0000000..6d093bd --- /dev/null +++ b/node_modules/@types/node/ts5.6/index.d.ts @@ -0,0 +1,118 @@ +/** + * License for programmatically and manually incorporated + * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc + * + * Copyright Node.js contributors. All rights reserved. + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +// NOTE: These definitions support Node.js and TypeScript 5.6. + +// Reference required TypeScript libraries: +/// +/// + +// TypeScript library polyfills required for TypeScript <=5.6: +/// + +// Definitions for Node.js modules specific to TypeScript <=5.6: +/// +/// + +// Definitions for Node.js modules that are not specific to any version of TypeScript: +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// diff --git a/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts b/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts new file mode 100644 index 0000000..110b1eb --- /dev/null +++ b/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts @@ -0,0 +1,72 @@ +// Interface declaration for Float16Array, required in @types/node v24+. +// These definitions are specific to TS 5.7. + +// This needs all of the "common" properties/methods of the TypedArrays, +// otherwise the type unions `TypedArray` and `ArrayBufferView` will be +// empty objects. +interface Float16Array { + readonly BYTES_PER_ELEMENT: number; + readonly buffer: TArrayBuffer; + readonly byteLength: number; + readonly byteOffset: number; + readonly length: number; + readonly [Symbol.toStringTag]: "Float16Array"; + at(index: number): number | undefined; + copyWithin(target: number, start: number, end?: number): this; + entries(): ArrayIterator<[number, number]>; + every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + fill(value: number, start?: number, end?: number): this; + filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float16Array; + find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; + findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; + findLast( + predicate: (value: number, index: number, array: this) => value is S, + thisArg?: any, + ): S | undefined; + findLast(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): number | undefined; + findLastIndex(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): number; + forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; + includes(searchElement: number, fromIndex?: number): boolean; + indexOf(searchElement: number, fromIndex?: number): number; + join(separator?: string): string; + keys(): ArrayIterator; + lastIndexOf(searchElement: number, fromIndex?: number): number; + map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float16Array; + reduce( + callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, + ): number; + reduce( + callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, + initialValue: number, + ): number; + reduce( + callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, + initialValue: U, + ): U; + reduceRight( + callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, + ): number; + reduceRight( + callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, + initialValue: number, + ): number; + reduceRight( + callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, + initialValue: U, + ): U; + reverse(): this; + set(array: ArrayLike, offset?: number): void; + slice(start?: number, end?: number): Float16Array; + some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; + sort(compareFn?: (a: number, b: number) => number): this; + subarray(begin?: number, end?: number): Float16Array; + toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string; + toReversed(): Float16Array; + toSorted(compareFn?: (a: number, b: number) => number): Float16Array; + toString(): string; + valueOf(): this; + values(): ArrayIterator; + with(index: number, value: number): Float16Array; + [Symbol.iterator](): ArrayIterator; + [index: number]: number; +} diff --git a/node_modules/@types/node/ts5.7/index.d.ts b/node_modules/@types/node/ts5.7/index.d.ts new file mode 100644 index 0000000..a9ee9e9 --- /dev/null +++ b/node_modules/@types/node/ts5.7/index.d.ts @@ -0,0 +1,118 @@ +/** + * License for programmatically and manually incorporated + * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc + * + * Copyright Node.js contributors. All rights reserved. + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +// NOTE: These definitions support Node.js and TypeScript 5.7. + +// Reference required TypeScript libraries: +/// +/// + +// TypeScript library polyfills required for TypeScript 5.7: +/// + +// Definitions for Node.js modules specific to TypeScript 5.7+: +/// +/// + +// Definitions for Node.js modules that are not specific to any version of TypeScript: +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// diff --git a/node_modules/@types/node/tty.d.ts b/node_modules/@types/node/tty.d.ts new file mode 100644 index 0000000..0569bef --- /dev/null +++ b/node_modules/@types/node/tty.d.ts @@ -0,0 +1,226 @@ +declare module "node:tty" { + import * as net from "node:net"; + /** + * The `tty.isatty()` method returns `true` if the given `fd` is associated with + * a TTY and `false` if it is not, including whenever `fd` is not a non-negative + * integer. + * @since v0.5.8 + * @param fd A numeric file descriptor + */ + function isatty(fd: number): boolean; + /** + * Represents the readable side of a TTY. In normal circumstances `process.stdin` will be the only `tty.ReadStream` instance in a Node.js + * process and there should be no reason to create additional instances. + * @since v0.5.8 + */ + class ReadStream extends net.Socket { + constructor(fd: number, options?: net.SocketConstructorOpts); + /** + * A `boolean` that is `true` if the TTY is currently configured to operate as a + * raw device. + * + * This flag is always `false` when a process starts, even if the terminal is + * operating in raw mode. Its value will change with subsequent calls to `setRawMode`. + * @since v0.7.7 + */ + isRaw: boolean; + /** + * Allows configuration of `tty.ReadStream` so that it operates as a raw device. + * + * When in raw mode, input is always available character-by-character, not + * including modifiers. Additionally, all special processing of input characters + * by the terminal is disabled, including echoing input + * characters. Ctrl+C will no longer cause a `SIGINT` when + * in this mode. This mode does not affect terminal output processing, such as + * newline translation on Unix terminals. + * @since v0.7.7 + * @param mode If `true`, configures the `tty.ReadStream` to operate as a raw device. If `false`, configures the `tty.ReadStream` to operate in its default mode. The `readStream.isRaw` + * property will be set to the resulting mode. + * @return The read stream instance. + */ + setRawMode(mode: boolean): this; + /** + * A `boolean` that is always `true` for `tty.ReadStream` instances. + * @since v0.5.8 + */ + isTTY: boolean; + } + /** + * -1 - to the left from cursor + * 0 - the entire line + * 1 - to the right from cursor + */ + type Direction = -1 | 0 | 1; + interface WriteStreamEventMap extends net.SocketEventMap { + "resize": []; + } + /** + * Represents the writable side of a TTY. In normal circumstances, `process.stdout` and `process.stderr` will be the only`tty.WriteStream` instances created for a Node.js process and there + * should be no reason to create additional instances. + * @since v0.5.8 + */ + class WriteStream extends net.Socket { + constructor(fd: number); + /** + * `writeStream.clearLine()` clears the current line of this `WriteStream` in a + * direction identified by `dir`. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + clearLine(dir: Direction, callback?: () => void): boolean; + /** + * `writeStream.clearScreenDown()` clears this `WriteStream` from the current + * cursor down. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + clearScreenDown(callback?: () => void): boolean; + /** + * `writeStream.cursorTo()` moves this `WriteStream`'s cursor to the specified + * position. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + cursorTo(x: number, y?: number, callback?: () => void): boolean; + cursorTo(x: number, callback: () => void): boolean; + /** + * `writeStream.moveCursor()` moves this `WriteStream`'s cursor _relative_ to its + * current position. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + moveCursor(dx: number, dy: number, callback?: () => void): boolean; + /** + * Returns: + * + * * `1` for 2, + * * `4` for 16, + * * `8` for 256, + * * `24` for 16,777,216 colors supported. + * + * Use this to determine what colors the terminal supports. Due to the nature of + * colors in terminals it is possible to either have false positives or false + * negatives. It depends on process information and the environment variables that + * may lie about what terminal is used. + * It is possible to pass in an `env` object to simulate the usage of a specific + * terminal. This can be useful to check how specific environment settings behave. + * + * To enforce a specific color support, use one of the below environment settings. + * + * * 2 colors: `FORCE_COLOR = 0` (Disables colors) + * * 16 colors: `FORCE_COLOR = 1` + * * 256 colors: `FORCE_COLOR = 2` + * * 16,777,216 colors: `FORCE_COLOR = 3` + * + * Disabling color support is also possible by using the `NO_COLOR` and `NODE_DISABLE_COLORS` environment variables. + * @since v9.9.0 + * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal. + */ + getColorDepth(env?: object): number; + /** + * Returns `true` if the `writeStream` supports at least as many colors as provided + * in `count`. Minimum support is 2 (black and white). + * + * This has the same false positives and negatives as described in `writeStream.getColorDepth()`. + * + * ```js + * process.stdout.hasColors(); + * // Returns true or false depending on if `stdout` supports at least 16 colors. + * process.stdout.hasColors(256); + * // Returns true or false depending on if `stdout` supports at least 256 colors. + * process.stdout.hasColors({ TMUX: '1' }); + * // Returns true. + * process.stdout.hasColors(2 ** 24, { TMUX: '1' }); + * // Returns false (the environment setting pretends to support 2 ** 8 colors). + * ``` + * @since v11.13.0, v10.16.0 + * @param [count=16] The number of colors that are requested (minimum 2). + * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal. + */ + hasColors(count?: number): boolean; + hasColors(env?: object): boolean; + hasColors(count: number, env?: object): boolean; + /** + * `writeStream.getWindowSize()` returns the size of the TTY + * corresponding to this `WriteStream`. The array is of the type `[numColumns, numRows]` where `numColumns` and `numRows` represent the number + * of columns and rows in the corresponding TTY. + * @since v0.7.7 + */ + getWindowSize(): [number, number]; + /** + * A `number` specifying the number of columns the TTY currently has. This property + * is updated whenever the `'resize'` event is emitted. + * @since v0.7.7 + */ + columns: number; + /** + * A `number` specifying the number of rows the TTY currently has. This property + * is updated whenever the `'resize'` event is emitted. + * @since v0.7.7 + */ + rows: number; + /** + * A `boolean` that is always `true`. + * @since v0.5.8 + */ + isTTY: boolean; + // #region InternalEventEmitter + addListener( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + emit(eventName: E, ...args: WriteStreamEventMap[E]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; + listenerCount( + eventName: E, + listener?: (...args: WriteStreamEventMap[E]) => void, + ): number; + listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number; + listeners(eventName: E): ((...args: WriteStreamEventMap[E]) => void)[]; + listeners(eventName: string | symbol): ((...args: any[]) => void)[]; + off( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; + on( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; + once( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + rawListeners(eventName: E): ((...args: WriteStreamEventMap[E]) => void)[]; + rawListeners(eventName: string | symbol): ((...args: any[]) => void)[]; + // eslint-disable-next-line @definitelytyped/no-unnecessary-generics + removeAllListeners(eventName?: E): this; + removeAllListeners(eventName?: string | symbol): this; + removeListener( + eventName: E, + listener: (...args: WriteStreamEventMap[E]) => void, + ): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; + // #endregion + } +} +declare module "tty" { + export * from "node:tty"; +} diff --git a/node_modules/@types/node/url.d.ts b/node_modules/@types/node/url.d.ts new file mode 100644 index 0000000..d6ea8c5 --- /dev/null +++ b/node_modules/@types/node/url.d.ts @@ -0,0 +1,556 @@ +declare module "node:url" { + import { Blob, NonSharedBuffer } from "node:buffer"; + import { ClientRequestArgs } from "node:http"; + import { ParsedUrlQuery, ParsedUrlQueryInput } from "node:querystring"; + // Input to `url.format` + interface UrlObject { + auth?: string | null | undefined; + hash?: string | null | undefined; + host?: string | null | undefined; + hostname?: string | null | undefined; + href?: string | null | undefined; + pathname?: string | null | undefined; + protocol?: string | null | undefined; + search?: string | null | undefined; + slashes?: boolean | null | undefined; + port?: string | number | null | undefined; + query?: string | null | ParsedUrlQueryInput | undefined; + } + // Output of `url.parse` + interface Url { + auth: string | null; + hash: string | null; + host: string | null; + hostname: string | null; + href: string; + path: string | null; + pathname: string | null; + protocol: string | null; + search: string | null; + slashes: boolean | null; + port: string | null; + query: string | null | ParsedUrlQuery; + } + interface UrlWithParsedQuery extends Url { + query: ParsedUrlQuery; + } + interface UrlWithStringQuery extends Url { + query: string | null; + } + interface FileUrlToPathOptions { + /** + * `true` if the `path` should be return as a windows filepath, `false` for posix, and `undefined` for the system default. + * @default undefined + * @since v22.1.0 + */ + windows?: boolean | undefined; + } + interface PathToFileUrlOptions { + /** + * `true` if the `path` should be return as a windows filepath, `false` for posix, and `undefined` for the system default. + * @default undefined + * @since v22.1.0 + */ + windows?: boolean | undefined; + } + /** + * The `url.parse()` method takes a URL string, parses it, and returns a URL + * object. + * + * A `TypeError` is thrown if `urlString` is not a string. + * + * A `URIError` is thrown if the `auth` property is present but cannot be decoded. + * + * `url.parse()` uses a lenient, non-standard algorithm for parsing URL + * strings. It is prone to security issues such as [host name spoofing](https://hackerone.com/reports/678487) + * and incorrect handling of usernames and passwords. Do not use with untrusted + * input. CVEs are not issued for `url.parse()` vulnerabilities. Use the + * [WHATWG URL](https://nodejs.org/docs/latest-v26.x/api/url.html#the-whatwg-url-api) API instead, for example: + * + * ```js + * function getURL(req) { + * const proto = req.headers['x-forwarded-proto'] || 'https'; + * const host = req.headers['x-forwarded-host'] || req.headers.host || 'example.com'; + * return new URL(req.url || '/', `${proto}://${host}`); + * } + * ``` + * + * The example above assumes well-formed headers are forwarded from a reverse + * proxy to your Node.js server. If you are not using a reverse proxy, you should + * use the example below: + * + * ```js + * function getURL(req) { + * return new URL(req.url || '/', 'https://example.com'); + * } + * ``` + * @since v0.1.25 + * @deprecated Use the WHATWG URL API instead. + * @param urlString The URL string to parse. + * @param parseQueryString If `true`, the `query` property will always + * be set to an object returned by the [`querystring`](https://nodejs.org/docs/latest-v26.x/api/querystring.html) module's `parse()` + * method. If `false`, the `query` property on the returned URL object will be an + * unparsed, undecoded string. **Default:** `false`. + * @param slashesDenoteHost If `true`, the first token after the literal + * string `//` and preceding the next `/` will be interpreted as the `host`. + * For instance, given `//foo/bar`, the result would be + * `{host: 'foo', pathname: '/bar'}` rather than `{pathname: '//foo/bar'}`. + * **Default:** `false`. + */ + function parse( + urlString: string, + parseQueryString?: false, + slashesDenoteHost?: boolean, + ): UrlWithStringQuery; + function parse(urlString: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery; + function parse(urlString: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url; + /** + * The `url.format()` method returns a formatted URL string derived from `urlObject`. + * + * ```js + * import url from 'node:url'; + * url.format({ + * protocol: 'https', + * hostname: 'example.com', + * pathname: '/some/path', + * query: { + * page: 1, + * format: 'json', + * }, + * }); + * + * // => 'https://example.com/some/path?page=1&format=json' + * ``` + * + * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`. + * + * The formatting process operates as follows: + * + * * A new empty string `result` is created. + * * If `urlObject.protocol` is a string, it is appended as-is to `result`. + * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown. + * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII + * colon (`:`) character, the literal string `:` will be appended to `result`. + * * If either of the following conditions is true, then the literal string `//` will be appended to `result`: + * * `urlObject.slashes` property is true; + * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or `file`; + * * If the value of the `urlObject.auth` property is truthy, and either `urlObject.host` or `urlObject.hostname` are not `undefined`, the value of `urlObject.auth` will be coerced into a string + * and appended to `result` followed by the literal string `@`. + * * If the `urlObject.host` property is `undefined` then: + * * If the `urlObject.hostname` is a string, it is appended to `result`. + * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string, + * an `Error` is thrown. + * * If the `urlObject.port` property value is truthy, and `urlObject.hostname` is not `undefined`: + * * The literal string `:` is appended to `result`, and + * * The value of `urlObject.port` is coerced to a string and appended to `result`. + * * Otherwise, if the `urlObject.host` property value is truthy, the value of `urlObject.host` is coerced to a string and appended to `result`. + * * If the `urlObject.pathname` property is a string that is not an empty string: + * * If the `urlObject.pathname` _does not start_ with an ASCII forward slash + * (`/`), then the literal string `'/'` is appended to `result`. + * * The value of `urlObject.pathname` is appended to `result`. + * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown. + * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result` followed by the output of calling the + * `querystring` module's `stringify()` method passing the value of `urlObject.query`. + * * Otherwise, if `urlObject.search` is a string: + * * If the value of `urlObject.search` _does not start_ with the ASCII question + * mark (`?`) character, the literal string `?` is appended to `result`. + * * The value of `urlObject.search` is appended to `result`. + * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown. + * * If the `urlObject.hash` property is a string: + * * If the value of `urlObject.hash` _does not start_ with the ASCII hash (`#`) + * character, the literal string `#` is appended to `result`. + * * The value of `urlObject.hash` is appended to `result`. + * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a + * string, an `Error` is thrown. + * * `result` is returned. + * @since v0.1.25 + * @legacy Use the WHATWG URL API instead. + * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`. + */ + function format(urlObject: URL, options?: URLFormatOptions): string; + /** + * The `url.format()` method returns a formatted URL string derived from `urlObject`. + * + * ```js + * import url from 'node:url'; + * url.format({ + * protocol: 'https', + * hostname: 'example.com', + * pathname: '/some/path', + * query: { + * page: 1, + * format: 'json', + * }, + * }); + * + * // => 'https://example.com/some/path?page=1&format=json' + * ``` + * + * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`. + * + * The formatting process operates as follows: + * + * * A new empty string `result` is created. + * * If `urlObject.protocol` is a string, it is appended as-is to `result`. + * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown. + * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII + * colon (`:`) character, the literal string `:` will be appended to `result`. + * * If either of the following conditions is true, then the literal string `//` will be appended to `result`: + * * `urlObject.slashes` property is true; + * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or `file`; + * * If the value of the `urlObject.auth` property is truthy, and either `urlObject.host` or `urlObject.hostname` are not `undefined`, the value of `urlObject.auth` will be coerced into a string + * and appended to `result` followed by the literal string `@`. + * * If the `urlObject.host` property is `undefined` then: + * * If the `urlObject.hostname` is a string, it is appended to `result`. + * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string, + * an `Error` is thrown. + * * If the `urlObject.port` property value is truthy, and `urlObject.hostname` is not `undefined`: + * * The literal string `:` is appended to `result`, and + * * The value of `urlObject.port` is coerced to a string and appended to `result`. + * * Otherwise, if the `urlObject.host` property value is truthy, the value of `urlObject.host` is coerced to a string and appended to `result`. + * * If the `urlObject.pathname` property is a string that is not an empty string: + * * If the `urlObject.pathname` _does not start_ with an ASCII forward slash + * (`/`), then the literal string `'/'` is appended to `result`. + * * The value of `urlObject.pathname` is appended to `result`. + * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown. + * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result` followed by the output of calling the + * `querystring` module's `stringify()` method passing the value of `urlObject.query`. + * * Otherwise, if `urlObject.search` is a string: + * * If the value of `urlObject.search` _does not start_ with the ASCII question + * mark (`?`) character, the literal string `?` is appended to `result`. + * * The value of `urlObject.search` is appended to `result`. + * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown. + * * If the `urlObject.hash` property is a string: + * * If the value of `urlObject.hash` _does not start_ with the ASCII hash (`#`) + * character, the literal string `#` is appended to `result`. + * * The value of `urlObject.hash` is appended to `result`. + * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a + * string, an `Error` is thrown. + * * `result` is returned. + * @since v0.1.25 + * @legacy Use the WHATWG URL API instead. + * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). + */ + function format(urlObject: UrlObject): string; + /** + * `url.format(urlString)` is shorthand for `url.format(url.parse(urlString))`. + * + * Because it invokes the deprecated `url.parse()` internally, passing a string argument + * to `url.format()` is itself deprecated. + * + * Canonicalizing a URL string can be performed using the WHATWG URL API, by + * constructing a new URL object and calling `url.toString()`. + * + * ```js + * import { URL } from 'node:url'; + * + * const unformatted = 'http://[fe80:0:0:0:0:0:0:1]:/a/b?a=b#abc'; + * const formatted = new URL(unformatted).toString(); + * + * console.log(formatted); // Prints: http://[fe80::1]/a/b?a=b#abc + * ``` + * @since v0.1.25 + * @deprecated Use the WHATWG URL API instead. + * @param urlString A string that will be passed to `url.parse()` and then formatted. + */ + function format(urlString: string): string; + /** + * The `url.resolve()` method resolves a target URL relative to a base URL in a + * manner similar to that of a web browser resolving an anchor tag. + * + * ```js + * import url from 'node:url'; + * url.resolve('/one/two/three', 'four'); // '/one/two/four' + * url.resolve('http://example.com/', '/one'); // 'http://example.com/one' + * url.resolve('http://example.com/one', '/two'); // 'http://example.com/two' + * ``` + * + * Because it invokes the deprecated `url.parse()` internally, `url.resolve()` is itself deprecated. + * + * To achieve the same result using the WHATWG URL API: + * + * ```js + * function resolve(from, to) { + * const resolvedUrl = new URL(to, new URL(from, 'resolve://')); + * if (resolvedUrl.protocol === 'resolve:') { + * // `from` is a relative URL. + * const { pathname, search, hash } = resolvedUrl; + * return pathname + search + hash; + * } + * return resolvedUrl.toString(); + * } + * + * resolve('/one/two/three', 'four'); // '/one/two/four' + * resolve('http://example.com/', '/one'); // 'http://example.com/one' + * resolve('http://example.com/one', '/two'); // 'http://example.com/two' + * ``` + * @since v0.1.25 + * @deprecated Use the WHATWG URL API instead. + * @param from The base URL to use if `to` is a relative URL. + * @param to The target URL to resolve. + */ + function resolve(from: string, to: string): string; + /** + * Returns the [Punycode](https://tools.ietf.org/html/rfc5891#section-4.4) ASCII serialization of the `domain`. If `domain` is an + * invalid domain, the empty string is returned. + * + * It performs the inverse operation to {@link domainToUnicode}. + * + * ```js + * import url from 'node:url'; + * + * console.log(url.domainToASCII('español.com')); + * // Prints xn--espaol-zwa.com + * console.log(url.domainToASCII('中文.com')); + * // Prints xn--fiq228c.com + * console.log(url.domainToASCII('xn--iñvalid.com')); + * // Prints an empty string + * ``` + * @since v7.4.0, v6.13.0 + */ + function domainToASCII(domain: string): string; + /** + * Returns the Unicode serialization of the `domain`. If `domain` is an invalid + * domain, the empty string is returned. + * + * It performs the inverse operation to {@link domainToASCII}. + * + * ```js + * import url from 'node:url'; + * + * console.log(url.domainToUnicode('xn--espaol-zwa.com')); + * // Prints español.com + * console.log(url.domainToUnicode('xn--fiq228c.com')); + * // Prints 中文.com + * console.log(url.domainToUnicode('xn--iñvalid.com')); + * // Prints an empty string + * ``` + * @since v7.4.0, v6.13.0 + */ + function domainToUnicode(domain: string): string; + /** + * This function ensures the correct decodings of percent-encoded characters as + * well as ensuring a cross-platform valid absolute path string. + * + * ```js + * import { fileURLToPath } from 'node:url'; + * + * const __filename = fileURLToPath(import.meta.url); + * + * new URL('file:///C:/path/').pathname; // Incorrect: /C:/path/ + * fileURLToPath('file:///C:/path/'); // Correct: C:\path\ (Windows) + * + * new URL('file://nas/foo.txt').pathname; // Incorrect: /foo.txt + * fileURLToPath('file://nas/foo.txt'); // Correct: \\nas\foo.txt (Windows) + * + * new URL('file:///你好.txt').pathname; // Incorrect: /%E4%BD%A0%E5%A5%BD.txt + * fileURLToPath('file:///你好.txt'); // Correct: /你好.txt (POSIX) + * + * new URL('file:///hello world').pathname; // Incorrect: /hello%20world + * fileURLToPath('file:///hello world'); // Correct: /hello world (POSIX) + * ``` + * + * **Security Considerations:** + * + * This function decodes percent-encoded characters, including encoded dot-segments + * (`%2e` as `.` and `%2e%2e` as `..`), and then normalizes the resulting path. + * This means that encoded directory traversal sequences (such as `%2e%2e`) are + * decoded and processed as actual path traversal, even though encoded slashes + * (`%2F`, `%5C`) are correctly rejected. + * + * **Applications must not rely on `fileURLToPath()` alone to prevent directory + * traversal attacks.** Always perform explicit path validation and security checks + * on the returned path value to ensure it remains within expected boundaries + * before using it for file system operations. + * @since v10.12.0 + * @param url The file URL string or URL object to convert to a path. + * @return The fully-resolved platform-specific Node.js file path. + */ + function fileURLToPath(url: string | URL, options?: FileUrlToPathOptions): string; + /** + * Like `url.fileURLToPath(...)` except that instead of returning a string + * representation of the path, a `Buffer` is returned. This conversion is + * helpful when the input URL contains percent-encoded segments that are + * not valid UTF-8 / Unicode sequences. + * + * **Security Considerations:** + * + * This function has the same security considerations as `url.fileURLToPath()`. + * It decodes percent-encoded characters, including encoded dot-segments + * (`%2e` as `.` and `%2e%2e` as `..`), and normalizes the path. **Applications + * must not rely on this function alone to prevent directory traversal attacks.** + * Always perform explicit path validation on the returned buffer value before + * using it for file system operations. + * @since v24.3.0 + * @param url The file URL string or URL object to convert to a path. + * @returns The fully-resolved platform-specific Node.js file path + * as a `Buffer`. + */ + function fileURLToPathBuffer(url: string | URL, options?: FileUrlToPathOptions): NonSharedBuffer; + /** + * This function ensures that `path` is resolved absolutely, and that the URL + * control characters are correctly encoded when converting into a File URL. + * + * ```js + * import { pathToFileURL } from 'node:url'; + * + * new URL('/foo#1', 'file:'); // Incorrect: file:///foo#1 + * pathToFileURL('/foo#1'); // Correct: file:///foo%231 (POSIX) + * + * new URL('/some/path%.c', 'file:'); // Incorrect: file:///some/path%.c + * pathToFileURL('/some/path%.c'); // Correct: file:///some/path%25.c (POSIX) + * ``` + * @since v10.12.0 + * @param path The path to convert to a File URL. + * @return The file URL object. + */ + function pathToFileURL(path: string, options?: PathToFileUrlOptions): URL; + /** + * This utility function converts a URL object into an ordinary options object as + * expected by the `http.request()` and `https.request()` APIs. + * + * ```js + * import { urlToHttpOptions } from 'node:url'; + * const myURL = new URL('https://a:b@測試?abc#foo'); + * + * console.log(urlToHttpOptions(myURL)); + * /* + * { + * protocol: 'https:', + * hostname: 'xn--g6w251d', + * hash: '#foo', + * search: '?abc', + * pathname: '/', + * path: '/?abc', + * href: 'https://a:b@xn--g6w251d/?abc#foo', + * auth: 'a:b' + * } + * + * ``` + * @since v15.7.0, v14.18.0 + * @param url The `WHATWG URL` object to convert to an options object. + * @return Options object + */ + function urlToHttpOptions(url: URL): ClientRequestArgs; + interface URLFormatOptions { + /** + * `true` if the serialized URL string should include the username and password, `false` otherwise. + * @default true + */ + auth?: boolean | undefined; + /** + * `true` if the serialized URL string should include the fragment, `false` otherwise. + * @default true + */ + fragment?: boolean | undefined; + /** + * `true` if the serialized URL string should include the search query, `false` otherwise. + * @default true + */ + search?: boolean | undefined; + /** + * `true` if Unicode characters appearing in the host component of the URL string should be encoded directly as opposed to + * being Punycode encoded. + * @default false + */ + unicode?: boolean | undefined; + } + // #region web types + type URLPatternInput = string | URLPatternInit; + interface URLPatternComponentResult { + input: string; + groups: Record; + } + interface URLPatternInit { + protocol?: string; + username?: string; + password?: string; + hostname?: string; + port?: string; + pathname?: string; + search?: string; + hash?: string; + baseURL?: string; + } + interface URLPatternOptions { + ignoreCase?: boolean; + } + interface URLPatternResult { + inputs: URLPatternInput[]; + protocol: URLPatternComponentResult; + username: URLPatternComponentResult; + password: URLPatternComponentResult; + hostname: URLPatternComponentResult; + port: URLPatternComponentResult; + pathname: URLPatternComponentResult; + search: URLPatternComponentResult; + hash: URLPatternComponentResult; + } + interface URL { + hash: string; + host: string; + hostname: string; + href: string; + readonly origin: string; + password: string; + pathname: string; + port: string; + protocol: string; + search: string; + readonly searchParams: URLSearchParams; + username: string; + toJSON(): string; + } + var URL: { + prototype: URL; + new(url: string | URL, base?: string | URL): URL; + canParse(input: string | URL, base?: string | URL): boolean; + createObjectURL(blob: Blob): string; + parse(input: string | URL, base?: string | URL): URL | null; + revokeObjectURL(id: string): void; + }; + interface URLPattern { + readonly hasRegExpGroups: boolean; + readonly hash: string; + readonly hostname: string; + readonly password: string; + readonly pathname: string; + readonly port: string; + readonly protocol: string; + readonly search: string; + readonly username: string; + exec(input?: URLPatternInput, baseURL?: string | URL): URLPatternResult | null; + test(input?: URLPatternInput, baseURL?: string | URL): boolean; + } + var URLPattern: { + prototype: URLPattern; + new(input: URLPatternInput, baseURL: string | URL, options?: URLPatternOptions): URLPattern; + new(input?: URLPatternInput, options?: URLPatternOptions): URLPattern; + }; + interface URLSearchParams { + readonly size: number; + append(name: string, value: string): void; + delete(name: string, value?: string): void; + get(name: string): string | null; + getAll(name: string): string[]; + has(name: string, value?: string): boolean; + set(name: string, value: string): void; + sort(): void; + forEach(callbackfn: (value: string, key: string, parent: URLSearchParams) => void, thisArg?: any): void; + [Symbol.iterator](): URLSearchParamsIterator<[string, string]>; + entries(): URLSearchParamsIterator<[string, string]>; + keys(): URLSearchParamsIterator; + values(): URLSearchParamsIterator; + } + var URLSearchParams: { + prototype: URLSearchParams; + new(init?: string[][] | Record | string | URLSearchParams): URLSearchParams; + }; + interface URLSearchParamsIterator extends NodeJS.Iterator { + [Symbol.iterator](): URLSearchParamsIterator; + } + // #endregion +} +declare module "url" { + export * from "node:url"; +} diff --git a/node_modules/@types/node/util.d.ts b/node_modules/@types/node/util.d.ts new file mode 100644 index 0000000..e6d87ff --- /dev/null +++ b/node_modules/@types/node/util.d.ts @@ -0,0 +1,1677 @@ +declare module "node:util" { + export * as types from "node:util/types"; + export type InspectStyle = + | "special" + | "number" + | "bigint" + | "boolean" + | "undefined" + | "null" + | "string" + | "symbol" + | "date" + | "name" + | "regexp" + | "module"; + export interface InspectStyles extends Record string)> { + regexp: { + (value: string): string; + colors: InspectColor[]; + }; + } + export type InspectColorModifier = + | "reset" + | "bold" + | "dim" + | "italic" + | "underline" + | "blink" + | "inverse" + | "hidden" + | "strikethrough" + | "doubleunderline"; + export type InspectColorForeground = + | "black" + | "red" + | "green" + | "yellow" + | "blue" + | "magenta" + | "cyan" + | "white" + | "gray" + | "redBright" + | "greenBright" + | "yellowBright" + | "blueBright" + | "magentaBright" + | "cyanBright" + | "whiteBright"; + export type InspectColorBackground = `bg${Capitalize}`; + export type InspectColor = InspectColorModifier | InspectColorForeground | InspectColorBackground; + export interface InspectColors extends Record {} + export interface InspectOptions { + /** + * If `true`, object's non-enumerable symbols and properties are included in the formatted result. + * `WeakMap` and `WeakSet` entries are also included as well as user defined prototype properties (excluding method properties). + * @default false + */ + showHidden?: boolean | undefined; + /** + * Specifies the number of times to recurse while formatting object. + * This is useful for inspecting large objects. + * To recurse up to the maximum call stack size pass `Infinity` or `null`. + * @default 2 + */ + depth?: number | null | undefined; + /** + * If `true`, the output is styled with ANSI color codes. Colors are customizable. + */ + colors?: boolean | undefined; + /** + * If `false`, `[util.inspect.custom](depth, opts, inspect)` functions are not invoked. + * @default true + */ + customInspect?: boolean | undefined; + /** + * If `true`, `Proxy` inspection includes the target and handler objects. + * @default false + */ + showProxy?: boolean | undefined; + /** + * Specifies the maximum number of `Array`, `TypedArray`, `WeakMap`, and `WeakSet` elements + * to include when formatting. Set to `null` or `Infinity` to show all elements. + * Set to `0` or negative to show no elements. + * @default 100 + */ + maxArrayLength?: number | null | undefined; + /** + * Specifies the maximum number of characters to + * include when formatting. Set to `null` or `Infinity` to show all elements. + * Set to `0` or negative to show no characters. + * @default 10000 + */ + maxStringLength?: number | null | undefined; + /** + * The length at which input values are split across multiple lines. + * Set to `Infinity` to format the input as a single line + * (in combination with `compact` set to `true` or any number >= `1`). + * @default 80 + */ + breakLength?: number | undefined; + /** + * Setting this to `false` causes each object key + * to be displayed on a new line. It will also add new lines to text that is + * longer than `breakLength`. If set to a number, the most `n` inner elements + * are united on a single line as long as all properties fit into + * `breakLength`. Short array elements are also grouped together. Note that no + * text will be reduced below 16 characters, no matter the `breakLength` size. + * For more information, see the example below. + * @default true + */ + compact?: boolean | number | undefined; + /** + * If set to `true` or a function, all properties of an object, and `Set` and `Map` + * entries are sorted in the resulting string. + * If set to `true` the default sort is used. + * If set to a function, it is used as a compare function. + */ + sorted?: boolean | ((a: string, b: string) => number) | undefined; + /** + * If set to `true`, getters are going to be + * inspected as well. If set to `'get'` only getters without setter are going + * to be inspected. If set to `'set'` only getters having a corresponding + * setter are going to be inspected. This might cause side effects depending on + * the getter function. + * @default false + */ + getters?: "get" | "set" | boolean | undefined; + /** + * If set to `true`, an underscore is used to separate every three digits in all bigints and numbers. + * @default false + */ + numericSeparator?: boolean | undefined; + } + export interface InspectContext extends Required { + stylize(text: string, styleType: InspectStyle): string; + } + import _inspect = inspect; + export interface Inspectable { + [inspect.custom](depth: number, options: InspectContext, inspect: typeof _inspect): any; + } + export interface CallSiteObject { + /** + * Returns the name of the function associated with this call site. + */ + functionName: string; + /** + * Returns the name of the resource that contains the script for the + * function for this call site. + */ + scriptName: string; + /** + * Returns the unique id of the script, as in Chrome DevTools protocol + * [`Runtime.ScriptId`](https://chromedevtools.github.io/devtools-protocol/1-3/Runtime/#type-ScriptId). + * @since v22.14.0 + */ + scriptId: string; + /** + * Returns the number, 1-based, of the line for the associate function call. + */ + lineNumber: number; + /** + * Returns the 1-based column offset on the line for the associated function call. + */ + columnNumber: number; + } + export type DiffEntry = [operation: -1 | 0 | 1, value: string]; + /** + * `util.diff()` compares two string or array values and returns an array of difference entries. + * It uses the Myers diff algorithm to compute minimal differences, which is the same algorithm + * used internally by assertion error messages. + * + * If the values are equal, an empty array is returned. + * + * ```js + * const { diff } = require('node:util'); + * + * // Comparing strings + * const actualString = '12345678'; + * const expectedString = '12!!5!7!'; + * console.log(diff(actualString, expectedString)); + * // [ + * // [0, '1'], + * // [0, '2'], + * // [1, '3'], + * // [1, '4'], + * // [-1, '!'], + * // [-1, '!'], + * // [0, '5'], + * // [1, '6'], + * // [-1, '!'], + * // [0, '7'], + * // [1, '8'], + * // [-1, '!'], + * // ] + * // Comparing arrays + * const actualArray = ['1', '2', '3']; + * const expectedArray = ['1', '3', '4']; + * console.log(diff(actualArray, expectedArray)); + * // [ + * // [0, '1'], + * // [1, '2'], + * // [0, '3'], + * // [-1, '4'], + * // ] + * // Equal values return empty array + * console.log(diff('same', 'same')); + * // [] + * ``` + * @since v22.15.0 + * @experimental + * @param actual The first value to compare + * @param expected The second value to compare + * @returns An array of difference entries. Each entry is an array with two elements: + * * Index 0: `number` Operation code: `-1` for delete, `0` for no-op/unchanged, `1` for insert + * * Index 1: `string` The value associated with the operation + */ + export function diff(actual: string | readonly string[], expected: string | readonly string[]): DiffEntry[]; + /** + * The `util.format()` method returns a formatted string using the first argument + * as a `printf`-like format string which can contain zero or more format + * specifiers. Each specifier is replaced with the converted value from the + * corresponding argument. Supported specifiers are: + * + * If a specifier does not have a corresponding argument, it is not replaced: + * + * ```js + * util.format('%s:%s', 'foo'); + * // Returns: 'foo:%s' + * ``` + * + * Values that are not part of the format string are formatted using `util.inspect()` if their type is not `string`. + * + * If there are more arguments passed to the `util.format()` method than the + * number of specifiers, the extra arguments are concatenated to the returned + * string, separated by spaces: + * + * ```js + * util.format('%s:%s', 'foo', 'bar', 'baz'); + * // Returns: 'foo:bar baz' + * ``` + * + * If the first argument does not contain a valid format specifier, `util.format()` returns a string that is the concatenation of all arguments separated by spaces: + * + * ```js + * util.format(1, 2, 3); + * // Returns: '1 2 3' + * ``` + * + * If only one argument is passed to `util.format()`, it is returned as it is + * without any formatting: + * + * ```js + * util.format('%% %s'); + * // Returns: '%% %s' + * ``` + * + * `util.format()` is a synchronous method that is intended as a debugging tool. + * Some input values can have a significant performance overhead that can block the + * event loop. Use this function with care and never in a hot code path. + * @since v0.5.3 + * @param format A `printf`-like format string. + */ + export function format(format?: any, ...param: any[]): string; + /** + * This function is identical to {@link format}, except in that it takes + * an `inspectOptions` argument which specifies options that are passed along to {@link inspect}. + * + * ```js + * util.formatWithOptions({ colors: true }, 'See object %O', { foo: 42 }); + * // Returns 'See object { foo: 42 }', where `42` is colored as a number + * // when printed to a terminal. + * ``` + * @since v10.0.0 + */ + export function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string; + export interface GetCallSitesOptions { + /** + * Reconstruct the original location in the stacktrace from the source-map. + * Enabled by default with the flag `--enable-source-maps`. + */ + sourceMap?: boolean | undefined; + } + /** + * Returns an array of call site objects containing the stack of + * the caller function. + * + * Unlike accessing an `error.stack`, the result returned from this API is not + * interfered with `Error.prepareStackTrace`. + * + * ```js + * import { getCallSites } from 'node:util'; + * + * function exampleFunction() { + * const callSites = getCallSites(); + * + * console.log('Call Sites:'); + * callSites.forEach((callSite, index) => { + * console.log(`CallSite ${index + 1}:`); + * console.log(`Function Name: ${callSite.functionName}`); + * console.log(`Script Name: ${callSite.scriptName}`); + * console.log(`Line Number: ${callSite.lineNumber}`); + * console.log(`Column Number: ${callSite.columnNumber}`); + * }); + * // CallSite 1: + * // Function Name: exampleFunction + * // Script Name: /home/example.js + * // Line Number: 5 + * // Column Number: 26 + * + * // CallSite 2: + * // Function Name: anotherFunction + * // Script Name: /home/example.js + * // Line Number: 22 + * // Column Number: 3 + * + * // ... + * } + * + * // A function to simulate another stack layer + * function anotherFunction() { + * exampleFunction(); + * } + * + * anotherFunction(); + * ``` + * + * It is possible to reconstruct the original locations by setting the option `sourceMap` to `true`. + * If the source map is not available, the original location will be the same as the current location. + * When the `--enable-source-maps` flag is enabled, `sourceMap` will be true by default. + * + * ```ts + * import { getCallSites } from 'node:util'; + * + * interface Foo { + * foo: string; + * } + * + * const callSites = getCallSites({ sourceMap: true }); + * + * // With sourceMap: + * // Function Name: '' + * // Script Name: example.js + * // Line Number: 7 + * // Column Number: 26 + * + * // Without sourceMap: + * // Function Name: '' + * // Script Name: example.js + * // Line Number: 2 + * // Column Number: 26 + * ``` + * @param frameCount Number of frames to capture as call site objects. + * **Default:** `10`. Allowable range is between 1 and 200. + * @return An array of call site objects + * @since v22.9.0 + */ + export function getCallSites(frameCount?: number, options?: GetCallSitesOptions): CallSiteObject[]; + export function getCallSites(options: GetCallSitesOptions): CallSiteObject[]; + /** + * Returns the string name for a numeric error code that comes from a Node.js API. + * The mapping between error codes and error names is platform-dependent. + * See `Common System Errors` for the names of common errors. + * + * ```js + * fs.access('file/that/does/not/exist', (err) => { + * const name = util.getSystemErrorName(err.errno); + * console.error(name); // ENOENT + * }); + * ``` + * @since v9.7.0 + */ + export function getSystemErrorName(err: number): string; + /** + * Enable or disable printing a stack trace on `SIGINT`. The API is only available on the main thread. + * @since 24.6.0 + */ + export function setTraceSigInt(enable: boolean): void; + /** + * Returns a Map of all system error codes available from the Node.js API. + * The mapping between error codes and error names is platform-dependent. + * See `Common System Errors` for the names of common errors. + * + * ```js + * fs.access('file/that/does/not/exist', (err) => { + * const errorMap = util.getSystemErrorMap(); + * const name = errorMap.get(err.errno); + * console.error(name); // ENOENT + * }); + * ``` + * @since v16.0.0, v14.17.0 + */ + export function getSystemErrorMap(): Map; + /** + * Returns the string message for a numeric error code that comes from a Node.js + * API. + * The mapping between error codes and string messages is platform-dependent. + * + * ```js + * fs.access('file/that/does/not/exist', (err) => { + * const message = util.getSystemErrorMessage(err.errno); + * console.error(message); // no such file or directory + * }); + * ``` + * @since v22.12.0 + */ + export function getSystemErrorMessage(err: number): string; + /** + * Returns the `string` after replacing any surrogate code points + * (or equivalently, any unpaired surrogate code units) with the + * Unicode "replacement character" U+FFFD. + * @since v16.8.0, v14.18.0 + */ + export function toUSVString(string: string): string; + /** + * Creates and returns an `AbortController` instance whose `AbortSignal` is marked + * as transferable and can be used with `structuredClone()` or `postMessage()`. + * @since v18.11.0 + * @returns A transferable AbortController + */ + export function transferableAbortController(): AbortController; + /** + * Marks the given `AbortSignal` as transferable so that it can be used with`structuredClone()` and `postMessage()`. + * + * ```js + * const signal = transferableAbortSignal(AbortSignal.timeout(100)); + * const channel = new MessageChannel(); + * channel.port2.postMessage(signal, [signal]); + * ``` + * @since v18.11.0 + * @param signal The AbortSignal + * @returns The same AbortSignal + */ + export function transferableAbortSignal(signal: AbortSignal): AbortSignal; + /** + * Listens to abort event on the provided `signal` and returns a promise that resolves when the `signal` is aborted. + * If `resource` is provided, it weakly references the operation's associated object, + * so if `resource` is garbage collected before the `signal` aborts, + * then returned promise shall remain pending. + * This prevents memory leaks in long-running or non-cancelable operations. + * + * ```js + * import { aborted } from 'node:util'; + * + * // Obtain an object with an abortable signal, like a custom resource or operation. + * const dependent = obtainSomethingAbortable(); + * + * // Pass `dependent` as the resource, indicating the promise should only resolve + * // if `dependent` is still in memory when the signal is aborted. + * aborted(dependent.signal, dependent).then(() => { + * // This code runs when `dependent` is aborted. + * console.log('Dependent resource was aborted.'); + * }); + * + * // Simulate an event that triggers the abort. + * dependent.on('event', () => { + * dependent.abort(); // This will cause the `aborted` promise to resolve. + * }); + * ``` + * @since v19.7.0 + * @param resource Any non-null object tied to the abortable operation and held weakly. + * If `resource` is garbage collected before the `signal` aborts, the promise remains pending, + * allowing Node.js to stop tracking it. + * This helps prevent memory leaks in long-running or non-cancelable operations. + */ + export function aborted(signal: AbortSignal, resource: any): Promise; + /** + * The `util.inspect()` method returns a string representation of `object` that is + * intended for debugging. The output of `util.inspect` may change at any time + * and should not be depended upon programmatically. Additional `options` may be + * passed that alter the result. + * `util.inspect()` will use the constructor's name and/or `Symbol.toStringTag` + * property to make an identifiable tag for an inspected value. + * + * ```js + * class Foo { + * get [Symbol.toStringTag]() { + * return 'bar'; + * } + * } + * + * class Bar {} + * + * const baz = Object.create(null, { [Symbol.toStringTag]: { value: 'foo' } }); + * + * util.inspect(new Foo()); // 'Foo [bar] {}' + * util.inspect(new Bar()); // 'Bar {}' + * util.inspect(baz); // '[foo] {}' + * ``` + * + * Circular references point to their anchor by using a reference index: + * + * ```js + * import { inspect } from 'node:util'; + * + * const obj = {}; + * obj.a = [obj]; + * obj.b = {}; + * obj.b.inner = obj.b; + * obj.b.obj = obj; + * + * console.log(inspect(obj)); + * // { + * // a: [ [Circular *1] ], + * // b: { inner: [Circular *2], obj: [Circular *1] } + * // } + * ``` + * + * The following example inspects all properties of the `util` object: + * + * ```js + * import util from 'node:util'; + * + * console.log(util.inspect(util, { showHidden: true, depth: null })); + * ``` + * + * The following example highlights the effect of the `compact` option: + * + * ```js + * import { inspect } from 'node:util'; + * + * const o = { + * a: [1, 2, [[ + * 'Lorem ipsum dolor sit amet,\nconsectetur adipiscing elit, sed do ' + + * 'eiusmod \ntempor incididunt ut labore et dolore magna aliqua.', + * 'test', + * 'foo']], 4], + * b: new Map([['za', 1], ['zb', 'test']]), + * }; + * console.log(inspect(o, { compact: true, depth: 5, breakLength: 80 })); + * + * // { a: + * // [ 1, + * // 2, + * // [ [ 'Lorem ipsum dolor sit amet,\nconsectetur [...]', // A long line + * // 'test', + * // 'foo' ] ], + * // 4 ], + * // b: Map(2) { 'za' => 1, 'zb' => 'test' } } + * + * // Setting `compact` to false or an integer creates more reader friendly output. + * console.log(inspect(o, { compact: false, depth: 5, breakLength: 80 })); + * + * // { + * // a: [ + * // 1, + * // 2, + * // [ + * // [ + * // 'Lorem ipsum dolor sit amet,\n' + + * // 'consectetur adipiscing elit, sed do eiusmod \n' + + * // 'tempor incididunt ut labore et dolore magna aliqua.', + * // 'test', + * // 'foo' + * // ] + * // ], + * // 4 + * // ], + * // b: Map(2) { + * // 'za' => 1, + * // 'zb' => 'test' + * // } + * // } + * + * // Setting `breakLength` to e.g. 150 will print the "Lorem ipsum" text in a + * // single line. + * ``` + * + * The `showHidden` option allows `WeakMap` and `WeakSet` entries to be + * inspected. If there are more entries than `maxArrayLength`, there is no + * guarantee which entries are displayed. That means retrieving the same + * `WeakSet` entries twice may result in different output. Furthermore, entries + * with no remaining strong references may be garbage collected at any time. + * + * ```js + * import { inspect } from 'node:util'; + * + * const obj = { a: 1 }; + * const obj2 = { b: 2 }; + * const weakSet = new WeakSet([obj, obj2]); + * + * console.log(inspect(weakSet, { showHidden: true })); + * // WeakSet { { a: 1 }, { b: 2 } } + * ``` + * + * The `sorted` option ensures that an object's property insertion order does not + * impact the result of `util.inspect()`. + * + * ```js + * import { inspect } from 'node:util'; + * import assert from 'node:assert'; + * + * const o1 = { + * b: [2, 3, 1], + * a: '`a` comes before `b`', + * c: new Set([2, 3, 1]), + * }; + * console.log(inspect(o1, { sorted: true })); + * // { a: '`a` comes before `b`', b: [ 2, 3, 1 ], c: Set(3) { 1, 2, 3 } } + * console.log(inspect(o1, { sorted: (a, b) => b.localeCompare(a) })); + * // { c: Set(3) { 3, 2, 1 }, b: [ 2, 3, 1 ], a: '`a` comes before `b`' } + * + * const o2 = { + * c: new Set([2, 1, 3]), + * a: '`a` comes before `b`', + * b: [2, 3, 1], + * }; + * assert.strict.equal( + * inspect(o1, { sorted: true }), + * inspect(o2, { sorted: true }), + * ); + * ``` + * + * The `numericSeparator` option adds an underscore every three digits to all + * numbers. + * + * ```js + * import { inspect } from 'node:util'; + * + * const thousand = 1000; + * const million = 1000000; + * const bigNumber = 123456789n; + * const bigDecimal = 1234.12345; + * + * console.log(inspect(thousand, { numericSeparator: true })); + * // 1_000 + * console.log(inspect(million, { numericSeparator: true })); + * // 1_000_000 + * console.log(inspect(bigNumber, { numericSeparator: true })); + * // 123_456_789n + * console.log(inspect(bigDecimal, { numericSeparator: true })); + * // 1_234.123_45 + * ``` + * + * `util.inspect()` is a synchronous method intended for debugging. Its maximum + * output length is approximately 128 MiB. Inputs that result in longer output will + * be truncated. + * @since v0.3.0 + * @param object Any JavaScript primitive or `Object`. + * @return The representation of `object`. + */ + export function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string; + export function inspect(object: any, options?: InspectOptions): string; + export namespace inspect { + const custom: unique symbol; + let colors: InspectColors; + let styles: InspectStyles; + let defaultOptions: InspectOptions; + let replDefaults: InspectOptions; + } + /** + * Alias for [`Array.isArray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray). + * + * Returns `true` if the given `object` is an `Array`. Otherwise, returns `false`. + * + * ```js + * import util from 'node:util'; + * + * util.isArray([]); + * // Returns: true + * util.isArray(new Array()); + * // Returns: true + * util.isArray({}); + * // Returns: false + * ``` + * @since v0.6.0 + * @deprecated Since v4.0.0 - Use `isArray` instead. + */ + export function isArray(object: unknown): object is unknown[]; + /** + * Usage of `util.inherits()` is discouraged. Please use the ES6 `class` and + * `extends` keywords to get language level inheritance support. Also note + * that the two styles are [semantically incompatible](https://github.com/nodejs/node/issues/4179). + * + * Inherit the prototype methods from one + * [constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/constructor) into another. The + * prototype of `constructor` will be set to a new object created from + * `superConstructor`. + * + * This mainly adds some input validation on top of + * `Object.setPrototypeOf(constructor.prototype, superConstructor.prototype)`. + * As an additional convenience, `superConstructor` will be accessible + * through the `constructor.super_` property. + * + * ```js + * const util = require('node:util'); + * const EventEmitter = require('node:events'); + * + * function MyStream() { + * EventEmitter.call(this); + * } + * + * util.inherits(MyStream, EventEmitter); + * + * MyStream.prototype.write = function(data) { + * this.emit('data', data); + * }; + * + * const stream = new MyStream(); + * + * console.log(stream instanceof EventEmitter); // true + * console.log(MyStream.super_ === EventEmitter); // true + * + * stream.on('data', (data) => { + * console.log(`Received data: "${data}"`); + * }); + * stream.write('It works!'); // Received data: "It works!" + * ``` + * + * ES6 example using `class` and `extends`: + * + * ```js + * import EventEmitter from 'node:events'; + * + * class MyStream extends EventEmitter { + * write(data) { + * this.emit('data', data); + * } + * } + * + * const stream = new MyStream(); + * + * stream.on('data', (data) => { + * console.log(`Received data: "${data}"`); + * }); + * stream.write('With ES6'); + * ``` + * @since v0.3.0 + * @legacy Use ES2015 class syntax and `extends` keyword instead. + */ + export function inherits(constructor: unknown, superConstructor: unknown): void; + /** + * The `util.convertProcessSignalToExitCode()` method converts a signal name to its + * corresponding POSIX exit code. Following the POSIX standard, the exit code + * for a process terminated by a signal is calculated as `128 + signal number`. + * + * If `signal` is not a valid signal name, then an error will be thrown. See + * [`signal(7)`](https://man7.org/linux/man-pages/man7/signal.7.html) for a list of valid signals. + * + * ```js + * import { convertProcessSignalToExitCode } from 'node:util'; + * + * console.log(convertProcessSignalToExitCode('SIGTERM')); // 143 (128 + 15) + * console.log(convertProcessSignalToExitCode('SIGKILL')); // 137 (128 + 9) + * ``` + * + * This is particularly useful when working with processes to determine + * the exit code based on the signal that terminated the process. + * @since v25.4.0 + * @param signal A signal name (e.g. `'SIGTERM'`) + * @returns The exit code corresponding to `signal` + */ + export function convertProcessSignalToExitCode(signal: NodeJS.Signals): number; + export type DebugLoggerFunction = (msg: string, ...param: unknown[]) => void; + export interface DebugLogger extends DebugLoggerFunction { + /** + * The `util.debuglog().enabled` getter is used to create a test that can be used + * in conditionals based on the existence of the `NODE_DEBUG` environment variable. + * If the `section` name appears within the value of that environment variable, + * then the returned value will be `true`. If not, then the returned value will be + * `false`. + * + * ```js + * import { debuglog } from 'node:util'; + * const enabled = debuglog('foo').enabled; + * if (enabled) { + * console.log('hello from foo [%d]', 123); + * } + * ``` + * + * If this program is run with `NODE_DEBUG=foo` in the environment, then it will + * output something like: + * + * ```console + * hello from foo [123] + * ``` + */ + enabled: boolean; + } + /** + * The `util.debuglog()` method is used to create a function that conditionally + * writes debug messages to `stderr` based on the existence of the `NODE_DEBUG` + * environment variable. If the `section` name appears within the value of that + * environment variable, then the returned function operates similar to + * `console.error()`. If not, then the returned function is a no-op. + * + * ```js + * import { debuglog } from 'node:util'; + * const log = debuglog('foo'); + * + * log('hello from foo [%d]', 123); + * ``` + * + * If this program is run with `NODE_DEBUG=foo` in the environment, then + * it will output something like: + * + * ```console + * FOO 3245: hello from foo [123] + * ``` + * + * where `3245` is the process id. If it is not run with that + * environment variable set, then it will not print anything. + * + * The `section` supports wildcard also: + * + * ```js + * import { debuglog } from 'node:util'; + * const log = debuglog('foo-bar'); + * + * log('hi there, it\'s foo-bar [%d]', 2333); + * ``` + * + * if it is run with `NODE_DEBUG=foo*` in the environment, then it will output + * something like: + * + * ```console + * FOO-BAR 3257: hi there, it's foo-bar [2333] + * ``` + * + * Multiple comma-separated `section` names may be specified in the `NODE_DEBUG` + * environment variable: `NODE_DEBUG=fs,net,tls`. + * + * The optional `callback` argument can be used to replace the logging function + * with a different function that doesn't have any initialization or + * unnecessary wrapping. + * + * ```js + * import { debuglog } from 'node:util'; + * let log = debuglog('internals', (debug) => { + * // Replace with a logging function that optimizes out + * // testing if the section is enabled + * log = debug; + * }); + * ``` + * @since v0.11.3 + * @param section A string identifying the portion of the application for which the `debuglog` function is being created. + * @param callback A callback invoked the first time the logging function is called with a function argument that is a more optimized logging function. + * @return The logging function + */ + export function debuglog(section: string, callback?: (fn: DebugLoggerFunction) => void): DebugLogger; + export { debuglog as debug }; + export interface DeprecateOptions { + /** + * When false do not change the prototype of object + * while emitting the deprecation warning. + * @since v25.2.0 + * @default true + */ + modifyPrototype?: boolean | undefined; + } + /** + * The `util.deprecate()` method wraps `fn` (which may be a function or class) in + * such a way that it is marked as deprecated. + * + * ```js + * import { deprecate } from 'node:util'; + * + * export const obsoleteFunction = deprecate(() => { + * // Do something here. + * }, 'obsoleteFunction() is deprecated. Use newShinyFunction() instead.'); + * ``` + * + * When called, `util.deprecate()` will return a function that will emit a + * `DeprecationWarning` using the `'warning'` event. The warning will + * be emitted and printed to `stderr` the first time the returned function is + * called. After the warning is emitted, the wrapped function is called without + * emitting a warning. + * + * If the same optional `code` is supplied in multiple calls to `util.deprecate()`, + * the warning will be emitted only once for that `code`. + * + * ```js + * import { deprecate } from 'node:util'; + * + * const fn1 = deprecate( + * () => 'a value', + * 'deprecation message', + * 'DEP0001', + * ); + * const fn2 = deprecate( + * () => 'a different value', + * 'other dep message', + * 'DEP0001', + * ); + * fn1(); // Emits a deprecation warning with code DEP0001 + * fn2(); // Does not emit a deprecation warning because it has the same code + * ``` + * + * If either the `--no-deprecation` or `--no-warnings` command-line flags are + * used, or if the `process.noDeprecation` property is set to `true` _prior_ to + * the first deprecation warning, the `util.deprecate()` method does nothing. + * + * If the `--trace-deprecation` or `--trace-warnings` command-line flags are set, + * or the `process.traceDeprecation` property is set to `true`, a warning and a + * stack trace are printed to `stderr` the first time the deprecated function is + * called. + * + * If the `--throw-deprecation` command-line flag is set, or the + * `process.throwDeprecation` property is set to `true`, then an exception will be + * thrown when the deprecated function is called. + * + * The `--throw-deprecation` command-line flag and `process.throwDeprecation` + * property take precedence over `--trace-deprecation` and + * `process.traceDeprecation`. + * @since v0.8.0 + * @param fn The function that is being deprecated. + * @param msg A warning message to display when the deprecated function is invoked. + * @param code A deprecation code. See the `list of deprecated APIs` for a list of codes. + * @return The deprecated function wrapped to emit a warning. + */ + export function deprecate(fn: T, msg: string, code?: string, options?: DeprecateOptions): T; + export interface IsDeepStrictEqualOptions { + /** + * If `true`, prototype and constructor + * comparison is skipped during deep strict equality check. + * @since v24.9.0 + * @default false + */ + skipPrototype?: boolean | undefined; + } + /** + * Returns `true` if there is deep strict equality between `val1` and `val2`. + * Otherwise, returns `false`. + * + * See `assert.deepStrictEqual()` for more information about deep strict + * equality. + * @since v9.0.0 + */ + export function isDeepStrictEqual(val1: unknown, val2: unknown, options?: IsDeepStrictEqualOptions): boolean; + /** + * Returns `str` with any ANSI escape codes removed. + * + * ```js + * console.log(util.stripVTControlCharacters('\u001B[4mvalue\u001B[0m')); + * // Prints "value" + * ``` + * @since v16.11.0 + */ + export function stripVTControlCharacters(str: string): string; + /** + * Takes an `async` function (or a function that returns a `Promise`) and returns a + * function following the error-first callback style, i.e. taking + * an `(err, value) => ...` callback as the last argument. In the callback, the + * first argument will be the rejection reason (or `null` if the `Promise` + * resolved), and the second argument will be the resolved value. + * + * ```js + * import { callbackify } from 'node:util'; + * + * async function fn() { + * return 'hello world'; + * } + * const callbackFunction = callbackify(fn); + * + * callbackFunction((err, ret) => { + * if (err) throw err; + * console.log(ret); + * }); + * ``` + * + * Will print: + * + * ```text + * hello world + * ``` + * + * The callback is executed asynchronously, and will have a limited stack trace. + * If the callback throws, the process will emit an `'uncaughtException'` + * event, and if not handled will exit. + * + * Since `null` has a special meaning as the first argument to a callback, if a + * wrapped function rejects a `Promise` with a falsy value as a reason, the value + * is wrapped in an `Error` with the original value stored in a field named + * `reason`. + * + * ```js + * import util from 'node:util'; + * + * function fn() { + * return Promise.reject(null); + * } + * const callbackFunction = util.callbackify(fn); + * + * callbackFunction((err, ret) => { + * // When the Promise was rejected with `null` it is wrapped with an Error and + * // the original value is stored in `reason`. + * err && Object.hasOwn(err, 'reason') && err.reason === null; // true + * }); + * ``` + * @since v8.2.0 + * @param fn An `async` function + * @return a callback style function + */ + export function callbackify(fn: () => Promise): (callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: () => Promise, + ): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; + export function callbackify( + fn: (arg1: T1) => Promise, + ): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: (arg1: T1) => Promise, + ): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2) => Promise, + ): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2) => Promise, + ): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3) => Promise, + ): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3) => Promise, + ): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise, + ): ( + arg1: T1, + arg2: T2, + arg3: T3, + arg4: T4, + callback: (err: NodeJS.ErrnoException | null, result: TResult) => void, + ) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise, + ): ( + arg1: T1, + arg2: T2, + arg3: T3, + arg4: T4, + arg5: T5, + callback: (err: NodeJS.ErrnoException | null, result: TResult) => void, + ) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise, + ): ( + arg1: T1, + arg2: T2, + arg3: T3, + arg4: T4, + arg5: T5, + arg6: T6, + callback: (err: NodeJS.ErrnoException) => void, + ) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise, + ): ( + arg1: T1, + arg2: T2, + arg3: T3, + arg4: T4, + arg5: T5, + arg6: T6, + callback: (err: NodeJS.ErrnoException | null, result: TResult) => void, + ) => void; + export interface CustomPromisifyLegacy extends Function { + __promisify__: TCustom; + } + export interface CustomPromisifySymbol extends Function { + [promisify.custom]: TCustom; + } + export type CustomPromisify = + | CustomPromisifySymbol + | CustomPromisifyLegacy; + /** + * Takes a function following the common error-first callback style, i.e. taking + * an `(err, value) => ...` callback as the last argument, and returns a version + * that returns promises. + * + * ```js + * import { promisify } from 'node:util'; + * import { stat } from 'node:fs'; + * + * const promisifiedStat = promisify(stat); + * promisifiedStat('.').then((stats) => { + * // Do something with `stats` + * }).catch((error) => { + * // Handle the error. + * }); + * ``` + * + * Or, equivalently using `async function`s: + * + * ```js + * import { promisify } from 'node:util'; + * import { stat } from 'node:fs'; + * + * const promisifiedStat = promisify(stat); + * + * async function callStat() { + * const stats = await promisifiedStat('.'); + * console.log(`This directory is owned by ${stats.uid}`); + * } + * + * callStat(); + * ``` + * + * If there is an `original[util.promisify.custom]` property present, `promisify` + * will return its value, see [Custom promisified functions](https://nodejs.org/docs/latest-v26.x/api/util.html#custom-promisified-functions). + * + * `promisify()` assumes that `original` is a function taking a callback as its + * final argument in all cases. If `original` is not a function, `promisify()` + * will throw an error. If `original` is a function but its last argument is not + * an error-first callback, it will still be passed an error-first + * callback as its last argument. + * + * Using `promisify()` on class methods or other methods that use `this` may not + * work as expected unless handled specially: + * + * ```js + * import { promisify } from 'node:util'; + * + * class Foo { + * constructor() { + * this.a = 42; + * } + * + * bar(callback) { + * callback(null, this.a); + * } + * } + * + * const foo = new Foo(); + * + * const naiveBar = promisify(foo.bar); + * // TypeError: Cannot read properties of undefined (reading 'a') + * // naiveBar().then(a => console.log(a)); + * + * naiveBar.call(foo).then((a) => console.log(a)); // '42' + * + * const bindBar = naiveBar.bind(foo); + * bindBar().then((a) => console.log(a)); // '42' + * ``` + * @since v8.0.0 + */ + export function promisify(fn: CustomPromisify): TCustom; + export function promisify( + fn: (callback: (err: any, result: TResult) => void) => void, + ): () => Promise; + export function promisify(fn: (callback: (err?: any) => void) => void): () => Promise; + export function promisify( + fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void, + ): (arg1: T1) => Promise; + export function promisify(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void, + ): (arg1: T1, arg2: T2) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void, + ): (arg1: T1, arg2: T2) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; + export function promisify(fn: Function): Function; + export namespace promisify { + /** + * That can be used to declare custom promisified variants of functions. + */ + const custom: unique symbol; + } + /** + * Stability: 1.1 - Active development + * Given an example `.env` file: + * + * ```js + * import { parseEnv } from 'node:util'; + * + * parseEnv('HELLO=world\nHELLO=oh my\n'); + * // Returns: { HELLO: 'oh my' } + * ``` + * @param content The raw contents of a `.env` file. + * @since v20.12.0 + */ + export function parseEnv(content: string): NodeJS.Dict; + export interface StyleTextOptions { + /** + * When true, `stream` is checked to see if it can handle colors. + * @default true + */ + validateStream?: boolean | undefined; + /** + * A stream that will be validated if it can be colored. + * @default process.stdout + */ + stream?: NodeJS.WritableStream | undefined; + } + /** + * This function returns a formatted text considering the `format` passed + * for printing in a terminal. It is aware of the terminal's capabilities + * and acts according to the configuration set via `NO_COLOR`, + * `NODE_DISABLE_COLORS` and `FORCE_COLOR` environment variables. + * + * ```js + * import { styleText } from 'node:util'; + * import { stderr } from 'node:process'; + * + * const successMessage = styleText('green', 'Success!'); + * console.log(successMessage); + * + * const errorMessage = styleText( + * 'red', + * 'Error! Error!', + * // Validate if process.stderr has TTY + * { stream: stderr }, + * ); + * console.error(errorMessage); + * ``` + * + * `util.inspect.colors` also provides text formats such as `italic`, and + * `underline` and you can combine both: + * + * ```js + * console.log( + * util.styleText(['underline', 'italic'], 'My italic underlined message'), + * ); + * ``` + * + * When passing an array of formats, the order of the format applied + * is left to right so the following style might overwrite the previous one. + * + * ```js + * console.log( + * util.styleText(['red', 'green'], 'text'), // green + * ); + * ``` + * + * The special format value `none` applies no additional styling to the text. + * + * In addition to predefined color names, `util.styleText()` supports hex color + * strings using ANSI TrueColor (24-bit) escape sequences. Hex colors can be + * specified in either 3-digit (`#RGB`) or 6-digit (`#RRGGBB`) format: + * + * ```js + * import { styleText } from 'node:util'; + * + * // 6-digit hex color + * console.log(styleText('#ff5733', 'Orange text')); + * + * // 3-digit hex color (shorthand) + * console.log(styleText('#f00', 'Red text')); + * ``` + * + * The full list of formats can be found in [modifiers](https://nodejs.org/docs/latest-v26.x/api/util.html#modifiers). + * @param format A text format or an Array of text formats defined in `util.inspect.colors`, or a hex color in `#RGB` + * or `#RRGGBB` form. + * @param text The text to to be formatted. + * @since v20.12.0 + */ + export function styleText( + format: InspectColor | readonly InspectColor[] | `#${string}`, + text: string, + options?: StyleTextOptions, + ): string; + //// parseArgs + /** + * Provides a higher level API for command-line argument parsing than interacting + * with `process.argv` directly. Takes a specification for the expected arguments + * and returns a structured object with the parsed options and positionals. + * + * ```js + * import { parseArgs } from 'node:util'; + * const args = ['-f', '--bar', 'b']; + * const options = { + * foo: { + * type: 'boolean', + * short: 'f', + * }, + * bar: { + * type: 'string', + * }, + * }; + * const { + * values, + * positionals, + * } = parseArgs({ args, options }); + * console.log(values, positionals); + * // Prints: [Object: null prototype] { foo: true, bar: 'b' } [] + * ``` + * @since v18.3.0, v16.17.0 + * @param config Used to provide arguments for parsing and to configure the parser. `config` supports the following properties: + * @return The parsed command line arguments: + */ + export function parseArgs(config?: T): ParsedResults; + /** + * Type of argument used in {@link parseArgs}. + */ + export type ParseArgsOptionsType = "boolean" | "string"; + export interface ParseArgsOptionDescriptor { + /** + * Type of argument. + */ + type: ParseArgsOptionsType; + /** + * Whether this option can be provided multiple times. + * If `true`, all values will be collected in an array. + * If `false`, values for the option are last-wins. + * @default false. + */ + multiple?: boolean | undefined; + /** + * A single character alias for the option. + */ + short?: string | undefined; + /** + * The value to assign to + * the option if it does not appear in the arguments to be parsed. The value + * must match the type specified by the `type` property. If `multiple` is + * `true`, it must be an array. No default value is applied when the option + * does appear in the arguments to be parsed, even if the provided value + * is falsy. + * @since v18.11.0 + */ + default?: string | boolean | string[] | boolean[] | undefined; + } + export interface ParseArgsOptionsConfig { + [longOption: string]: ParseArgsOptionDescriptor; + } + export interface ParseArgsConfig { + /** + * Array of argument strings. + */ + args?: readonly string[] | undefined; + /** + * Used to describe arguments known to the parser. + */ + options?: ParseArgsOptionsConfig | undefined; + /** + * Should an error be thrown when unknown arguments are encountered, + * or when arguments are passed that do not match the `type` configured in `options`. + * @default true + */ + strict?: boolean | undefined; + /** + * Whether this command accepts positional arguments. + */ + allowPositionals?: boolean | undefined; + /** + * If `true`, allows explicitly setting boolean options to `false` by prefixing the option name with `--no-`. + * @default false + * @since v22.4.0 + */ + allowNegative?: boolean | undefined; + /** + * Return the parsed tokens. This is useful for extending the built-in behavior, + * from adding additional checks through to reprocessing the tokens in different ways. + * @default false + */ + tokens?: boolean | undefined; + } + /* + IfDefaultsTrue and IfDefaultsFalse are helpers to handle default values for missing boolean properties. + TypeScript does not have exact types for objects: https://github.com/microsoft/TypeScript/issues/12936 + This means it is impossible to distinguish between "field X is definitely not present" and "field X may or may not be present". + But we expect users to generally provide their config inline or `as const`, which means TS will always know whether a given field is present. + So this helper treats "not definitely present" (i.e., not `extends boolean`) as being "definitely not present", i.e. it should have its default value. + This is technically incorrect but is a much nicer UX for the common case. + The IfDefaultsTrue version is for things which default to true; the IfDefaultsFalse version is for things which default to false. + */ + type IfDefaultsTrue = T extends true ? IfTrue + : T extends false ? IfFalse + : IfTrue; + // we put the `extends false` condition first here because `undefined` compares like `any` when `strictNullChecks: false` + type IfDefaultsFalse = T extends false ? IfFalse + : T extends true ? IfTrue + : IfFalse; + type ExtractOptionValue = IfDefaultsTrue< + T["strict"], + O["type"] extends "string" ? string : O["type"] extends "boolean" ? boolean : string | boolean, + string | boolean + >; + type ApplyOptionalModifiers> = ( + & { -readonly [LongOption in keyof O]?: V[LongOption] } + & { [LongOption in keyof O as O[LongOption]["default"] extends {} ? LongOption : never]: V[LongOption] } + ) extends infer P ? { [K in keyof P]: P[K] } : never; // resolve intersection to object + type ParsedValues = + & IfDefaultsTrue + & (T["options"] extends ParseArgsOptionsConfig ? ApplyOptionalModifiers< + T["options"], + { + [LongOption in keyof T["options"]]: IfDefaultsFalse< + T["options"][LongOption]["multiple"], + Array>, + ExtractOptionValue + >; + } + > + : {}); + type ParsedPositionals = IfDefaultsTrue< + T["strict"], + IfDefaultsFalse, + IfDefaultsTrue + >; + type PreciseTokenForOptions< + K extends string, + O extends ParseArgsOptionDescriptor, + > = O["type"] extends "string" ? { + kind: "option"; + index: number; + name: K; + rawName: string; + value: string; + inlineValue: boolean; + } + : O["type"] extends "boolean" ? { + kind: "option"; + index: number; + name: K; + rawName: string; + value: undefined; + inlineValue: undefined; + } + : OptionToken & { name: K }; + type TokenForOptions< + T extends ParseArgsConfig, + K extends keyof T["options"] = keyof T["options"], + > = K extends unknown + ? T["options"] extends ParseArgsOptionsConfig ? PreciseTokenForOptions + : OptionToken + : never; + type ParsedOptionToken = IfDefaultsTrue, OptionToken>; + type ParsedPositionalToken = IfDefaultsTrue< + T["strict"], + IfDefaultsFalse, + IfDefaultsTrue + >; + type ParsedTokens = Array< + ParsedOptionToken | ParsedPositionalToken | { kind: "option-terminator"; index: number } + >; + type PreciseParsedResults = IfDefaultsFalse< + T["tokens"], + { + values: ParsedValues; + positionals: ParsedPositionals; + tokens: ParsedTokens; + }, + { + values: ParsedValues; + positionals: ParsedPositionals; + } + >; + type OptionToken = + | { kind: "option"; index: number; name: string; rawName: string; value: string; inlineValue: boolean } + | { + kind: "option"; + index: number; + name: string; + rawName: string; + value: undefined; + inlineValue: undefined; + }; + type Token = + | OptionToken + | { kind: "positional"; index: number; value: string } + | { kind: "option-terminator"; index: number }; + // If ParseArgsConfig extends T, then the user passed config constructed elsewhere. + // So we can't rely on the `"not definitely present" implies "definitely not present"` assumption mentioned above. + type ParsedResults = ParseArgsConfig extends T ? { + values: { + [longOption: string]: undefined | string | boolean | Array; + }; + positionals: string[]; + tokens?: Token[]; + } + : PreciseParsedResults; + /** + * An implementation of [the MIMEType class](https://bmeck.github.io/node-proposal-mime-api/). + * + * In accordance with browser conventions, all properties of `MIMEType` objects + * are implemented as getters and setters on the class prototype, rather than as + * data properties on the object itself. + * + * A MIME string is a structured string containing multiple meaningful + * components. When parsed, a `MIMEType` object is returned containing + * properties for each of these components. + * @since v19.1.0, v18.13.0 + */ + export class MIMEType { + /** + * Creates a new MIMEType object by parsing the input. + * + * A `TypeError` will be thrown if the `input` is not a valid MIME. + * Note that an effort will be made to coerce the given values into strings. + * @param input The input MIME to parse. + */ + constructor(input: string | { toString: () => string }); + /** + * Gets and sets the type portion of the MIME. + * + * ```js + * import { MIMEType } from 'node:util'; + * + * const myMIME = new MIMEType('text/javascript'); + * console.log(myMIME.type); + * // Prints: text + * myMIME.type = 'application'; + * console.log(myMIME.type); + * // Prints: application + * console.log(String(myMIME)); + * // Prints: application/javascript + * ``` + */ + type: string; + /** + * Gets and sets the subtype portion of the MIME. + * + * ```js + * import { MIMEType } from 'node:util'; + * + * const myMIME = new MIMEType('text/ecmascript'); + * console.log(myMIME.subtype); + * // Prints: ecmascript + * myMIME.subtype = 'javascript'; + * console.log(myMIME.subtype); + * // Prints: javascript + * console.log(String(myMIME)); + * // Prints: text/javascript + * ``` + */ + subtype: string; + /** + * Gets the essence of the MIME. This property is read only. + * Use `mime.type` or `mime.subtype` to alter the MIME. + * + * ```js + * import { MIMEType } from 'node:util'; + * + * const myMIME = new MIMEType('text/javascript;key=value'); + * console.log(myMIME.essence); + * // Prints: text/javascript + * myMIME.type = 'application'; + * console.log(myMIME.essence); + * // Prints: application/javascript + * console.log(String(myMIME)); + * // Prints: application/javascript;key=value + * ``` + */ + readonly essence: string; + /** + * Gets the `MIMEParams` object representing the + * parameters of the MIME. This property is read-only. See `MIMEParams` documentation for details. + */ + readonly params: MIMEParams; + /** + * The `toString()` method on the `MIMEType` object returns the serialized MIME. + * + * Because of the need for standard compliance, this method does not allow users + * to customize the serialization process of the MIME. + */ + toString(): string; + } + /** + * The `MIMEParams` API provides read and write access to the parameters of a `MIMEType`. + * @since v19.1.0, v18.13.0 + */ + export class MIMEParams { + /** + * Remove all name-value pairs whose name is `name`. + */ + delete(name: string): void; + /** + * Returns an iterator over each of the name-value pairs in the parameters. + * Each item of the iterator is a JavaScript `Array`. The first item of the array + * is the `name`, the second item of the array is the `value`. + */ + entries(): NodeJS.Iterator<[name: string, value: string]>; + /** + * Returns the value of the first name-value pair whose name is `name`. If there + * are no such pairs, `null` is returned. + * @return or `null` if there is no name-value pair with the given `name`. + */ + get(name: string): string | null; + /** + * Returns `true` if there is at least one name-value pair whose name is `name`. + */ + has(name: string): boolean; + /** + * Returns an iterator over the names of each name-value pair. + * + * ```js + * import { MIMEType } from 'node:util'; + * + * const { params } = new MIMEType('text/plain;foo=0;bar=1'); + * for (const name of params.keys()) { + * console.log(name); + * } + * // Prints: + * // foo + * // bar + * ``` + */ + keys(): NodeJS.Iterator; + /** + * Sets the value in the `MIMEParams` object associated with `name` to `value`. If there are any pre-existing name-value pairs whose names are `name`, + * set the first such pair's value to `value`. + * + * ```js + * import { MIMEType } from 'node:util'; + * + * const { params } = new MIMEType('text/plain;foo=0;bar=1'); + * params.set('foo', 'def'); + * params.set('baz', 'xyz'); + * console.log(params.toString()); + * // Prints: foo=def;bar=1;baz=xyz + * ``` + */ + set(name: string, value: string): void; + /** + * Returns an iterator over the values of each name-value pair. + */ + values(): NodeJS.Iterator; + /** + * Returns an iterator over each of the name-value pairs in the parameters. + */ + [Symbol.iterator](): NodeJS.Iterator<[name: string, value: string]>; + } + // #region web types + export interface TextDecodeOptions { + stream?: boolean; + } + export interface TextDecoderCommon { + readonly encoding: string; + readonly fatal: boolean; + readonly ignoreBOM: boolean; + } + export interface TextDecoderOptions { + fatal?: boolean; + ignoreBOM?: boolean; + } + export interface TextEncoderCommon { + readonly encoding: string; + } + export interface TextEncoderEncodeIntoResult { + read: number; + written: number; + } + export interface TextDecoder extends TextDecoderCommon { + decode(input?: NodeJS.AllowSharedBufferSource, options?: TextDecodeOptions): string; + } + export var TextDecoder: { + prototype: TextDecoder; + new(label?: string, options?: TextDecoderOptions): TextDecoder; + }; + export interface TextEncoder extends TextEncoderCommon { + encode(input?: string): NodeJS.NonSharedUint8Array; + encodeInto(source: string, destination: Uint8Array): TextEncoderEncodeIntoResult; + } + export var TextEncoder: { + prototype: TextEncoder; + new(): TextEncoder; + }; + // #endregion +} +declare module "util" { + export * from "node:util"; +} diff --git a/node_modules/@types/node/util/types.d.ts b/node_modules/@types/node/util/types.d.ts new file mode 100644 index 0000000..174c0fa --- /dev/null +++ b/node_modules/@types/node/util/types.d.ts @@ -0,0 +1,558 @@ +declare module "node:util/types" { + import { KeyObject, webcrypto } from "node:crypto"; + /** + * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) or + * [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance. + * + * See also `util.types.isArrayBuffer()` and `util.types.isSharedArrayBuffer()`. + * + * ```js + * util.types.isAnyArrayBuffer(new ArrayBuffer()); // Returns true + * util.types.isAnyArrayBuffer(new SharedArrayBuffer()); // Returns true + * ``` + * @since v10.0.0 + */ + function isAnyArrayBuffer(object: unknown): object is ArrayBufferLike; + /** + * Returns `true` if the value is an `arguments` object. + * + * ```js + * function foo() { + * util.types.isArgumentsObject(arguments); // Returns true + * } + * ``` + * @since v10.0.0 + */ + function isArgumentsObject(object: unknown): object is IArguments; + /** + * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instance. + * This does _not_ include [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instances. Usually, it is + * desirable to test for both; See `util.types.isAnyArrayBuffer()` for that. + * + * ```js + * util.types.isArrayBuffer(new ArrayBuffer()); // Returns true + * util.types.isArrayBuffer(new SharedArrayBuffer()); // Returns false + * ``` + * @since v10.0.0 + */ + function isArrayBuffer(object: unknown): object is ArrayBuffer; + /** + * Returns `true` if the value is an instance of one of the [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) views, such as typed + * array objects or [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView). Equivalent to + * [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView). + * + * ```js + * util.types.isArrayBufferView(new Int8Array()); // true + * util.types.isArrayBufferView(Buffer.from('hello world')); // true + * util.types.isArrayBufferView(new DataView(new ArrayBuffer(16))); // true + * util.types.isArrayBufferView(new ArrayBuffer()); // false + * ``` + * @since v10.0.0 + */ + function isArrayBufferView(object: unknown): object is NodeJS.ArrayBufferView; + /** + * Returns `true` if the value is an [async function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function). + * This only reports back what the JavaScript engine is seeing; + * in particular, the return value may not match the original source code if + * a transpilation tool was used. + * + * ```js + * util.types.isAsyncFunction(function foo() {}); // Returns false + * util.types.isAsyncFunction(async function foo() {}); // Returns true + * ``` + * @since v10.0.0 + */ + function isAsyncFunction(object: unknown): boolean; + /** + * Returns `true` if the value is a `BigInt64Array` instance. + * + * ```js + * util.types.isBigInt64Array(new BigInt64Array()); // Returns true + * util.types.isBigInt64Array(new BigUint64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isBigInt64Array(value: unknown): value is BigInt64Array; + /** + * Returns `true` if the value is a BigInt object, e.g. created + * by `Object(BigInt(123))`. + * + * ```js + * util.types.isBigIntObject(Object(BigInt(123))); // Returns true + * util.types.isBigIntObject(BigInt(123)); // Returns false + * util.types.isBigIntObject(123); // Returns false + * ``` + * @since v10.4.0 + */ + function isBigIntObject(object: unknown): object is BigInt; + /** + * Returns `true` if the value is a `BigUint64Array` instance. + * + * ```js + * util.types.isBigUint64Array(new BigInt64Array()); // Returns false + * util.types.isBigUint64Array(new BigUint64Array()); // Returns true + * ``` + * @since v10.0.0 + */ + function isBigUint64Array(value: unknown): value is BigUint64Array; + /** + * Returns `true` if the value is a boolean object, e.g. created + * by `new Boolean()`. + * + * ```js + * util.types.isBooleanObject(false); // Returns false + * util.types.isBooleanObject(true); // Returns false + * util.types.isBooleanObject(new Boolean(false)); // Returns true + * util.types.isBooleanObject(new Boolean(true)); // Returns true + * util.types.isBooleanObject(Boolean(false)); // Returns false + * util.types.isBooleanObject(Boolean(true)); // Returns false + * ``` + * @since v10.0.0 + */ + function isBooleanObject(object: unknown): object is Boolean; + /** + * Returns `true` if the value is any boxed primitive object, e.g. created + * by `new Boolean()`, `new String()` or `Object(Symbol())`. + * + * For example: + * + * ```js + * util.types.isBoxedPrimitive(false); // Returns false + * util.types.isBoxedPrimitive(new Boolean(false)); // Returns true + * util.types.isBoxedPrimitive(Symbol('foo')); // Returns false + * util.types.isBoxedPrimitive(Object(Symbol('foo'))); // Returns true + * util.types.isBoxedPrimitive(Object(BigInt(5))); // Returns true + * ``` + * @since v10.11.0 + */ + function isBoxedPrimitive(object: unknown): object is String | Number | BigInt | Boolean | Symbol; + /** + * Returns `true` if the value is a built-in [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView) instance. + * + * ```js + * const ab = new ArrayBuffer(20); + * util.types.isDataView(new DataView(ab)); // Returns true + * util.types.isDataView(new Float64Array()); // Returns false + * ``` + * + * See also [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView). + * @since v10.0.0 + */ + function isDataView(object: unknown): object is DataView; + /** + * Returns `true` if the value is a built-in [`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) instance. + * + * ```js + * util.types.isDate(new Date()); // Returns true + * ``` + * @since v10.0.0 + */ + function isDate(object: unknown): object is Date; + /** + * Returns `true` if the value is a native `External` value. + * + * A native `External` value is a special type of object that contains a + * raw C++ pointer (`void*`) for access from native code, and has no other + * properties. Such objects are created either by Node.js internals or native + * addons. In JavaScript, they are + * [frozen](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze) objects with a + * `null` prototype. + * + * ```c + * #include + * #include + * napi_value result; + * static napi_value MyNapi(napi_env env, napi_callback_info info) { + * int* raw = (int*) malloc(1024); + * napi_status status = napi_create_external(env, (void*) raw, NULL, NULL, &result); + * if (status != napi_ok) { + * napi_throw_error(env, NULL, "napi_create_external failed"); + * return NULL; + * } + * return result; + * } + * ... + * DECLARE_NAPI_PROPERTY("myNapi", MyNapi) + * ... + * ``` + * + * ```js + * import native from 'napi_addon.node'; + * import { types } from 'node:util'; + * + * const data = native.myNapi(); + * types.isExternal(data); // returns true + * types.isExternal(0); // returns false + * types.isExternal(new String('foo')); // returns false + * ``` + * + * For further information on `napi_create_external`, refer to + * [`napi_create_external()`](https://nodejs.org/docs/latest-v26.x/api/n-api.html#napi_create_external). + * @since v10.0.0 + */ + function isExternal(object: unknown): boolean; + /** + * Returns `true` if the value is a built-in [`Float16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float16Array) instance. + * + * ```js + * util.types.isFloat16Array(new ArrayBuffer()); // Returns false + * util.types.isFloat16Array(new Float16Array()); // Returns true + * util.types.isFloat16Array(new Float32Array()); // Returns false + * ``` + * @since v24.0.0 + */ + function isFloat16Array(object: unknown): object is Float16Array; + /** + * Returns `true` if the value is a built-in [`Float32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array) instance. + * + * ```js + * util.types.isFloat32Array(new ArrayBuffer()); // Returns false + * util.types.isFloat32Array(new Float32Array()); // Returns true + * util.types.isFloat32Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isFloat32Array(object: unknown): object is Float32Array; + /** + * Returns `true` if the value is a built-in [`Float64Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array) instance. + * + * ```js + * util.types.isFloat64Array(new ArrayBuffer()); // Returns false + * util.types.isFloat64Array(new Uint8Array()); // Returns false + * util.types.isFloat64Array(new Float64Array()); // Returns true + * ``` + * @since v10.0.0 + */ + function isFloat64Array(object: unknown): object is Float64Array; + /** + * Returns `true` if the value is a generator function. + * This only reports back what the JavaScript engine is seeing; + * in particular, the return value may not match the original source code if + * a transpilation tool was used. + * + * ```js + * util.types.isGeneratorFunction(function foo() {}); // Returns false + * util.types.isGeneratorFunction(function* foo() {}); // Returns true + * ``` + * @since v10.0.0 + */ + function isGeneratorFunction(object: unknown): object is GeneratorFunction; + /** + * Returns `true` if the value is a generator object as returned from a + * built-in generator function. + * This only reports back what the JavaScript engine is seeing; + * in particular, the return value may not match the original source code if + * a transpilation tool was used. + * + * ```js + * function* foo() {} + * const generator = foo(); + * util.types.isGeneratorObject(generator); // Returns true + * ``` + * @since v10.0.0 + */ + function isGeneratorObject(object: unknown): object is Generator; + /** + * Returns `true` if the value is a built-in [`Int8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array) instance. + * + * ```js + * util.types.isInt8Array(new ArrayBuffer()); // Returns false + * util.types.isInt8Array(new Int8Array()); // Returns true + * util.types.isInt8Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isInt8Array(object: unknown): object is Int8Array; + /** + * Returns `true` if the value is a built-in [`Int16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array) instance. + * + * ```js + * util.types.isInt16Array(new ArrayBuffer()); // Returns false + * util.types.isInt16Array(new Int16Array()); // Returns true + * util.types.isInt16Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isInt16Array(object: unknown): object is Int16Array; + /** + * Returns `true` if the value is a built-in [`Int32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array) instance. + * + * ```js + * util.types.isInt32Array(new ArrayBuffer()); // Returns false + * util.types.isInt32Array(new Int32Array()); // Returns true + * util.types.isInt32Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isInt32Array(object: unknown): object is Int32Array; + /** + * Returns `true` if the value is a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance. + * + * ```js + * util.types.isMap(new Map()); // Returns true + * ``` + * @since v10.0.0 + */ + function isMap( + object: T | {}, + ): object is T extends ReadonlyMap ? (unknown extends T ? never : ReadonlyMap) + : Map; + /** + * Returns `true` if the value is an iterator returned for a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance. + * + * ```js + * const map = new Map(); + * util.types.isMapIterator(map.keys()); // Returns true + * util.types.isMapIterator(map.values()); // Returns true + * util.types.isMapIterator(map.entries()); // Returns true + * util.types.isMapIterator(map[Symbol.iterator]()); // Returns true + * ``` + * @since v10.0.0 + */ + function isMapIterator(object: unknown): boolean; + /** + * Returns `true` if the value is an instance of a [Module Namespace Object](https://tc39.github.io/ecma262/#sec-module-namespace-exotic-objects). + * + * ```js + * import * as ns from './a.js'; + * + * util.types.isModuleNamespaceObject(ns); // Returns true + * ``` + * @since v10.0.0 + */ + function isModuleNamespaceObject(value: unknown): boolean; + /** + * Returns `true` if the value was returned by the constructor of a + * [built-in `Error` type](https://tc39.es/ecma262/#sec-error-objects). + * + * ```js + * console.log(util.types.isNativeError(new Error())); // true + * console.log(util.types.isNativeError(new TypeError())); // true + * console.log(util.types.isNativeError(new RangeError())); // true + * ``` + * + * Subclasses of the native error types are also native errors: + * + * ```js + * class MyError extends Error {} + * console.log(util.types.isNativeError(new MyError())); // true + * ``` + * + * A value being `instanceof` a native error class is not equivalent to `isNativeError()` + * returning `true` for that value. `isNativeError()` returns `true` for errors + * which come from a different [realm](https://tc39.es/ecma262/#realm) while `instanceof Error` returns `false` + * for these errors: + * + * ```js + * import { createContext, runInContext } from 'node:vm'; + * import { types } from 'node:util'; + * + * const context = createContext({}); + * const myError = runInContext('new Error()', context); + * console.log(types.isNativeError(myError)); // true + * console.log(myError instanceof Error); // false + * ``` + * + * Conversely, `isNativeError()` returns `false` for all objects which were not + * returned by the constructor of a native error. That includes values + * which are `instanceof` native errors: + * + * ```js + * const myError = { __proto__: Error.prototype }; + * console.log(util.types.isNativeError(myError)); // false + * console.log(myError instanceof Error); // true + * ``` + * @since v10.0.0 + * @deprecated The `util.types.isNativeError` API is deprecated. Please use `Error.isError` instead. + */ + function isNativeError(object: unknown): object is Error; + /** + * Returns `true` if the value is a number object, e.g. created + * by `new Number()`. + * + * ```js + * util.types.isNumberObject(0); // Returns false + * util.types.isNumberObject(new Number(0)); // Returns true + * ``` + * @since v10.0.0 + */ + function isNumberObject(object: unknown): object is Number; + /** + * Returns `true` if the value is a built-in [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). + * + * ```js + * util.types.isPromise(Promise.resolve(42)); // Returns true + * ``` + * @since v10.0.0 + */ + function isPromise(object: unknown): object is Promise; + /** + * Returns `true` if the value is a [`Proxy`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) instance. + * + * ```js + * const target = {}; + * const proxy = new Proxy(target, {}); + * util.types.isProxy(target); // Returns false + * util.types.isProxy(proxy); // Returns true + * ``` + * @since v10.0.0 + */ + function isProxy(object: unknown): boolean; + /** + * Returns `true` if the value is a regular expression object. + * + * ```js + * util.types.isRegExp(/abc/); // Returns true + * util.types.isRegExp(new RegExp('abc')); // Returns true + * ``` + * @since v10.0.0 + */ + function isRegExp(object: unknown): object is RegExp; + /** + * Returns `true` if the value is a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance. + * + * ```js + * util.types.isSet(new Set()); // Returns true + * ``` + * @since v10.0.0 + */ + function isSet( + object: T | {}, + ): object is T extends ReadonlySet ? (unknown extends T ? never : ReadonlySet) : Set; + /** + * Returns `true` if the value is an iterator returned for a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance. + * + * ```js + * const set = new Set(); + * util.types.isSetIterator(set.keys()); // Returns true + * util.types.isSetIterator(set.values()); // Returns true + * util.types.isSetIterator(set.entries()); // Returns true + * util.types.isSetIterator(set[Symbol.iterator]()); // Returns true + * ``` + * @since v10.0.0 + */ + function isSetIterator(object: unknown): boolean; + /** + * Returns `true` if the value is a built-in [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance. + * This does _not_ include [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instances. Usually, it is + * desirable to test for both; See `util.types.isAnyArrayBuffer()` for that. + * + * ```js + * util.types.isSharedArrayBuffer(new ArrayBuffer()); // Returns false + * util.types.isSharedArrayBuffer(new SharedArrayBuffer()); // Returns true + * ``` + * @since v10.0.0 + */ + function isSharedArrayBuffer(object: unknown): object is SharedArrayBuffer; + /** + * Returns `true` if the value is a string object, e.g. created + * by `new String()`. + * + * ```js + * util.types.isStringObject('foo'); // Returns false + * util.types.isStringObject(new String('foo')); // Returns true + * ``` + * @since v10.0.0 + */ + function isStringObject(object: unknown): object is String; + /** + * Returns `true` if the value is a symbol object, created + * by calling `Object()` on a `Symbol` primitive. + * + * ```js + * const symbol = Symbol('foo'); + * util.types.isSymbolObject(symbol); // Returns false + * util.types.isSymbolObject(Object(symbol)); // Returns true + * ``` + * @since v10.0.0 + */ + function isSymbolObject(object: unknown): object is Symbol; + /** + * Returns `true` if the value is a built-in [`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) instance. + * + * ```js + * util.types.isTypedArray(new ArrayBuffer()); // Returns false + * util.types.isTypedArray(new Uint8Array()); // Returns true + * util.types.isTypedArray(new Float64Array()); // Returns true + * ``` + * + * See also [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView). + * @since v10.0.0 + */ + function isTypedArray(object: unknown): object is NodeJS.TypedArray; + /** + * Returns `true` if the value is a built-in [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) instance. + * + * ```js + * util.types.isUint8Array(new ArrayBuffer()); // Returns false + * util.types.isUint8Array(new Uint8Array()); // Returns true + * util.types.isUint8Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isUint8Array(object: unknown): object is Uint8Array; + /** + * Returns `true` if the value is a built-in [`Uint8ClampedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray) instance. + * + * ```js + * util.types.isUint8ClampedArray(new ArrayBuffer()); // Returns false + * util.types.isUint8ClampedArray(new Uint8ClampedArray()); // Returns true + * util.types.isUint8ClampedArray(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isUint8ClampedArray(object: unknown): object is Uint8ClampedArray; + /** + * Returns `true` if the value is a built-in [`Uint16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array) instance. + * + * ```js + * util.types.isUint16Array(new ArrayBuffer()); // Returns false + * util.types.isUint16Array(new Uint16Array()); // Returns true + * util.types.isUint16Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isUint16Array(object: unknown): object is Uint16Array; + /** + * Returns `true` if the value is a built-in [`Uint32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array) instance. + * + * ```js + * util.types.isUint32Array(new ArrayBuffer()); // Returns false + * util.types.isUint32Array(new Uint32Array()); // Returns true + * util.types.isUint32Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isUint32Array(object: unknown): object is Uint32Array; + /** + * Returns `true` if the value is a built-in [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) instance. + * + * ```js + * util.types.isWeakMap(new WeakMap()); // Returns true + * ``` + * @since v10.0.0 + */ + function isWeakMap(object: unknown): object is WeakMap; + /** + * Returns `true` if the value is a built-in [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) instance. + * + * ```js + * util.types.isWeakSet(new WeakSet()); // Returns true + * ``` + * @since v10.0.0 + */ + function isWeakSet(object: unknown): object is WeakSet; + /** + * Returns `true` if `value` is a `KeyObject`, `false` otherwise. + * @since v16.2.0 + */ + function isKeyObject(object: unknown): object is KeyObject; + /** + * Returns `true` if `value` is a `CryptoKey`, `false` otherwise. + * @since v16.2.0 + */ + function isCryptoKey(object: unknown): object is webcrypto.CryptoKey; +} +declare module "util/types" { + export * from "node:util/types"; +} diff --git a/node_modules/@types/node/v8.d.ts b/node_modules/@types/node/v8.d.ts new file mode 100644 index 0000000..ed5c7b1 --- /dev/null +++ b/node_modules/@types/node/v8.d.ts @@ -0,0 +1,1059 @@ +declare module "node:v8" { + import { NonSharedBuffer } from "node:buffer"; + import { Readable } from "node:stream"; + interface HeapSpaceInfo { + space_name: string; + space_size: number; + space_used_size: number; + space_available_size: number; + physical_space_size: number; + } + // ** Signifies if the --zap_code_space option is enabled or not. 1 == enabled, 0 == disabled. */ + type DoesZapCodeSpaceFlag = 0 | 1; + interface HeapInfo { + total_heap_size: number; + total_heap_size_executable: number; + total_physical_size: number; + total_available_size: number; + used_heap_size: number; + heap_size_limit: number; + malloced_memory: number; + peak_malloced_memory: number; + does_zap_garbage: DoesZapCodeSpaceFlag; + number_of_native_contexts: number; + number_of_detached_contexts: number; + total_global_handles_size: number; + used_global_handles_size: number; + external_memory: number; + total_allocated_bytes: number; + } + interface HeapCodeStatistics { + code_and_metadata_size: number; + bytecode_and_metadata_size: number; + external_script_source_size: number; + } + interface HeapSnapshotOptions { + /** + * If true, expose internals in the heap snapshot. + * @default false + */ + exposeInternals?: boolean | undefined; + /** + * If true, expose numeric values in artificial fields. + * @default false + */ + exposeNumericValues?: boolean | undefined; + } + /** + * Returns an integer representing a version tag derived from the V8 version, + * command-line flags, and detected CPU features. This is useful for determining + * whether a `vm.Script` `cachedData` buffer is compatible with this instance + * of V8. + * + * ```js + * console.log(v8.cachedDataVersionTag()); // 3947234607 + * // The value returned by v8.cachedDataVersionTag() is derived from the V8 + * // version, command-line flags, and detected CPU features. Test that the value + * // does indeed update when flags are toggled. + * v8.setFlagsFromString('--allow_natives_syntax'); + * console.log(v8.cachedDataVersionTag()); // 183726201 + * ``` + * @since v8.0.0 + */ + function cachedDataVersionTag(): number; + /** + * Returns an object with the following properties: + * + * `does_zap_garbage` is a 0/1 boolean, which signifies whether the `--zap_code_space` option is enabled or not. This makes V8 overwrite heap + * garbage with a bit pattern. The RSS footprint (resident set size) gets bigger + * because it continuously touches all heap pages and that makes them less likely + * to get swapped out by the operating system. + * + * `number_of_native_contexts` The value of native\_context is the number of the + * top-level contexts currently active. Increase of this number over time indicates + * a memory leak. + * + * `number_of_detached_contexts` The value of detached\_context is the number + * of contexts that were detached and not yet garbage collected. This number + * being non-zero indicates a potential memory leak. + * + * `total_global_handles_size` The value of total\_global\_handles\_size is the + * total memory size of V8 global handles. + * + * `used_global_handles_size` The value of used\_global\_handles\_size is the + * used memory size of V8 global handles. + * + * `external_memory` The value of external\_memory is the memory size of array + * buffers and external strings. + * + * `total_allocated_bytes` The value of total allocated bytes since the Isolate + * creation. + * + * ```json + * { + * "total_heap_size": 7326976, + * "total_heap_size_executable": 4194304, + * "total_physical_size": 7326976, + * "total_available_size": 1152656, + * "used_heap_size": 3476208, + * "heap_size_limit": 1535115264, + * "malloced_memory": 16384, + * "peak_malloced_memory": 1127496, + * "does_zap_garbage": 0, + * "number_of_native_contexts": 1, + * "number_of_detached_contexts": 0, + * "total_global_handles_size": 8192, + * "used_global_handles_size": 3296, + * "external_memory": 318824 + * } + * ``` + * @since v1.0.0 + */ + function getHeapStatistics(): HeapInfo; + /** + * It returns an object with a structure similar to the + * [`cppgc::HeapStatistics`](https://v8docs.nodesource.com/node-22.4/d7/d51/heap-statistics_8h_source.html) + * object. See the [V8 documentation](https://v8docs.nodesource.com/node-22.4/df/d2f/structcppgc_1_1_heap_statistics.html) + * for more information about the properties of the object. + * + * ```js + * // Detailed + * ({ + * committed_size_bytes: 131072, + * resident_size_bytes: 131072, + * used_size_bytes: 152, + * space_statistics: [ + * { + * name: 'NormalPageSpace0', + * committed_size_bytes: 0, + * resident_size_bytes: 0, + * used_size_bytes: 0, + * page_stats: [{}], + * free_list_stats: {}, + * }, + * { + * name: 'NormalPageSpace1', + * committed_size_bytes: 131072, + * resident_size_bytes: 131072, + * used_size_bytes: 152, + * page_stats: [{}], + * free_list_stats: {}, + * }, + * { + * name: 'NormalPageSpace2', + * committed_size_bytes: 0, + * resident_size_bytes: 0, + * used_size_bytes: 0, + * page_stats: [{}], + * free_list_stats: {}, + * }, + * { + * name: 'NormalPageSpace3', + * committed_size_bytes: 0, + * resident_size_bytes: 0, + * used_size_bytes: 0, + * page_stats: [{}], + * free_list_stats: {}, + * }, + * { + * name: 'LargePageSpace', + * committed_size_bytes: 0, + * resident_size_bytes: 0, + * used_size_bytes: 0, + * page_stats: [{}], + * free_list_stats: {}, + * }, + * ], + * type_names: [], + * detail_level: 'detailed', + * }); + * ``` + * + * ```js + * // Brief + * ({ + * committed_size_bytes: 131072, + * resident_size_bytes: 131072, + * used_size_bytes: 128864, + * space_statistics: [], + * type_names: [], + * detail_level: 'brief', + * }); + * ``` + * @since v22.15.0 + * @param detailLevel **Default:** `'detailed'`. Specifies the level of detail in the returned statistics. + * Accepted values are: + * * `'brief'`: Brief statistics contain only the top-level + * allocated and used + * memory statistics for the entire heap. + * * `'detailed'`: Detailed statistics also contain a break + * down per space and page, as well as freelist statistics + * and object type histograms. + */ + function getCppHeapStatistics(detailLevel?: "brief" | "detailed"): object; + /** + * Returns statistics about the V8 heap spaces, i.e. the segments which make up + * the V8 heap. Neither the ordering of heap spaces, nor the availability of a + * heap space can be guaranteed as the statistics are provided via the + * V8 [`GetHeapSpaceStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#ac673576f24fdc7a33378f8f57e1d13a4) function and may change from one V8 version to the + * next. + * + * The value returned is an array of objects containing the following properties: + * + * ```json + * [ + * { + * "space_name": "new_space", + * "space_size": 2063872, + * "space_used_size": 951112, + * "space_available_size": 80824, + * "physical_space_size": 2063872 + * }, + * { + * "space_name": "old_space", + * "space_size": 3090560, + * "space_used_size": 2493792, + * "space_available_size": 0, + * "physical_space_size": 3090560 + * }, + * { + * "space_name": "code_space", + * "space_size": 1260160, + * "space_used_size": 644256, + * "space_available_size": 960, + * "physical_space_size": 1260160 + * }, + * { + * "space_name": "map_space", + * "space_size": 1094160, + * "space_used_size": 201608, + * "space_available_size": 0, + * "physical_space_size": 1094160 + * }, + * { + * "space_name": "large_object_space", + * "space_size": 0, + * "space_used_size": 0, + * "space_available_size": 1490980608, + * "physical_space_size": 0 + * } + * ] + * ``` + * @since v6.0.0 + */ + function getHeapSpaceStatistics(): HeapSpaceInfo[]; + /** + * The `v8.setFlagsFromString()` method can be used to programmatically set + * V8 command-line flags. This method should be used with care. Changing settings + * after the VM has started may result in unpredictable behavior, including + * crashes and data loss; or it may simply do nothing. + * + * The V8 options available for a version of Node.js may be determined by running `node --v8-options`. + * + * Usage: + * + * ```js + * // Print GC events to stdout for one minute. + * import v8 from 'node:v8'; + * v8.setFlagsFromString('--trace_gc'); + * setTimeout(() => { v8.setFlagsFromString('--notrace_gc'); }, 60e3); + * ``` + * @since v1.0.0 + */ + function setFlagsFromString(flags: string): void; + /** + * This is similar to the [`queryObjects()` console API](https://developer.chrome.com/docs/devtools/console/utilities#queryObjects-function) + * provided by the Chromium DevTools console. It can be used to search for objects that have the matching constructor on its prototype chain + * in the heap after a full garbage collection, which can be useful for memory leak regression tests. To avoid surprising results, users should + * avoid using this API on constructors whose implementation they don't control, or on constructors that can be invoked by other parties in the + * application. + * + * To avoid accidental leaks, this API does not return raw references to the objects found. By default, it returns the count of the objects + * found. If `options.format` is `'summary'`, it returns an array containing brief string representations for each object. The visibility provided + * in this API is similar to what the heap snapshot provides, while users can save the cost of serialization and parsing and directly filter the + * target objects during the search. + * + * Only objects created in the current execution context are included in the results. + * + * ```js + * import { queryObjects } from 'node:v8'; + * class A { foo = 'bar'; } + * console.log(queryObjects(A)); // 0 + * const a = new A(); + * console.log(queryObjects(A)); // 1 + * // [ "A { foo: 'bar' }" ] + * console.log(queryObjects(A, { format: 'summary' })); + * + * class B extends A { bar = 'qux'; } + * const b = new B(); + * console.log(queryObjects(B)); // 1 + * // [ "B { foo: 'bar', bar: 'qux' }" ] + * console.log(queryObjects(B, { format: 'summary' })); + * + * // Note that, when there are child classes inheriting from a constructor, + * // the constructor also shows up in the prototype chain of the child + * // classes's prototoype, so the child classes's prototoype would also be + * // included in the result. + * console.log(queryObjects(A)); // 3 + * // [ "B { foo: 'bar', bar: 'qux' }", 'A {}', "A { foo: 'bar' }" ] + * console.log(queryObjects(A, { format: 'summary' })); + * ``` + * @param ctor The constructor that can be used to search on the prototype chain in order to filter target objects in the heap. + * @since v20.13.0 + */ + function queryObjects(ctor: Function): number | string[]; + function queryObjects(ctor: Function, options: { format: "count" }): number; + function queryObjects(ctor: Function, options: { format: "summary" }): string[]; + /** + * Generates a snapshot of the current V8 heap and returns a Readable + * Stream that may be used to read the JSON serialized representation. + * This JSON stream format is intended to be used with tools such as + * Chrome DevTools. The JSON schema is undocumented and specific to the + * V8 engine. Therefore, the schema may change from one version of V8 to the next. + * + * Creating a heap snapshot requires memory about twice the size of the heap at + * the time the snapshot is created. This results in the risk of OOM killers + * terminating the process. + * + * Generating a snapshot is a synchronous operation which blocks the event loop + * for a duration depending on the heap size. + * + * ```js + * // Print heap snapshot to the console + * import v8 from 'node:v8'; + * const stream = v8.getHeapSnapshot(); + * stream.pipe(process.stdout); + * ``` + * @since v11.13.0 + * @return A Readable containing the V8 heap snapshot. + */ + function getHeapSnapshot(options?: HeapSnapshotOptions): Readable; + /** + * Generates a snapshot of the current V8 heap and writes it to a JSON + * file. This file is intended to be used with tools such as Chrome + * DevTools. The JSON schema is undocumented and specific to the V8 + * engine, and may change from one version of V8 to the next. + * + * A heap snapshot is specific to a single V8 isolate. When using `worker threads`, a heap snapshot generated from the main thread will + * not contain any information about the workers, and vice versa. + * + * Creating a heap snapshot requires memory about twice the size of the heap at + * the time the snapshot is created. This results in the risk of OOM killers + * terminating the process. + * + * Generating a snapshot is a synchronous operation which blocks the event loop + * for a duration depending on the heap size. + * + * ```js + * import { writeHeapSnapshot } from 'node:v8'; + * import { + * Worker, + * isMainThread, + * parentPort, + * } from 'node:worker_threads'; + * + * if (isMainThread) { + * const worker = new Worker(__filename); + * + * worker.once('message', (filename) => { + * console.log(`worker heapdump: ${filename}`); + * // Now get a heapdump for the main thread. + * console.log(`main thread heapdump: ${writeHeapSnapshot()}`); + * }); + * + * // Tell the worker to create a heapdump. + * worker.postMessage('heapdump'); + * } else { + * parentPort.once('message', (message) => { + * if (message === 'heapdump') { + * // Generate a heapdump for the worker + * // and return the filename to the parent. + * parentPort.postMessage(writeHeapSnapshot()); + * } + * }); + * } + * ``` + * @since v11.13.0 + * @param filename The file path where the V8 heap snapshot is to be saved. If not specified, a file name with the pattern `'Heap-${yyyymmdd}-${hhmmss}-${pid}-${thread_id}.heapsnapshot'` will be + * generated, where `{pid}` will be the PID of the Node.js process, `{thread_id}` will be `0` when `writeHeapSnapshot()` is called from the main Node.js thread or the id of a + * worker thread. + * @return The filename where the snapshot was saved. + */ + function writeHeapSnapshot(filename?: string, options?: HeapSnapshotOptions): string; + /** + * Get statistics about code and its metadata in the heap, see + * V8 [`GetHeapCodeAndMetadataStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#a6079122af17612ef54ef3348ce170866) API. Returns an object with the + * following properties: + * + * ```json + * { + * "code_and_metadata_size": 212208, + * "bytecode_and_metadata_size": 161368, + * "external_script_source_size": 1410794, + * "cpu_profiler_metadata_size": 0 + * } + * ``` + * @since v12.8.0 + */ + function getHeapCodeStatistics(): HeapCodeStatistics; + /** + * @since v25.0.0 + */ + interface SyncCPUProfileHandle { + /** + * Stopping collecting the profile and return the profile data. + * @since v25.0.0 + */ + stop(): string; + /** + * Stopping collecting the profile and the profile will be discarded. + * @since v25.0.0 + */ + [Symbol.dispose](): void; + } + /** + * @since v26.1.0 + */ + interface SyncHeapProfileHandle { + /** + * Stopping collecting the profile and return the profile data. + * @since v26.1.0 + */ + stop(): string; + /** + * Stopping collecting the profile and the profile will be discarded. + * @since v26.1.0 + */ + [Symbol.dispose](): void; + } + /** + * @since v24.8.0 + */ + interface CPUProfileHandle { + /** + * Stopping collecting the profile, then return a Promise that fulfills with an error or the + * profile data. + * @since v24.8.0 + */ + stop(): Promise; + /** + * Stopping collecting the profile and the profile will be discarded. + * @since v24.8.0 + */ + [Symbol.asyncDispose](): Promise; + } + /** + * @since v24.9.0 + */ + interface HeapProfileHandle { + /** + * Stopping collecting the profile, then return a Promise that fulfills with an error or the + * profile data. + * @since v24.9.0 + */ + stop(): Promise; + /** + * Stopping collecting the profile and the profile will be discarded. + * @since v24.9.0 + */ + [Symbol.asyncDispose](): Promise; + } + interface CPUProfileOptions { + /** + * Requested sampling interval in milliseconds. **Default:** `0`. + */ + sampleInterval?: number | undefined; + /** + * Maximum number of samples to keep before older + * entries are discarded. **Default:** `4294967295`. + */ + maxBufferSize?: number | undefined; + } + /** + * Starting a CPU profile then return a `SyncCPUProfileHandle` object. + * This API supports `using` syntax. + * + * ```js + * const handle = v8.startCpuProfile({ sampleInterval: 1, maxBufferSize: 10_000 }); + * const profile = handle.stop(); + * console.log(profile); + * ``` + * @since v25.0.0 + */ + function startCpuProfile(options?: CPUProfileOptions): SyncCPUProfileHandle; + interface HeapProfileOptions { + /** + * The average sampling interval in bytes. + * **Default:** `524288` (512 KiB). + */ + sampleInterval?: number | undefined; + /** + * The maximum stack depth for samples. + * **Default:** `16`. + */ + stackDepth?: number | undefined; + /** + * Force garbage collection before taking the profile. + * **Default:** `false`. + */ + forceGC?: boolean | undefined; + /** + * Include objects collected + * by major GC. **Default:** `false`. + */ + includeObjectsCollectedByMajorGC?: boolean | undefined; + /** + * Include objects collected + * by minor GC. **Default:** `false`. + */ + includeObjectsCollectedByMinorGC?: boolean | undefined; + } + /** + * Starting a heap profile then return a `SyncHeapProfileHandle` object. + * This API supports `using` syntax. + * + * ```js + * import v8 from 'node:v8'; + * + * const handle = v8.startHeapProfile(); + * const profile = handle.stop(); + * console.log(profile); + * ``` + * + * With custom parameters: + * + * ```js + * import v8 from 'node:v8'; + * + * const handle = v8.startHeapProfile({ + * sampleInterval: 1024, + * stackDepth: 8, + * forceGC: true, + * includeObjectsCollectedByMajorGC: true, + * }); + * const profile = handle.stop(); + * console.log(profile); + * ``` + * @since v26.1.0 + */ + function startHeapProfile(options?: HeapProfileOptions): SyncHeapProfileHandle; + /** + * V8 only supports `Latin-1/ISO-8859-1` and `UTF16` as the underlying representation of a string. + * If the `content` uses `Latin-1/ISO-8859-1` as the underlying representation, this function will return true; + * otherwise, it returns false. + * + * If this method returns false, that does not mean that the string contains some characters not in `Latin-1/ISO-8859-1`. + * Sometimes a `Latin-1` string may also be represented as `UTF16`. + * + * ```js + * const { isStringOneByteRepresentation } = require('node:v8'); + * + * const Encoding = { + * latin1: 1, + * utf16le: 2, + * }; + * const buffer = Buffer.alloc(100); + * function writeString(input) { + * if (isStringOneByteRepresentation(input)) { + * buffer.writeUint8(Encoding.latin1); + * buffer.writeUint32LE(input.length, 1); + * buffer.write(input, 5, 'latin1'); + * } else { + * buffer.writeUint8(Encoding.utf16le); + * buffer.writeUint32LE(input.length * 2, 1); + * buffer.write(input, 5, 'utf16le'); + * } + * } + * writeString('hello'); + * writeString('你好'); + * ``` + * @since v23.10.0, v22.15.0 + */ + function isStringOneByteRepresentation(content: string): boolean; + /** + * @since v8.0.0 + */ + class Serializer { + /** + * Writes out a header, which includes the serialization format version. + */ + writeHeader(): void; + /** + * Serializes a JavaScript value and adds the serialized representation to the + * internal buffer. + * + * This throws an error if `value` cannot be serialized. + */ + writeValue(val: any): boolean; + /** + * Returns the stored internal buffer. This serializer should not be used once + * the buffer is released. Calling this method results in undefined behavior + * if a previous write has failed. + */ + releaseBuffer(): NonSharedBuffer; + /** + * Marks an `ArrayBuffer` as having its contents transferred out of band. + * Pass the corresponding `ArrayBuffer` in the deserializing context to `deserializer.transferArrayBuffer()`. + * @param id A 32-bit unsigned integer. + * @param arrayBuffer An `ArrayBuffer` instance. + */ + transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void; + /** + * Write a raw 32-bit unsigned integer. + * For use inside of a custom `serializer._writeHostObject()`. + */ + writeUint32(value: number): void; + /** + * Write a raw 64-bit unsigned integer, split into high and low 32-bit parts. + * For use inside of a custom `serializer._writeHostObject()`. + */ + writeUint64(hi: number, lo: number): void; + /** + * Write a JS `number` value. + * For use inside of a custom `serializer._writeHostObject()`. + */ + writeDouble(value: number): void; + /** + * Write raw bytes into the serializer's internal buffer. The deserializer + * will require a way to compute the length of the buffer. + * For use inside of a custom `serializer._writeHostObject()`. + */ + writeRawBytes(buffer: NodeJS.ArrayBufferView): void; + } + /** + * A subclass of `Serializer` that serializes `TypedArray`(in particular `Buffer`) and `DataView` objects as host objects, and only + * stores the part of their underlying `ArrayBuffer`s that they are referring to. + * @since v8.0.0 + */ + class DefaultSerializer extends Serializer {} + /** + * @since v8.0.0 + */ + class Deserializer { + constructor(data: NodeJS.TypedArray); + /** + * Reads and validates a header (including the format version). + * May, for example, reject an invalid or unsupported wire format. In that case, + * an `Error` is thrown. + */ + readHeader(): boolean; + /** + * Deserializes a JavaScript value from the buffer and returns it. + */ + readValue(): any; + /** + * Marks an `ArrayBuffer` as having its contents transferred out of band. + * Pass the corresponding `ArrayBuffer` in the serializing context to `serializer.transferArrayBuffer()` (or return the `id` from `serializer._getSharedArrayBufferId()` in the case of + * `SharedArrayBuffer`s). + * @param id A 32-bit unsigned integer. + * @param arrayBuffer An `ArrayBuffer` instance. + */ + transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void; + /** + * Reads the underlying wire format version. Likely mostly to be useful to + * legacy code reading old wire format versions. May not be called before `.readHeader()`. + */ + getWireFormatVersion(): number; + /** + * Read a raw 32-bit unsigned integer and return it. + * For use inside of a custom `deserializer._readHostObject()`. + */ + readUint32(): number; + /** + * Read a raw 64-bit unsigned integer and return it as an array `[hi, lo]` with two 32-bit unsigned integer entries. + * For use inside of a custom `deserializer._readHostObject()`. + */ + readUint64(): [number, number]; + /** + * Read a JS `number` value. + * For use inside of a custom `deserializer._readHostObject()`. + */ + readDouble(): number; + /** + * Read raw bytes from the deserializer's internal buffer. The `length` parameter + * must correspond to the length of the buffer that was passed to `serializer.writeRawBytes()`. + * For use inside of a custom `deserializer._readHostObject()`. + */ + readRawBytes(length: number): Buffer; + } + /** + * A subclass of `Deserializer` corresponding to the format written by `DefaultSerializer`. + * @since v8.0.0 + */ + class DefaultDeserializer extends Deserializer {} + /** + * Uses a `DefaultSerializer` to serialize `value` into a buffer. + * + * `ERR_BUFFER_TOO_LARGE` will be thrown when trying to + * serialize a huge object which requires buffer + * larger than `buffer.constants.MAX_LENGTH`. + * @since v8.0.0 + */ + function serialize(value: any): NonSharedBuffer; + /** + * Uses a `DefaultDeserializer` with default options to read a JS value + * from a buffer. + * @since v8.0.0 + * @param buffer A buffer returned by {@link serialize}. + */ + function deserialize(buffer: NodeJS.ArrayBufferView): any; + /** + * The `v8.takeCoverage()` method allows the user to write the coverage started by `NODE_V8_COVERAGE` to disk on demand. This method can be invoked multiple + * times during the lifetime of the process. Each time the execution counter will + * be reset and a new coverage report will be written to the directory specified + * by `NODE_V8_COVERAGE`. + * + * When the process is about to exit, one last coverage will still be written to + * disk unless {@link stopCoverage} is invoked before the process exits. + * @since v15.1.0, v14.18.0, v12.22.0 + */ + function takeCoverage(): void; + /** + * The `v8.stopCoverage()` method allows the user to stop the coverage collection + * started by `NODE_V8_COVERAGE`, so that V8 can release the execution count + * records and optimize code. This can be used in conjunction with {@link takeCoverage} if the user wants to collect the coverage on demand. + * @since v15.1.0, v14.18.0, v12.22.0 + */ + function stopCoverage(): void; + /** + * The API is a no-op if `--heapsnapshot-near-heap-limit` is already set from the command line or the API is called more than once. + * `limit` must be a positive integer. See [`--heapsnapshot-near-heap-limit`](https://nodejs.org/docs/latest-v26.x/api/cli.html#--heapsnapshot-near-heap-limitmax_count) for more information. + * @since v18.10.0, v16.18.0 + */ + function setHeapSnapshotNearHeapLimit(limit: number): void; + /** + * This API collects GC data in current thread. + * @since v19.6.0, v18.15.0 + */ + class GCProfiler { + /** + * Start collecting GC data. + * @since v19.6.0, v18.15.0 + */ + start(): void; + /** + * Stop collecting GC data and return an object. The content of object + * is as follows. + * + * ```json + * { + * "version": 1, + * "startTime": 1674059033862, + * "statistics": [ + * { + * "gcType": "Scavenge", + * "beforeGC": { + * "heapStatistics": { + * "totalHeapSize": 5005312, + * "totalHeapSizeExecutable": 524288, + * "totalPhysicalSize": 5226496, + * "totalAvailableSize": 4341325216, + * "totalGlobalHandlesSize": 8192, + * "usedGlobalHandlesSize": 2112, + * "usedHeapSize": 4883840, + * "heapSizeLimit": 4345298944, + * "mallocedMemory": 254128, + * "externalMemory": 225138, + * "peakMallocedMemory": 181760 + * }, + * "heapSpaceStatistics": [ + * { + * "spaceName": "read_only_space", + * "spaceSize": 0, + * "spaceUsedSize": 0, + * "spaceAvailableSize": 0, + * "physicalSpaceSize": 0 + * } + * ] + * }, + * "cost": 1574.14, + * "afterGC": { + * "heapStatistics": { + * "totalHeapSize": 6053888, + * "totalHeapSizeExecutable": 524288, + * "totalPhysicalSize": 5500928, + * "totalAvailableSize": 4341101384, + * "totalGlobalHandlesSize": 8192, + * "usedGlobalHandlesSize": 2112, + * "usedHeapSize": 4059096, + * "heapSizeLimit": 4345298944, + * "mallocedMemory": 254128, + * "externalMemory": 225138, + * "peakMallocedMemory": 181760 + * }, + * "heapSpaceStatistics": [ + * { + * "spaceName": "read_only_space", + * "spaceSize": 0, + * "spaceUsedSize": 0, + * "spaceAvailableSize": 0, + * "physicalSpaceSize": 0 + * } + * ] + * } + * } + * ], + * "endTime": 1674059036865 + * } + * ``` + * + * Here's an example. + * + * ```js + * import { GCProfiler } from 'node:v8'; + * const profiler = new GCProfiler(); + * profiler.start(); + * setTimeout(() => { + * console.log(profiler.stop()); + * }, 1000); + * ``` + * @since v19.6.0, v18.15.0 + */ + stop(): GCProfilerResult; + /** + * Stop collecting GC data, and discard the profile. + * @since v25.5.0 + */ + [Symbol.dispose](): void; + } + interface GCProfilerResult { + version: number; + startTime: number; + endTime: number; + statistics: Array<{ + gcType: string; + cost: number; + beforeGC: { + heapStatistics: HeapStatistics; + heapSpaceStatistics: HeapSpaceStatistics[]; + }; + afterGC: { + heapStatistics: HeapStatistics; + heapSpaceStatistics: HeapSpaceStatistics[]; + }; + }>; + } + interface HeapStatistics { + totalHeapSize: number; + totalHeapSizeExecutable: number; + totalPhysicalSize: number; + totalAvailableSize: number; + totalGlobalHandlesSize: number; + usedGlobalHandlesSize: number; + usedHeapSize: number; + heapSizeLimit: number; + mallocedMemory: number; + externalMemory: number; + peakMallocedMemory: number; + } + interface HeapSpaceStatistics { + spaceName: string; + spaceSize: number; + spaceUsedSize: number; + spaceAvailableSize: number; + physicalSpaceSize: number; + } + /** + * Called when a promise is constructed. This does not mean that corresponding before/after events will occur, only that the possibility exists. This will + * happen if a promise is created without ever getting a continuation. + * @since v17.1.0, v16.14.0 + * @param promise The promise being created. + * @param parent The promise continued from, if applicable. + */ + interface Init { + (promise: Promise, parent: Promise): void; + } + /** + * Called before a promise continuation executes. This can be in the form of `then()`, `catch()`, or `finally()` handlers or an await resuming. + * + * The before callback will be called 0 to N times. The before callback will typically be called 0 times if no continuation was ever made for the promise. + * The before callback may be called many times in the case where many continuations have been made from the same promise. + * @since v17.1.0, v16.14.0 + */ + interface Before { + (promise: Promise): void; + } + /** + * Called immediately after a promise continuation executes. This may be after a `then()`, `catch()`, or `finally()` handler or before an await after another await. + * @since v17.1.0, v16.14.0 + */ + interface After { + (promise: Promise): void; + } + /** + * Called when the promise receives a resolution or rejection value. This may occur synchronously in the case of {@link Promise.resolve()} or + * {@link Promise.reject()}. + * @since v17.1.0, v16.14.0 + */ + interface Settled { + (promise: Promise): void; + } + /** + * Key events in the lifetime of a promise have been categorized into four areas: creation of a promise, before/after a continuation handler is called or + * around an await, and when the promise resolves or rejects. + * + * Because promises are asynchronous resources whose lifecycle is tracked via the promise hooks mechanism, the `init()`, `before()`, `after()`, and + * `settled()` callbacks must not be async functions as they create more promises which would produce an infinite loop. + * @since v17.1.0, v16.14.0 + */ + interface HookCallbacks { + init?: Init; + before?: Before; + after?: After; + settled?: Settled; + } + interface PromiseHooks { + /** + * The `init` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. + * @since v17.1.0, v16.14.0 + * @param init The {@link Init | `init` callback} to call when a promise is created. + * @return Call to stop the hook. + */ + onInit: (init: Init) => Function; + /** + * The `settled` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. + * @since v17.1.0, v16.14.0 + * @param settled The {@link Settled | `settled` callback} to call when a promise is created. + * @return Call to stop the hook. + */ + onSettled: (settled: Settled) => Function; + /** + * The `before` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. + * @since v17.1.0, v16.14.0 + * @param before The {@link Before | `before` callback} to call before a promise continuation executes. + * @return Call to stop the hook. + */ + onBefore: (before: Before) => Function; + /** + * The `after` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. + * @since v17.1.0, v16.14.0 + * @param after The {@link After | `after` callback} to call after a promise continuation executes. + * @return Call to stop the hook. + */ + onAfter: (after: After) => Function; + /** + * Registers functions to be called for different lifetime events of each promise. + * The callbacks `init()`/`before()`/`after()`/`settled()` are called for the respective events during a promise's lifetime. + * All callbacks are optional. For example, if only promise creation needs to be tracked, then only the init callback needs to be passed. + * The hook callbacks must be plain functions. Providing async functions will throw as it would produce an infinite microtask loop. + * @since v17.1.0, v16.14.0 + * @param callbacks The {@link HookCallbacks | Hook Callbacks} to register + * @return Used for disabling hooks + */ + createHook: (callbacks: HookCallbacks) => Function; + } + /** + * The `promiseHooks` interface can be used to track promise lifecycle events. + * @since v17.1.0, v16.14.0 + */ + const promiseHooks: PromiseHooks; + type StartupSnapshotCallbackFn = (args: any) => any; + /** + * The `v8.startupSnapshot` interface can be used to add serialization and deserialization hooks for custom startup snapshots. + * + * ```bash + * $ node --snapshot-blob snapshot.blob --build-snapshot entry.js + * # This launches a process with the snapshot + * $ node --snapshot-blob snapshot.blob + * ``` + * + * In the example above, `entry.js` can use methods from the `v8.startupSnapshot` interface to specify how to save information for custom objects + * in the snapshot during serialization and how the information can be used to synchronize these objects during deserialization of the snapshot. + * For example, if the `entry.js` contains the following script: + * + * ```js + * import fs from 'node:fs'; + * import zlib from 'node:zlib'; + * import path from 'node:path'; + * import assert from 'node:assert'; + * + * import v8 from 'node:v8'; + * + * class BookShelf { + * storage = new Map(); + * + * // Reading a series of files from directory and store them into storage. + * constructor(directory, books) { + * for (const book of books) { + * this.storage.set(book, fs.readFileSync(path.join(directory, book))); + * } + * } + * + * static compressAll(shelf) { + * for (const [ book, content ] of shelf.storage) { + * shelf.storage.set(book, zlib.gzipSync(content)); + * } + * } + * + * static decompressAll(shelf) { + * for (const [ book, content ] of shelf.storage) { + * shelf.storage.set(book, zlib.gunzipSync(content)); + * } + * } + * } + * + * // __dirname here is where the snapshot script is placed + * // during snapshot building time. + * const shelf = new BookShelf(__dirname, [ + * 'book1.en_US.txt', + * 'book1.es_ES.txt', + * 'book2.zh_CN.txt', + * ]); + * + * assert(v8.startupSnapshot.isBuildingSnapshot()); + * // On snapshot serialization, compress the books to reduce size. + * v8.startupSnapshot.addSerializeCallback(BookShelf.compressAll, shelf); + * // On snapshot deserialization, decompress the books. + * v8.startupSnapshot.addDeserializeCallback(BookShelf.decompressAll, shelf); + * v8.startupSnapshot.setDeserializeMainFunction((shelf) => { + * // process.env and process.argv are refreshed during snapshot + * // deserialization. + * const lang = process.env.BOOK_LANG || 'en_US'; + * const book = process.argv[1]; + * const name = `${book}.${lang}.txt`; + * console.log(shelf.storage.get(name)); + * }, shelf); + * ``` + * + * The resulted binary will get print the data deserialized from the snapshot during start up, using the refreshed `process.env` and `process.argv` of the launched process: + * + * ```bash + * $ BOOK_LANG=es_ES node --snapshot-blob snapshot.blob book1 + * # Prints content of book1.es_ES.txt deserialized from the snapshot. + * ``` + * + * Currently the application deserialized from a user-land snapshot cannot be snapshotted again, so these APIs are only available to applications that are not deserialized from a user-land snapshot. + * + * @since v18.6.0, v16.17.0 + */ + namespace startupSnapshot { + /** + * Add a callback that will be called when the Node.js instance is about to get serialized into a snapshot and exit. + * This can be used to release resources that should not or cannot be serialized or to convert user data into a form more suitable for serialization. + * @since v18.6.0, v16.17.0 + */ + function addSerializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void; + /** + * Add a callback that will be called when the Node.js instance is deserialized from a snapshot. + * The `callback` and the `data` (if provided) will be serialized into the snapshot, they can be used to re-initialize the state of the application or + * to re-acquire resources that the application needs when the application is restarted from the snapshot. + * @since v18.6.0, v16.17.0 + */ + function addDeserializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void; + /** + * This sets the entry point of the Node.js application when it is deserialized from a snapshot. This can be called only once in the snapshot building script. + * If called, the deserialized application no longer needs an additional entry point script to start up and will simply invoke the callback along with the deserialized + * data (if provided), otherwise an entry point script still needs to be provided to the deserialized application. + * @since v18.6.0, v16.17.0 + */ + function setDeserializeMainFunction(callback: StartupSnapshotCallbackFn, data?: any): void; + /** + * Returns true if the Node.js instance is run to build a snapshot. + * @since v18.6.0, v16.17.0 + */ + function isBuildingSnapshot(): boolean; + } +} +declare module "v8" { + export * from "node:v8"; +} diff --git a/node_modules/@types/node/vfs.d.ts b/node_modules/@types/node/vfs.d.ts new file mode 100644 index 0000000..1bcae33 --- /dev/null +++ b/node_modules/@types/node/vfs.d.ts @@ -0,0 +1,211 @@ +declare module "node:vfs" { + /** + * Convenience factory equivalent to `new VirtualFileSystem(provider, options)`. + * + * ```js + * const vfs = require('node:vfs'); + * + * // Default in-memory provider + * const memoryVfs = vfs.create(); + * + * // Explicit provider + * const realVfs = vfs.create(new vfs.RealFSProvider('/tmp/sandbox')); + * ``` + * @since v26.4.0 + * @param provider The provider to use. **Default:** `new MemoryProvider()`. + */ + function create(provider?: VirtualProvider, options?: VirtualFileSystemOptions): VirtualFileSystem; + function create(options: VirtualFileSystemOptions): VirtualFileSystem; + interface VirtualFileSystemOptions { + /** + * Whether to emit the experimental warning. **Default:** `true`. + */ + emitExperimentalWarning?: boolean | undefined; + } + /** + * A `VirtualFileSystem` wraps a {@link VirtualProvider} and exposes a + * `node:fs`-like API. Each instance maintains its own file tree. + * @since v26.4.0 + */ + class VirtualFileSystem { + /** + * @param provider The provider to use. **Default:** `new MemoryProvider()`. + */ + constructor(provider?: VirtualProvider, options?: VirtualFileSystemOptions); + constructor(options: VirtualFileSystemOptions); + /** + * The provider backing this VFS instance. + * @since v26.4.0 + */ + readonly provider: VirtualProvider; + /** + * `true` when the underlying provider is read-only. + * @since v26.4.0 + */ + readonly readonly: boolean; + } + interface VirtualFileSystem extends + // Synchronous API + Pick< + typeof import("node:fs"), + | "existsSync" + | "statSync" + | "lstatSync" + | "readFileSync" + | "writeFileSync" + | "appendFileSync" + | "readdirSync" + | "mkdirSync" + | "rmdirSync" + | "unlinkSync" + | "renameSync" + | "copyFileSync" + | "realpathSync" + | "readlinkSync" + | "symlinkSync" + | "accessSync" + | "rmSync" + | "truncateSync" + | "ftruncateSync" + | "linkSync" + | "chmodSync" + | "chownSync" + | "utimesSync" + | "lutimesSync" + | "mkdtempSync" + | "opendirSync" + | "openAsBlob" + | "openSync" + | "closeSync" + | "readSync" + | "writeSync" + | "fstatSync" + | "createReadStream" + | "createWriteStream" + | "watch" + | "watchFile" + | "unwatchFile" + >, + // Callback API + Pick< + typeof import("node:fs"), + | "readFile" + | "writeFile" + | "stat" + | "lstat" + | "readdir" + | "realpath" + | "readlink" + | "access" + | "open" + | "close" + | "read" + | "write" + | "rm" + | "fstat" + | "truncate" + | "ftruncate" + | "link" + | "mkdtemp" + | "opendir" + > + { + // Promise API + readonly promises: Pick< + typeof import("node:fs/promises"), + | "readFile" + | "writeFile" + | "appendFile" + | "stat" + | "lstat" + | "readdir" + | "mkdir" + | "rmdir" + | "unlink" + | "rename" + | "copyFile" + | "realpath" + | "readlink" + | "symlink" + | "access" + | "rm" + | "truncate" + | "link" + | "mkdtemp" + | "chmod" + | "chown" + | "lchown" + | "utimes" + | "lutimes" + | "open" + | "lchmod" + | "watch" + >; + } + /** + * The base class for all VFS providers. Subclasses implement the essential + * primitives (such as `open`, `stat`, `readdir`, `mkdir`, `rmdir`, `unlink`, + * `rename`, etc.) and inherit default implementations of the derived + * methods (such as `readFile`, `writeFile`, `exists`, `copyFile`, `access`, etc.). + * @since v26.4.0 + */ + abstract class VirtualProvider { + get readonly(): boolean; + get supportsSymlinks(): boolean; + get supportsWatch(): boolean; + } + /** + * The default in-memory provider. Stores files, directories, and symbolic + * links in a `Map`-backed tree, supports symlinks (`supportsSymlinks === + * true`), and supports watching (`supportsWatch === true`). + * @since v26.4.0 + */ + class MemoryProvider extends VirtualProvider { + /** + * Locks the provider into read-only mode. Subsequent writes through any + * `VirtualFileSystem` using this provider throw `EROFS`. There is no + * way to revert the provider to writable. + * + * ```js + * const vfs = require('node:vfs'); + * + * const provider = new vfs.MemoryProvider(); + * const myVfs = vfs.create(provider); + * myVfs.writeFileSync('/seed.txt', 'initial'); + * + * provider.setReadOnly(); + * + * myVfs.writeFileSync('/x.txt', 'fail'); // throws EROFS + * ``` + * @since v26.4.0 + */ + setReadOnly(): void; + } + /** + * A provider that wraps a directory (i.e. one on the actual file system) and + * exposes its contents through the VFS API. All VFS paths are resolved relative to + * the root and verified to stay inside it; symbolic links resolving outside the + * root are rejected. This path mapping is not a sandbox or access-control + * mechanism. + * @since v26.4.0 + */ + class RealFSProvider extends VirtualProvider { + /** + * ```js + * const vfs = require('node:vfs'); + * + * const realVfs = vfs.create(new vfs.RealFSProvider('/tmp/vfs-root')); + * realVfs.writeFileSync('/file.txt', 'hello'); // writes /tmp/vfs-root/file.txt + * ``` + * @since v26.4.0 + * @param rootPath The absolute file-system path to use as the root. + * Must be a non-empty string. + */ + constructor(rootPath: string); + /** + * The resolved absolute path used as the root. + * @since v26.4.0 + */ + readonly rootPath: string; + } +} diff --git a/node_modules/@types/node/vm.d.ts b/node_modules/@types/node/vm.d.ts new file mode 100644 index 0000000..526c311 --- /dev/null +++ b/node_modules/@types/node/vm.d.ts @@ -0,0 +1,1137 @@ +declare module "node:vm" { + import { NonSharedBuffer } from "node:buffer"; + import { ImportAttributes, ImportPhase } from "node:module"; + interface Context extends NodeJS.Dict {} + interface BaseOptions { + /** + * Specifies the filename used in stack traces produced by this script. + * @default '' + */ + filename?: string | undefined; + /** + * Specifies the line number offset that is displayed in stack traces produced by this script. + * @default 0 + */ + lineOffset?: number | undefined; + /** + * Specifies the column number offset that is displayed in stack traces produced by this script. + * @default 0 + */ + columnOffset?: number | undefined; + } + type DynamicModuleLoader = ( + specifier: string, + referrer: T, + importAttributes: ImportAttributes, + phase: ImportPhase, + ) => Module | Promise; + interface ScriptOptions extends BaseOptions { + /** + * Provides an optional data with V8's code cache data for the supplied source. + */ + cachedData?: NodeJS.ArrayBufferView | undefined; + /** @deprecated in favor of `script.createCachedData()` */ + produceCachedData?: boolean | undefined; + /** + * Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is + * part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see + * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v26.x/api/vm.html#support-of-dynamic-import-in-compilation-apis). + * @experimental + */ + importModuleDynamically?: + | DynamicModuleLoader + +``` + +Open the above .html file in a browser and you should see + +Node Example + +**[Full online demo](http://kpdecker.github.com/jsdiff)** + +## Compatibility + +[![Sauce Test Status](https://saucelabs.com/browser-matrix/jsdiff.svg)](https://saucelabs.com/u/jsdiff) + +jsdiff supports all ES3 environments with some known issues on IE8 and below. Under these browsers some diff algorithms such as word diff and others may fail due to lack of support for capturing groups in the `split` operation. + +## License + +See [LICENSE](https://github.com/kpdecker/jsdiff/blob/master/LICENSE). diff --git a/node_modules/diff/dist/diff.js b/node_modules/diff/dist/diff.js new file mode 100644 index 0000000..de800a3 --- /dev/null +++ b/node_modules/diff/dist/diff.js @@ -0,0 +1,1548 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = global || self, factory(global.Diff = {})); +}(this, function (exports) { 'use strict'; + + function Diff() {} + Diff.prototype = { + diff: function diff(oldString, newString) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var callback = options.callback; + + if (typeof options === 'function') { + callback = options; + options = {}; + } + + this.options = options; + var self = this; + + function done(value) { + if (callback) { + setTimeout(function () { + callback(undefined, value); + }, 0); + return true; + } else { + return value; + } + } // Allow subclasses to massage the input prior to running + + + oldString = this.castInput(oldString); + newString = this.castInput(newString); + oldString = this.removeEmpty(this.tokenize(oldString)); + newString = this.removeEmpty(this.tokenize(newString)); + var newLen = newString.length, + oldLen = oldString.length; + var editLength = 1; + var maxEditLength = newLen + oldLen; + var bestPath = [{ + newPos: -1, + components: [] + }]; // Seed editLength = 0, i.e. the content starts with the same values + + var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0); + + if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) { + // Identity per the equality and tokenizer + return done([{ + value: this.join(newString), + count: newString.length + }]); + } // Main worker method. checks all permutations of a given edit length for acceptance. + + + function execEditLength() { + for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) { + var basePath = void 0; + + var addPath = bestPath[diagonalPath - 1], + removePath = bestPath[diagonalPath + 1], + _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; + + if (addPath) { + // No one else is going to attempt to use this value, clear it + bestPath[diagonalPath - 1] = undefined; + } + + var canAdd = addPath && addPath.newPos + 1 < newLen, + canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen; + + if (!canAdd && !canRemove) { + // If this path is a terminal then prune + bestPath[diagonalPath] = undefined; + continue; + } // Select the diagonal that we want to branch from. We select the prior + // path whose position in the new string is the farthest from the origin + // and does not pass the bounds of the diff graph + + + if (!canAdd || canRemove && addPath.newPos < removePath.newPos) { + basePath = clonePath(removePath); + self.pushComponent(basePath.components, undefined, true); + } else { + basePath = addPath; // No need to clone, we've pulled it from the list + + basePath.newPos++; + self.pushComponent(basePath.components, true, undefined); + } + + _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath); // If we have hit the end of both strings, then we are done + + if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) { + return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken)); + } else { + // Otherwise track this path as a potential candidate and continue. + bestPath[diagonalPath] = basePath; + } + } + + editLength++; + } // Performs the length of edit iteration. Is a bit fugly as this has to support the + // sync and async mode which is never fun. Loops over execEditLength until a value + // is produced. + + + if (callback) { + (function exec() { + setTimeout(function () { + // This should not happen, but we want to be safe. + + /* istanbul ignore next */ + if (editLength > maxEditLength) { + return callback(); + } + + if (!execEditLength()) { + exec(); + } + }, 0); + })(); + } else { + while (editLength <= maxEditLength) { + var ret = execEditLength(); + + if (ret) { + return ret; + } + } + } + }, + pushComponent: function pushComponent(components, added, removed) { + var last = components[components.length - 1]; + + if (last && last.added === added && last.removed === removed) { + // We need to clone here as the component clone operation is just + // as shallow array clone + components[components.length - 1] = { + count: last.count + 1, + added: added, + removed: removed + }; + } else { + components.push({ + count: 1, + added: added, + removed: removed + }); + } + }, + extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) { + var newLen = newString.length, + oldLen = oldString.length, + newPos = basePath.newPos, + oldPos = newPos - diagonalPath, + commonCount = 0; + + while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) { + newPos++; + oldPos++; + commonCount++; + } + + if (commonCount) { + basePath.components.push({ + count: commonCount + }); + } + + basePath.newPos = newPos; + return oldPos; + }, + equals: function equals(left, right) { + if (this.options.comparator) { + return this.options.comparator(left, right); + } else { + return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase(); + } + }, + removeEmpty: function removeEmpty(array) { + var ret = []; + + for (var i = 0; i < array.length; i++) { + if (array[i]) { + ret.push(array[i]); + } + } + + return ret; + }, + castInput: function castInput(value) { + return value; + }, + tokenize: function tokenize(value) { + return value.split(''); + }, + join: function join(chars) { + return chars.join(''); + } + }; + + function buildValues(diff, components, newString, oldString, useLongestToken) { + var componentPos = 0, + componentLen = components.length, + newPos = 0, + oldPos = 0; + + for (; componentPos < componentLen; componentPos++) { + var component = components[componentPos]; + + if (!component.removed) { + if (!component.added && useLongestToken) { + var value = newString.slice(newPos, newPos + component.count); + value = value.map(function (value, i) { + var oldValue = oldString[oldPos + i]; + return oldValue.length > value.length ? oldValue : value; + }); + component.value = diff.join(value); + } else { + component.value = diff.join(newString.slice(newPos, newPos + component.count)); + } + + newPos += component.count; // Common case + + if (!component.added) { + oldPos += component.count; + } + } else { + component.value = diff.join(oldString.slice(oldPos, oldPos + component.count)); + oldPos += component.count; // Reverse add and remove so removes are output first to match common convention + // The diffing algorithm is tied to add then remove output and this is the simplest + // route to get the desired output with minimal overhead. + + if (componentPos && components[componentPos - 1].added) { + var tmp = components[componentPos - 1]; + components[componentPos - 1] = components[componentPos]; + components[componentPos] = tmp; + } + } + } // Special case handle for when one terminal is ignored (i.e. whitespace). + // For this case we merge the terminal into the prior string and drop the change. + // This is only available for string mode. + + + var lastComponent = components[componentLen - 1]; + + if (componentLen > 1 && typeof lastComponent.value === 'string' && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) { + components[componentLen - 2].value += lastComponent.value; + components.pop(); + } + + return components; + } + + function clonePath(path) { + return { + newPos: path.newPos, + components: path.components.slice(0) + }; + } + + var characterDiff = new Diff(); + function diffChars(oldStr, newStr, options) { + return characterDiff.diff(oldStr, newStr, options); + } + + function generateOptions(options, defaults) { + if (typeof options === 'function') { + defaults.callback = options; + } else if (options) { + for (var name in options) { + /* istanbul ignore else */ + if (options.hasOwnProperty(name)) { + defaults[name] = options[name]; + } + } + } + + return defaults; + } + + // + // Ranges and exceptions: + // Latin-1 Supplement, 0080–00FF + // - U+00D7 × Multiplication sign + // - U+00F7 ÷ Division sign + // Latin Extended-A, 0100–017F + // Latin Extended-B, 0180–024F + // IPA Extensions, 0250–02AF + // Spacing Modifier Letters, 02B0–02FF + // - U+02C7 ˇ ˇ Caron + // - U+02D8 ˘ ˘ Breve + // - U+02D9 ˙ ˙ Dot Above + // - U+02DA ˚ ˚ Ring Above + // - U+02DB ˛ ˛ Ogonek + // - U+02DC ˜ ˜ Small Tilde + // - U+02DD ˝ ˝ Double Acute Accent + // Latin Extended Additional, 1E00–1EFF + + var extendedWordChars = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/; + var reWhitespace = /\S/; + var wordDiff = new Diff(); + + wordDiff.equals = function (left, right) { + if (this.options.ignoreCase) { + left = left.toLowerCase(); + right = right.toLowerCase(); + } + + return left === right || this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right); + }; + + wordDiff.tokenize = function (value) { + var tokens = value.split(/(\s+|[()[\]{}'"]|\b)/); // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set. + + for (var i = 0; i < tokens.length - 1; i++) { + // If we have an empty string in the next field and we have only word chars before and after, merge + if (!tokens[i + 1] && tokens[i + 2] && extendedWordChars.test(tokens[i]) && extendedWordChars.test(tokens[i + 2])) { + tokens[i] += tokens[i + 2]; + tokens.splice(i + 1, 2); + i--; + } + } + + return tokens; + }; + + function diffWords(oldStr, newStr, options) { + options = generateOptions(options, { + ignoreWhitespace: true + }); + return wordDiff.diff(oldStr, newStr, options); + } + function diffWordsWithSpace(oldStr, newStr, options) { + return wordDiff.diff(oldStr, newStr, options); + } + + var lineDiff = new Diff(); + + lineDiff.tokenize = function (value) { + var retLines = [], + linesAndNewlines = value.split(/(\n|\r\n)/); // Ignore the final empty token that occurs if the string ends with a new line + + if (!linesAndNewlines[linesAndNewlines.length - 1]) { + linesAndNewlines.pop(); + } // Merge the content and line separators into single tokens + + + for (var i = 0; i < linesAndNewlines.length; i++) { + var line = linesAndNewlines[i]; + + if (i % 2 && !this.options.newlineIsToken) { + retLines[retLines.length - 1] += line; + } else { + if (this.options.ignoreWhitespace) { + line = line.trim(); + } + + retLines.push(line); + } + } + + return retLines; + }; + + function diffLines(oldStr, newStr, callback) { + return lineDiff.diff(oldStr, newStr, callback); + } + function diffTrimmedLines(oldStr, newStr, callback) { + var options = generateOptions(callback, { + ignoreWhitespace: true + }); + return lineDiff.diff(oldStr, newStr, options); + } + + var sentenceDiff = new Diff(); + + sentenceDiff.tokenize = function (value) { + return value.split(/(\S.+?[.!?])(?=\s+|$)/); + }; + + function diffSentences(oldStr, newStr, callback) { + return sentenceDiff.diff(oldStr, newStr, callback); + } + + var cssDiff = new Diff(); + + cssDiff.tokenize = function (value) { + return value.split(/([{}:;,]|\s+)/); + }; + + function diffCss(oldStr, newStr, callback) { + return cssDiff.diff(oldStr, newStr, callback); + } + + function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function (obj) { + return typeof obj; + }; + } else { + _typeof = function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof(obj); + } + + function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); + } + + function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; + + return arr2; + } + } + + function _iterableToArray(iter) { + if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); + } + + function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance"); + } + + var objectPrototypeToString = Object.prototype.toString; + var jsonDiff = new Diff(); // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a + // dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output: + + jsonDiff.useLongestToken = true; + jsonDiff.tokenize = lineDiff.tokenize; + + jsonDiff.castInput = function (value) { + var _this$options = this.options, + undefinedReplacement = _this$options.undefinedReplacement, + _this$options$stringi = _this$options.stringifyReplacer, + stringifyReplacer = _this$options$stringi === void 0 ? function (k, v) { + return typeof v === 'undefined' ? undefinedReplacement : v; + } : _this$options$stringi; + return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, ' '); + }; + + jsonDiff.equals = function (left, right) { + return Diff.prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1')); + }; + + function diffJson(oldObj, newObj, options) { + return jsonDiff.diff(oldObj, newObj, options); + } // This function handles the presence of circular references by bailing out when encountering an + // object that is already on the "stack" of items being processed. Accepts an optional replacer + + function canonicalize(obj, stack, replacementStack, replacer, key) { + stack = stack || []; + replacementStack = replacementStack || []; + + if (replacer) { + obj = replacer(key, obj); + } + + var i; + + for (i = 0; i < stack.length; i += 1) { + if (stack[i] === obj) { + return replacementStack[i]; + } + } + + var canonicalizedObj; + + if ('[object Array]' === objectPrototypeToString.call(obj)) { + stack.push(obj); + canonicalizedObj = new Array(obj.length); + replacementStack.push(canonicalizedObj); + + for (i = 0; i < obj.length; i += 1) { + canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key); + } + + stack.pop(); + replacementStack.pop(); + return canonicalizedObj; + } + + if (obj && obj.toJSON) { + obj = obj.toJSON(); + } + + if (_typeof(obj) === 'object' && obj !== null) { + stack.push(obj); + canonicalizedObj = {}; + replacementStack.push(canonicalizedObj); + + var sortedKeys = [], + _key; + + for (_key in obj) { + /* istanbul ignore else */ + if (obj.hasOwnProperty(_key)) { + sortedKeys.push(_key); + } + } + + sortedKeys.sort(); + + for (i = 0; i < sortedKeys.length; i += 1) { + _key = sortedKeys[i]; + canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key); + } + + stack.pop(); + replacementStack.pop(); + } else { + canonicalizedObj = obj; + } + + return canonicalizedObj; + } + + var arrayDiff = new Diff(); + + arrayDiff.tokenize = function (value) { + return value.slice(); + }; + + arrayDiff.join = arrayDiff.removeEmpty = function (value) { + return value; + }; + + function diffArrays(oldArr, newArr, callback) { + return arrayDiff.diff(oldArr, newArr, callback); + } + + function parsePatch(uniDiff) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var diffstr = uniDiff.split(/\r\n|[\n\v\f\r\x85]/), + delimiters = uniDiff.match(/\r\n|[\n\v\f\r\x85]/g) || [], + list = [], + i = 0; + + function parseIndex() { + var index = {}; + list.push(index); // Parse diff metadata + + while (i < diffstr.length) { + var line = diffstr[i]; // File header found, end parsing diff metadata + + if (/^(\-\-\-|\+\+\+|@@)\s/.test(line)) { + break; + } // Diff index + + + var headerMatch = /^(?:Index:|diff(?: -r \w+)+)\s+/.exec(line); + + if (headerMatch) { + index.index = line.substring(headerMatch[0].length).trim(); + } + + i++; + } // Parse file headers if they are defined. Unified diff requires them, but + // there's no technical issues to have an isolated hunk without file header + + + parseFileHeader(index); + parseFileHeader(index); // Parse hunks + + index.hunks = []; + + while (i < diffstr.length) { + var _line = diffstr[i]; + + if (/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(_line)) { + break; + } else if (/^@@/.test(_line)) { + index.hunks.push(parseHunk()); + } else if (_line && options.strict) { + // Ignore unexpected content unless in strict mode + throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(_line)); + } else { + i++; + } + } + } // Parses the --- and +++ headers, if none are found, no lines + // are consumed. + + + function parseFileHeader(index) { + var fileHeaderMatch = /^(---|\+\+\+)\s+/.exec(diffstr[i]); + + if (fileHeaderMatch) { + var keyPrefix = fileHeaderMatch[1] === '---' ? 'old' : 'new'; + var data = diffstr[i].substring(3).trim().split('\t', 2); + var fileName = data[0].replace(/\\\\/g, '\\'); + + if (fileName.startsWith('"') && fileName.endsWith('"')) { + fileName = fileName.substr(1, fileName.length - 2); + } + + index[keyPrefix + 'FileName'] = fileName; + index[keyPrefix + 'Header'] = (data[1] || '').trim(); + i++; + } + } // Parses a hunk + // This assumes that we are at the start of a hunk. + + + function parseHunk() { + var chunkHeaderIndex = i, + chunkHeaderLine = diffstr[i++], + chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/); + var hunk = { + oldStart: +chunkHeader[1], + oldLines: +chunkHeader[2] || 1, + newStart: +chunkHeader[3], + newLines: +chunkHeader[4] || 1, + lines: [], + linedelimiters: [] + }; + var addCount = 0, + removeCount = 0; + + for (; i < diffstr.length; i++) { + // Lines starting with '---' could be mistaken for the "remove line" operation + // But they could be the header for the next file. Therefore prune such cases out. + if (diffstr[i].indexOf('--- ') === 0 && i + 2 < diffstr.length && diffstr[i + 1].indexOf('+++ ') === 0 && diffstr[i + 2].indexOf('@@') === 0) { + break; + } + + var operation = diffstr[i].length == 0 && i != diffstr.length - 1 ? ' ' : diffstr[i][0]; + + if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') { + hunk.lines.push(diffstr[i]); + hunk.linedelimiters.push(delimiters[i] || '\n'); + + if (operation === '+') { + addCount++; + } else if (operation === '-') { + removeCount++; + } else if (operation === ' ') { + addCount++; + removeCount++; + } + } else { + break; + } + } // Handle the empty block count case + + + if (!addCount && hunk.newLines === 1) { + hunk.newLines = 0; + } + + if (!removeCount && hunk.oldLines === 1) { + hunk.oldLines = 0; + } // Perform optional sanity checking + + + if (options.strict) { + if (addCount !== hunk.newLines) { + throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); + } + + if (removeCount !== hunk.oldLines) { + throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); + } + } + + return hunk; + } + + while (i < diffstr.length) { + parseIndex(); + } + + return list; + } + + // Iterator that traverses in the range of [min, max], stepping + // by distance from a given start position. I.e. for [0, 4], with + // start of 2, this will iterate 2, 3, 1, 4, 0. + function distanceIterator (start, minLine, maxLine) { + var wantForward = true, + backwardExhausted = false, + forwardExhausted = false, + localOffset = 1; + return function iterator() { + if (wantForward && !forwardExhausted) { + if (backwardExhausted) { + localOffset++; + } else { + wantForward = false; + } // Check if trying to fit beyond text length, and if not, check it fits + // after offset location (or desired location on first iteration) + + + if (start + localOffset <= maxLine) { + return localOffset; + } + + forwardExhausted = true; + } + + if (!backwardExhausted) { + if (!forwardExhausted) { + wantForward = true; + } // Check if trying to fit before text beginning, and if not, check it fits + // before offset location + + + if (minLine <= start - localOffset) { + return -localOffset++; + } + + backwardExhausted = true; + return iterator(); + } // We tried to fit hunk before text beginning and beyond text length, then + // hunk can't fit on the text. Return undefined + + }; + } + + function applyPatch(source, uniDiff) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + + if (typeof uniDiff === 'string') { + uniDiff = parsePatch(uniDiff); + } + + if (Array.isArray(uniDiff)) { + if (uniDiff.length > 1) { + throw new Error('applyPatch only works with a single input.'); + } + + uniDiff = uniDiff[0]; + } // Apply the diff to the input + + + var lines = source.split(/\r\n|[\n\v\f\r\x85]/), + delimiters = source.match(/\r\n|[\n\v\f\r\x85]/g) || [], + hunks = uniDiff.hunks, + compareLine = options.compareLine || function (lineNumber, line, operation, patchContent) { + return line === patchContent; + }, + errorCount = 0, + fuzzFactor = options.fuzzFactor || 0, + minLine = 0, + offset = 0, + removeEOFNL, + addEOFNL; + /** + * Checks if the hunk exactly fits on the provided location + */ + + + function hunkFits(hunk, toPos) { + for (var j = 0; j < hunk.lines.length; j++) { + var line = hunk.lines[j], + operation = line.length > 0 ? line[0] : ' ', + content = line.length > 0 ? line.substr(1) : line; + + if (operation === ' ' || operation === '-') { + // Context sanity check + if (!compareLine(toPos + 1, lines[toPos], operation, content)) { + errorCount++; + + if (errorCount > fuzzFactor) { + return false; + } + } + + toPos++; + } + } + + return true; + } // Search best fit offsets for each hunk based on the previous ones + + + for (var i = 0; i < hunks.length; i++) { + var hunk = hunks[i], + maxLine = lines.length - hunk.oldLines, + localOffset = 0, + toPos = offset + hunk.oldStart - 1; + var iterator = distanceIterator(toPos, minLine, maxLine); + + for (; localOffset !== undefined; localOffset = iterator()) { + if (hunkFits(hunk, toPos + localOffset)) { + hunk.offset = offset += localOffset; + break; + } + } + + if (localOffset === undefined) { + return false; + } // Set lower text limit to end of the current hunk, so next ones don't try + // to fit over already patched text + + + minLine = hunk.offset + hunk.oldStart + hunk.oldLines; + } // Apply patch hunks + + + var diffOffset = 0; + + for (var _i = 0; _i < hunks.length; _i++) { + var _hunk = hunks[_i], + _toPos = _hunk.oldStart + _hunk.offset + diffOffset - 1; + + diffOffset += _hunk.newLines - _hunk.oldLines; + + if (_toPos < 0) { + // Creating a new file + _toPos = 0; + } + + for (var j = 0; j < _hunk.lines.length; j++) { + var line = _hunk.lines[j], + operation = line.length > 0 ? line[0] : ' ', + content = line.length > 0 ? line.substr(1) : line, + delimiter = _hunk.linedelimiters[j]; + + if (operation === ' ') { + _toPos++; + } else if (operation === '-') { + lines.splice(_toPos, 1); + delimiters.splice(_toPos, 1); + /* istanbul ignore else */ + } else if (operation === '+') { + lines.splice(_toPos, 0, content); + delimiters.splice(_toPos, 0, delimiter); + _toPos++; + } else if (operation === '\\') { + var previousOperation = _hunk.lines[j - 1] ? _hunk.lines[j - 1][0] : null; + + if (previousOperation === '+') { + removeEOFNL = true; + } else if (previousOperation === '-') { + addEOFNL = true; + } + } + } + } // Handle EOFNL insertion/removal + + + if (removeEOFNL) { + while (!lines[lines.length - 1]) { + lines.pop(); + delimiters.pop(); + } + } else if (addEOFNL) { + lines.push(''); + delimiters.push('\n'); + } + + for (var _k = 0; _k < lines.length - 1; _k++) { + lines[_k] = lines[_k] + delimiters[_k]; + } + + return lines.join(''); + } // Wrapper that supports multiple file patches via callbacks. + + function applyPatches(uniDiff, options) { + if (typeof uniDiff === 'string') { + uniDiff = parsePatch(uniDiff); + } + + var currentIndex = 0; + + function processIndex() { + var index = uniDiff[currentIndex++]; + + if (!index) { + return options.complete(); + } + + options.loadFile(index, function (err, data) { + if (err) { + return options.complete(err); + } + + var updatedContent = applyPatch(data, index, options); + options.patched(index, updatedContent, function (err) { + if (err) { + return options.complete(err); + } + + processIndex(); + }); + }); + } + + processIndex(); + } + + function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { + if (!options) { + options = {}; + } + + if (typeof options.context === 'undefined') { + options.context = 4; + } + + var diff = diffLines(oldStr, newStr, options); + diff.push({ + value: '', + lines: [] + }); // Append an empty value to make cleanup easier + + function contextLines(lines) { + return lines.map(function (entry) { + return ' ' + entry; + }); + } + + var hunks = []; + var oldRangeStart = 0, + newRangeStart = 0, + curRange = [], + oldLine = 1, + newLine = 1; + + var _loop = function _loop(i) { + var current = diff[i], + lines = current.lines || current.value.replace(/\n$/, '').split('\n'); + current.lines = lines; + + if (current.added || current.removed) { + var _curRange; + + // If we have previous context, start with that + if (!oldRangeStart) { + var prev = diff[i - 1]; + oldRangeStart = oldLine; + newRangeStart = newLine; + + if (prev) { + curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : []; + oldRangeStart -= curRange.length; + newRangeStart -= curRange.length; + } + } // Output our changes + + + (_curRange = curRange).push.apply(_curRange, _toConsumableArray(lines.map(function (entry) { + return (current.added ? '+' : '-') + entry; + }))); // Track the updated file position + + + if (current.added) { + newLine += lines.length; + } else { + oldLine += lines.length; + } + } else { + // Identical context lines. Track line changes + if (oldRangeStart) { + // Close out any changes that have been output (or join overlapping) + if (lines.length <= options.context * 2 && i < diff.length - 2) { + var _curRange2; + + // Overlapping + (_curRange2 = curRange).push.apply(_curRange2, _toConsumableArray(contextLines(lines))); + } else { + var _curRange3; + + // end the range and output + var contextSize = Math.min(lines.length, options.context); + + (_curRange3 = curRange).push.apply(_curRange3, _toConsumableArray(contextLines(lines.slice(0, contextSize)))); + + var hunk = { + oldStart: oldRangeStart, + oldLines: oldLine - oldRangeStart + contextSize, + newStart: newRangeStart, + newLines: newLine - newRangeStart + contextSize, + lines: curRange + }; + + if (i >= diff.length - 2 && lines.length <= options.context) { + // EOF is inside this hunk + var oldEOFNewline = /\n$/.test(oldStr); + var newEOFNewline = /\n$/.test(newStr); + var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines; + + if (!oldEOFNewline && noNlBeforeAdds) { + // special case: old has no eol and no trailing context; no-nl can end up before adds + curRange.splice(hunk.oldLines, 0, '\\ No newline at end of file'); + } + + if (!oldEOFNewline && !noNlBeforeAdds || !newEOFNewline) { + curRange.push('\\ No newline at end of file'); + } + } + + hunks.push(hunk); + oldRangeStart = 0; + newRangeStart = 0; + curRange = []; + } + } + + oldLine += lines.length; + newLine += lines.length; + } + }; + + for (var i = 0; i < diff.length; i++) { + _loop(i); + } + + return { + oldFileName: oldFileName, + newFileName: newFileName, + oldHeader: oldHeader, + newHeader: newHeader, + hunks: hunks + }; + } + function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { + var diff = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options); + var ret = []; + + if (oldFileName == newFileName) { + ret.push('Index: ' + oldFileName); + } + + ret.push('==================================================================='); + ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\t' + diff.oldHeader)); + ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader)); + + for (var i = 0; i < diff.hunks.length; i++) { + var hunk = diff.hunks[i]; + ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@'); + ret.push.apply(ret, hunk.lines); + } + + return ret.join('\n') + '\n'; + } + function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) { + return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options); + } + + function arrayEqual(a, b) { + if (a.length !== b.length) { + return false; + } + + return arrayStartsWith(a, b); + } + function arrayStartsWith(array, start) { + if (start.length > array.length) { + return false; + } + + for (var i = 0; i < start.length; i++) { + if (start[i] !== array[i]) { + return false; + } + } + + return true; + } + + function calcLineCount(hunk) { + var _calcOldNewLineCount = calcOldNewLineCount(hunk.lines), + oldLines = _calcOldNewLineCount.oldLines, + newLines = _calcOldNewLineCount.newLines; + + if (oldLines !== undefined) { + hunk.oldLines = oldLines; + } else { + delete hunk.oldLines; + } + + if (newLines !== undefined) { + hunk.newLines = newLines; + } else { + delete hunk.newLines; + } + } + function merge(mine, theirs, base) { + mine = loadPatch(mine, base); + theirs = loadPatch(theirs, base); + var ret = {}; // For index we just let it pass through as it doesn't have any necessary meaning. + // Leaving sanity checks on this to the API consumer that may know more about the + // meaning in their own context. + + if (mine.index || theirs.index) { + ret.index = mine.index || theirs.index; + } + + if (mine.newFileName || theirs.newFileName) { + if (!fileNameChanged(mine)) { + // No header or no change in ours, use theirs (and ours if theirs does not exist) + ret.oldFileName = theirs.oldFileName || mine.oldFileName; + ret.newFileName = theirs.newFileName || mine.newFileName; + ret.oldHeader = theirs.oldHeader || mine.oldHeader; + ret.newHeader = theirs.newHeader || mine.newHeader; + } else if (!fileNameChanged(theirs)) { + // No header or no change in theirs, use ours + ret.oldFileName = mine.oldFileName; + ret.newFileName = mine.newFileName; + ret.oldHeader = mine.oldHeader; + ret.newHeader = mine.newHeader; + } else { + // Both changed... figure it out + ret.oldFileName = selectField(ret, mine.oldFileName, theirs.oldFileName); + ret.newFileName = selectField(ret, mine.newFileName, theirs.newFileName); + ret.oldHeader = selectField(ret, mine.oldHeader, theirs.oldHeader); + ret.newHeader = selectField(ret, mine.newHeader, theirs.newHeader); + } + } + + ret.hunks = []; + var mineIndex = 0, + theirsIndex = 0, + mineOffset = 0, + theirsOffset = 0; + + while (mineIndex < mine.hunks.length || theirsIndex < theirs.hunks.length) { + var mineCurrent = mine.hunks[mineIndex] || { + oldStart: Infinity + }, + theirsCurrent = theirs.hunks[theirsIndex] || { + oldStart: Infinity + }; + + if (hunkBefore(mineCurrent, theirsCurrent)) { + // This patch does not overlap with any of the others, yay. + ret.hunks.push(cloneHunk(mineCurrent, mineOffset)); + mineIndex++; + theirsOffset += mineCurrent.newLines - mineCurrent.oldLines; + } else if (hunkBefore(theirsCurrent, mineCurrent)) { + // This patch does not overlap with any of the others, yay. + ret.hunks.push(cloneHunk(theirsCurrent, theirsOffset)); + theirsIndex++; + mineOffset += theirsCurrent.newLines - theirsCurrent.oldLines; + } else { + // Overlap, merge as best we can + var mergedHunk = { + oldStart: Math.min(mineCurrent.oldStart, theirsCurrent.oldStart), + oldLines: 0, + newStart: Math.min(mineCurrent.newStart + mineOffset, theirsCurrent.oldStart + theirsOffset), + newLines: 0, + lines: [] + }; + mergeLines(mergedHunk, mineCurrent.oldStart, mineCurrent.lines, theirsCurrent.oldStart, theirsCurrent.lines); + theirsIndex++; + mineIndex++; + ret.hunks.push(mergedHunk); + } + } + + return ret; + } + + function loadPatch(param, base) { + if (typeof param === 'string') { + if (/^@@/m.test(param) || /^Index:/m.test(param)) { + return parsePatch(param)[0]; + } + + if (!base) { + throw new Error('Must provide a base reference or pass in a patch'); + } + + return structuredPatch(undefined, undefined, base, param); + } + + return param; + } + + function fileNameChanged(patch) { + return patch.newFileName && patch.newFileName !== patch.oldFileName; + } + + function selectField(index, mine, theirs) { + if (mine === theirs) { + return mine; + } else { + index.conflict = true; + return { + mine: mine, + theirs: theirs + }; + } + } + + function hunkBefore(test, check) { + return test.oldStart < check.oldStart && test.oldStart + test.oldLines < check.oldStart; + } + + function cloneHunk(hunk, offset) { + return { + oldStart: hunk.oldStart, + oldLines: hunk.oldLines, + newStart: hunk.newStart + offset, + newLines: hunk.newLines, + lines: hunk.lines + }; + } + + function mergeLines(hunk, mineOffset, mineLines, theirOffset, theirLines) { + // This will generally result in a conflicted hunk, but there are cases where the context + // is the only overlap where we can successfully merge the content here. + var mine = { + offset: mineOffset, + lines: mineLines, + index: 0 + }, + their = { + offset: theirOffset, + lines: theirLines, + index: 0 + }; // Handle any leading content + + insertLeading(hunk, mine, their); + insertLeading(hunk, their, mine); // Now in the overlap content. Scan through and select the best changes from each. + + while (mine.index < mine.lines.length && their.index < their.lines.length) { + var mineCurrent = mine.lines[mine.index], + theirCurrent = their.lines[their.index]; + + if ((mineCurrent[0] === '-' || mineCurrent[0] === '+') && (theirCurrent[0] === '-' || theirCurrent[0] === '+')) { + // Both modified ... + mutualChange(hunk, mine, their); + } else if (mineCurrent[0] === '+' && theirCurrent[0] === ' ') { + var _hunk$lines; + + // Mine inserted + (_hunk$lines = hunk.lines).push.apply(_hunk$lines, _toConsumableArray(collectChange(mine))); + } else if (theirCurrent[0] === '+' && mineCurrent[0] === ' ') { + var _hunk$lines2; + + // Theirs inserted + (_hunk$lines2 = hunk.lines).push.apply(_hunk$lines2, _toConsumableArray(collectChange(their))); + } else if (mineCurrent[0] === '-' && theirCurrent[0] === ' ') { + // Mine removed or edited + removal(hunk, mine, their); + } else if (theirCurrent[0] === '-' && mineCurrent[0] === ' ') { + // Their removed or edited + removal(hunk, their, mine, true); + } else if (mineCurrent === theirCurrent) { + // Context identity + hunk.lines.push(mineCurrent); + mine.index++; + their.index++; + } else { + // Context mismatch + conflict(hunk, collectChange(mine), collectChange(their)); + } + } // Now push anything that may be remaining + + + insertTrailing(hunk, mine); + insertTrailing(hunk, their); + calcLineCount(hunk); + } + + function mutualChange(hunk, mine, their) { + var myChanges = collectChange(mine), + theirChanges = collectChange(their); + + if (allRemoves(myChanges) && allRemoves(theirChanges)) { + // Special case for remove changes that are supersets of one another + if (arrayStartsWith(myChanges, theirChanges) && skipRemoveSuperset(their, myChanges, myChanges.length - theirChanges.length)) { + var _hunk$lines3; + + (_hunk$lines3 = hunk.lines).push.apply(_hunk$lines3, _toConsumableArray(myChanges)); + + return; + } else if (arrayStartsWith(theirChanges, myChanges) && skipRemoveSuperset(mine, theirChanges, theirChanges.length - myChanges.length)) { + var _hunk$lines4; + + (_hunk$lines4 = hunk.lines).push.apply(_hunk$lines4, _toConsumableArray(theirChanges)); + + return; + } + } else if (arrayEqual(myChanges, theirChanges)) { + var _hunk$lines5; + + (_hunk$lines5 = hunk.lines).push.apply(_hunk$lines5, _toConsumableArray(myChanges)); + + return; + } + + conflict(hunk, myChanges, theirChanges); + } + + function removal(hunk, mine, their, swap) { + var myChanges = collectChange(mine), + theirChanges = collectContext(their, myChanges); + + if (theirChanges.merged) { + var _hunk$lines6; + + (_hunk$lines6 = hunk.lines).push.apply(_hunk$lines6, _toConsumableArray(theirChanges.merged)); + } else { + conflict(hunk, swap ? theirChanges : myChanges, swap ? myChanges : theirChanges); + } + } + + function conflict(hunk, mine, their) { + hunk.conflict = true; + hunk.lines.push({ + conflict: true, + mine: mine, + theirs: their + }); + } + + function insertLeading(hunk, insert, their) { + while (insert.offset < their.offset && insert.index < insert.lines.length) { + var line = insert.lines[insert.index++]; + hunk.lines.push(line); + insert.offset++; + } + } + + function insertTrailing(hunk, insert) { + while (insert.index < insert.lines.length) { + var line = insert.lines[insert.index++]; + hunk.lines.push(line); + } + } + + function collectChange(state) { + var ret = [], + operation = state.lines[state.index][0]; + + while (state.index < state.lines.length) { + var line = state.lines[state.index]; // Group additions that are immediately after subtractions and treat them as one "atomic" modify change. + + if (operation === '-' && line[0] === '+') { + operation = '+'; + } + + if (operation === line[0]) { + ret.push(line); + state.index++; + } else { + break; + } + } + + return ret; + } + + function collectContext(state, matchChanges) { + var changes = [], + merged = [], + matchIndex = 0, + contextChanges = false, + conflicted = false; + + while (matchIndex < matchChanges.length && state.index < state.lines.length) { + var change = state.lines[state.index], + match = matchChanges[matchIndex]; // Once we've hit our add, then we are done + + if (match[0] === '+') { + break; + } + + contextChanges = contextChanges || change[0] !== ' '; + merged.push(match); + matchIndex++; // Consume any additions in the other block as a conflict to attempt + // to pull in the remaining context after this + + if (change[0] === '+') { + conflicted = true; + + while (change[0] === '+') { + changes.push(change); + change = state.lines[++state.index]; + } + } + + if (match.substr(1) === change.substr(1)) { + changes.push(change); + state.index++; + } else { + conflicted = true; + } + } + + if ((matchChanges[matchIndex] || '')[0] === '+' && contextChanges) { + conflicted = true; + } + + if (conflicted) { + return changes; + } + + while (matchIndex < matchChanges.length) { + merged.push(matchChanges[matchIndex++]); + } + + return { + merged: merged, + changes: changes + }; + } + + function allRemoves(changes) { + return changes.reduce(function (prev, change) { + return prev && change[0] === '-'; + }, true); + } + + function skipRemoveSuperset(state, removeChanges, delta) { + for (var i = 0; i < delta; i++) { + var changeContent = removeChanges[removeChanges.length - delta + i].substr(1); + + if (state.lines[state.index + i] !== ' ' + changeContent) { + return false; + } + } + + state.index += delta; + return true; + } + + function calcOldNewLineCount(lines) { + var oldLines = 0; + var newLines = 0; + lines.forEach(function (line) { + if (typeof line !== 'string') { + var myCount = calcOldNewLineCount(line.mine); + var theirCount = calcOldNewLineCount(line.theirs); + + if (oldLines !== undefined) { + if (myCount.oldLines === theirCount.oldLines) { + oldLines += myCount.oldLines; + } else { + oldLines = undefined; + } + } + + if (newLines !== undefined) { + if (myCount.newLines === theirCount.newLines) { + newLines += myCount.newLines; + } else { + newLines = undefined; + } + } + } else { + if (newLines !== undefined && (line[0] === '+' || line[0] === ' ')) { + newLines++; + } + + if (oldLines !== undefined && (line[0] === '-' || line[0] === ' ')) { + oldLines++; + } + } + }); + return { + oldLines: oldLines, + newLines: newLines + }; + } + + // See: http://code.google.com/p/google-diff-match-patch/wiki/API + function convertChangesToDMP(changes) { + var ret = [], + change, + operation; + + for (var i = 0; i < changes.length; i++) { + change = changes[i]; + + if (change.added) { + operation = 1; + } else if (change.removed) { + operation = -1; + } else { + operation = 0; + } + + ret.push([operation, change.value]); + } + + return ret; + } + + function convertChangesToXML(changes) { + var ret = []; + + for (var i = 0; i < changes.length; i++) { + var change = changes[i]; + + if (change.added) { + ret.push(''); + } else if (change.removed) { + ret.push(''); + } + + ret.push(escapeHTML(change.value)); + + if (change.added) { + ret.push(''); + } else if (change.removed) { + ret.push(''); + } + } + + return ret.join(''); + } + + function escapeHTML(s) { + var n = s; + n = n.replace(/&/g, '&'); + n = n.replace(//g, '>'); + n = n.replace(/"/g, '"'); + return n; + } + + /* See LICENSE file for terms of use */ + + exports.Diff = Diff; + exports.diffChars = diffChars; + exports.diffWords = diffWords; + exports.diffWordsWithSpace = diffWordsWithSpace; + exports.diffLines = diffLines; + exports.diffTrimmedLines = diffTrimmedLines; + exports.diffSentences = diffSentences; + exports.diffCss = diffCss; + exports.diffJson = diffJson; + exports.diffArrays = diffArrays; + exports.structuredPatch = structuredPatch; + exports.createTwoFilesPatch = createTwoFilesPatch; + exports.createPatch = createPatch; + exports.applyPatch = applyPatch; + exports.applyPatches = applyPatches; + exports.parsePatch = parsePatch; + exports.merge = merge; + exports.convertChangesToDMP = convertChangesToDMP; + exports.convertChangesToXML = convertChangesToXML; + exports.canonicalize = canonicalize; + + Object.defineProperty(exports, '__esModule', { value: true }); + +})); diff --git a/node_modules/diff/dist/diff.min.js b/node_modules/diff/dist/diff.min.js new file mode 100644 index 0000000..0ece867 --- /dev/null +++ b/node_modules/diff/dist/diff.min.js @@ -0,0 +1 @@ +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e=e||self).Diff={})}(this,function(e){"use strict";function t(){}function g(e,n,t,r,i){for(var o=0,s=n.length,l=0,a=0;oe.length?t:e}),u.value=e.join(d)}else u.value=e.join(t.slice(l,l+u.count));l+=u.count,u.added||(a+=u.count)}}var c=n[s-1];return 1=c&&h<=r+1)return d([{value:this.join(u),count:u.length}]);function i(){for(var e=-1*p;e<=p;e+=2){var n=void 0,t=v[e-1],r=v[e+1],i=(r?r.newPos:0)-e;t&&(v[e-1]=void 0);var o=t&&t.newPos+1=c&&h<=i+1)return d(g(f,n.components,u,a,f.useLongestToken));v[e]=n}else v[e]=void 0}var l;p++}if(n)!function e(){setTimeout(function(){if(t=v.length-2&&t.length<=p.context){var u=/\n$/.test(c),f=/\n$/.test(h),d=0==t.length&&x.length>a.oldLines;!u&&d&&x.splice(a.oldLines,0,"\\ No newline at end of file"),(u||d)&&f||x.push("\\ No newline at end of file")}m.push(a),y=w=0,x=[]}L+=t.length,S+=t.length}},o=0;oe.length)return!1;for(var t=0;t"):r.removed&&n.push(""),n.push((i=r.value,void 0,i.replace(/&/g,"&").replace(//g,">").replace(/"/g,"""))),r.added?n.push(""):r.removed&&n.push("")}var i;return n.join("")},e.canonicalize=v,Object.defineProperty(e,"__esModule",{value:!0})}); \ No newline at end of file diff --git a/node_modules/diff/lib/convert/dmp.js b/node_modules/diff/lib/convert/dmp.js new file mode 100644 index 0000000..91ff40a --- /dev/null +++ b/node_modules/diff/lib/convert/dmp.js @@ -0,0 +1,32 @@ +/*istanbul ignore start*/ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.convertChangesToDMP = convertChangesToDMP; + +/*istanbul ignore end*/ +// See: http://code.google.com/p/google-diff-match-patch/wiki/API +function convertChangesToDMP(changes) { + var ret = [], + change, + operation; + + for (var i = 0; i < changes.length; i++) { + change = changes[i]; + + if (change.added) { + operation = 1; + } else if (change.removed) { + operation = -1; + } else { + operation = 0; + } + + ret.push([operation, change.value]); + } + + return ret; +} +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb252ZXJ0L2RtcC5qcyJdLCJuYW1lcyI6WyJjb252ZXJ0Q2hhbmdlc1RvRE1QIiwiY2hhbmdlcyIsInJldCIsImNoYW5nZSIsIm9wZXJhdGlvbiIsImkiLCJsZW5ndGgiLCJhZGRlZCIsInJlbW92ZWQiLCJwdXNoIiwidmFsdWUiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OztBQUFBO0FBQ08sU0FBU0EsbUJBQVQsQ0FBNkJDLE9BQTdCLEVBQXNDO0FBQzNDLE1BQUlDLEdBQUcsR0FBRyxFQUFWO0FBQUEsTUFDSUMsTUFESjtBQUFBLE1BRUlDLFNBRko7O0FBR0EsT0FBSyxJQUFJQyxDQUFDLEdBQUcsQ0FBYixFQUFnQkEsQ0FBQyxHQUFHSixPQUFPLENBQUNLLE1BQTVCLEVBQW9DRCxDQUFDLEVBQXJDLEVBQXlDO0FBQ3ZDRixJQUFBQSxNQUFNLEdBQUdGLE9BQU8sQ0FBQ0ksQ0FBRCxDQUFoQjs7QUFDQSxRQUFJRixNQUFNLENBQUNJLEtBQVgsRUFBa0I7QUFDaEJILE1BQUFBLFNBQVMsR0FBRyxDQUFaO0FBQ0QsS0FGRCxNQUVPLElBQUlELE1BQU0sQ0FBQ0ssT0FBWCxFQUFvQjtBQUN6QkosTUFBQUEsU0FBUyxHQUFHLENBQUMsQ0FBYjtBQUNELEtBRk0sTUFFQTtBQUNMQSxNQUFBQSxTQUFTLEdBQUcsQ0FBWjtBQUNEOztBQUVERixJQUFBQSxHQUFHLENBQUNPLElBQUosQ0FBUyxDQUFDTCxTQUFELEVBQVlELE1BQU0sQ0FBQ08sS0FBbkIsQ0FBVDtBQUNEOztBQUNELFNBQU9SLEdBQVA7QUFDRCIsInNvdXJjZXNDb250ZW50IjpbIi8vIFNlZTogaHR0cDovL2NvZGUuZ29vZ2xlLmNvbS9wL2dvb2dsZS1kaWZmLW1hdGNoLXBhdGNoL3dpa2kvQVBJXG5leHBvcnQgZnVuY3Rpb24gY29udmVydENoYW5nZXNUb0RNUChjaGFuZ2VzKSB7XG4gIGxldCByZXQgPSBbXSxcbiAgICAgIGNoYW5nZSxcbiAgICAgIG9wZXJhdGlvbjtcbiAgZm9yIChsZXQgaSA9IDA7IGkgPCBjaGFuZ2VzLmxlbmd0aDsgaSsrKSB7XG4gICAgY2hhbmdlID0gY2hhbmdlc1tpXTtcbiAgICBpZiAoY2hhbmdlLmFkZGVkKSB7XG4gICAgICBvcGVyYXRpb24gPSAxO1xuICAgIH0gZWxzZSBpZiAoY2hhbmdlLnJlbW92ZWQpIHtcbiAgICAgIG9wZXJhdGlvbiA9IC0xO1xuICAgIH0gZWxzZSB7XG4gICAgICBvcGVyYXRpb24gPSAwO1xuICAgIH1cblxuICAgIHJldC5wdXNoKFtvcGVyYXRpb24sIGNoYW5nZS52YWx1ZV0pO1xuICB9XG4gIHJldHVybiByZXQ7XG59XG4iXX0= diff --git a/node_modules/diff/lib/convert/xml.js b/node_modules/diff/lib/convert/xml.js new file mode 100644 index 0000000..69ec60c --- /dev/null +++ b/node_modules/diff/lib/convert/xml.js @@ -0,0 +1,42 @@ +/*istanbul ignore start*/ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.convertChangesToXML = convertChangesToXML; + +/*istanbul ignore end*/ +function convertChangesToXML(changes) { + var ret = []; + + for (var i = 0; i < changes.length; i++) { + var change = changes[i]; + + if (change.added) { + ret.push(''); + } else if (change.removed) { + ret.push(''); + } + + ret.push(escapeHTML(change.value)); + + if (change.added) { + ret.push(''); + } else if (change.removed) { + ret.push(''); + } + } + + return ret.join(''); +} + +function escapeHTML(s) { + var n = s; + n = n.replace(/&/g, '&'); + n = n.replace(//g, '>'); + n = n.replace(/"/g, '"'); + return n; +} +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb252ZXJ0L3htbC5qcyJdLCJuYW1lcyI6WyJjb252ZXJ0Q2hhbmdlc1RvWE1MIiwiY2hhbmdlcyIsInJldCIsImkiLCJsZW5ndGgiLCJjaGFuZ2UiLCJhZGRlZCIsInB1c2giLCJyZW1vdmVkIiwiZXNjYXBlSFRNTCIsInZhbHVlIiwiam9pbiIsInMiLCJuIiwicmVwbGFjZSJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQU8sU0FBU0EsbUJBQVQsQ0FBNkJDLE9BQTdCLEVBQXNDO0FBQzNDLE1BQUlDLEdBQUcsR0FBRyxFQUFWOztBQUNBLE9BQUssSUFBSUMsQ0FBQyxHQUFHLENBQWIsRUFBZ0JBLENBQUMsR0FBR0YsT0FBTyxDQUFDRyxNQUE1QixFQUFvQ0QsQ0FBQyxFQUFyQyxFQUF5QztBQUN2QyxRQUFJRSxNQUFNLEdBQUdKLE9BQU8sQ0FBQ0UsQ0FBRCxDQUFwQjs7QUFDQSxRQUFJRSxNQUFNLENBQUNDLEtBQVgsRUFBa0I7QUFDaEJKLE1BQUFBLEdBQUcsQ0FBQ0ssSUF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hNTChjaGFuZ2VzKSB7XG4gIGxldCByZXQgPSBbXTtcbiAgZm9yIChsZXQgaSA9IDA7IGkgPCBjaGFuZ2VzLmxlbmd0aDsgaSsrKSB7XG4gICAgbGV0IGNoYW5nZSA9IGNoYW5nZXNbaV07XG4gICAgaWYgKGNoYW5nZS5hZGRlZCkge1xuICAgICAgcmV0LnB1c2goJzxpbnM+Jyk7XG4gICAgfSBlbHNlIGlmIChjaGFuZ2UucmVtb3ZlZCkge1xuICAgICAgcmV0LnB1c2goJzxkZWw+Jyk7XG4gICAgfVxuXG4gICAgcmV0LnB1c2goZXNjYXBlSFRNTChjaGFuZ2UudmFsdWUpKTtcblxuICAgIGlmIChjaGFuZ2UuYWRkZWQpIHtcbiAgICAgIHJldC5wdXNoKCc8L2lucz4nKTtcbiAgICB9IGVsc2UgaWYgKGNoYW5nZS5yZW1vdmVkKSB7XG4gICAgICByZXQucHVzaCgnPC9kZWw+Jyk7XG4gICAgfVxuICB9XG4gIHJldHVybiByZXQuam9pbignJyk7XG59XG5cbmZ1bmN0aW9uIGVzY2FwZUhUTUwocykge1xuICBsZXQgbiA9IHM7XG4gIG4gPSBuLnJlcGxhY2UoLyYvZywgJyZhbXA7Jyk7XG4gIG4gPSBuLnJlcGxhY2UoLzwvZywgJyZsdDsnKTtcbiAgbiA9IG4ucmVwbGFjZSgvPi9nLCAnJmd0OycpO1xuICBuID0gbi5yZXBsYWNlKC9cIi9nLCAnJnF1b3Q7Jyk7XG5cbiAgcmV0dXJuIG47XG59XG4iXX0= diff --git a/node_modules/diff/lib/diff/array.js b/node_modules/diff/lib/diff/array.js new file mode 100644 index 0000000..81f42ea --- /dev/null +++ b/node_modules/diff/lib/diff/array.js @@ -0,0 +1,45 @@ +/*istanbul ignore start*/ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.diffArrays = diffArrays; +exports.arrayDiff = void 0; + +/*istanbul ignore end*/ +var +/*istanbul ignore start*/ +_base = _interopRequireDefault(require("./base")) +/*istanbul ignore end*/ +; + +/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/*istanbul ignore end*/ +var arrayDiff = new +/*istanbul ignore start*/ +_base +/*istanbul ignore end*/ +. +/*istanbul ignore start*/ +default +/*istanbul ignore end*/ +(); + +/*istanbul ignore start*/ +exports.arrayDiff = arrayDiff; + +/*istanbul ignore end*/ +arrayDiff.tokenize = function (value) { + return value.slice(); +}; + +arrayDiff.join = arrayDiff.removeEmpty = function (value) { + return value; +}; + +function diffArrays(oldArr, newArr, callback) { + return arrayDiff.diff(oldArr, newArr, callback); +} +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL2FycmF5LmpzIl0sIm5hbWVzIjpbImFycmF5RGlmZiIsIkRpZmYiLCJ0b2tlbml6ZSIsInZhbHVlIiwic2xpY2UiLCJqb2luIiwicmVtb3ZlRW1wdHkiLCJkaWZmQXJyYXlzIiwib2xkQXJyIiwibmV3QXJyIiwiY2FsbGJhY2siLCJkaWZmIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTs7Ozs7QUFFTyxJQUFNQSxTQUFTLEdBQUc7QUFBSUM7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBSjtBQUFBLEVBQWxCOzs7Ozs7QUFDUEQsU0FBUyxDQUFDRSxRQUFWLEdBQXFCLFVBQVNDLEtBQVQsRUFBZ0I7QUFDbkMsU0FBT0EsS0FBSyxDQUFDQyxLQUFOLEVBQVA7QUFDRCxDQUZEOztBQUdBSixTQUFTLENBQUNLLElBQVYsR0FBaUJMLFNBQVMsQ0FBQ00sV0FBVixHQUF3QixVQUFTSCxLQUFULEVBQWdCO0FBQ3ZELFNBQU9BLEtBQVA7QUFDRCxDQUZEOztBQUlPLFNBQVNJLFVBQVQsQ0FBb0JDLE1BQXBCLEVBQTRCQyxNQUE1QixFQUFvQ0MsUUFBcEMsRUFBOEM7QUFBRSxTQUFPVixTQUFTLENBQUNXLElBQVYsQ0FBZUgsTUFBZixFQUF1QkMsTUFBdkIsRUFBK0JDLFFBQS9CLENBQVA7QUFBa0QiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgRGlmZiBmcm9tICcuL2Jhc2UnO1xuXG5leHBvcnQgY29uc3QgYXJyYXlEaWZmID0gbmV3IERpZmYoKTtcbmFycmF5RGlmZi50b2tlbml6ZSA9IGZ1bmN0aW9uKHZhbHVlKSB7XG4gIHJldHVybiB2YWx1ZS5zbGljZSgpO1xufTtcbmFycmF5RGlmZi5qb2luID0gYXJyYXlEaWZmLnJlbW92ZUVtcHR5ID0gZnVuY3Rpb24odmFsdWUpIHtcbiAgcmV0dXJuIHZhbHVlO1xufTtcblxuZXhwb3J0IGZ1bmN0aW9uIGRpZmZBcnJheXMob2xkQXJyLCBuZXdBcnIsIGNhbGxiYWNrKSB7IHJldHVybiBhcnJheURpZmYuZGlmZihvbGRBcnIsIG5ld0FyciwgY2FsbGJhY2spOyB9XG4iXX0= diff --git a/node_modules/diff/lib/diff/base.js b/node_modules/diff/lib/diff/base.js new file mode 100644 index 0000000..ea661fe --- /dev/null +++ b/node_modules/diff/lib/diff/base.js @@ -0,0 +1,304 @@ +/*istanbul ignore start*/ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = Diff; + +/*istanbul ignore end*/ +function Diff() {} + +Diff.prototype = { + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + diff: function diff(oldString, newString) { + /*istanbul ignore start*/ + var + /*istanbul ignore end*/ + options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var callback = options.callback; + + if (typeof options === 'function') { + callback = options; + options = {}; + } + + this.options = options; + var self = this; + + function done(value) { + if (callback) { + setTimeout(function () { + callback(undefined, value); + }, 0); + return true; + } else { + return value; + } + } // Allow subclasses to massage the input prior to running + + + oldString = this.castInput(oldString); + newString = this.castInput(newString); + oldString = this.removeEmpty(this.tokenize(oldString)); + newString = this.removeEmpty(this.tokenize(newString)); + var newLen = newString.length, + oldLen = oldString.length; + var editLength = 1; + var maxEditLength = newLen + oldLen; + var bestPath = [{ + newPos: -1, + components: [] + }]; // Seed editLength = 0, i.e. the content starts with the same values + + var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0); + + if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) { + // Identity per the equality and tokenizer + return done([{ + value: this.join(newString), + count: newString.length + }]); + } // Main worker method. checks all permutations of a given edit length for acceptance. + + + function execEditLength() { + for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) { + var basePath = + /*istanbul ignore start*/ + void 0 + /*istanbul ignore end*/ + ; + + var addPath = bestPath[diagonalPath - 1], + removePath = bestPath[diagonalPath + 1], + _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; + + if (addPath) { + // No one else is going to attempt to use this value, clear it + bestPath[diagonalPath - 1] = undefined; + } + + var canAdd = addPath && addPath.newPos + 1 < newLen, + canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen; + + if (!canAdd && !canRemove) { + // If this path is a terminal then prune + bestPath[diagonalPath] = undefined; + continue; + } // Select the diagonal that we want to branch from. We select the prior + // path whose position in the new string is the farthest from the origin + // and does not pass the bounds of the diff graph + + + if (!canAdd || canRemove && addPath.newPos < removePath.newPos) { + basePath = clonePath(removePath); + self.pushComponent(basePath.components, undefined, true); + } else { + basePath = addPath; // No need to clone, we've pulled it from the list + + basePath.newPos++; + self.pushComponent(basePath.components, true, undefined); + } + + _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath); // If we have hit the end of both strings, then we are done + + if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) { + return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken)); + } else { + // Otherwise track this path as a potential candidate and continue. + bestPath[diagonalPath] = basePath; + } + } + + editLength++; + } // Performs the length of edit iteration. Is a bit fugly as this has to support the + // sync and async mode which is never fun. Loops over execEditLength until a value + // is produced. + + + if (callback) { + (function exec() { + setTimeout(function () { + // This should not happen, but we want to be safe. + + /* istanbul ignore next */ + if (editLength > maxEditLength) { + return callback(); + } + + if (!execEditLength()) { + exec(); + } + }, 0); + })(); + } else { + while (editLength <= maxEditLength) { + var ret = execEditLength(); + + if (ret) { + return ret; + } + } + } + }, + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + pushComponent: function pushComponent(components, added, removed) { + var last = components[components.length - 1]; + + if (last && last.added === added && last.removed === removed) { + // We need to clone here as the component clone operation is just + // as shallow array clone + components[components.length - 1] = { + count: last.count + 1, + added: added, + removed: removed + }; + } else { + components.push({ + count: 1, + added: added, + removed: removed + }); + } + }, + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) { + var newLen = newString.length, + oldLen = oldString.length, + newPos = basePath.newPos, + oldPos = newPos - diagonalPath, + commonCount = 0; + + while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) { + newPos++; + oldPos++; + commonCount++; + } + + if (commonCount) { + basePath.components.push({ + count: commonCount + }); + } + + basePath.newPos = newPos; + return oldPos; + }, + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + equals: function equals(left, right) { + if (this.options.comparator) { + return this.options.comparator(left, right); + } else { + return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase(); + } + }, + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + removeEmpty: function removeEmpty(array) { + var ret = []; + + for (var i = 0; i < array.length; i++) { + if (array[i]) { + ret.push(array[i]); + } + } + + return ret; + }, + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + castInput: function castInput(value) { + return value; + }, + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + tokenize: function tokenize(value) { + return value.split(''); + }, + + /*istanbul ignore start*/ + + /*istanbul ignore end*/ + join: function join(chars) { + return chars.join(''); + } +}; + +function buildValues(diff, components, newString, oldString, useLongestToken) { + var componentPos = 0, + componentLen = components.length, + newPos = 0, + oldPos = 0; + + for (; componentPos < componentLen; componentPos++) { + var component = components[componentPos]; + + if (!component.removed) { + if (!component.added && useLongestToken) { + var value = newString.slice(newPos, newPos + component.count); + value = value.map(function (value, i) { + var oldValue = oldString[oldPos + i]; + return oldValue.length > value.length ? oldValue : value; + }); + component.value = diff.join(value); + } else { + component.value = diff.join(newString.slice(newPos, newPos + component.count)); + } + + newPos += component.count; // Common case + + if (!component.added) { + oldPos += component.count; + } + } else { + component.value = diff.join(oldString.slice(oldPos, oldPos + component.count)); + oldPos += component.count; // Reverse add and remove so removes are output first to match common convention + // The diffing algorithm is tied to add then remove output and this is the simplest + // route to get the desired output with minimal overhead. + + if (componentPos && components[componentPos - 1].added) { + var tmp = components[componentPos - 1]; + components[componentPos - 1] = components[componentPos]; + components[componentPos] = tmp; + } + } + } // Special case handle for when one terminal is ignored (i.e. whitespace). + // For this case we merge the terminal into the prior string and drop the change. + // This is only available for string mode. + + + var lastComponent = components[componentLen - 1]; + + if (componentLen > 1 && typeof lastComponent.value === 'string' && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) { + components[componentLen - 2].value += lastComponent.value; + components.pop(); + } + + return components; +} + +function clonePath(path) { + return { + newPos: path.newPos, + components: path.components.slice(0) + }; +} +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL2Jhc2UuanMiXSwibmFtZXMiOlsiRGlmZiIsInByb3RvdHlwZSIsImRpZmYiLCJvbGRTdHJpbmciLCJuZXdTdHJpbmciLCJvcHRpb25zIiwiY2FsbGJhY2siLCJzZWxmIiwiZG9uZSIsInZhbHVlIiwic2V0VGltZW91dCIsInVuZGVmaW5lZCIsImNhc3RJbnB1dCIsInJlbW92ZUVtcHR5IiwidG9r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IGxhc3RDb21wb25lbnQudmFsdWUgPT09ICdzdHJpbmcnXG4gICAgICAmJiAobGFzdENvbXBvbmVudC5hZGRlZCB8fCBsYXN0Q29tcG9uZW50LnJlbW92ZWQpXG4gICAgICAmJiBkaWZmLmVxdWFscygnJywgbGFzdENvbXBvbmVudC52YWx1ZSkpIHtcbiAgICBjb21wb25lbnRzW2NvbXBvbmVudExlbiAtIDJdLnZhbHVlICs9IGxhc3RDb21wb25lbnQudmFsdWU7XG4gICAgY29tcG9uZW50cy5wb3AoKTtcbiAgfVxuXG4gIHJldHVybiBjb21wb25lbnRzO1xufVxuXG5mdW5jdGlvbiBjbG9uZVBhdGgocGF0aCkge1xuICByZXR1cm4geyBuZXdQb3M6IHBhdGgubmV3UG9zLCBjb21wb25lbnRzOiBwYXRoLmNvbXBvbmVudHMuc2xpY2UoMCkgfTtcbn1cbiJdfQ== diff --git a/node_modules/diff/lib/diff/character.js b/node_modules/diff/lib/diff/character.js new file mode 100644 index 0000000..4722b16 --- /dev/null +++ b/node_modules/diff/lib/diff/character.js @@ -0,0 +1,37 @@ +/*istanbul ignore start*/ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.diffChars = diffChars; +exports.characterDiff = void 0; + +/*istanbul ignore end*/ +var +/*istanbul ignore start*/ +_base = _interopRequireDefault(require("./base")) +/*istanbul ignore end*/ +; + +/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/*istanbul ignore end*/ +var characterDiff = new +/*istanbul ignore start*/ +_base +/*istanbul ignore end*/ +. +/*istanbul ignore start*/ +default +/*istanbul ignore end*/ +(); + +/*istanbul ignore start*/ +exports.characterDiff = characterDiff; + +/*istanbul ignore end*/ +function diffChars(oldStr, newStr, options) { + return characterDiff.diff(oldStr, newStr, options); +} +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL2NoYXJhY3Rlci5qcyJdLCJuYW1lcyI6WyJjaGFyYWN0ZXJEaWZmIiwiRGlmZiIsImRpZmZDaGFycyIsIm9sZFN0ciIsIm5ld1N0ciIsIm9wdGlvbnMiLCJkaWZmIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTs7Ozs7QUFFTyxJQUFNQSxhQUFhLEdBQUc7QUFBSUM7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBSjtBQUFBLEVBQXRCOzs7Ozs7QUFDQSxTQUFTQyxTQUFULENBQW1CQyxNQUFuQixFQUEyQkMsTUFBM0IsRUFBbUNDLE9BQW5DLEVBQTRDO0FBQUUsU0FBT0wsYUFBYSxDQUFDTSxJQUFkLENBQW1CSCxNQUFuQixFQUEyQkMsTUFBM0IsRUFBbUNDLE9BQW5DLENBQVA7QUFBcUQiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgRGlmZiBmcm9tICcuL2Jhc2UnO1xuXG5leHBvcnQgY29uc3QgY2hhcmFjdGVyRGlmZiA9IG5ldyBEaWZmKCk7XG5leHBvcnQgZnVuY3Rpb24gZGlmZkNoYXJzKG9sZFN0ciwgbmV3U3RyLCBvcHRpb25zKSB7IHJldHVybiBjaGFyYWN0ZXJEaWZmLmRpZmYob2xkU3RyLCBuZXdTdHIsIG9wdGlvbnMpOyB9XG4iXX0= diff --git a/node_modules/diff/lib/diff/css.js b/node_modules/diff/lib/diff/css.js new file mode 100644 index 0000000..69ba47e --- /dev/null +++ b/node_modules/diff/lib/diff/css.js @@ -0,0 +1,41 @@ +/*istanbul ignore start*/ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.diffCss = diffCss; +exports.cssDiff = void 0; + +/*istanbul ignore end*/ +var +/*istanbul ignore start*/ +_base = _interopRequireDefault(require("./base")) +/*istanbul ignore end*/ +; + +/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/*istanbul ignore end*/ +var cssDiff = new +/*istanbul ignore start*/ +_base +/*istanbul ignore end*/ +. +/*istanbul ignore start*/ +default +/*istanbul ignore end*/ +(); + +/*istanbul ignore start*/ +exports.cssDiff = cssDiff; + +/*istanbul ignore end*/ +cssDiff.tokenize = function (value) { + return value.split(/([{}:;,]|\s+)/); +}; + +function diffCss(oldStr, newStr, callback) { + return cssDiff.diff(oldStr, newStr, callback); +} +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL2Nzcy5qcyJdLCJuYW1lcyI6WyJjc3NEaWZmIiwiRGlmZiIsInRva2VuaXplIiwidmFsdWUiLCJzcGxpdCIsImRpZmZDc3MiLCJvbGRTdHIiLCJuZXdTdHIiLCJjYWxsYmFjayIsImRpZmYiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBOzs7OztBQUVPLElBQU1BLE9BQU8sR0FBRztBQUFJQztBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFKO0FBQUEsRUFBaEI7Ozs7OztBQUNQRCxPQUFPLENBQUNFLFFBQVIsR0FBbUIsVUFBU0MsS0FBVCxFQUFnQjtBQUNqQyxTQUFPQSxLQUFLLENBQUNDLEtBQU4sQ0FBWSxlQUFaLENBQVA7QUFDRCxDQUZEOztBQUlPLFNBQVNDLE9BQVQsQ0FBaUJDLE1BQWpCLEVBQXlCQyxNQUF6QixFQUFpQ0MsUUFBakMsRUFBMkM7QUFBRSxTQUFPUixPQUFPLENBQUNTLElBQVIsQ0FBYUgsTUFBYixFQUFxQkMsTUFBckIsRUFBNkJDLFFBQTdCLENBQVA7QUFBZ0QiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgRGlmZiBmcm9tICcuL2Jhc2UnO1xuXG5leHBvcnQgY29uc3QgY3NzRGlmZiA9IG5ldyBEaWZmKCk7XG5jc3NEaWZmLnRva2VuaXplID0gZnVuY3Rpb24odmFsdWUpIHtcbiAgcmV0dXJuIHZhbHVlLnNwbGl0KC8oW3t9OjssXXxcXHMrKS8pO1xufTtcblxuZXhwb3J0IGZ1bmN0aW9uIGRpZmZDc3Mob2xkU3RyLCBuZXdTdHIsIGNhbGxiYWNrKSB7IHJldHVybiBjc3NEaWZmLmRpZmYob2xkU3RyLCBuZXdTdHIsIGNhbGxiYWNrKTsgfVxuIl19 diff --git a/node_modules/diff/lib/diff/json.js b/node_modules/diff/lib/diff/json.js new file mode 100644 index 0000000..715ef08 --- /dev/null +++ b/node_modules/diff/lib/diff/json.js @@ -0,0 +1,163 @@ +/*istanbul ignore start*/ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.diffJson = diffJson; +exports.canonicalize = canonicalize; +exports.jsonDiff = void 0; + +/*istanbul ignore end*/ +var +/*istanbul ignore start*/ +_base = _interopRequireDefault(require("./base")) +/*istanbul ignore end*/ +; + +var +/*istanbul ignore start*/ +_line = require("./line") +/*istanbul ignore end*/ +; + +/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +/*istanbul ignore end*/ +var objectPrototypeToString = Object.prototype.toString; +var jsonDiff = new +/*istanbul ignore start*/ +_base +/*istanbul ignore end*/ +. +/*istanbul ignore start*/ +default +/*istanbul ignore end*/ +(); // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a +// dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output: + +/*istanbul ignore start*/ +exports.jsonDiff = jsonDiff; + +/*istanbul ignore end*/ +jsonDiff.useLongestToken = true; +jsonDiff.tokenize = +/*istanbul ignore start*/ +_line +/*istanbul ignore end*/ +. +/*istanbul ignore start*/ +lineDiff +/*istanbul ignore end*/ +.tokenize; + +jsonDiff.castInput = function (value) { + /*istanbul ignore start*/ + var _this$options = + /*istanbul ignore end*/ + this.options, + undefinedReplacement = _this$options.undefinedReplacement, + _this$options$stringi = _this$options.stringifyReplacer, + stringifyReplacer = _this$options$stringi === void 0 ? function (k, v) + /*istanbul ignore start*/ + { + return ( + /*istanbul ignore end*/ + typeof v === 'undefined' ? undefinedReplacement : v + ); + } : _this$options$stringi; + return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, ' '); +}; + +jsonDiff.equals = function (left, right) { + return ( + /*istanbul ignore start*/ + _base + /*istanbul ignore end*/ + . + /*istanbul ignore start*/ + default + /*istanbul ignore end*/ + .prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1')) + ); +}; + +function diffJson(oldObj, newObj, options) { + return jsonDiff.diff(oldObj, newObj, options); +} // This function handles the presence of circular references by bailing out when encountering an +// object that is already on the "stack" of items being processed. Accepts an optional replacer + + +function canonicalize(obj, stack, replacementStack, replacer, key) { + stack = stack || []; + replacementStack = replacementStack || []; + + if (replacer) { + obj = replacer(key, obj); + } + + var i; + + for (i = 0; i < stack.length; i += 1) { + if (stack[i] === obj) { + return replacementStack[i]; + } + } + + var canonicalizedObj; + + if ('[object Array]' === objectPrototypeToString.call(obj)) { + stack.push(obj); + canonicalizedObj = new Array(obj.length); + replacementStack.push(canonicalizedObj); + + for (i = 0; i < obj.length; i += 1) { + canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key); + } + + stack.pop(); + replacementStack.pop(); + return canonicalizedObj; + } + + if (obj && obj.toJSON) { + obj = obj.toJSON(); + } + + if ( + /*istanbul ignore start*/ + _typeof( + /*istanbul ignore end*/ + obj) === 'object' && obj !== null) { + stack.push(obj); + canonicalizedObj = {}; + replacementStack.push(canonicalizedObj); + + var sortedKeys = [], + _key; + + for (_key in obj) { + /* istanbul ignore else */ + if (obj.hasOwnProperty(_key)) { + sortedKeys.push(_key); + } + } + + sortedKeys.sort(); + + for (i = 0; i < sortedKeys.length; i += 1) { + _key = sortedKeys[i]; + canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key); + } + + stack.pop(); + replacementStack.pop(); + } else { + canonicalizedObj = obj; + } + + return canonicalizedObj; +} +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL2pzb24uanMiXSwibmFtZXMiOlsib2JqZWN0UHJvdG90eXBlVG9TdHJpbmciLCJPYmplY3QiLCJwcm90b3R5cGUiLCJ0b1N0cmluZyIsImpzb25EaWZmIiwiRGlmZiIsInVzZUxvbmdlc3RUb2tlbiIsInRva2VuaXplIiwibGluZURpZmYiLCJjYXN0SW5wdXQiLCJ2YWx1ZSIsIm9wdGlvbnMiLCJ1bmRlZmluZWRSZXBsYWNlbWVudCIsInN0cmluZ2lmeVJlcGxhY2VyIiwiayIsInYiLCJKU09OIiwic3RyaW5naWZ5IiwiY2Fub25pY2FsaXplIiwiZXF1YWxzIiwibGVmdCIsInJpZ2h0IiwiY2FsbCIsInJlcGxhY2UiLCJkaWZmSnNvbiIsIm9sZE9iaiIsIm5ld09iaiIsImRpZmYiLCJvYmoiLCJzdGFjayIsInJlcGxhY2VtZW50U3RhY2siLCJyZXBsYWNlciIsImtleSIsImkiLCJsZW5ndGgiLCJjYW5vbmljYWxpemVkT2JqIiwicHVzaCIsIkFycmF5IiwicG9wIiwidG9KU09OIiwic29ydGVkS2V5cyIsImhhc093blByb3BlcnR5Iiwic29ydCJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBOztBQUNBO0FBQUE7QUFBQTtBQUFBO0FBQU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Swgc3RhY2ssIHJlcGxhY2VtZW50U3RhY2ssIHJlcGxhY2VyLCBrZXkpO1xuICAgIH1cbiAgICBzdGFjay5wb3AoKTtcbiAgICByZXBsYWNlbWVudFN0YWNrLnBvcCgpO1xuICB9IGVsc2Uge1xuICAgIGNhbm9uaWNhbGl6ZWRPYmogPSBvYmo7XG4gIH1cbiAgcmV0dXJuIGNhbm9uaWNhbGl6ZWRPYmo7XG59XG4iXX0= diff --git a/node_modules/diff/lib/diff/line.js b/node_modules/diff/lib/diff/line.js new file mode 100644 index 0000000..f323f84 --- /dev/null +++ b/node_modules/diff/lib/diff/line.js @@ -0,0 +1,89 @@ +/*istanbul ignore start*/ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.diffLines = diffLines; +exports.diffTrimmedLines = diffTrimmedLines; +exports.lineDiff = void 0; + +/*istanbul ignore end*/ +var +/*istanbul ignore start*/ +_base = _interopRequireDefault(require("./base")) +/*istanbul ignore end*/ +; + +var +/*istanbul ignore start*/ +_params = require("../util/params") +/*istanbul ignore end*/ +; + +/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/*istanbul ignore end*/ +var lineDiff = new +/*istanbul ignore start*/ +_base +/*istanbul ignore end*/ +. +/*istanbul ignore start*/ +default +/*istanbul ignore end*/ +(); + +/*istanbul ignore start*/ +exports.lineDiff = lineDiff; + +/*istanbul ignore end*/ +lineDiff.tokenize = function (value) { + var retLines = [], + linesAndNewlines = value.split(/(\n|\r\n)/); // Ignore the final empty token that occurs if the string ends with a new line + + if (!linesAndNewlines[linesAndNewlines.length - 1]) { + linesAndNewlines.pop(); + } // Merge the content and line separators into single tokens + + + for (var i = 0; i < linesAndNewlines.length; i++) { + var line = linesAndNewlines[i]; + + if (i % 2 && !this.options.newlineIsToken) { + retLines[retLines.length - 1] += line; + } else { + if (this.options.ignoreWhitespace) { + line = line.trim(); + } + + retLines.push(line); + } + } + + return retLines; +}; + +function diffLines(oldStr, newStr, callback) { + return lineDiff.diff(oldStr, newStr, callback); +} + +function diffTrimmedLines(oldStr, newStr, callback) { + var options = + /*istanbul ignore start*/ + (0, + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + _params + /*istanbul ignore end*/ + . + /*istanbul ignore start*/ + generateOptions) + /*istanbul ignore end*/ + (callback, { + ignoreWhitespace: true + }); + return lineDiff.diff(oldStr, newStr, options); +} +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL2xpbmUuanMiXSwibmFtZXMiOlsibGluZURpZmYiLCJEaWZmIiwidG9rZW5pemUiLCJ2YWx1ZSIsInJldExpbmVzIiwibGluZXNBbmROZXdsaW5lcyIsInNwbGl0IiwibGVuZ3RoIiwicG9wIiwiaSIsImxpbmUiLCJvcHRpb25zIiwibmV3bGluZUlzVG9rZW4iLCJpZ25vcmVXaGl0ZXNwYWNlIiwidHJpbSIsInB1c2giLCJkaWZmTGluZXMiLCJvbGRTdHIiLCJuZXdTdHIiLCJjYWxsYmFjayIsImRpZmYiLCJkaWZmVHJpbW1lZExpbmVzIiwiZ2VuZXJhdGVPcHRpb25zIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7O0FBQ0E7QUFBQTtBQUFBO0FBQUE7QUFBQTs7Ozs7QUFFTyxJQUFNQSxRQUFRLEdBQUc7QUFBSUM7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBSjtBQUFBLEVBQWpCOzs7Ozs7QUFDUEQsUUFBUSxDQUFDRSxRQUFULEdBQW9CLFVBQVNDLEtBQVQsRUFBZ0I7QUFDbEMsTUFBSUMsUUFBUSxHQUFHLEVBQWY7QUFBQSxNQUNJQyxnQkFBZ0IsR0FBR0YsS0FBSyxDQUFDRyxLQUFOLENBQVksV0FBWixDQUR2QixDQURrQyxDQUlsQzs7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9ucy5uZXdsaW5lSXNUb2tlbikge1xuICAgICAgcmV0TGluZXNbcmV0TGluZXMubGVuZ3RoIC0gMV0gKz0gbGluZTtcbiAgICB9IGVsc2Uge1xuICAgICAgaWYgKHRoaXMub3B0aW9ucy5pZ25vcmVXaGl0ZXNwYWNlKSB7XG4gICAgICAgIGxpbmUgPSBsaW5lLnRyaW0oKTtcbiAgICAgIH1cbiAgICAgIHJldExpbmVzLnB1c2gobGluZSk7XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIHJldExpbmVzO1xufTtcblxuZXhwb3J0IGZ1bmN0aW9uIGRpZmZMaW5lcyhvbGRTdHIsIG5ld1N0ciwgY2FsbGJhY2spIHsgcmV0dXJuIGxpbmVEaWZmLmRpZmYob2xkU3RyLCBuZXdTdHIsIGNhbGxiYWNrKTsgfVxuZXhwb3J0IGZ1bmN0aW9uIGRpZmZUcmltbWVkTGluZXMob2xkU3RyLCBuZXdTdHIsIGNhbGxiYWNrKSB7XG4gIGxldCBvcHRpb25zID0gZ2VuZXJhdGVPcHRpb25zKGNhbGxiYWNrLCB7aWdub3JlV2hpdGVzcGFjZTogdHJ1ZX0pO1xuICByZXR1cm4gbGluZURpZmYuZGlmZihvbGRTdHIsIG5ld1N0ciwgb3B0aW9ucyk7XG59XG4iXX0= diff --git a/node_modules/diff/lib/diff/sentence.js b/node_modules/diff/lib/diff/sentence.js new file mode 100644 index 0000000..9ee96e9 --- /dev/null +++ b/node_modules/diff/lib/diff/sentence.js @@ -0,0 +1,41 @@ +/*istanbul ignore start*/ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.diffSentences = diffSentences; +exports.sentenceDiff = void 0; + +/*istanbul ignore end*/ +var +/*istanbul ignore start*/ +_base = _interopRequireDefault(require("./base")) +/*istanbul ignore end*/ +; + +/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/*istanbul ignore end*/ +var sentenceDiff = new +/*istanbul ignore start*/ +_base +/*istanbul ignore end*/ +. +/*istanbul ignore start*/ +default +/*istanbul ignore end*/ +(); + +/*istanbul ignore start*/ +exports.sentenceDiff = sentenceDiff; + +/*istanbul ignore end*/ +sentenceDiff.tokenize = function (value) { + return value.split(/(\S.+?[.!?])(?=\s+|$)/); +}; + +function diffSentences(oldStr, newStr, callback) { + return sentenceDiff.diff(oldStr, newStr, callback); +} +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL3NlbnRlbmNlLmpzIl0sIm5hbWVzIjpbInNlbnRlbmNlRGlmZiIsIkRpZmYiLCJ0b2tlbml6ZSIsInZhbHVlIiwic3BsaXQiLCJkaWZmU2VudGVuY2VzIiwib2xkU3RyIiwibmV3U3RyIiwiY2FsbGJhY2siLCJkaWZmIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTs7Ozs7QUFHTyxJQUFNQSxZQUFZLEdBQUc7QUFBSUM7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBSjtBQUFBLEVBQXJCOzs7Ozs7QUFDUEQsWUFBWSxDQUFDRSxRQUFiLEdBQXdCLFVBQVNDLEtBQVQsRUFBZ0I7QUFDdEMsU0FBT0EsS0FBSyxDQUFDQyxLQUFOLENBQVksdUJBQVosQ0FBUDtBQUNELENBRkQ7O0FBSU8sU0FBU0MsYUFBVCxDQUF1QkMsTUFBdkIsRUFBK0JDLE1BQS9CLEVBQXVDQyxRQUF2QyxFQUFpRDtBQUFFLFNBQU9SLFlBQVksQ0FBQ1MsSUFBYixDQUFrQkgsTUFBbEIsRUFBMEJDLE1BQTFCLEVBQWtDQyxRQUFsQyxDQUFQO0FBQXFEIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IERpZmYgZnJvbSAnLi9iYXNlJztcblxuXG5leHBvcnQgY29uc3Qgc2VudGVuY2VEaWZmID0gbmV3IERpZmYoKTtcbnNlbnRlbmNlRGlmZi50b2tlbml6ZSA9IGZ1bmN0aW9uKHZhbHVlKSB7XG4gIHJldHVybiB2YWx1ZS5zcGxpdCgvKFxcUy4rP1suIT9dKSg/PVxccyt8JCkvKTtcbn07XG5cbmV4cG9ydCBmdW5jdGlvbiBkaWZmU2VudGVuY2VzKG9sZFN0ciwgbmV3U3RyLCBjYWxsYmFjaykgeyByZXR1cm4gc2VudGVuY2VEaWZmLmRpZmYob2xkU3RyLCBuZXdTdHIsIGNhbGxiYWNrKTsgfVxuIl19 diff --git a/node_modules/diff/lib/diff/word.js b/node_modules/diff/lib/diff/word.js new file mode 100644 index 0000000..0b952e0 --- /dev/null +++ b/node_modules/diff/lib/diff/word.js @@ -0,0 +1,107 @@ +/*istanbul ignore start*/ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.diffWords = diffWords; +exports.diffWordsWithSpace = diffWordsWithSpace; +exports.wordDiff = void 0; + +/*istanbul ignore end*/ +var +/*istanbul ignore start*/ +_base = _interopRequireDefault(require("./base")) +/*istanbul ignore end*/ +; + +var +/*istanbul ignore start*/ +_params = require("../util/params") +/*istanbul ignore end*/ +; + +/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/*istanbul ignore end*/ +// Based on https://en.wikipedia.org/wiki/Latin_script_in_Unicode +// +// Ranges and exceptions: +// Latin-1 Supplement, 0080–00FF +// - U+00D7 × Multiplication sign +// - U+00F7 ÷ Division sign +// Latin Extended-A, 0100–017F +// Latin Extended-B, 0180–024F +// IPA Extensions, 0250–02AF +// Spacing Modifier Letters, 02B0–02FF +// - U+02C7 ˇ ˇ Caron +// - U+02D8 ˘ ˘ Breve +// - U+02D9 ˙ ˙ Dot Above +// - U+02DA ˚ ˚ Ring Above +// - U+02DB ˛ ˛ Ogonek +// - U+02DC ˜ ˜ Small Tilde +// - U+02DD ˝ ˝ Double Acute Accent +// Latin Extended Additional, 1E00–1EFF +var extendedWordChars = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/; +var reWhitespace = /\S/; +var wordDiff = new +/*istanbul ignore start*/ +_base +/*istanbul ignore end*/ +. +/*istanbul ignore start*/ +default +/*istanbul ignore end*/ +(); + +/*istanbul ignore start*/ +exports.wordDiff = wordDiff; + +/*istanbul ignore end*/ +wordDiff.equals = function (left, right) { + if (this.options.ignoreCase) { + left = left.toLowerCase(); + right = right.toLowerCase(); + } + + return left === right || this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right); +}; + +wordDiff.tokenize = function (value) { + var tokens = value.split(/(\s+|[()[\]{}'"]|\b)/); // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set. + + for (var i = 0; i < tokens.length - 1; i++) { + // If we have an empty string in the next field and we have only word chars before and after, merge + if (!tokens[i + 1] && tokens[i + 2] && extendedWordChars.test(tokens[i]) && extendedWordChars.test(tokens[i + 2])) { + tokens[i] += tokens[i + 2]; + tokens.splice(i + 1, 2); + i--; + } + } + + return tokens; +}; + +function diffWords(oldStr, newStr, options) { + options = + /*istanbul ignore start*/ + (0, + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + _params + /*istanbul ignore end*/ + . + /*istanbul ignore start*/ + generateOptions) + /*istanbul ignore end*/ + (options, { + ignoreWhitespace: true + }); + return wordDiff.diff(oldStr, newStr, options); +} + +function diffWordsWithSpace(oldStr, newStr, options) { + return wordDiff.diff(oldStr, newStr, options); +} +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL3dvcmQuanMiXSwibmFtZXMiOlsiZXh0ZW5kZWRXb3JkQ2hhcnMiLCJyZVdoaXRlc3BhY2UiLCJ3b3JkRGlmZiIsIkRpZmYiLCJlcXVhbHMiLCJsZWZ0IiwicmlnaHQiLCJvcHRpb25zIiwiaW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RpZmZXb3Jkc1dpdGhTcGFjZShvbGRTdHIsIG5ld1N0ciwgb3B0aW9ucykge1xuICByZXR1cm4gd29yZERpZmYuZGlmZihvbGRTdHIsIG5ld1N0ciwgb3B0aW9ucyk7XG59XG4iXX0= diff --git a/node_modules/diff/lib/index.es6.js b/node_modules/diff/lib/index.es6.js new file mode 100644 index 0000000..6dd2a6f --- /dev/null +++ b/node_modules/diff/lib/index.es6.js @@ -0,0 +1,1519 @@ +function Diff() {} +Diff.prototype = { + diff: function diff(oldString, newString) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var callback = options.callback; + + if (typeof options === 'function') { + callback = options; + options = {}; + } + + this.options = options; + var self = this; + + function done(value) { + if (callback) { + setTimeout(function () { + callback(undefined, value); + }, 0); + return true; + } else { + return value; + } + } // Allow subclasses to massage the input prior to running + + + oldString = this.castInput(oldString); + newString = this.castInput(newString); + oldString = this.removeEmpty(this.tokenize(oldString)); + newString = this.removeEmpty(this.tokenize(newString)); + var newLen = newString.length, + oldLen = oldString.length; + var editLength = 1; + var maxEditLength = newLen + oldLen; + var bestPath = [{ + newPos: -1, + components: [] + }]; // Seed editLength = 0, i.e. the content starts with the same values + + var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0); + + if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) { + // Identity per the equality and tokenizer + return done([{ + value: this.join(newString), + count: newString.length + }]); + } // Main worker method. checks all permutations of a given edit length for acceptance. + + + function execEditLength() { + for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) { + var basePath = void 0; + + var addPath = bestPath[diagonalPath - 1], + removePath = bestPath[diagonalPath + 1], + _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; + + if (addPath) { + // No one else is going to attempt to use this value, clear it + bestPath[diagonalPath - 1] = undefined; + } + + var canAdd = addPath && addPath.newPos + 1 < newLen, + canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen; + + if (!canAdd && !canRemove) { + // If this path is a terminal then prune + bestPath[diagonalPath] = undefined; + continue; + } // Select the diagonal that we want to branch from. We select the prior + // path whose position in the new string is the farthest from the origin + // and does not pass the bounds of the diff graph + + + if (!canAdd || canRemove && addPath.newPos < removePath.newPos) { + basePath = clonePath(removePath); + self.pushComponent(basePath.components, undefined, true); + } else { + basePath = addPath; // No need to clone, we've pulled it from the list + + basePath.newPos++; + self.pushComponent(basePath.components, true, undefined); + } + + _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath); // If we have hit the end of both strings, then we are done + + if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) { + return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken)); + } else { + // Otherwise track this path as a potential candidate and continue. + bestPath[diagonalPath] = basePath; + } + } + + editLength++; + } // Performs the length of edit iteration. Is a bit fugly as this has to support the + // sync and async mode which is never fun. Loops over execEditLength until a value + // is produced. + + + if (callback) { + (function exec() { + setTimeout(function () { + // This should not happen, but we want to be safe. + + /* istanbul ignore next */ + if (editLength > maxEditLength) { + return callback(); + } + + if (!execEditLength()) { + exec(); + } + }, 0); + })(); + } else { + while (editLength <= maxEditLength) { + var ret = execEditLength(); + + if (ret) { + return ret; + } + } + } + }, + pushComponent: function pushComponent(components, added, removed) { + var last = components[components.length - 1]; + + if (last && last.added === added && last.removed === removed) { + // We need to clone here as the component clone operation is just + // as shallow array clone + components[components.length - 1] = { + count: last.count + 1, + added: added, + removed: removed + }; + } else { + components.push({ + count: 1, + added: added, + removed: removed + }); + } + }, + extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) { + var newLen = newString.length, + oldLen = oldString.length, + newPos = basePath.newPos, + oldPos = newPos - diagonalPath, + commonCount = 0; + + while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) { + newPos++; + oldPos++; + commonCount++; + } + + if (commonCount) { + basePath.components.push({ + count: commonCount + }); + } + + basePath.newPos = newPos; + return oldPos; + }, + equals: function equals(left, right) { + if (this.options.comparator) { + return this.options.comparator(left, right); + } else { + return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase(); + } + }, + removeEmpty: function removeEmpty(array) { + var ret = []; + + for (var i = 0; i < array.length; i++) { + if (array[i]) { + ret.push(array[i]); + } + } + + return ret; + }, + castInput: function castInput(value) { + return value; + }, + tokenize: function tokenize(value) { + return value.split(''); + }, + join: function join(chars) { + return chars.join(''); + } +}; + +function buildValues(diff, components, newString, oldString, useLongestToken) { + var componentPos = 0, + componentLen = components.length, + newPos = 0, + oldPos = 0; + + for (; componentPos < componentLen; componentPos++) { + var component = components[componentPos]; + + if (!component.removed) { + if (!component.added && useLongestToken) { + var value = newString.slice(newPos, newPos + component.count); + value = value.map(function (value, i) { + var oldValue = oldString[oldPos + i]; + return oldValue.length > value.length ? oldValue : value; + }); + component.value = diff.join(value); + } else { + component.value = diff.join(newString.slice(newPos, newPos + component.count)); + } + + newPos += component.count; // Common case + + if (!component.added) { + oldPos += component.count; + } + } else { + component.value = diff.join(oldString.slice(oldPos, oldPos + component.count)); + oldPos += component.count; // Reverse add and remove so removes are output first to match common convention + // The diffing algorithm is tied to add then remove output and this is the simplest + // route to get the desired output with minimal overhead. + + if (componentPos && components[componentPos - 1].added) { + var tmp = components[componentPos - 1]; + components[componentPos - 1] = components[componentPos]; + components[componentPos] = tmp; + } + } + } // Special case handle for when one terminal is ignored (i.e. whitespace). + // For this case we merge the terminal into the prior string and drop the change. + // This is only available for string mode. + + + var lastComponent = components[componentLen - 1]; + + if (componentLen > 1 && typeof lastComponent.value === 'string' && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) { + components[componentLen - 2].value += lastComponent.value; + components.pop(); + } + + return components; +} + +function clonePath(path) { + return { + newPos: path.newPos, + components: path.components.slice(0) + }; +} + +var characterDiff = new Diff(); +function diffChars(oldStr, newStr, options) { + return characterDiff.diff(oldStr, newStr, options); +} + +function generateOptions(options, defaults) { + if (typeof options === 'function') { + defaults.callback = options; + } else if (options) { + for (var name in options) { + /* istanbul ignore else */ + if (options.hasOwnProperty(name)) { + defaults[name] = options[name]; + } + } + } + + return defaults; +} + +// +// Ranges and exceptions: +// Latin-1 Supplement, 0080–00FF +// - U+00D7 × Multiplication sign +// - U+00F7 ÷ Division sign +// Latin Extended-A, 0100–017F +// Latin Extended-B, 0180–024F +// IPA Extensions, 0250–02AF +// Spacing Modifier Letters, 02B0–02FF +// - U+02C7 ˇ ˇ Caron +// - U+02D8 ˘ ˘ Breve +// - U+02D9 ˙ ˙ Dot Above +// - U+02DA ˚ ˚ Ring Above +// - U+02DB ˛ ˛ Ogonek +// - U+02DC ˜ ˜ Small Tilde +// - U+02DD ˝ ˝ Double Acute Accent +// Latin Extended Additional, 1E00–1EFF + +var extendedWordChars = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/; +var reWhitespace = /\S/; +var wordDiff = new Diff(); + +wordDiff.equals = function (left, right) { + if (this.options.ignoreCase) { + left = left.toLowerCase(); + right = right.toLowerCase(); + } + + return left === right || this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right); +}; + +wordDiff.tokenize = function (value) { + var tokens = value.split(/(\s+|[()[\]{}'"]|\b)/); // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set. + + for (var i = 0; i < tokens.length - 1; i++) { + // If we have an empty string in the next field and we have only word chars before and after, merge + if (!tokens[i + 1] && tokens[i + 2] && extendedWordChars.test(tokens[i]) && extendedWordChars.test(tokens[i + 2])) { + tokens[i] += tokens[i + 2]; + tokens.splice(i + 1, 2); + i--; + } + } + + return tokens; +}; + +function diffWords(oldStr, newStr, options) { + options = generateOptions(options, { + ignoreWhitespace: true + }); + return wordDiff.diff(oldStr, newStr, options); +} +function diffWordsWithSpace(oldStr, newStr, options) { + return wordDiff.diff(oldStr, newStr, options); +} + +var lineDiff = new Diff(); + +lineDiff.tokenize = function (value) { + var retLines = [], + linesAndNewlines = value.split(/(\n|\r\n)/); // Ignore the final empty token that occurs if the string ends with a new line + + if (!linesAndNewlines[linesAndNewlines.length - 1]) { + linesAndNewlines.pop(); + } // Merge the content and line separators into single tokens + + + for (var i = 0; i < linesAndNewlines.length; i++) { + var line = linesAndNewlines[i]; + + if (i % 2 && !this.options.newlineIsToken) { + retLines[retLines.length - 1] += line; + } else { + if (this.options.ignoreWhitespace) { + line = line.trim(); + } + + retLines.push(line); + } + } + + return retLines; +}; + +function diffLines(oldStr, newStr, callback) { + return lineDiff.diff(oldStr, newStr, callback); +} +function diffTrimmedLines(oldStr, newStr, callback) { + var options = generateOptions(callback, { + ignoreWhitespace: true + }); + return lineDiff.diff(oldStr, newStr, options); +} + +var sentenceDiff = new Diff(); + +sentenceDiff.tokenize = function (value) { + return value.split(/(\S.+?[.!?])(?=\s+|$)/); +}; + +function diffSentences(oldStr, newStr, callback) { + return sentenceDiff.diff(oldStr, newStr, callback); +} + +var cssDiff = new Diff(); + +cssDiff.tokenize = function (value) { + return value.split(/([{}:;,]|\s+)/); +}; + +function diffCss(oldStr, newStr, callback) { + return cssDiff.diff(oldStr, newStr, callback); +} + +function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function (obj) { + return typeof obj; + }; + } else { + _typeof = function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof(obj); +} + +function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); +} + +function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; + + return arr2; + } +} + +function _iterableToArray(iter) { + if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); +} + +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance"); +} + +var objectPrototypeToString = Object.prototype.toString; +var jsonDiff = new Diff(); // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a +// dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output: + +jsonDiff.useLongestToken = true; +jsonDiff.tokenize = lineDiff.tokenize; + +jsonDiff.castInput = function (value) { + var _this$options = this.options, + undefinedReplacement = _this$options.undefinedReplacement, + _this$options$stringi = _this$options.stringifyReplacer, + stringifyReplacer = _this$options$stringi === void 0 ? function (k, v) { + return typeof v === 'undefined' ? undefinedReplacement : v; + } : _this$options$stringi; + return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, ' '); +}; + +jsonDiff.equals = function (left, right) { + return Diff.prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1')); +}; + +function diffJson(oldObj, newObj, options) { + return jsonDiff.diff(oldObj, newObj, options); +} // This function handles the presence of circular references by bailing out when encountering an +// object that is already on the "stack" of items being processed. Accepts an optional replacer + +function canonicalize(obj, stack, replacementStack, replacer, key) { + stack = stack || []; + replacementStack = replacementStack || []; + + if (replacer) { + obj = replacer(key, obj); + } + + var i; + + for (i = 0; i < stack.length; i += 1) { + if (stack[i] === obj) { + return replacementStack[i]; + } + } + + var canonicalizedObj; + + if ('[object Array]' === objectPrototypeToString.call(obj)) { + stack.push(obj); + canonicalizedObj = new Array(obj.length); + replacementStack.push(canonicalizedObj); + + for (i = 0; i < obj.length; i += 1) { + canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key); + } + + stack.pop(); + replacementStack.pop(); + return canonicalizedObj; + } + + if (obj && obj.toJSON) { + obj = obj.toJSON(); + } + + if (_typeof(obj) === 'object' && obj !== null) { + stack.push(obj); + canonicalizedObj = {}; + replacementStack.push(canonicalizedObj); + + var sortedKeys = [], + _key; + + for (_key in obj) { + /* istanbul ignore else */ + if (obj.hasOwnProperty(_key)) { + sortedKeys.push(_key); + } + } + + sortedKeys.sort(); + + for (i = 0; i < sortedKeys.length; i += 1) { + _key = sortedKeys[i]; + canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key); + } + + stack.pop(); + replacementStack.pop(); + } else { + canonicalizedObj = obj; + } + + return canonicalizedObj; +} + +var arrayDiff = new Diff(); + +arrayDiff.tokenize = function (value) { + return value.slice(); +}; + +arrayDiff.join = arrayDiff.removeEmpty = function (value) { + return value; +}; + +function diffArrays(oldArr, newArr, callback) { + return arrayDiff.diff(oldArr, newArr, callback); +} + +function parsePatch(uniDiff) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var diffstr = uniDiff.split(/\r\n|[\n\v\f\r\x85]/), + delimiters = uniDiff.match(/\r\n|[\n\v\f\r\x85]/g) || [], + list = [], + i = 0; + + function parseIndex() { + var index = {}; + list.push(index); // Parse diff metadata + + while (i < diffstr.length) { + var line = diffstr[i]; // File header found, end parsing diff metadata + + if (/^(\-\-\-|\+\+\+|@@)\s/.test(line)) { + break; + } // Diff index + + + var headerMatch = /^(?:Index:|diff(?: -r \w+)+)\s+/.exec(line); + + if (headerMatch) { + index.index = line.substring(headerMatch[0].length).trim(); + } + + i++; + } // Parse file headers if they are defined. Unified diff requires them, but + // there's no technical issues to have an isolated hunk without file header + + + parseFileHeader(index); + parseFileHeader(index); // Parse hunks + + index.hunks = []; + + while (i < diffstr.length) { + var _line = diffstr[i]; + + if (/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(_line)) { + break; + } else if (/^@@/.test(_line)) { + index.hunks.push(parseHunk()); + } else if (_line && options.strict) { + // Ignore unexpected content unless in strict mode + throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(_line)); + } else { + i++; + } + } + } // Parses the --- and +++ headers, if none are found, no lines + // are consumed. + + + function parseFileHeader(index) { + var fileHeaderMatch = /^(---|\+\+\+)\s+/.exec(diffstr[i]); + + if (fileHeaderMatch) { + var keyPrefix = fileHeaderMatch[1] === '---' ? 'old' : 'new'; + var data = diffstr[i].substring(3).trim().split('\t', 2); + var fileName = data[0].replace(/\\\\/g, '\\'); + + if (fileName.startsWith('"') && fileName.endsWith('"')) { + fileName = fileName.substr(1, fileName.length - 2); + } + + index[keyPrefix + 'FileName'] = fileName; + index[keyPrefix + 'Header'] = (data[1] || '').trim(); + i++; + } + } // Parses a hunk + // This assumes that we are at the start of a hunk. + + + function parseHunk() { + var chunkHeaderIndex = i, + chunkHeaderLine = diffstr[i++], + chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/); + var hunk = { + oldStart: +chunkHeader[1], + oldLines: +chunkHeader[2] || 1, + newStart: +chunkHeader[3], + newLines: +chunkHeader[4] || 1, + lines: [], + linedelimiters: [] + }; + var addCount = 0, + removeCount = 0; + + for (; i < diffstr.length; i++) { + // Lines starting with '---' could be mistaken for the "remove line" operation + // But they could be the header for the next file. Therefore prune such cases out. + if (diffstr[i].indexOf('--- ') === 0 && i + 2 < diffstr.length && diffstr[i + 1].indexOf('+++ ') === 0 && diffstr[i + 2].indexOf('@@') === 0) { + break; + } + + var operation = diffstr[i].length == 0 && i != diffstr.length - 1 ? ' ' : diffstr[i][0]; + + if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') { + hunk.lines.push(diffstr[i]); + hunk.linedelimiters.push(delimiters[i] || '\n'); + + if (operation === '+') { + addCount++; + } else if (operation === '-') { + removeCount++; + } else if (operation === ' ') { + addCount++; + removeCount++; + } + } else { + break; + } + } // Handle the empty block count case + + + if (!addCount && hunk.newLines === 1) { + hunk.newLines = 0; + } + + if (!removeCount && hunk.oldLines === 1) { + hunk.oldLines = 0; + } // Perform optional sanity checking + + + if (options.strict) { + if (addCount !== hunk.newLines) { + throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); + } + + if (removeCount !== hunk.oldLines) { + throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); + } + } + + return hunk; + } + + while (i < diffstr.length) { + parseIndex(); + } + + return list; +} + +// Iterator that traverses in the range of [min, max], stepping +// by distance from a given start position. I.e. for [0, 4], with +// start of 2, this will iterate 2, 3, 1, 4, 0. +function distanceIterator (start, minLine, maxLine) { + var wantForward = true, + backwardExhausted = false, + forwardExhausted = false, + localOffset = 1; + return function iterator() { + if (wantForward && !forwardExhausted) { + if (backwardExhausted) { + localOffset++; + } else { + wantForward = false; + } // Check if trying to fit beyond text length, and if not, check it fits + // after offset location (or desired location on first iteration) + + + if (start + localOffset <= maxLine) { + return localOffset; + } + + forwardExhausted = true; + } + + if (!backwardExhausted) { + if (!forwardExhausted) { + wantForward = true; + } // Check if trying to fit before text beginning, and if not, check it fits + // before offset location + + + if (minLine <= start - localOffset) { + return -localOffset++; + } + + backwardExhausted = true; + return iterator(); + } // We tried to fit hunk before text beginning and beyond text length, then + // hunk can't fit on the text. Return undefined + + }; +} + +function applyPatch(source, uniDiff) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + + if (typeof uniDiff === 'string') { + uniDiff = parsePatch(uniDiff); + } + + if (Array.isArray(uniDiff)) { + if (uniDiff.length > 1) { + throw new Error('applyPatch only works with a single input.'); + } + + uniDiff = uniDiff[0]; + } // Apply the diff to the input + + + var lines = source.split(/\r\n|[\n\v\f\r\x85]/), + delimiters = source.match(/\r\n|[\n\v\f\r\x85]/g) || [], + hunks = uniDiff.hunks, + compareLine = options.compareLine || function (lineNumber, line, operation, patchContent) { + return line === patchContent; + }, + errorCount = 0, + fuzzFactor = options.fuzzFactor || 0, + minLine = 0, + offset = 0, + removeEOFNL, + addEOFNL; + /** + * Checks if the hunk exactly fits on the provided location + */ + + + function hunkFits(hunk, toPos) { + for (var j = 0; j < hunk.lines.length; j++) { + var line = hunk.lines[j], + operation = line.length > 0 ? line[0] : ' ', + content = line.length > 0 ? line.substr(1) : line; + + if (operation === ' ' || operation === '-') { + // Context sanity check + if (!compareLine(toPos + 1, lines[toPos], operation, content)) { + errorCount++; + + if (errorCount > fuzzFactor) { + return false; + } + } + + toPos++; + } + } + + return true; + } // Search best fit offsets for each hunk based on the previous ones + + + for (var i = 0; i < hunks.length; i++) { + var hunk = hunks[i], + maxLine = lines.length - hunk.oldLines, + localOffset = 0, + toPos = offset + hunk.oldStart - 1; + var iterator = distanceIterator(toPos, minLine, maxLine); + + for (; localOffset !== undefined; localOffset = iterator()) { + if (hunkFits(hunk, toPos + localOffset)) { + hunk.offset = offset += localOffset; + break; + } + } + + if (localOffset === undefined) { + return false; + } // Set lower text limit to end of the current hunk, so next ones don't try + // to fit over already patched text + + + minLine = hunk.offset + hunk.oldStart + hunk.oldLines; + } // Apply patch hunks + + + var diffOffset = 0; + + for (var _i = 0; _i < hunks.length; _i++) { + var _hunk = hunks[_i], + _toPos = _hunk.oldStart + _hunk.offset + diffOffset - 1; + + diffOffset += _hunk.newLines - _hunk.oldLines; + + if (_toPos < 0) { + // Creating a new file + _toPos = 0; + } + + for (var j = 0; j < _hunk.lines.length; j++) { + var line = _hunk.lines[j], + operation = line.length > 0 ? line[0] : ' ', + content = line.length > 0 ? line.substr(1) : line, + delimiter = _hunk.linedelimiters[j]; + + if (operation === ' ') { + _toPos++; + } else if (operation === '-') { + lines.splice(_toPos, 1); + delimiters.splice(_toPos, 1); + /* istanbul ignore else */ + } else if (operation === '+') { + lines.splice(_toPos, 0, content); + delimiters.splice(_toPos, 0, delimiter); + _toPos++; + } else if (operation === '\\') { + var previousOperation = _hunk.lines[j - 1] ? _hunk.lines[j - 1][0] : null; + + if (previousOperation === '+') { + removeEOFNL = true; + } else if (previousOperation === '-') { + addEOFNL = true; + } + } + } + } // Handle EOFNL insertion/removal + + + if (removeEOFNL) { + while (!lines[lines.length - 1]) { + lines.pop(); + delimiters.pop(); + } + } else if (addEOFNL) { + lines.push(''); + delimiters.push('\n'); + } + + for (var _k = 0; _k < lines.length - 1; _k++) { + lines[_k] = lines[_k] + delimiters[_k]; + } + + return lines.join(''); +} // Wrapper that supports multiple file patches via callbacks. + +function applyPatches(uniDiff, options) { + if (typeof uniDiff === 'string') { + uniDiff = parsePatch(uniDiff); + } + + var currentIndex = 0; + + function processIndex() { + var index = uniDiff[currentIndex++]; + + if (!index) { + return options.complete(); + } + + options.loadFile(index, function (err, data) { + if (err) { + return options.complete(err); + } + + var updatedContent = applyPatch(data, index, options); + options.patched(index, updatedContent, function (err) { + if (err) { + return options.complete(err); + } + + processIndex(); + }); + }); + } + + processIndex(); +} + +function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { + if (!options) { + options = {}; + } + + if (typeof options.context === 'undefined') { + options.context = 4; + } + + var diff = diffLines(oldStr, newStr, options); + diff.push({ + value: '', + lines: [] + }); // Append an empty value to make cleanup easier + + function contextLines(lines) { + return lines.map(function (entry) { + return ' ' + entry; + }); + } + + var hunks = []; + var oldRangeStart = 0, + newRangeStart = 0, + curRange = [], + oldLine = 1, + newLine = 1; + + var _loop = function _loop(i) { + var current = diff[i], + lines = current.lines || current.value.replace(/\n$/, '').split('\n'); + current.lines = lines; + + if (current.added || current.removed) { + var _curRange; + + // If we have previous context, start with that + if (!oldRangeStart) { + var prev = diff[i - 1]; + oldRangeStart = oldLine; + newRangeStart = newLine; + + if (prev) { + curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : []; + oldRangeStart -= curRange.length; + newRangeStart -= curRange.length; + } + } // Output our changes + + + (_curRange = curRange).push.apply(_curRange, _toConsumableArray(lines.map(function (entry) { + return (current.added ? '+' : '-') + entry; + }))); // Track the updated file position + + + if (current.added) { + newLine += lines.length; + } else { + oldLine += lines.length; + } + } else { + // Identical context lines. Track line changes + if (oldRangeStart) { + // Close out any changes that have been output (or join overlapping) + if (lines.length <= options.context * 2 && i < diff.length - 2) { + var _curRange2; + + // Overlapping + (_curRange2 = curRange).push.apply(_curRange2, _toConsumableArray(contextLines(lines))); + } else { + var _curRange3; + + // end the range and output + var contextSize = Math.min(lines.length, options.context); + + (_curRange3 = curRange).push.apply(_curRange3, _toConsumableArray(contextLines(lines.slice(0, contextSize)))); + + var hunk = { + oldStart: oldRangeStart, + oldLines: oldLine - oldRangeStart + contextSize, + newStart: newRangeStart, + newLines: newLine - newRangeStart + contextSize, + lines: curRange + }; + + if (i >= diff.length - 2 && lines.length <= options.context) { + // EOF is inside this hunk + var oldEOFNewline = /\n$/.test(oldStr); + var newEOFNewline = /\n$/.test(newStr); + var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines; + + if (!oldEOFNewline && noNlBeforeAdds) { + // special case: old has no eol and no trailing context; no-nl can end up before adds + curRange.splice(hunk.oldLines, 0, '\\ No newline at end of file'); + } + + if (!oldEOFNewline && !noNlBeforeAdds || !newEOFNewline) { + curRange.push('\\ No newline at end of file'); + } + } + + hunks.push(hunk); + oldRangeStart = 0; + newRangeStart = 0; + curRange = []; + } + } + + oldLine += lines.length; + newLine += lines.length; + } + }; + + for (var i = 0; i < diff.length; i++) { + _loop(i); + } + + return { + oldFileName: oldFileName, + newFileName: newFileName, + oldHeader: oldHeader, + newHeader: newHeader, + hunks: hunks + }; +} +function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { + var diff = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options); + var ret = []; + + if (oldFileName == newFileName) { + ret.push('Index: ' + oldFileName); + } + + ret.push('==================================================================='); + ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\t' + diff.oldHeader)); + ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader)); + + for (var i = 0; i < diff.hunks.length; i++) { + var hunk = diff.hunks[i]; + ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@'); + ret.push.apply(ret, hunk.lines); + } + + return ret.join('\n') + '\n'; +} +function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) { + return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options); +} + +function arrayEqual(a, b) { + if (a.length !== b.length) { + return false; + } + + return arrayStartsWith(a, b); +} +function arrayStartsWith(array, start) { + if (start.length > array.length) { + return false; + } + + for (var i = 0; i < start.length; i++) { + if (start[i] !== array[i]) { + return false; + } + } + + return true; +} + +function calcLineCount(hunk) { + var _calcOldNewLineCount = calcOldNewLineCount(hunk.lines), + oldLines = _calcOldNewLineCount.oldLines, + newLines = _calcOldNewLineCount.newLines; + + if (oldLines !== undefined) { + hunk.oldLines = oldLines; + } else { + delete hunk.oldLines; + } + + if (newLines !== undefined) { + hunk.newLines = newLines; + } else { + delete hunk.newLines; + } +} +function merge(mine, theirs, base) { + mine = loadPatch(mine, base); + theirs = loadPatch(theirs, base); + var ret = {}; // For index we just let it pass through as it doesn't have any necessary meaning. + // Leaving sanity checks on this to the API consumer that may know more about the + // meaning in their own context. + + if (mine.index || theirs.index) { + ret.index = mine.index || theirs.index; + } + + if (mine.newFileName || theirs.newFileName) { + if (!fileNameChanged(mine)) { + // No header or no change in ours, use theirs (and ours if theirs does not exist) + ret.oldFileName = theirs.oldFileName || mine.oldFileName; + ret.newFileName = theirs.newFileName || mine.newFileName; + ret.oldHeader = theirs.oldHeader || mine.oldHeader; + ret.newHeader = theirs.newHeader || mine.newHeader; + } else if (!fileNameChanged(theirs)) { + // No header or no change in theirs, use ours + ret.oldFileName = mine.oldFileName; + ret.newFileName = mine.newFileName; + ret.oldHeader = mine.oldHeader; + ret.newHeader = mine.newHeader; + } else { + // Both changed... figure it out + ret.oldFileName = selectField(ret, mine.oldFileName, theirs.oldFileName); + ret.newFileName = selectField(ret, mine.newFileName, theirs.newFileName); + ret.oldHeader = selectField(ret, mine.oldHeader, theirs.oldHeader); + ret.newHeader = selectField(ret, mine.newHeader, theirs.newHeader); + } + } + + ret.hunks = []; + var mineIndex = 0, + theirsIndex = 0, + mineOffset = 0, + theirsOffset = 0; + + while (mineIndex < mine.hunks.length || theirsIndex < theirs.hunks.length) { + var mineCurrent = mine.hunks[mineIndex] || { + oldStart: Infinity + }, + theirsCurrent = theirs.hunks[theirsIndex] || { + oldStart: Infinity + }; + + if (hunkBefore(mineCurrent, theirsCurrent)) { + // This patch does not overlap with any of the others, yay. + ret.hunks.push(cloneHunk(mineCurrent, mineOffset)); + mineIndex++; + theirsOffset += mineCurrent.newLines - mineCurrent.oldLines; + } else if (hunkBefore(theirsCurrent, mineCurrent)) { + // This patch does not overlap with any of the others, yay. + ret.hunks.push(cloneHunk(theirsCurrent, theirsOffset)); + theirsIndex++; + mineOffset += theirsCurrent.newLines - theirsCurrent.oldLines; + } else { + // Overlap, merge as best we can + var mergedHunk = { + oldStart: Math.min(mineCurrent.oldStart, theirsCurrent.oldStart), + oldLines: 0, + newStart: Math.min(mineCurrent.newStart + mineOffset, theirsCurrent.oldStart + theirsOffset), + newLines: 0, + lines: [] + }; + mergeLines(mergedHunk, mineCurrent.oldStart, mineCurrent.lines, theirsCurrent.oldStart, theirsCurrent.lines); + theirsIndex++; + mineIndex++; + ret.hunks.push(mergedHunk); + } + } + + return ret; +} + +function loadPatch(param, base) { + if (typeof param === 'string') { + if (/^@@/m.test(param) || /^Index:/m.test(param)) { + return parsePatch(param)[0]; + } + + if (!base) { + throw new Error('Must provide a base reference or pass in a patch'); + } + + return structuredPatch(undefined, undefined, base, param); + } + + return param; +} + +function fileNameChanged(patch) { + return patch.newFileName && patch.newFileName !== patch.oldFileName; +} + +function selectField(index, mine, theirs) { + if (mine === theirs) { + return mine; + } else { + index.conflict = true; + return { + mine: mine, + theirs: theirs + }; + } +} + +function hunkBefore(test, check) { + return test.oldStart < check.oldStart && test.oldStart + test.oldLines < check.oldStart; +} + +function cloneHunk(hunk, offset) { + return { + oldStart: hunk.oldStart, + oldLines: hunk.oldLines, + newStart: hunk.newStart + offset, + newLines: hunk.newLines, + lines: hunk.lines + }; +} + +function mergeLines(hunk, mineOffset, mineLines, theirOffset, theirLines) { + // This will generally result in a conflicted hunk, but there are cases where the context + // is the only overlap where we can successfully merge the content here. + var mine = { + offset: mineOffset, + lines: mineLines, + index: 0 + }, + their = { + offset: theirOffset, + lines: theirLines, + index: 0 + }; // Handle any leading content + + insertLeading(hunk, mine, their); + insertLeading(hunk, their, mine); // Now in the overlap content. Scan through and select the best changes from each. + + while (mine.index < mine.lines.length && their.index < their.lines.length) { + var mineCurrent = mine.lines[mine.index], + theirCurrent = their.lines[their.index]; + + if ((mineCurrent[0] === '-' || mineCurrent[0] === '+') && (theirCurrent[0] === '-' || theirCurrent[0] === '+')) { + // Both modified ... + mutualChange(hunk, mine, their); + } else if (mineCurrent[0] === '+' && theirCurrent[0] === ' ') { + var _hunk$lines; + + // Mine inserted + (_hunk$lines = hunk.lines).push.apply(_hunk$lines, _toConsumableArray(collectChange(mine))); + } else if (theirCurrent[0] === '+' && mineCurrent[0] === ' ') { + var _hunk$lines2; + + // Theirs inserted + (_hunk$lines2 = hunk.lines).push.apply(_hunk$lines2, _toConsumableArray(collectChange(their))); + } else if (mineCurrent[0] === '-' && theirCurrent[0] === ' ') { + // Mine removed or edited + removal(hunk, mine, their); + } else if (theirCurrent[0] === '-' && mineCurrent[0] === ' ') { + // Their removed or edited + removal(hunk, their, mine, true); + } else if (mineCurrent === theirCurrent) { + // Context identity + hunk.lines.push(mineCurrent); + mine.index++; + their.index++; + } else { + // Context mismatch + conflict(hunk, collectChange(mine), collectChange(their)); + } + } // Now push anything that may be remaining + + + insertTrailing(hunk, mine); + insertTrailing(hunk, their); + calcLineCount(hunk); +} + +function mutualChange(hunk, mine, their) { + var myChanges = collectChange(mine), + theirChanges = collectChange(their); + + if (allRemoves(myChanges) && allRemoves(theirChanges)) { + // Special case for remove changes that are supersets of one another + if (arrayStartsWith(myChanges, theirChanges) && skipRemoveSuperset(their, myChanges, myChanges.length - theirChanges.length)) { + var _hunk$lines3; + + (_hunk$lines3 = hunk.lines).push.apply(_hunk$lines3, _toConsumableArray(myChanges)); + + return; + } else if (arrayStartsWith(theirChanges, myChanges) && skipRemoveSuperset(mine, theirChanges, theirChanges.length - myChanges.length)) { + var _hunk$lines4; + + (_hunk$lines4 = hunk.lines).push.apply(_hunk$lines4, _toConsumableArray(theirChanges)); + + return; + } + } else if (arrayEqual(myChanges, theirChanges)) { + var _hunk$lines5; + + (_hunk$lines5 = hunk.lines).push.apply(_hunk$lines5, _toConsumableArray(myChanges)); + + return; + } + + conflict(hunk, myChanges, theirChanges); +} + +function removal(hunk, mine, their, swap) { + var myChanges = collectChange(mine), + theirChanges = collectContext(their, myChanges); + + if (theirChanges.merged) { + var _hunk$lines6; + + (_hunk$lines6 = hunk.lines).push.apply(_hunk$lines6, _toConsumableArray(theirChanges.merged)); + } else { + conflict(hunk, swap ? theirChanges : myChanges, swap ? myChanges : theirChanges); + } +} + +function conflict(hunk, mine, their) { + hunk.conflict = true; + hunk.lines.push({ + conflict: true, + mine: mine, + theirs: their + }); +} + +function insertLeading(hunk, insert, their) { + while (insert.offset < their.offset && insert.index < insert.lines.length) { + var line = insert.lines[insert.index++]; + hunk.lines.push(line); + insert.offset++; + } +} + +function insertTrailing(hunk, insert) { + while (insert.index < insert.lines.length) { + var line = insert.lines[insert.index++]; + hunk.lines.push(line); + } +} + +function collectChange(state) { + var ret = [], + operation = state.lines[state.index][0]; + + while (state.index < state.lines.length) { + var line = state.lines[state.index]; // Group additions that are immediately after subtractions and treat them as one "atomic" modify change. + + if (operation === '-' && line[0] === '+') { + operation = '+'; + } + + if (operation === line[0]) { + ret.push(line); + state.index++; + } else { + break; + } + } + + return ret; +} + +function collectContext(state, matchChanges) { + var changes = [], + merged = [], + matchIndex = 0, + contextChanges = false, + conflicted = false; + + while (matchIndex < matchChanges.length && state.index < state.lines.length) { + var change = state.lines[state.index], + match = matchChanges[matchIndex]; // Once we've hit our add, then we are done + + if (match[0] === '+') { + break; + } + + contextChanges = contextChanges || change[0] !== ' '; + merged.push(match); + matchIndex++; // Consume any additions in the other block as a conflict to attempt + // to pull in the remaining context after this + + if (change[0] === '+') { + conflicted = true; + + while (change[0] === '+') { + changes.push(change); + change = state.lines[++state.index]; + } + } + + if (match.substr(1) === change.substr(1)) { + changes.push(change); + state.index++; + } else { + conflicted = true; + } + } + + if ((matchChanges[matchIndex] || '')[0] === '+' && contextChanges) { + conflicted = true; + } + + if (conflicted) { + return changes; + } + + while (matchIndex < matchChanges.length) { + merged.push(matchChanges[matchIndex++]); + } + + return { + merged: merged, + changes: changes + }; +} + +function allRemoves(changes) { + return changes.reduce(function (prev, change) { + return prev && change[0] === '-'; + }, true); +} + +function skipRemoveSuperset(state, removeChanges, delta) { + for (var i = 0; i < delta; i++) { + var changeContent = removeChanges[removeChanges.length - delta + i].substr(1); + + if (state.lines[state.index + i] !== ' ' + changeContent) { + return false; + } + } + + state.index += delta; + return true; +} + +function calcOldNewLineCount(lines) { + var oldLines = 0; + var newLines = 0; + lines.forEach(function (line) { + if (typeof line !== 'string') { + var myCount = calcOldNewLineCount(line.mine); + var theirCount = calcOldNewLineCount(line.theirs); + + if (oldLines !== undefined) { + if (myCount.oldLines === theirCount.oldLines) { + oldLines += myCount.oldLines; + } else { + oldLines = undefined; + } + } + + if (newLines !== undefined) { + if (myCount.newLines === theirCount.newLines) { + newLines += myCount.newLines; + } else { + newLines = undefined; + } + } + } else { + if (newLines !== undefined && (line[0] === '+' || line[0] === ' ')) { + newLines++; + } + + if (oldLines !== undefined && (line[0] === '-' || line[0] === ' ')) { + oldLines++; + } + } + }); + return { + oldLines: oldLines, + newLines: newLines + }; +} + +// See: http://code.google.com/p/google-diff-match-patch/wiki/API +function convertChangesToDMP(changes) { + var ret = [], + change, + operation; + + for (var i = 0; i < changes.length; i++) { + change = changes[i]; + + if (change.added) { + operation = 1; + } else if (change.removed) { + operation = -1; + } else { + operation = 0; + } + + ret.push([operation, change.value]); + } + + return ret; +} + +function convertChangesToXML(changes) { + var ret = []; + + for (var i = 0; i < changes.length; i++) { + var change = changes[i]; + + if (change.added) { + ret.push(''); + } else if (change.removed) { + ret.push(''); + } + + ret.push(escapeHTML(change.value)); + + if (change.added) { + ret.push(''); + } else if (change.removed) { + ret.push(''); + } + } + + return ret.join(''); +} + +function escapeHTML(s) { + var n = s; + n = n.replace(/&/g, '&'); + n = n.replace(//g, '>'); + n = n.replace(/"/g, '"'); + return n; +} + +/* See LICENSE file for terms of use */ + +export { Diff, diffChars, diffWords, diffWordsWithSpace, diffLines, diffTrimmedLines, diffSentences, diffCss, diffJson, diffArrays, structuredPatch, createTwoFilesPatch, createPatch, applyPatch, applyPatches, parsePatch, merge, convertChangesToDMP, convertChangesToXML, canonicalize }; diff --git a/node_modules/diff/lib/index.js b/node_modules/diff/lib/index.js new file mode 100644 index 0000000..ff8ae91 --- /dev/null +++ b/node_modules/diff/lib/index.js @@ -0,0 +1,216 @@ +/*istanbul ignore start*/ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "Diff", { + enumerable: true, + get: function get() { + return _base.default; + } +}); +Object.defineProperty(exports, "diffChars", { + enumerable: true, + get: function get() { + return _character.diffChars; + } +}); +Object.defineProperty(exports, "diffWords", { + enumerable: true, + get: function get() { + return _word.diffWords; + } +}); +Object.defineProperty(exports, "diffWordsWithSpace", { + enumerable: true, + get: function get() { + return _word.diffWordsWithSpace; + } +}); +Object.defineProperty(exports, "diffLines", { + enumerable: true, + get: function get() { + return _line.diffLines; + } +}); +Object.defineProperty(exports, "diffTrimmedLines", { + enumerable: true, + get: function get() { + return _line.diffTrimmedLines; + } +}); +Object.defineProperty(exports, "diffSentences", { + enumerable: true, + get: function get() { + return _sentence.diffSentences; + } +}); +Object.defineProperty(exports, "diffCss", { + enumerable: true, + get: function get() { + return _css.diffCss; + } +}); +Object.defineProperty(exports, "diffJson", { + enumerable: true, + get: function get() { + return _json.diffJson; + } +}); +Object.defineProperty(exports, "canonicalize", { + enumerable: true, + get: function get() { + return _json.canonicalize; + } +}); +Object.defineProperty(exports, "diffArrays", { + enumerable: true, + get: function get() { + return _array.diffArrays; + } +}); +Object.defineProperty(exports, "applyPatch", { + enumerable: true, + get: function get() { + return _apply.applyPatch; + } +}); +Object.defineProperty(exports, "applyPatches", { + enumerable: true, + get: function get() { + return _apply.applyPatches; + } +}); +Object.defineProperty(exports, "parsePatch", { + enumerable: true, + get: function get() { + return _parse.parsePatch; + } +}); +Object.defineProperty(exports, "merge", { + enumerable: true, + get: function get() { + return _merge.merge; + } +}); +Object.defineProperty(exports, "structuredPatch", { + enumerable: true, + get: function get() { + return _create.structuredPatch; + } +}); +Object.defineProperty(exports, "createTwoFilesPatch", { + enumerable: true, + get: function get() { + return _create.createTwoFilesPatch; + } +}); +Object.defineProperty(exports, "createPatch", { + enumerable: true, + get: function get() { + return _create.createPatch; + } +}); +Object.defineProperty(exports, "convertChangesToDMP", { + enumerable: true, + get: function get() { + return _dmp.convertChangesToDMP; + } +}); +Object.defineProperty(exports, "convertChangesToXML", { + enumerable: true, + get: function get() { + return _xml.convertChangesToXML; + } +}); + +/*istanbul ignore end*/ +var +/*istanbul ignore start*/ +_base = _interopRequireDefault(require("./diff/base")) +/*istanbul ignore end*/ +; + +var +/*istanbul ignore start*/ +_character = require("./diff/character") +/*istanbul ignore end*/ +; + +var +/*istanbul ignore start*/ +_word = require("./diff/word") +/*istanbul ignore end*/ +; + +var +/*istanbul ignore start*/ +_line = require("./diff/line") +/*istanbul ignore end*/ +; + +var +/*istanbul ignore start*/ +_sentence = require("./diff/sentence") +/*istanbul ignore end*/ +; + +var +/*istanbul ignore start*/ +_css = require("./diff/css") +/*istanbul ignore end*/ +; + +var +/*istanbul ignore start*/ +_json = require("./diff/json") +/*istanbul ignore end*/ +; + +var +/*istanbul ignore start*/ +_array = require("./diff/array") +/*istanbul ignore end*/ +; + +var +/*istanbul ignore start*/ +_apply = require("./patch/apply") +/*istanbul ignore end*/ +; + +var +/*istanbul ignore start*/ +_parse = require("./patch/parse") +/*istanbul ignore end*/ +; + +var +/*istanbul ignore start*/ +_merge = require("./patch/merge") +/*istanbul ignore end*/ +; + +var +/*istanbul ignore start*/ +_create = require("./patch/create") +/*istanbul ignore end*/ +; + +var +/*istanbul ignore start*/ +_dmp = require("./convert/dmp") +/*istanbul ignore end*/ +; + +var +/*istanbul ignore start*/ +_xml = require("./convert/xml") +/*istanbul ignore end*/ +; + +/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/*istanbul ignore end*/ +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQWdCQTtBQUFBO0FBQUE7QUFBQTtBQUFBOztBQUNBO0FBQUE7QUFBQTtBQUFBO0FBQUE7O0FBQ0E7QUFBQTtBQUFBO0FBQUE7QUFBQTs7QUFDQTtBQUFBO0FBQUE7QUFBQTtBQUFBOztBQUNBO0FBQUE7QUFBQTtBQUFBO0FBQUE7O0FBRUE7QUFBQTtBQUFBO0FBQUE7QUFBQTs7QUFDQTtBQUFBO0FBQUE7QUFBQTtBQUFBOztBQUVBO0FBQUE7QUFBQTtBQUFBO0FBQUE7O0FBRUE7QUFBQTtBQUFBO0FBQUE7QUFBQTs7QUFDQTtBQUFBO0FBQUE7QUFBQTtBQUFBOztBQUNBO0FBQUE7QUFBQTtBQUFBO0FBQUE7O0FBQ0E7QUFBQTtBQUFBO0FBQUE7QUFBQTs7QUFFQTtBQUFBO0FBQUE7QUFBQTtBQUFBOztBQUNBO0FBQUE7QUFBQTtBQUFBO0FBQUEiLCJzb3VyY2VzQ29udGVudCI6WyIvKiBTZWUgTElDRU5TRSBmaWxlIG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gIGNhbm9uaWNhbGl6ZVxufTtcbiJdfQ== diff --git a/node_modules/diff/lib/patch/apply.js b/node_modules/diff/lib/patch/apply.js new file mode 100644 index 0000000..19bddd8 --- /dev/null +++ b/node_modules/diff/lib/patch/apply.js @@ -0,0 +1,243 @@ +/*istanbul ignore start*/ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.applyPatch = applyPatch; +exports.applyPatches = applyPatches; + +/*istanbul ignore end*/ +var +/*istanbul ignore start*/ +_parse = require("./parse") +/*istanbul ignore end*/ +; + +var +/*istanbul ignore start*/ +_distanceIterator = _interopRequireDefault(require("../util/distance-iterator")) +/*istanbul ignore end*/ +; + +/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/*istanbul ignore end*/ +function applyPatch(source, uniDiff) { + /*istanbul ignore start*/ + var + /*istanbul ignore end*/ + options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + + if (typeof uniDiff === 'string') { + uniDiff = + /*istanbul ignore start*/ + (0, + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + _parse + /*istanbul ignore end*/ + . + /*istanbul ignore start*/ + parsePatch) + /*istanbul ignore end*/ + (uniDiff); + } + + if (Array.isArray(uniDiff)) { + if (uniDiff.length > 1) { + throw new Error('applyPatch only works with a single input.'); + } + + uniDiff = uniDiff[0]; + } // Apply the diff to the input + + + var lines = source.split(/\r\n|[\n\v\f\r\x85]/), + delimiters = source.match(/\r\n|[\n\v\f\r\x85]/g) || [], + hunks = uniDiff.hunks, + compareLine = options.compareLine || function (lineNumber, line, operation, patchContent) + /*istanbul ignore start*/ + { + return ( + /*istanbul ignore end*/ + line === patchContent + ); + }, + errorCount = 0, + fuzzFactor = options.fuzzFactor || 0, + minLine = 0, + offset = 0, + removeEOFNL, + addEOFNL; + /** + * Checks if the hunk exactly fits on the provided location + */ + + + function hunkFits(hunk, toPos) { + for (var j = 0; j < hunk.lines.length; j++) { + var line = hunk.lines[j], + operation = line.length > 0 ? line[0] : ' ', + content = line.length > 0 ? line.substr(1) : line; + + if (operation === ' ' || operation === '-') { + // Context sanity check + if (!compareLine(toPos + 1, lines[toPos], operation, content)) { + errorCount++; + + if (errorCount > fuzzFactor) { + return false; + } + } + + toPos++; + } + } + + return true; + } // Search best fit offsets for each hunk based on the previous ones + + + for (var i = 0; i < hunks.length; i++) { + var hunk = hunks[i], + maxLine = lines.length - hunk.oldLines, + localOffset = 0, + toPos = offset + hunk.oldStart - 1; + var iterator = + /*istanbul ignore start*/ + (0, + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + _distanceIterator + /*istanbul ignore end*/ + . + /*istanbul ignore start*/ + default) + /*istanbul ignore end*/ + (toPos, minLine, maxLine); + + for (; localOffset !== undefined; localOffset = iterator()) { + if (hunkFits(hunk, toPos + localOffset)) { + hunk.offset = offset += localOffset; + break; + } + } + + if (localOffset === undefined) { + return false; + } // Set lower text limit to end of the current hunk, so next ones don't try + // to fit over already patched text + + + minLine = hunk.offset + hunk.oldStart + hunk.oldLines; + } // Apply patch hunks + + + var diffOffset = 0; + + for (var _i = 0; _i < hunks.length; _i++) { + var _hunk = hunks[_i], + _toPos = _hunk.oldStart + _hunk.offset + diffOffset - 1; + + diffOffset += _hunk.newLines - _hunk.oldLines; + + if (_toPos < 0) { + // Creating a new file + _toPos = 0; + } + + for (var j = 0; j < _hunk.lines.length; j++) { + var line = _hunk.lines[j], + operation = line.length > 0 ? line[0] : ' ', + content = line.length > 0 ? line.substr(1) : line, + delimiter = _hunk.linedelimiters[j]; + + if (operation === ' ') { + _toPos++; + } else if (operation === '-') { + lines.splice(_toPos, 1); + delimiters.splice(_toPos, 1); + /* istanbul ignore else */ + } else if (operation === '+') { + lines.splice(_toPos, 0, content); + delimiters.splice(_toPos, 0, delimiter); + _toPos++; + } else if (operation === '\\') { + var previousOperation = _hunk.lines[j - 1] ? _hunk.lines[j - 1][0] : null; + + if (previousOperation === '+') { + removeEOFNL = true; + } else if (previousOperation === '-') { + addEOFNL = true; + } + } + } + } // Handle EOFNL insertion/removal + + + if (removeEOFNL) { + while (!lines[lines.length - 1]) { + lines.pop(); + delimiters.pop(); + } + } else if (addEOFNL) { + lines.push(''); + delimiters.push('\n'); + } + + for (var _k = 0; _k < lines.length - 1; _k++) { + lines[_k] = lines[_k] + delimiters[_k]; + } + + return lines.join(''); +} // Wrapper that supports multiple file patches via callbacks. + + +function applyPatches(uniDiff, options) { + if (typeof uniDiff === 'string') { + uniDiff = + /*istanbul ignore start*/ + (0, + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + _parse + /*istanbul ignore end*/ + . + /*istanbul ignore start*/ + parsePatch) + /*istanbul ignore end*/ + (uniDiff); + } + + var currentIndex = 0; + + function processIndex() { + var index = uniDiff[currentIndex++]; + + if (!index) { + return options.complete(); + } + + options.loadFile(index, function (err, data) { + if (err) { + return options.complete(err); + } + + var updatedContent = applyPatch(data, index, options); + options.patched(index, updatedContent, function (err) { + if (err) { + return options.complete(err); + } + + processIndex(); + }); + }); + } + + processIndex(); +} +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wYXRjaC9hcHBseS5qcyJdLCJuYW1lcyI6WyJhcHBseVBhdGNoIiwic291cmNlIiwidW5pRGlmZiIsIm9wdGlvbnMiLCJwYXJzZVBhdGNoIiwiQXJyYXkiLCJpc0FycmF5IiwibGVuZ3RoIiwiRXJyb3IiLCJsaW5lcyIsInNwbGl0IiwiZGVsaW1pdGVycyIsIm1hdGNoIiwiaHVua3MiLCJjb21wYXJlTGluZSIsImxpbmVOdW1iZXIiLCJsaW5lIiwib3BlcmF0aW9uIiwicGF0Y2hDb250ZW50IiwiZXJyb3JDb3VudCIsImZ1enpGYWN0b3IiLCJtaW5MaW5lIiwib2Zmc2V0IiwicmVtb3ZlRU9GTkwiLCJhZGRFT0ZOTCIsImh1bmtGaXRzIiwiaHVuayIsInRvUG9zIiwia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R1cm4gbGluZXMuam9pbignJyk7XG59XG5cbi8vIFdyYXBwZXIgdGhhdCBzdXBwb3J0cyBtdWx0aXBsZSBmaWxlIHBhdGNoZXMgdmlhIGNhbGxiYWNrcy5cbmV4cG9ydCBmdW5jdGlvbiBhcHBseVBhdGNoZXModW5pRGlmZiwgb3B0aW9ucykge1xuICBpZiAodHlwZW9mIHVuaURpZmYgPT09ICdzdHJpbmcnKSB7XG4gICAgdW5pRGlmZiA9IHBhcnNlUGF0Y2godW5pRGlmZik7XG4gIH1cblxuICBsZXQgY3VycmVudEluZGV4ID0gMDtcbiAgZnVuY3Rpb24gcHJvY2Vzc0luZGV4KCkge1xuICAgIGxldCBpbmRleCA9IHVuaURpZmZbY3VycmVudEluZGV4KytdO1xuICAgIGlmICghaW5kZXgpIHtcbiAgICAgIHJldHVybiBvcHRpb25zLmNvbXBsZXRlKCk7XG4gICAgfVxuXG4gICAgb3B0aW9ucy5sb2FkRmlsZShpbmRleCwgZnVuY3Rpb24oZXJyLCBkYXRhKSB7XG4gICAgICBpZiAoZXJyKSB7XG4gICAgICAgIHJldHVybiBvcHRpb25zLmNvbXBsZXRlKGVycik7XG4gICAgICB9XG5cbiAgICAgIGxldCB1cGRhdGVkQ29udGVudCA9IGFwcGx5UGF0Y2goZGF0YSwgaW5kZXgsIG9wdGlvbnMpO1xuICAgICAgb3B0aW9ucy5wYXRjaGVkKGluZGV4LCB1cGRhdGVkQ29udGVudCwgZnVuY3Rpb24oZXJyKSB7XG4gICAgICAgIGlmIChlcnIpIHtcbiAgICAgICAgICByZXR1cm4gb3B0aW9ucy5jb21wbGV0ZShlcnIpO1xuICAgICAgICB9XG5cbiAgICAgICAgcHJvY2Vzc0luZGV4KCk7XG4gICAgICB9KTtcbiAgICB9KTtcbiAgfVxuICBwcm9jZXNzSW5kZXgoKTtcbn1cbiJdfQ== diff --git a/node_modules/diff/lib/patch/create.js b/node_modules/diff/lib/patch/create.js new file mode 100644 index 0000000..d1717fe --- /dev/null +++ b/node_modules/diff/lib/patch/create.js @@ -0,0 +1,247 @@ +/*istanbul ignore start*/ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.structuredPatch = structuredPatch; +exports.createTwoFilesPatch = createTwoFilesPatch; +exports.createPatch = createPatch; + +/*istanbul ignore end*/ +var +/*istanbul ignore start*/ +_line = require("../diff/line") +/*istanbul ignore end*/ +; + +/*istanbul ignore start*/ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } + +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } + +function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } + +function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } + +/*istanbul ignore end*/ +function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { + if (!options) { + options = {}; + } + + if (typeof options.context === 'undefined') { + options.context = 4; + } + + var diff = + /*istanbul ignore start*/ + (0, + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + _line + /*istanbul ignore end*/ + . + /*istanbul ignore start*/ + diffLines) + /*istanbul ignore end*/ + (oldStr, newStr, options); + diff.push({ + value: '', + lines: [] + }); // Append an empty value to make cleanup easier + + function contextLines(lines) { + return lines.map(function (entry) { + return ' ' + entry; + }); + } + + var hunks = []; + var oldRangeStart = 0, + newRangeStart = 0, + curRange = [], + oldLine = 1, + newLine = 1; + + /*istanbul ignore start*/ + var _loop = function _loop( + /*istanbul ignore end*/ + i) { + var current = diff[i], + lines = current.lines || current.value.replace(/\n$/, '').split('\n'); + current.lines = lines; + + if (current.added || current.removed) { + /*istanbul ignore start*/ + var _curRange; + + /*istanbul ignore end*/ + // If we have previous context, start with that + if (!oldRangeStart) { + var prev = diff[i - 1]; + oldRangeStart = oldLine; + newRangeStart = newLine; + + if (prev) { + curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : []; + oldRangeStart -= curRange.length; + newRangeStart -= curRange.length; + } + } // Output our changes + + + /*istanbul ignore start*/ + (_curRange = + /*istanbul ignore end*/ + curRange).push. + /*istanbul ignore start*/ + apply + /*istanbul ignore end*/ + ( + /*istanbul ignore start*/ + _curRange + /*istanbul ignore end*/ + , + /*istanbul ignore start*/ + _toConsumableArray( + /*istanbul ignore end*/ + lines.map(function (entry) { + return (current.added ? '+' : '-') + entry; + }))); // Track the updated file position + + + if (current.added) { + newLine += lines.length; + } else { + oldLine += lines.length; + } + } else { + // Identical context lines. Track line changes + if (oldRangeStart) { + // Close out any changes that have been output (or join overlapping) + if (lines.length <= options.context * 2 && i < diff.length - 2) { + /*istanbul ignore start*/ + var _curRange2; + + /*istanbul ignore end*/ + // Overlapping + + /*istanbul ignore start*/ + (_curRange2 = + /*istanbul ignore end*/ + curRange).push. + /*istanbul ignore start*/ + apply + /*istanbul ignore end*/ + ( + /*istanbul ignore start*/ + _curRange2 + /*istanbul ignore end*/ + , + /*istanbul ignore start*/ + _toConsumableArray( + /*istanbul ignore end*/ + contextLines(lines))); + } else { + /*istanbul ignore start*/ + var _curRange3; + + /*istanbul ignore end*/ + // end the range and output + var contextSize = Math.min(lines.length, options.context); + + /*istanbul ignore start*/ + (_curRange3 = + /*istanbul ignore end*/ + curRange).push. + /*istanbul ignore start*/ + apply + /*istanbul ignore end*/ + ( + /*istanbul ignore start*/ + _curRange3 + /*istanbul ignore end*/ + , + /*istanbul ignore start*/ + _toConsumableArray( + /*istanbul ignore end*/ + contextLines(lines.slice(0, contextSize)))); + + var hunk = { + oldStart: oldRangeStart, + oldLines: oldLine - oldRangeStart + contextSize, + newStart: newRangeStart, + newLines: newLine - newRangeStart + contextSize, + lines: curRange + }; + + if (i >= diff.length - 2 && lines.length <= options.context) { + // EOF is inside this hunk + var oldEOFNewline = /\n$/.test(oldStr); + var newEOFNewline = /\n$/.test(newStr); + var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines; + + if (!oldEOFNewline && noNlBeforeAdds) { + // special case: old has no eol and no trailing context; no-nl can end up before adds + curRange.splice(hunk.oldLines, 0, '\\ No newline at end of file'); + } + + if (!oldEOFNewline && !noNlBeforeAdds || !newEOFNewline) { + curRange.push('\\ No newline at end of file'); + } + } + + hunks.push(hunk); + oldRangeStart = 0; + newRangeStart = 0; + curRange = []; + } + } + + oldLine += lines.length; + newLine += lines.length; + } + }; + + for (var i = 0; i < diff.length; i++) { + /*istanbul ignore start*/ + _loop( + /*istanbul ignore end*/ + i); + } + + return { + oldFileName: oldFileName, + newFileName: newFileName, + oldHeader: oldHeader, + newHeader: newHeader, + hunks: hunks + }; +} + +function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { + var diff = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options); + var ret = []; + + if (oldFileName == newFileName) { + ret.push('Index: ' + oldFileName); + } + + ret.push('==================================================================='); + ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\t' + diff.oldHeader)); + ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader)); + + for (var i = 0; i < diff.hunks.length; i++) { + var hunk = diff.hunks[i]; + ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@'); + ret.push.apply(ret, hunk.lines); + } + + return ret.join('\n') + '\n'; +} + +function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) { + return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options); +} +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wYXRjaC9jcmVhdGUuanMiXSwibmFtZXMiOlsic3RydWN0dXJlZFBhdGNoIiwib2xkRmlsZU5hbWUiLCJ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RIZWFkZXIsIG5ld0hlYWRlciwgb3B0aW9ucyk7XG59XG4iXX0= diff --git a/node_modules/diff/lib/patch/merge.js b/node_modules/diff/lib/patch/merge.js new file mode 100644 index 0000000..bbd429a --- /dev/null +++ b/node_modules/diff/lib/patch/merge.js @@ -0,0 +1,609 @@ +/*istanbul ignore start*/ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.calcLineCount = calcLineCount; +exports.merge = merge; + +/*istanbul ignore end*/ +var +/*istanbul ignore start*/ +_create = require("./create") +/*istanbul ignore end*/ +; + +var +/*istanbul ignore start*/ +_parse = require("./parse") +/*istanbul ignore end*/ +; + +var +/*istanbul ignore start*/ +_array = require("../util/array") +/*istanbul ignore end*/ +; + +/*istanbul ignore start*/ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } + +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } + +function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } + +function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } + +/*istanbul ignore end*/ +function calcLineCount(hunk) { + /*istanbul ignore start*/ + var _calcOldNewLineCount = + /*istanbul ignore end*/ + calcOldNewLineCount(hunk.lines), + oldLines = _calcOldNewLineCount.oldLines, + newLines = _calcOldNewLineCount.newLines; + + if (oldLines !== undefined) { + hunk.oldLines = oldLines; + } else { + delete hunk.oldLines; + } + + if (newLines !== undefined) { + hunk.newLines = newLines; + } else { + delete hunk.newLines; + } +} + +function merge(mine, theirs, base) { + mine = loadPatch(mine, base); + theirs = loadPatch(theirs, base); + var ret = {}; // For index we just let it pass through as it doesn't have any necessary meaning. + // Leaving sanity checks on this to the API consumer that may know more about the + // meaning in their own context. + + if (mine.index || theirs.index) { + ret.index = mine.index || theirs.index; + } + + if (mine.newFileName || theirs.newFileName) { + if (!fileNameChanged(mine)) { + // No header or no change in ours, use theirs (and ours if theirs does not exist) + ret.oldFileName = theirs.oldFileName || mine.oldFileName; + ret.newFileName = theirs.newFileName || mine.newFileName; + ret.oldHeader = theirs.oldHeader || mine.oldHeader; + ret.newHeader = theirs.newHeader || mine.newHeader; + } else if (!fileNameChanged(theirs)) { + // No header or no change in theirs, use ours + ret.oldFileName = mine.oldFileName; + ret.newFileName = mine.newFileName; + ret.oldHeader = mine.oldHeader; + ret.newHeader = mine.newHeader; + } else { + // Both changed... figure it out + ret.oldFileName = selectField(ret, mine.oldFileName, theirs.oldFileName); + ret.newFileName = selectField(ret, mine.newFileName, theirs.newFileName); + ret.oldHeader = selectField(ret, mine.oldHeader, theirs.oldHeader); + ret.newHeader = selectField(ret, mine.newHeader, theirs.newHeader); + } + } + + ret.hunks = []; + var mineIndex = 0, + theirsIndex = 0, + mineOffset = 0, + theirsOffset = 0; + + while (mineIndex < mine.hunks.length || theirsIndex < theirs.hunks.length) { + var mineCurrent = mine.hunks[mineIndex] || { + oldStart: Infinity + }, + theirsCurrent = theirs.hunks[theirsIndex] || { + oldStart: Infinity + }; + + if (hunkBefore(mineCurrent, theirsCurrent)) { + // This patch does not overlap with any of the others, yay. + ret.hunks.push(cloneHunk(mineCurrent, mineOffset)); + mineIndex++; + theirsOffset += mineCurrent.newLines - mineCurrent.oldLines; + } else if (hunkBefore(theirsCurrent, mineCurrent)) { + // This patch does not overlap with any of the others, yay. + ret.hunks.push(cloneHunk(theirsCurrent, theirsOffset)); + theirsIndex++; + mineOffset += theirsCurrent.newLines - theirsCurrent.oldLines; + } else { + // Overlap, merge as best we can + var mergedHunk = { + oldStart: Math.min(mineCurrent.oldStart, theirsCurrent.oldStart), + oldLines: 0, + newStart: Math.min(mineCurrent.newStart + mineOffset, theirsCurrent.oldStart + theirsOffset), + newLines: 0, + lines: [] + }; + mergeLines(mergedHunk, mineCurrent.oldStart, mineCurrent.lines, theirsCurrent.oldStart, theirsCurrent.lines); + theirsIndex++; + mineIndex++; + ret.hunks.push(mergedHunk); + } + } + + return ret; +} + +function loadPatch(param, base) { + if (typeof param === 'string') { + if (/^@@/m.test(param) || /^Index:/m.test(param)) { + return ( + /*istanbul ignore start*/ + (0, + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + _parse + /*istanbul ignore end*/ + . + /*istanbul ignore start*/ + parsePatch) + /*istanbul ignore end*/ + (param)[0] + ); + } + + if (!base) { + throw new Error('Must provide a base reference or pass in a patch'); + } + + return ( + /*istanbul ignore start*/ + (0, + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + _create + /*istanbul ignore end*/ + . + /*istanbul ignore start*/ + structuredPatch) + /*istanbul ignore end*/ + (undefined, undefined, base, param) + ); + } + + return param; +} + +function fileNameChanged(patch) { + return patch.newFileName && patch.newFileName !== patch.oldFileName; +} + +function selectField(index, mine, theirs) { + if (mine === theirs) { + return mine; + } else { + index.conflict = true; + return { + mine: mine, + theirs: theirs + }; + } +} + +function hunkBefore(test, check) { + return test.oldStart < check.oldStart && test.oldStart + test.oldLines < check.oldStart; +} + +function cloneHunk(hunk, offset) { + return { + oldStart: hunk.oldStart, + oldLines: hunk.oldLines, + newStart: hunk.newStart + offset, + newLines: hunk.newLines, + lines: hunk.lines + }; +} + +function mergeLines(hunk, mineOffset, mineLines, theirOffset, theirLines) { + // This will generally result in a conflicted hunk, but there are cases where the context + // is the only overlap where we can successfully merge the content here. + var mine = { + offset: mineOffset, + lines: mineLines, + index: 0 + }, + their = { + offset: theirOffset, + lines: theirLines, + index: 0 + }; // Handle any leading content + + insertLeading(hunk, mine, their); + insertLeading(hunk, their, mine); // Now in the overlap content. Scan through and select the best changes from each. + + while (mine.index < mine.lines.length && their.index < their.lines.length) { + var mineCurrent = mine.lines[mine.index], + theirCurrent = their.lines[their.index]; + + if ((mineCurrent[0] === '-' || mineCurrent[0] === '+') && (theirCurrent[0] === '-' || theirCurrent[0] === '+')) { + // Both modified ... + mutualChange(hunk, mine, their); + } else if (mineCurrent[0] === '+' && theirCurrent[0] === ' ') { + /*istanbul ignore start*/ + var _hunk$lines; + + /*istanbul ignore end*/ + // Mine inserted + + /*istanbul ignore start*/ + (_hunk$lines = + /*istanbul ignore end*/ + hunk.lines).push. + /*istanbul ignore start*/ + apply + /*istanbul ignore end*/ + ( + /*istanbul ignore start*/ + _hunk$lines + /*istanbul ignore end*/ + , + /*istanbul ignore start*/ + _toConsumableArray( + /*istanbul ignore end*/ + collectChange(mine))); + } else if (theirCurrent[0] === '+' && mineCurrent[0] === ' ') { + /*istanbul ignore start*/ + var _hunk$lines2; + + /*istanbul ignore end*/ + // Theirs inserted + + /*istanbul ignore start*/ + (_hunk$lines2 = + /*istanbul ignore end*/ + hunk.lines).push. + /*istanbul ignore start*/ + apply + /*istanbul ignore end*/ + ( + /*istanbul ignore start*/ + _hunk$lines2 + /*istanbul ignore end*/ + , + /*istanbul ignore start*/ + _toConsumableArray( + /*istanbul ignore end*/ + collectChange(their))); + } else if (mineCurrent[0] === '-' && theirCurrent[0] === ' ') { + // Mine removed or edited + removal(hunk, mine, their); + } else if (theirCurrent[0] === '-' && mineCurrent[0] === ' ') { + // Their removed or edited + removal(hunk, their, mine, true); + } else if (mineCurrent === theirCurrent) { + // Context identity + hunk.lines.push(mineCurrent); + mine.index++; + their.index++; + } else { + // Context mismatch + conflict(hunk, collectChange(mine), collectChange(their)); + } + } // Now push anything that may be remaining + + + insertTrailing(hunk, mine); + insertTrailing(hunk, their); + calcLineCount(hunk); +} + +function mutualChange(hunk, mine, their) { + var myChanges = collectChange(mine), + theirChanges = collectChange(their); + + if (allRemoves(myChanges) && allRemoves(theirChanges)) { + // Special case for remove changes that are supersets of one another + if ( + /*istanbul ignore start*/ + (0, + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + _array + /*istanbul ignore end*/ + . + /*istanbul ignore start*/ + arrayStartsWith) + /*istanbul ignore end*/ + (myChanges, theirChanges) && skipRemoveSuperset(their, myChanges, myChanges.length - theirChanges.length)) { + /*istanbul ignore start*/ + var _hunk$lines3; + + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + (_hunk$lines3 = + /*istanbul ignore end*/ + hunk.lines).push. + /*istanbul ignore start*/ + apply + /*istanbul ignore end*/ + ( + /*istanbul ignore start*/ + _hunk$lines3 + /*istanbul ignore end*/ + , + /*istanbul ignore start*/ + _toConsumableArray( + /*istanbul ignore end*/ + myChanges)); + + return; + } else if ( + /*istanbul ignore start*/ + (0, + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + _array + /*istanbul ignore end*/ + . + /*istanbul ignore start*/ + arrayStartsWith) + /*istanbul ignore end*/ + (theirChanges, myChanges) && skipRemoveSuperset(mine, theirChanges, theirChanges.length - myChanges.length)) { + /*istanbul ignore start*/ + var _hunk$lines4; + + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + (_hunk$lines4 = + /*istanbul ignore end*/ + hunk.lines).push. + /*istanbul ignore start*/ + apply + /*istanbul ignore end*/ + ( + /*istanbul ignore start*/ + _hunk$lines4 + /*istanbul ignore end*/ + , + /*istanbul ignore start*/ + _toConsumableArray( + /*istanbul ignore end*/ + theirChanges)); + + return; + } + } else if ( + /*istanbul ignore start*/ + (0, + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + _array + /*istanbul ignore end*/ + . + /*istanbul ignore start*/ + arrayEqual) + /*istanbul ignore end*/ + (myChanges, theirChanges)) { + /*istanbul ignore start*/ + var _hunk$lines5; + + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + (_hunk$lines5 = + /*istanbul ignore end*/ + hunk.lines).push. + /*istanbul ignore start*/ + apply + /*istanbul ignore end*/ + ( + /*istanbul ignore start*/ + _hunk$lines5 + /*istanbul ignore end*/ + , + /*istanbul ignore start*/ + _toConsumableArray( + /*istanbul ignore end*/ + myChanges)); + + return; + } + + conflict(hunk, myChanges, theirChanges); +} + +function removal(hunk, mine, their, swap) { + var myChanges = collectChange(mine), + theirChanges = collectContext(their, myChanges); + + if (theirChanges.merged) { + /*istanbul ignore start*/ + var _hunk$lines6; + + /*istanbul ignore end*/ + + /*istanbul ignore start*/ + (_hunk$lines6 = + /*istanbul ignore end*/ + hunk.lines).push. + /*istanbul ignore start*/ + apply + /*istanbul ignore end*/ + ( + /*istanbul ignore start*/ + _hunk$lines6 + /*istanbul ignore end*/ + , + /*istanbul ignore start*/ + _toConsumableArray( + /*istanbul ignore end*/ + theirChanges.merged)); + } else { + conflict(hunk, swap ? theirChanges : myChanges, swap ? myChanges : theirChanges); + } +} + +function conflict(hunk, mine, their) { + hunk.conflict = true; + hunk.lines.push({ + conflict: true, + mine: mine, + theirs: their + }); +} + +function insertLeading(hunk, insert, their) { + while (insert.offset < their.offset && insert.index < insert.lines.length) { + var line = insert.lines[insert.index++]; + hunk.lines.push(line); + insert.offset++; + } +} + +function insertTrailing(hunk, insert) { + while (insert.index < insert.lines.length) { + var line = insert.lines[insert.index++]; + hunk.lines.push(line); + } +} + +function collectChange(state) { + var ret = [], + operation = state.lines[state.index][0]; + + while (state.index < state.lines.length) { + var line = state.lines[state.index]; // Group additions that are immediately after subtractions and treat them as one "atomic" modify change. + + if (operation === '-' && line[0] === '+') { + operation = '+'; + } + + if (operation === line[0]) { + ret.push(line); + state.index++; + } else { + break; + } + } + + return ret; +} + +function collectContext(state, matchChanges) { + var changes = [], + merged = [], + matchIndex = 0, + contextChanges = false, + conflicted = false; + + while (matchIndex < matchChanges.length && state.index < state.lines.length) { + var change = state.lines[state.index], + match = matchChanges[matchIndex]; // Once we've hit our add, then we are done + + if (match[0] === '+') { + break; + } + + contextChanges = contextChanges || change[0] !== ' '; + merged.push(match); + matchIndex++; // Consume any additions in the other block as a conflict to attempt + // to pull in the remaining context after this + + if (change[0] === '+') { + conflicted = true; + + while (change[0] === '+') { + changes.push(change); + change = state.lines[++state.index]; + } + } + + if (match.substr(1) === change.substr(1)) { + changes.push(change); + state.index++; + } else { + conflicted = true; + } + } + + if ((matchChanges[matchIndex] || '')[0] === '+' && contextChanges) { + conflicted = true; + } + + if (conflicted) { + return changes; + } + + while (matchIndex < matchChanges.length) { + merged.push(matchChanges[matchIndex++]); + } + + return { + merged: merged, + changes: changes + }; +} + +function allRemoves(changes) { + return changes.reduce(function (prev, change) { + return prev && change[0] === '-'; + }, true); +} + +function skipRemoveSuperset(state, removeChanges, delta) { + for (var i = 0; i < delta; i++) { + var changeContent = removeChanges[removeChanges.length - delta + i].substr(1); + + if (state.lines[state.index + i] !== ' ' + changeContent) { + return false; + } + } + + state.index += delta; + return true; +} + +function calcOldNewLineCount(lines) { + var oldLines = 0; + var newLines = 0; + lines.forEach(function (line) { + if (typeof line !== 'string') { + var myCount = calcOldNewLineCount(line.mine); + var theirCount = calcOldNewLineCount(line.theirs); + + if (oldLines !== undefined) { + if (myCount.oldLines === theirCount.oldLines) { + oldLines += myCount.oldLines; + } else { + oldLines = undefined; + } + } + + if (newLines !== undefined) { + if (myCount.newLines === theirCount.newLines) { + newLines += myCount.newLines; + } else { + newLines = undefined; + } + } + } else { + if (newLines !== undefined && (line[0] === '+' || line[0] === ' ')) { + newLines++; + } + + if (oldLines !== undefined && (line[0] === '-' || line[0] === ' ')) { + oldLines++; + } + } + }); + return { + oldLines: oldLines, + newLines: newLines + }; +} +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wYXRjaC9tZXJnZS5qcyJdLCJuYW1lcyI6WyJjYWxjTGluZUNvdW50IiwiaHVuayIsImNhbGNPbGROZXdMaW5lQ291bnQiLCJsaW5lcyIsIm9sZExpbmVzIiwibmV3TGluZXMiLCJ1bmRlZmluZWQiLCJtZXJnZSIsIm1pbmUiLCJ0aGVpcnMiLCJiYXNlIiwibG9hZFBhdGNoIiwicmV0IiwiaW5kZXgiLCJuZXdGaWxlTmFtZSIsImZpbGVOYW1lQ2hhbmdlZCIsIm9sZEZpbGVOYW1lIiwib2xkSGVhZGVyIiwibmV3SGVhZGVyIi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RleCArPSBkZWx0YTtcbiAgcmV0dXJuIHRydWU7XG59XG5cbmZ1bmN0aW9uIGNhbGNPbGROZXdMaW5lQ291bnQobGluZXMpIHtcbiAgbGV0IG9sZExpbmVzID0gMDtcbiAgbGV0IG5ld0xpbmVzID0gMDtcblxuICBsaW5lcy5mb3JFYWNoKGZ1bmN0aW9uKGxpbmUpIHtcbiAgICBpZiAodHlwZW9mIGxpbmUgIT09ICdzdHJpbmcnKSB7XG4gICAgICBsZXQgbXlDb3VudCA9IGNhbGNPbGROZXdMaW5lQ291bnQobGluZS5taW5lKTtcbiAgICAgIGxldCB0aGVpckNvdW50ID0gY2FsY09sZE5ld0xpbmVDb3VudChsaW5lLnRoZWlycyk7XG5cbiAgICAgIGlmIChvbGRMaW5lcyAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIGlmIChteUNvdW50Lm9sZExpbmVzID09PSB0aGVpckNvdW50Lm9sZExpbmVzKSB7XG4gICAgICAgICAgb2xkTGluZXMgKz0gbXlDb3VudC5vbGRMaW5lcztcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBvbGRMaW5lcyA9IHVuZGVmaW5lZDtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZiAobmV3TGluZXMgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICBpZiAobXlDb3VudC5uZXdMaW5lcyA9PT0gdGhlaXJDb3VudC5uZXdMaW5lcykge1xuICAgICAgICAgIG5ld0xpbmVzICs9IG15Q291bnQubmV3TGluZXM7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgbmV3TGluZXMgPSB1bmRlZmluZWQ7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgaWYgKG5ld0xpbmVzICE9PSB1bmRlZmluZWQgJiYgKGxpbmVbMF0gPT09ICcrJyB8fCBsaW5lWzBdID09PSAnICcpKSB7XG4gICAgICAgIG5ld0xpbmVzKys7XG4gICAgICB9XG4gICAgICBpZiAob2xkTGluZXMgIT09IHVuZGVmaW5lZCAmJiAobGluZVswXSA9PT0gJy0nIHx8IGxpbmVbMF0gPT09ICcgJykpIHtcbiAgICAgICAgb2xkTGluZXMrKztcbiAgICAgIH1cbiAgICB9XG4gIH0pO1xuXG4gIHJldHVybiB7b2xkTGluZXMsIG5ld0xpbmVzfTtcbn1cbiJdfQ== diff --git a/node_modules/diff/lib/patch/parse.js b/node_modules/diff/lib/patch/parse.js new file mode 100644 index 0000000..51bae56 --- /dev/null +++ b/node_modules/diff/lib/patch/parse.js @@ -0,0 +1,156 @@ +/*istanbul ignore start*/ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.parsePatch = parsePatch; + +/*istanbul ignore end*/ +function parsePatch(uniDiff) { + /*istanbul ignore start*/ + var + /*istanbul ignore end*/ + options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var diffstr = uniDiff.split(/\r\n|[\n\v\f\r\x85]/), + delimiters = uniDiff.match(/\r\n|[\n\v\f\r\x85]/g) || [], + list = [], + i = 0; + + function parseIndex() { + var index = {}; + list.push(index); // Parse diff metadata + + while (i < diffstr.length) { + var line = diffstr[i]; // File header found, end parsing diff metadata + + if (/^(\-\-\-|\+\+\+|@@)\s/.test(line)) { + break; + } // Diff index + + + var headerMatch = /^(?:Index:|diff(?: -r \w+)+)\s+/.exec(line); + + if (headerMatch) { + index.index = line.substring(headerMatch[0].length).trim(); + } + + i++; + } // Parse file headers if they are defined. Unified diff requires them, but + // there's no technical issues to have an isolated hunk without file header + + + parseFileHeader(index); + parseFileHeader(index); // Parse hunks + + index.hunks = []; + + while (i < diffstr.length) { + var _line = diffstr[i]; + + if (/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(_line)) { + break; + } else if (/^@@/.test(_line)) { + index.hunks.push(parseHunk()); + } else if (_line && options.strict) { + // Ignore unexpected content unless in strict mode + throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(_line)); + } else { + i++; + } + } + } // Parses the --- and +++ headers, if none are found, no lines + // are consumed. + + + function parseFileHeader(index) { + var fileHeaderMatch = /^(---|\+\+\+)\s+/.exec(diffstr[i]); + + if (fileHeaderMatch) { + var keyPrefix = fileHeaderMatch[1] === '---' ? 'old' : 'new'; + var data = diffstr[i].substring(3).trim().split('\t', 2); + var fileName = data[0].replace(/\\\\/g, '\\'); + + if (fileName.startsWith('"') && fileName.endsWith('"')) { + fileName = fileName.substr(1, fileName.length - 2); + } + + index[keyPrefix + 'FileName'] = fileName; + index[keyPrefix + 'Header'] = (data[1] || '').trim(); + i++; + } + } // Parses a hunk + // This assumes that we are at the start of a hunk. + + + function parseHunk() { + var chunkHeaderIndex = i, + chunkHeaderLine = diffstr[i++], + chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/); + var hunk = { + oldStart: +chunkHeader[1], + oldLines: +chunkHeader[2] || 1, + newStart: +chunkHeader[3], + newLines: +chunkHeader[4] || 1, + lines: [], + linedelimiters: [] + }; + var addCount = 0, + removeCount = 0; + + for (; i < diffstr.length; i++) { + // Lines starting with '---' could be mistaken for the "remove line" operation + // But they could be the header for the next file. Therefore prune such cases out. + if (diffstr[i].indexOf('--- ') === 0 && i + 2 < diffstr.length && diffstr[i + 1].indexOf('+++ ') === 0 && diffstr[i + 2].indexOf('@@') === 0) { + break; + } + + var operation = diffstr[i].length == 0 && i != diffstr.length - 1 ? ' ' : diffstr[i][0]; + + if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') { + hunk.lines.push(diffstr[i]); + hunk.linedelimiters.push(delimiters[i] || '\n'); + + if (operation === '+') { + addCount++; + } else if (operation === '-') { + removeCount++; + } else if (operation === ' ') { + addCount++; + removeCount++; + } + } else { + break; + } + } // Handle the empty block count case + + + if (!addCount && hunk.newLines === 1) { + hunk.newLines = 0; + } + + if (!removeCount && hunk.oldLines === 1) { + hunk.oldLines = 0; + } // Perform optional sanity checking + + + if (options.strict) { + if (addCount !== hunk.newLines) { + throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); + } + + if (removeCount !== hunk.oldLines) { + throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); + } + } + + return hunk; + } + + while (i < diffstr.length) { + parseIndex(); + } + + return list; +} +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wYXRjaC9wYXJzZS5qcyJdLCJuYW1lcyI6WyJwYXJzZVBhdGNoIiwidW5pRGlmZiIsIm9wdGlvbnMiLCJkaWZmc3RyIiwic3BsaXQiLCJkZWxpbWl0ZXJzIiwibWF0Y2giLCJsaXN0IiwiaSIsInBhcnNlSW5kZXgiLCJpbmRleCIsInB1c2giLCJsZW5ndGgiLCJsaW5lIiwidGVzdCIsImhlYWRlck1hdGNoIiwiZXhlYyIsInN1YnN0cmluZyIsInRyaW0iLCJwYXJzZUZpbGVIZWFkZXIiLCJodW5rcyIsInBhcnNlSHVuayIsInN0cmljdCIsIkVycm9yIiwiSlNPTiIsInN0cmluZ2lmeSIsImZpbGVIZWFkZXJNYXRjaCIsImtleVByZWZpeCIsImRhdGEiLCJmaWxlTmFtZSIsInJlcGxhY2UiLCJzdGFydHNXaXRoIiwiZW5kc1dpdGgiLCJzdWJzdHIiLCJjaHVua0hlYWRlckluZGV4IiwiY2h1bmtIZWFkZXJMaW5lIiwiY2h1bmtIZWFkZXIiLCJodW5rIiwib2xkU3RhcnQiLCJvbGRMaW5lcyIsIm5ld1N0YXJ0IiwibmV3TGluZXMiLCJsaW5lcyIsImxpbmVkZWxpbWl0ZXJzIiwiYWRkQ291bnQiLCJyZW1vdmVDb3VudCIsImluZGV4T2YiLCJvcGVyYXRpb24iXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OztBQUFPLFNBQVNBLFVBQVQsQ0FBb0JDLE9BQXBCLEVBQTJDO0FBQUE7QUFBQTtBQUFBO0FBQWRDLEVBQUFBLE9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GUgaGVhZGVyIGZvciB0aGUgbmV4dCBmaWxlLiBUaGVyZWZvcmUgcHJ1bmUgc3VjaCBjYXNlcyBvdXQuXG4gICAgICBpZiAoZGlmZnN0cltpXS5pbmRleE9mKCctLS0gJykgPT09IDBcbiAgICAgICAgICAgICYmIChpICsgMiA8IGRpZmZzdHIubGVuZ3RoKVxuICAgICAgICAgICAgJiYgZGlmZnN0cltpICsgMV0uaW5kZXhPZignKysrICcpID09PSAwXG4gICAgICAgICAgICAmJiBkaWZmc3RyW2kgKyAyXS5pbmRleE9mKCdAQCcpID09PSAwKSB7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICB9XG4gICAgICBsZXQgb3BlcmF0aW9uID0gKGRpZmZzdHJbaV0ubGVuZ3RoID09IDAgJiYgaSAhPSAoZGlmZnN0ci5sZW5ndGggLSAxKSkgPyAnICcgOiBkaWZmc3RyW2ldWzBdO1xuXG4gICAgICBpZiAob3BlcmF0aW9uID09PSAnKycgfHwgb3BlcmF0aW9uID09PSAnLScgfHwgb3BlcmF0aW9uID09PSAnICcgfHwgb3BlcmF0aW9uID09PSAnXFxcXCcpIHtcbiAgICAgICAgaHVuay5saW5lcy5wdXNoKGRpZmZzdHJbaV0pO1xuICAgICAgICBodW5rLmxpbmVkZWxpbWl0ZXJzLnB1c2goZGVsaW1pdGVyc1tpXSB8fCAnXFxuJyk7XG5cbiAgICAgICAgaWYgKG9wZXJhdGlvbiA9PT0gJysnKSB7XG4gICAgICAgICAgYWRkQ291bnQrKztcbiAgICAgICAgfSBlbHNlIGlmIChvcGVyYXRpb24gPT09ICctJykge1xuICAgICAgICAgIHJlbW92ZUNvdW50Kys7XG4gICAgICAgIH0gZWxzZSBpZiAob3BlcmF0aW9uID09PSAnICcpIHtcbiAgICAgICAgICBhZGRDb3VudCsrO1xuICAgICAgICAgIHJlbW92ZUNvdW50Kys7XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGJyZWFrO1xuICAgICAgfVxuICAgIH1cblxuICAgIC8vIEhhbmRsZSB0aGUgZW1wdHkgYmxvY2sgY291bnQgY2FzZVxuICAgIGlmICghYWRkQ291bnQgJiYgaHVuay5uZXdMaW5lcyA9PT0gMSkge1xuICAgICAgaHVuay5uZXdMaW5lcyA9IDA7XG4gICAgfVxuICAgIGlmICghcmVtb3ZlQ291bnQgJiYgaHVuay5vbGRMaW5lcyA9PT0gMSkge1xuICAgICAgaHVuay5vbGRMaW5lcyA9IDA7XG4gICAgfVxuXG4gICAgLy8gUGVyZm9ybSBvcHRpb25hbCBzYW5pdHkgY2hlY2tpbmdcbiAgICBpZiAob3B0aW9ucy5zdHJpY3QpIHtcbiAgICAgIGlmIChhZGRDb3VudCAhPT0gaHVuay5uZXdMaW5lcykge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0FkZGVkIGxpbmUgY291bnQgZGlkIG5vdCBtYXRjaCBmb3IgaHVuayBhdCBsaW5lICcgKyAoY2h1bmtIZWFkZXJJbmRleCArIDEpKTtcbiAgICAgIH1cbiAgICAgIGlmIChyZW1vdmVDb3VudCAhPT0gaHVuay5vbGRMaW5lcykge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ1JlbW92ZWQgbGluZSBjb3VudCBkaWQgbm90IG1hdGNoIGZvciBodW5rIGF0IGxpbmUgJyArIChjaHVua0hlYWRlckluZGV4ICsgMSkpO1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiBodW5rO1xuICB9XG5cbiAgd2hpbGUgKGkgPCBkaWZmc3RyLmxlbmd0aCkge1xuICAgIHBhcnNlSW5kZXgoKTtcbiAgfVxuXG4gIHJldHVybiBsaXN0O1xufVxuIl19 diff --git a/node_modules/diff/lib/util/array.js b/node_modules/diff/lib/util/array.js new file mode 100644 index 0000000..aecf67a --- /dev/null +++ b/node_modules/diff/lib/util/array.js @@ -0,0 +1,32 @@ +/*istanbul ignore start*/ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.arrayEqual = arrayEqual; +exports.arrayStartsWith = arrayStartsWith; + +/*istanbul ignore end*/ +function arrayEqual(a, b) { + if (a.length !== b.length) { + return false; + } + + return arrayStartsWith(a, b); +} + +function arrayStartsWith(array, start) { + if (start.length > array.length) { + return false; + } + + for (var i = 0; i < start.length; i++) { + if (start[i] !== array[i]) { + return false; + } + } + + return true; +} +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsL2FycmF5LmpzIl0sIm5hbWVzIjpbImFycmF5RXF1YWwiLCJhIiwiYiIsImxlbmd0aCIsImFycmF5U3RhcnRzV2l0aCIsImFycmF5Iiwic3RhcnQiLCJpIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQU8sU0FBU0EsVUFBVCxDQUFvQkMsQ0FBcEIsRUFBdUJDLENBQXZCLEVBQTBCO0FBQy9CLE1BQUlELENBQUMsQ0FBQ0UsTUFBRixLQUFhRCxDQUFDLENBQUNDLE1BQW5CLEVBQTJCO0FBQ3pCLFdBQU8sS0FBUDtBQUNEOztBQUVELFNBQU9DLGVBQWUsQ0FBQ0gsQ0FBRCxFQUFJQyxDQUFKLENBQXRCO0FBQ0Q7O0FBRU0sU0FBU0UsZUFBVCxDQUF5QkMsS0FBekIsRUFBZ0NDLEtBQWhDLEVBQXVDO0FBQzVDLE1BQUlBLEtBQUssQ0FBQ0gsTUFBTixHQUFlRSxLQUFLLENBQUNGLE1BQXpCLEVBQWlDO0FBQy9CLFdBQU8sS0FBUDtBQUNEOztBQUVELE9BQUssSUFBSUksQ0FBQyxHQUFHLENBQWIsRUFBZ0JBLENBQUMsR0FBR0QsS0FBSyxDQUFDSCxNQUExQixFQUFrQ0ksQ0FBQyxFQUFuQyxFQUF1QztBQUNyQyxRQUFJRCxLQUFLLENBQUNDLENBQUQsQ0FBTCxLQUFhRixLQUFLLENBQUNFLENBQUQsQ0FBdEIsRUFBMkI7QUFDekIsYUFBTyxLQUFQO0FBQ0Q7QUFDRjs7QUFFRCxTQUFPLElBQVA7QUFDRCIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBmdW5jdGlvbiBhcnJheUVxdWFsKGEsIGIpIHtcbiAgaWYgKGEubGVuZ3RoICE9PSBiLmxlbmd0aCkge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIHJldHVybiBhcnJheVN0YXJ0c1dpdGgoYSwgYik7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBhcnJheVN0YXJ0c1dpdGgoYXJyYXksIHN0YXJ0KSB7XG4gIGlmIChzdGFydC5sZW5ndGggPiBhcnJheS5sZW5ndGgpIHtcbiAgICByZXR1cm4gZmFsc2U7XG4gIH1cblxuICBmb3IgKGxldCBpID0gMDsgaSA8IHN0YXJ0Lmxlbmd0aDsgaSsrKSB7XG4gICAgaWYgKHN0YXJ0W2ldICE9PSBhcnJheVtpXSkge1xuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiB0cnVlO1xufVxuIl19 diff --git a/node_modules/diff/lib/util/distance-iterator.js b/node_modules/diff/lib/util/distance-iterator.js new file mode 100644 index 0000000..5edbaf8 --- /dev/null +++ b/node_modules/diff/lib/util/distance-iterator.js @@ -0,0 +1,57 @@ +/*istanbul ignore start*/ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; + +/*istanbul ignore end*/ +// Iterator that traverses in the range of [min, max], stepping +// by distance from a given start position. I.e. for [0, 4], with +// start of 2, this will iterate 2, 3, 1, 4, 0. +function +/*istanbul ignore start*/ +_default +/*istanbul ignore end*/ +(start, minLine, maxLine) { + var wantForward = true, + backwardExhausted = false, + forwardExhausted = false, + localOffset = 1; + return function iterator() { + if (wantForward && !forwardExhausted) { + if (backwardExhausted) { + localOffset++; + } else { + wantForward = false; + } // Check if trying to fit beyond text length, and if not, check it fits + // after offset location (or desired location on first iteration) + + + if (start + localOffset <= maxLine) { + return localOffset; + } + + forwardExhausted = true; + } + + if (!backwardExhausted) { + if (!forwardExhausted) { + wantForward = true; + } // Check if trying to fit before text beginning, and if not, check it fits + // before offset location + + + if (minLine <= start - localOffset) { + return -localOffset++; + } + + backwardExhausted = true; + return iterator(); + } // We tried to fit hunk before text beginning and beyond text length, then + // hunk can't fit on the text. Return undefined + + }; +} +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsL2Rpc3RhbmNlLWl0ZXJhdG9yLmpzIl0sIm5hbWVzIjpbInN0YXJ0IiwibWluTGluZSIsIm1heExpbmUiLCJ3YW50Rm9yd2FyZCIsImJhY2t3YXJkRXhoYXVzdGVkIiwiZm9yd2FyZEV4aGF1c3RlZCIsImxvY2FsT2Zmc2V0IiwiaXRlcmF0b3IiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OztBQUFBO0FBQ0E7QUFDQTtBQUNlO0FBQUE7QUFBQTtBQUFBO0FBQUEsQ0FBU0EsS0FBVCxFQUFnQkMsT0FBaEIsRUFBeUJDLE9BQXpCLEVBQWtDO0FBQy9DLE1BQUlDLFdBQVcsR0FBRyxJQUFsQjtBQUFBLE1BQ0lDLGlCQUFpQixHQUFHLEtBRHhCO0FBQUEsTUFFSUMsZ0JBQWdCLEdBQUcsS0FGdkI7QUFBQSxNQUdJQyxXQUFXLEdBQUcsQ0FIbEI7QUFLQSxTQUFPLFNBQVNDLFFBQVQsR0FBb0I7QUFDekIsUUFBSUosV0FBVyxJQUFJLENBQUNFLGdCQUFwQixFQUFzQztBQUNwQyxVQUFJRCxpQkFBSixFQUF1QjtBQUNyQkUsUUFBQUEsV0FBVztBQUNaLE9BRkQsTUFFTztBQUNMSCxRQUFBQSxXQUFXLEdBQUcsS0FBZDtBQUNELE9BTG1DLENBT3BDO0FBQ0E7OztBQUNBLFVBQUlILEtBQUssR0FBR00sV0FBUixJQUF1QkosT0FBM0IsRUFBb0M7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cgYW5kIGJleW9uZCB0ZXh0IGxlbmd0aCwgdGhlblxuICAgIC8vIGh1bmsgY2FuJ3QgZml0IG9uIHRoZSB0ZXh0LiBSZXR1cm4gdW5kZWZpbmVkXG4gIH07XG59XG4iXX0= diff --git a/node_modules/diff/lib/util/params.js b/node_modules/diff/lib/util/params.js new file mode 100644 index 0000000..e838eb2 --- /dev/null +++ b/node_modules/diff/lib/util/params.js @@ -0,0 +1,24 @@ +/*istanbul ignore start*/ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.generateOptions = generateOptions; + +/*istanbul ignore end*/ +function generateOptions(options, defaults) { + if (typeof options === 'function') { + defaults.callback = options; + } else if (options) { + for (var name in options) { + /* istanbul ignore else */ + if (options.hasOwnProperty(name)) { + defaults[name] = options[name]; + } + } + } + + return defaults; +} +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsL3BhcmFtcy5qcyJdLCJuYW1lcyI6WyJnZW5lcmF0ZU9wdGlvbnMiLCJvcHRpb25zIiwiZGVmYXVsdHMiLCJjYWxsYmFjayIsIm5hbWUiLCJoYXNPd25Qcm9wZXJ0eSJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQU8sU0FBU0EsZUFBVCxDQUF5QkMsT0FBekIsRUFBa0NDLFFBQWxDLEVBQTRDO0FBQ2pELE1BQUksT0FBT0QsT0FBUCxLQUFtQixVQUF2QixFQUFtQztBQUNqQ0MsSUFBQUEsUUFBUSxDQUFDQyxRQUFULEdBQW9CRixPQUFwQjtBQUNELEdBRkQsTUFFTyxJQUFJQSxPQUFKLEVBQWE7QUFDbEIsU0FBSyxJQUFJRyxJQUFULElBQWlCSCxPQUFqQixFQUEwQjtBQUN4QjtBQUNBLFVBQUlBLE9BQU8sQ0FBQ0ksY0FBUixDQUF1QkQsSUFBdkIsQ0FBSixFQUFrQztBQUNoQ0YsUUFBQUEsUUFBUSxDQUFDRSxJQUFELENBQVIsR0FBaUJILE9BQU8sQ0FBQ0csSUFBRCxDQUF4QjtBQUNEO0FBQ0Y7QUFDRjs7QUFDRCxTQUFPRixRQUFQO0FBQ0QiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZnVuY3Rpb24gZ2VuZXJhdGVPcHRpb25zKG9wdGlvbnMsIGRlZmF1bHRzKSB7XG4gIGlmICh0eXBlb2Ygb3B0aW9ucyA9PT0gJ2Z1bmN0aW9uJykge1xuICAgIGRlZmF1bHRzLmNhbGxiYWNrID0gb3B0aW9ucztcbiAgfSBlbHNlIGlmIChvcHRpb25zKSB7XG4gICAgZm9yIChsZXQgbmFtZSBpbiBvcHRpb25zKSB7XG4gICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgZWxzZSAqL1xuICAgICAgaWYgKG9wdGlvbnMuaGFzT3duUHJvcGVydHkobmFtZSkpIHtcbiAgICAgICAgZGVmYXVsdHNbbmFtZV0gPSBvcHRpb25zW25hbWVdO1xuICAgICAgfVxuICAgIH1cbiAgfVxuICByZXR1cm4gZGVmYXVsdHM7XG59XG4iXX0= diff --git a/node_modules/diff/package.json b/node_modules/diff/package.json new file mode 100644 index 0000000..2390039 --- /dev/null +++ b/node_modules/diff/package.json @@ -0,0 +1,74 @@ +{ + "name": "diff", + "version": "4.0.4", + "description": "A javascript text diff implementation.", + "keywords": [ + "diff", + "javascript" + ], + "maintainers": [ + "Kevin Decker (http://incaseofstairs.com)" + ], + "bugs": { + "email": "kpdecker@gmail.com", + "url": "http://github.com/kpdecker/jsdiff/issues" + }, + "license": "BSD-3-Clause", + "repository": { + "type": "git", + "url": "git://github.com/kpdecker/jsdiff.git" + }, + "engines": { + "node": ">=0.3.1" + }, + "main": "./lib/index.js", + "module": "./lib/index.es6.js", + "browser": "./dist/diff.js", + "scripts": { + "clean": "rm -rf lib/ dist/", + "build:node": "yarn babel --out-dir lib --source-maps=inline src", + "test": "grunt" + }, + "devDependencies": { + "@babel/cli": "^7.2.3", + "@babel/core": "^7.2.2", + "@babel/plugin-transform-modules-commonjs": "^7.2.0", + "@babel/preset-env": "^7.2.3", + "@babel/register": "^7.0.0", + "babel-eslint": "^10.0.1", + "babel-loader": "^8.0.5", + "chai": "^4.2.0", + "colors": "^1.3.3", + "eslint": "^5.12.0", + "grunt": "^1.0.3", + "grunt-babel": "^8.0.0", + "grunt-clean": "^0.4.0", + "grunt-cli": "^1.3.2", + "grunt-contrib-clean": "^2.0.0", + "grunt-contrib-copy": "^1.0.0", + "grunt-contrib-uglify": "^4.0.0", + "grunt-contrib-watch": "^1.1.0", + "grunt-eslint": "^21.0.0", + "grunt-exec": "^3.0.0", + "grunt-karma": "^3.0.1", + "grunt-mocha-istanbul": "^5.0.2", + "grunt-mocha-test": "^0.13.3", + "grunt-webpack": "^3.1.3", + "istanbul": "github:kpdecker/istanbul", + "karma": "^3.1.4", + "karma-chrome-launcher": "^2.2.0", + "karma-mocha": "^1.3.0", + "karma-mocha-reporter": "^2.0.0", + "karma-sauce-launcher": "^2.0.2", + "karma-sourcemap-loader": "^0.3.6", + "karma-webpack": "^3.0.5", + "mocha": "^5.2.0", + "rollup": "^1.0.2", + "rollup-plugin-babel": "^4.2.0", + "semver": "^5.6.0", + "webpack": "^4.28.3", + "webpack-dev-server": "^3.1.14" + }, + "optionalDependencies": {}, + "packageManager": "yarn@1.22.22+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610" +} diff --git a/node_modules/diff/release-notes.md b/node_modules/diff/release-notes.md new file mode 100644 index 0000000..edc4cd3 --- /dev/null +++ b/node_modules/diff/release-notes.md @@ -0,0 +1,261 @@ +# Release Notes + +## Development + +[Commits](https://github.com/kpdecker/jsdiff/compare/v4.0.1...master) + +## v4.0.1 - January 6th, 2019 +- Fix main reference path - b826104 + +[Commits](https://github.com/kpdecker/jsdiff/compare/v4.0.0...v4.0.1) + +## v4.0.0 - January 5th, 2019 +- [#94](https://github.com/kpdecker/jsdiff/issues/94) - Missing "No newline at end of file" when comparing two texts that do not end in newlines ([@federicotdn](https://api.github.com/users/federicotdn)) +- [#227](https://github.com/kpdecker/jsdiff/issues/227) - Licence +- [#199](https://github.com/kpdecker/jsdiff/issues/199) - Import statement for jsdiff +- [#159](https://github.com/kpdecker/jsdiff/issues/159) - applyPatch affecting wrong line number with with new lines +- [#8](https://github.com/kpdecker/jsdiff/issues/8) - A new state "replace" +- Drop ie9 from karma targets - 79c31bd +- Upgrade deps. Convert from webpack to rollup - 2c1a29c +- Make ()[]"' as word boundaries between each other - f27b899 +- jsdiff: Replaced phantomJS by chrome - ec3114e +- Add yarn.lock to .npmignore - 29466d8 + +Compatibility notes: +- Bower and Component packages no longer supported + + +[Commits](https://github.com/kpdecker/jsdiff/compare/v3.5.0...v4.0.0) + +## v3.5.0 - March 4th, 2018 +- Omit redundant slice in join method of diffArrays - 1023590 +- Support patches with empty lines - fb0f208 +- Accept a custom JSON replacer function for JSON diffing - 69c7f0a +- Optimize parch header parser - 2aec429 +- Fix typos - e89c832 + +[Commits](https://github.com/kpdecker/jsdiff/compare/v3.4.0...v3.5.0) + +## v3.4.0 - October 7th, 2017 +- [#183](https://github.com/kpdecker/jsdiff/issues/183) - Feature request: ability to specify a custom equality checker for `diffArrays` +- [#173](https://github.com/kpdecker/jsdiff/issues/173) - Bug: diffArrays gives wrong result on array of booleans +- [#158](https://github.com/kpdecker/jsdiff/issues/158) - diffArrays will not compare the empty string in array? +- comparator for custom equality checks - 30e141e +- count oldLines and newLines when there are conflicts - 53bf384 +- Fix: diffArrays can compare falsey items - 9e24284 +- Docs: Replace grunt with npm test - 00e2f94 + +[Commits](https://github.com/kpdecker/jsdiff/compare/v3.3.1...v3.4.0) + +## v3.3.1 - September 3rd, 2017 +- [#141](https://github.com/kpdecker/jsdiff/issues/141) - Cannot apply patch because my file delimiter is "/r/n" instead of "/n" +- [#192](https://github.com/kpdecker/jsdiff/pull/192) - Fix: Bad merge when adding new files (#189) +- correct spelling mistake - 21fa478 + +[Commits](https://github.com/kpdecker/jsdiff/compare/v3.3.0...v3.3.1) + +## v3.3.0 - July 5th, 2017 +- [#114](https://github.com/kpdecker/jsdiff/issues/114) - /patch/merge not exported +- Gracefully accept invalid newStart in hunks, same as patch(1) does. - d8a3635 +- Use regex rather than starts/ends with for parsePatch - 6cab62c +- Add browser flag - e64f674 +- refactor: simplified code a bit more - 8f8e0f2 +- refactor: simplified code a bit - b094a6f +- fix: some corrections re ignoreCase option - 3c78fd0 +- ignoreCase option - 3cbfbb5 +- Sanitize filename while parsing patches - 2fe8129 +- Added better installation methods - aced50b +- Simple export of functionality - 8690f31 + +[Commits](https://github.com/kpdecker/jsdiff/compare/v3.2.0...v3.3.0) + +## v3.2.0 - December 26th, 2016 +- [#156](https://github.com/kpdecker/jsdiff/pull/156) - Add `undefinedReplacement` option to `diffJson` ([@ewnd9](https://api.github.com/users/ewnd9)) +- [#154](https://github.com/kpdecker/jsdiff/pull/154) - Add `examples` and `images` to `.npmignore`. ([@wtgtybhertgeghgtwtg](https://api.github.com/users/wtgtybhertgeghgtwtg)) +- [#153](https://github.com/kpdecker/jsdiff/pull/153) - feat(structuredPatch): Pass options to diffLines ([@Kiougar](https://api.github.com/users/Kiougar)) + +[Commits](https://github.com/kpdecker/jsdiff/compare/v3.1.0...v3.2.0) + +## v3.1.0 - November 27th, 2016 +- [#146](https://github.com/kpdecker/jsdiff/pull/146) - JsDiff.diffArrays to compare arrays ([@wvanderdeijl](https://api.github.com/users/wvanderdeijl)) +- [#144](https://github.com/kpdecker/jsdiff/pull/144) - Split file using all possible line delimiter instead of hard-coded "/n" and join lines back using the original delimiters ([@soulbeing](https://api.github.com/users/soulbeing)) + +[Commits](https://github.com/kpdecker/jsdiff/compare/v3.0.1...v3.1.0) + +## v3.0.1 - October 9th, 2016 +- [#139](https://github.com/kpdecker/jsdiff/pull/139) - Make README.md look nicer in npmjs.com ([@takenspc](https://api.github.com/users/takenspc)) +- [#135](https://github.com/kpdecker/jsdiff/issues/135) - parsePatch combines patches from multiple files into a single IUniDiff when there is no "Index" line ([@ramya-rao-a](https://api.github.com/users/ramya-rao-a)) +- [#124](https://github.com/kpdecker/jsdiff/issues/124) - IE7/IE8 failure since 2.0.0 ([@boneskull](https://api.github.com/users/boneskull)) + +[Commits](https://github.com/kpdecker/jsdiff/compare/v3.0.0...v3.0.1) + +## v3.0.0 - August 23rd, 2016 +- [#130](https://github.com/kpdecker/jsdiff/pull/130) - Add callback argument to applyPatches `patched` option ([@piranna](https://api.github.com/users/piranna)) +- [#120](https://github.com/kpdecker/jsdiff/pull/120) - Correctly handle file names containing spaces ([@adius](https://api.github.com/users/adius)) +- [#119](https://github.com/kpdecker/jsdiff/pull/119) - Do single reflow ([@wifiextender](https://api.github.com/users/wifiextender)) +- [#117](https://github.com/kpdecker/jsdiff/pull/117) - Make more usable with long strings. ([@abnbgist](https://api.github.com/users/abnbgist)) + +Compatibility notes: +- applyPatches patch callback now is async and requires the callback be called to continue operation + +[Commits](https://github.com/kpdecker/jsdiff/compare/v2.2.3...v3.0.0) + +## v2.2.3 - May 31st, 2016 +- [#118](https://github.com/kpdecker/jsdiff/pull/118) - Add a fix for applying 0-length destination patches ([@chaaz](https://api.github.com/users/chaaz)) +- [#115](https://github.com/kpdecker/jsdiff/pull/115) - Fixed grammar in README ([@krizalys](https://api.github.com/users/krizalys)) +- [#113](https://github.com/kpdecker/jsdiff/pull/113) - fix typo ([@vmazare](https://api.github.com/users/vmazare)) + +[Commits](https://github.com/kpdecker/jsdiff/compare/v2.2.2...v2.2.3) + +## v2.2.2 - March 13th, 2016 +- [#102](https://github.com/kpdecker/jsdiff/issues/102) - diffJson with dates, returns empty curly braces ([@dr-dimitru](https://api.github.com/users/dr-dimitru)) +- [#97](https://github.com/kpdecker/jsdiff/issues/97) - Whitespaces & diffWords ([@faiwer](https://api.github.com/users/faiwer)) +- [#92](https://github.com/kpdecker/jsdiff/pull/92) - Fixes typo in the readme ([@bg451](https://api.github.com/users/bg451)) + +[Commits](https://github.com/kpdecker/jsdiff/compare/v2.2.1...v2.2.2) + +## v2.2.1 - November 12th, 2015 +- [#89](https://github.com/kpdecker/jsdiff/pull/89) - add in display selector to readme ([@FranDias](https://api.github.com/users/FranDias)) +- [#88](https://github.com/kpdecker/jsdiff/pull/88) - Split diffs based on file headers instead of 'Index:' metadata ([@piranna](https://api.github.com/users/piranna)) + +[Commits](https://github.com/kpdecker/jsdiff/compare/v2.2.0...v2.2.1) + +## v2.2.0 - October 29th, 2015 +- [#80](https://github.com/kpdecker/jsdiff/pull/80) - Fix a typo: applyPath -> applyPatch ([@fluxxu](https://api.github.com/users/fluxxu)) +- [#83](https://github.com/kpdecker/jsdiff/pull/83) - Add basic fuzzy matching to applyPatch ([@piranna](https://github.com/piranna)) +[Commits](https://github.com/kpdecker/jsdiff/compare/v2.2.0...v2.2.0) + +## v2.2.0 - October 29th, 2015 +- [#80](https://github.com/kpdecker/jsdiff/pull/80) - Fix a typo: applyPath -> applyPatch ([@fluxxu](https://api.github.com/users/fluxxu)) +- [#83](https://github.com/kpdecker/jsdiff/pull/83) - Add basic fuzzy matching to applyPatch ([@piranna](https://github.com/piranna)) +[Commits](https://github.com/kpdecker/jsdiff/compare/v2.1.3...v2.2.0) + +## v2.1.3 - September 30th, 2015 +- [#78](https://github.com/kpdecker/jsdiff/pull/78) - fix: error throwing when apply patch to empty string ([@21paradox](https://api.github.com/users/21paradox)) + +[Commits](https://github.com/kpdecker/jsdiff/compare/v2.1.2...v2.1.3) + +## v2.1.2 - September 23rd, 2015 +- [#76](https://github.com/kpdecker/jsdiff/issues/76) - diff headers give error ([@piranna](https://api.github.com/users/piranna)) + +[Commits](https://github.com/kpdecker/jsdiff/compare/v2.1.1...v2.1.2) + +## v2.1.1 - September 9th, 2015 +- [#73](https://github.com/kpdecker/jsdiff/issues/73) - Is applyPatches() exposed in the API? ([@davidparsson](https://api.github.com/users/davidparsson)) + +[Commits](https://github.com/kpdecker/jsdiff/compare/v2.1.0...v2.1.1) + +## v2.1.0 - August 27th, 2015 +- [#72](https://github.com/kpdecker/jsdiff/issues/72) - Consider using options object API for flag permutations ([@kpdecker](https://api.github.com/users/kpdecker)) +- [#70](https://github.com/kpdecker/jsdiff/issues/70) - diffWords treats \n at the end as significant whitespace ([@nesQuick](https://api.github.com/users/nesQuick)) +- [#69](https://github.com/kpdecker/jsdiff/issues/69) - Missing count ([@wfalkwallace](https://api.github.com/users/wfalkwallace)) +- [#68](https://github.com/kpdecker/jsdiff/issues/68) - diffLines seems broken ([@wfalkwallace](https://api.github.com/users/wfalkwallace)) +- [#60](https://github.com/kpdecker/jsdiff/issues/60) - Support multiple diff hunks ([@piranna](https://api.github.com/users/piranna)) +- [#54](https://github.com/kpdecker/jsdiff/issues/54) - Feature Request: 3-way merge ([@mog422](https://api.github.com/users/mog422)) +- [#42](https://github.com/kpdecker/jsdiff/issues/42) - Fuzz factor for applyPatch ([@stuartpb](https://api.github.com/users/stuartpb)) +- Move whitespace ignore out of equals method - 542063c +- Include source maps in babel output - 7f7ab21 +- Merge diff/line and diff/patch implementations - 1597705 +- Drop map utility method - 1ddc939 +- Documentation for parsePatch and applyPatches - 27c4b77 + +Compatibility notes: +- The undocumented ignoreWhitespace flag has been removed from the Diff equality check directly. This implementation may be copied to diff utilities if dependencies existed on this functionality. + +[Commits](https://github.com/kpdecker/jsdiff/compare/v2.0.2...v2.1.0) + +## v2.0.2 - August 8th, 2015 +- [#67](https://github.com/kpdecker/jsdiff/issues/67) - cannot require from npm module in node ([@commenthol](https://api.github.com/users/commenthol)) +- Convert to chai since we don’t support IE8 - a96bbad + +[Commits](https://github.com/kpdecker/jsdiff/compare/v2.0.1...v2.0.2) + +## v2.0.1 - August 7th, 2015 +- Add release build at proper step - 57542fd + +[Commits](https://github.com/kpdecker/jsdiff/compare/v2.0.0...v2.0.1) + +## v2.0.0 - August 7th, 2015 +- [#66](https://github.com/kpdecker/jsdiff/issues/66) - Add karma and sauce tests ([@kpdecker](https://api.github.com/users/kpdecker)) +- [#65](https://github.com/kpdecker/jsdiff/issues/65) - Create component repository for bower ([@kpdecker](https://api.github.com/users/kpdecker)) +- [#64](https://github.com/kpdecker/jsdiff/issues/64) - Automatically call removeEmpty for all tokenizer calls ([@kpdecker](https://api.github.com/users/kpdecker)) +- [#62](https://github.com/kpdecker/jsdiff/pull/62) - Allow access to structured object representation of patch data ([@bittrance](https://api.github.com/users/bittrance)) +- [#61](https://github.com/kpdecker/jsdiff/pull/61) - Use svg instead of png to get better image quality ([@PeterDaveHello](https://api.github.com/users/PeterDaveHello)) +- [#29](https://github.com/kpdecker/jsdiff/issues/29) - word tokenizer works only for 7 bit ascii ([@plasmagunman](https://api.github.com/users/plasmagunman)) + +Compatibility notes: +- `this.removeEmpty` is now called automatically for all instances. If this is not desired, this may be overridden on a per instance basis. +- The library has been refactored to use some ES6 features. The external APIs should remain the same, but bower projects that directly referenced the repository will now have to point to the [components/jsdiff](https://github.com/components/jsdiff) repository. + +[Commits](https://github.com/kpdecker/jsdiff/compare/v1.4.0...v2.0.0) + +## v1.4.0 - May 6th, 2015 +- [#57](https://github.com/kpdecker/jsdiff/issues/57) - createPatch -> applyPatch failed. ([@mog422](https://api.github.com/users/mog422)) +- [#56](https://github.com/kpdecker/jsdiff/pull/56) - Two files patch ([@rgeissert](https://api.github.com/users/rgeissert)) +- [#14](https://github.com/kpdecker/jsdiff/issues/14) - Flip added and removed order? ([@jakesandlund](https://api.github.com/users/jakesandlund)) + +[Commits](https://github.com/kpdecker/jsdiff/compare/v1.3.2...v1.4.0) + +## v1.3.2 - March 30th, 2015 +- [#53](https://github.com/kpdecker/jsdiff/pull/53) - Updated README.MD with Bower installation instructions ([@ofbriggs](https://api.github.com/users/ofbriggs)) +- [#49](https://github.com/kpdecker/jsdiff/issues/49) - Cannot read property 'oldlines' of undefined ([@nwtn](https://api.github.com/users/nwtn)) +- [#44](https://github.com/kpdecker/jsdiff/issues/44) - invalid-meta jsdiff is missing "main" entry in bower.json + +[Commits](https://github.com/kpdecker/jsdiff/compare/v1.3.1...v1.3.2) + +## v1.3.1 - March 13th, 2015 +- [#52](https://github.com/kpdecker/jsdiff/pull/52) - Fix for #51 Wrong result of JsDiff.diffLines ([@felicienfrancois](https://api.github.com/users/felicienfrancois)) + +[Commits](https://github.com/kpdecker/jsdiff/compare/v1.3.0...v1.3.1) + +## v1.3.0 - March 2nd, 2015 +- [#47](https://github.com/kpdecker/jsdiff/pull/47) - Adding Diff Trimmed Lines ([@JamesGould123](https://api.github.com/users/JamesGould123)) + +[Commits](https://github.com/kpdecker/jsdiff/compare/v1.2.2...v1.3.0) + +## v1.2.2 - January 26th, 2015 +- [#45](https://github.com/kpdecker/jsdiff/pull/45) - Fix AMD module loading ([@pedrocarrico](https://api.github.com/users/pedrocarrico)) +- [#43](https://github.com/kpdecker/jsdiff/pull/43) - added a bower file ([@nbrustein](https://api.github.com/users/nbrustein)) + +[Commits](https://github.com/kpdecker/jsdiff/compare/v1.2.1...v1.2.2) + +## v1.2.1 - December 26th, 2014 +- [#41](https://github.com/kpdecker/jsdiff/pull/41) - change condition of using node export system. ([@ironhee](https://api.github.com/users/ironhee)) + +[Commits](https://github.com/kpdecker/jsdiff/compare/v1.2.0...v1.2.1) + +## v1.2.0 - November 29th, 2014 +- [#37](https://github.com/kpdecker/jsdiff/pull/37) - Add support for sentences. ([@vmariano](https://api.github.com/users/vmariano)) +- [#28](https://github.com/kpdecker/jsdiff/pull/28) - Implemented diffJson ([@papandreou](https://api.github.com/users/papandreou)) +- [#27](https://github.com/kpdecker/jsdiff/issues/27) - Slow to execute over diffs with a large number of changes ([@termi](https://api.github.com/users/termi)) +- Allow for optional async diffing - 19385b9 +- Fix diffChars implementation - eaa44ed + +[Commits](https://github.com/kpdecker/jsdiff/compare/v1.1.0...v1.2.0) + +## v1.1.0 - November 25th, 2014 +- [#33](https://github.com/kpdecker/jsdiff/pull/33) - AMD and global exports ([@ovcharik](https://api.github.com/users/ovcharik)) +- [#32](https://github.com/kpdecker/jsdiff/pull/32) - Add support for component ([@vmariano](https://api.github.com/users/vmariano)) +- [#31](https://github.com/kpdecker/jsdiff/pull/31) - Don't rely on Array.prototype.map ([@papandreou](https://api.github.com/users/papandreou)) + +[Commits](https://github.com/kpdecker/jsdiff/compare/v1.0.8...v1.1.0) + +## v1.0.8 - December 22nd, 2013 +- [#24](https://github.com/kpdecker/jsdiff/pull/24) - Handle windows newlines on non windows machines. ([@benogle](https://api.github.com/users/benogle)) +- [#23](https://github.com/kpdecker/jsdiff/pull/23) - Prettied up the API formatting a little, and added basic node and web examples ([@airportyh](https://api.github.com/users/airportyh)) + +[Commits](https://github.com/kpdecker/jsdiff/compare/v1.0.7...v1.0.8) + +## v1.0.7 - September 11th, 2013 + +- [#22](https://github.com/kpdecker/jsdiff/pull/22) - Added variant of WordDiff that doesn't ignore whitespace differences ([@papandreou](https://api.github.com/users/papandreou) + +- Add 0.10 to travis tests - 243a526 + +[Commits](https://github.com/kpdecker/jsdiff/compare/v1.0.6...v1.0.7) + +## v1.0.6 - August 30th, 2013 + +- [#19](https://github.com/kpdecker/jsdiff/pull/19) - Explicitly define contents of npm package ([@sindresorhus](https://api.github.com/users/sindresorhus) + +[Commits](https://github.com/kpdecker/jsdiff/compare/v1.0.5...v1.0.6) diff --git a/node_modules/diff/runtime.js b/node_modules/diff/runtime.js new file mode 100644 index 0000000..82ea7e6 --- /dev/null +++ b/node_modules/diff/runtime.js @@ -0,0 +1,3 @@ +require('@babel/register')({ + ignore: ['lib', 'node_modules'] +}); diff --git a/node_modules/make-error/LICENSE b/node_modules/make-error/LICENSE new file mode 100644 index 0000000..9dcf797 --- /dev/null +++ b/node_modules/make-error/LICENSE @@ -0,0 +1,5 @@ +Copyright 2014 Julien Fontanet + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/make-error/README.md b/node_modules/make-error/README.md new file mode 100644 index 0000000..5c089a2 --- /dev/null +++ b/node_modules/make-error/README.md @@ -0,0 +1,112 @@ +# make-error + +[![Package Version](https://badgen.net/npm/v/make-error)](https://npmjs.org/package/make-error) [![Build Status](https://travis-ci.org/JsCommunity/make-error.png?branch=master)](https://travis-ci.org/JsCommunity/make-error) [![PackagePhobia](https://badgen.net/packagephobia/install/make-error)](https://packagephobia.now.sh/result?p=make-error) [![Latest Commit](https://badgen.net/github/last-commit/JsCommunity/make-error)](https://github.com/JsCommunity/make-error/commits/master) + +> Make your own error types! + +## Features + +- Compatible Node & browsers +- `instanceof` support +- `error.name` & `error.stack` support +- compatible with [CSP](https://en.wikipedia.org/wiki/Content_Security_Policy) (i.e. no `eval()`) + +## Installation + +### Node & [Browserify](http://browserify.org/)/[Webpack](https://webpack.js.org/) + +Installation of the [npm package](https://npmjs.org/package/make-error): + +``` +> npm install --save make-error +``` + +Then require the package: + +```javascript +var makeError = require("make-error"); +``` + +### Browser + +You can directly use the build provided at [unpkg.com](https://unpkg.com): + +```html + +``` + +## Usage + +### Basic named error + +```javascript +var CustomError = makeError("CustomError"); + +// Parameters are forwarded to the super class (here Error). +throw new CustomError("a message"); +``` + +### Advanced error class + +```javascript +function CustomError(customValue) { + CustomError.super.call(this, "custom error message"); + + this.customValue = customValue; +} +makeError(CustomError); + +// Feel free to extend the prototype. +CustomError.prototype.myMethod = function CustomError$myMethod() { + console.log("CustomError.myMethod (%s, %s)", this.code, this.message); +}; + +//----- + +try { + throw new CustomError(42); +} catch (error) { + error.myMethod(); +} +``` + +### Specialized error + +```javascript +var SpecializedError = makeError("SpecializedError", CustomError); + +throw new SpecializedError(42); +``` + +### Inheritance + +> Best for ES2015+. + +```javascript +import { BaseError } from "make-error"; + +class CustomError extends BaseError { + constructor() { + super("custom error message"); + } +} +``` + +## Related + +- [make-error-cause](https://www.npmjs.com/package/make-error-cause): Make your own error types, with a cause! + +## Contributions + +Contributions are _very_ welcomed, either on the documentation or on +the code. + +You may: + +- report any [issue](https://github.com/JsCommunity/make-error/issues) + you've encountered; +- fork and create a pull request. + +## License + +ISC © [Julien Fontanet](http://julien.isonoe.net) diff --git a/node_modules/make-error/dist/make-error.js b/node_modules/make-error/dist/make-error.js new file mode 100644 index 0000000..32444c6 --- /dev/null +++ b/node_modules/make-error/dist/make-error.js @@ -0,0 +1 @@ +!function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).makeError=f()}}(function(){return function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){return o(e[i][1][r]||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i; + +/** + * Set the constructor prototype to `BaseError`. + */ +declare function makeError(super_: { + new (...args: any[]): T; +}): makeError.Constructor; + +/** + * Create a specialized error instance. + */ +declare function makeError( + name: string | Function, + super_: K +): K & makeError.SpecializedConstructor; + +declare namespace makeError { + /** + * Use with ES2015+ inheritance. + */ + export class BaseError extends Error { + message: string; + name: string; + stack: string; + + constructor(message?: string); + } + + export interface Constructor { + new (message?: string): T; + super_: any; + prototype: T; + } + + export interface SpecializedConstructor { + super_: any; + prototype: T; + } +} + +export = makeError; diff --git a/node_modules/make-error/index.js b/node_modules/make-error/index.js new file mode 100644 index 0000000..fab6040 --- /dev/null +++ b/node_modules/make-error/index.js @@ -0,0 +1,151 @@ +// ISC @ Julien Fontanet + +"use strict"; + +// =================================================================== + +var construct = typeof Reflect !== "undefined" ? Reflect.construct : undefined; +var defineProperty = Object.defineProperty; + +// ------------------------------------------------------------------- + +var captureStackTrace = Error.captureStackTrace; +if (captureStackTrace === undefined) { + captureStackTrace = function captureStackTrace(error) { + var container = new Error(); + + defineProperty(error, "stack", { + configurable: true, + get: function getStack() { + var stack = container.stack; + + // Replace property with value for faster future accesses. + defineProperty(this, "stack", { + configurable: true, + value: stack, + writable: true, + }); + + return stack; + }, + set: function setStack(stack) { + defineProperty(error, "stack", { + configurable: true, + value: stack, + writable: true, + }); + }, + }); + }; +} + +// ------------------------------------------------------------------- + +function BaseError(message) { + if (message !== undefined) { + defineProperty(this, "message", { + configurable: true, + value: message, + writable: true, + }); + } + + var cname = this.constructor.name; + if (cname !== undefined && cname !== this.name) { + defineProperty(this, "name", { + configurable: true, + value: cname, + writable: true, + }); + } + + captureStackTrace(this, this.constructor); +} + +BaseError.prototype = Object.create(Error.prototype, { + // See: https://github.com/JsCommunity/make-error/issues/4 + constructor: { + configurable: true, + value: BaseError, + writable: true, + }, +}); + +// ------------------------------------------------------------------- + +// Sets the name of a function if possible (depends of the JS engine). +var setFunctionName = (function() { + function setFunctionName(fn, name) { + return defineProperty(fn, "name", { + configurable: true, + value: name, + }); + } + try { + var f = function() {}; + setFunctionName(f, "foo"); + if (f.name === "foo") { + return setFunctionName; + } + } catch (_) {} +})(); + +// ------------------------------------------------------------------- + +function makeError(constructor, super_) { + if (super_ == null || super_ === Error) { + super_ = BaseError; + } else if (typeof super_ !== "function") { + throw new TypeError("super_ should be a function"); + } + + var name; + if (typeof constructor === "string") { + name = constructor; + constructor = + construct !== undefined + ? function() { + return construct(super_, arguments, this.constructor); + } + : function() { + super_.apply(this, arguments); + }; + + // If the name can be set, do it once and for all. + if (setFunctionName !== undefined) { + setFunctionName(constructor, name); + name = undefined; + } + } else if (typeof constructor !== "function") { + throw new TypeError("constructor should be either a string or a function"); + } + + // Also register the super constructor also as `constructor.super_` just + // like Node's `util.inherits()`. + // + // eslint-disable-next-line dot-notation + constructor.super_ = constructor["super"] = super_; + + var properties = { + constructor: { + configurable: true, + value: constructor, + writable: true, + }, + }; + + // If the name could not be set on the constructor, set it on the + // prototype. + if (name !== undefined) { + properties.name = { + configurable: true, + value: name, + writable: true, + }; + } + constructor.prototype = Object.create(super_.prototype, properties); + + return constructor; +} +exports = module.exports = makeError; +exports.BaseError = BaseError; diff --git a/node_modules/make-error/package.json b/node_modules/make-error/package.json new file mode 100644 index 0000000..2af27e1 --- /dev/null +++ b/node_modules/make-error/package.json @@ -0,0 +1,62 @@ +{ + "name": "make-error", + "version": "1.3.6", + "main": "index.js", + "license": "ISC", + "description": "Make your own error types!", + "keywords": [ + "create", + "custom", + "derive", + "error", + "errors", + "extend", + "extending", + "extension", + "factory", + "inherit", + "make", + "subclass" + ], + "homepage": "https://github.com/JsCommunity/make-error", + "bugs": "https://github.com/JsCommunity/make-error/issues", + "author": "Julien Fontanet ", + "repository": { + "type": "git", + "url": "git://github.com/JsCommunity/make-error.git" + }, + "devDependencies": { + "browserify": "^16.2.3", + "eslint": "^6.5.1", + "eslint-config-prettier": "^6.4.0", + "eslint-config-standard": "^14.1.0", + "eslint-plugin-import": "^2.14.0", + "eslint-plugin-node": "^10.0.0", + "eslint-plugin-promise": "^4.0.1", + "eslint-plugin-standard": "^4.0.0", + "husky": "^3.0.9", + "jest": "^24", + "prettier": "^1.14.3", + "uglify-js": "^3.3.2" + }, + "jest": { + "testEnvironment": "node" + }, + "scripts": { + "dev-test": "jest --watch", + "format": "prettier --write '**'", + "prepublishOnly": "mkdir -p dist && browserify -s makeError index.js | uglifyjs -c > dist/make-error.js", + "pretest": "eslint --ignore-path .gitignore .", + "test": "jest" + }, + "files": [ + "dist/", + "index.js", + "index.d.ts" + ], + "husky": { + "hooks": { + "commit-msg": "npm run test" + } + } +} diff --git a/node_modules/ts-node/LICENSE b/node_modules/ts-node/LICENSE new file mode 100644 index 0000000..983fbe8 --- /dev/null +++ b/node_modules/ts-node/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/ts-node/README.md b/node_modules/ts-node/README.md new file mode 100644 index 0000000..63625d5 --- /dev/null +++ b/node_modules/ts-node/README.md @@ -0,0 +1,1442 @@ + + +# [![TypeScript Node](logo.svg?sanitize=true)](https://typestrong.org/ts-node) + +[![NPM version](https://img.shields.io/npm/v/ts-node.svg?style=flat)](https://npmjs.org/package/ts-node) +[![NPM downloads](https://img.shields.io/npm/dm/ts-node.svg?style=flat)](https://npmjs.org/package/ts-node) +[![Build status](https://img.shields.io/github/workflow/status/TypeStrong/ts-node/Continuous%20Integration)](https://github.com/TypeStrong/ts-node/actions?query=workflow%3A%22Continuous+Integration%22) +[![Test coverage](https://codecov.io/gh/TypeStrong/ts-node/branch/main/graph/badge.svg)](https://codecov.io/gh/TypeStrong/ts-node) + +> TypeScript execution and REPL for node.js, with source map and native ESM support. + +The latest documentation can also be found on our website: + +# Table of Contents + +* [Overview](#overview) + * [Features](#features) +* [Installation](#installation) +* [Usage](#usage) + * [Command Line](#command-line) + * [Shebang](#shebang) + * [node flags and other tools](#node-flags-and-other-tools) + * [Programmatic](#programmatic) +* [Configuration](#configuration) + * [CLI flags](#cli-flags) + * [Via tsconfig.json (recommended)](#via-tsconfigjson-recommended) + * [@tsconfig/bases](#tsconfigbases) + * [Default config](#default-config) + * [`node` flags](#node-flags) +* [Options](#options) + * [CLI Options](#cli-options) + * [help](#help) + * [version](#version) + * [eval](#eval) + * [print](#print) + * [interactive](#interactive) + * [esm](#esm) + * [TSConfig Options](#tsconfig-options) + * [project](#project) + * [skipProject](#skipproject) + * [cwdMode](#cwdmode) + * [compilerOptions](#compileroptions) + * [showConfig](#showconfig) + * [Typechecking](#typechecking) + * [transpileOnly](#transpileonly) + * [typeCheck](#typecheck) + * [compilerHost](#compilerhost) + * [files](#files) + * [ignoreDiagnostics](#ignorediagnostics) + * [Transpilation Options](#transpilation-options) + * [ignore](#ignore) + * [skipIgnore](#skipignore) + * [compiler](#compiler) + * [swc](#swc) + * [transpiler](#transpiler) + * [preferTsExts](#prefertsexts) + * [Diagnostic Options](#diagnostic-options) + * [logError](#logerror) + * [pretty](#pretty) + * [TS_NODE_DEBUG](#ts_node_debug) + * [Advanced Options](#advanced-options) + * [require](#require) + * [cwd](#cwd) + * [emit](#emit) + * [scope](#scope) + * [scopeDir](#scopedir) + * [moduleTypes](#moduletypes) + * [TS_NODE_HISTORY](#ts_node_history) + * [noExperimentalReplAwait](#noexperimentalreplawait) + * [experimentalResolver](#experimentalresolver) + * [experimentalSpecifierResolution](#experimentalspecifierresolution) + * [API Options](#api-options) +* [SWC](#swc-1) +* [CommonJS vs native ECMAScript modules](#commonjs-vs-native-ecmascript-modules) + * [CommonJS](#commonjs) + * [Native ECMAScript modules](#native-ecmascript-modules) +* [Troubleshooting](#troubleshooting) + * [Configuration](#configuration-1) + * [Common errors](#common-errors) + * [`TSError`](#tserror) + * [`SyntaxError`](#syntaxerror) + * [Unsupported JavaScript syntax](#unsupported-javascript-syntax) + * [`ERR_REQUIRE_ESM`](#err_require_esm) + * [`ERR_UNKNOWN_FILE_EXTENSION`](#err_unknown_file_extension) + * [Missing Types](#missing-types) + * [npx, yarn dlx, and node_modules](#npx-yarn-dlx-and-node_modules) +* [Performance](#performance) + * [Skip typechecking](#skip-typechecking) + * [With typechecking](#with-typechecking) +* [Advanced](#advanced) + * [How it works](#how-it-works) + * [Ignored files](#ignored-files) + * [File extensions](#file-extensions) + * [Skipping `node_modules`](#skipping-node_modules) + * [Skipping pre-compiled TypeScript](#skipping-pre-compiled-typescript) + * [Scope by directory](#scope-by-directory) + * [Ignore by regexp](#ignore-by-regexp) + * [paths and baseUrl + ](#paths-and-baseurl) + * [Why is this not built-in to ts-node?](#why-is-this-not-built-in-to-ts-node) + * [Third-party compilers](#third-party-compilers) + * [Transpilers](#transpilers) + * [Third-party plugins](#third-party-plugins) + * [Write your own plugin](#write-your-own-plugin) + * [Module type overrides](#module-type-overrides) + * [Caveats](#caveats) + * [API](#api) +* [Recipes](#recipes) + * [Watching and restarting](#watching-and-restarting) + * [AVA](#ava) + * [CommonJS](#commonjs-1) + * [Native ECMAScript modules](#native-ecmascript-modules-1) + * [Gulp](#gulp) + * [IntelliJ and Webstorm](#intellij-and-webstorm) + * [Mocha](#mocha) + * [Mocha 7 and newer](#mocha-7-and-newer) + * [Mocha <=6](#mocha-6) + * [Tape](#tape) + * [Visual Studio Code](#visual-studio-code) + * [Other](#other) +* [License](#license) + +# Overview + +ts-node is a TypeScript execution engine and REPL for Node.js. + +It JIT transforms TypeScript into JavaScript, enabling you to directly execute TypeScript on Node.js without precompiling. +This is accomplished by hooking node's module loading APIs, enabling it to be used seamlessly alongside other Node.js +tools and libraries. + +## Features + +* Automatic sourcemaps in stack traces +* Automatic `tsconfig.json` parsing +* Automatic defaults to match your node version +* Typechecking (optional) +* REPL +* Write standalone scripts +* Native ESM loader +* Use third-party transpilers +* Use custom transformers +* Integrate with test runners, debuggers, and CLI tools +* Compatible with pre-compilation for production + +![TypeScript REPL](website/static/img/screenshot.png) + +# Installation + +```shell +# Locally in your project. +npm install -D typescript +npm install -D ts-node + +# Or globally with TypeScript. +npm install -g typescript +npm install -g ts-node + +# Depending on configuration, you may also need these +npm install -D tslib @types/node +``` + +**Tip:** Installing modules locally allows you to control and share the versions through `package.json`. ts-node will always resolve the compiler from `cwd` before checking relative to its own installation. + +# Usage + +## Command Line + +```shell +# Execute a script as `node` + `tsc`. +ts-node script.ts + +# Starts a TypeScript REPL. +ts-node + +# Execute code with TypeScript. +ts-node -e 'console.log("Hello, world!")' + +# Execute, and print, code with TypeScript. +ts-node -p -e '"Hello, world!"' + +# Pipe scripts to execute with TypeScript. +echo 'console.log("Hello, world!")' | ts-node + +# Equivalent to ts-node --transpileOnly +ts-node-transpile-only script.ts + +# Equivalent to ts-node --cwdMode +ts-node-cwd script.ts + +# Equivalent to ts-node --esm +ts-node-esm script.ts +``` + +## Shebang + +To write scripts with maximum portability, [specify options in your `tsconfig.json`](#via-tsconfigjson-recommended) and omit them from the shebang. + +```typescript twoslash +#!/usr/bin/env ts-node + +// ts-node options are read from tsconfig.json + +console.log("Hello, world!") +``` + +Including options within the shebang requires the [`env -S` flag](https://manpages.debian.org/bullseye/coreutils/env.1.en.html#S), which is available on recent versions of `env`. ([compatibility](https://github.com/TypeStrong/ts-node/pull/1448#issuecomment-913895766)) + +```typescript twoslash +#!/usr/bin/env -S ts-node --files +// This shebang works on Mac and Linux with newer versions of env +// Technically, Mac allows omitting `-S`, but Linux requires it +``` + +To test your version of `env` for compatibility with `-S`: + +```shell +# Note that these unusual quotes are necessary +/usr/bin/env --debug '-S echo foo bar' +``` + +## node flags and other tools + +You can register ts-node without using our CLI: `node -r ts-node/register` and `node --loader ts-node/esm` + +In many cases, setting [`NODE_OPTIONS`](https://nodejs.org/api/cli.html#cli_node_options_options) will enable `ts-node` within other node tools, child processes, and worker threads. This can be combined with other node flags. + +```shell +NODE_OPTIONS="-r ts-node/register --no-warnings" node ./index.ts +``` + +Or, if you require native ESM support: + +```shell +NODE_OPTIONS="--loader ts-node/esm" +``` + +This tells any node processes which receive this environment variable to install `ts-node`'s hooks before executing other code. + +If you are invoking node directly, you can avoid the environment variable and pass those flags to node. + +```shell +node --loader ts-node/esm --inspect ./index.ts +``` + +## Programmatic + +You can require ts-node and register the loader for future requires by using `require('ts-node').register({ /* options */ })`. + +Check out our [API](#api) for more features. + +# Configuration + +ts-node supports a variety of options which can be specified via `tsconfig.json`, as CLI flags, as environment variables, or programmatically. + +For a complete list, see [Options](#options). + +## CLI flags + +ts-node CLI flags must come *before* the entrypoint script. For example: + +```shell +$ ts-node --project tsconfig-dev.json say-hello.ts Ronald +Hello, Ronald! +``` + +## Via tsconfig.json (recommended) + +ts-node automatically finds and loads `tsconfig.json`. Most ts-node options can be specified in a `"ts-node"` object using their programmatic, camelCase names. We recommend this because it works even when you cannot pass CLI flags, such as `node --require ts-node/register` and when using shebangs. + +Use `--skipProject` to skip loading the `tsconfig.json`. Use `--project` to explicitly specify the path to a `tsconfig.json`. + +When searching, it is resolved using [the same search behavior as `tsc`](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html). By default, this search is performed relative to the entrypoint script. In `--cwdMode` or if no entrypoint is specified -- for example when using the REPL -- the search is performed relative to `--cwd` / `process.cwd()`. + +You can use this sample configuration as a starting point: + +```jsonc title="tsconfig.json" +{ + // This is an alias to @tsconfig/node16: https://github.com/tsconfig/bases + "extends": "ts-node/node16/tsconfig.json", + + // Most ts-node options can be specified here using their programmatic names. + "ts-node": { + // It is faster to skip typechecking. + // Remove if you want ts-node to do typechecking. + "transpileOnly": true, + + "files": true, + + "compilerOptions": { + // compilerOptions specified here will override those declared below, + // but *only* in ts-node. Useful if you want ts-node and tsc to use + // different options with a single tsconfig.json. + } + }, + "compilerOptions": { + // typescript options here + } +} +``` + +Our bundled [JSON schema](https://unpkg.com/browse/ts-node@latest/tsconfig.schema.json) lists all compatible options. + +### @tsconfig/bases + +[@tsconfig/bases](https://github.com/tsconfig/bases) maintains recommended configurations for several node versions. +As a convenience, these are bundled with ts-node. + +```jsonc title="tsconfig.json" +{ + "extends": "ts-node/node16/tsconfig.json", + + // Or install directly with `npm i -D @tsconfig/node16` + "extends": "@tsconfig/node16/tsconfig.json", +} +``` + +### Default config + +If no `tsconfig.json` is loaded from disk, ts-node will use the newest recommended defaults from +[@tsconfig/bases](https://github.com/tsconfig/bases/) compatible with your `node` and `typescript` versions. +With the latest `node` and `typescript`, this is [`@tsconfig/node16`](https://github.com/tsconfig/bases/blob/master/bases/node16.json). + +Older versions of `typescript` are incompatible with `@tsconfig/node16`. In those cases we will use an older default configuration. + +When in doubt, `ts-node --showConfig` will log the configuration being used, and `ts-node -vv` will log `node` and `typescript` versions. + +## `node` flags + +[`node` flags](https://nodejs.org/api/cli.html) must be passed directly to `node`; they cannot be passed to the ts-node binary nor can they be specified in `tsconfig.json` + +We recommend using the [`NODE_OPTIONS`](https://nodejs.org/api/cli.html#cli_node_options_options) environment variable to pass options to `node`. + +```shell +NODE_OPTIONS='--trace-deprecation --abort-on-uncaught-exception' ts-node ./index.ts +``` + +Alternatively, you can invoke `node` directly and install ts-node via `--require`/`-r` + +```shell +node --trace-deprecation --abort-on-uncaught-exception -r ts-node/register ./index.ts +``` + +# Options + +All command-line flags support both `--camelCase` and `--hyphen-case`. + +Most options can be declared in your tsconfig.json: [Configuration via tsconfig.json](#via-tsconfigjson-recommended) + +`ts-node` supports `--print` (`-p`), `--eval` (`-e`), `--require` (`-r`) and `--interactive` (`-i`) similar to the [node.js CLI](https://nodejs.org/api/cli.html). + +`ts-node` supports `--project` and `--showConfig` similar to the [tsc CLI](https://www.typescriptlang.org/docs/handbook/compiler-options.html#compiler-options). + +*Environment variables, where available, are in `ALL_CAPS`* + +## CLI Options + +### help + +```shell +ts-node --help +``` + +Prints the help text + +### version + +```shell +ts-node -v +ts-node -vvv +``` + +Prints the version. `-vv` includes node and typescript compiler versions. `-vvv` includes absolute paths to ts-node and +typescript installations. + +### eval + +```shell +ts-node -e +# Example +ts-node -e 'console.log("Hello world!")' +``` + +Evaluate code + +### print + +```shell +ts-node -p -e +# Example +ts-node -p -e '"Hello world!"' +``` + +Print result of `--eval` + +### interactive + +```shell +ts-node -i +``` + +Opens the REPL even if stdin does not appear to be a terminal + +### esm + +```shell +ts-node --esm +ts-node-esm +``` + +Bootstrap with the ESM loader, enabling full ESM support + +## TSConfig Options + +### project + +```shell +ts-node -P +ts-node --project +``` + +Path to tsconfig file. + +*Note the uppercase `-P`. This is different from `tsc`'s `-p/--project` option.* + +*Environment:* `TS_NODE_PROJECT` + +### skipProject + +```shell +ts-node --skipProject +``` + +Skip project config resolution and loading + +*Default:* `false`
+*Environment:* `TS_NODE_SKIP_PROJECT` + +### cwdMode + +```shell +ts-node -c +ts-node --cwdMode +ts-node-cwd +``` + +Resolve config relative to the current directory instead of the directory of the entrypoint script + +### compilerOptions + +```shell +ts-node -O +ts-node --compilerOptions +``` + +JSON object to merge with compiler options + +*Environment:* `TS_NODE_COMPILER_OPTIONS` + +### showConfig + +```shell +ts-node --showConfig +``` + +Print resolved `tsconfig.json`, including `ts-node` options, and exit + +## Typechecking + +### transpileOnly + +```shell +ts-node -T +ts-node --transpileOnly +``` + +Use TypeScript's faster `transpileModule` + +*Default:* `false`
+*Environment:* `TS_NODE_TRANSPILE_ONLY` + +### typeCheck + +```shell +ts-node --typeCheck +``` + +Opposite of `--transpileOnly` + +*Default:* `true`
+*Environment:* `TS_NODE_TYPE_CHECK` + +### compilerHost + +```shell +ts-node -H +ts-node --compilerHost +``` + +Use TypeScript's compiler host API + +*Default:* `false`
+*Environment:* `TS_NODE_COMPILER_HOST` + +### files + +```shell +ts-node --files +``` + +Load `files`, `include` and `exclude` from `tsconfig.json` on startup. This may +avoid certain typechecking failures. See [Missing types](#missing-types) for details. + +*Default:* `false`
+*Environment:* `TS_NODE_FILES` + +### ignoreDiagnostics + +```shell +ts-node -D +ts-node --ignoreDiagnostics +``` + +Ignore TypeScript warnings by diagnostic code + +*Environment:* `TS_NODE_IGNORE_DIAGNOSTICS` + +## Transpilation Options + +### ignore + +```shell +ts-node -I +ts-node --ignore +``` + +Override the path patterns to skip compilation + +*Default:* `/node_modules/`
+*Environment:* `TS_NODE_IGNORE` + +### skipIgnore + +```shell +ts-node --skipIgnore +``` + +Skip ignore checks + +*Default:* `false`
+*Environment:* `TS_NODE_SKIP_IGNORE` + +### compiler + +```shell +ts-node -C +ts-node --compiler +``` + +Specify a custom TypeScript compiler + +*Default:* `typescript`
+*Environment:* `TS_NODE_COMPILER` + +### swc + +```shell +ts-node --swc +``` + +Transpile with [swc](#swc). Implies `--transpileOnly` + +*Default:* `false` + +### transpiler + +```shell +ts-node --transpiler +# Example +ts-node --transpiler ts-node/transpilers/swc +``` + +Use a third-party, non-typechecking transpiler + +### preferTsExts + +```shell +ts-node --preferTsExts +``` + +Re-order file extensions so that TypeScript imports are preferred + +*Default:* `false`
+*Environment:* `TS_NODE_PREFER_TS_EXTS` + +## Diagnostic Options + +### logError + +```shell +ts-node --logError +``` + +Logs TypeScript errors to stderr instead of throwing exceptions + +*Default:* `false`
+*Environment:* `TS_NODE_LOG_ERROR` + +### pretty + +```shell +ts-node --pretty +``` + +Use pretty diagnostic formatter + +*Default:* `false`
+*Environment:* `TS_NODE_PRETTY` + +### TS_NODE_DEBUG + +```shell +TS_NODE_DEBUG=true ts-node +``` + +Enable debug logging + +## Advanced Options + +### require + +```shell +ts-node -r +ts-node --require +``` + +Require a node module before execution + +### cwd + +```shell +ts-node --cwd +``` + +Behave as if invoked in this working directory + +*Default:* `process.cwd()`
+*Environment:* `TS_NODE_CWD` + +### emit + +```shell +ts-node --emit +``` + +Emit output files into `.ts-node` directory. Requires `--compilerHost` + +*Default:* `false`
+*Environment:* `TS_NODE_EMIT` + +### scope + +```shell +ts-node --scope +``` + +Scope compiler to files within `scopeDir`. Anything outside this directory is ignored. + +*Default:* `false`
+*Environment:* `TS_NODE_SCOPE` + +### scopeDir + +```shell +ts-node --scopeDir +``` + +Directory within which compiler is limited when `scope` is enabled. + +*Default:* First of: `tsconfig.json` "rootDir" if specified, directory containing `tsconfig.json`, or cwd if no `tsconfig.json` is loaded.
+*Environment:* `TS_NODE_SCOPE_DIR` + +### moduleTypes + +Override the module type of certain files, ignoring the `package.json` `"type"` field. See [Module type overrides](#module-type-overrides) for details. + +*Default:* obeys `package.json` `"type"` and `tsconfig.json` `"module"`
+*Can only be specified via `tsconfig.json` or API.* + +### TS_NODE_HISTORY + +```shell +TS_NODE_HISTORY= ts-node +``` + +Path to history file for REPL + +*Default:* `~/.ts_node_repl_history` + +### noExperimentalReplAwait + +```shell +ts-node --noExperimentalReplAwait +``` + +Disable top-level await in REPL. Equivalent to node's [`--no-experimental-repl-await`](https://nodejs.org/api/cli.html#cli_no_experimental_repl_await) + +*Default:* Enabled if TypeScript version is 3.8 or higher and target is ES2018 or higher.
+*Environment:* `TS_NODE_EXPERIMENTAL_REPL_AWAIT` set `false` to disable + +### experimentalResolver + +Enable experimental hooks that re-map imports and require calls to support: + +* remapping extensions, e.g. so that `import "./foo.js"` will execute `foo.ts`. Currently the following extensions will be mapped: + * `.js` to `.ts`, `.tsx`, or `.jsx` + * `.cjs` to `.cts` + * `.mjs` to `.mts` + * `.jsx` to `.tsx` +* including file extensions in CommonJS, for consistency with ESM where this is often mandatory + +In the future, this hook will also support: + +* `baseUrl`, `paths` +* `rootDirs` +* `outDir` to `rootDir` mappings for composite projects and monorepos + +For details, see [#1514](https://github.com/TypeStrong/ts-node/issues/1514). + +*Default:* `false`, but will likely be enabled by default in a future version
+*Can only be specified via `tsconfig.json` or API.* + +### experimentalSpecifierResolution + +```shell +ts-node --experimentalSpecifierResolution node +``` + +Like node's [`--experimental-specifier-resolution`](https://nodejs.org/dist/latest-v18.x/docs/api/esm.html#customizing-esm-specifier-resolution-algorithm), but can also be set in your `tsconfig.json` for convenience. +Requires [`esm`](#esm) to be enabled. + +*Default:* `explicit`
+ +## API Options + +The API includes [additional options](https://typestrong.org/ts-node/api/interfaces/RegisterOptions.html) not shown here. + +# SWC + +SWC support is built-in via the `--swc` flag or `"swc": true` tsconfig option. + +[SWC](https://swc.rs) is a TypeScript-compatible transpiler implemented in Rust. This makes it an order of magnitude faster than vanilla `transpileOnly`. + +To use it, first install `@swc/core` or `@swc/wasm`. If using `importHelpers`, also install `@swc/helpers`. If `target` is less than "es2015" and using `async`/`await` or generator functions, also install `regenerator-runtime`. + +```shell +npm i -D @swc/core @swc/helpers regenerator-runtime +``` + +Then add the following to your `tsconfig.json`. + +```jsonc title="tsconfig.json" +{ + "ts-node": { + "swc": true + } +} +``` + +> SWC uses `@swc/helpers` instead of `tslib`. If you have enabled `importHelpers`, you must also install `@swc/helpers`. + +# CommonJS vs native ECMAScript modules + +TypeScript is almost always written using modern `import` syntax, but it is also transformed before being executed by the underlying runtime. You can choose to either transform to CommonJS or to preserve the native `import` syntax, using node's native ESM support. Configuration is different for each. + +Here is a brief comparison of the two. + +| CommonJS | Native ECMAScript modules | +|---|---| +| Write native `import` syntax | Write native `import` syntax | +| Transforms `import` into `require()` | Does not transform `import` | +| Node executes scripts using the classic [CommonJS loader](https://nodejs.org/dist/latest-v16.x/docs/api/modules.html) | Node executes scripts using the new [ESM loader](https://nodejs.org/dist/latest-v16.x/docs/api/esm.html) | +| Use any of:
`ts-node`
`node -r ts-node/register`
`NODE_OPTIONS="ts-node/register" node`
`require('ts-node').register({/* options */})` | Use any of:
`ts-node --esm`
`ts-node-esm`
Set `"esm": true` in `tsconfig.json`
`node --loader ts-node/esm`
`NODE_OPTIONS="--loader ts-node/esm" node` | + +## CommonJS + +Transforming to CommonJS is typically simpler and more widely supported because it is older. You must remove [`"type": "module"`](https://nodejs.org/api/packages.html#packages_type) from `package.json` and set [`"module": "CommonJS"`](https://www.typescriptlang.org/tsconfig/#module) in `tsconfig.json`. + +```jsonc title="package.json" +{ + // This can be omitted; commonjs is the default + "type": "commonjs" +} +``` + +```jsonc title="tsconfig.json" +{ + "compilerOptions": { + "module": "CommonJS" + } +} +``` + +If you must keep `"module": "ESNext"` for `tsc`, webpack, or another build tool, you can set an override for ts-node. + +```jsonc title="tsconfig.json" +{ + "compilerOptions": { + "module": "ESNext" + }, + "ts-node": { + "compilerOptions": { + "module": "CommonJS" + } + } +} +``` + +## Native ECMAScript modules + +[Node's ESM loader hooks](https://nodejs.org/api/esm.html#esm_experimental_loaders) are [**experimental**](https://nodejs.org/api/documentation.html#documentation_stability_index) and subject to change. ts-node's ESM support is as stable as possible, but it relies on APIs which node can *and will* break in new versions of node. Thus it is not recommended for production. + +For complete usage, limitations, and to provide feedback, see [#1007](https://github.com/TypeStrong/ts-node/issues/1007). + +You must set [`"type": "module"`](https://nodejs.org/api/packages.html#packages_type) in `package.json` and [`"module": "ESNext"`](https://www.typescriptlang.org/tsconfig/#module) in `tsconfig.json`. + +```jsonc title="package.json" +{ + "type": "module" +} +``` + +```jsonc title="tsconfig.json" +{ + "compilerOptions": { + "module": "ESNext" // or ES2015, ES2020 + }, + "ts-node": { + // Tell ts-node CLI to install the --loader automatically, explained below + "esm": true + } +} +``` + +You must also ensure node is passed `--loader`. The ts-node CLI will do this automatically with our `esm` option. + +> Note: `--esm` must spawn a child process to pass it `--loader`. This may change if node adds the ability to install loader hooks +> into the current process. + +```shell +# pass the flag +ts-node --esm +# Use the convenience binary +ts-node-esm +# or add `"esm": true` to your tsconfig.json to make it automatic +ts-node +``` + +If you are not using our CLI, pass the loader flag to node. + +```shell +node --loader ts-node/esm ./index.ts +# Or via environment variable +NODE_OPTIONS="--loader ts-node/esm" node ./index.ts +``` + +# Troubleshooting + +## Configuration + +ts-node uses sensible default configurations to reduce boilerplate while still respecting `tsconfig.json` if you +have one. If you are unsure which configuration is used, you can log it with `ts-node --showConfig`. This is similar to +`tsc --showConfig` but includes `"ts-node"` options as well. + +ts-node also respects your locally-installed `typescript` version, but global installations fallback to the globally-installed +`typescript`. If you are unsure which versions are used, `ts-node -vv` will log them. + +```shell +$ ts-node -vv +ts-node v10.0.0 +node v16.1.0 +compiler v4.2.2 + +$ ts-node --showConfig +{ + "compilerOptions": { + "target": "es6", + "lib": [ + "es6", + "dom" + ], + "rootDir": "./src", + "outDir": "./.ts-node", + "module": "commonjs", + "moduleResolution": "node", + "strict": true, + "declaration": false, + "sourceMap": true, + "inlineSources": true, + "types": [ + "node" + ], + "stripInternal": true, + "incremental": true, + "skipLibCheck": true, + "importsNotUsedAsValues": "error", + "inlineSourceMap": false, + "noEmit": false + }, + "ts-node": { + "cwd": "/d/project", + "projectSearchDir": "/d/project", + "require": [], + "project": "/d/project/tsconfig.json" + } +} +``` + +## Common errors + +It is important to differentiate between errors from ts-node, errors from the TypeScript compiler, and errors from `node`. It is also important to understand when errors are caused by a type error in your code, a bug in your code, or a flaw in your configuration. + +### `TSError` + +Type errors from the compiler are thrown as a `TSError`. These are the same as errors you get from `tsc`. + +### `SyntaxError` + +Any error that is not a `TSError` is from node.js (e.g. `SyntaxError`), and cannot be fixed by TypeScript or ts-node. These are bugs in your code or configuration. + +#### Unsupported JavaScript syntax + +Your version of `node` may not support all JavaScript syntax supported by TypeScript. The compiler must transform this syntax via "downleveling," which is controlled by +the [tsconfig `"target"` option](https://www.typescriptlang.org/tsconfig#target). Otherwise your code will compile fine, but node will throw a `SyntaxError`. + +For example, `node` 12 does not understand the `?.` optional chaining operator. If you use `"target": "esnext"`, then the following TypeScript syntax: + +```typescript twoslash +const bar: string | undefined = foo?.bar; +``` + +will compile into this JavaScript: + +```javascript +const a = foo?.bar; +``` + +When you try to run this code, node 12 will throw a `SyntaxError`. To fix this, you must switch to `"target": "es2019"` or lower so TypeScript transforms `?.` into something `node` can understand. + +### `ERR_REQUIRE_ESM` + +This error is thrown by node when a module is `require()`d, but node believes it should execute as native ESM. This can happen for a few reasons: + +* You have installed an ESM dependency but your own code compiles to CommonJS. + * Solution: configure your project to compile and execute as native ESM. [Docs](#native-ecmascript-modules) + * Solution: downgrade the dependency to an older, CommonJS version. +* You have moved your project to ESM but still have a config file, such as `webpack.config.ts`, which must be executed as CommonJS + * Solution: if supported by the relevant tool, rename your config file to `.cts` + * Solution: Configure a module type override. [Docs](#module-type-overrides) +* You have a mix of CommonJS and native ESM in your project + * Solution: double-check all package.json "type" and tsconfig.json "module" configuration [Docs](#commonjs-vs-native-ecmascript-modules) + * Solution: consider simplifying by making your project entirely CommonJS or entirely native ESM + +### `ERR_UNKNOWN_FILE_EXTENSION` + +This error is thrown by node when a module has an unrecognized file extension, or no extension at all, and is being executed as native ESM. This can happen for a few reasons: + +* You are using a tool which has an extensionless binary, such as `mocha`. + * CommonJS supports extensionless files but native ESM does not. + * Solution: upgrade to ts-node >=[v10.6.0](https://github.com/TypeStrong/ts-node/releases/tag/v10.6.0), which implements a workaround. +* Our ESM loader is not installed. + * Solution: Use `ts-node-esm`, `ts-node --esm`, or add `"ts-node": {"esm": true}` to your tsconfig.json. [Docs](#native-ecmascript-modules) +* You have moved your project to ESM but still have a config file, such as `webpack.config.ts`, which must be executed as CommonJS + * Solution: if supported by the relevant tool, rename your config file to `.cts` + * Solution: Configure a module type override. [Docs](#module-type-overrides) + +## Missing Types + +ts-node does *not* eagerly load `files`, `include` or `exclude` by default. This is because a large majority of projects do not use all of the files in a project directory (e.g. `Gulpfile.ts`, runtime vs tests) and parsing every file for types slows startup time. Instead, ts-node starts with the script file (e.g. `ts-node index.ts`) and TypeScript resolves dependencies based on imports and references. + +Occasionally, this optimization leads to missing types. Fortunately, there are other ways to include them in typechecking. + +For global definitions, you can use the `typeRoots` compiler option. This requires that your type definitions be structured as type packages (not loose TypeScript definition files). More details on how this works can be found in the [TypeScript Handbook](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html#types-typeroots-and-types). + +Example `tsconfig.json`: + +```jsonc +{ + "compilerOptions": { + "typeRoots" : ["./node_modules/@types", "./typings"] + } +} +``` + +Example project structure: + +```text +/ +-- tsconfig.json +-- typings/ + -- / + -- index.d.ts +``` + +Example module declaration file: + +```typescript twoslash +declare module '' { + // module definitions go here +} +``` + +For module definitions, you can use [`paths`](https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping): + +```jsonc title="tsconfig.json" +{ + "compilerOptions": { + "baseUrl": ".", + "paths": { + "custom-module-type": ["types/custom-module-type"] + } + } +} +``` + +Another option is [triple-slash directives](https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html). This may be helpful if you prefer not to change your `compilerOptions` or structure your type definitions for `typeRoots`. Below is an example of a triple-slash directive as a relative path within your project: + +```typescript twoslash +/// +import {Greeter} from "lib_greeter" +const g = new Greeter(); +g.sayHello(); +``` + +If none of the above work, and you *must* use `files`, `include`, or `exclude`, enable our [`files`](#files) option. + +## npx, yarn dlx, and node_modules + +When executing TypeScript with `npx` or `yarn dlx`, the code resides within a temporary `node_modules` directory. + +The contents of `node_modules` are ignored by default. If execution fails, enable [`skipIgnore`](#skipignore). + + + +# Performance + +These tricks will make ts-node faster. + +## Skip typechecking + +It is often better to typecheck as part of your tests or linting. You can run `tsc --noEmit` to do this. In these cases, ts-node can skip typechecking, making it much faster. + +To skip typechecking in ts-node, do one of the following: + +* Enable [swc](#swc) + * This is by far the fastest option +* Enable [`transpileOnly`](#transpileonly) to skip typechecking without swc + +## With typechecking + +If you absolutely must typecheck in ts-node: + +* Avoid dynamic `require()` which may trigger repeated typechecking; prefer `import` +* Try with and without `--files`; one may be faster depending on your project +* Check `tsc --showConfig`; make sure all executed files are included +* Enable [`skipLibCheck`](https://www.typescriptlang.org/tsconfig#skipLibCheck) +* Set a [`types`](https://www.typescriptlang.org/tsconfig#types) array to avoid loading unnecessary `@types` + +# Advanced + +## How it works + +ts-node works by registering hooks for `.ts`, `.tsx`, `.js`, and/or `.jsx` extensions. + +Vanilla `node` loads `.js` by reading code from disk and executing it. Our hook runs in the middle, transforming code from TypeScript to JavaScript and passing the result to `node` for execution. This transformation will respect your `tsconfig.json` as if you had compiled via `tsc`. + +We also register a few other hooks to apply sourcemaps to stack traces and remap from `.js` imports to `.ts`. + +## Ignored files + +ts-node transforms certain files and ignores others. We refer to this mechanism as "scoping." There are various +options to configure scoping, so that ts-node transforms only the files in your project. + +> **Warning:** +> +> An ignored file can still be executed by node.js. Ignoring a file means we do not transform it from TypeScript into JavaScript, but it does not prevent execution. +> +> If a file requires transformation but is ignored, node may either fail to resolve it or attempt to execute it as vanilla JavaScript. This may cause syntax errors or other failures, because node does not understand TypeScript type syntax nor bleeding-edge ECMAScript features. + +### File extensions + +`.js` and `.jsx` are only transformed when [`allowJs`](https://www.typescriptlang.org/docs/handbook/compiler-options.html#compiler-options) is enabled. + +`.tsx` and `.jsx` are only transformed when [`jsx`](https://www.typescriptlang.org/docs/handbook/jsx.html) is enabled. + +> **Warning:** +> +> When ts-node is used with `allowJs`, *all* non-ignored JavaScript files are transformed by ts-node. + +### Skipping `node_modules` + +By default, ts-node avoids compiling files in `/node_modules/` for three reasons: + +1. Modules should always be published in a format node.js can consume +2. Transpiling the entire dependency tree will make your project slower +3. Differing behaviours between TypeScript and node.js (e.g. ES2015 modules) can result in a project that works until you decide to support a feature natively from node.js + +If you need to import uncompiled TypeScript in `node_modules`, use [`--skipIgnore`](#skipignore) or [`TS_NODE_SKIP_IGNORE`](#skipignore) to bypass this restriction. + +### Skipping pre-compiled TypeScript + +If a compiled JavaScript file with the same name as a TypeScript file already exists, the TypeScript file will be ignored. ts-node will import the pre-compiled JavaScript. + +To force ts-node to import the TypeScript source, not the precompiled JavaScript, use [`--preferTsExts`](#prefertsexts). + +### Scope by directory + +Our [`scope`](#scope) and [`scopeDir`](#scopedir) options will limit transformation to files +within a directory. + +### Ignore by regexp + +Our [`ignore`](#ignore) option will ignore files matching one or more regular expressions. + +## paths and baseUrl + +You can use ts-node together with [tsconfig-paths](https://www.npmjs.com/package/tsconfig-paths) to load modules according to the `paths` section in `tsconfig.json`. + +```jsonc title="tsconfig.json" +{ + "ts-node": { + // Do not forget to `npm i -D tsconfig-paths` + "require": ["tsconfig-paths/register"] + } +} +``` + +### Why is this not built-in to ts-node? + +The official TypeScript Handbook explains the intended purpose for `"paths"` in ["Additional module resolution flags"](https://www.typescriptlang.org/docs/handbook/module-resolution.html#additional-module-resolution-flags). + +> The TypeScript compiler has a set of additional flags to *inform* the compiler of transformations that are expected to happen to the sources to generate the final output. +> +> It is important to note that the compiler will not perform any of these transformations; it just uses these pieces of information to guide the process of resolving a module import to its definition file. + +This means `"paths"` are intended to describe mappings that the build tool or runtime *already* performs, not to tell the build tool or +runtime how to resolve modules. In other words, they intend us to write our imports in a way `node` already understands. For this reason, ts-node does not modify `node`'s module resolution behavior to implement `"paths"` mappings. + +## Third-party compilers + +Some projects require a patched typescript compiler which adds additional features. For example, [`ttypescript`](https://github.com/cevek/ttypescript/tree/master/packages/ttypescript) and [`ts-patch`](https://github.com/nonara/ts-patch#readme) +add the ability to configure custom transformers. These are drop-in replacements for the vanilla `typescript` module and +implement the same API. + +For example, to use `ttypescript` and `ts-transformer-keys`, add this to your `tsconfig.json`: + +```jsonc title="tsconfig.json" +{ + "ts-node": { + // This can be omitted when using ts-patch + "compiler": "ttypescript" + }, + "compilerOptions": { + // plugin configuration is the same for both ts-patch and ttypescript + "plugins": [ + { "transform": "ts-transformer-keys/transformer" } + ] + } +} +``` + +## Transpilers + +ts-node supports third-party transpilers as plugins. Transpilers such as swc can transform TypeScript into JavaScript +much faster than the TypeScript compiler. You will still benefit from ts-node's automatic `tsconfig.json` discovery, +sourcemap support, and global ts-node CLI. Plugins automatically derive an appropriate configuration from your existing +`tsconfig.json` which simplifies project boilerplate. + +> **What is the difference between a compiler and a transpiler?** +> +> For our purposes, a compiler implements TypeScript's API and can perform typechecking. +> A third-party transpiler does not. Both transform TypeScript into JavaScript. + +### Third-party plugins + +The `transpiler` option allows using third-party transpiler plugins with ts-node. `transpiler` must be given the +name of a module which can be `require()`d. The built-in `swc` plugin is exposed as `ts-node/transpilers/swc`. + +For example, to use a hypothetical "@cspotcode/fast-ts-compiler", first install it into your project: `npm install @cspotcode/fast-ts-compiler` + +Then add the following to your tsconfig: + +```jsonc title="tsconfig.json" +{ + "ts-node": { + "transpileOnly": true, + "transpiler": "@cspotcode/fast-ts-compiler" + } +} +``` + +### Write your own plugin + +To write your own transpiler plugin, check our [API docs](https://typestrong.org/ts-node/api/interfaces/TranspilerModule.html). + +Plugins are `require()`d by ts-node, so they can be a local script or a node module published to npm. The module must +export a `create` function described by our +[`TranspilerModule`](https://typestrong.org/ts-node/api/interfaces/TranspilerModule.html) interface. `create` is +invoked by ts-node at startup to create one or more transpiler instances. The instances are used to transform +TypeScript into JavaScript. + +For a working example, check out out our bundled swc plugin: https://github.com/TypeStrong/ts-node/blob/main/src/transpilers/swc.ts + +## Module type overrides + +> Wherever possible, it is recommended to use TypeScript's [`NodeNext` or `Node16` mode](https://www.typescriptlang.org/docs/handbook/esm-node.html) instead of the options described +> in this section. Setting `"module": "NodeNext"` and using the `.cts` file extension should work well for most projects. + +When deciding how a file should be compiled and executed -- as either CommonJS or native ECMAScript module -- ts-node matches +`node` and `tsc` behavior. This means TypeScript files are transformed according to your `tsconfig.json` `"module"` +option and executed according to node's rules for the `package.json` `"type"` field. Set `"module": "NodeNext"` and everything should work. + +In rare cases, you may need to override this behavior for some files. For example, some tools read a `name-of-tool.config.ts` +and require that file to execute as CommonJS. If you have `package.json` configured with `"type": "module"` and `tsconfig.json` with +`"module": "esnext"`, the config is native ECMAScript by default and will raise an error. You will need to force the config and +any supporting scripts to execute as CommonJS. + +In these situations, our `moduleTypes` option can override certain files to be +CommonJS or ESM. Similar overriding is possible by using `.mts`, `.cts`, `.cjs` and `.mjs` file extensions. +`moduleTypes` achieves the same effect for `.ts` and `.js` files, and *also* overrides your `tsconfig.json` `"module"` +config appropriately. + +The following example tells ts-node to execute a webpack config as CommonJS: + +```jsonc title="tsconfig.json" +{ + "ts-node": { + "transpileOnly": true, + "moduleTypes": { + "webpack.config.ts": "cjs", + // Globs are also supported with the same behavior as tsconfig "include" + "webpack-config-scripts/**/*": "cjs" + } + }, + "compilerOptions": { + "module": "es2020", + "target": "es2020" + } +} +``` + +Each key is a glob pattern with the same syntax as tsconfig's `"include"` array. +When multiple patterns match the same file, the last pattern takes precedence. + +* `cjs` overrides matches files to compile and execute as CommonJS. +* `esm` overrides matches files to compile and execute as native ECMAScript modules. +* `package` resets either of the above to default behavior, which obeys `package.json` `"type"` and `tsconfig.json` `"module"` options. + +### Caveats + +Files with an overridden module type are transformed with the same limitations as [`isolatedModules`](https://www.typescriptlang.org/tsconfig#isolatedModules). This will only affect rare cases such as using `const enum`s with [`preserveConstEnums`](https://www.typescriptlang.org/tsconfig#preserveConstEnums) disabled. + +This feature is meant to facilitate scenarios where normal `compilerOptions` and `package.json` configuration is not possible. For example, a `webpack.config.ts` cannot be given its own `package.json` to override `"type"`. Wherever possible you should favor using traditional `package.json` and `tsconfig.json` configurations. + +## API + +ts-node's complete API is documented here: [API Docs](https://typestrong.org/ts-node/api/) + +Here are a few highlights of what you can accomplish: + +* [`create()`](https://typestrong.org/ts-node/api/index.html#create) creates ts-node's compiler service without + registering any hooks. +* [`createRepl()`](https://typestrong.org/ts-node/api/index.html#createRepl) creates an instance of our REPL service, so + you can create your own TypeScript-powered REPLs. +* [`createEsmHooks()`](https://typestrong.org/ts-node/api/index.html#createEsmHooks) creates our ESM loader hooks, + suitable for composing with other loaders or augmenting with additional features. + +# Recipes + +## Watching and restarting + +ts-node focuses on adding first-class TypeScript support to node. Watching files and code reloads are out of scope for the project. + +If you want to restart the `ts-node` process on file change, existing node.js tools such as [nodemon](https://github.com/remy/nodemon), [onchange](https://github.com/Qard/onchange) and [node-dev](https://github.com/fgnass/node-dev) work. + +There's also [`ts-node-dev`](https://github.com/whitecolor/ts-node-dev), a modified version of [`node-dev`](https://github.com/fgnass/node-dev) using `ts-node` for compilation that will restart the process on file change. Note that `ts-node-dev` is incompatible with our native ESM loader. + +## AVA + +Assuming you are configuring AVA via your `package.json`, add one of the following configurations. + +### CommonJS + +Use this configuration if your `package.json` does not have `"type": "module"`. + +```jsonc title="package.json" +{ + "ava": { + "extensions": [ + "ts" + ], + "require": [ + "ts-node/register" + ] + } +} +``` + +### Native ECMAScript modules + +This configuration is necessary if your `package.json` has `"type": "module"`. + +```jsonc title="package.json" +{ + "ava": { + "extensions": { + "ts": "module" + }, + "nonSemVerExperiments": { + "configurableModuleFormat": true + }, + "nodeArguments": [ + "--loader=ts-node/esm" + ] + } +} +``` + +## Gulp + +ts-node support is built-in to gulp. + +```sh +# Create a `gulpfile.ts` and run `gulp`. +gulp +``` + +See also: https://gulpjs.com/docs/en/getting-started/javascript-and-gulpfiles#transpilation + +## IntelliJ and Webstorm + +Create a new Node.js configuration and add `-r ts-node/register` to "Node parameters." + +**Note:** If you are using the `--project ` command line argument as per the [Configuration Options](#configuration), and want to apply this same behavior when launching in IntelliJ, specify under "Environment Variables": `TS_NODE_PROJECT=`. + +## Mocha + +### Mocha 7 and newer + +```shell +mocha --require ts-node/register --extensions ts,tsx --watch --watch-files src 'tests/**/*.{ts,tsx}' [...args] +``` + +Or specify options via your mocha config file. + +```jsonc title=".mocharc.json" +{ + // Specify "require" for CommonJS + "require": "ts-node/register", + // Specify "loader" for native ESM + "loader": "ts-node/esm", + "extensions": ["ts", "tsx"], + "spec": [ + "tests/**/*.spec.*" + ], + "watch-files": [ + "src" + ] +} +``` + +See also: https://mochajs.org/#configuring-mocha-nodejs + +### Mocha <=6 + +```shell +mocha --require ts-node/register --watch-extensions ts,tsx "test/**/*.{ts,tsx}" [...args] +``` + +**Note:** `--watch-extensions` is only used in `--watch` mode. + +## Tape + +```shell +ts-node node_modules/tape/bin/tape [...args] +``` + +## Visual Studio Code + +Create a new Node.js debug configuration, add `-r ts-node/register` to node args and move the `program` to the `args` list (so VS Code doesn't look for `outFiles`). + +```jsonc title=".vscode/launch.json" +{ + "configurations": [{ + "type": "node", + "request": "launch", + "name": "Launch Program", + "runtimeArgs": [ + "-r", + "ts-node/register" + ], + "args": [ + "${workspaceFolder}/src/index.ts" + ] + }], +} +``` + +**Note:** If you are using the `--project ` command line argument as per the [Configuration Options](#configuration), and want to apply this same behavior when launching in VS Code, add an "env" key into the launch configuration: `"env": { "TS_NODE_PROJECT": "" }`. + +## Other + +In many cases, setting [`NODE_OPTIONS`](https://nodejs.org/api/cli.html#cli_node_options_options) will enable `ts-node` within other node tools, child processes, and worker threads. + +```shell +NODE_OPTIONS="-r ts-node/register" +``` + +Or, if you require native ESM support: + +```shell +NODE_OPTIONS="--loader ts-node/esm" +``` + +This tells any node processes which receive this environment variable to install `ts-node`'s hooks before executing other code. + +# License + +ts-node is licensed under the MIT license. [MIT](https://github.com/TypeStrong/ts-node/blob/main/LICENSE) + +ts-node includes source code from Node.js which is licensed under the MIT license. [Node.js license information](https://raw.githubusercontent.com/nodejs/node/master/LICENSE) + +ts-node includes source code from the TypeScript compiler which is licensed under the Apache License 2.0. [TypeScript license information](https://github.com/microsoft/TypeScript/blob/master/LICENSE.txt) diff --git a/node_modules/ts-node/child-loader.mjs b/node_modules/ts-node/child-loader.mjs new file mode 100644 index 0000000..6ef592a --- /dev/null +++ b/node_modules/ts-node/child-loader.mjs @@ -0,0 +1,8 @@ +import { fileURLToPath } from 'url'; +import { createRequire } from 'module'; +const require = createRequire(fileURLToPath(import.meta.url)); + +// TODO why use require() here? I think we can just `import` +/** @type {import('./dist/child-loader')} */ +const childLoader = require('./dist/child/child-loader'); +export const { resolve, load, getFormat, transformSource } = childLoader; diff --git a/node_modules/ts-node/dist-raw/NODE-LICENSE.md b/node_modules/ts-node/dist-raw/NODE-LICENSE.md new file mode 100644 index 0000000..c1de8e9 --- /dev/null +++ b/node_modules/ts-node/dist-raw/NODE-LICENSE.md @@ -0,0 +1,24 @@ +This directory contains portions of Node.js source code which is licensed as follows: + +--- + +Copyright Joyent, Inc. and other Node contributors. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/ts-node/dist-raw/README.md b/node_modules/ts-node/dist-raw/README.md new file mode 100644 index 0000000..9eeaed3 --- /dev/null +++ b/node_modules/ts-node/dist-raw/README.md @@ -0,0 +1,36 @@ +The `dist-raw` directory contains JS sources that are distributed verbatim, not compiled nor typechecked via TS. + +To implement ESM support, we unfortunately must duplicate some of node's built-in functionality that is not +exposed via an API. We have copy-pasted the necessary code from https://github.com/nodejs/node/tree/master/lib +then modified it to suite our needs. + +Formatting may be intentionally bad to keep the diff as small as possible, to make it easier to merge +upstream changes and understand our modifications. For example, when we need to wrap node's source code +in a factory function, we will not indent the function body, to avoid whitespace changes in the diff. + +One obvious problem with this approach: the code has been pulled from one version of node, whereas users of ts-node +run multiple versions of node. +Users running node 12 may see that ts-node behaves like node 14, for example. + +## `raw` directory + +Within the `raw` directory, we keep unmodified copies of the node source files. This allows us to use diffing tools to +compare files in `raw` to those in `dist-raw`, which will highlight all of the changes we have made. Hopefully, these +changes are as minimal as possible. + +## Naming convention + +Not used consistently, but the idea is: + +`node-(...-)-.js` + +`node-internal-errors.js` -> `github.com/nodejs/node/blob/TAG/lib/internal/errors.js` + +So, take the path within node's `lib/` directory, and replace slashes with hyphens. + +In the `raw` directory, files are suffixed with the version number or revision from which +they were downloaded. + +If they have a `stripped` suffix, this means they have large chunks of code deleted, but no other modifications. +This is useful when diffing. Sometimes our `dist-raw` files only have a small part of a much larger node source file. +It is easier to diff `raw/*-stripped.js` against `dist-raw/*.js`. diff --git a/node_modules/ts-node/dist-raw/node-internal-constants.js b/node_modules/ts-node/dist-raw/node-internal-constants.js new file mode 100644 index 0000000..b4aa7aa --- /dev/null +++ b/node_modules/ts-node/dist-raw/node-internal-constants.js @@ -0,0 +1,4 @@ +// Copied from https://github.com/nodejs/node/blob/master/lib/internal/constants.js +module.exports = { + CHAR_FORWARD_SLASH: 47, /* / */ +}; diff --git a/node_modules/ts-node/dist-raw/node-internal-errors.js b/node_modules/ts-node/dist-raw/node-internal-errors.js new file mode 100644 index 0000000..ddcd661 --- /dev/null +++ b/node_modules/ts-node/dist-raw/node-internal-errors.js @@ -0,0 +1,82 @@ +'use strict'; + +const path = require('path'); + +exports.codes = { + ERR_INPUT_TYPE_NOT_ALLOWED: createErrorCtor(joinArgs('ERR_INPUT_TYPE_NOT_ALLOWED')), + ERR_INVALID_ARG_VALUE: createErrorCtor(joinArgs('ERR_INVALID_ARG_VALUE')), + ERR_INVALID_MODULE_SPECIFIER: createErrorCtor(joinArgs('ERR_INVALID_MODULE_SPECIFIER')), + ERR_INVALID_PACKAGE_CONFIG: createErrorCtor(joinArgs('ERR_INVALID_PACKAGE_CONFIG')), + ERR_INVALID_PACKAGE_TARGET: createErrorCtor(joinArgs('ERR_INVALID_PACKAGE_TARGET')), + ERR_MANIFEST_DEPENDENCY_MISSING: createErrorCtor(joinArgs('ERR_MANIFEST_DEPENDENCY_MISSING')), + ERR_MODULE_NOT_FOUND: createErrorCtor((path, base, type = 'package') => { + return `Cannot find ${type} '${path}' imported from ${base}` + }), + ERR_PACKAGE_IMPORT_NOT_DEFINED: createErrorCtor(joinArgs('ERR_PACKAGE_IMPORT_NOT_DEFINED')), + ERR_PACKAGE_PATH_NOT_EXPORTED: createErrorCtor(joinArgs('ERR_PACKAGE_PATH_NOT_EXPORTED')), + ERR_UNSUPPORTED_DIR_IMPORT: createErrorCtor(joinArgs('ERR_UNSUPPORTED_DIR_IMPORT')), + ERR_UNSUPPORTED_ESM_URL_SCHEME: createErrorCtor(joinArgs('ERR_UNSUPPORTED_ESM_URL_SCHEME')), + ERR_UNKNOWN_FILE_EXTENSION: createErrorCtor(joinArgs('ERR_UNKNOWN_FILE_EXTENSION')), +} + +function joinArgs(name) { + return (...args) => { + return [name, ...args].join(' ') + } +} + +function createErrorCtor(errorMessageCreator) { + return class CustomError extends Error { + constructor(...args) { + super(errorMessageCreator(...args)) + } + } +} +exports.createErrRequireEsm = createErrRequireEsm; + +// Native ERR_REQUIRE_ESM Error is declared here: +// https://github.com/nodejs/node/blob/2d5d77306f6dff9110c1f77fefab25f973415770/lib/internal/errors.js#L1294-L1313 +// Error class factory is implemented here: +// function E: https://github.com/nodejs/node/blob/2d5d77306f6dff9110c1f77fefab25f973415770/lib/internal/errors.js#L323-L341 +// function makeNodeErrorWithCode: https://github.com/nodejs/node/blob/2d5d77306f6dff9110c1f77fefab25f973415770/lib/internal/errors.js#L251-L278 +// The code below should create an error that matches the native error as closely as possible. +// Third-party libraries which attempt to catch the native ERR_REQUIRE_ESM should recognize our imitation error. +function createErrRequireEsm(filename, parentPath, packageJsonPath) { + const code = 'ERR_REQUIRE_ESM' + const err = new Error(getErrRequireEsmMessage(filename, parentPath, packageJsonPath)) + // Set `name` to be used in stack trace, generate stack trace with that name baked in, then re-declare the `name` field. + // This trick is copied from node's source. + err.name = `Error [${ code }]` + err.stack + Object.defineProperty(err, 'name', { + value: 'Error', + enumerable: false, + writable: true, + configurable: true + }) + err.code = code + return err +} + +// Copy-pasted from https://github.com/nodejs/node/blob/b533fb3508009e5f567cc776daba8fbf665386a6/lib/internal/errors.js#L1293-L1311 +// so that our error message is identical to the native message. +function getErrRequireEsmMessage(filename, parentPath = null, packageJsonPath = null) { + const ext = path.extname(filename) + let msg = `Must use import to load ES Module: ${filename}`; + if (parentPath && packageJsonPath) { + const path = require('path'); + const basename = path.basename(filename) === path.basename(parentPath) ? + filename : path.basename(filename); + msg += + '\nrequire() of ES modules is not supported.\nrequire() of ' + + `${filename} ${parentPath ? `from ${parentPath} ` : ''}` + + `is an ES module file as it is a ${ext} file whose nearest parent ` + + `package.json contains "type": "module" which defines all ${ext} ` + + 'files in that package scope as ES modules.\nInstead ' + + 'change the requiring code to use ' + + 'import(), or remove "type": "module" from ' + + `${packageJsonPath}.\n`; + return msg; + } + return msg; +} diff --git a/node_modules/ts-node/dist-raw/node-internal-modules-cjs-helpers.js b/node_modules/ts-node/dist-raw/node-internal-modules-cjs-helpers.js new file mode 100644 index 0000000..bd4f702 --- /dev/null +++ b/node_modules/ts-node/dist-raw/node-internal-modules-cjs-helpers.js @@ -0,0 +1,89 @@ +// Copied from https://github.com/nodejs/node/blob/v17.0.1/lib/internal/modules/cjs/helpers.js + +'use strict'; + +const { + ArrayPrototypeForEach, + ObjectDefineProperty, + ObjectPrototypeHasOwnProperty, + SafeSet, + StringPrototypeIncludes, + StringPrototypeStartsWith, +} = require('./node-primordials'); + +const { getOptionValue } = require('./node-options'); +const userConditions = getOptionValue('--conditions'); + +const noAddons = getOptionValue('--no-addons'); +const addonConditions = noAddons ? [] : ['node-addons']; + +// TODO: Use this set when resolving pkg#exports conditions in loader.js. +const cjsConditions = new SafeSet([ + 'require', + 'node', + ...addonConditions, + ...userConditions, +]); + +/** + * @param {any} object + * @param {string} [dummyModuleName] + * @return {void} + */ +function addBuiltinLibsToObject(object, dummyModuleName) { + // Make built-in modules available directly (loaded lazily). + const Module = require('module').Module; + const { builtinModules } = Module; + + // To require built-in modules in user-land and ignore modules whose + // `canBeRequiredByUsers` is false. So we create a dummy module object and not + // use `require()` directly. + const dummyModule = new Module(dummyModuleName); + + ArrayPrototypeForEach(builtinModules, (name) => { + // Neither add underscored modules, nor ones that contain slashes (e.g., + // 'fs/promises') or ones that are already defined. + if (StringPrototypeStartsWith(name, '_') || + StringPrototypeIncludes(name, '/') || + ObjectPrototypeHasOwnProperty(object, name)) { + return; + } + // Goals of this mechanism are: + // - Lazy loading of built-in modules + // - Having all built-in modules available as non-enumerable properties + // - Allowing the user to re-assign these variables as if there were no + // pre-existing globals with the same name. + + const setReal = (val) => { + // Deleting the property before re-assigning it disables the + // getter/setter mechanism. + delete object[name]; + object[name] = val; + }; + + ObjectDefineProperty(object, name, { + get: () => { + // Node 12 hack; remove when we drop node12 support + const lib = (dummyModule.require || require)(name); + + // Disable the current getter/setter and set up a new + // non-enumerable property. + delete object[name]; + ObjectDefineProperty(object, name, { + get: () => lib, + set: setReal, + configurable: true, + enumerable: false + }); + + return lib; + }, + set: setReal, + configurable: true, + enumerable: false + }); + }); +} + +exports.addBuiltinLibsToObject = addBuiltinLibsToObject; +exports.cjsConditions = cjsConditions; diff --git a/node_modules/ts-node/dist-raw/node-internal-modules-cjs-loader.js b/node_modules/ts-node/dist-raw/node-internal-modules-cjs-loader.js new file mode 100644 index 0000000..cb83c35 --- /dev/null +++ b/node_modules/ts-node/dist-raw/node-internal-modules-cjs-loader.js @@ -0,0 +1,593 @@ +// Copied from several files in node's source code. +// https://github.com/nodejs/node/blob/2d5d77306f6dff9110c1f77fefab25f973415770/lib/internal/modules/cjs/loader.js +// Each function and variable below must have a comment linking to the source in node's github repo. + +'use strict'; + +const { + ArrayIsArray, + ArrayPrototypeIncludes, + ArrayPrototypeJoin, + ArrayPrototypePush, + JSONParse, + ObjectKeys, + RegExpPrototypeTest, + SafeMap, + SafeWeakMap, + StringPrototypeCharCodeAt, + StringPrototypeEndsWith, + StringPrototypeLastIndexOf, + StringPrototypeIndexOf, + StringPrototypeMatch, + StringPrototypeSlice, + StringPrototypeStartsWith, +} = require('./node-primordials'); +const { NativeModule } = require('./node-nativemodule'); +const { pathToFileURL, fileURLToPath } = require('url'); +const fs = require('fs'); +const path = require('path'); +const { sep } = path; +const { internalModuleStat } = require('./node-internalBinding-fs'); +const packageJsonReader = require('./node-internal-modules-package_json_reader'); +const { + cjsConditions, +} = require('./node-internal-modules-cjs-helpers'); +const { getOptionValue } = require('./node-options'); +const preserveSymlinks = getOptionValue('--preserve-symlinks'); +const preserveSymlinksMain = getOptionValue('--preserve-symlinks-main'); +const {normalizeSlashes} = require('../dist/util'); +const {createErrRequireEsm} = require('./node-internal-errors'); +const { + codes: { + ERR_INVALID_MODULE_SPECIFIER, + }, +} = require('./node-internal-errors'); + +const { + CHAR_FORWARD_SLASH, +} = require('./node-internal-constants'); + +const Module = require('module'); + +const isWindows = process.platform === 'win32'; + +let statCache = null; + +function stat(filename) { + filename = path.toNamespacedPath(filename); + if (statCache !== null) { + const result = statCache.get(filename); + if (result !== undefined) return result; + } + const result = internalModuleStat(filename); + if (statCache !== null && result >= 0) { + // Only set cache when `internalModuleStat(filename)` succeeds. + statCache.set(filename, result); + } + return result; +} + +// Note: +// we cannot get access to node's internal cache, which is populated from +// within node's Module constructor. So the cache here will always be empty. +// It's possible we could approximate our own cache by building it up with +// hacky workarounds, but it's not worth the complexity and flakiness. +const moduleParentCache = new SafeWeakMap(); + +// Given a module name, and a list of paths to test, returns the first +// matching file in the following precedence. +// +// require("a.") +// -> a. +// +// require("a") +// -> a +// -> a. +// -> a/index. + +const packageJsonCache = new SafeMap(); + +function readPackage(requestPath) { + const jsonPath = path.resolve(requestPath, 'package.json'); + + const existing = packageJsonCache.get(jsonPath); + if (existing !== undefined) return existing; + + const result = packageJsonReader.read(jsonPath); + const json = result.containsKeys === false ? '{}' : result.string; + if (json === undefined) { + packageJsonCache.set(jsonPath, false); + return false; + } + + try { + const parsed = JSONParse(json); + const filtered = { + name: parsed.name, + main: parsed.main, + exports: parsed.exports, + imports: parsed.imports, + type: parsed.type + }; + packageJsonCache.set(jsonPath, filtered); + return filtered; + } catch (e) { + e.path = jsonPath; + e.message = 'Error parsing ' + jsonPath + ': ' + e.message; + throw e; + } +} + +function readPackageScope(checkPath) { + const rootSeparatorIndex = StringPrototypeIndexOf(checkPath, sep); + let separatorIndex; + do { + separatorIndex = StringPrototypeLastIndexOf(checkPath, sep); + checkPath = StringPrototypeSlice(checkPath, 0, separatorIndex); + if (StringPrototypeEndsWith(checkPath, sep + 'node_modules')) + return false; + const pjson = readPackage(checkPath + sep); + if (pjson) return { + data: pjson, + path: checkPath, + }; + } while (separatorIndex > rootSeparatorIndex); + return false; +} + +/** + * @param {{ + * nodeEsmResolver: ReturnType, + * extensions: import('../src/file-extensions').Extensions, + * preferTsExts + * }} opts + */ +function createCjsLoader(opts) { +const {nodeEsmResolver, preferTsExts} = opts; +const {replacementsForCjs, replacementsForJs, replacementsForMjs, replacementsForJsx} = opts.extensions; +const { + encodedSepRegEx, + packageExportsResolve, + packageImportsResolve +} = nodeEsmResolver; + +function tryPackage(requestPath, exts, isMain, originalPath) { + // const pkg = readPackage(requestPath)?.main; + const tmp = readPackage(requestPath) + const pkg = tmp != null ? tmp.main : undefined; + + if (!pkg) { + return tryExtensions(path.resolve(requestPath, 'index'), exts, isMain); + } + + const filename = path.resolve(requestPath, pkg); + let actual = tryReplacementExtensions(filename, isMain) || + tryFile(filename, isMain) || + tryExtensions(filename, exts, isMain) || + tryExtensions(path.resolve(filename, 'index'), exts, isMain); + if (actual === false) { + actual = tryExtensions(path.resolve(requestPath, 'index'), exts, isMain); + if (!actual) { + // eslint-disable-next-line no-restricted-syntax + const err = new Error( + `Cannot find module '${filename}'. ` + + 'Please verify that the package.json has a valid "main" entry' + ); + err.code = 'MODULE_NOT_FOUND'; + err.path = path.resolve(requestPath, 'package.json'); + err.requestPath = originalPath; + // TODO(BridgeAR): Add the requireStack as well. + throw err; + } else { + const jsonPath = path.resolve(requestPath, 'package.json'); + process.emitWarning( + `Invalid 'main' field in '${jsonPath}' of '${pkg}'. ` + + 'Please either fix that or report it to the module author', + 'DeprecationWarning', + 'DEP0128' + ); + } + } + return actual; +} + +// In order to minimize unnecessary lstat() calls, +// this cache is a list of known-real paths. +// Set to an empty Map to reset. +const realpathCache = new SafeMap(); + +// Check if the file exists and is not a directory +// if using --preserve-symlinks and isMain is false, +// keep symlinks intact, otherwise resolve to the +// absolute realpath. +function tryFile(requestPath, isMain) { + const rc = stat(requestPath); + if (rc !== 0) return; + if (preserveSymlinks && !isMain) { + return path.resolve(requestPath); + } + return toRealPath(requestPath); +} + +function toRealPath(requestPath) { + return fs.realpathSync(requestPath, { + // [internalFS.realpathCacheKey]: realpathCache + }); +} + +function statReplacementExtensions(p) { + const lastDotIndex = p.lastIndexOf('.'); + if(lastDotIndex >= 0) { + const ext = p.slice(lastDotIndex); + if (ext === '.js' || ext === '.jsx' || ext === '.mjs' || ext === '.cjs') { + const pathnameWithoutExtension = p.slice(0, lastDotIndex); + const replacementExts = + ext === '.js' ? replacementsForJs + : ext === '.jsx' ? replacementsForJsx + : ext === '.mjs' ? replacementsForMjs + : replacementsForCjs; + for (let i = 0; i < replacementExts.length; i++) { + const filename = pathnameWithoutExtension + replacementExts[i]; + const rc = stat(filename); + if (rc === 0) { + return [rc, filename]; + } + } + } + } + return [stat(p), p]; +} +function tryReplacementExtensions(p, isMain) { + const lastDotIndex = p.lastIndexOf('.'); + if(lastDotIndex >= 0) { + const ext = p.slice(lastDotIndex); + if (ext === '.js' || ext === '.jsx' || ext === '.mjs' || ext === '.cjs') { + const pathnameWithoutExtension = p.slice(0, lastDotIndex); + const replacementExts = + ext === '.js' ? replacementsForJs + : ext === '.jsx' ? replacementsForJsx + : ext === '.mjs' ? replacementsForMjs + : replacementsForCjs; + for (let i = 0; i < replacementExts.length; i++) { + const filename = tryFile(pathnameWithoutExtension + replacementExts[i], isMain); + if (filename) { + return filename; + } + } + } + } + return false; +} + +// Given a path, check if the file exists with any of the set extensions +function tryExtensions(p, exts, isMain) { + for (let i = 0; i < exts.length; i++) { + const filename = tryFile(p + exts[i], isMain); + + if (filename) { + return filename; + } + } + return false; +} + +function trySelfParentPath(parent) { + if (!parent) return false; + + if (parent.filename) { + return parent.filename; + } else if (parent.id === '' || parent.id === 'internal/preload') { + try { + return process.cwd() + path.sep; + } catch { + return false; + } + } +} + +function trySelf(parentPath, request) { + if (!parentPath) return false; + + const { data: pkg, path: pkgPath } = readPackageScope(parentPath) || {}; + if (!pkg || pkg.exports === undefined) return false; + if (typeof pkg.name !== 'string') return false; + + let expansion; + if (request === pkg.name) { + expansion = '.'; + } else if (StringPrototypeStartsWith(request, `${pkg.name}/`)) { + expansion = '.' + StringPrototypeSlice(request, pkg.name.length); + } else { + return false; + } + + try { + return finalizeEsmResolution(packageExportsResolve( + pathToFileURL(pkgPath + '/package.json'), expansion, pkg, + pathToFileURL(parentPath), cjsConditions).resolved, parentPath, pkgPath); + } catch (e) { + if (e.code === 'ERR_MODULE_NOT_FOUND') + throw createEsmNotFoundErr(request, pkgPath + '/package.json'); + throw e; + } +} + +// This only applies to requests of a specific form: +// 1. name/.* +// 2. @scope/name/.* +const EXPORTS_PATTERN = /^((?:@[^/\\%]+\/)?[^./\\%][^/\\%]*)(\/.*)?$/; +function resolveExports(nmPath, request) { + // The implementation's behavior is meant to mirror resolution in ESM. + const { 1: name, 2: expansion = '' } = + StringPrototypeMatch(request, EXPORTS_PATTERN) || []; + if (!name) + return; + const pkgPath = path.resolve(nmPath, name); + const pkg = readPackage(pkgPath); + // if (pkg?.exports != null) { + if (pkg != null && pkg.exports != null) { + try { + return finalizeEsmResolution(packageExportsResolve( + pathToFileURL(pkgPath + '/package.json'), '.' + expansion, pkg, null, + cjsConditions).resolved, null, pkgPath); + } catch (e) { + if (e.code === 'ERR_MODULE_NOT_FOUND') + throw createEsmNotFoundErr(request, pkgPath + '/package.json'); + throw e; + } + } +} + +// Backwards compat for old node versions +const hasModulePathCache = !!require('module')._pathCache; +const Module_pathCache = Object.create(null); +const Module_pathCache_get = hasModulePathCache ? (cacheKey) => Module._pathCache[cacheKey] : (cacheKey) => Module_pathCache[cacheKey]; +const Module_pathCache_set = hasModulePathCache ? (cacheKey, value) => (Module._pathCache[cacheKey] = value) : (cacheKey) => (Module_pathCache[cacheKey] = value); + +const trailingSlashRegex = /(?:^|\/)\.?\.$/; +const Module_findPath = function _findPath(request, paths, isMain) { + const absoluteRequest = path.isAbsolute(request); + if (absoluteRequest) { + paths = ['']; + } else if (!paths || paths.length === 0) { + return false; + } + + const cacheKey = request + '\x00' + ArrayPrototypeJoin(paths, '\x00'); + const entry = Module_pathCache_get(cacheKey); + if (entry) + return entry; + + let exts; + let trailingSlash = request.length > 0 && + StringPrototypeCharCodeAt(request, request.length - 1) === + CHAR_FORWARD_SLASH; + if (!trailingSlash) { + trailingSlash = RegExpPrototypeTest(trailingSlashRegex, request); + } + + // For each path + for (let i = 0; i < paths.length; i++) { + // Don't search further if path doesn't exist + const curPath = paths[i]; + if (curPath && stat(curPath) < 1) continue; + + if (!absoluteRequest) { + const exportsResolved = resolveExports(curPath, request); + if (exportsResolved) + return exportsResolved; + } + + const _basePath = path.resolve(curPath, request); + let filename; + + const [rc, basePath] = statReplacementExtensions(_basePath); + if (!trailingSlash) { + if (rc === 0) { // File. + if (!isMain) { + if (preserveSymlinks) { + filename = path.resolve(basePath); + } else { + filename = toRealPath(basePath); + } + } else if (preserveSymlinksMain) { + // For the main module, we use the preserveSymlinksMain flag instead + // mainly for backward compatibility, as the preserveSymlinks flag + // historically has not applied to the main module. Most likely this + // was intended to keep .bin/ binaries working, as following those + // symlinks is usually required for the imports in the corresponding + // files to resolve; that said, in some use cases following symlinks + // causes bigger problems which is why the preserveSymlinksMain option + // is needed. + filename = path.resolve(basePath); + } else { + filename = toRealPath(basePath); + } + } + + if (!filename) { + // Try it with each of the extensions + if (exts === undefined) + exts = ObjectKeys(Module._extensions); + filename = tryExtensions(basePath, exts, isMain); + } + } + + if (!filename && rc === 1) { // Directory. + // try it with each of the extensions at "index" + if (exts === undefined) + exts = ObjectKeys(Module._extensions); + filename = tryPackage(basePath, exts, isMain, request); + } + + if (filename) { + Module_pathCache_set(cacheKey, filename); + return filename; + } + } + + return false; +}; + +const Module_resolveFilename = function _resolveFilename(request, parent, isMain, options) { + if (StringPrototypeStartsWith(request, 'node:') || + NativeModule.canBeRequiredByUsers(request)) { + return request; + } + + let paths; + + if (typeof options === 'object' && options !== null) { + if (ArrayIsArray(options.paths)) { + const isRelative = StringPrototypeStartsWith(request, './') || + StringPrototypeStartsWith(request, '../') || + ((isWindows && StringPrototypeStartsWith(request, '.\\')) || + StringPrototypeStartsWith(request, '..\\')); + + if (isRelative) { + paths = options.paths; + } else { + const fakeParent = new Module('', null); + + paths = []; + + for (let i = 0; i < options.paths.length; i++) { + const path = options.paths[i]; + fakeParent.paths = Module._nodeModulePaths(path); + const lookupPaths = Module._resolveLookupPaths(request, fakeParent); + + for (let j = 0; j < lookupPaths.length; j++) { + if (!ArrayPrototypeIncludes(paths, lookupPaths[j])) + ArrayPrototypePush(paths, lookupPaths[j]); + } + } + } + } else if (options.paths === undefined) { + paths = Module._resolveLookupPaths(request, parent); + } else { + throw new ERR_INVALID_ARG_VALUE('options.paths', options.paths); + } + } else { + paths = Module._resolveLookupPaths(request, parent); + } + + // if (parent?.filename) { + // node 12 hack + if (parent != null && parent.filename) { + if (request[0] === '#') { + const pkg = readPackageScope(parent.filename) || {}; + + // if (pkg.data?.imports != null) { + // node 12 hack + if (pkg.data != null && pkg.data.imports != null) { + try { + return finalizeEsmResolution( + packageImportsResolve(request, pathToFileURL(parent.filename), + cjsConditions), parent.filename, + pkg.path); + } catch (e) { + if (e.code === 'ERR_MODULE_NOT_FOUND') + throw createEsmNotFoundErr(request); + throw e; + } + } + } + } + + // Try module self resolution first + const parentPath = trySelfParentPath(parent); + const selfResolved = trySelf(parentPath, request); + if (selfResolved) { + const cacheKey = request + '\x00' + + (paths.length === 1 ? paths[0] : ArrayPrototypeJoin(paths, '\x00')); + Module._pathCache[cacheKey] = selfResolved; + return selfResolved; + } + + // Look up the filename first, since that's the cache key. + const filename = Module._findPath(request, paths, isMain, false); + if (filename) return filename; + const requireStack = []; + for (let cursor = parent; + cursor; + cursor = moduleParentCache.get(cursor)) { + ArrayPrototypePush(requireStack, cursor.filename || cursor.id); + } + let message = `Cannot find module '${request}'`; + if (requireStack.length > 0) { + message = message + '\nRequire stack:\n- ' + + ArrayPrototypeJoin(requireStack, '\n- '); + } + // eslint-disable-next-line no-restricted-syntax + const err = new Error(message); + err.code = 'MODULE_NOT_FOUND'; + err.requireStack = requireStack; + throw err; +}; + +function finalizeEsmResolution(resolved, parentPath, pkgPath) { + if (RegExpPrototypeTest(encodedSepRegEx, resolved)) + throw new ERR_INVALID_MODULE_SPECIFIER( + resolved, 'must not include encoded "/" or "\\" characters', parentPath); + const filename = fileURLToPath(resolved); + const actual = tryReplacementExtensions(filename) || tryFile(filename); + if (actual) + return actual; + const err = createEsmNotFoundErr(filename, + path.resolve(pkgPath, 'package.json')); + throw err; +} + +function createEsmNotFoundErr(request, path) { + // eslint-disable-next-line no-restricted-syntax + const err = new Error(`Cannot find module '${request}'`); + err.code = 'MODULE_NOT_FOUND'; + if (path) + err.path = path; + // TODO(BridgeAR): Add the requireStack as well. + return err; +} + + +return { + Module_findPath, + Module_resolveFilename +} + +} + +/** + * copied from Module._extensions['.js'] + * https://github.com/nodejs/node/blob/v15.3.0/lib/internal/modules/cjs/loader.js#L1113-L1120 + * @param {import('../src/index').Service} service + * @param {NodeJS.Module} module + * @param {string} filename + */ +function assertScriptCanLoadAsCJSImpl(service, module, filename) { + const pkg = readPackageScope(filename); + + // ts-node modification: allow our configuration to override + const tsNodeClassification = service.moduleTypeClassifier.classifyModuleByModuleTypeOverrides(normalizeSlashes(filename)); + if(tsNodeClassification.moduleType === 'cjs') return; + + // ignore package.json when file extension is ESM-only or CJS-only + // [MUST_UPDATE_FOR_NEW_FILE_EXTENSIONS] + const lastDotIndex = filename.lastIndexOf('.'); + const ext = lastDotIndex >= 0 ? filename.slice(lastDotIndex) : ''; + + if((ext === '.cts' || ext === '.cjs') && tsNodeClassification.moduleType === 'auto') return; + + // Function require shouldn't be used in ES modules. + if (ext === '.mts' || ext === '.mjs' || tsNodeClassification.moduleType === 'esm' || (pkg && pkg.data && pkg.data.type === 'module')) { + const parentPath = module.parent && module.parent.filename; + const packageJsonPath = pkg ? path.resolve(pkg.path, 'package.json') : null; + throw createErrRequireEsm(filename, parentPath, packageJsonPath); + } +} + + +module.exports = { + createCjsLoader, + assertScriptCanLoadAsCJSImpl, + readPackageScope +}; diff --git a/node_modules/ts-node/dist-raw/node-internal-modules-esm-get_format.js b/node_modules/ts-node/dist-raw/node-internal-modules-esm-get_format.js new file mode 100644 index 0000000..e85e0ab --- /dev/null +++ b/node_modules/ts-node/dist-raw/node-internal-modules-esm-get_format.js @@ -0,0 +1,106 @@ +// Copied from https://raw.githubusercontent.com/nodejs/node/v15.3.0/lib/internal/modules/esm/get_format.js + +'use strict'; +const { + RegExpPrototypeExec, + StringPrototypeStartsWith, +} = require('./node-primordials'); +const { extname } = require('path'); +const { getOptionValue } = require('./node-options'); + +const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(s => parseInt(s, 10)); +const experimentalJsonModules = + nodeMajor > 17 + || (nodeMajor === 17 && nodeMinor >= 5) + || (nodeMajor === 16 && nodeMinor >= 15) + || getOptionValue('--experimental-json-modules'); +const experimentalWasmModules = getOptionValue('--experimental-wasm-modules'); +const { URL, fileURLToPath } = require('url'); +const { ERR_UNKNOWN_FILE_EXTENSION } = require('./node-internal-errors').codes; + +const extensionFormatMap = { + '__proto__': null, + '.cjs': 'commonjs', + '.js': 'module', + '.mjs': 'module' +}; + +const legacyExtensionFormatMap = { + '__proto__': null, + '.cjs': 'commonjs', + '.js': 'commonjs', + '.json': 'commonjs', + '.mjs': 'module', + '.node': 'commonjs' +}; + +if (experimentalWasmModules) + extensionFormatMap['.wasm'] = legacyExtensionFormatMap['.wasm'] = 'wasm'; + +if (experimentalJsonModules) + extensionFormatMap['.json'] = legacyExtensionFormatMap['.json'] = 'json'; + +/** + * + * @param {'node' | 'explicit'} [tsNodeExperimentalSpecifierResolution] + * @param {ReturnType< + * typeof import('../dist-raw/node-internal-modules-esm-resolve').createResolve + * >} nodeEsmResolver + */ +function createGetFormat(tsNodeExperimentalSpecifierResolution, nodeEsmResolver) { +// const experimentalSpeciferResolution = tsNodeExperimentalSpecifierResolution ?? getOptionValue('--experimental-specifier-resolution'); +let experimentalSpeciferResolution = tsNodeExperimentalSpecifierResolution != null ? tsNodeExperimentalSpecifierResolution : getOptionValue('--experimental-specifier-resolution'); +const { getPackageType } = nodeEsmResolver; + +/** + * @param {string} url + * @param {{}} context + * @param {any} defaultGetFormatUnused + * @returns {ReturnType} + */ +function defaultGetFormat(url, context, defaultGetFormatUnused) { + if (StringPrototypeStartsWith(url, 'node:')) { + return { format: 'builtin' }; + } + const parsed = new URL(url); + if (parsed.protocol === 'data:') { + const [ , mime ] = RegExpPrototypeExec( + /^([^/]+\/[^;,]+)(?:[^,]*?)(;base64)?,/, + parsed.pathname, + ) || [ null, null, null ]; + const format = ({ + '__proto__': null, + 'text/javascript': 'module', + 'application/json': experimentalJsonModules ? 'json' : null, + 'application/wasm': experimentalWasmModules ? 'wasm' : null + })[mime] || null; + return { format }; + } else if (parsed.protocol === 'file:') { + const ext = extname(parsed.pathname); + let format; + if (ext === '.js') { + format = getPackageType(parsed.href) === 'module' ? 'module' : 'commonjs'; + } else { + format = extensionFormatMap[ext]; + } + if (!format) { + if (experimentalSpeciferResolution === 'node') { + process.emitWarning( + 'The Node.js specifier resolution in ESM is experimental.', + 'ExperimentalWarning'); + format = legacyExtensionFormatMap[ext]; + } else { + throw new ERR_UNKNOWN_FILE_EXTENSION(ext, fileURLToPath(url)); + } + } + return { format: format || null }; + } + return { format: null }; +} + +return {defaultGetFormat}; +} + +module.exports = { + createGetFormat +}; diff --git a/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js b/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js new file mode 100644 index 0000000..2fbd832 --- /dev/null +++ b/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js @@ -0,0 +1,962 @@ +// Copied from https://raw.githubusercontent.com/nodejs/node/v15.3.0/lib/internal/modules/esm/resolve.js + +'use strict'; + +const {versionGteLt} = require('../dist/util'); + +// Test for node >14.13.1 || (>=12.20.0 && <13) +const builtinModuleProtocol = + versionGteLt(process.versions.node, '14.13.1') || + versionGteLt(process.versions.node, '12.20.0', '13.0.0') + ? 'node:' + : 'nodejs:'; + +const { + ArrayIsArray, + ArrayPrototypeJoin, + ArrayPrototypeShift, + JSONParse, + JSONStringify, + ObjectFreeze, + ObjectGetOwnPropertyNames, + ObjectPrototypeHasOwnProperty, + RegExpPrototypeTest, + SafeMap, + SafeSet, + StringPrototypeEndsWith, + StringPrototypeIndexOf, + StringPrototypeLastIndexOf, + StringPrototypeReplace, + StringPrototypeSlice, + StringPrototypeSplit, + StringPrototypeStartsWith, + StringPrototypeSubstr, +} = require('./node-primordials'); + +// const internalFS = require('internal/fs/utils'); +const Module = require('module'); +const { NativeModule } = require('./node-nativemodule'); +const { + realpathSync, + statSync, + Stats, +} = require('fs'); +// const { getOptionValue } = require('internal/options'); +const { getOptionValue } = require('./node-options'); +// // Do not eagerly grab .manifest, it may be in TDZ +// const policy = getOptionValue('--experimental-policy') ? +// require('internal/process/policy') : +// null; +// disabled for now. I am not sure if/how we should support this +const policy = null; +const { sep, relative } = require('path'); +const preserveSymlinks = getOptionValue('--preserve-symlinks'); +const preserveSymlinksMain = getOptionValue('--preserve-symlinks-main'); +const typeFlag = getOptionValue('--input-type'); +// const { URL, pathToFileURL, fileURLToPath } = require('internal/url'); +const { URL, pathToFileURL, fileURLToPath } = require('url'); +const { + ERR_INPUT_TYPE_NOT_ALLOWED, + ERR_INVALID_ARG_VALUE, + ERR_INVALID_MODULE_SPECIFIER, + ERR_INVALID_PACKAGE_CONFIG, + ERR_INVALID_PACKAGE_TARGET, + ERR_MANIFEST_DEPENDENCY_MISSING, + ERR_MODULE_NOT_FOUND, + ERR_PACKAGE_IMPORT_NOT_DEFINED, + ERR_PACKAGE_PATH_NOT_EXPORTED, + ERR_UNSUPPORTED_DIR_IMPORT, + ERR_UNSUPPORTED_ESM_URL_SCHEME, +// } = require('internal/errors').codes; +} = require('./node-internal-errors').codes; + +// const { Module: CJSModule } = require('internal/modules/cjs/loader'); +const CJSModule = Module; + +// const packageJsonReader = require('internal/modules/package_json_reader'); +const packageJsonReader = require('./node-internal-modules-package_json_reader'); +const userConditions = getOptionValue('--conditions'); +const DEFAULT_CONDITIONS = ObjectFreeze(['node', 'import', ...userConditions]); +const DEFAULT_CONDITIONS_SET = new SafeSet(DEFAULT_CONDITIONS); + +const pendingDeprecation = getOptionValue('--pending-deprecation'); + +/** + * @param {{ + * extensions: import('../src/file-extensions').Extensions, + * preferTsExts: boolean | undefined; + * tsNodeExperimentalSpecifierResolution: import('../src/index').ExperimentalSpecifierResolution | undefined; + * }} opts + */ +function createResolve(opts) { +// TODO receive cached fs implementations here +const {preferTsExts, tsNodeExperimentalSpecifierResolution, extensions} = opts; +const esrnExtensions = extensions.experimentalSpecifierResolutionAddsIfOmitted; +const {legacyMainResolveAddsIfOmitted, replacementsForCjs, replacementsForJs, replacementsForMjs, replacementsForJsx} = extensions; +// const experimentalSpecifierResolution = tsNodeExperimentalSpecifierResolution ?? getOptionValue('--experimental-specifier-resolution'); +const experimentalSpecifierResolution = tsNodeExperimentalSpecifierResolution != null ? tsNodeExperimentalSpecifierResolution : getOptionValue('--experimental-specifier-resolution'); + +const emittedPackageWarnings = new SafeSet(); +function emitFolderMapDeprecation(match, pjsonUrl, isExports, base) { + const pjsonPath = fileURLToPath(pjsonUrl); + if (!pendingDeprecation) { + const nodeModulesIndex = StringPrototypeLastIndexOf(pjsonPath, + '/node_modules/'); + if (nodeModulesIndex !== -1) { + const afterNodeModulesPath = StringPrototypeSlice(pjsonPath, + nodeModulesIndex + 14, + -13); + try { + const { packageSubpath } = parsePackageName(afterNodeModulesPath); + if (packageSubpath === '.') + return; + } catch {} + } + } + if (emittedPackageWarnings.has(pjsonPath + '|' + match)) + return; + emittedPackageWarnings.add(pjsonPath + '|' + match); + process.emitWarning( + `Use of deprecated folder mapping "${match}" in the ${isExports ? + '"exports"' : '"imports"'} field module resolution of the package at ${ + pjsonPath}${base ? ` imported from ${fileURLToPath(base)}` : ''}.\n` + + `Update this package.json to use a subpath pattern like "${match}*".`, + 'DeprecationWarning', + 'DEP0148' + ); +} + +function getConditionsSet(conditions) { + if (conditions !== undefined && conditions !== DEFAULT_CONDITIONS) { + if (!ArrayIsArray(conditions)) { + throw new ERR_INVALID_ARG_VALUE('conditions', conditions, + 'expected an array'); + } + return new SafeSet(conditions); + } + return DEFAULT_CONDITIONS_SET; +} + +const realpathCache = new SafeMap(); +const packageJSONCache = new SafeMap(); /* string -> PackageConfig */ + +const statSupportsThrowIfNoEntry = versionGteLt(process.versions.node, '15.3.0') || + versionGteLt(process.versions.node, '14.17.0', '15.0.0'); +const tryStatSync = statSupportsThrowIfNoEntry ? tryStatSyncWithoutErrors : tryStatSyncWithErrors; +const statsIfNotFound = new Stats(); +function tryStatSyncWithoutErrors(path) { + const stats = statSync(path, { throwIfNoEntry: false }); + if(stats != null) return stats; + return statsIfNotFound; +} +function tryStatSyncWithErrors(path) { + try { + return statSync(path); + } catch { + return statsIfNotFound; + } +} + +function getPackageConfig(path, specifier, base) { + const existing = packageJSONCache.get(path); + if (existing !== undefined) { + return existing; + } + const source = packageJsonReader.read(path).string; + if (source === undefined) { + const packageConfig = { + pjsonPath: path, + exists: false, + main: undefined, + name: undefined, + type: 'none', + exports: undefined, + imports: undefined, + }; + packageJSONCache.set(path, packageConfig); + return packageConfig; + } + + let packageJSON; + try { + packageJSON = JSONParse(source); + } catch (error) { + throw new ERR_INVALID_PACKAGE_CONFIG( + path, + (base ? `"${specifier}" from ` : '') + fileURLToPath(base || specifier), + error.message + ); + } + + let { imports, main, name, type } = packageJSON; + const { exports } = packageJSON; + if (typeof imports !== 'object' || imports === null) imports = undefined; + if (typeof main !== 'string') main = undefined; + if (typeof name !== 'string') name = undefined; + // Ignore unknown types for forwards compatibility + if (type !== 'module' && type !== 'commonjs') type = 'none'; + + const packageConfig = { + pjsonPath: path, + exists: true, + main, + name, + type, + exports, + imports, + }; + packageJSONCache.set(path, packageConfig); + return packageConfig; +} + +function getPackageScopeConfig(resolved) { + let packageJSONUrl = new URL('./package.json', resolved); + while (true) { + const packageJSONPath = packageJSONUrl.pathname; + if (StringPrototypeEndsWith(packageJSONPath, 'node_modules/package.json')) + break; + const packageConfig = getPackageConfig(fileURLToPath(packageJSONUrl), + resolved); + if (packageConfig.exists) return packageConfig; + + const lastPackageJSONUrl = packageJSONUrl; + packageJSONUrl = new URL('../package.json', packageJSONUrl); + + // Terminates at root where ../package.json equals ../../package.json + // (can't just check "/package.json" for Windows support). + if (packageJSONUrl.pathname === lastPackageJSONUrl.pathname) break; + } + const packageJSONPath = fileURLToPath(packageJSONUrl); + const packageConfig = { + pjsonPath: packageJSONPath, + exists: false, + main: undefined, + name: undefined, + type: 'none', + exports: undefined, + imports: undefined, + }; + packageJSONCache.set(packageJSONPath, packageConfig); + return packageConfig; +} + +/* + * Legacy CommonJS main resolution: + * 1. let M = pkg_url + (json main field) + * 2. TRY(M, M.js, M.json, M.node) + * 3. TRY(M/index.js, M/index.json, M/index.node) + * 4. TRY(pkg_url/index.js, pkg_url/index.json, pkg_url/index.node) + * 5. NOT_FOUND + */ +function fileExists(url) { + return tryStatSync(fileURLToPath(url)).isFile(); +} + +function legacyMainResolve(packageJSONUrl, packageConfig, base) { + let guess; + if (packageConfig.main !== undefined) { + // Note: fs check redundances will be handled by Descriptor cache here. + if(guess = resolveReplacementExtensions(new URL(`./${packageConfig.main}`, packageJSONUrl))) { + return guess; + } + if (fileExists(guess = new URL(`./${packageConfig.main}`, + packageJSONUrl))) { + return guess; + } + for(const extension of legacyMainResolveAddsIfOmitted) { + if (fileExists(guess = new URL(`./${packageConfig.main}${extension}`, + packageJSONUrl))) { + return guess; + } + } + for(const extension of legacyMainResolveAddsIfOmitted) { + if (fileExists(guess = new URL(`./${packageConfig.main}/index${extension}`, + packageJSONUrl))) { + return guess; + } + } + // Fallthrough. + } + for(const extension of legacyMainResolveAddsIfOmitted) { + if (fileExists(guess = new URL(`./index${extension}`, packageJSONUrl))) { + return guess; + } + } + // Not found. + throw new ERR_MODULE_NOT_FOUND( + fileURLToPath(new URL('.', packageJSONUrl)), fileURLToPath(base)); +} + +/** attempts replacement extensions, then tries exact name, then attempts appending extensions */ +function resolveExtensionsWithTryExactName(search) { + const resolvedReplacementExtension = resolveReplacementExtensions(search); + if(resolvedReplacementExtension) return resolvedReplacementExtension; + if (fileExists(search)) return search; + return resolveExtensions(search); +} + +// This appends missing extensions +function resolveExtensions(search) { + for (let i = 0; i < esrnExtensions.length; i++) { + const extension = esrnExtensions[i]; + const guess = new URL(`${search.pathname}${extension}`, search); + if (fileExists(guess)) return guess; + } + return undefined; +} + +/** This replaces JS with TS extensions */ +function resolveReplacementExtensions(search) { + const lastDotIndex = search.pathname.lastIndexOf('.'); + if(lastDotIndex >= 0) { + const ext = search.pathname.slice(lastDotIndex); + if (ext === '.js' || ext === '.jsx' || ext === '.mjs' || ext === '.cjs') { + const pathnameWithoutExtension = search.pathname.slice(0, lastDotIndex); + const replacementExts = + ext === '.js' ? replacementsForJs + : ext === '.jsx' ? replacementsForJsx + : ext === '.mjs' ? replacementsForMjs + : replacementsForCjs; + const guess = new URL(search.toString()); + for (let i = 0; i < replacementExts.length; i++) { + const extension = replacementExts[i]; + guess.pathname = `${pathnameWithoutExtension}${extension}`; + if (fileExists(guess)) return guess; + } + } + } + return undefined; +} + +function resolveIndex(search) { + return resolveExtensions(new URL('index', search)); +} + +const encodedSepRegEx = /%2F|%2C/i; +function finalizeResolution(resolved, base) { + if (RegExpPrototypeTest(encodedSepRegEx, resolved.pathname)) + throw new ERR_INVALID_MODULE_SPECIFIER( + resolved.pathname, 'must not include encoded "/" or "\\" characters', + fileURLToPath(base)); + + if (experimentalSpecifierResolution === 'node') { + const path = fileURLToPath(resolved); + let file = resolveExtensionsWithTryExactName(resolved); + if (file !== undefined) return file; + if (!StringPrototypeEndsWith(path, '/')) { + file = resolveIndex(new URL(`${resolved}/`)); + if (file !== undefined) return file; + } else { + return resolveIndex(resolved) || resolved; + } + throw new ERR_MODULE_NOT_FOUND( + resolved.pathname, fileURLToPath(base), 'module'); + } + + const file = resolveReplacementExtensions(resolved) || resolved; + const path = fileURLToPath(file); + + const stats = tryStatSync(StringPrototypeEndsWith(path, '/') ? + StringPrototypeSlice(path, -1) : path); + if (stats.isDirectory()) { + const err = new ERR_UNSUPPORTED_DIR_IMPORT(path, fileURLToPath(base)); + err.url = String(resolved); + throw err; + } else if (!stats.isFile()) { + throw new ERR_MODULE_NOT_FOUND( + path || resolved.pathname, fileURLToPath(base), 'module'); + } + + return file; +} + +function throwImportNotDefined(specifier, packageJSONUrl, base) { + throw new ERR_PACKAGE_IMPORT_NOT_DEFINED( + specifier, packageJSONUrl && fileURLToPath(new URL('.', packageJSONUrl)), + fileURLToPath(base)); +} + +function throwExportsNotFound(subpath, packageJSONUrl, base) { + throw new ERR_PACKAGE_PATH_NOT_EXPORTED( + fileURLToPath(new URL('.', packageJSONUrl)), subpath, + base && fileURLToPath(base)); +} + +function throwInvalidSubpath(subpath, packageJSONUrl, internal, base) { + const reason = `request is not a valid subpath for the "${internal ? + 'imports' : 'exports'}" resolution of ${fileURLToPath(packageJSONUrl)}`; + throw new ERR_INVALID_MODULE_SPECIFIER(subpath, reason, + base && fileURLToPath(base)); +} + +function throwInvalidPackageTarget( + subpath, target, packageJSONUrl, internal, base) { + if (typeof target === 'object' && target !== null) { + target = JSONStringify(target, null, ''); + } else { + target = `${target}`; + } + throw new ERR_INVALID_PACKAGE_TARGET( + fileURLToPath(new URL('.', packageJSONUrl)), subpath, target, + internal, base && fileURLToPath(base)); +} + +const invalidSegmentRegEx = /(^|\\|\/)(\.\.?|node_modules)(\\|\/|$)/; +const patternRegEx = /\*/g; + +function resolvePackageTargetString( + target, subpath, match, packageJSONUrl, base, pattern, internal, conditions) { + if (subpath !== '' && !pattern && target[target.length - 1] !== '/') + throwInvalidPackageTarget(match, target, packageJSONUrl, internal, base); + + if (!StringPrototypeStartsWith(target, './')) { + if (internal && !StringPrototypeStartsWith(target, '../') && + !StringPrototypeStartsWith(target, '/')) { + let isURL = false; + try { + new URL(target); + isURL = true; + } catch {} + if (!isURL) { + const exportTarget = pattern ? + StringPrototypeReplace(target, patternRegEx, subpath) : + target + subpath; + return packageResolve(exportTarget, packageJSONUrl, conditions); + } + } + throwInvalidPackageTarget(match, target, packageJSONUrl, internal, base); + } + + if (RegExpPrototypeTest(invalidSegmentRegEx, StringPrototypeSlice(target, 2))) + throwInvalidPackageTarget(match, target, packageJSONUrl, internal, base); + + const resolved = new URL(target, packageJSONUrl); + const resolvedPath = resolved.pathname; + const packagePath = new URL('.', packageJSONUrl).pathname; + + if (!StringPrototypeStartsWith(resolvedPath, packagePath)) + throwInvalidPackageTarget(match, target, packageJSONUrl, internal, base); + + if (subpath === '') return resolved; + + if (RegExpPrototypeTest(invalidSegmentRegEx, subpath)) + throwInvalidSubpath(match + subpath, packageJSONUrl, internal, base); + + if (pattern) + return new URL(StringPrototypeReplace(resolved.href, patternRegEx, + subpath)); + return new URL(subpath, resolved); +} + +/** + * @param {string} key + * @returns {boolean} + */ +function isArrayIndex(key) { + const keyNum = +key; + if (`${keyNum}` !== key) return false; + return keyNum >= 0 && keyNum < 0xFFFF_FFFF; +} + +function resolvePackageTarget(packageJSONUrl, target, subpath, packageSubpath, + base, pattern, internal, conditions) { + if (typeof target === 'string') { + return resolvePackageTargetString( + target, subpath, packageSubpath, packageJSONUrl, base, pattern, internal, + conditions); + } else if (ArrayIsArray(target)) { + if (target.length === 0) + return null; + + let lastException; + for (let i = 0; i < target.length; i++) { + const targetItem = target[i]; + let resolved; + try { + resolved = resolvePackageTarget( + packageJSONUrl, targetItem, subpath, packageSubpath, base, pattern, + internal, conditions); + } catch (e) { + lastException = e; + if (e.code === 'ERR_INVALID_PACKAGE_TARGET') + continue; + throw e; + } + if (resolved === undefined) + continue; + if (resolved === null) { + lastException = null; + continue; + } + return resolved; + } + if (lastException === undefined || lastException === null) + return lastException; + throw lastException; + } else if (typeof target === 'object' && target !== null) { + const keys = ObjectGetOwnPropertyNames(target); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + if (isArrayIndex(key)) { + throw new ERR_INVALID_PACKAGE_CONFIG( + fileURLToPath(packageJSONUrl), base, + '"exports" cannot contain numeric property keys.'); + } + } + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + if (key === 'default' || conditions.has(key)) { + const conditionalTarget = target[key]; + const resolved = resolvePackageTarget( + packageJSONUrl, conditionalTarget, subpath, packageSubpath, base, + pattern, internal, conditions); + if (resolved === undefined) + continue; + return resolved; + } + } + return undefined; + } else if (target === null) { + return null; + } + throwInvalidPackageTarget(packageSubpath, target, packageJSONUrl, internal, + base); +} + +function isConditionalExportsMainSugar(exports, packageJSONUrl, base) { + if (typeof exports === 'string' || ArrayIsArray(exports)) return true; + if (typeof exports !== 'object' || exports === null) return false; + + const keys = ObjectGetOwnPropertyNames(exports); + let isConditionalSugar = false; + let i = 0; + for (let j = 0; j < keys.length; j++) { + const key = keys[j]; + const curIsConditionalSugar = key === '' || key[0] !== '.'; + if (i++ === 0) { + isConditionalSugar = curIsConditionalSugar; + } else if (isConditionalSugar !== curIsConditionalSugar) { + throw new ERR_INVALID_PACKAGE_CONFIG( + fileURLToPath(packageJSONUrl), base, + '"exports" cannot contain some keys starting with \'.\' and some not.' + + ' The exports object must either be an object of package subpath keys' + + ' or an object of main entry condition name keys only.'); + } + } + return isConditionalSugar; +} + +/** + * @param {URL} packageJSONUrl + * @param {string} packageSubpath + * @param {object} packageConfig + * @param {string} base + * @param {Set} conditions + * @returns {{resolved: URL, exact: boolean}} + */ +function packageExportsResolve( + packageJSONUrl, packageSubpath, packageConfig, base, conditions) { + let exports = packageConfig.exports; + if (isConditionalExportsMainSugar(exports, packageJSONUrl, base)) + exports = { '.': exports }; + + if (ObjectPrototypeHasOwnProperty(exports, packageSubpath)) { + const target = exports[packageSubpath]; + const resolved = resolvePackageTarget( + packageJSONUrl, target, '', packageSubpath, base, false, false, conditions + ); + if (resolved === null || resolved === undefined) + throwExportsNotFound(packageSubpath, packageJSONUrl, base); + return { resolved, exact: true }; + } + + let bestMatch = ''; + const keys = ObjectGetOwnPropertyNames(exports); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + if (key[key.length - 1] === '*' && + StringPrototypeStartsWith(packageSubpath, + StringPrototypeSlice(key, 0, -1)) && + packageSubpath.length >= key.length && + key.length > bestMatch.length) { + bestMatch = key; + } else if (key[key.length - 1] === '/' && + StringPrototypeStartsWith(packageSubpath, key) && + key.length > bestMatch.length) { + bestMatch = key; + } + } + + if (bestMatch) { + const target = exports[bestMatch]; + const pattern = bestMatch[bestMatch.length - 1] === '*'; + const subpath = StringPrototypeSubstr(packageSubpath, bestMatch.length - + (pattern ? 1 : 0)); + const resolved = resolvePackageTarget(packageJSONUrl, target, subpath, + bestMatch, base, pattern, false, + conditions); + if (resolved === null || resolved === undefined) + throwExportsNotFound(packageSubpath, packageJSONUrl, base); + if (!pattern) + emitFolderMapDeprecation(bestMatch, packageJSONUrl, true, base); + return { resolved, exact: pattern }; + } + + throwExportsNotFound(packageSubpath, packageJSONUrl, base); +} + +function packageImportsResolve(name, base, conditions) { + if (name === '#' || StringPrototypeStartsWith(name, '#/')) { + const reason = 'is not a valid internal imports specifier name'; + throw new ERR_INVALID_MODULE_SPECIFIER(name, reason, fileURLToPath(base)); + } + let packageJSONUrl; + const packageConfig = getPackageScopeConfig(base); + if (packageConfig.exists) { + packageJSONUrl = pathToFileURL(packageConfig.pjsonPath); + const imports = packageConfig.imports; + if (imports) { + if (ObjectPrototypeHasOwnProperty(imports, name)) { + const resolved = resolvePackageTarget( + packageJSONUrl, imports[name], '', name, base, false, true, conditions + ); + if (resolved !== null) + return { resolved, exact: true }; + } else { + let bestMatch = ''; + const keys = ObjectGetOwnPropertyNames(imports); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + if (key[key.length - 1] === '*' && + StringPrototypeStartsWith(name, + StringPrototypeSlice(key, 0, -1)) && + name.length >= key.length && + key.length > bestMatch.length) { + bestMatch = key; + } else if (key[key.length - 1] === '/' && + StringPrototypeStartsWith(name, key) && + key.length > bestMatch.length) { + bestMatch = key; + } + } + + if (bestMatch) { + const target = imports[bestMatch]; + const pattern = bestMatch[bestMatch.length - 1] === '*'; + const subpath = StringPrototypeSubstr(name, bestMatch.length - + (pattern ? 1 : 0)); + const resolved = resolvePackageTarget( + packageJSONUrl, target, subpath, bestMatch, base, pattern, true, + conditions); + if (resolved !== null) { + if (!pattern) + emitFolderMapDeprecation(bestMatch, packageJSONUrl, false, base); + return { resolved, exact: pattern }; + } + } + } + } + } + throwImportNotDefined(name, packageJSONUrl, base); +} + +function getPackageType(url) { + const packageConfig = getPackageScopeConfig(url); + return packageConfig.type; +} + +function parsePackageName(specifier, base) { + let separatorIndex = StringPrototypeIndexOf(specifier, '/'); + let validPackageName = true; + let isScoped = false; + if (specifier[0] === '@') { + isScoped = true; + if (separatorIndex === -1 || specifier.length === 0) { + validPackageName = false; + } else { + separatorIndex = StringPrototypeIndexOf( + specifier, '/', separatorIndex + 1); + } + } + + const packageName = separatorIndex === -1 ? + specifier : StringPrototypeSlice(specifier, 0, separatorIndex); + + // Package name cannot have leading . and cannot have percent-encoding or + // separators. + for (let i = 0; i < packageName.length; i++) { + if (packageName[i] === '%' || packageName[i] === '\\') { + validPackageName = false; + break; + } + } + + if (!validPackageName) { + throw new ERR_INVALID_MODULE_SPECIFIER( + specifier, 'is not a valid package name', fileURLToPath(base)); + } + + const packageSubpath = '.' + (separatorIndex === -1 ? '' : + StringPrototypeSlice(specifier, separatorIndex)); + + return { packageName, packageSubpath, isScoped }; +} + +/** + * @param {string} specifier + * @param {URL} base + * @param {Set} conditions + * @returns {URL} + */ +function packageResolve(specifier, base, conditions) { + const { packageName, packageSubpath, isScoped } = + parsePackageName(specifier, base); + + // ResolveSelf + const packageConfig = getPackageScopeConfig(base); + if (packageConfig.exists) { + const packageJSONUrl = pathToFileURL(packageConfig.pjsonPath); + if (packageConfig.name === packageName && + packageConfig.exports !== undefined && packageConfig.exports !== null) { + return packageExportsResolve( + packageJSONUrl, packageSubpath, packageConfig, base, conditions + ).resolved; + } + } + + let packageJSONUrl = + new URL('./node_modules/' + packageName + '/package.json', base); + let packageJSONPath = fileURLToPath(packageJSONUrl); + let lastPath; + do { + const stat = tryStatSync(StringPrototypeSlice(packageJSONPath, 0, + packageJSONPath.length - 13)); + if (!stat.isDirectory()) { + lastPath = packageJSONPath; + packageJSONUrl = new URL((isScoped ? + '../../../../node_modules/' : '../../../node_modules/') + + packageName + '/package.json', packageJSONUrl); + packageJSONPath = fileURLToPath(packageJSONUrl); + continue; + } + + // Package match. + const packageConfig = getPackageConfig(packageJSONPath, specifier, base); + if (packageConfig.exports !== undefined && packageConfig.exports !== null) + return packageExportsResolve( + packageJSONUrl, packageSubpath, packageConfig, base, conditions + ).resolved; + if (packageSubpath === '.') + return legacyMainResolve(packageJSONUrl, packageConfig, base); + return new URL(packageSubpath, packageJSONUrl); + // Cross-platform root check. + } while (packageJSONPath.length !== lastPath.length); + + // eslint can't handle the above code. + // eslint-disable-next-line no-unreachable + throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base)); +} + +function isBareSpecifier(specifier) { + return specifier[0] && specifier[0] !== '/' && specifier[0] !== '.'; +} + +function isRelativeSpecifier(specifier) { + if (specifier[0] === '.') { + if (specifier.length === 1 || specifier[1] === '/') return true; + if (specifier[1] === '.') { + if (specifier.length === 2 || specifier[2] === '/') return true; + } + } + return false; +} + +function shouldBeTreatedAsRelativeOrAbsolutePath(specifier) { + if (specifier === '') return false; + if (specifier[0] === '/') return true; + return isRelativeSpecifier(specifier); +} + +/** + * @param {string} specifier + * @param {URL} base + * @param {Set} conditions + * @returns {URL} + */ +function moduleResolve(specifier, base, conditions) { + // Order swapped from spec for minor perf gain. + // Ok since relative URLs cannot parse as URLs. + let resolved; + if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) { + resolved = new URL(specifier, base); + } else if (specifier[0] === '#') { + ({ resolved } = packageImportsResolve(specifier, base, conditions)); + } else { + try { + resolved = new URL(specifier); + } catch { + resolved = packageResolve(specifier, base, conditions); + } + } + return finalizeResolution(resolved, base); +} + +/** + * Try to resolve an import as a CommonJS module + * @param {string} specifier + * @param {string} parentURL + * @returns {boolean|string} + */ +function resolveAsCommonJS(specifier, parentURL) { + try { + const parent = fileURLToPath(parentURL); + const tmpModule = new CJSModule(parent, null); + tmpModule.paths = CJSModule._nodeModulePaths(parent); + + let found = CJSModule._resolveFilename(specifier, tmpModule, false); + + // If it is a relative specifier return the relative path + // to the parent + if (isRelativeSpecifier(specifier)) { + found = relative(parent, found); + // Add '.separator if the path does not start with '..separator' + // This should be a safe assumption because when loading + // esm modules there should be always a file specified so + // there should not be a specifier like '..' or '.' + if (!StringPrototypeStartsWith(found, `..${sep}`)) { + found = `.${sep}${found}`; + } + } else if (isBareSpecifier(specifier)) { + // If it is a bare specifier return the relative path within the + // module + const pkg = StringPrototypeSplit(specifier, '/')[0]; + const index = StringPrototypeIndexOf(found, pkg); + if (index !== -1) { + found = StringPrototypeSlice(found, index); + } + } + // Normalize the path separator to give a valid suggestion + // on Windows + if (process.platform === 'win32') { + found = StringPrototypeReplace(found, new RegExp(`\\${sep}`, 'g'), '/'); + } + return found; + } catch { + return false; + } +} + +function defaultResolve(specifier, context = {}, defaultResolveUnused) { + let { parentURL, conditions } = context; + if (parentURL && policy != null && policy.manifest) { + const redirects = policy.manifest.getDependencyMapper(parentURL); + if (redirects) { + const { resolve, reaction } = redirects; + const destination = resolve(specifier, new SafeSet(conditions)); + let missing = true; + if (destination === true) { + missing = false; + } else if (destination) { + const href = destination.href; + return { url: href }; + } + if (missing) { + reaction(new ERR_MANIFEST_DEPENDENCY_MISSING( + parentURL, + specifier, + ArrayPrototypeJoin([...conditions], ', ')) + ); + } + } + } + let parsed; + try { + parsed = new URL(specifier); + if (parsed.protocol === 'data:') { + return { + url: specifier + }; + } + } catch {} + if (parsed && parsed.protocol === builtinModuleProtocol) + return { url: specifier }; + if (parsed && parsed.protocol !== 'file:' && parsed.protocol !== 'data:') + throw new ERR_UNSUPPORTED_ESM_URL_SCHEME(parsed); + if (NativeModule.canBeRequiredByUsers(specifier)) { + return { + url: builtinModuleProtocol + specifier + }; + } + if (parentURL && StringPrototypeStartsWith(parentURL, 'data:')) { + // This is gonna blow up, we want the error + new URL(specifier, parentURL); + } + + const isMain = parentURL === undefined; + if (isMain) { + parentURL = pathToFileURL(`${process.cwd()}/`).href; + + // This is the initial entry point to the program, and --input-type has + // been passed as an option; but --input-type can only be used with + // --eval, --print or STDIN string input. It is not allowed with file + // input, to avoid user confusion over how expansive the effect of the + // flag should be (i.e. entry point only, package scope surrounding the + // entry point, etc.). + if (typeFlag) + throw new ERR_INPUT_TYPE_NOT_ALLOWED(); + } + + conditions = getConditionsSet(conditions); + let url; + try { + url = moduleResolve(specifier, parentURL, conditions); + } catch (error) { + // Try to give the user a hint of what would have been the + // resolved CommonJS module + if (error.code === 'ERR_MODULE_NOT_FOUND' || + error.code === 'ERR_UNSUPPORTED_DIR_IMPORT') { + if (StringPrototypeStartsWith(specifier, 'file://')) { + specifier = fileURLToPath(specifier); + } + const found = resolveAsCommonJS(specifier, parentURL); + if (found) { + // Modify the stack and message string to include the hint + const lines = StringPrototypeSplit(error.stack, '\n'); + const hint = `Did you mean to import ${found}?`; + error.stack = + ArrayPrototypeShift(lines) + '\n' + + hint + '\n' + + ArrayPrototypeJoin(lines, '\n'); + error.message += `\n${hint}`; + } + } + throw error; + } + + if (isMain ? !preserveSymlinksMain : !preserveSymlinks) { + const urlPath = fileURLToPath(url); + const real = realpathSync(urlPath, { + // [internalFS.realpathCacheKey]: realpathCache + }); + const old = url; + url = pathToFileURL( + real + (StringPrototypeEndsWith(urlPath, sep) ? '/' : '')); + url.search = old.search; + url.hash = old.hash; + } + + return { url: `${url}` }; +} + +return { + DEFAULT_CONDITIONS, + defaultResolve, + encodedSepRegEx, + getPackageType, + packageExportsResolve, + packageImportsResolve +}; +} +module.exports = { + createResolve +}; diff --git a/node_modules/ts-node/dist-raw/node-internal-modules-package_json_reader.js b/node_modules/ts-node/dist-raw/node-internal-modules-package_json_reader.js new file mode 100644 index 0000000..9266bc1 --- /dev/null +++ b/node_modules/ts-node/dist-raw/node-internal-modules-package_json_reader.js @@ -0,0 +1,44 @@ +// copied from https://github.com/nodejs/node/blob/v15.3.0/lib/internal/modules/package_json_reader.js +'use strict'; + +const { SafeMap } = require('./node-primordials'); +const { internalModuleReadJSON } = require('./node-internalBinding-fs'); +const { pathToFileURL } = require('url'); +const { toNamespacedPath } = require('path'); +// const { getOptionValue } = require('./node-options'); + +const cache = new SafeMap(); + +let manifest; + +/** + * @param {string} jsonPath + * @return {{string: string, containsKeys: boolean}} + */ +function read(jsonPath) { + if (cache.has(jsonPath)) { + return cache.get(jsonPath); + } + + const [string, containsKeys] = internalModuleReadJSON( + toNamespacedPath(jsonPath) + ); + const result = { string, containsKeys }; + if (string !== undefined) { + if (manifest === undefined) { + // manifest = getOptionValue('--experimental-policy') ? + // require('internal/process/policy').manifest : + // null; + // disabled for now. I am not sure if/how we should support this + manifest = null; + } + if (manifest !== null) { + const jsonURL = pathToFileURL(jsonPath); + manifest.assertIntegrity(jsonURL, string); + } + } + cache.set(jsonPath, result); + return result; +} + +module.exports = { read }; diff --git a/node_modules/ts-node/dist-raw/node-internal-repl-await.js b/node_modules/ts-node/dist-raw/node-internal-repl-await.js new file mode 100644 index 0000000..85bff2d --- /dev/null +++ b/node_modules/ts-node/dist-raw/node-internal-repl-await.js @@ -0,0 +1,254 @@ +// copied from https://github.com/nodejs/node/blob/88799930794045795e8abac874730f9eba7e2300/lib/internal/repl/await.js +'use strict'; + +const { + ArrayFrom, + ArrayPrototypeForEach, + ArrayPrototypeIncludes, + ArrayPrototypeJoin, + ArrayPrototypePop, + ArrayPrototypePush, + FunctionPrototype, + ObjectKeys, + RegExpPrototypeSymbolReplace, + StringPrototypeEndsWith, + StringPrototypeIncludes, + StringPrototypeIndexOf, + StringPrototypeRepeat, + StringPrototypeSplit, + StringPrototypeStartsWith, + SyntaxError, +} = require('./node-primordials'); + +const parser = require('acorn').Parser; +const walk = require('acorn-walk'); +const { Recoverable } = require('repl'); + +function isTopLevelDeclaration(state) { + return state.ancestors[state.ancestors.length - 2] === state.body; +} + +const noop = FunctionPrototype; +const visitorsWithoutAncestors = { + ClassDeclaration(node, state, c) { + if (isTopLevelDeclaration(state)) { + state.prepend(node, `${node.id.name}=`); + ArrayPrototypePush( + state.hoistedDeclarationStatements, + `let ${node.id.name}; ` + ); + } + + walk.base.ClassDeclaration(node, state, c); + }, + ForOfStatement(node, state, c) { + if (node.await === true) { + state.containsAwait = true; + } + walk.base.ForOfStatement(node, state, c); + }, + FunctionDeclaration(node, state, c) { + state.prepend(node, `${node.id.name}=`); + ArrayPrototypePush( + state.hoistedDeclarationStatements, + `var ${node.id.name}; ` + ); + }, + FunctionExpression: noop, + ArrowFunctionExpression: noop, + MethodDefinition: noop, + AwaitExpression(node, state, c) { + state.containsAwait = true; + walk.base.AwaitExpression(node, state, c); + }, + ReturnStatement(node, state, c) { + state.containsReturn = true; + walk.base.ReturnStatement(node, state, c); + }, + VariableDeclaration(node, state, c) { + const variableKind = node.kind; + const isIterableForDeclaration = ArrayPrototypeIncludes( + ['ForOfStatement', 'ForInStatement'], + state.ancestors[state.ancestors.length - 2].type + ); + + if (variableKind === 'var' || isTopLevelDeclaration(state)) { + state.replace( + node.start, + node.start + variableKind.length + (isIterableForDeclaration ? 1 : 0), + variableKind === 'var' && isIterableForDeclaration ? + '' : + 'void' + (node.declarations.length === 1 ? '' : ' (') + ); + + if (!isIterableForDeclaration) { + ArrayPrototypeForEach(node.declarations, (decl) => { + state.prepend(decl, '('); + state.append(decl, decl.init ? ')' : '=undefined)'); + }); + + if (node.declarations.length !== 1) { + state.append(node.declarations[node.declarations.length - 1], ')'); + } + } + + const variableIdentifiersToHoist = [ + ['var', []], + ['let', []], + ]; + function registerVariableDeclarationIdentifiers(node) { + switch (node.type) { + case 'Identifier': + ArrayPrototypePush( + variableIdentifiersToHoist[variableKind === 'var' ? 0 : 1][1], + node.name + ); + break; + case 'ObjectPattern': + ArrayPrototypeForEach(node.properties, (property) => { + registerVariableDeclarationIdentifiers(property.value); + }); + break; + case 'ArrayPattern': + ArrayPrototypeForEach(node.elements, (element) => { + registerVariableDeclarationIdentifiers(element); + }); + break; + } + } + + ArrayPrototypeForEach(node.declarations, (decl) => { + registerVariableDeclarationIdentifiers(decl.id); + }); + + ArrayPrototypeForEach( + variableIdentifiersToHoist, + ({ 0: kind, 1: identifiers }) => { + if (identifiers.length > 0) { + ArrayPrototypePush( + state.hoistedDeclarationStatements, + `${kind} ${ArrayPrototypeJoin(identifiers, ', ')}; ` + ); + } + } + ); + } + + walk.base.VariableDeclaration(node, state, c); + } +}; + +const visitors = {}; +for (const nodeType of ObjectKeys(walk.base)) { + const callback = visitorsWithoutAncestors[nodeType] || walk.base[nodeType]; + visitors[nodeType] = (node, state, c) => { + const isNew = node !== state.ancestors[state.ancestors.length - 1]; + if (isNew) { + ArrayPrototypePush(state.ancestors, node); + } + callback(node, state, c); + if (isNew) { + ArrayPrototypePop(state.ancestors); + } + }; +} + +function processTopLevelAwait(src) { + const wrapPrefix = '(async () => { '; + const wrapped = `${wrapPrefix}${src} })()`; + const wrappedArray = ArrayFrom(wrapped); + let root; + try { + root = parser.parse(wrapped, { ecmaVersion: 'latest' }); + } catch (e) { + if (StringPrototypeStartsWith(e.message, 'Unterminated ')) + throw new Recoverable(e); + // If the parse error is before the first "await", then use the execution + // error. Otherwise we must emit this parse error, making it look like a + // proper syntax error. + const awaitPos = StringPrototypeIndexOf(src, 'await'); + const errPos = e.pos - wrapPrefix.length; + if (awaitPos > errPos) + return null; + // Convert keyword parse errors on await into their original errors when + // possible. + if (errPos === awaitPos + 6 && + StringPrototypeIncludes(e.message, 'Expecting Unicode escape sequence')) + return null; + if (errPos === awaitPos + 7 && + StringPrototypeIncludes(e.message, 'Unexpected token')) + return null; + const line = e.loc.line; + const column = line === 1 ? e.loc.column - wrapPrefix.length : e.loc.column; + let message = '\n' + StringPrototypeSplit(src, '\n')[line - 1] + '\n' + + StringPrototypeRepeat(' ', column) + + '^\n\n' + RegExpPrototypeSymbolReplace(/ \([^)]+\)/, e.message, ''); + // V8 unexpected token errors include the token string. + if (StringPrototypeEndsWith(message, 'Unexpected token')) + message += " '" + + // Wrapper end may cause acorn to report error position after the source + ((src.length - 1) >= (e.pos - wrapPrefix.length) + ? src[e.pos - wrapPrefix.length] + : src[src.length - 1]) + + "'"; + // eslint-disable-next-line no-restricted-syntax + throw new SyntaxError(message); + } + const body = root.body[0].expression.callee.body; + const state = { + body, + ancestors: [], + hoistedDeclarationStatements: [], + replace(from, to, str) { + for (let i = from; i < to; i++) { + wrappedArray[i] = ''; + } + if (from === to) str += wrappedArray[from]; + wrappedArray[from] = str; + }, + prepend(node, str) { + wrappedArray[node.start] = str + wrappedArray[node.start]; + }, + append(node, str) { + wrappedArray[node.end - 1] += str; + }, + containsAwait: false, + containsReturn: false + }; + + walk.recursive(body, state, visitors); + + // Do not transform if + // 1. False alarm: there isn't actually an await expression. + // 2. There is a top-level return, which is not allowed. + if (!state.containsAwait || state.containsReturn) { + return null; + } + + const last = body.body[body.body.length - 1]; + if (last.type === 'ExpressionStatement') { + // For an expression statement of the form + // ( expr ) ; + // ^^^^^^^^^^ // last + // ^^^^ // last.expression + // + // We do not want the left parenthesis before the `return` keyword; + // therefore we prepend the `return (` to `last`. + // + // On the other hand, we do not want the right parenthesis after the + // semicolon. Since there can only be more right parentheses between + // last.expression.end and the semicolon, appending one more to + // last.expression should be fine. + state.prepend(last, 'return ('); + state.append(last.expression, ')'); + } + + return ( + ArrayPrototypeJoin(state.hoistedDeclarationStatements, '') + + ArrayPrototypeJoin(wrappedArray, '') + ); +} + +module.exports = { + processTopLevelAwait +}; diff --git a/node_modules/ts-node/dist-raw/node-internalBinding-fs.js b/node_modules/ts-node/dist-raw/node-internalBinding-fs.js new file mode 100644 index 0000000..e85bc82 --- /dev/null +++ b/node_modules/ts-node/dist-raw/node-internalBinding-fs.js @@ -0,0 +1,58 @@ +const fs = require('fs'); +const {versionGteLt} = require('../dist/util'); + +// In node's core, this is implemented in C +// https://github.com/nodejs/node/blob/v15.3.0/src/node_file.cc#L891-L985 +/** + * @param {string} path + * @returns {[] | [string, boolean]} + */ +function internalModuleReadJSON(path) { + let string + try { + string = fs.readFileSync(path, 'utf8') + } catch (e) { + if (e.code === 'ENOENT') return [] + throw e + } + // Node's implementation checks for the presence of relevant keys: main, name, type, exports, imports + // Node does this for performance to skip unnecessary parsing. + // This would slow us down and, based on our usage, we can skip it. + const containsKeys = true + return [string, containsKeys] +} + +// In node's core, this is implemented in C +// https://github.com/nodejs/node/blob/63e7dc1e5c71b70c80ed9eda230991edb00811e2/src/node_file.cc#L987-L1005 +/** + * @param {string} path + * @returns {number} 0 = file, 1 = dir, negative = error + */ +function internalModuleStat(path) { + const stat = fs.statSync(path, { throwIfNoEntry: false }); + if(!stat) return -1; + if(stat.isFile()) return 0; + if(stat.isDirectory()) return 1; +} + +/** + * @param {string} path + * @returns {number} 0 = file, 1 = dir, negative = error + */ +function internalModuleStatInefficient(path) { + try { + const stat = fs.statSync(path); + if(stat.isFile()) return 0; + if(stat.isDirectory()) return 1; + } catch(e) { + return -e.errno || -1; + } +} + +const statSupportsThrowIfNoEntry = versionGteLt(process.versions.node, '15.3.0') || + versionGteLt(process.versions.node, '14.17.0', '15.0.0'); + +module.exports = { + internalModuleReadJSON, + internalModuleStat: statSupportsThrowIfNoEntry ? internalModuleStat : internalModuleStatInefficient +}; diff --git a/node_modules/ts-node/dist-raw/node-nativemodule.js b/node_modules/ts-node/dist-raw/node-nativemodule.js new file mode 100644 index 0000000..ea54fcd --- /dev/null +++ b/node_modules/ts-node/dist-raw/node-nativemodule.js @@ -0,0 +1,9 @@ + +// Node imports this from 'internal/bootstrap/loaders' +const Module = require('module'); +const NativeModule = { + canBeRequiredByUsers(specifier) { + return Module.builtinModules.includes(specifier) + } +}; +exports.NativeModule = NativeModule; diff --git a/node_modules/ts-node/dist-raw/node-options.js b/node_modules/ts-node/dist-raw/node-options.js new file mode 100644 index 0000000..2272275 --- /dev/null +++ b/node_modules/ts-node/dist-raw/node-options.js @@ -0,0 +1,103 @@ +// Replacement for node's internal 'internal/options' module + +exports.getOptionValue = getOptionValue; +function getOptionValue(opt) { + parseOptions(); + return options[opt]; +} + +let options; +function parseOptions() { + if (!options) { + options = { + '--preserve-symlinks': false, + '--preserve-symlinks-main': false, + '--input-type': undefined, + '--experimental-specifier-resolution': 'explicit', + '--experimental-policy': undefined, + '--conditions': [], + '--pending-deprecation': false, + ...parseArgv(getNodeOptionsEnvArgv()), + ...parseArgv(process.execArgv), + ...getOptionValuesFromOtherEnvVars() + } + } +} + +function parseArgv(argv) { + return require('arg')({ + '--preserve-symlinks': Boolean, + '--preserve-symlinks-main': Boolean, + '--input-type': String, + '--experimental-specifier-resolution': String, + // Legacy alias for node versions prior to 12.16 + '--es-module-specifier-resolution': '--experimental-specifier-resolution', + '--experimental-policy': String, + '--conditions': [String], + '--pending-deprecation': Boolean, + '--experimental-json-modules': Boolean, + '--experimental-wasm-modules': Boolean, + }, { + argv, + permissive: true + }); +} + +function getNodeOptionsEnvArgv() { + const errors = []; + const envArgv = ParseNodeOptionsEnvVar(process.env.NODE_OPTIONS || '', errors); + if (errors.length !== 0) { + // TODO: handle errors somehow + } + return envArgv; +} + +// Direct JS port of C implementation: https://github.com/nodejs/node/blob/67ba825037b4082d5d16f922fb9ce54516b4a869/src/node_options.cc#L1024-L1063 +function ParseNodeOptionsEnvVar(node_options, errors) { + const env_argv = []; + + let is_in_string = false; + let will_start_new_arg = true; + for (let index = 0; index < node_options.length; ++index) { + let c = node_options[index]; + + // Backslashes escape the following character + if (c === '\\' && is_in_string) { + if (index + 1 === node_options.length) { + errors.push("invalid value for NODE_OPTIONS " + + "(invalid escape)\n"); + return env_argv; + } else { + c = node_options[++index]; + } + } else if (c === ' ' && !is_in_string) { + will_start_new_arg = true; + continue; + } else if (c === '"') { + is_in_string = !is_in_string; + continue; + } + + if (will_start_new_arg) { + env_argv.push(c); + will_start_new_arg = false; + } else { + env_argv[env_argv.length - 1] += c; + } + } + + if (is_in_string) { + errors.push("invalid value for NODE_OPTIONS " + + "(unterminated string)\n"); + } + return env_argv; +} + +// Get option values that can be specified via env vars besides NODE_OPTIONS +function getOptionValuesFromOtherEnvVars() { + const options = {}; + if(process.env.NODE_PENDING_DEPRECATION === '1') { + options['--pending-deprecation'] = true; + } + return options; +} diff --git a/node_modules/ts-node/dist-raw/node-primordials.js b/node_modules/ts-node/dist-raw/node-primordials.js new file mode 100644 index 0000000..a7c1574 --- /dev/null +++ b/node_modules/ts-node/dist-raw/node-primordials.js @@ -0,0 +1,37 @@ +module.exports = { + ArrayFrom: Array.from, + ArrayIsArray: Array.isArray, + ArrayPrototypeShift: (obj) => Array.prototype.shift.call(obj), + ArrayPrototypeForEach: (arr, ...rest) => Array.prototype.forEach.apply(arr, rest), + ArrayPrototypeIncludes: (arr, ...rest) => Array.prototype.includes.apply(arr, rest), + ArrayPrototypeJoin: (arr, ...rest) => Array.prototype.join.apply(arr, rest), + ArrayPrototypePop: (arr, ...rest) => Array.prototype.pop.apply(arr, rest), + ArrayPrototypePush: (arr, ...rest) => Array.prototype.push.apply(arr, rest), + FunctionPrototype: Function.prototype, + JSONParse: JSON.parse, + JSONStringify: JSON.stringify, + ObjectFreeze: Object.freeze, + ObjectKeys: Object.keys, + ObjectGetOwnPropertyNames: Object.getOwnPropertyNames, + ObjectDefineProperty: Object.defineProperty, + ObjectPrototypeHasOwnProperty: (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop), + RegExpPrototypeExec: (obj, string) => RegExp.prototype.exec.call(obj, string), + RegExpPrototypeTest: (obj, string) => RegExp.prototype.test.call(obj, string), + RegExpPrototypeSymbolReplace: (obj, ...rest) => RegExp.prototype[Symbol.replace].apply(obj, rest), + SafeMap: Map, + SafeSet: Set, + SafeWeakMap: WeakMap, + StringPrototypeEndsWith: (str, ...rest) => String.prototype.endsWith.apply(str, rest), + StringPrototypeIncludes: (str, ...rest) => String.prototype.includes.apply(str, rest), + StringPrototypeLastIndexOf: (str, ...rest) => String.prototype.lastIndexOf.apply(str, rest), + StringPrototypeIndexOf: (str, ...rest) => String.prototype.indexOf.apply(str, rest), + StringPrototypeRepeat: (str, ...rest) => String.prototype.repeat.apply(str, rest), + StringPrototypeReplace: (str, ...rest) => String.prototype.replace.apply(str, rest), + StringPrototypeSlice: (str, ...rest) => String.prototype.slice.apply(str, rest), + StringPrototypeSplit: (str, ...rest) => String.prototype.split.apply(str, rest), + StringPrototypeStartsWith: (str, ...rest) => String.prototype.startsWith.apply(str, rest), + StringPrototypeSubstr: (str, ...rest) => String.prototype.substr.apply(str, rest), + StringPrototypeCharCodeAt: (str, ...rest) => String.prototype.charCodeAt.apply(str, rest), + StringPrototypeMatch: (str, ...rest) => String.prototype.match.apply(str, rest), + SyntaxError: SyntaxError +}; diff --git a/node_modules/ts-node/dist-raw/runmain-hack.js b/node_modules/ts-node/dist-raw/runmain-hack.js new file mode 100644 index 0000000..6c0688e --- /dev/null +++ b/node_modules/ts-node/dist-raw/runmain-hack.js @@ -0,0 +1,9 @@ +const {pathToFileURL} = require('url'); + +// Hack to avoid Module.runMain on node 18.6.0 +// Keeping it simple for now, isolated in this file. +// Could theoretically probe `getFormat` impl to determine if `import()` or `Module._load()` is best +// Note that I attempted a try-catch around `Module._load`, but it poisons some sort of cache such that subsequent `import()` is impossible. +exports.run = function(entryPointPath) { + import(pathToFileURL(entryPointPath)); +} diff --git a/node_modules/ts-node/dist/bin-cwd.d.ts b/node_modules/ts-node/dist/bin-cwd.d.ts new file mode 100644 index 0000000..b798801 --- /dev/null +++ b/node_modules/ts-node/dist/bin-cwd.d.ts @@ -0,0 +1,2 @@ +#!/usr/bin/env node +export {}; diff --git a/node_modules/ts-node/dist/bin-cwd.js b/node_modules/ts-node/dist/bin-cwd.js new file mode 100755 index 0000000..dc241b6 --- /dev/null +++ b/node_modules/ts-node/dist/bin-cwd.js @@ -0,0 +1,6 @@ +#!/usr/bin/env node +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const bin_1 = require("./bin"); +(0, bin_1.main)(undefined, { '--cwdMode': true }); +//# sourceMappingURL=bin-cwd.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/bin-cwd.js.map b/node_modules/ts-node/dist/bin-cwd.js.map new file mode 100644 index 0000000..f50e7e3 --- /dev/null +++ b/node_modules/ts-node/dist/bin-cwd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bin-cwd.js","sourceRoot":"","sources":["../src/bin-cwd.ts"],"names":[],"mappings":";;;AAEA,+BAA6B;AAE7B,IAAA,UAAI,EAAC,SAAS,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\n\nimport { main } from './bin';\n\nmain(undefined, { '--cwdMode': true });\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/bin-esm.d.ts b/node_modules/ts-node/dist/bin-esm.d.ts new file mode 100644 index 0000000..b798801 --- /dev/null +++ b/node_modules/ts-node/dist/bin-esm.d.ts @@ -0,0 +1,2 @@ +#!/usr/bin/env node +export {}; diff --git a/node_modules/ts-node/dist/bin-esm.js b/node_modules/ts-node/dist/bin-esm.js new file mode 100755 index 0000000..3c7a778 --- /dev/null +++ b/node_modules/ts-node/dist/bin-esm.js @@ -0,0 +1,6 @@ +#!/usr/bin/env node +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const bin_1 = require("./bin"); +(0, bin_1.main)(undefined, { '--esm': true }); +//# sourceMappingURL=bin-esm.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/bin-esm.js.map b/node_modules/ts-node/dist/bin-esm.js.map new file mode 100644 index 0000000..a5fc896 --- /dev/null +++ b/node_modules/ts-node/dist/bin-esm.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bin-esm.js","sourceRoot":"","sources":["../src/bin-esm.ts"],"names":[],"mappings":";;;AAEA,+BAA6B;AAE7B,IAAA,UAAI,EAAC,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\n\nimport { main } from './bin';\n\nmain(undefined, { '--esm': true });\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/bin-script-deprecated.d.ts b/node_modules/ts-node/dist/bin-script-deprecated.d.ts new file mode 100644 index 0000000..b798801 --- /dev/null +++ b/node_modules/ts-node/dist/bin-script-deprecated.d.ts @@ -0,0 +1,2 @@ +#!/usr/bin/env node +export {}; diff --git a/node_modules/ts-node/dist/bin-script-deprecated.js b/node_modules/ts-node/dist/bin-script-deprecated.js new file mode 100755 index 0000000..94029dc --- /dev/null +++ b/node_modules/ts-node/dist/bin-script-deprecated.js @@ -0,0 +1,7 @@ +#!/usr/bin/env node +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const bin_1 = require("./bin"); +console.warn('ts-script has been deprecated and will be removed in the next major release.', 'Please use ts-node-script instead'); +(0, bin_1.main)(undefined, { '--scriptMode': true }); +//# sourceMappingURL=bin-script-deprecated.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/bin-script-deprecated.js.map b/node_modules/ts-node/dist/bin-script-deprecated.js.map new file mode 100644 index 0000000..7a116c0 --- /dev/null +++ b/node_modules/ts-node/dist/bin-script-deprecated.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bin-script-deprecated.js","sourceRoot":"","sources":["../src/bin-script-deprecated.ts"],"names":[],"mappings":";;;AAEA,+BAA6B;AAE7B,OAAO,CAAC,IAAI,CACV,8EAA8E,EAC9E,mCAAmC,CACpC,CAAC;AAEF,IAAA,UAAI,EAAC,SAAS,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\n\nimport { main } from './bin';\n\nconsole.warn(\n 'ts-script has been deprecated and will be removed in the next major release.',\n 'Please use ts-node-script instead'\n);\n\nmain(undefined, { '--scriptMode': true });\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/bin-script.d.ts b/node_modules/ts-node/dist/bin-script.d.ts new file mode 100644 index 0000000..b798801 --- /dev/null +++ b/node_modules/ts-node/dist/bin-script.d.ts @@ -0,0 +1,2 @@ +#!/usr/bin/env node +export {}; diff --git a/node_modules/ts-node/dist/bin-script.js b/node_modules/ts-node/dist/bin-script.js new file mode 100755 index 0000000..3a9c821 --- /dev/null +++ b/node_modules/ts-node/dist/bin-script.js @@ -0,0 +1,6 @@ +#!/usr/bin/env node +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const bin_1 = require("./bin"); +(0, bin_1.main)(undefined, { '--scriptMode': true }); +//# sourceMappingURL=bin-script.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/bin-script.js.map b/node_modules/ts-node/dist/bin-script.js.map new file mode 100644 index 0000000..004c805 --- /dev/null +++ b/node_modules/ts-node/dist/bin-script.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bin-script.js","sourceRoot":"","sources":["../src/bin-script.ts"],"names":[],"mappings":";;;AAEA,+BAA6B;AAE7B,IAAA,UAAI,EAAC,SAAS,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\n\nimport { main } from './bin';\n\nmain(undefined, { '--scriptMode': true });\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/bin-transpile.d.ts b/node_modules/ts-node/dist/bin-transpile.d.ts new file mode 100644 index 0000000..b798801 --- /dev/null +++ b/node_modules/ts-node/dist/bin-transpile.d.ts @@ -0,0 +1,2 @@ +#!/usr/bin/env node +export {}; diff --git a/node_modules/ts-node/dist/bin-transpile.js b/node_modules/ts-node/dist/bin-transpile.js new file mode 100755 index 0000000..7bcdc38 --- /dev/null +++ b/node_modules/ts-node/dist/bin-transpile.js @@ -0,0 +1,6 @@ +#!/usr/bin/env node +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const bin_1 = require("./bin"); +(0, bin_1.main)(undefined, { '--transpileOnly': true }); +//# sourceMappingURL=bin-transpile.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/bin-transpile.js.map b/node_modules/ts-node/dist/bin-transpile.js.map new file mode 100644 index 0000000..deb663e --- /dev/null +++ b/node_modules/ts-node/dist/bin-transpile.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bin-transpile.js","sourceRoot":"","sources":["../src/bin-transpile.ts"],"names":[],"mappings":";;;AAEA,+BAA6B;AAE7B,IAAA,UAAI,EAAC,SAAS,EAAE,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\n\nimport { main } from './bin';\n\nmain(undefined, { '--transpileOnly': true });\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/bin.d.ts b/node_modules/ts-node/dist/bin.d.ts new file mode 100644 index 0000000..0817f88 --- /dev/null +++ b/node_modules/ts-node/dist/bin.d.ts @@ -0,0 +1,11 @@ +#!/usr/bin/env node +/** + * Main `bin` functionality. + * + * This file is split into a chain of functions (phases), each one adding to a shared state object. + * This is done so that the next function can either be invoked in-process or, if necessary, invoked in a child process. + * + * The functions are intentionally given uncreative names and left in the same order as the original code, to make a + * smaller git diff. + */ +export declare function main(argv?: string[], entrypointArgs?: Record): void; diff --git a/node_modules/ts-node/dist/bin.js b/node_modules/ts-node/dist/bin.js new file mode 100755 index 0000000..0e6fe23 --- /dev/null +++ b/node_modules/ts-node/dist/bin.js @@ -0,0 +1,581 @@ +#!/usr/bin/env node +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.bootstrap = exports.main = void 0; +const path_1 = require("path"); +const util_1 = require("util"); +const Module = require("module"); +let arg; +const util_2 = require("./util"); +const repl_1 = require("./repl"); +const index_1 = require("./index"); +const node_internal_modules_cjs_helpers_1 = require("../dist-raw/node-internal-modules-cjs-helpers"); +const spawn_child_1 = require("./child/spawn-child"); +const configuration_1 = require("./configuration"); +/** + * Main `bin` functionality. + * + * This file is split into a chain of functions (phases), each one adding to a shared state object. + * This is done so that the next function can either be invoked in-process or, if necessary, invoked in a child process. + * + * The functions are intentionally given uncreative names and left in the same order as the original code, to make a + * smaller git diff. + */ +function main(argv = process.argv.slice(2), entrypointArgs = {}) { + const args = parseArgv(argv, entrypointArgs); + const state = { + shouldUseChildProcess: false, + isInChildProcess: false, + isCli: true, + tsNodeScript: __filename, + parseArgvResult: args, + }; + return bootstrap(state); +} +exports.main = main; +/** @internal */ +function bootstrap(state) { + if (!state.phase2Result) { + state.phase2Result = phase2(state); + if (state.shouldUseChildProcess && !state.isInChildProcess) { + // Note: When transitioning into the child-process after `phase2`, + // the updated working directory needs to be preserved. + return (0, spawn_child_1.callInChild)(state); + } + } + if (!state.phase3Result) { + state.phase3Result = phase3(state); + if (state.shouldUseChildProcess && !state.isInChildProcess) { + // Note: When transitioning into the child-process after `phase2`, + // the updated working directory needs to be preserved. + return (0, spawn_child_1.callInChild)(state); + } + } + return phase4(state); +} +exports.bootstrap = bootstrap; +function parseArgv(argv, entrypointArgs) { + arg !== null && arg !== void 0 ? arg : (arg = require('arg')); + // HACK: technically, this function is not marked @internal so it's possible + // that libraries in the wild are doing `require('ts-node/dist/bin').main({'--transpile-only': true})` + // We can mark this function @internal in next major release. + // For now, rewrite args to avoid a breaking change. + entrypointArgs = { ...entrypointArgs }; + for (const key of Object.keys(entrypointArgs)) { + entrypointArgs[key.replace(/([a-z])-([a-z])/g, (_$0, $1, $2) => `${$1}${$2.toUpperCase()}`)] = entrypointArgs[key]; + } + const args = { + ...entrypointArgs, + ...arg({ + // Node.js-like options. + '--eval': String, + '--interactive': Boolean, + '--print': Boolean, + '--require': [String], + // CLI options. + '--help': Boolean, + '--cwdMode': Boolean, + '--scriptMode': Boolean, + '--version': arg.COUNT, + '--showConfig': Boolean, + '--esm': Boolean, + // Project options. + '--cwd': String, + '--files': Boolean, + '--compiler': String, + '--compilerOptions': util_2.parse, + '--project': String, + '--ignoreDiagnostics': [String], + '--ignore': [String], + '--transpileOnly': Boolean, + '--transpiler': String, + '--swc': Boolean, + '--typeCheck': Boolean, + '--compilerHost': Boolean, + '--pretty': Boolean, + '--skipProject': Boolean, + '--skipIgnore': Boolean, + '--preferTsExts': Boolean, + '--logError': Boolean, + '--emit': Boolean, + '--scope': Boolean, + '--scopeDir': String, + '--noExperimentalReplAwait': Boolean, + '--experimentalSpecifierResolution': String, + // Aliases. + '-e': '--eval', + '-i': '--interactive', + '-p': '--print', + '-r': '--require', + '-h': '--help', + '-s': '--script-mode', + '-v': '--version', + '-T': '--transpileOnly', + '-H': '--compilerHost', + '-I': '--ignore', + '-P': '--project', + '-C': '--compiler', + '-D': '--ignoreDiagnostics', + '-O': '--compilerOptions', + '--dir': '--cwd', + // Support both tsc-style camelCase and node-style hypen-case for *all* flags + '--cwd-mode': '--cwdMode', + '--script-mode': '--scriptMode', + '--show-config': '--showConfig', + '--compiler-options': '--compilerOptions', + '--ignore-diagnostics': '--ignoreDiagnostics', + '--transpile-only': '--transpileOnly', + '--type-check': '--typeCheck', + '--compiler-host': '--compilerHost', + '--skip-project': '--skipProject', + '--skip-ignore': '--skipIgnore', + '--prefer-ts-exts': '--preferTsExts', + '--log-error': '--logError', + '--scope-dir': '--scopeDir', + '--no-experimental-repl-await': '--noExperimentalReplAwait', + '--experimental-specifier-resolution': '--experimentalSpecifierResolution', + }, { + argv, + stopAtPositional: true, + }), + }; + // Only setting defaults for CLI-specific flags + // Anything passed to `register()` can be `undefined`; `create()` will apply + // defaults. + const { '--cwd': cwdArg, '--help': help = false, '--scriptMode': scriptMode, '--cwdMode': cwdMode, '--version': version = 0, '--showConfig': showConfig, '--require': argsRequire = [], '--eval': code = undefined, '--print': print = false, '--interactive': interactive = false, '--files': files, '--compiler': compiler, '--compilerOptions': compilerOptions, '--project': project, '--ignoreDiagnostics': ignoreDiagnostics, '--ignore': ignore, '--transpileOnly': transpileOnly, '--typeCheck': typeCheck, '--transpiler': transpiler, '--swc': swc, '--compilerHost': compilerHost, '--pretty': pretty, '--skipProject': skipProject, '--skipIgnore': skipIgnore, '--preferTsExts': preferTsExts, '--logError': logError, '--emit': emit, '--scope': scope = undefined, '--scopeDir': scopeDir = undefined, '--noExperimentalReplAwait': noExperimentalReplAwait, '--experimentalSpecifierResolution': experimentalSpecifierResolution, '--esm': esm, _: restArgs, } = args; + return { + // Note: argv and restArgs may be overwritten by child process + argv: process.argv, + restArgs, + cwdArg, + help, + scriptMode, + cwdMode, + version, + showConfig, + argsRequire, + code, + print, + interactive, + files, + compiler, + compilerOptions, + project, + ignoreDiagnostics, + ignore, + transpileOnly, + typeCheck, + transpiler, + swc, + compilerHost, + pretty, + skipProject, + skipIgnore, + preferTsExts, + logError, + emit, + scope, + scopeDir, + noExperimentalReplAwait, + experimentalSpecifierResolution, + esm, + }; +} +function phase2(payload) { + const { help, version, cwdArg, esm } = payload.parseArgvResult; + if (help) { + console.log(` +Usage: ts-node [options] [ -e script | script.ts ] [arguments] + +Options: + + -e, --eval [code] Evaluate code + -p, --print Print result of \`--eval\` + -r, --require [path] Require a node module before execution + -i, --interactive Opens the REPL even if stdin does not appear to be a terminal + + --esm Bootstrap with the ESM loader, enabling full ESM support + --swc Use the faster swc transpiler + + -h, --help Print CLI usage + -v, --version Print module version information. -vvv to print additional information + --showConfig Print resolved configuration and exit + + -T, --transpileOnly Use TypeScript's faster \`transpileModule\` or a third-party transpiler + -H, --compilerHost Use TypeScript's compiler host API + -I, --ignore [pattern] Override the path patterns to skip compilation + -P, --project [path] Path to TypeScript JSON project file + -C, --compiler [name] Specify a custom TypeScript compiler + --transpiler [name] Specify a third-party, non-typechecking transpiler + -D, --ignoreDiagnostics [code] Ignore TypeScript warnings by diagnostic code + -O, --compilerOptions [opts] JSON object to merge with compiler options + + --cwd Behave as if invoked within this working directory. + --files Load \`files\`, \`include\` and \`exclude\` from \`tsconfig.json\` on startup + --pretty Use pretty diagnostic formatter (usually enabled by default) + --cwdMode Use current directory instead of for config resolution + --skipProject Skip reading \`tsconfig.json\` + --skipIgnore Skip \`--ignore\` checks + --emit Emit output files into \`.ts-node\` directory + --scope Scope compiler to files within \`scopeDir\`. Anything outside this directory is ignored. + --scopeDir Directory for \`--scope\` + --preferTsExts Prefer importing TypeScript files over JavaScript files + --logError Logs TypeScript errors to stderr instead of throwing exceptions + --noExperimentalReplAwait Disable top-level await in REPL. Equivalent to node's --no-experimental-repl-await + --experimentalSpecifierResolution [node|explicit] + Equivalent to node's --experimental-specifier-resolution +`); + process.exit(0); + } + // Output project information. + if (version === 1) { + console.log(`v${index_1.VERSION}`); + process.exit(0); + } + const cwd = cwdArg ? (0, path_1.resolve)(cwdArg) : process.cwd(); + // If ESM is explicitly enabled through the flag, stage3 should be run in a child process + // with the ESM loaders configured. + if (esm) + payload.shouldUseChildProcess = true; + return { + cwd, + }; +} +function phase3(payload) { + const { emit, files, pretty, transpileOnly, transpiler, noExperimentalReplAwait, typeCheck, swc, compilerHost, ignore, preferTsExts, logError, scriptMode, cwdMode, project, skipProject, skipIgnore, compiler, ignoreDiagnostics, compilerOptions, argsRequire, scope, scopeDir, esm, experimentalSpecifierResolution, } = payload.parseArgvResult; + const { cwd } = payload.phase2Result; + // NOTE: When we transition to a child process for ESM, the entry-point script determined + // here might not be the one used later in `phase4`. This can happen when we execute the + // original entry-point but then the process forks itself using e.g. `child_process.fork`. + // We will always use the original TS project in forked processes anyway, so it is + // expected and acceptable to retrieve the entry-point information here in `phase2`. + // See: https://github.com/TypeStrong/ts-node/issues/1812. + const { entryPointPath } = getEntryPointInfo(payload); + const preloadedConfig = (0, configuration_1.findAndReadConfig)({ + cwd, + emit, + files, + pretty, + transpileOnly: (transpileOnly !== null && transpileOnly !== void 0 ? transpileOnly : transpiler != null) ? true : undefined, + experimentalReplAwait: noExperimentalReplAwait ? false : undefined, + typeCheck, + transpiler, + swc, + compilerHost, + ignore, + logError, + projectSearchDir: getProjectSearchDir(cwd, scriptMode, cwdMode, entryPointPath), + project, + skipProject, + skipIgnore, + compiler, + ignoreDiagnostics, + compilerOptions, + require: argsRequire, + scope, + scopeDir, + preferTsExts, + esm, + experimentalSpecifierResolution: experimentalSpecifierResolution, + }); + // If ESM is enabled through the parsed tsconfig, stage4 should be run in a child + // process with the ESM loaders configured. + if (preloadedConfig.options.esm) + payload.shouldUseChildProcess = true; + return { preloadedConfig }; +} +/** + * Determines the entry-point information from the argv and phase2 result. This + * method will be invoked in two places: + * + * 1. In phase 3 to be able to find a project from the potential entry-point script. + * 2. In phase 4 to determine the actual entry-point script. + * + * Note that we need to explicitly re-resolve the entry-point information in the final + * stage because the previous stage information could be modified when the bootstrap + * invocation transitioned into a child process for ESM. + * + * Stages before (phase 4) can and will be cached by the child process through the Brotli + * configuration and entry-point information is only reliable in the final phase. More + * details can be found in here: https://github.com/TypeStrong/ts-node/issues/1812. + */ +function getEntryPointInfo(state) { + const { code, interactive, restArgs } = state.parseArgvResult; + const { cwd } = state.phase2Result; + const { isCli } = state; + // Figure out which we are executing: piped stdin, --eval, REPL, and/or entrypoint + // This is complicated because node's behavior is complicated + // `node -e code -i ./script.js` ignores -e + const executeEval = code != null && !(interactive && restArgs.length); + const executeEntrypoint = !executeEval && restArgs.length > 0; + const executeRepl = !executeEntrypoint && + (interactive || (process.stdin.isTTY && !executeEval)); + const executeStdin = !executeEval && !executeRepl && !executeEntrypoint; + /** + * Unresolved. May point to a symlink, not realpath. May be missing file extension + * NOTE: resolution relative to cwd option (not `process.cwd()`) is legacy backwards-compat; should be changed in next major: https://github.com/TypeStrong/ts-node/issues/1834 + */ + const entryPointPath = executeEntrypoint + ? isCli + ? (0, path_1.resolve)(cwd, restArgs[0]) + : (0, path_1.resolve)(restArgs[0]) + : undefined; + return { + executeEval, + executeEntrypoint, + executeRepl, + executeStdin, + entryPointPath, + }; +} +function phase4(payload) { + var _a, _b, _c, _d, _e, _f, _g; + const { isInChildProcess, tsNodeScript } = payload; + const { version, showConfig, restArgs, code, print, argv } = payload.parseArgvResult; + const { cwd } = payload.phase2Result; + const { preloadedConfig } = payload.phase3Result; + const { entryPointPath, executeEntrypoint, executeEval, executeRepl, executeStdin, } = getEntryPointInfo(payload); + let evalStuff; + let replStuff; + let stdinStuff; + let evalAwarePartialHost = undefined; + if (executeEval) { + const state = new repl_1.EvalState((0, path_1.join)(cwd, repl_1.EVAL_FILENAME)); + evalStuff = { + state, + repl: (0, repl_1.createRepl)({ + state, + composeWithEvalAwarePartialHost: evalAwarePartialHost, + ignoreDiagnosticsThatAreAnnoyingInInteractiveRepl: false, + }), + }; + ({ evalAwarePartialHost } = evalStuff.repl); + // Create a local module instance based on `cwd`. + const module = (evalStuff.module = new Module(repl_1.EVAL_NAME)); + module.filename = evalStuff.state.path; + module.paths = Module._nodeModulePaths(cwd); + } + if (executeStdin) { + const state = new repl_1.EvalState((0, path_1.join)(cwd, repl_1.STDIN_FILENAME)); + stdinStuff = { + state, + repl: (0, repl_1.createRepl)({ + state, + composeWithEvalAwarePartialHost: evalAwarePartialHost, + ignoreDiagnosticsThatAreAnnoyingInInteractiveRepl: false, + }), + }; + ({ evalAwarePartialHost } = stdinStuff.repl); + // Create a local module instance based on `cwd`. + const module = (stdinStuff.module = new Module(repl_1.STDIN_NAME)); + module.filename = stdinStuff.state.path; + module.paths = Module._nodeModulePaths(cwd); + } + if (executeRepl) { + const state = new repl_1.EvalState((0, path_1.join)(cwd, repl_1.REPL_FILENAME)); + replStuff = { + state, + repl: (0, repl_1.createRepl)({ + state, + composeWithEvalAwarePartialHost: evalAwarePartialHost, + }), + }; + ({ evalAwarePartialHost } = replStuff.repl); + } + // Register the TypeScript compiler instance. + const service = (0, index_1.createFromPreloadedConfig)({ + // Since this struct may have been marshalled across thread or process boundaries, we must restore + // un-marshall-able values. + ...preloadedConfig, + options: { + ...preloadedConfig.options, + readFile: (_a = evalAwarePartialHost === null || evalAwarePartialHost === void 0 ? void 0 : evalAwarePartialHost.readFile) !== null && _a !== void 0 ? _a : undefined, + fileExists: (_b = evalAwarePartialHost === null || evalAwarePartialHost === void 0 ? void 0 : evalAwarePartialHost.fileExists) !== null && _b !== void 0 ? _b : undefined, + tsTrace: index_1.DEFAULTS.tsTrace, + }, + }); + (0, index_1.register)(service); + if (isInChildProcess) + require('./child/child-loader').lateBindHooks((0, index_1.createEsmHooks)(service)); + // Bind REPL service to ts-node compiler service (chicken-and-egg problem) + replStuff === null || replStuff === void 0 ? void 0 : replStuff.repl.setService(service); + evalStuff === null || evalStuff === void 0 ? void 0 : evalStuff.repl.setService(service); + stdinStuff === null || stdinStuff === void 0 ? void 0 : stdinStuff.repl.setService(service); + // Output project information. + if (version === 2) { + console.log(`ts-node v${index_1.VERSION}`); + console.log(`node ${process.version}`); + console.log(`compiler v${service.ts.version}`); + process.exit(0); + } + if (version >= 3) { + console.log(`ts-node v${index_1.VERSION} ${(0, path_1.dirname)(__dirname)}`); + console.log(`node ${process.version}`); + console.log(`compiler v${service.ts.version} ${(_c = service.compilerPath) !== null && _c !== void 0 ? _c : ''}`); + process.exit(0); + } + if (showConfig) { + const ts = service.ts; + if (typeof ts.convertToTSConfig !== 'function') { + console.error('Error: --showConfig requires a typescript versions >=3.2 that support --showConfig'); + process.exit(1); + } + let moduleTypes = undefined; + if (service.options.moduleTypes) { + // Assumption: this codepath requires CLI invocation, so moduleTypes must have come from a tsconfig, not API. + const showRelativeTo = (0, path_1.dirname)(service.configFilePath); + moduleTypes = {}; + for (const [key, value] of Object.entries(service.options.moduleTypes)) { + moduleTypes[(0, path_1.relative)(showRelativeTo, (0, path_1.resolve)((_d = service.options.optionBasePaths) === null || _d === void 0 ? void 0 : _d.moduleTypes, key))] = value; + } + } + const json = { + ['ts-node']: { + ...service.options, + require: ((_e = service.options.require) === null || _e === void 0 ? void 0 : _e.length) + ? service.options.require + : undefined, + moduleTypes, + optionBasePaths: undefined, + compilerOptions: undefined, + project: (_f = service.configFilePath) !== null && _f !== void 0 ? _f : service.options.project, + }, + ...ts.convertToTSConfig(service.config, (_g = service.configFilePath) !== null && _g !== void 0 ? _g : (0, path_1.join)(cwd, 'ts-node-implicit-tsconfig.json'), service.ts.sys), + }; + console.log( + // Assumes that all configuration options which can possibly be specified via the CLI are JSON-compatible. + // If, in the future, we must log functions, for example readFile and fileExists, then we can implement a JSON + // replacer function. + JSON.stringify(json, null, 2)); + process.exit(0); + } + // Prepend `ts-node` arguments to CLI for child processes. + process.execArgv.push(tsNodeScript, ...argv.slice(2, argv.length - restArgs.length)); + // TODO this comes from BootstrapState + process.argv = [process.argv[1]] + .concat(executeEntrypoint ? [entryPointPath] : []) + .concat(restArgs.slice(executeEntrypoint ? 1 : 0)); + // Execute the main contents (either eval, script or piped). + if (executeEntrypoint) { + if (payload.isInChildProcess && + (0, util_2.versionGteLt)(process.versions.node, '18.6.0')) { + // HACK workaround node regression + require('../dist-raw/runmain-hack.js').run(entryPointPath); + } + else { + Module.runMain(); + } + } + else { + // Note: eval and repl may both run, but never with stdin. + // If stdin runs, eval and repl will not. + if (executeEval) { + (0, node_internal_modules_cjs_helpers_1.addBuiltinLibsToObject)(global); + evalAndExitOnTsError(evalStuff.repl, evalStuff.module, code, print, 'eval'); + } + if (executeRepl) { + replStuff.repl.start(); + } + if (executeStdin) { + let buffer = code || ''; + process.stdin.on('data', (chunk) => (buffer += chunk)); + process.stdin.on('end', () => { + evalAndExitOnTsError(stdinStuff.repl, stdinStuff.module, buffer, + // `echo 123 | node -p` still prints 123 + print, 'stdin'); + }); + } + } +} +/** + * Get project search path from args. + */ +function getProjectSearchDir(cwd, scriptMode, cwdMode, scriptPath) { + // Validate `--script-mode` / `--cwd-mode` / `--cwd` usage is correct. + if (scriptMode && cwdMode) { + throw new TypeError('--cwd-mode cannot be combined with --script-mode'); + } + if (scriptMode && !scriptPath) { + throw new TypeError('--script-mode must be used with a script name, e.g. `ts-node --script-mode `'); + } + const doScriptMode = scriptMode === true ? true : cwdMode === true ? false : !!scriptPath; + if (doScriptMode) { + // Use node's own resolution behavior to ensure we follow symlinks. + // scriptPath may omit file extension or point to a directory with or without package.json. + // This happens before we are registered, so we tell node's resolver to consider ts, tsx, and jsx files. + // In extremely rare cases, is is technically possible to resolve the wrong directory, + // because we do not yet know preferTsExts, jsx, nor allowJs. + // See also, justification why this will not happen in real-world situations: + // https://github.com/TypeStrong/ts-node/pull/1009#issuecomment-613017081 + const exts = ['.js', '.jsx', '.ts', '.tsx']; + const extsTemporarilyInstalled = []; + for (const ext of exts) { + if (!(0, util_2.hasOwnProperty)(require.extensions, ext)) { + extsTemporarilyInstalled.push(ext); + require.extensions[ext] = function () { }; + } + } + try { + return (0, path_1.dirname)(requireResolveNonCached(scriptPath)); + } + finally { + for (const ext of extsTemporarilyInstalled) { + delete require.extensions[ext]; + } + } + } + return cwd; +} +const guaranteedNonexistentDirectoryPrefix = (0, path_1.resolve)(__dirname, 'doesnotexist'); +let guaranteedNonexistentDirectorySuffix = 0; +/** + * require.resolve an absolute path, tricking node into *not* caching the results. + * Necessary so that we do not pollute require.resolve cache prior to installing require.extensions + * + * Is a terrible hack, because node does not expose the necessary cache invalidation APIs + * https://stackoverflow.com/questions/59865584/how-to-invalidate-cached-require-resolve-results + */ +function requireResolveNonCached(absoluteModuleSpecifier) { + // node <= 12.1.x fallback: The trick below triggers a node bug on old versions. + // On these old versions, pollute the require cache instead. This is a deliberate + // ts-node limitation that will *rarely* manifest, and will not matter once node 12 + // is end-of-life'd on 2022-04-30 + const isSupportedNodeVersion = (0, util_2.versionGteLt)(process.versions.node, '12.2.0'); + if (!isSupportedNodeVersion) + return require.resolve(absoluteModuleSpecifier); + const { dir, base } = (0, path_1.parse)(absoluteModuleSpecifier); + const relativeModuleSpecifier = `./${base}`; + const req = (0, util_2.createRequire)((0, path_1.join)(dir, 'imaginaryUncacheableRequireResolveScript')); + return req.resolve(relativeModuleSpecifier, { + paths: [ + `${guaranteedNonexistentDirectoryPrefix}${guaranteedNonexistentDirectorySuffix++}`, + ...(req.resolve.paths(relativeModuleSpecifier) || []), + ], + }); +} +/** + * Evaluate an [eval] or [stdin] script + */ +function evalAndExitOnTsError(replService, module, code, isPrinted, filenameAndDirname) { + let result; + (0, repl_1.setupContext)(global, module, filenameAndDirname); + try { + result = replService.evalCode(code); + } + catch (error) { + if (error instanceof index_1.TSError) { + console.error(error); + process.exit(1); + } + throw error; + } + if (isPrinted) { + console.log(typeof result === 'string' + ? result + : (0, util_1.inspect)(result, { colors: process.stdout.isTTY })); + } +} +if (require.main === module) { + main(); +} +//# sourceMappingURL=bin.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/bin.js.map b/node_modules/ts-node/dist/bin.js.map new file mode 100644 index 0000000..efb2739 --- /dev/null +++ b/node_modules/ts-node/dist/bin.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";;;;AAEA,+BAA4E;AAC5E,+BAA+B;AAC/B,iCAAkC;AAClC,IAAI,GAAyB,CAAC;AAC9B,iCAA4E;AAC5E,iCAWgB;AAChB,mCAQiB;AAEjB,qGAAuF;AACvF,qDAAkD;AAClD,mDAAoD;AAEpD;;;;;;;;GAQG;AACH,SAAgB,IAAI,CAClB,OAAiB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EACtC,iBAAsC,EAAE;IAExC,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;IAC7C,MAAM,KAAK,GAAmB;QAC5B,qBAAqB,EAAE,KAAK;QAC5B,gBAAgB,EAAE,KAAK;QACvB,KAAK,EAAE,IAAI;QACX,YAAY,EAAE,UAAU;QACxB,eAAe,EAAE,IAAI;KACtB,CAAC;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sePath, relative } from 'path';\nimport { inspect } from 'util';\nimport Module = require('module');\nlet arg: typeof import('arg');\nimport { parse, createRequire, hasOwnProperty, versionGteLt } from './util';\nimport {\n EVAL_FILENAME,\n EvalState,\n createRepl,\n ReplService,\n setupContext,\n STDIN_FILENAME,\n EvalAwarePartialHost,\n EVAL_NAME,\n STDIN_NAME,\n REPL_FILENAME,\n} from './repl';\nimport {\n VERSION,\n TSError,\n register,\n createEsmHooks,\n createFromPreloadedConfig,\n DEFAULTS,\n ExperimentalSpecifierResolution,\n} from './index';\nimport type { TSInternal } from './ts-compiler-types';\nimport { addBuiltinLibsToObject } from '../dist-raw/node-internal-modules-cjs-helpers';\nimport { callInChild } from './child/spawn-child';\nimport { findAndReadConfig } from './configuration';\n\n/**\n * Main `bin` functionality.\n *\n * This file is split into a chain of functions (phases), each one adding to a shared state object.\n * This is done so that the next function can either be invoked in-process or, if necessary, invoked in a child process.\n *\n * The functions are intentionally given uncreative names and left in the same order as the original code, to make a\n * smaller git diff.\n */\nexport function main(\n argv: string[] = process.argv.slice(2),\n entrypointArgs: Record = {}\n) {\n const args = parseArgv(argv, entrypointArgs);\n const state: BootstrapState = {\n shouldUseChildProcess: false,\n isInChildProcess: false,\n isCli: true,\n tsNodeScript: __filename,\n parseArgvResult: args,\n };\n return bootstrap(state);\n}\n\n/**\n * @internal\n * Describes state of CLI bootstrapping.\n * Can be marshalled when necessary to resume bootstrapping in a child process.\n */\nexport interface BootstrapState {\n isInChildProcess: boolean;\n shouldUseChildProcess: boolean;\n /**\n * True if bootstrapping the ts-node CLI process or the direct child necessitated by `--esm`.\n * false if bootstrapping a subsequently `fork()`ed child.\n */\n isCli: boolean;\n tsNodeScript: string;\n parseArgvResult: ReturnType;\n phase2Result?: ReturnType;\n phase3Result?: ReturnType;\n}\n\n/** @internal */\nexport function bootstrap(state: BootstrapState) {\n if (!state.phase2Result) {\n state.phase2Result = phase2(state);\n if (state.shouldUseChildProcess && !state.isInChildProcess) {\n // Note: When transitioning into the child-process after `phase2`,\n // the updated working directory needs to be preserved.\n return callInChild(state);\n }\n }\n if (!state.phase3Result) {\n state.phase3Result = phase3(state);\n if (state.shouldUseChildProcess && !state.isInChildProcess) {\n // Note: When transitioning into the child-process after `phase2`,\n // the updated working directory needs to be preserved.\n return callInChild(state);\n }\n }\n return phase4(state);\n}\n\nfunction parseArgv(argv: string[], entrypointArgs: Record) {\n arg ??= require('arg');\n // HACK: technically, this function is not marked @internal so it's possible\n // that libraries in the wild are doing `require('ts-node/dist/bin').main({'--transpile-only': true})`\n // We can mark this function @internal in next major release.\n // For now, rewrite args to avoid a breaking change.\n entrypointArgs = { ...entrypointArgs };\n for (const key of Object.keys(entrypointArgs)) {\n entrypointArgs[\n key.replace(\n /([a-z])-([a-z])/g,\n (_$0, $1, $2: string) => `${$1}${$2.toUpperCase()}`\n )\n ] = entrypointArgs[key];\n }\n\n const args = {\n ...entrypointArgs,\n ...arg(\n {\n // Node.js-like options.\n '--eval': String,\n '--interactive': Boolean,\n '--print': Boolean,\n '--require': [String],\n\n // CLI options.\n '--help': Boolean,\n '--cwdMode': Boolean,\n '--scriptMode': Boolean,\n '--version': arg.COUNT,\n '--showConfig': Boolean,\n '--esm': Boolean,\n\n // Project options.\n '--cwd': String,\n '--files': Boolean,\n '--compiler': String,\n '--compilerOptions': parse,\n '--project': String,\n '--ignoreDiagnostics': [String],\n '--ignore': [String],\n '--transpileOnly': Boolean,\n '--transpiler': String,\n '--swc': Boolean,\n '--typeCheck': Boolean,\n '--compilerHost': Boolean,\n '--pretty': Boolean,\n '--skipProject': Boolean,\n '--skipIgnore': Boolean,\n '--preferTsExts': Boolean,\n '--logError': Boolean,\n '--emit': Boolean,\n '--scope': Boolean,\n '--scopeDir': String,\n '--noExperimentalReplAwait': Boolean,\n '--experimentalSpecifierResolution': String,\n\n // Aliases.\n '-e': '--eval',\n '-i': '--interactive',\n '-p': '--print',\n '-r': '--require',\n '-h': '--help',\n '-s': '--script-mode',\n '-v': '--version',\n '-T': '--transpileOnly',\n '-H': '--compilerHost',\n '-I': '--ignore',\n '-P': '--project',\n '-C': '--compiler',\n '-D': '--ignoreDiagnostics',\n '-O': '--compilerOptions',\n '--dir': '--cwd',\n\n // Support both tsc-style camelCase and node-style hypen-case for *all* flags\n '--cwd-mode': '--cwdMode',\n '--script-mode': '--scriptMode',\n '--show-config': '--showConfig',\n '--compiler-options': '--compilerOptions',\n '--ignore-diagnostics': '--ignoreDiagnostics',\n '--transpile-only': '--transpileOnly',\n '--type-check': '--typeCheck',\n '--compiler-host': '--compilerHost',\n '--skip-project': '--skipProject',\n '--skip-ignore': '--skipIgnore',\n '--prefer-ts-exts': '--preferTsExts',\n '--log-error': '--logError',\n '--scope-dir': '--scopeDir',\n '--no-experimental-repl-await': '--noExperimentalReplAwait',\n '--experimental-specifier-resolution':\n '--experimentalSpecifierResolution',\n },\n {\n argv,\n stopAtPositional: true,\n }\n ),\n };\n\n // Only setting defaults for CLI-specific flags\n // Anything passed to `register()` can be `undefined`; `create()` will apply\n // defaults.\n const {\n '--cwd': cwdArg,\n '--help': help = false,\n '--scriptMode': scriptMode,\n '--cwdMode': cwdMode,\n '--version': version = 0,\n '--showConfig': showConfig,\n '--require': argsRequire = [],\n '--eval': code = undefined,\n '--print': print = false,\n '--interactive': interactive = false,\n '--files': files,\n '--compiler': compiler,\n '--compilerOptions': compilerOptions,\n '--project': project,\n '--ignoreDiagnostics': ignoreDiagnostics,\n '--ignore': ignore,\n '--transpileOnly': transpileOnly,\n '--typeCheck': typeCheck,\n '--transpiler': transpiler,\n '--swc': swc,\n '--compilerHost': compilerHost,\n '--pretty': pretty,\n '--skipProject': skipProject,\n '--skipIgnore': skipIgnore,\n '--preferTsExts': preferTsExts,\n '--logError': logError,\n '--emit': emit,\n '--scope': scope = undefined,\n '--scopeDir': scopeDir = undefined,\n '--noExperimentalReplAwait': noExperimentalReplAwait,\n '--experimentalSpecifierResolution': experimentalSpecifierResolution,\n '--esm': esm,\n _: restArgs,\n } = args;\n return {\n // Note: argv and restArgs may be overwritten by child process\n argv: process.argv,\n restArgs,\n\n cwdArg,\n help,\n scriptMode,\n cwdMode,\n version,\n showConfig,\n argsRequire,\n code,\n print,\n interactive,\n files,\n compiler,\n compilerOptions,\n project,\n ignoreDiagnostics,\n ignore,\n transpileOnly,\n typeCheck,\n transpiler,\n swc,\n compilerHost,\n pretty,\n skipProject,\n skipIgnore,\n preferTsExts,\n logError,\n emit,\n scope,\n scopeDir,\n noExperimentalReplAwait,\n experimentalSpecifierResolution,\n esm,\n };\n}\n\nfunction phase2(payload: BootstrapState) {\n const { help, version, cwdArg, esm } = payload.parseArgvResult;\n\n if (help) {\n console.log(`\nUsage: ts-node [options] [ -e script | script.ts ] [arguments]\n\nOptions:\n\n -e, --eval [code] Evaluate code\n -p, --print Print result of \\`--eval\\`\n -r, --require [path] Require a node module before execution\n -i, --interactive Opens the REPL even if stdin does not appear to be a terminal\n\n --esm Bootstrap with the ESM loader, enabling full ESM support\n --swc Use the faster swc transpiler\n\n -h, --help Print CLI usage\n -v, --version Print module version information. -vvv to print additional information\n --showConfig Print resolved configuration and exit\n\n -T, --transpileOnly Use TypeScript's faster \\`transpileModule\\` or a third-party transpiler\n -H, --compilerHost Use TypeScript's compiler host API\n -I, --ignore [pattern] Override the path patterns to skip compilation\n -P, --project [path] Path to TypeScript JSON project file\n -C, --compiler [name] Specify a custom TypeScript compiler\n --transpiler [name] Specify a third-party, non-typechecking transpiler\n -D, --ignoreDiagnostics [code] Ignore TypeScript warnings by diagnostic code\n -O, --compilerOptions [opts] JSON object to merge with compiler options\n\n --cwd Behave as if invoked within this working directory.\n --files Load \\`files\\`, \\`include\\` and \\`exclude\\` from \\`tsconfig.json\\` on startup\n --pretty Use pretty diagnostic formatter (usually enabled by default)\n --cwdMode Use current directory instead of for config resolution\n --skipProject Skip reading \\`tsconfig.json\\`\n --skipIgnore Skip \\`--ignore\\` checks\n --emit Emit output files into \\`.ts-node\\` directory\n --scope Scope compiler to files within \\`scopeDir\\`. Anything outside this directory is ignored.\n --scopeDir Directory for \\`--scope\\`\n --preferTsExts Prefer importing TypeScript files over JavaScript files\n --logError Logs TypeScript errors to stderr instead of throwing exceptions\n --noExperimentalReplAwait Disable top-level await in REPL. Equivalent to node's --no-experimental-repl-await\n --experimentalSpecifierResolution [node|explicit]\n Equivalent to node's --experimental-specifier-resolution\n`);\n\n process.exit(0);\n }\n\n // Output project information.\n if (version === 1) {\n console.log(`v${VERSION}`);\n process.exit(0);\n }\n\n const cwd = cwdArg ? resolve(cwdArg) : process.cwd();\n\n // If ESM is explicitly enabled through the flag, stage3 should be run in a child process\n // with the ESM loaders configured.\n if (esm) payload.shouldUseChildProcess = true;\n\n return {\n cwd,\n };\n}\n\nfunction phase3(payload: BootstrapState) {\n const {\n emit,\n files,\n pretty,\n transpileOnly,\n transpiler,\n noExperimentalReplAwait,\n typeCheck,\n swc,\n compilerHost,\n ignore,\n preferTsExts,\n logError,\n scriptMode,\n cwdMode,\n project,\n skipProject,\n skipIgnore,\n compiler,\n ignoreDiagnostics,\n compilerOptions,\n argsRequire,\n scope,\n scopeDir,\n esm,\n experimentalSpecifierResolution,\n } = payload.parseArgvResult;\n const { cwd } = payload.phase2Result!;\n\n // NOTE: When we transition to a child process for ESM, the entry-point script determined\n // here might not be the one used later in `phase4`. This can happen when we execute the\n // original entry-point but then the process forks itself using e.g. `child_process.fork`.\n // We will always use the original TS project in forked processes anyway, so it is\n // expected and acceptable to retrieve the entry-point information here in `phase2`.\n // See: https://github.com/TypeStrong/ts-node/issues/1812.\n const { entryPointPath } = getEntryPointInfo(payload);\n\n const preloadedConfig = findAndReadConfig({\n cwd,\n emit,\n files,\n pretty,\n transpileOnly: transpileOnly ?? transpiler != null ? true : undefined,\n experimentalReplAwait: noExperimentalReplAwait ? false : undefined,\n typeCheck,\n transpiler,\n swc,\n compilerHost,\n ignore,\n logError,\n projectSearchDir: getProjectSearchDir(\n cwd,\n scriptMode,\n cwdMode,\n entryPointPath\n ),\n project,\n skipProject,\n skipIgnore,\n compiler,\n ignoreDiagnostics,\n compilerOptions,\n require: argsRequire,\n scope,\n scopeDir,\n preferTsExts,\n esm,\n experimentalSpecifierResolution:\n experimentalSpecifierResolution as ExperimentalSpecifierResolution,\n });\n\n // If ESM is enabled through the parsed tsconfig, stage4 should be run in a child\n // process with the ESM loaders configured.\n if (preloadedConfig.options.esm) payload.shouldUseChildProcess = true;\n\n return { preloadedConfig };\n}\n\n/**\n * Determines the entry-point information from the argv and phase2 result. This\n * method will be invoked in two places:\n *\n * 1. In phase 3 to be able to find a project from the potential entry-point script.\n * 2. In phase 4 to determine the actual entry-point script.\n *\n * Note that we need to explicitly re-resolve the entry-point information in the final\n * stage because the previous stage information could be modified when the bootstrap\n * invocation transitioned into a child process for ESM.\n *\n * Stages before (phase 4) can and will be cached by the child process through the Brotli\n * configuration and entry-point information is only reliable in the final phase. More\n * details can be found in here: https://github.com/TypeStrong/ts-node/issues/1812.\n */\nfunction getEntryPointInfo(state: BootstrapState) {\n const { code, interactive, restArgs } = state.parseArgvResult!;\n const { cwd } = state.phase2Result!;\n const { isCli } = state;\n\n // Figure out which we are executing: piped stdin, --eval, REPL, and/or entrypoint\n // This is complicated because node's behavior is complicated\n // `node -e code -i ./script.js` ignores -e\n const executeEval = code != null && !(interactive && restArgs.length);\n const executeEntrypoint = !executeEval && restArgs.length > 0;\n const executeRepl =\n !executeEntrypoint &&\n (interactive || (process.stdin.isTTY && !executeEval));\n const executeStdin = !executeEval && !executeRepl && !executeEntrypoint;\n\n /**\n * Unresolved. May point to a symlink, not realpath. May be missing file extension\n * NOTE: resolution relative to cwd option (not `process.cwd()`) is legacy backwards-compat; should be changed in next major: https://github.com/TypeStrong/ts-node/issues/1834\n */\n const entryPointPath = executeEntrypoint\n ? isCli\n ? resolve(cwd, restArgs[0])\n : resolve(restArgs[0])\n : undefined;\n\n return {\n executeEval,\n executeEntrypoint,\n executeRepl,\n executeStdin,\n entryPointPath,\n };\n}\n\nfunction phase4(payload: BootstrapState) {\n const { isInChildProcess, tsNodeScript } = payload;\n const { version, showConfig, restArgs, code, print, argv } =\n payload.parseArgvResult;\n const { cwd } = payload.phase2Result!;\n const { preloadedConfig } = payload.phase3Result!;\n\n const {\n entryPointPath,\n executeEntrypoint,\n executeEval,\n executeRepl,\n executeStdin,\n } = getEntryPointInfo(payload);\n\n /**\n * , [stdin], and [eval] are all essentially virtual files that do not exist on disc and are backed by a REPL\n * service to handle eval-ing of code.\n */\n interface VirtualFileState {\n state: EvalState;\n repl: ReplService;\n module?: Module;\n }\n let evalStuff: VirtualFileState | undefined;\n let replStuff: VirtualFileState | undefined;\n let stdinStuff: VirtualFileState | undefined;\n let evalAwarePartialHost: EvalAwarePartialHost | undefined = undefined;\n if (executeEval) {\n const state = new EvalState(join(cwd, EVAL_FILENAME));\n evalStuff = {\n state,\n repl: createRepl({\n state,\n composeWithEvalAwarePartialHost: evalAwarePartialHost,\n ignoreDiagnosticsThatAreAnnoyingInInteractiveRepl: false,\n }),\n };\n ({ evalAwarePartialHost } = evalStuff.repl);\n // Create a local module instance based on `cwd`.\n const module = (evalStuff.module = new Module(EVAL_NAME));\n module.filename = evalStuff.state.path;\n module.paths = (Module as any)._nodeModulePaths(cwd);\n }\n if (executeStdin) {\n const state = new EvalState(join(cwd, STDIN_FILENAME));\n stdinStuff = {\n state,\n repl: createRepl({\n state,\n composeWithEvalAwarePartialHost: evalAwarePartialHost,\n ignoreDiagnosticsThatAreAnnoyingInInteractiveRepl: false,\n }),\n };\n ({ evalAwarePartialHost } = stdinStuff.repl);\n // Create a local module instance based on `cwd`.\n const module = (stdinStuff.module = new Module(STDIN_NAME));\n module.filename = stdinStuff.state.path;\n module.paths = (Module as any)._nodeModulePaths(cwd);\n }\n if (executeRepl) {\n const state = new EvalState(join(cwd, REPL_FILENAME));\n replStuff = {\n state,\n repl: createRepl({\n state,\n composeWithEvalAwarePartialHost: evalAwarePartialHost,\n }),\n };\n ({ evalAwarePartialHost } = replStuff.repl);\n }\n\n // Register the TypeScript compiler instance.\n const service = createFromPreloadedConfig({\n // Since this struct may have been marshalled across thread or process boundaries, we must restore\n // un-marshall-able values.\n ...preloadedConfig,\n options: {\n ...preloadedConfig.options,\n readFile: evalAwarePartialHost?.readFile ?? undefined,\n fileExists: evalAwarePartialHost?.fileExists ?? undefined,\n tsTrace: DEFAULTS.tsTrace,\n },\n });\n register(service);\n if (isInChildProcess)\n (\n require('./child/child-loader') as typeof import('./child/child-loader')\n ).lateBindHooks(createEsmHooks(service));\n\n // Bind REPL service to ts-node compiler service (chicken-and-egg problem)\n replStuff?.repl.setService(service);\n evalStuff?.repl.setService(service);\n stdinStuff?.repl.setService(service);\n\n // Output project information.\n if (version === 2) {\n console.log(`ts-node v${VERSION}`);\n console.log(`node ${process.version}`);\n console.log(`compiler v${service.ts.version}`);\n process.exit(0);\n }\n if (version >= 3) {\n console.log(`ts-node v${VERSION} ${dirname(__dirname)}`);\n console.log(`node ${process.version}`);\n console.log(\n `compiler v${service.ts.version} ${service.compilerPath ?? ''}`\n );\n process.exit(0);\n }\n\n if (showConfig) {\n const ts = service.ts as any as TSInternal;\n if (typeof ts.convertToTSConfig !== 'function') {\n console.error(\n 'Error: --showConfig requires a typescript versions >=3.2 that support --showConfig'\n );\n process.exit(1);\n }\n let moduleTypes = undefined;\n if (service.options.moduleTypes) {\n // Assumption: this codepath requires CLI invocation, so moduleTypes must have come from a tsconfig, not API.\n const showRelativeTo = dirname(service.configFilePath!);\n moduleTypes = {} as Record;\n for (const [key, value] of Object.entries(service.options.moduleTypes)) {\n moduleTypes[\n relative(\n showRelativeTo,\n resolve(service.options.optionBasePaths?.moduleTypes!, key)\n )\n ] = value;\n }\n }\n const json = {\n ['ts-node']: {\n ...service.options,\n require: service.options.require?.length\n ? service.options.require\n : undefined,\n moduleTypes,\n optionBasePaths: undefined,\n compilerOptions: undefined,\n project: service.configFilePath ?? service.options.project,\n },\n ...ts.convertToTSConfig(\n service.config,\n service.configFilePath ?? join(cwd, 'ts-node-implicit-tsconfig.json'),\n service.ts.sys\n ),\n };\n console.log(\n // Assumes that all configuration options which can possibly be specified via the CLI are JSON-compatible.\n // If, in the future, we must log functions, for example readFile and fileExists, then we can implement a JSON\n // replacer function.\n JSON.stringify(json, null, 2)\n );\n process.exit(0);\n }\n\n // Prepend `ts-node` arguments to CLI for child processes.\n process.execArgv.push(\n tsNodeScript,\n ...argv.slice(2, argv.length - restArgs.length)\n );\n\n // TODO this comes from BootstrapState\n process.argv = [process.argv[1]]\n .concat(executeEntrypoint ? ([entryPointPath] as string[]) : [])\n .concat(restArgs.slice(executeEntrypoint ? 1 : 0));\n\n // Execute the main contents (either eval, script or piped).\n if (executeEntrypoint) {\n if (\n payload.isInChildProcess &&\n versionGteLt(process.versions.node, '18.6.0')\n ) {\n // HACK workaround node regression\n require('../dist-raw/runmain-hack.js').run(entryPointPath);\n } else {\n Module.runMain();\n }\n } else {\n // Note: eval and repl may both run, but never with stdin.\n // If stdin runs, eval and repl will not.\n if (executeEval) {\n addBuiltinLibsToObject(global);\n evalAndExitOnTsError(\n evalStuff!.repl,\n evalStuff!.module!,\n code!,\n print,\n 'eval'\n );\n }\n\n if (executeRepl) {\n replStuff!.repl.start();\n }\n\n if (executeStdin) {\n let buffer = code || '';\n process.stdin.on('data', (chunk: Buffer) => (buffer += chunk));\n process.stdin.on('end', () => {\n evalAndExitOnTsError(\n stdinStuff!.repl,\n stdinStuff!.module!,\n buffer,\n // `echo 123 | node -p` still prints 123\n print,\n 'stdin'\n );\n });\n }\n }\n}\n\n/**\n * Get project search path from args.\n */\nfunction getProjectSearchDir(\n cwd?: string,\n scriptMode?: boolean,\n cwdMode?: boolean,\n scriptPath?: string\n) {\n // Validate `--script-mode` / `--cwd-mode` / `--cwd` usage is correct.\n if (scriptMode && cwdMode) {\n throw new TypeError('--cwd-mode cannot be combined with --script-mode');\n }\n if (scriptMode && !scriptPath) {\n throw new TypeError(\n '--script-mode must be used with a script name, e.g. `ts-node --script-mode `'\n );\n }\n const doScriptMode =\n scriptMode === true ? true : cwdMode === true ? false : !!scriptPath;\n if (doScriptMode) {\n // Use node's own resolution behavior to ensure we follow symlinks.\n // scriptPath may omit file extension or point to a directory with or without package.json.\n // This happens before we are registered, so we tell node's resolver to consider ts, tsx, and jsx files.\n // In extremely rare cases, is is technically possible to resolve the wrong directory,\n // because we do not yet know preferTsExts, jsx, nor allowJs.\n // See also, justification why this will not happen in real-world situations:\n // https://github.com/TypeStrong/ts-node/pull/1009#issuecomment-613017081\n const exts = ['.js', '.jsx', '.ts', '.tsx'];\n const extsTemporarilyInstalled: string[] = [];\n for (const ext of exts) {\n if (!hasOwnProperty(require.extensions, ext)) {\n extsTemporarilyInstalled.push(ext);\n require.extensions[ext] = function () {};\n }\n }\n try {\n return dirname(requireResolveNonCached(scriptPath!));\n } finally {\n for (const ext of extsTemporarilyInstalled) {\n delete require.extensions[ext];\n }\n }\n }\n\n return cwd;\n}\n\nconst guaranteedNonexistentDirectoryPrefix = resolve(__dirname, 'doesnotexist');\nlet guaranteedNonexistentDirectorySuffix = 0;\n\n/**\n * require.resolve an absolute path, tricking node into *not* caching the results.\n * Necessary so that we do not pollute require.resolve cache prior to installing require.extensions\n *\n * Is a terrible hack, because node does not expose the necessary cache invalidation APIs\n * https://stackoverflow.com/questions/59865584/how-to-invalidate-cached-require-resolve-results\n */\nfunction requireResolveNonCached(absoluteModuleSpecifier: string) {\n // node <= 12.1.x fallback: The trick below triggers a node bug on old versions.\n // On these old versions, pollute the require cache instead. This is a deliberate\n // ts-node limitation that will *rarely* manifest, and will not matter once node 12\n // is end-of-life'd on 2022-04-30\n const isSupportedNodeVersion = versionGteLt(process.versions.node, '12.2.0');\n if (!isSupportedNodeVersion) return require.resolve(absoluteModuleSpecifier);\n\n const { dir, base } = parsePath(absoluteModuleSpecifier);\n const relativeModuleSpecifier = `./${base}`;\n\n const req = createRequire(\n join(dir, 'imaginaryUncacheableRequireResolveScript')\n );\n return req.resolve(relativeModuleSpecifier, {\n paths: [\n `${guaranteedNonexistentDirectoryPrefix}${guaranteedNonexistentDirectorySuffix++}`,\n ...(req.resolve.paths(relativeModuleSpecifier) || []),\n ],\n });\n}\n\n/**\n * Evaluate an [eval] or [stdin] script\n */\nfunction evalAndExitOnTsError(\n replService: ReplService,\n module: Module,\n code: string,\n isPrinted: boolean,\n filenameAndDirname: 'eval' | 'stdin'\n) {\n let result: any;\n setupContext(global, module, filenameAndDirname);\n\n try {\n result = replService.evalCode(code);\n } catch (error) {\n if (error instanceof TSError) {\n console.error(error);\n process.exit(1);\n }\n\n throw error;\n }\n\n if (isPrinted) {\n console.log(\n typeof result === 'string'\n ? result\n : inspect(result, { colors: process.stdout.isTTY })\n );\n }\n}\n\nif (require.main === module) {\n main();\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/child/argv-payload.d.ts b/node_modules/ts-node/dist/child/argv-payload.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/ts-node/dist/child/argv-payload.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/ts-node/dist/child/argv-payload.js b/node_modules/ts-node/dist/child/argv-payload.js new file mode 100644 index 0000000..669e747 --- /dev/null +++ b/node_modules/ts-node/dist/child/argv-payload.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.decompress = exports.compress = exports.argPrefix = void 0; +const zlib_1 = require("zlib"); +/** @internal */ +exports.argPrefix = '--brotli-base64-config='; +/** @internal */ +function compress(object) { + return (0, zlib_1.brotliCompressSync)(Buffer.from(JSON.stringify(object), 'utf8'), { + [zlib_1.constants.BROTLI_PARAM_QUALITY]: zlib_1.constants.BROTLI_MIN_QUALITY, + }).toString('base64'); +} +exports.compress = compress; +/** @internal */ +function decompress(str) { + return JSON.parse((0, zlib_1.brotliDecompressSync)(Buffer.from(str, 'base64')).toString()); +} +exports.decompress = decompress; +//# sourceMappingURL=argv-payload.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/child/argv-payload.js.map b/node_modules/ts-node/dist/child/argv-payload.js.map new file mode 100644 index 0000000..84a3b8f --- /dev/null +++ b/node_modules/ts-node/dist/child/argv-payload.js.map @@ -0,0 +1 @@ +{"version":3,"file":"argv-payload.js","sourceRoot":"","sources":["../../src/child/argv-payload.ts"],"names":[],"mappings":";;;AAAA,+BAA2E;AAE3E,gBAAgB;AACH,QAAA,SAAS,GAAG,yBAAyB,CAAC;AAEnD,gBAAgB;AAChB,SAAgB,QAAQ,CAAC,MAAW;IAClC,OAAO,IAAA,yBAAkB,EAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,EAAE;QACrE,CAAC,gBAAS,CAAC,oBAAoB,CAAC,EAAE,gBAAS,CAAC,kBAAkB;KAC/D,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACxB,CAAC;AAJD,4BAIC;AAED,gBAAgB;AAChB,SAAgB,UAAU,CAAC,GAAW;IACpC,OAAO,IAAI,CAAC,KAAK,CACf,IAAA,2BAAoB,EAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE,CAC5D,CAAC;AACJ,CAAC;AAJD,gCAIC","sourcesContent":["import { brotliCompressSync, brotliDecompressSync, constants } from 'zlib';\n\n/** @internal */\nexport const argPrefix = '--brotli-base64-config=';\n\n/** @internal */\nexport function compress(object: any) {\n return brotliCompressSync(Buffer.from(JSON.stringify(object), 'utf8'), {\n [constants.BROTLI_PARAM_QUALITY]: constants.BROTLI_MIN_QUALITY,\n }).toString('base64');\n}\n\n/** @internal */\nexport function decompress(str: string) {\n return JSON.parse(\n brotliDecompressSync(Buffer.from(str, 'base64')).toString()\n );\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/child/child-entrypoint.d.ts b/node_modules/ts-node/dist/child/child-entrypoint.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/ts-node/dist/child/child-entrypoint.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/ts-node/dist/child/child-entrypoint.js b/node_modules/ts-node/dist/child/child-entrypoint.js new file mode 100644 index 0000000..f498b4c --- /dev/null +++ b/node_modules/ts-node/dist/child/child-entrypoint.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const bin_1 = require("../bin"); +const argv_payload_1 = require("./argv-payload"); +const base64ConfigArg = process.argv[2]; +if (!base64ConfigArg.startsWith(argv_payload_1.argPrefix)) + throw new Error('unexpected argv'); +const base64Payload = base64ConfigArg.slice(argv_payload_1.argPrefix.length); +const state = (0, argv_payload_1.decompress)(base64Payload); +state.isInChildProcess = true; +state.tsNodeScript = __filename; +state.parseArgvResult.argv = process.argv; +state.parseArgvResult.restArgs = process.argv.slice(3); +// Modify and re-compress the payload delivered to subsequent child processes. +// This logic may be refactored into bin.ts by https://github.com/TypeStrong/ts-node/issues/1831 +if (state.isCli) { + const stateForChildren = { + ...state, + isCli: false, + }; + state.parseArgvResult.argv[2] = `${argv_payload_1.argPrefix}${(0, argv_payload_1.compress)(stateForChildren)}`; +} +(0, bin_1.bootstrap)(state); +//# sourceMappingURL=child-entrypoint.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/child/child-entrypoint.js.map b/node_modules/ts-node/dist/child/child-entrypoint.js.map new file mode 100644 index 0000000..bdab0f0 --- /dev/null +++ b/node_modules/ts-node/dist/child/child-entrypoint.js.map @@ -0,0 +1 @@ +{"version":3,"file":"child-entrypoint.js","sourceRoot":"","sources":["../../src/child/child-entrypoint.ts"],"names":[],"mappings":";;AAAA,gCAAmD;AACnD,iDAAiE;AAEjE,MAAM,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACxC,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,wBAAS,CAAC;IAAE,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;AAC/E,MAAM,aAAa,GAAG,eAAe,CAAC,KAAK,CAAC,wBAAS,CAAC,MAAM,CAAC,CAAC;AAC9D,MAAM,KAAK,GAAG,IAAA,yBAAU,EAAC,aAAa,CAAmB,CAAC;AAE1D,KAAK,CAAC,gBAAgB,GAAG,IAAI,CAAC;AAC9B,KAAK,CAAC,YAAY,GAAG,UAAU,CAAC;AAChC,KAAK,CAAC,eAAe,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;AAC1C,KAAK,CAAC,eAAe,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAEvD,8EAA8E;AAC9E,gGAAgG;AAChG,IAAI,KAAK,CAAC,KAAK,EAAE;IACf,MAAM,gBAAgB,GAAmB;QACvC,GAAG,KAAK;QACR,KAAK,EAAE,KAAK;KACb,CAAC;IACF,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,GAAG,wBAAS,GAAG,IAAA,uBAAQ,EAAC,gBAAgB,CAAC,EAAE,CAAC;CAC7E;AAED,IAAA,eAAS,EAAC,KAAK,CAAC,CAAC","sourcesContent":["import { BootstrapState, bootstrap } from '../bin';\nimport { argPrefix, compress, decompress } from './argv-payload';\n\nconst base64ConfigArg = process.argv[2];\nif (!base64ConfigArg.startsWith(argPrefix)) throw new Error('unexpected argv');\nconst base64Payload = base64ConfigArg.slice(argPrefix.length);\nconst state = decompress(base64Payload) as BootstrapState;\n\nstate.isInChildProcess = true;\nstate.tsNodeScript = __filename;\nstate.parseArgvResult.argv = process.argv;\nstate.parseArgvResult.restArgs = process.argv.slice(3);\n\n// Modify and re-compress the payload delivered to subsequent child processes.\n// This logic may be refactored into bin.ts by https://github.com/TypeStrong/ts-node/issues/1831\nif (state.isCli) {\n const stateForChildren: BootstrapState = {\n ...state,\n isCli: false,\n };\n state.parseArgvResult.argv[2] = `${argPrefix}${compress(stateForChildren)}`;\n}\n\nbootstrap(state);\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/child/child-loader.d.ts b/node_modules/ts-node/dist/child/child-loader.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/ts-node/dist/child/child-loader.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/ts-node/dist/child/child-loader.js b/node_modules/ts-node/dist/child/child-loader.js new file mode 100644 index 0000000..a56286e --- /dev/null +++ b/node_modules/ts-node/dist/child/child-loader.js @@ -0,0 +1,32 @@ +"use strict"; +var _a; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.transformSource = exports.getFormat = exports.load = exports.resolve = exports.lateBindHooks = void 0; +const esm_1 = require("../esm"); +let hooks; +/** @internal */ +function lateBindHooks(_hooks) { + hooks = _hooks; +} +exports.lateBindHooks = lateBindHooks; +const proxy = { + resolve(...args) { + var _a; + return ((_a = hooks === null || hooks === void 0 ? void 0 : hooks.resolve) !== null && _a !== void 0 ? _a : args[2])(...args); + }, + load(...args) { + var _a; + return ((_a = hooks === null || hooks === void 0 ? void 0 : hooks.load) !== null && _a !== void 0 ? _a : args[2])(...args); + }, + getFormat(...args) { + var _a; + return ((_a = hooks === null || hooks === void 0 ? void 0 : hooks.getFormat) !== null && _a !== void 0 ? _a : args[2])(...args); + }, + transformSource(...args) { + var _a; + return ((_a = hooks === null || hooks === void 0 ? void 0 : hooks.transformSource) !== null && _a !== void 0 ? _a : args[2])(...args); + }, +}; +/** @internal */ +_a = (0, esm_1.filterHooksByAPIVersion)(proxy), exports.resolve = _a.resolve, exports.load = _a.load, exports.getFormat = _a.getFormat, exports.transformSource = _a.transformSource; +//# sourceMappingURL=child-loader.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/child/child-loader.js.map b/node_modules/ts-node/dist/child/child-loader.js.map new file mode 100644 index 0000000..3c59ed6 --- /dev/null +++ b/node_modules/ts-node/dist/child/child-loader.js.map @@ -0,0 +1 @@ +{"version":3,"file":"child-loader.js","sourceRoot":"","sources":["../../src/child/child-loader.ts"],"names":[],"mappings":";;;;AACA,gCAAiD;AAEjD,IAAI,KAAgD,CAAC;AAErD,gBAAgB;AAChB,SAAgB,aAAa,CAC3B,MAAiD;IAEjD,KAAK,GAAG,MAAmD,CAAC;AAC9D,CAAC;AAJD,sCAIC;AAED,MAAM,KAAK,GAA8C;IACvD,OAAO,CAAC,GAAG,IAAgD;;QACzD,OAAO,CAAC,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,mCAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAC9C,CAAC;IACD,IAAI,CAAC,GAAG,IAA6C;;QACnD,OAAO,CAAC,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,mCAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAC3C,CAAC;IACD,SAAS,CAAC,GAAG,IAAkD;;QAC7D,OAAO,CAAC,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,SAAS,mCAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAChD,CAAC;IACD,eAAe,CAAC,GAAG,IAAwD;;QACzE,OAAO,CAAC,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,eAAe,mCAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IACtD,CAAC;CACF,CAAC;AAEF,gBAAgB;AACH,KACX,IAAA,6BAAuB,EAAC,KAAK,CAA8C,EAD9D,eAAO,eAAE,YAAI,YAAE,iBAAS,iBAAE,uBAAe,sBACsB","sourcesContent":["import type { NodeLoaderHooksAPI1, NodeLoaderHooksAPI2 } from '..';\nimport { filterHooksByAPIVersion } from '../esm';\n\nlet hooks: NodeLoaderHooksAPI1 & NodeLoaderHooksAPI2;\n\n/** @internal */\nexport function lateBindHooks(\n _hooks: NodeLoaderHooksAPI1 | NodeLoaderHooksAPI2\n) {\n hooks = _hooks as NodeLoaderHooksAPI1 & NodeLoaderHooksAPI2;\n}\n\nconst proxy: NodeLoaderHooksAPI1 & NodeLoaderHooksAPI2 = {\n resolve(...args: Parameters) {\n return (hooks?.resolve ?? args[2])(...args);\n },\n load(...args: Parameters) {\n return (hooks?.load ?? args[2])(...args);\n },\n getFormat(...args: Parameters) {\n return (hooks?.getFormat ?? args[2])(...args);\n },\n transformSource(...args: Parameters) {\n return (hooks?.transformSource ?? args[2])(...args);\n },\n};\n\n/** @internal */\nexport const { resolve, load, getFormat, transformSource } =\n filterHooksByAPIVersion(proxy) as NodeLoaderHooksAPI1 & NodeLoaderHooksAPI2;\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/child/child-require.d.ts b/node_modules/ts-node/dist/child/child-require.d.ts new file mode 100644 index 0000000..1dae4d8 --- /dev/null +++ b/node_modules/ts-node/dist/child/child-require.d.ts @@ -0,0 +1,7 @@ +interface EventEmitterInternals { + _events: Record>; +} +declare const _process: EventEmitterInternals; +declare let originalOnWarning: Function | undefined; +declare const messageMatch: RegExp; +declare function onWarning(this: any, warning: Error, ...rest: any[]): any; diff --git a/node_modules/ts-node/dist/child/child-require.js b/node_modules/ts-node/dist/child/child-require.js new file mode 100644 index 0000000..2dbde85 --- /dev/null +++ b/node_modules/ts-node/dist/child/child-require.js @@ -0,0 +1,22 @@ +"use strict"; +const _process = process; +// Not shown here: Additional logic to correctly interact with process's events, either using this direct manipulation, or via the API +let originalOnWarning; +if (Array.isArray(_process._events.warning)) { + originalOnWarning = _process._events.warning[0]; + _process._events.warning[0] = onWarning; +} +else { + originalOnWarning = _process._events.warning; + _process._events.warning = onWarning; +} +const messageMatch = /(?:--(?:experimental-)?loader\b|\bCustom ESM Loaders\b)/; +function onWarning(warning, ...rest) { + // Suppress warning about how `--loader` is experimental + if ((warning === null || warning === void 0 ? void 0 : warning.name) === 'ExperimentalWarning' && + messageMatch.test(warning === null || warning === void 0 ? void 0 : warning.message)) + return; + // Will be undefined if `--no-warnings` + return originalOnWarning === null || originalOnWarning === void 0 ? void 0 : originalOnWarning.call(this, warning, ...rest); +} +//# sourceMappingURL=child-require.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/child/child-require.js.map b/node_modules/ts-node/dist/child/child-require.js.map new file mode 100644 index 0000000..51f712c --- /dev/null +++ b/node_modules/ts-node/dist/child/child-require.js.map @@ -0,0 +1 @@ +{"version":3,"file":"child-require.js","sourceRoot":"","sources":["../../src/child/child-require.ts"],"names":[],"mappings":";AAGA,MAAM,QAAQ,GAAG,OAAuC,CAAC;AAEzD,sIAAsI;AAEtI,IAAI,iBAAuC,CAAC;AAC5C,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;IAC3C,iBAAiB,GAAG,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAChD,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;CACzC;KAAM;IACL,iBAAiB,GAAG,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC;IAC7C,QAAQ,CAAC,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC;CACtC;AAED,MAAM,YAAY,GAAG,yDAAyD,CAAC;AAC/E,SAAS,SAAS,CAAY,OAAc,EAAE,GAAG,IAAW;IAC1D,wDAAwD;IACxD,IACE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,MAAK,qBAAqB;QACvC,YAAY,CAAC,IAAI,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAC;QAEnC,OAAO;IACT,uCAAuC;IACvC,OAAO,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;AACzD,CAAC","sourcesContent":["interface EventEmitterInternals {\n _events: Record>;\n}\nconst _process = process as any as EventEmitterInternals;\n\n// Not shown here: Additional logic to correctly interact with process's events, either using this direct manipulation, or via the API\n\nlet originalOnWarning: Function | undefined;\nif (Array.isArray(_process._events.warning)) {\n originalOnWarning = _process._events.warning[0];\n _process._events.warning[0] = onWarning;\n} else {\n originalOnWarning = _process._events.warning;\n _process._events.warning = onWarning;\n}\n\nconst messageMatch = /(?:--(?:experimental-)?loader\\b|\\bCustom ESM Loaders\\b)/;\nfunction onWarning(this: any, warning: Error, ...rest: any[]) {\n // Suppress warning about how `--loader` is experimental\n if (\n warning?.name === 'ExperimentalWarning' &&\n messageMatch.test(warning?.message)\n )\n return;\n // Will be undefined if `--no-warnings`\n return originalOnWarning?.call(this, warning, ...rest);\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/child/spawn-child.d.ts b/node_modules/ts-node/dist/child/spawn-child.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/ts-node/dist/child/spawn-child.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/ts-node/dist/child/spawn-child.js b/node_modules/ts-node/dist/child/spawn-child.js new file mode 100644 index 0000000..6efdfd7 --- /dev/null +++ b/node_modules/ts-node/dist/child/spawn-child.js @@ -0,0 +1,49 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.callInChild = void 0; +const child_process_1 = require("child_process"); +const url_1 = require("url"); +const util_1 = require("../util"); +const argv_payload_1 = require("./argv-payload"); +/** + * @internal + * @param state Bootstrap state to be transferred into the child process. + * @param targetCwd Working directory to be preserved when transitioning to + * the child process. + */ +function callInChild(state) { + if (!(0, util_1.versionGteLt)(process.versions.node, '12.17.0')) { + throw new Error('`ts-node-esm` and `ts-node --esm` require node version 12.17.0 or newer.'); + } + const child = (0, child_process_1.spawn)(process.execPath, [ + '--require', + require.resolve('./child-require.js'), + '--loader', + // Node on Windows doesn't like `c:\` absolute paths here; must be `file:///c:/` + (0, url_1.pathToFileURL)(require.resolve('../../child-loader.mjs')).toString(), + require.resolve('./child-entrypoint.js'), + `${argv_payload_1.argPrefix}${(0, argv_payload_1.compress)(state)}`, + ...state.parseArgvResult.restArgs, + ], { + stdio: 'inherit', + argv0: process.argv0, + }); + child.on('error', (error) => { + console.error(error); + process.exit(1); + }); + child.on('exit', (code) => { + child.removeAllListeners(); + process.off('SIGINT', sendSignalToChild); + process.off('SIGTERM', sendSignalToChild); + process.exitCode = code === null ? 1 : code; + }); + // Ignore sigint and sigterm in parent; pass them to child + process.on('SIGINT', sendSignalToChild); + process.on('SIGTERM', sendSignalToChild); + function sendSignalToChild(signal) { + process.kill(child.pid, signal); + } +} +exports.callInChild = callInChild; +//# sourceMappingURL=spawn-child.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/child/spawn-child.js.map b/node_modules/ts-node/dist/child/spawn-child.js.map new file mode 100644 index 0000000..12e7f60 --- /dev/null +++ b/node_modules/ts-node/dist/child/spawn-child.js.map @@ -0,0 +1 @@ +{"version":3,"file":"spawn-child.js","sourceRoot":"","sources":["../../src/child/spawn-child.ts"],"names":[],"mappings":";;;AACA,iDAAsC;AACtC,6BAAoC;AACpC,kCAAuC;AACvC,iDAAqD;AAErD;;;;;GAKG;AACH,SAAgB,WAAW,CAAC,KAAqB;IAC/C,IAAI,CAAC,IAAA,mBAAY,EAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE;QACnD,MAAM,IAAI,KAAK,CACb,0EAA0E,CAC3E,CAAC;KACH;IACD,MAAM,KAAK,GAAG,IAAA,qBAAK,EACjB,OAAO,CAAC,QAAQ,EAChB;QACE,WAAW;QACX,OAAO,CAAC,OAAO,CAAC,oBAAoB,CAAC;QACrC,UAAU;QACV,gFAAgF;QAChF,IAAA,mBAAa,EAAC,OAAO,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC,CAAC,QAAQ,EAAE;QACnE,OAAO,CAAC,OAAO,CAAC,uBAAuB,CAAC;QACxC,GAAG,wBAAS,GAAG,IAAA,uBAAQ,EAAC,KAAK,CAAC,EAAE;QAChC,GAAG,KAAK,CAAC,eAAe,CAAC,QAAQ;KAClC,EACD;QACE,KAAK,EAAE,SAAS;QAChB,KAAK,EAAE,OAAO,CAAC,KAAK;KACrB,CACF,CAAC;IACF,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;QAC1B,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;IACH,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;QACxB,KAAK,CAAC,kBAAkB,EAAE,CAAC;QAC3B,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAC;QACzC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;QAC1C,OAAO,CAAC,QAAQ,GAAG,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC9C,CAAC,CAAC,CAAC;IACH,0DAA0D;IAC1D,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAC;IACxC,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;IACzC,SAAS,iBAAiB,CAAC,MAAc;QACvC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAClC,CAAC;AACH,CAAC;AAvCD,kCAuCC","sourcesContent":["import type { BootstrapState } from '../bin';\nimport { spawn } from 'child_process';\nimport { pathToFileURL } from 'url';\nimport { versionGteLt } from '../util';\nimport { argPrefix, compress } from './argv-payload';\n\n/**\n * @internal\n * @param state Bootstrap state to be transferred into the child process.\n * @param targetCwd Working directory to be preserved when transitioning to\n * the child process.\n */\nexport function callInChild(state: BootstrapState) {\n if (!versionGteLt(process.versions.node, '12.17.0')) {\n throw new Error(\n '`ts-node-esm` and `ts-node --esm` require node version 12.17.0 or newer.'\n );\n }\n const child = spawn(\n process.execPath,\n [\n '--require',\n require.resolve('./child-require.js'),\n '--loader',\n // Node on Windows doesn't like `c:\\` absolute paths here; must be `file:///c:/`\n pathToFileURL(require.resolve('../../child-loader.mjs')).toString(),\n require.resolve('./child-entrypoint.js'),\n `${argPrefix}${compress(state)}`,\n ...state.parseArgvResult.restArgs,\n ],\n {\n stdio: 'inherit',\n argv0: process.argv0,\n }\n );\n child.on('error', (error) => {\n console.error(error);\n process.exit(1);\n });\n child.on('exit', (code) => {\n child.removeAllListeners();\n process.off('SIGINT', sendSignalToChild);\n process.off('SIGTERM', sendSignalToChild);\n process.exitCode = code === null ? 1 : code;\n });\n // Ignore sigint and sigterm in parent; pass them to child\n process.on('SIGINT', sendSignalToChild);\n process.on('SIGTERM', sendSignalToChild);\n function sendSignalToChild(signal: string) {\n process.kill(child.pid, signal);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/cjs-resolve-hooks.d.ts b/node_modules/ts-node/dist/cjs-resolve-hooks.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/ts-node/dist/cjs-resolve-hooks.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/ts-node/dist/cjs-resolve-hooks.js b/node_modules/ts-node/dist/cjs-resolve-hooks.js new file mode 100644 index 0000000..8e05695 --- /dev/null +++ b/node_modules/ts-node/dist/cjs-resolve-hooks.js @@ -0,0 +1,29 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.installCommonjsResolveHooksIfNecessary = void 0; +/** + * @internal + */ +function installCommonjsResolveHooksIfNecessary(tsNodeService) { + const Module = require('module'); + const originalResolveFilename = Module._resolveFilename; + const originalFindPath = Module._findPath; + const shouldInstallHook = tsNodeService.options.experimentalResolver; + if (shouldInstallHook) { + const { Module_findPath, Module_resolveFilename } = tsNodeService.getNodeCjsLoader(); + Module._resolveFilename = _resolveFilename; + Module._findPath = _findPath; + function _resolveFilename(request, parent, isMain, options, ...rest) { + if (!tsNodeService.enabled()) + return originalResolveFilename.call(this, request, parent, isMain, options, ...rest); + return Module_resolveFilename.call(this, request, parent, isMain, options, ...rest); + } + function _findPath() { + if (!tsNodeService.enabled()) + return originalFindPath.apply(this, arguments); + return Module_findPath.apply(this, arguments); + } + } +} +exports.installCommonjsResolveHooksIfNecessary = installCommonjsResolveHooksIfNecessary; +//# sourceMappingURL=cjs-resolve-hooks.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/cjs-resolve-hooks.js.map b/node_modules/ts-node/dist/cjs-resolve-hooks.js.map new file mode 100644 index 0000000..3f49b7d --- /dev/null +++ b/node_modules/ts-node/dist/cjs-resolve-hooks.js.map @@ -0,0 +1 @@ +{"version":3,"file":"cjs-resolve-hooks.js","sourceRoot":"","sources":["../src/cjs-resolve-hooks.ts"],"names":[],"mappings":";;;AAoBA;;GAEG;AACH,SAAgB,sCAAsC,CAAC,aAAsB;IAC3E,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAmC,CAAC;IACnE,MAAM,uBAAuB,GAAG,MAAM,CAAC,gBAAgB,CAAC;IACxD,MAAM,gBAAgB,GAAG,MAAM,CAAC,SAAS,CAAC;IAC1C,MAAM,iBAAiB,GAAG,aAAa,CAAC,OAAO,CAAC,oBAAoB,CAAC;IACrE,IAAI,iBAAiB,EAAE;QACrB,MAAM,EAAE,eAAe,EAAE,sBAAsB,EAAE,GAC/C,aAAa,CAAC,gBAAgB,EAAE,CAAC;QACnC,MAAM,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QAC3C,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;QAC7B,SAAS,gBAAgB,CAEvB,OAAe,EACf,MAAe,EACf,MAAgB,EAChB,OAAsC,EACtC,GAAG,IAAQ;YAEX,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE;gBAC1B,OAAO,uBAAuB,CAAC,IAAI,CACjC,IAAI,EACJ,OAAO,EACP,MAAM,EACN,MAAM,EACN,OAAO,EACP,GAAG,IAAI,CACR,CAAC;YAEJ,OAAO,sBAAsB,CAAC,IAAI,CAChC,IAAI,EACJ,OAAO,EACP,MAAM,EACN,MAAM,EACN,OAAO,EACP,GAAG,IAAI,CACR,CAAC;QACJ,CAAC;QACD,SAAS,SAAS;YAChB,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE;gBAC1B,OAAO,gBAAgB,CAAC,KAAK,CAAC,IAAI,EAAE,SAAgB,CAAC,CAAC;YACxD,OAAO,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,SAAgB,CAAC,CAAC;QACvD,CAAC;KACF;AACH,CAAC;AA3CD,wFA2CC","sourcesContent":["import type Module = require('module');\nimport type { Service } from '.';\n\n/** @internal */\nexport type ModuleConstructorWithInternals = typeof Module & {\n _resolveFilename(\n request: string,\n parent?: Module,\n isMain?: boolean,\n options?: ModuleResolveFilenameOptions,\n ...rest: any[]\n ): string;\n _preloadModules(requests?: string[]): void;\n _findPath(request: string, paths: string[], isMain: boolean): string;\n};\n\ninterface ModuleResolveFilenameOptions {\n paths?: Array;\n}\n\n/**\n * @internal\n */\nexport function installCommonjsResolveHooksIfNecessary(tsNodeService: Service) {\n const Module = require('module') as ModuleConstructorWithInternals;\n const originalResolveFilename = Module._resolveFilename;\n const originalFindPath = Module._findPath;\n const shouldInstallHook = tsNodeService.options.experimentalResolver;\n if (shouldInstallHook) {\n const { Module_findPath, Module_resolveFilename } =\n tsNodeService.getNodeCjsLoader();\n Module._resolveFilename = _resolveFilename;\n Module._findPath = _findPath;\n function _resolveFilename(\n this: any,\n request: string,\n parent?: Module,\n isMain?: boolean,\n options?: ModuleResolveFilenameOptions,\n ...rest: []\n ): string {\n if (!tsNodeService.enabled())\n return originalResolveFilename.call(\n this,\n request,\n parent,\n isMain,\n options,\n ...rest\n );\n\n return Module_resolveFilename.call(\n this,\n request,\n parent,\n isMain,\n options,\n ...rest\n );\n }\n function _findPath(this: any): string {\n if (!tsNodeService.enabled())\n return originalFindPath.apply(this, arguments as any);\n return Module_findPath.apply(this, arguments as any);\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/configuration.d.ts b/node_modules/ts-node/dist/configuration.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/ts-node/dist/configuration.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/ts-node/dist/configuration.js b/node_modules/ts-node/dist/configuration.js new file mode 100644 index 0000000..2e55dcd --- /dev/null +++ b/node_modules/ts-node/dist/configuration.js @@ -0,0 +1,308 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getTsConfigDefaults = exports.ComputeAsCommonRootOfFiles = exports.loadCompiler = exports.resolveAndLoadCompiler = exports.readConfig = exports.findAndReadConfig = void 0; +const path_1 = require("path"); +const index_1 = require("./index"); +const ts_internals_1 = require("./ts-internals"); +const tsconfigs_1 = require("./tsconfigs"); +const util_1 = require("./util"); +/** + * TypeScript compiler option values required by `ts-node` which cannot be overridden. + */ +const TS_NODE_COMPILER_OPTIONS = { + sourceMap: true, + inlineSourceMap: false, + inlineSources: true, + declaration: false, + noEmit: false, + outDir: '.ts-node', +}; +/* + * Do post-processing on config options to support `ts-node`. + */ +function fixConfig(ts, config) { + // Delete options that *should not* be passed through. + delete config.options.out; + delete config.options.outFile; + delete config.options.composite; + delete config.options.declarationDir; + delete config.options.declarationMap; + delete config.options.emitDeclarationOnly; + // Target ES5 output by default (instead of ES3). + if (config.options.target === undefined) { + config.options.target = ts.ScriptTarget.ES5; + } + // Target CommonJS modules by default (instead of magically switching to ES6 when the target is ES6). + if (config.options.module === undefined) { + config.options.module = ts.ModuleKind.CommonJS; + } + return config; +} +/** @internal */ +function findAndReadConfig(rawOptions) { + var _a, _b, _c, _d, _e; + const cwd = (0, path_1.resolve)((_c = (_b = (_a = rawOptions.cwd) !== null && _a !== void 0 ? _a : rawOptions.dir) !== null && _b !== void 0 ? _b : index_1.DEFAULTS.cwd) !== null && _c !== void 0 ? _c : process.cwd()); + const compilerName = (_d = rawOptions.compiler) !== null && _d !== void 0 ? _d : index_1.DEFAULTS.compiler; + // Compute minimum options to read the config file. + let projectLocalResolveDir = (0, util_1.getBasePathForProjectLocalDependencyResolution)(undefined, rawOptions.projectSearchDir, rawOptions.project, cwd); + let { compiler, ts } = resolveAndLoadCompiler(compilerName, projectLocalResolveDir); + // Read config file and merge new options between env and CLI options. + const { configFilePath, config, tsNodeOptionsFromTsconfig, optionBasePaths } = readConfig(cwd, ts, rawOptions); + const options = (0, util_1.assign)({}, index_1.DEFAULTS, tsNodeOptionsFromTsconfig || {}, { optionBasePaths }, rawOptions); + options.require = [ + ...(tsNodeOptionsFromTsconfig.require || []), + ...(rawOptions.require || []), + ]; + // Re-resolve the compiler in case it has changed. + // Compiler is loaded relative to tsconfig.json, so tsconfig discovery may cause us to load a + // different compiler than we did above, even if the name has not changed. + if (configFilePath) { + projectLocalResolveDir = (0, util_1.getBasePathForProjectLocalDependencyResolution)(configFilePath, rawOptions.projectSearchDir, rawOptions.project, cwd); + ({ compiler } = resolveCompiler(options.compiler, (_e = optionBasePaths.compiler) !== null && _e !== void 0 ? _e : projectLocalResolveDir)); + } + return { + options, + config, + projectLocalResolveDir, + optionBasePaths, + configFilePath, + cwd, + compiler, + }; +} +exports.findAndReadConfig = findAndReadConfig; +/** + * Load TypeScript configuration. Returns the parsed TypeScript config and + * any `ts-node` options specified in the config file. + * + * Even when a tsconfig.json is not loaded, this function still handles merging + * compilerOptions from various sources: API, environment variables, etc. + * + * @internal + */ +function readConfig(cwd, ts, rawApiOptions) { + var _a, _b, _c; + // Ordered [a, b, c] where config a extends b extends c + const configChain = []; + let config = { compilerOptions: {} }; + let basePath = cwd; + let configFilePath = undefined; + const projectSearchDir = (0, path_1.resolve)(cwd, (_a = rawApiOptions.projectSearchDir) !== null && _a !== void 0 ? _a : cwd); + const { fileExists = ts.sys.fileExists, readFile = ts.sys.readFile, skipProject = index_1.DEFAULTS.skipProject, project = index_1.DEFAULTS.project, tsTrace = index_1.DEFAULTS.tsTrace, } = rawApiOptions; + // Read project configuration when available. + if (!skipProject) { + if (project) { + const resolved = (0, path_1.resolve)(cwd, project); + const nested = (0, path_1.join)(resolved, 'tsconfig.json'); + configFilePath = fileExists(nested) ? nested : resolved; + } + else { + configFilePath = ts.findConfigFile(projectSearchDir, fileExists); + } + if (configFilePath) { + let pathToNextConfigInChain = configFilePath; + const tsInternals = (0, ts_internals_1.createTsInternals)(ts); + const errors = []; + // Follow chain of "extends" + while (true) { + const result = ts.readConfigFile(pathToNextConfigInChain, readFile); + // Return diagnostics. + if (result.error) { + return { + configFilePath, + config: { errors: [result.error], fileNames: [], options: {} }, + tsNodeOptionsFromTsconfig: {}, + optionBasePaths: {}, + }; + } + const c = result.config; + const bp = (0, path_1.dirname)(pathToNextConfigInChain); + configChain.push({ + config: c, + basePath: bp, + configPath: pathToNextConfigInChain, + }); + if (c.extends == null) + break; + const resolvedExtendedConfigPath = tsInternals.getExtendsConfigPath(c.extends, { + fileExists, + readDirectory: ts.sys.readDirectory, + readFile, + useCaseSensitiveFileNames: ts.sys.useCaseSensitiveFileNames, + trace: tsTrace, + }, bp, errors, ts.createCompilerDiagnostic); + if (errors.length) { + return { + configFilePath, + config: { errors, fileNames: [], options: {} }, + tsNodeOptionsFromTsconfig: {}, + optionBasePaths: {}, + }; + } + if (resolvedExtendedConfigPath == null) + break; + pathToNextConfigInChain = resolvedExtendedConfigPath; + } + ({ config, basePath } = configChain[0]); + } + } + // Merge and fix ts-node options that come from tsconfig.json(s) + const tsNodeOptionsFromTsconfig = {}; + const optionBasePaths = {}; + for (let i = configChain.length - 1; i >= 0; i--) { + const { config, basePath, configPath } = configChain[i]; + const options = filterRecognizedTsConfigTsNodeOptions(config['ts-node']).recognized; + // Some options are relative to the config file, so must be converted to absolute paths here + if (options.require) { + // Modules are found relative to the tsconfig file, not the `dir` option + const tsconfigRelativeResolver = (0, util_1.createProjectLocalResolveHelper)((0, path_1.dirname)(configPath)); + options.require = options.require.map((path) => tsconfigRelativeResolver(path, false)); + } + if (options.scopeDir) { + options.scopeDir = (0, path_1.resolve)(basePath, options.scopeDir); + } + // Downstream code uses the basePath; we do not do that here. + if (options.moduleTypes) { + optionBasePaths.moduleTypes = basePath; + } + if (options.transpiler != null) { + optionBasePaths.transpiler = basePath; + } + if (options.compiler != null) { + optionBasePaths.compiler = basePath; + } + if (options.swc != null) { + optionBasePaths.swc = basePath; + } + (0, util_1.assign)(tsNodeOptionsFromTsconfig, options); + } + // Remove resolution of "files". + const files = (_c = (_b = rawApiOptions.files) !== null && _b !== void 0 ? _b : tsNodeOptionsFromTsconfig.files) !== null && _c !== void 0 ? _c : index_1.DEFAULTS.files; + // Only if a config file is *not* loaded, load an implicit configuration from @tsconfig/bases + const skipDefaultCompilerOptions = configFilePath != null; + const defaultCompilerOptionsForNodeVersion = skipDefaultCompilerOptions + ? undefined + : { + ...(0, tsconfigs_1.getDefaultTsconfigJsonForNodeVersion)(ts).compilerOptions, + types: ['node'], + }; + // Merge compilerOptions from all sources + config.compilerOptions = Object.assign({}, + // automatically-applied options from @tsconfig/bases + defaultCompilerOptionsForNodeVersion, + // tsconfig.json "compilerOptions" + config.compilerOptions, + // from env var + index_1.DEFAULTS.compilerOptions, + // tsconfig.json "ts-node": "compilerOptions" + tsNodeOptionsFromTsconfig.compilerOptions, + // passed programmatically + rawApiOptions.compilerOptions, + // overrides required by ts-node, cannot be changed + TS_NODE_COMPILER_OPTIONS); + const fixedConfig = fixConfig(ts, ts.parseJsonConfigFileContent(config, { + fileExists, + readFile, + // Only used for globbing "files", "include", "exclude" + // When `files` option disabled, we want to avoid the fs calls + readDirectory: files ? ts.sys.readDirectory : () => [], + useCaseSensitiveFileNames: ts.sys.useCaseSensitiveFileNames, + }, basePath, undefined, configFilePath)); + return { + configFilePath, + config: fixedConfig, + tsNodeOptionsFromTsconfig, + optionBasePaths, + }; +} +exports.readConfig = readConfig; +/** + * Load the typescript compiler. It is required to load the tsconfig but might + * be changed by the tsconfig, so we have to do this twice. + * @internal + */ +function resolveAndLoadCompiler(name, relativeToPath) { + const { compiler } = resolveCompiler(name, relativeToPath); + const ts = loadCompiler(compiler); + return { compiler, ts }; +} +exports.resolveAndLoadCompiler = resolveAndLoadCompiler; +function resolveCompiler(name, relativeToPath) { + const projectLocalResolveHelper = (0, util_1.createProjectLocalResolveHelper)(relativeToPath); + const compiler = projectLocalResolveHelper(name || 'typescript', true); + return { compiler }; +} +/** @internal */ +function loadCompiler(compiler) { + return (0, util_1.attemptRequireWithV8CompileCache)(require, compiler); +} +exports.loadCompiler = loadCompiler; +/** + * Given the raw "ts-node" sub-object from a tsconfig, return an object with only the properties + * recognized by "ts-node" + */ +function filterRecognizedTsConfigTsNodeOptions(jsonObject) { + if (jsonObject == null) + return { recognized: {}, unrecognized: {} }; + const { compiler, compilerHost, compilerOptions, emit, files, ignore, ignoreDiagnostics, logError, preferTsExts, pretty, require, skipIgnore, transpileOnly, typeCheck, transpiler, scope, scopeDir, moduleTypes, experimentalReplAwait, swc, experimentalResolver, esm, experimentalSpecifierResolution, experimentalTsImportSpecifiers, ...unrecognized } = jsonObject; + const filteredTsConfigOptions = { + compiler, + compilerHost, + compilerOptions, + emit, + experimentalReplAwait, + files, + ignore, + ignoreDiagnostics, + logError, + preferTsExts, + pretty, + require, + skipIgnore, + transpileOnly, + typeCheck, + transpiler, + scope, + scopeDir, + moduleTypes, + swc, + experimentalResolver, + esm, + experimentalSpecifierResolution, + experimentalTsImportSpecifiers, + }; + // Use the typechecker to make sure this implementation has the correct set of properties + const catchExtraneousProps = null; + const catchMissingProps = null; + return { recognized: filteredTsConfigOptions, unrecognized }; +} +/** @internal */ +exports.ComputeAsCommonRootOfFiles = Symbol(); +/** + * Some TS compiler options have defaults which are not provided by TS's config parsing functions. + * This function centralizes the logic for computing those defaults. + * @internal + */ +function getTsConfigDefaults(config, basePath, _files, _include, _exclude) { + const { composite = false } = config.options; + let rootDir = config.options.rootDir; + if (rootDir == null) { + if (composite) + rootDir = basePath; + // Return this symbol to avoid computing from `files`, which would require fs calls + else + rootDir = exports.ComputeAsCommonRootOfFiles; + } + const { outDir = rootDir } = config.options; + // Docs are wrong: https://www.typescriptlang.org/tsconfig#include + // Docs say **, but it's actually **/*; compiler throws error for ** + const include = _files ? [] : ['**/*']; + const files = _files !== null && _files !== void 0 ? _files : []; + // Docs are misleading: https://www.typescriptlang.org/tsconfig#exclude + // Docs say it excludes node_modules, bower_components, jspm_packages, but actually those are excluded via behavior of "include" + const exclude = _exclude !== null && _exclude !== void 0 ? _exclude : [outDir]; // TODO technically, outDir is absolute path, but exclude should be relative glob pattern? + // TODO compute baseUrl + return { rootDir, outDir, include, files, exclude, composite }; +} +exports.getTsConfigDefaults = getTsConfigDefaults; +//# sourceMappingURL=configuration.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/configuration.js.map b/node_modules/ts-node/dist/configuration.js.map new file mode 100644 index 0000000..392a32f --- /dev/null +++ b/node_modules/ts-node/dist/configuration.js.map @@ -0,0 +1 @@ +{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../src/configuration.ts"],"names":[],"mappings":";;;AAAA,+BAA8C;AAE9C,mCAOiB;AAEjB,iDAAmD;AACnD,2CAAmE;AACnE,iCAKgB;AAEhB;;GAEG;AACH,MAAM,wBAAwB,GAAG;IAC/B,SAAS,EAAE,IAAI;IACf,eAAe,EAAE,KAAK;IACtB,aAAa,EAAE,IAAI;IACnB,WAAW,EAAE,KAAK;IAClB,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,UAAU;CACnB,CAAC;AAEF;;GAEG;AACH,SAAS,SAAS,CAAC,EAAY,EAAE,MAA6B;IAC5D,sDAAsD;IACtD,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC;IAC1B,OAAO,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC;IAC9B,OAAO,MAAM,CAAC,OAAO,CAAC,SAAS,CAA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QAAA,0BAA0B,GAAG,MAAM,EAAE,CAAC;AAEnD;;;;GAIG;AACH,SAAgB,mBAAmB,CACjC,MAA6B,EAC7B,QAAgB,EAChB,MAA4B,EAC5B,QAA8B,EAC9B,QAA8B;IAE9B,MAAM,EAAE,SAAS,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC;IAC7C,IAAI,OAAO,GACT,MAAM,CAAC,OAAO,CAAC,OAAQ,CAAC;IAC1B,IAAI,OAAO,IAAI,IAAI,EAAE;QACnB,IAAI,SAAS;YAAE,OAAO,GAAG,QAAQ,CAAC;QAClC,mFAAmF;;YAC9E,OAAO,GAAG,kCAA0B,CAAC;KAC3C;IACD,MAAM,EAAE,MAAM,GAAG,OAAO,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC;IAC5C,kEAAkE;IAClE,oEAAoE;IACpE,MAAM,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IACvC,MAAM,KAAK,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAC;IAC3B,uEAAuE;IACvE,gIAAgI;IAChI,MAAM,OAAO,GAAG,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,CAAC,MAAM,CAAC,CAAC,CAAC,0FAA0F;IAEhI,uBAAuB;IAEvB,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;AACjE,CAAC;AA3BD,kDA2BC","sourcesContent":["import { resolve, dirname, join } from 'path';\nimport type * as _ts from 'typescript';\nimport {\n CreateOptions,\n DEFAULTS,\n OptionBasePaths,\n RegisterOptions,\n TSCommon,\n TsConfigOptions,\n} from './index';\nimport type { TSInternal } from './ts-compiler-types';\nimport { createTsInternals } from './ts-internals';\nimport { getDefaultTsconfigJsonForNodeVersion } from './tsconfigs';\nimport {\n assign,\n attemptRequireWithV8CompileCache,\n createProjectLocalResolveHelper,\n getBasePathForProjectLocalDependencyResolution,\n} from './util';\n\n/**\n * TypeScript compiler option values required by `ts-node` which cannot be overridden.\n */\nconst TS_NODE_COMPILER_OPTIONS = {\n sourceMap: true,\n inlineSourceMap: false,\n inlineSources: true,\n declaration: false,\n noEmit: false,\n outDir: '.ts-node',\n};\n\n/*\n * Do post-processing on config options to support `ts-node`.\n */\nfunction fixConfig(ts: TSCommon, config: _ts.ParsedCommandLine) {\n // Delete options that *should not* be passed through.\n delete config.options.out;\n delete config.options.outFile;\n delete config.options.composite;\n delete config.options.declarationDir;\n delete config.options.declarationMap;\n delete config.options.emitDeclarationOnly;\n\n // Target ES5 output by default (instead of ES3).\n if (config.options.target === undefined) {\n config.options.target = ts.ScriptTarget.ES5;\n }\n\n // Target CommonJS modules by default (instead of magically switching to ES6 when the target is ES6).\n if (config.options.module === undefined) {\n config.options.module = ts.ModuleKind.CommonJS;\n }\n\n return config;\n}\n\n/** @internal */\nexport function findAndReadConfig(rawOptions: CreateOptions) {\n const cwd = resolve(\n rawOptions.cwd ?? rawOptions.dir ?? DEFAULTS.cwd ?? process.cwd()\n );\n const compilerName = rawOptions.compiler ?? DEFAULTS.compiler;\n\n // Compute minimum options to read the config file.\n let projectLocalResolveDir = getBasePathForProjectLocalDependencyResolution(\n undefined,\n rawOptions.projectSearchDir,\n rawOptions.project,\n cwd\n );\n let { compiler, ts } = resolveAndLoadCompiler(\n compilerName,\n projectLocalResolveDir\n );\n\n // Read config file and merge new options between env and CLI options.\n const { configFilePath, config, tsNodeOptionsFromTsconfig, optionBasePaths } =\n readConfig(cwd, ts, rawOptions);\n\n const options = assign(\n {},\n DEFAULTS,\n tsNodeOptionsFromTsconfig || {},\n { optionBasePaths },\n rawOptions\n );\n options.require = [\n ...(tsNodeOptionsFromTsconfig.require || []),\n ...(rawOptions.require || []),\n ];\n\n // Re-resolve the compiler in case it has changed.\n // Compiler is loaded relative to tsconfig.json, so tsconfig discovery may cause us to load a\n // different compiler than we did above, even if the name has not changed.\n if (configFilePath) {\n projectLocalResolveDir = getBasePathForProjectLocalDependencyResolution(\n configFilePath,\n rawOptions.projectSearchDir,\n rawOptions.project,\n cwd\n );\n ({ compiler } = resolveCompiler(\n options.compiler,\n optionBasePaths.compiler ?? projectLocalResolveDir\n ));\n }\n\n return {\n options,\n config,\n projectLocalResolveDir,\n optionBasePaths,\n configFilePath,\n cwd,\n compiler,\n };\n}\n\n/**\n * Load TypeScript configuration. Returns the parsed TypeScript config and\n * any `ts-node` options specified in the config file.\n *\n * Even when a tsconfig.json is not loaded, this function still handles merging\n * compilerOptions from various sources: API, environment variables, etc.\n *\n * @internal\n */\nexport function readConfig(\n cwd: string,\n ts: TSCommon,\n rawApiOptions: CreateOptions\n): {\n /**\n * Path of tsconfig file if one was loaded\n */\n configFilePath: string | undefined;\n /**\n * Parsed TypeScript configuration with compilerOptions merged from all other sources (env vars, etc)\n */\n config: _ts.ParsedCommandLine;\n /**\n * ts-node options pulled from `tsconfig.json`, NOT merged with any other sources. Merging must happen outside\n * this function.\n */\n tsNodeOptionsFromTsconfig: TsConfigOptions;\n optionBasePaths: OptionBasePaths;\n} {\n // Ordered [a, b, c] where config a extends b extends c\n const configChain: Array<{\n config: any;\n basePath: string;\n configPath: string;\n }> = [];\n let config: any = { compilerOptions: {} };\n let basePath = cwd;\n let configFilePath: string | undefined = undefined;\n const projectSearchDir = resolve(cwd, rawApiOptions.projectSearchDir ?? cwd);\n\n const {\n fileExists = ts.sys.fileExists,\n readFile = ts.sys.readFile,\n skipProject = DEFAULTS.skipProject,\n project = DEFAULTS.project,\n tsTrace = DEFAULTS.tsTrace,\n } = rawApiOptions;\n\n // Read project configuration when available.\n if (!skipProject) {\n if (project) {\n const resolved = resolve(cwd, project);\n const nested = join(resolved, 'tsconfig.json');\n configFilePath = fileExists(nested) ? nested : resolved;\n } else {\n configFilePath = ts.findConfigFile(projectSearchDir, fileExists);\n }\n\n if (configFilePath) {\n let pathToNextConfigInChain = configFilePath;\n const tsInternals = createTsInternals(ts);\n const errors: Array<_ts.Diagnostic> = [];\n\n // Follow chain of \"extends\"\n while (true) {\n const result = ts.readConfigFile(pathToNextConfigInChain, readFile);\n\n // Return diagnostics.\n if (result.error) {\n return {\n configFilePath,\n config: { errors: [result.error], fileNames: [], options: {} },\n tsNodeOptionsFromTsconfig: {},\n optionBasePaths: {},\n };\n }\n\n const c = result.config;\n const bp = dirname(pathToNextConfigInChain);\n configChain.push({\n config: c,\n basePath: bp,\n configPath: pathToNextConfigInChain,\n });\n\n if (c.extends == null) break;\n const resolvedExtendedConfigPath = tsInternals.getExtendsConfigPath(\n c.extends,\n {\n fileExists,\n readDirectory: ts.sys.readDirectory,\n readFile,\n useCaseSensitiveFileNames: ts.sys.useCaseSensitiveFileNames,\n trace: tsTrace,\n },\n bp,\n errors,\n (ts as unknown as TSInternal).createCompilerDiagnostic\n );\n if (errors.length) {\n return {\n configFilePath,\n config: { errors, fileNames: [], options: {} },\n tsNodeOptionsFromTsconfig: {},\n optionBasePaths: {},\n };\n }\n if (resolvedExtendedConfigPath == null) break;\n pathToNextConfigInChain = resolvedExtendedConfigPath;\n }\n\n ({ config, basePath } = configChain[0]);\n }\n }\n\n // Merge and fix ts-node options that come from tsconfig.json(s)\n const tsNodeOptionsFromTsconfig: TsConfigOptions = {};\n const optionBasePaths: OptionBasePaths = {};\n for (let i = configChain.length - 1; i >= 0; i--) {\n const { config, basePath, configPath } = configChain[i];\n const options = filterRecognizedTsConfigTsNodeOptions(\n config['ts-node']\n ).recognized;\n\n // Some options are relative to the config file, so must be converted to absolute paths here\n if (options.require) {\n // Modules are found relative to the tsconfig file, not the `dir` option\n const tsconfigRelativeResolver = createProjectLocalResolveHelper(\n dirname(configPath)\n );\n options.require = options.require.map((path: string) =>\n tsconfigRelativeResolver(path, false)\n );\n }\n if (options.scopeDir) {\n options.scopeDir = resolve(basePath, options.scopeDir!);\n }\n\n // Downstream code uses the basePath; we do not do that here.\n if (options.moduleTypes) {\n optionBasePaths.moduleTypes = basePath;\n }\n if (options.transpiler != null) {\n optionBasePaths.transpiler = basePath;\n }\n if (options.compiler != null) {\n optionBasePaths.compiler = basePath;\n }\n if (options.swc != null) {\n optionBasePaths.swc = basePath;\n }\n\n assign(tsNodeOptionsFromTsconfig, options);\n }\n\n // Remove resolution of \"files\".\n const files =\n rawApiOptions.files ?? tsNodeOptionsFromTsconfig.files ?? DEFAULTS.files;\n\n // Only if a config file is *not* loaded, load an implicit configuration from @tsconfig/bases\n const skipDefaultCompilerOptions = configFilePath != null;\n const defaultCompilerOptionsForNodeVersion = skipDefaultCompilerOptions\n ? undefined\n : {\n ...getDefaultTsconfigJsonForNodeVersion(ts).compilerOptions,\n types: ['node'],\n };\n\n // Merge compilerOptions from all sources\n config.compilerOptions = Object.assign(\n {},\n // automatically-applied options from @tsconfig/bases\n defaultCompilerOptionsForNodeVersion,\n // tsconfig.json \"compilerOptions\"\n config.compilerOptions,\n // from env var\n DEFAULTS.compilerOptions,\n // tsconfig.json \"ts-node\": \"compilerOptions\"\n tsNodeOptionsFromTsconfig.compilerOptions,\n // passed programmatically\n rawApiOptions.compilerOptions,\n // overrides required by ts-node, cannot be changed\n TS_NODE_COMPILER_OPTIONS\n );\n\n const fixedConfig = fixConfig(\n ts,\n ts.parseJsonConfigFileContent(\n config,\n {\n fileExists,\n readFile,\n // Only used for globbing \"files\", \"include\", \"exclude\"\n // When `files` option disabled, we want to avoid the fs calls\n readDirectory: files ? ts.sys.readDirectory : () => [],\n useCaseSensitiveFileNames: ts.sys.useCaseSensitiveFileNames,\n },\n basePath,\n undefined,\n configFilePath\n )\n );\n\n return {\n configFilePath,\n config: fixedConfig,\n tsNodeOptionsFromTsconfig,\n optionBasePaths,\n };\n}\n\n/**\n * Load the typescript compiler. It is required to load the tsconfig but might\n * be changed by the tsconfig, so we have to do this twice.\n * @internal\n */\nexport function resolveAndLoadCompiler(\n name: string | undefined,\n relativeToPath: string\n) {\n const { compiler } = resolveCompiler(name, relativeToPath);\n const ts = loadCompiler(compiler);\n return { compiler, ts };\n}\n\nfunction resolveCompiler(name: string | undefined, relativeToPath: string) {\n const projectLocalResolveHelper =\n createProjectLocalResolveHelper(relativeToPath);\n const compiler = projectLocalResolveHelper(name || 'typescript', true);\n return { compiler };\n}\n\n/** @internal */\nexport function loadCompiler(compiler: string): TSCommon {\n return attemptRequireWithV8CompileCache(require, compiler);\n}\n\n/**\n * Given the raw \"ts-node\" sub-object from a tsconfig, return an object with only the properties\n * recognized by \"ts-node\"\n */\nfunction filterRecognizedTsConfigTsNodeOptions(jsonObject: any): {\n recognized: TsConfigOptions;\n unrecognized: any;\n} {\n if (jsonObject == null) return { recognized: {}, unrecognized: {} };\n const {\n compiler,\n compilerHost,\n compilerOptions,\n emit,\n files,\n ignore,\n ignoreDiagnostics,\n logError,\n preferTsExts,\n pretty,\n require,\n skipIgnore,\n transpileOnly,\n typeCheck,\n transpiler,\n scope,\n scopeDir,\n moduleTypes,\n experimentalReplAwait,\n swc,\n experimentalResolver,\n esm,\n experimentalSpecifierResolution,\n experimentalTsImportSpecifiers,\n ...unrecognized\n } = jsonObject as TsConfigOptions;\n const filteredTsConfigOptions = {\n compiler,\n compilerHost,\n compilerOptions,\n emit,\n experimentalReplAwait,\n files,\n ignore,\n ignoreDiagnostics,\n logError,\n preferTsExts,\n pretty,\n require,\n skipIgnore,\n transpileOnly,\n typeCheck,\n transpiler,\n scope,\n scopeDir,\n moduleTypes,\n swc,\n experimentalResolver,\n esm,\n experimentalSpecifierResolution,\n experimentalTsImportSpecifiers,\n };\n // Use the typechecker to make sure this implementation has the correct set of properties\n const catchExtraneousProps: keyof TsConfigOptions =\n null as any as keyof typeof filteredTsConfigOptions;\n const catchMissingProps: keyof typeof filteredTsConfigOptions =\n null as any as keyof TsConfigOptions;\n return { recognized: filteredTsConfigOptions, unrecognized };\n}\n\n/** @internal */\nexport const ComputeAsCommonRootOfFiles = Symbol();\n\n/**\n * Some TS compiler options have defaults which are not provided by TS's config parsing functions.\n * This function centralizes the logic for computing those defaults.\n * @internal\n */\nexport function getTsConfigDefaults(\n config: _ts.ParsedCommandLine,\n basePath: string,\n _files: string[] | undefined,\n _include: string[] | undefined,\n _exclude: string[] | undefined\n) {\n const { composite = false } = config.options;\n let rootDir: string | typeof ComputeAsCommonRootOfFiles =\n config.options.rootDir!;\n if (rootDir == null) {\n if (composite) rootDir = basePath;\n // Return this symbol to avoid computing from `files`, which would require fs calls\n else rootDir = ComputeAsCommonRootOfFiles;\n }\n const { outDir = rootDir } = config.options;\n // Docs are wrong: https://www.typescriptlang.org/tsconfig#include\n // Docs say **, but it's actually **/*; compiler throws error for **\n const include = _files ? [] : ['**/*'];\n const files = _files ?? [];\n // Docs are misleading: https://www.typescriptlang.org/tsconfig#exclude\n // Docs say it excludes node_modules, bower_components, jspm_packages, but actually those are excluded via behavior of \"include\"\n const exclude = _exclude ?? [outDir]; // TODO technically, outDir is absolute path, but exclude should be relative glob pattern?\n\n // TODO compute baseUrl\n\n return { rootDir, outDir, include, files, exclude, composite };\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/esm.d.ts b/node_modules/ts-node/dist/esm.d.ts new file mode 100644 index 0000000..bbd0e23 --- /dev/null +++ b/node_modules/ts-node/dist/esm.d.ts @@ -0,0 +1,53 @@ +/// +/// +import { Service } from './index'; +export interface NodeLoaderHooksAPI1 { + resolve: NodeLoaderHooksAPI1.ResolveHook; + getFormat: NodeLoaderHooksAPI1.GetFormatHook; + transformSource: NodeLoaderHooksAPI1.TransformSourceHook; +} +export declare namespace NodeLoaderHooksAPI1 { + type ResolveHook = NodeLoaderHooksAPI2.ResolveHook; + type GetFormatHook = (url: string, context: {}, defaultGetFormat: GetFormatHook) => Promise<{ + format: NodeLoaderHooksFormat; + }>; + type TransformSourceHook = (source: string | Buffer, context: { + url: string; + format: NodeLoaderHooksFormat; + }, defaultTransformSource: NodeLoaderHooksAPI1.TransformSourceHook) => Promise<{ + source: string | Buffer; + }>; +} +export interface NodeLoaderHooksAPI2 { + resolve: NodeLoaderHooksAPI2.ResolveHook; + load: NodeLoaderHooksAPI2.LoadHook; +} +export declare namespace NodeLoaderHooksAPI2 { + type ResolveHook = (specifier: string, context: { + conditions?: NodeImportConditions; + importAssertions?: NodeImportAssertions; + parentURL: string; + }, defaultResolve: ResolveHook) => Promise<{ + url: string; + format?: NodeLoaderHooksFormat; + shortCircuit?: boolean; + }>; + type LoadHook = (url: string, context: { + format: NodeLoaderHooksFormat | null | undefined; + importAssertions?: NodeImportAssertions; + }, defaultLoad: NodeLoaderHooksAPI2['load']) => Promise<{ + format: NodeLoaderHooksFormat; + source: string | Buffer | undefined; + shortCircuit?: boolean; + }>; + type NodeImportConditions = unknown; + interface NodeImportAssertions { + type?: 'json'; + } +} +export declare type NodeLoaderHooksFormat = 'builtin' | 'commonjs' | 'dynamic' | 'json' | 'module' | 'wasm'; +export declare type NodeImportConditions = unknown; +export interface NodeImportAssertions { + type?: 'json'; +} +export declare function createEsmHooks(tsNodeService: Service): NodeLoaderHooksAPI1 | NodeLoaderHooksAPI2; diff --git a/node_modules/ts-node/dist/esm.js b/node_modules/ts-node/dist/esm.js new file mode 100644 index 0000000..33a6b6b --- /dev/null +++ b/node_modules/ts-node/dist/esm.js @@ -0,0 +1,228 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createEsmHooks = exports.registerAndCreateEsmHooks = exports.filterHooksByAPIVersion = void 0; +const index_1 = require("./index"); +const url_1 = require("url"); +const path_1 = require("path"); +const assert = require("assert"); +const util_1 = require("./util"); +const module_1 = require("module"); +// The hooks API changed in node version X so we need to check for backwards compatibility. +const newHooksAPI = (0, util_1.versionGteLt)(process.versions.node, '16.12.0'); +/** @internal */ +function filterHooksByAPIVersion(hooks) { + const { getFormat, load, resolve, transformSource } = hooks; + // Explicit return type to avoid TS's non-ideal inferred type + const hooksAPI = newHooksAPI + ? { resolve, load, getFormat: undefined, transformSource: undefined } + : { resolve, getFormat, transformSource, load: undefined }; + return hooksAPI; +} +exports.filterHooksByAPIVersion = filterHooksByAPIVersion; +/** @internal */ +function registerAndCreateEsmHooks(opts) { + // Automatically performs registration just like `-r ts-node/register` + const tsNodeInstance = (0, index_1.register)(opts); + return createEsmHooks(tsNodeInstance); +} +exports.registerAndCreateEsmHooks = registerAndCreateEsmHooks; +function createEsmHooks(tsNodeService) { + tsNodeService.enableExperimentalEsmLoaderInterop(); + // Custom implementation that considers additional file extensions and automatically adds file extensions + const nodeResolveImplementation = tsNodeService.getNodeEsmResolver(); + const nodeGetFormatImplementation = tsNodeService.getNodeEsmGetFormat(); + const extensions = tsNodeService.extensions; + const hooksAPI = filterHooksByAPIVersion({ + resolve, + load, + getFormat, + transformSource, + }); + function isFileUrlOrNodeStyleSpecifier(parsed) { + // We only understand file:// URLs, but in node, the specifier can be a node-style `./foo` or `foo` + const { protocol } = parsed; + return protocol === null || protocol === 'file:'; + } + /** + * Named "probably" as a reminder that this is a guess. + * node does not explicitly tell us if we're resolving the entrypoint or not. + */ + function isProbablyEntrypoint(specifier, parentURL) { + return parentURL === undefined && specifier.startsWith('file://'); + } + // Side-channel between `resolve()` and `load()` hooks + const rememberIsProbablyEntrypoint = new Set(); + const rememberResolvedViaCommonjsFallback = new Set(); + async function resolve(specifier, context, defaultResolve) { + const defer = async () => { + const r = await defaultResolve(specifier, context, defaultResolve); + return r; + }; + // See: https://github.com/nodejs/node/discussions/41711 + // nodejs will likely implement a similar fallback. Till then, we can do our users a favor and fallback today. + async function entrypointFallback(cb) { + try { + const resolution = await cb(); + if ((resolution === null || resolution === void 0 ? void 0 : resolution.url) && + isProbablyEntrypoint(specifier, context.parentURL)) + rememberIsProbablyEntrypoint.add(resolution.url); + return resolution; + } + catch (esmResolverError) { + if (!isProbablyEntrypoint(specifier, context.parentURL)) + throw esmResolverError; + try { + let cjsSpecifier = specifier; + // Attempt to convert from ESM file:// to CommonJS path + try { + if (specifier.startsWith('file://')) + cjsSpecifier = (0, url_1.fileURLToPath)(specifier); + } + catch { } + const resolution = (0, url_1.pathToFileURL)((0, module_1.createRequire)(process.cwd()).resolve(cjsSpecifier)).toString(); + rememberIsProbablyEntrypoint.add(resolution); + rememberResolvedViaCommonjsFallback.add(resolution); + return { url: resolution, format: 'commonjs' }; + } + catch (commonjsResolverError) { + throw esmResolverError; + } + } + } + return addShortCircuitFlag(async () => { + const parsed = (0, url_1.parse)(specifier); + const { pathname, protocol, hostname } = parsed; + if (!isFileUrlOrNodeStyleSpecifier(parsed)) { + return entrypointFallback(defer); + } + if (protocol !== null && protocol !== 'file:') { + return entrypointFallback(defer); + } + // Malformed file:// URL? We should always see `null` or `''` + if (hostname) { + // TODO file://./foo sets `hostname` to `'.'`. Perhaps we should special-case this. + return entrypointFallback(defer); + } + // pathname is the path to be resolved + return entrypointFallback(() => nodeResolveImplementation.defaultResolve(specifier, context, defaultResolve)); + }); + } + // `load` from new loader hook API (See description at the top of this file) + async function load(url, context, defaultLoad) { + return addShortCircuitFlag(async () => { + var _a; + // If we get a format hint from resolve() on the context then use it + // otherwise call the old getFormat() hook using node's old built-in defaultGetFormat() that ships with ts-node + const format = (_a = context.format) !== null && _a !== void 0 ? _a : (await getFormat(url, context, nodeGetFormatImplementation.defaultGetFormat)).format; + let source = undefined; + if (format !== 'builtin' && format !== 'commonjs') { + // Call the new defaultLoad() to get the source + const { source: rawSource } = await defaultLoad(url, { + ...context, + format, + }, defaultLoad); + if (rawSource === undefined || rawSource === null) { + throw new Error(`Failed to load raw source: Format was '${format}' and url was '${url}''.`); + } + // Emulate node's built-in old defaultTransformSource() so we can re-use the old transformSource() hook + const defaultTransformSource = async (source, _context, _defaultTransformSource) => ({ source }); + // Call the old hook + const { source: transformedSource } = await transformSource(rawSource, { url, format }, defaultTransformSource); + source = transformedSource; + } + return { format, source }; + }); + } + async function getFormat(url, context, defaultGetFormat) { + const defer = (overrideUrl = url) => defaultGetFormat(overrideUrl, context, defaultGetFormat); + // See: https://github.com/nodejs/node/discussions/41711 + // nodejs will likely implement a similar fallback. Till then, we can do our users a favor and fallback today. + async function entrypointFallback(cb) { + try { + return await cb(); + } + catch (getFormatError) { + if (!rememberIsProbablyEntrypoint.has(url)) + throw getFormatError; + return { format: 'commonjs' }; + } + } + const parsed = (0, url_1.parse)(url); + if (!isFileUrlOrNodeStyleSpecifier(parsed)) { + return entrypointFallback(defer); + } + const { pathname } = parsed; + assert(pathname !== null, 'ESM getFormat() hook: URL should never have null pathname'); + const nativePath = (0, url_1.fileURLToPath)(url); + let nodeSays; + // If file has extension not understood by node, then ask node how it would treat the emitted extension. + // E.g. .mts compiles to .mjs, so ask node how to classify an .mjs file. + const ext = (0, path_1.extname)(nativePath); + const tsNodeIgnored = tsNodeService.ignored(nativePath); + const nodeEquivalentExt = extensions.nodeEquivalents.get(ext); + if (nodeEquivalentExt && !tsNodeIgnored) { + nodeSays = await entrypointFallback(() => defer((0, url_1.format)((0, url_1.pathToFileURL)(nativePath + nodeEquivalentExt)))); + } + else { + try { + nodeSays = await entrypointFallback(defer); + } + catch (e) { + if (e instanceof Error && + tsNodeIgnored && + extensions.nodeDoesNotUnderstand.includes(ext)) { + e.message += + `\n\n` + + `Hint:\n` + + `ts-node is configured to ignore this file.\n` + + `If you want ts-node to handle this file, consider enabling the "skipIgnore" option or adjusting your "ignore" patterns.\n` + + `https://typestrong.org/ts-node/docs/scope\n`; + } + throw e; + } + } + // For files compiled by ts-node that node believes are either CJS or ESM, check if we should override that classification + if (!tsNodeService.ignored(nativePath) && + (nodeSays.format === 'commonjs' || nodeSays.format === 'module')) { + const { moduleType } = tsNodeService.moduleTypeClassifier.classifyModuleByModuleTypeOverrides((0, util_1.normalizeSlashes)(nativePath)); + if (moduleType === 'cjs') { + return { format: 'commonjs' }; + } + else if (moduleType === 'esm') { + return { format: 'module' }; + } + } + return nodeSays; + } + async function transformSource(source, context, defaultTransformSource) { + if (source === null || source === undefined) { + throw new Error('No source'); + } + const defer = () => defaultTransformSource(source, context, defaultTransformSource); + const sourceAsString = typeof source === 'string' ? source : source.toString('utf8'); + const { url } = context; + const parsed = (0, url_1.parse)(url); + if (!isFileUrlOrNodeStyleSpecifier(parsed)) { + return defer(); + } + const nativePath = (0, url_1.fileURLToPath)(url); + if (tsNodeService.ignored(nativePath)) { + return defer(); + } + const emittedJs = tsNodeService.compile(sourceAsString, nativePath); + return { source: emittedJs }; + } + return hooksAPI; +} +exports.createEsmHooks = createEsmHooks; +async function addShortCircuitFlag(fn) { + const ret = await fn(); + // Not sure if this is necessary; being lazy. Can revisit in the future. + if (ret == null) + return ret; + return { + ...ret, + shortCircuit: true, + }; +} +//# sourceMappingURL=esm.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/esm.js.map b/node_modules/ts-node/dist/esm.js.map new file mode 100644 index 0000000..89b91ae --- /dev/null +++ b/node_modules/ts-node/dist/esm.js.map @@ -0,0 +1 @@ +{"version":3,"file":"esm.js","sourceRoot":"","sources":["../src/esm.ts"],"names":[],"mappings":";;;AAAA,mCAA6D;AAC7D,6BAMa;AACb,+BAA+B;AAC/B,iCAAiC;AACjC,iCAAwD;AACxD,mCAAuC;AAsFvC,2FAA2F;AAC3F,MAAM,WAAW,GAAG,IAAA,mBAAY,EAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AAEnE,gBAAgB;AAChB,SAAgB,uBAAuB,CACrC,KAAgD;IAEhD,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,KAAK,CAAC;IAC5D,6DAA6D;IAC7D,MAAM,QAAQ,GAA8C,WAAW;QACrE,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE;QACrE,CAAC,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAC7D,OAAO,QAAQ,CAAC;AAClB,CAAC;AATD,0DASC;AAED,gBAAgB;AAChB,SAAgB,yBAAyB,CAAC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IAAI;KACnB,CAAC;AACJ,CAAC","sourcesContent":["import { register, RegisterOptions, Service } from './index';\nimport {\n parse as parseUrl,\n format as formatUrl,\n UrlWithStringQuery,\n fileURLToPath,\n pathToFileURL,\n} from 'url';\nimport { extname } from 'path';\nimport * as assert from 'assert';\nimport { normalizeSlashes, versionGteLt } from './util';\nimport { createRequire } from 'module';\n\n// Note: On Windows, URLs look like this: file:///D:/dev/@TypeStrong/ts-node-examples/foo.ts\n\n// NOTE ABOUT MULTIPLE EXPERIMENTAL LOADER APIS\n//\n// At the time of writing, this file implements 2x different loader APIs.\n// Node made a breaking change to the loader API in https://github.com/nodejs/node/pull/37468\n//\n// We check the node version number and export either the *old* or the *new* API.\n//\n// Today, we are implementing the *new* API on top of our implementation of the *old* API,\n// which relies on copy-pasted code from the *old* hooks implementation in node.\n//\n// In the future, we will likely invert this: we will copy-paste the *new* API implementation\n// from node, build our implementation of the *new* API on top of it, and implement the *old*\n// hooks API as a shim to the *new* API.\n\nexport interface NodeLoaderHooksAPI1 {\n resolve: NodeLoaderHooksAPI1.ResolveHook;\n getFormat: NodeLoaderHooksAPI1.GetFormatHook;\n transformSource: NodeLoaderHooksAPI1.TransformSourceHook;\n}\nexport namespace NodeLoaderHooksAPI1 {\n export type ResolveHook = NodeLoaderHooksAPI2.ResolveHook;\n export type GetFormatHook = (\n url: string,\n context: {},\n defaultGetFormat: GetFormatHook\n ) => Promise<{ format: NodeLoaderHooksFormat }>;\n export type TransformSourceHook = (\n source: string | Buffer,\n context: { url: string; format: NodeLoaderHooksFormat },\n defaultTransformSource: NodeLoaderHooksAPI1.TransformSourceHook\n ) => Promise<{ source: string | Buffer }>;\n}\n\nexport interface NodeLoaderHooksAPI2 {\n resolve: NodeLoaderHooksAPI2.ResolveHook;\n load: NodeLoaderHooksAPI2.LoadHook;\n}\nexport namespace NodeLoaderHooksAPI2 {\n export type ResolveHook = (\n specifier: string,\n context: {\n conditions?: NodeImportConditions;\n importAssertions?: NodeImportAssertions;\n parentURL: string;\n },\n defaultResolve: ResolveHook\n ) => Promise<{\n url: string;\n format?: NodeLoaderHooksFormat;\n shortCircuit?: boolean;\n }>;\n export type LoadHook = (\n url: string,\n context: {\n format: NodeLoaderHooksFormat | null | undefined;\n importAssertions?: NodeImportAssertions;\n },\n defaultLoad: NodeLoaderHooksAPI2['load']\n ) => Promise<{\n format: NodeLoaderHooksFormat;\n source: string | Buffer | undefined;\n shortCircuit?: boolean;\n }>;\n export type NodeImportConditions = unknown;\n export interface NodeImportAssertions {\n type?: 'json';\n }\n}\n\nexport type NodeLoaderHooksFormat =\n | 'builtin'\n | 'commonjs'\n | 'dynamic'\n | 'json'\n | 'module'\n | 'wasm';\n\nexport type NodeImportConditions = unknown;\nexport interface NodeImportAssertions {\n type?: 'json';\n}\n\n// The hooks API changed in node version X so we need to check for backwards compatibility.\nconst newHooksAPI = versionGteLt(process.versions.node, '16.12.0');\n\n/** @internal */\nexport function filterHooksByAPIVersion(\n hooks: NodeLoaderHooksAPI1 & NodeLoaderHooksAPI2\n): NodeLoaderHooksAPI1 | NodeLoaderHooksAPI2 {\n const { getFormat, load, resolve, transformSource } = hooks;\n // Explicit return type to avoid TS's non-ideal inferred type\n const hooksAPI: NodeLoaderHooksAPI1 | NodeLoaderHooksAPI2 = newHooksAPI\n ? { resolve, load, getFormat: undefined, transformSource: undefined }\n : { resolve, getFormat, transformSource, load: undefined };\n return hooksAPI;\n}\n\n/** @internal */\nexport function registerAndCreateEsmHooks(opts?: RegisterOptions) {\n // Automatically performs registration just like `-r ts-node/register`\n const tsNodeInstance = register(opts);\n\n return createEsmHooks(tsNodeInstance);\n}\n\nexport function createEsmHooks(tsNodeService: Service) {\n tsNodeService.enableExperimentalEsmLoaderInterop();\n\n // Custom implementation that considers additional file extensions and automatically adds file extensions\n const nodeResolveImplementation = tsNodeService.getNodeEsmResolver();\n const nodeGetFormatImplementation = tsNodeService.getNodeEsmGetFormat();\n const extensions = tsNodeService.extensions;\n\n const hooksAPI = filterHooksByAPIVersion({\n resolve,\n load,\n getFormat,\n transformSource,\n });\n\n function isFileUrlOrNodeStyleSpecifier(parsed: UrlWithStringQuery) {\n // We only understand file:// URLs, but in node, the specifier can be a node-style `./foo` or `foo`\n const { protocol } = parsed;\n return protocol === null || protocol === 'file:';\n }\n\n /**\n * Named \"probably\" as a reminder that this is a guess.\n * node does not explicitly tell us if we're resolving the entrypoint or not.\n */\n function isProbablyEntrypoint(specifier: string, parentURL: string) {\n return parentURL === undefined && specifier.startsWith('file://');\n }\n // Side-channel between `resolve()` and `load()` hooks\n const rememberIsProbablyEntrypoint = new Set();\n const rememberResolvedViaCommonjsFallback = new Set();\n\n async function resolve(\n specifier: string,\n context: { parentURL: string },\n defaultResolve: typeof resolve\n ): Promise<{ url: string; format?: NodeLoaderHooksFormat }> {\n const defer = async () => {\n const r = await defaultResolve(specifier, context, defaultResolve);\n return r;\n };\n // See: https://github.com/nodejs/node/discussions/41711\n // nodejs will likely implement a similar fallback. Till then, we can do our users a favor and fallback today.\n async function entrypointFallback(\n cb: () => ReturnType | Awaited>\n ): ReturnType {\n try {\n const resolution = await cb();\n if (\n resolution?.url &&\n isProbablyEntrypoint(specifier, context.parentURL)\n )\n rememberIsProbablyEntrypoint.add(resolution.url);\n return resolution;\n } catch (esmResolverError) {\n if (!isProbablyEntrypoint(specifier, context.parentURL))\n throw esmResolverError;\n try {\n let cjsSpecifier = specifier;\n // Attempt to convert from ESM file:// to CommonJS path\n try {\n if (specifier.startsWith('file://'))\n cjsSpecifier = fileURLToPath(specifier);\n } catch {}\n const resolution = pathToFileURL(\n createRequire(process.cwd()).resolve(cjsSpecifier)\n ).toString();\n rememberIsProbablyEntrypoint.add(resolution);\n rememberResolvedViaCommonjsFallback.add(resolution);\n return { url: resolution, format: 'commonjs' };\n } catch (commonjsResolverError) {\n throw esmResolverError;\n }\n }\n }\n\n return addShortCircuitFlag(async () => {\n const parsed = parseUrl(specifier);\n const { pathname, protocol, hostname } = parsed;\n\n if (!isFileUrlOrNodeStyleSpecifier(parsed)) {\n return entrypointFallback(defer);\n }\n\n if (protocol !== null && protocol !== 'file:') {\n return entrypointFallback(defer);\n }\n\n // Malformed file:// URL? We should always see `null` or `''`\n if (hostname) {\n // TODO file://./foo sets `hostname` to `'.'`. Perhaps we should special-case this.\n return entrypointFallback(defer);\n }\n\n // pathname is the path to be resolved\n\n return entrypointFallback(() =>\n nodeResolveImplementation.defaultResolve(\n specifier,\n context,\n defaultResolve\n )\n );\n });\n }\n\n // `load` from new loader hook API (See description at the top of this file)\n async function load(\n url: string,\n context: {\n format: NodeLoaderHooksFormat | null | undefined;\n importAssertions?: NodeLoaderHooksAPI2.NodeImportAssertions;\n },\n defaultLoad: typeof load\n ): Promise<{\n format: NodeLoaderHooksFormat;\n source: string | Buffer | undefined;\n }> {\n return addShortCircuitFlag(async () => {\n // If we get a format hint from resolve() on the context then use it\n // otherwise call the old getFormat() hook using node's old built-in defaultGetFormat() that ships with ts-node\n const format =\n context.format ??\n (\n await getFormat(\n url,\n context,\n nodeGetFormatImplementation.defaultGetFormat\n )\n ).format;\n\n let source = undefined;\n if (format !== 'builtin' && format !== 'commonjs') {\n // Call the new defaultLoad() to get the source\n const { source: rawSource } = await defaultLoad(\n url,\n {\n ...context,\n format,\n },\n defaultLoad\n );\n\n if (rawSource === undefined || rawSource === null) {\n throw new Error(\n `Failed to load raw source: Format was '${format}' and url was '${url}''.`\n );\n }\n\n // Emulate node's built-in old defaultTransformSource() so we can re-use the old transformSource() hook\n const defaultTransformSource: typeof transformSource = async (\n source,\n _context,\n _defaultTransformSource\n ) => ({ source });\n\n // Call the old hook\n const { source: transformedSource } = await transformSource(\n rawSource,\n { url, format },\n defaultTransformSource\n );\n source = transformedSource;\n }\n\n return { format, source };\n });\n }\n\n async function getFormat(\n url: string,\n context: {},\n defaultGetFormat: typeof getFormat\n ): Promise<{ format: NodeLoaderHooksFormat }> {\n const defer = (overrideUrl: string = url) =>\n defaultGetFormat(overrideUrl, context, defaultGetFormat);\n\n // See: https://github.com/nodejs/node/discussions/41711\n // nodejs will likely implement a similar fallback. Till then, we can do our users a favor and fallback today.\n async function entrypointFallback(\n cb: () => ReturnType\n ): ReturnType {\n try {\n return await cb();\n } catch (getFormatError) {\n if (!rememberIsProbablyEntrypoint.has(url)) throw getFormatError;\n return { format: 'commonjs' };\n }\n }\n\n const parsed = parseUrl(url);\n\n if (!isFileUrlOrNodeStyleSpecifier(parsed)) {\n return entrypointFallback(defer);\n }\n\n const { pathname } = parsed;\n assert(\n pathname !== null,\n 'ESM getFormat() hook: URL should never have null pathname'\n );\n\n const nativePath = fileURLToPath(url);\n\n let nodeSays: { format: NodeLoaderHooksFormat };\n\n // If file has extension not understood by node, then ask node how it would treat the emitted extension.\n // E.g. .mts compiles to .mjs, so ask node how to classify an .mjs file.\n const ext = extname(nativePath);\n const tsNodeIgnored = tsNodeService.ignored(nativePath);\n const nodeEquivalentExt = extensions.nodeEquivalents.get(ext);\n if (nodeEquivalentExt && !tsNodeIgnored) {\n nodeSays = await entrypointFallback(() =>\n defer(formatUrl(pathToFileURL(nativePath + nodeEquivalentExt)))\n );\n } else {\n try {\n nodeSays = await entrypointFallback(defer);\n } catch (e) {\n if (\n e instanceof Error &&\n tsNodeIgnored &&\n extensions.nodeDoesNotUnderstand.includes(ext)\n ) {\n e.message +=\n `\\n\\n` +\n `Hint:\\n` +\n `ts-node is configured to ignore this file.\\n` +\n `If you want ts-node to handle this file, consider enabling the \"skipIgnore\" option or adjusting your \"ignore\" patterns.\\n` +\n `https://typestrong.org/ts-node/docs/scope\\n`;\n }\n throw e;\n }\n }\n // For files compiled by ts-node that node believes are either CJS or ESM, check if we should override that classification\n if (\n !tsNodeService.ignored(nativePath) &&\n (nodeSays.format === 'commonjs' || nodeSays.format === 'module')\n ) {\n const { moduleType } =\n tsNodeService.moduleTypeClassifier.classifyModuleByModuleTypeOverrides(\n normalizeSlashes(nativePath)\n );\n if (moduleType === 'cjs') {\n return { format: 'commonjs' };\n } else if (moduleType === 'esm') {\n return { format: 'module' };\n }\n }\n return nodeSays;\n }\n\n async function transformSource(\n source: string | Buffer,\n context: { url: string; format: NodeLoaderHooksFormat },\n defaultTransformSource: typeof transformSource\n ): Promise<{ source: string | Buffer }> {\n if (source === null || source === undefined) {\n throw new Error('No source');\n }\n\n const defer = () =>\n defaultTransformSource(source, context, defaultTransformSource);\n\n const sourceAsString =\n typeof source === 'string' ? source : source.toString('utf8');\n\n const { url } = context;\n const parsed = parseUrl(url);\n\n if (!isFileUrlOrNodeStyleSpecifier(parsed)) {\n return defer();\n }\n const nativePath = fileURLToPath(url);\n\n if (tsNodeService.ignored(nativePath)) {\n return defer();\n }\n\n const emittedJs = tsNodeService.compile(sourceAsString, nativePath);\n\n return { source: emittedJs };\n }\n\n return hooksAPI;\n}\n\nasync function addShortCircuitFlag(fn: () => Promise) {\n const ret = await fn();\n // Not sure if this is necessary; being lazy. Can revisit in the future.\n if (ret == null) return ret;\n return {\n ...ret,\n shortCircuit: true,\n };\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/file-extensions.d.ts b/node_modules/ts-node/dist/file-extensions.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/ts-node/dist/file-extensions.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/ts-node/dist/file-extensions.js b/node_modules/ts-node/dist/file-extensions.js new file mode 100644 index 0000000..e148e04 --- /dev/null +++ b/node_modules/ts-node/dist/file-extensions.js @@ -0,0 +1,133 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getExtensions = void 0; +const util_1 = require("./util"); +const nodeEquivalents = new Map([ + ['.ts', '.js'], + ['.tsx', '.js'], + ['.jsx', '.js'], + ['.mts', '.mjs'], + ['.cts', '.cjs'], +]); +const tsResolverEquivalents = new Map([ + ['.ts', ['.js']], + ['.tsx', ['.js', '.jsx']], + ['.mts', ['.mjs']], + ['.cts', ['.cjs']], +]); +// All extensions understood by vanilla node +const vanillaNodeExtensions = [ + '.js', + '.json', + '.node', + '.mjs', + '.cjs', +]; +// Extensions added by vanilla node's require() if you omit them: +// js, json, node +// Extensions added by vanilla node if you omit them with --experimental-specifier-resolution=node +// js, json, node, mjs +// Extensions added by ESM codepath's legacy package.json "main" resolver +// js, json, node (not mjs!) +const nodeDoesNotUnderstand = [ + '.ts', + '.tsx', + '.jsx', + '.cts', + '.mts', +]; +/** + * [MUST_UPDATE_FOR_NEW_FILE_EXTENSIONS] + * @internal + */ +function getExtensions(config, options, tsVersion) { + // TS 4.5 is first version to understand .cts, .mts, .cjs, and .mjs extensions + const tsSupportsMtsCtsExts = (0, util_1.versionGteLt)(tsVersion, '4.5.0'); + const requiresHigherTypescriptVersion = []; + if (!tsSupportsMtsCtsExts) + requiresHigherTypescriptVersion.push('.cts', '.cjs', '.mts', '.mjs'); + const allPossibleExtensionsSortedByPreference = Array.from(new Set([ + ...(options.preferTsExts ? nodeDoesNotUnderstand : []), + ...vanillaNodeExtensions, + ...nodeDoesNotUnderstand, + ])); + const compiledJsUnsorted = ['.ts']; + const compiledJsxUnsorted = []; + if (config.options.jsx) + compiledJsxUnsorted.push('.tsx'); + if (tsSupportsMtsCtsExts) + compiledJsUnsorted.push('.mts', '.cts'); + if (config.options.allowJs) { + compiledJsUnsorted.push('.js'); + if (config.options.jsx) + compiledJsxUnsorted.push('.jsx'); + if (tsSupportsMtsCtsExts) + compiledJsUnsorted.push('.mjs', '.cjs'); + } + const compiledUnsorted = [...compiledJsUnsorted, ...compiledJsxUnsorted]; + const compiled = allPossibleExtensionsSortedByPreference.filter((ext) => compiledUnsorted.includes(ext)); + const compiledNodeDoesNotUnderstand = nodeDoesNotUnderstand.filter((ext) => compiled.includes(ext)); + /** + * TS's resolver can resolve foo.js to foo.ts, by replacing .js extension with several source extensions. + * IMPORTANT: Must preserve ordering according to preferTsExts! + * Must include the .js/.mjs/.cjs extension in the array! + * This affects resolution behavior! + * [MUST_UPDATE_FOR_NEW_FILE_EXTENSIONS] + */ + const r = allPossibleExtensionsSortedByPreference.filter((ext) => [...compiledUnsorted, '.js', '.mjs', '.cjs', '.mts', '.cts'].includes(ext)); + const replacementsForJs = r.filter((ext) => ['.js', '.jsx', '.ts', '.tsx'].includes(ext)); + const replacementsForJsx = r.filter((ext) => ['.jsx', '.tsx'].includes(ext)); + const replacementsForMjs = r.filter((ext) => ['.mjs', '.mts'].includes(ext)); + const replacementsForCjs = r.filter((ext) => ['.cjs', '.cts'].includes(ext)); + const replacementsForJsOrMjs = r.filter((ext) => ['.js', '.jsx', '.ts', '.tsx', '.mjs', '.mts'].includes(ext)); + // Node allows omitting .js or .mjs extension in certain situations (CJS, ESM w/experimental flag) + // So anything that compiles to .js or .mjs can also be omitted. + const experimentalSpecifierResolutionAddsIfOmitted = Array.from(new Set([...replacementsForJsOrMjs, '.json', '.node'])); + // Same as above, except node curiuosly doesn't do .mjs here + const legacyMainResolveAddsIfOmitted = Array.from(new Set([...replacementsForJs, '.json', '.node'])); + return { + /** All file extensions we transform, ordered by resolution preference according to preferTsExts */ + compiled, + /** Resolved extensions that vanilla node will not understand; we should handle them */ + nodeDoesNotUnderstand, + /** Like the above, but only the ones we're compiling */ + compiledNodeDoesNotUnderstand, + /** + * Mapping from extensions understood by tsc to the equivalent for node, + * as far as getFormat is concerned. + */ + nodeEquivalents, + /** + * Mapping from extensions rejected by TSC in import specifiers, to the + * possible alternatives that TS's resolver will accept. + * + * When we allow users to opt-in to .ts extensions in import specifiers, TS's + * resolver requires us to replace the .ts extensions with .js alternatives. + * Otherwise, resolution fails. + * + * Note TS's resolver is only used by, and only required for, typechecking. + * This is separate from node's resolver, which we hook separately and which + * does not require this mapping. + */ + tsResolverEquivalents, + /** + * Extensions that we can support if the user upgrades their typescript version. + * Used when raising hints. + */ + requiresHigherTypescriptVersion, + /** + * --experimental-specifier-resolution=node will add these extensions. + */ + experimentalSpecifierResolutionAddsIfOmitted, + /** + * ESM loader will add these extensions to package.json "main" field + */ + legacyMainResolveAddsIfOmitted, + replacementsForMjs, + replacementsForCjs, + replacementsForJsx, + replacementsForJs, + }; +} +exports.getExtensions = getExtensions; +//# sourceMappingURL=file-extensions.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/file-extensions.js.map b/node_modules/ts-node/dist/file-extensions.js.map new file mode 100644 index 0000000..6b99baa --- /dev/null +++ b/node_modules/ts-node/dist/file-extensions.js.map @@ -0,0 +1 @@ +{"version":3,"file":"file-extensions.js","sourceRoot":"","sources":["../src/file-extensions.ts"],"names":[],"mappings":";;;AAEA,iCAAsC;AAWtC,MAAM,eAAe,GAAG,IAAI,GAAG,CAAiB;IAC9C,CAAC,KAAK,EAAE,KAAK,CAAC;IACd,CAAC,MAAM,EAAE,KAAK,CAAC;IACf,CAAC,MAAM,EAAE,KAAK,CAAC;IACf,CAAC,MAAM,EAAE,MAAM,CAAC;IAChB,CAAC,MAAM,EAAE,MAAM,CAAC;CACjB,CAAC,CAAC;AAEH,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAA4B;IAC/D,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC;IAChB,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACzB,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC;CACnB,CAAC,CAAC;AAEH,4CAA4C;AAC5C,MAAM,qBAAqB,GAAsB;IAC/C,KAAK;IACL,OAAO;IACP,OAAO;IACP,MAAM;IACN,MAAM;CACP,CAAC;AAEF,iEAAiE;AACjE,iBAAiB;AACjB,kGAAkG;AAClG,sBAAsB;AACtB,yEAAyE;AACzE,4BAA4B;AAE5B,MAAM,qBAAqB,GAAsB;IAC/C,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;CACP,CAAC;AAEF;;;GAGG;AACH,SAAgB,aAAa,CAC3B,MAA6B,EAC7B,OAAwB,EACxB,SAAiB;IAEjB,8EAA8E;IAC9E,MAAM,oBAA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,KAAK,CAAC,IAAI,CAC7D,IAAI,GAAG,CAAC,CAAC,GAAG,sBAAsB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CACvD,CAAC;IACF,4DAA4D;IAC5D,MAAM,8BAA8B,GAAG,KAAK,CAAC,IAAI,CAC/C,IAAI,GAAG,CAAC,CAAC,GAAG,iBAAiB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAClD,CAAC;IAEF,OAAO;QACL,mGAAmG;QACnG,QAAQ;QACR,uFAAuF;QACvF,qBAAqB;QACrB,wDAAwD;QACxD,6BAA6B;QAC7B;;;WAGG;QACH,eAAe;QACf;;;;;;;;;;;WAWG;QACH,qBAAqB;QACrB;;;WAGG;QACH,+BAA+B;QAC/B;;WAEG;QACH,4CAA4C;QAC5C;;WAEG;QACH,8BAA8B;QAC9B,kBAAkB;QAClB,kBAAkB;QAClB,kBAAkB;QAClB,iBAAiB;KAClB,CAAC;AACJ,CAAC;AAjHD,sCAiHC","sourcesContent":["import type * as _ts from 'typescript';\nimport type { RegisterOptions } from '.';\nimport { versionGteLt } from './util';\n\n/**\n * Centralized specification of how we deal with file extensions based on\n * project options:\n * which ones we do/don't support, in what situations, etc. These rules drive\n * logic elsewhere.\n * @internal\n * */\nexport type Extensions = ReturnType;\n\nconst nodeEquivalents = new Map([\n ['.ts', '.js'],\n ['.tsx', '.js'],\n ['.jsx', '.js'],\n ['.mts', '.mjs'],\n ['.cts', '.cjs'],\n]);\n\nconst tsResolverEquivalents = new Map([\n ['.ts', ['.js']],\n ['.tsx', ['.js', '.jsx']],\n ['.mts', ['.mjs']],\n ['.cts', ['.cjs']],\n]);\n\n// All extensions understood by vanilla node\nconst vanillaNodeExtensions: readonly string[] = [\n '.js',\n '.json',\n '.node',\n '.mjs',\n '.cjs',\n];\n\n// Extensions added by vanilla node's require() if you omit them:\n// js, json, node\n// Extensions added by vanilla node if you omit them with --experimental-specifier-resolution=node\n// js, json, node, mjs\n// Extensions added by ESM codepath's legacy package.json \"main\" resolver\n// js, json, node (not mjs!)\n\nconst nodeDoesNotUnderstand: readonly string[] = [\n '.ts',\n '.tsx',\n '.jsx',\n '.cts',\n '.mts',\n];\n\n/**\n * [MUST_UPDATE_FOR_NEW_FILE_EXTENSIONS]\n * @internal\n */\nexport function getExtensions(\n config: _ts.ParsedCommandLine,\n options: RegisterOptions,\n tsVersion: string\n) {\n // TS 4.5 is first version to understand .cts, .mts, .cjs, and .mjs extensions\n const tsSupportsMtsCtsExts = versionGteLt(tsVersion, '4.5.0');\n\n const requiresHigherTypescriptVersion: string[] = [];\n if (!tsSupportsMtsCtsExts)\n requiresHigherTypescriptVersion.push('.cts', '.cjs', '.mts', '.mjs');\n\n const allPossibleExtensionsSortedByPreference = Array.from(\n new Set([\n ...(options.preferTsExts ? nodeDoesNotUnderstand : []),\n ...vanillaNodeExtensions,\n ...nodeDoesNotUnderstand,\n ])\n );\n\n const compiledJsUnsorted: string[] = ['.ts'];\n const compiledJsxUnsorted: string[] = [];\n\n if (config.options.jsx) compiledJsxUnsorted.push('.tsx');\n if (tsSupportsMtsCtsExts) compiledJsUnsorted.push('.mts', '.cts');\n if (config.options.allowJs) {\n compiledJsUnsorted.push('.js');\n if (config.options.jsx) compiledJsxUnsorted.push('.jsx');\n if (tsSupportsMtsCtsExts) compiledJsUnsorted.push('.mjs', '.cjs');\n }\n\n const compiledUnsorted = [...compiledJsUnsorted, ...compiledJsxUnsorted];\n const compiled = allPossibleExtensionsSortedByPreference.filter((ext) =>\n compiledUnsorted.includes(ext)\n );\n\n const compiledNodeDoesNotUnderstand = nodeDoesNotUnderstand.filter((ext) =>\n compiled.includes(ext)\n );\n\n /**\n * TS's resolver can resolve foo.js to foo.ts, by replacing .js extension with several source extensions.\n * IMPORTANT: Must preserve ordering according to preferTsExts!\n * Must include the .js/.mjs/.cjs extension in the array!\n * This affects resolution behavior!\n * [MUST_UPDATE_FOR_NEW_FILE_EXTENSIONS]\n */\n const r = allPossibleExtensionsSortedByPreference.filter((ext) =>\n [...compiledUnsorted, '.js', '.mjs', '.cjs', '.mts', '.cts'].includes(ext)\n );\n const replacementsForJs = r.filter((ext) =>\n ['.js', '.jsx', '.ts', '.tsx'].includes(ext)\n );\n const replacementsForJsx = r.filter((ext) => ['.jsx', '.tsx'].includes(ext));\n const replacementsForMjs = r.filter((ext) => ['.mjs', '.mts'].includes(ext));\n const replacementsForCjs = r.filter((ext) => ['.cjs', '.cts'].includes(ext));\n const replacementsForJsOrMjs = r.filter((ext) =>\n ['.js', '.jsx', '.ts', '.tsx', '.mjs', '.mts'].includes(ext)\n );\n\n // Node allows omitting .js or .mjs extension in certain situations (CJS, ESM w/experimental flag)\n // So anything that compiles to .js or .mjs can also be omitted.\n const experimentalSpecifierResolutionAddsIfOmitted = Array.from(\n new Set([...replacementsForJsOrMjs, '.json', '.node'])\n );\n // Same as above, except node curiuosly doesn't do .mjs here\n const legacyMainResolveAddsIfOmitted = Array.from(\n new Set([...replacementsForJs, '.json', '.node'])\n );\n\n return {\n /** All file extensions we transform, ordered by resolution preference according to preferTsExts */\n compiled,\n /** Resolved extensions that vanilla node will not understand; we should handle them */\n nodeDoesNotUnderstand,\n /** Like the above, but only the ones we're compiling */\n compiledNodeDoesNotUnderstand,\n /**\n * Mapping from extensions understood by tsc to the equivalent for node,\n * as far as getFormat is concerned.\n */\n nodeEquivalents,\n /**\n * Mapping from extensions rejected by TSC in import specifiers, to the\n * possible alternatives that TS's resolver will accept.\n *\n * When we allow users to opt-in to .ts extensions in import specifiers, TS's\n * resolver requires us to replace the .ts extensions with .js alternatives.\n * Otherwise, resolution fails.\n *\n * Note TS's resolver is only used by, and only required for, typechecking.\n * This is separate from node's resolver, which we hook separately and which\n * does not require this mapping.\n */\n tsResolverEquivalents,\n /**\n * Extensions that we can support if the user upgrades their typescript version.\n * Used when raising hints.\n */\n requiresHigherTypescriptVersion,\n /**\n * --experimental-specifier-resolution=node will add these extensions.\n */\n experimentalSpecifierResolutionAddsIfOmitted,\n /**\n * ESM loader will add these extensions to package.json \"main\" field\n */\n legacyMainResolveAddsIfOmitted,\n replacementsForMjs,\n replacementsForCjs,\n replacementsForJsx,\n replacementsForJs,\n };\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/index.d.ts b/node_modules/ts-node/dist/index.d.ts new file mode 100644 index 0000000..8364b0e --- /dev/null +++ b/node_modules/ts-node/dist/index.d.ts @@ -0,0 +1,332 @@ +import { BaseError } from 'make-error'; +import type * as _ts from 'typescript'; +import type { TSCommon } from './ts-compiler-types'; +import type { createEsmHooks as createEsmHooksFn } from './esm'; +export { TSCommon }; +export { createRepl, CreateReplOptions, ReplService, EvalAwarePartialHost, } from './repl'; +export type { TranspilerModule, TranspilerFactory, CreateTranspilerOptions, TranspileOutput, TranspileOptions, Transpiler, } from './transpilers/types'; +export type { NodeLoaderHooksAPI1, NodeLoaderHooksAPI2, NodeLoaderHooksFormat, } from './esm'; +/** + * Registered `ts-node` instance information. + */ +export declare const REGISTER_INSTANCE: unique symbol; +/** + * Expose `REGISTER_INSTANCE` information on node.js `process`. + */ +declare global { + namespace NodeJS { + interface Process { + [REGISTER_INSTANCE]?: Service; + } + } +} +/** + * Export the current version. + */ +export declare const VERSION: any; +/** + * Options for creating a new TypeScript compiler instance. + + * @category Basic + */ +export interface CreateOptions { + /** + * Behave as if invoked within this working directory. Roughly equivalent to `cd $dir && ts-node ...` + * + * @default process.cwd() + */ + cwd?: string; + /** + * Legacy alias for `cwd` + * + * @deprecated use `projectSearchDir` or `cwd` + */ + dir?: string; + /** + * Emit output files into `.ts-node` directory. + * + * @default false + */ + emit?: boolean; + /** + * Scope compiler to files within `scopeDir`. + * + * @default false + */ + scope?: boolean; + /** + * @default First of: `tsconfig.json` "rootDir" if specified, directory containing `tsconfig.json`, or cwd if no `tsconfig.json` is loaded. + */ + scopeDir?: string; + /** + * Use pretty diagnostic formatter. + * + * @default false + */ + pretty?: boolean; + /** + * Use TypeScript's faster `transpileModule`. + * + * @default false + */ + transpileOnly?: boolean; + /** + * **DEPRECATED** Specify type-check is enabled (e.g. `transpileOnly == false`). + * + * @default true + */ + typeCheck?: boolean; + /** + * Use TypeScript's compiler host API instead of the language service API. + * + * @default false + */ + compilerHost?: boolean; + /** + * Logs TypeScript errors to stderr instead of throwing exceptions. + * + * @default false + */ + logError?: boolean; + /** + * Load "files" and "include" from `tsconfig.json` on startup. + * + * Default is to override `tsconfig.json` "files" and "include" to only include the entrypoint script. + * + * @default false + */ + files?: boolean; + /** + * Specify a custom TypeScript compiler. + * + * @default "typescript" + */ + compiler?: string; + /** + * Specify a custom transpiler for use with transpileOnly + */ + transpiler?: string | [string, object]; + /** + * Transpile with swc instead of the TypeScript compiler, and skip typechecking. + * + * Equivalent to setting both `transpileOnly: true` and `transpiler: 'ts-node/transpilers/swc'` + * + * For complete instructions: https://typestrong.org/ts-node/docs/transpilers + */ + swc?: boolean; + /** + * Paths which should not be compiled. + * + * Each string in the array is converted to a regular expression via `new RegExp()` and tested against source paths prior to compilation. + * + * Source paths are normalized to posix-style separators, relative to the directory containing `tsconfig.json` or to cwd if no `tsconfig.json` is loaded. + * + * Default is to ignore all node_modules subdirectories. + * + * @default ["(?:^|/)node_modules/"] + */ + ignore?: string[]; + /** + * Path to TypeScript config file or directory containing a `tsconfig.json`. + * Similar to the `tsc --project` flag: https://www.typescriptlang.org/docs/handbook/compiler-options.html + */ + project?: string; + /** + * Search for TypeScript config file (`tsconfig.json`) in this or parent directories. + */ + projectSearchDir?: string; + /** + * Skip project config resolution and loading. + * + * @default false + */ + skipProject?: boolean; + /** + * Skip ignore check, so that compilation will be attempted for all files with matching extensions. + * + * @default false + */ + skipIgnore?: boolean; + /** + * JSON object to merge with TypeScript `compilerOptions`. + * + * @allOf [{"$ref": "https://schemastore.azurewebsites.net/schemas/json/tsconfig.json#definitions/compilerOptionsDefinition/properties/compilerOptions"}] + */ + compilerOptions?: object; + /** + * Ignore TypeScript warnings by diagnostic code. + */ + ignoreDiagnostics?: Array; + /** + * Modules to require, like node's `--require` flag. + * + * If specified in `tsconfig.json`, the modules will be resolved relative to the `tsconfig.json` file. + * + * If specified programmatically, each input string should be pre-resolved to an absolute path for + * best results. + */ + require?: Array; + readFile?: (path: string) => string | undefined; + fileExists?: (path: string) => boolean; + transformers?: _ts.CustomTransformers | ((p: _ts.Program) => _ts.CustomTransformers); + /** + * Allows the usage of top level await in REPL. + * + * Uses node's implementation which accomplishes this with an AST syntax transformation. + * + * Enabled by default when tsconfig target is es2018 or above. Set to false to disable. + * + * **Note**: setting to `true` when tsconfig target is too low will throw an Error. Leave as `undefined` + * to get default, automatic behavior. + */ + experimentalReplAwait?: boolean; + /** + * Override certain paths to be compiled and executed as CommonJS or ECMAScript modules. + * When overridden, the tsconfig "module" and package.json "type" fields are overridden, and + * the file extension is ignored. + * This is useful if you cannot use .mts, .cts, .mjs, or .cjs file extensions; + * it achieves the same effect. + * + * Each key is a glob pattern following the same rules as tsconfig's "include" array. + * When multiple patterns match the same file, the last pattern takes precedence. + * + * `cjs` overrides matches files to compile and execute as CommonJS. + * `esm` overrides matches files to compile and execute as native ECMAScript modules. + * `package` overrides either of the above to default behavior, which obeys package.json "type" and + * tsconfig.json "module" options. + */ + moduleTypes?: ModuleTypes; + /** + * A function to collect trace messages from the TypeScript compiler, for example when `traceResolution` is enabled. + * + * @default console.log + */ + tsTrace?: (str: string) => void; + /** + * Enable native ESM support. + * + * For details, see https://typestrong.org/ts-node/docs/imports#native-ecmascript-modules + */ + esm?: boolean; + /** + * Re-order file extensions so that TypeScript imports are preferred. + * + * For example, when both `index.js` and `index.ts` exist, enabling this option causes `require('./index')` to resolve to `index.ts` instead of `index.js` + * + * @default false + */ + preferTsExts?: boolean; + /** + * Like node's `--experimental-specifier-resolution`, , but can also be set in your `tsconfig.json` for convenience. + * + * For details, see https://nodejs.org/dist/latest-v18.x/docs/api/esm.html#customizing-esm-specifier-resolution-algorithm + */ + experimentalSpecifierResolution?: 'node' | 'explicit'; + /** + * Allow using voluntary `.ts` file extension in import specifiers. + * + * Typically, in ESM projects, import specifiers must have an emit extension, `.js`, `.cjs`, or `.mjs`, + * and we automatically map to the corresponding `.ts`, `.cts`, or `.mts` source file. This is the + * recommended approach. + * + * However, if you really want to use `.ts` in import specifiers, and are aware that this may + * break tooling, you can enable this flag. + */ + experimentalTsImportSpecifiers?: boolean; +} +export declare type ModuleTypes = Record; +export declare type ModuleTypeOverride = 'cjs' | 'esm' | 'package'; +/** + * Options for registering a TypeScript compiler instance globally. + + * @category Basic + */ +export interface RegisterOptions extends CreateOptions { + /** + * Enable experimental features that re-map imports and require calls to support: + * `baseUrl`, `paths`, `rootDirs`, `.js` to `.ts` file extension mappings, + * `outDir` to `rootDir` mappings for composite projects and monorepos. + * + * For details, see https://github.com/TypeStrong/ts-node/issues/1514 + */ + experimentalResolver?: boolean; +} +export declare type ExperimentalSpecifierResolution = 'node' | 'explicit'; +/** + * Must be an interface to support `typescript-json-schema`. + */ +export interface TsConfigOptions extends Omit { +} +/** + * Information retrieved from type info check. + */ +export interface TypeInfo { + name: string; + comment: string; +} +/** + * TypeScript diagnostics error. + */ +export declare class TSError extends BaseError { + diagnosticCodes: number[]; + name: string; + diagnosticText: string; + diagnostics: ReadonlyArray<_ts.Diagnostic>; + constructor(diagnosticText: string, diagnosticCodes: number[], diagnostics?: ReadonlyArray<_ts.Diagnostic>); +} +/** + * Primary ts-node service, which wraps the TypeScript API and can compile TypeScript to JavaScript + */ +export interface Service { + ts: TSCommon; + config: _ts.ParsedCommandLine; + options: RegisterOptions; + enabled(enabled?: boolean): boolean; + ignored(fileName: string): boolean; + compile(code: string, fileName: string, lineOffset?: number): string; + getTypeInfo(code: string, fileName: string, position: number): TypeInfo; +} +/** + * Re-export of `Service` interface for backwards-compatibility + * @deprecated use `Service` instead + * @see {Service} + */ +export declare type Register = Service; +/** + * Create a new TypeScript compiler instance and register it onto node.js + * + * @category Basic + */ +export declare function register(opts?: RegisterOptions): Service; +/** + * Register TypeScript compiler instance onto node.js + + * @category Basic + */ +export declare function register(service: Service): Service; +/** + * Create TypeScript compiler instance. + * + * @category Basic + */ +export declare function create(rawOptions?: CreateOptions): Service; +/** + * Create an implementation of node's ESM loader hooks. + * + * This may be useful if you + * want to wrap or compose the loader hooks to add additional functionality or + * combine with another loader. + * + * Node changed the hooks API, so there are two possible APIs. This function + * detects your node version and returns the appropriate API. + * + * @category ESM Loader + */ +export declare const createEsmHooks: typeof createEsmHooksFn; +/** + * When using `module: nodenext` or `module: node12`, there are two possible styles of emit depending in file extension or package.json "type": + * + * - CommonJS with dynamic imports preserved (not transformed into `require()` calls) + * - ECMAScript modules with `import foo = require()` transformed into `require = createRequire(); const foo = require()` + */ +export declare type NodeModuleEmitKind = 'nodeesm' | 'nodecjs'; diff --git a/node_modules/ts-node/dist/index.js b/node_modules/ts-node/dist/index.js new file mode 100644 index 0000000..c03afbf --- /dev/null +++ b/node_modules/ts-node/dist/index.js @@ -0,0 +1,953 @@ +"use strict"; +var _a, _b; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createEsmHooks = exports.createFromPreloadedConfig = exports.create = exports.register = exports.TSError = exports.DEFAULTS = exports.VERSION = exports.debug = exports.INSPECT_CUSTOM = exports.env = exports.REGISTER_INSTANCE = exports.createRepl = void 0; +const path_1 = require("path"); +const module_1 = require("module"); +const util = require("util"); +const url_1 = require("url"); +const make_error_1 = require("make-error"); +const util_1 = require("./util"); +const configuration_1 = require("./configuration"); +const module_type_classifier_1 = require("./module-type-classifier"); +const resolver_functions_1 = require("./resolver-functions"); +const cjs_resolve_hooks_1 = require("./cjs-resolve-hooks"); +const node_module_type_classifier_1 = require("./node-module-type-classifier"); +const file_extensions_1 = require("./file-extensions"); +const ts_transpile_module_1 = require("./ts-transpile-module"); +var repl_1 = require("./repl"); +Object.defineProperty(exports, "createRepl", { enumerable: true, get: function () { return repl_1.createRepl; } }); +/** + * Does this version of node obey the package.json "type" field + * and throw ERR_REQUIRE_ESM when attempting to require() an ESM modules. + */ +const engineSupportsPackageTypeField = parseInt(process.versions.node.split('.')[0], 10) >= 12; +/** + * Assert that script can be loaded as CommonJS when we attempt to require it. + * If it should be loaded as ESM, throw ERR_REQUIRE_ESM like node does. + * + * Loaded conditionally so we don't need to support older node versions + */ +let assertScriptCanLoadAsCJS = engineSupportsPackageTypeField + ? require('../dist-raw/node-internal-modules-cjs-loader').assertScriptCanLoadAsCJSImpl + : () => { + /* noop */ + }; +/** + * Registered `ts-node` instance information. + */ +exports.REGISTER_INSTANCE = Symbol.for('ts-node.register.instance'); +/** @internal */ +exports.env = process.env; +/** + * @internal + */ +exports.INSPECT_CUSTOM = util.inspect.custom || 'inspect'; +/** + * Debugging `ts-node`. + */ +const shouldDebug = (0, util_1.yn)(exports.env.TS_NODE_DEBUG); +/** @internal */ +exports.debug = shouldDebug + ? (...args) => console.log(`[ts-node ${new Date().toISOString()}]`, ...args) + : () => undefined; +const debugFn = shouldDebug + ? (key, fn) => { + let i = 0; + return (x) => { + (0, exports.debug)(key, x, ++i); + return fn(x); + }; + } + : (_, fn) => fn; +/** + * Export the current version. + */ +exports.VERSION = require('../package.json').version; +/** + * Default register options, including values specified via environment + * variables. + * @internal + */ +exports.DEFAULTS = { + cwd: (_a = exports.env.TS_NODE_CWD) !== null && _a !== void 0 ? _a : exports.env.TS_NODE_DIR, + emit: (0, util_1.yn)(exports.env.TS_NODE_EMIT), + scope: (0, util_1.yn)(exports.env.TS_NODE_SCOPE), + scopeDir: exports.env.TS_NODE_SCOPE_DIR, + files: (0, util_1.yn)(exports.env.TS_NODE_FILES), + pretty: (0, util_1.yn)(exports.env.TS_NODE_PRETTY), + compiler: exports.env.TS_NODE_COMPILER, + compilerOptions: (0, util_1.parse)(exports.env.TS_NODE_COMPILER_OPTIONS), + ignore: (0, util_1.split)(exports.env.TS_NODE_IGNORE), + project: exports.env.TS_NODE_PROJECT, + skipProject: (0, util_1.yn)(exports.env.TS_NODE_SKIP_PROJECT), + skipIgnore: (0, util_1.yn)(exports.env.TS_NODE_SKIP_IGNORE), + preferTsExts: (0, util_1.yn)(exports.env.TS_NODE_PREFER_TS_EXTS), + ignoreDiagnostics: (0, util_1.split)(exports.env.TS_NODE_IGNORE_DIAGNOSTICS), + transpileOnly: (0, util_1.yn)(exports.env.TS_NODE_TRANSPILE_ONLY), + typeCheck: (0, util_1.yn)(exports.env.TS_NODE_TYPE_CHECK), + compilerHost: (0, util_1.yn)(exports.env.TS_NODE_COMPILER_HOST), + logError: (0, util_1.yn)(exports.env.TS_NODE_LOG_ERROR), + experimentalReplAwait: (_b = (0, util_1.yn)(exports.env.TS_NODE_EXPERIMENTAL_REPL_AWAIT)) !== null && _b !== void 0 ? _b : undefined, + tsTrace: console.log.bind(console), +}; +/** + * TypeScript diagnostics error. + */ +class TSError extends make_error_1.BaseError { + constructor(diagnosticText, diagnosticCodes, diagnostics = []) { + super(`⨯ Unable to compile TypeScript:\n${diagnosticText}`); + this.diagnosticCodes = diagnosticCodes; + this.name = 'TSError'; + Object.defineProperty(this, 'diagnosticText', { + configurable: true, + writable: true, + value: diagnosticText, + }); + Object.defineProperty(this, 'diagnostics', { + configurable: true, + writable: true, + value: diagnostics, + }); + } + /** + * @internal + */ + [exports.INSPECT_CUSTOM]() { + return this.diagnosticText; + } +} +exports.TSError = TSError; +const TS_NODE_SERVICE_BRAND = Symbol('TS_NODE_SERVICE_BRAND'); +function register(serviceOrOpts) { + // Is this a Service or a RegisterOptions? + let service = serviceOrOpts; + if (!(serviceOrOpts === null || serviceOrOpts === void 0 ? void 0 : serviceOrOpts[TS_NODE_SERVICE_BRAND])) { + // Not a service; is options + service = create((serviceOrOpts !== null && serviceOrOpts !== void 0 ? serviceOrOpts : {})); + } + const originalJsHandler = require.extensions['.js']; + // Expose registered instance globally. + process[exports.REGISTER_INSTANCE] = service; + // Register the extensions. + registerExtensions(service.options.preferTsExts, service.extensions.compiled, service, originalJsHandler); + (0, cjs_resolve_hooks_1.installCommonjsResolveHooksIfNecessary)(service); + // Require specified modules before start-up. + module_1.Module._preloadModules(service.options.require); + return service; +} +exports.register = register; +/** + * Create TypeScript compiler instance. + * + * @category Basic + */ +function create(rawOptions = {}) { + const foundConfigResult = (0, configuration_1.findAndReadConfig)(rawOptions); + return createFromPreloadedConfig(foundConfigResult); +} +exports.create = create; +/** @internal */ +function createFromPreloadedConfig(foundConfigResult) { + var _a, _b, _c, _d; + const { configFilePath, cwd, options, config, compiler, projectLocalResolveDir, optionBasePaths, } = foundConfigResult; + const projectLocalResolveHelper = (0, util_1.createProjectLocalResolveHelper)(projectLocalResolveDir); + const ts = (0, configuration_1.loadCompiler)(compiler); + // Experimental REPL await is not compatible targets lower than ES2018 + const targetSupportsTla = config.options.target >= ts.ScriptTarget.ES2018; + if (options.experimentalReplAwait === true && !targetSupportsTla) { + throw new Error('Experimental REPL await is not compatible with targets lower than ES2018'); + } + // Top-level await was added in TS 3.8 + const tsVersionSupportsTla = (0, util_1.versionGteLt)(ts.version, '3.8.0'); + if (options.experimentalReplAwait === true && !tsVersionSupportsTla) { + throw new Error('Experimental REPL await is not compatible with TypeScript versions older than 3.8'); + } + const shouldReplAwait = options.experimentalReplAwait !== false && + tsVersionSupportsTla && + targetSupportsTla; + // swc implies two other options + // typeCheck option was implemented specifically to allow overriding tsconfig transpileOnly from the command-line + // So we should allow using typeCheck to override swc + if (options.swc && !options.typeCheck) { + if (options.transpileOnly === false) { + throw new Error("Cannot enable 'swc' option with 'transpileOnly: false'. 'swc' implies 'transpileOnly'."); + } + if (options.transpiler) { + throw new Error("Cannot specify both 'swc' and 'transpiler' options. 'swc' uses the built-in swc transpiler."); + } + } + const readFile = options.readFile || ts.sys.readFile; + const fileExists = options.fileExists || ts.sys.fileExists; + // typeCheck can override transpileOnly, useful for CLI flag to override config file + const transpileOnly = (options.transpileOnly === true || options.swc === true) && + options.typeCheck !== true; + let transpiler = undefined; + let transpilerBasePath = undefined; + if (options.transpiler) { + transpiler = options.transpiler; + transpilerBasePath = optionBasePaths.transpiler; + } + else if (options.swc) { + transpiler = require.resolve('./transpilers/swc.js'); + transpilerBasePath = optionBasePaths.swc; + } + const transformers = options.transformers || undefined; + const diagnosticFilters = [ + { + appliesToAllFiles: true, + filenamesAbsolute: [], + diagnosticsIgnored: [ + 6059, + 18002, + 18003, + ...(options.experimentalTsImportSpecifiers + ? [ + 2691, // "An import path cannot end with a '.ts' extension. Consider importing '' instead." + ] + : []), + ...(options.ignoreDiagnostics || []), + ].map(Number), + }, + ]; + const configDiagnosticList = filterDiagnostics(config.errors, diagnosticFilters); + const outputCache = new Map(); + const configFileDirname = configFilePath ? (0, path_1.dirname)(configFilePath) : null; + const scopeDir = (_c = (_b = (_a = options.scopeDir) !== null && _a !== void 0 ? _a : config.options.rootDir) !== null && _b !== void 0 ? _b : configFileDirname) !== null && _c !== void 0 ? _c : cwd; + const ignoreBaseDir = configFileDirname !== null && configFileDirname !== void 0 ? configFileDirname : cwd; + const isScoped = options.scope + ? (fileName) => (0, path_1.relative)(scopeDir, fileName).charAt(0) !== '.' + : () => true; + const shouldIgnore = createIgnore(ignoreBaseDir, options.skipIgnore + ? [] + : (options.ignore || ['(?:^|/)node_modules/']).map((str) => new RegExp(str))); + const diagnosticHost = { + getNewLine: () => ts.sys.newLine, + getCurrentDirectory: () => cwd, + // TODO switch to getCanonicalFileName we already create later in scope + getCanonicalFileName: ts.sys.useCaseSensitiveFileNames + ? (x) => x + : (x) => x.toLowerCase(), + }; + if (options.transpileOnly && typeof transformers === 'function') { + throw new TypeError('Transformers function is unavailable in "--transpile-only"'); + } + let createTranspiler = initializeTranspilerFactory(); + function initializeTranspilerFactory() { + var _a; + if (transpiler) { + if (!transpileOnly) + throw new Error('Custom transpiler can only be used when transpileOnly is enabled.'); + const transpilerName = typeof transpiler === 'string' ? transpiler : transpiler[0]; + const transpilerOptions = typeof transpiler === 'string' ? {} : (_a = transpiler[1]) !== null && _a !== void 0 ? _a : {}; + const transpilerConfigLocalResolveHelper = transpilerBasePath + ? (0, util_1.createProjectLocalResolveHelper)(transpilerBasePath) + : projectLocalResolveHelper; + const transpilerPath = transpilerConfigLocalResolveHelper(transpilerName, true); + const transpilerFactory = require(transpilerPath) + .create; + return createTranspiler; + function createTranspiler(compilerOptions, nodeModuleEmitKind) { + return transpilerFactory === null || transpilerFactory === void 0 ? void 0 : transpilerFactory({ + service: { + options, + config: { + ...config, + options: compilerOptions, + }, + projectLocalResolveHelper, + }, + transpilerConfigLocalResolveHelper, + nodeModuleEmitKind, + ...transpilerOptions, + }); + } + } + } + /** + * True if require() hooks should interop with experimental ESM loader. + * Enabled explicitly via a flag since it is a breaking change. + */ + let experimentalEsmLoader = false; + function enableExperimentalEsmLoaderInterop() { + experimentalEsmLoader = true; + } + // Install source map support and read from memory cache. + installSourceMapSupport(); + function installSourceMapSupport() { + const sourceMapSupport = require('@cspotcode/source-map-support'); + sourceMapSupport.install({ + environment: 'node', + retrieveFile(pathOrUrl) { + var _a; + let path = pathOrUrl; + // If it's a file URL, convert to local path + // Note: fileURLToPath does not exist on early node v10 + // I could not find a way to handle non-URLs except to swallow an error + if (experimentalEsmLoader && path.startsWith('file://')) { + try { + path = (0, url_1.fileURLToPath)(path); + } + catch (e) { + /* swallow error */ + } + } + path = (0, util_1.normalizeSlashes)(path); + return ((_a = outputCache.get(path)) === null || _a === void 0 ? void 0 : _a.content) || ''; + }, + redirectConflictingLibrary: true, + onConflictingLibraryRedirect(request, parent, isMain, options, redirectedRequest) { + (0, exports.debug)(`Redirected an attempt to require source-map-support to instead receive @cspotcode/source-map-support. "${parent.filename}" attempted to require or resolve "${request}" and was redirected to "${redirectedRequest}".`); + }, + }); + } + const shouldHavePrettyErrors = options.pretty === undefined ? process.stdout.isTTY : options.pretty; + const formatDiagnostics = shouldHavePrettyErrors + ? ts.formatDiagnosticsWithColorAndContext || ts.formatDiagnostics + : ts.formatDiagnostics; + function createTSError(diagnostics) { + const diagnosticText = formatDiagnostics(diagnostics, diagnosticHost); + const diagnosticCodes = diagnostics.map((x) => x.code); + return new TSError(diagnosticText, diagnosticCodes, diagnostics); + } + function reportTSError(configDiagnosticList) { + const error = createTSError(configDiagnosticList); + if (options.logError) { + // Print error in red color and continue execution. + console.error('\x1b[31m%s\x1b[0m', error); + } + else { + // Throw error and exit the script. + throw error; + } + } + // Render the configuration errors. + if (configDiagnosticList.length) + reportTSError(configDiagnosticList); + const jsxEmitPreserve = config.options.jsx === ts.JsxEmit.Preserve; + /** + * Get the extension for a transpiled file. + * [MUST_UPDATE_FOR_NEW_FILE_EXTENSIONS] + */ + function getEmitExtension(path) { + const lastDotIndex = path.lastIndexOf('.'); + if (lastDotIndex >= 0) { + const ext = path.slice(lastDotIndex); + switch (ext) { + case '.js': + case '.ts': + return '.js'; + case '.jsx': + case '.tsx': + return jsxEmitPreserve ? '.jsx' : '.js'; + case '.mjs': + case '.mts': + return '.mjs'; + case '.cjs': + case '.cts': + return '.cjs'; + } + } + return '.js'; + } + /** + * Get output from TS compiler w/typechecking. `undefined` in `transpileOnly` + * mode. + */ + let getOutput; + let getTypeInfo; + const getCanonicalFileName = ts.createGetCanonicalFileName(ts.sys.useCaseSensitiveFileNames); + const moduleTypeClassifier = (0, module_type_classifier_1.createModuleTypeClassifier)({ + basePath: (_d = options.optionBasePaths) === null || _d === void 0 ? void 0 : _d.moduleTypes, + patterns: options.moduleTypes, + }); + const extensions = (0, file_extensions_1.getExtensions)(config, options, ts.version); + // Use full language services when the fast option is disabled. + if (!transpileOnly) { + const fileContents = new Map(); + const rootFileNames = new Set(config.fileNames); + const cachedReadFile = (0, util_1.cachedLookup)(debugFn('readFile', readFile)); + // Use language services by default + if (!options.compilerHost) { + let projectVersion = 1; + const fileVersions = new Map(Array.from(rootFileNames).map((fileName) => [fileName, 0])); + const getCustomTransformers = () => { + if (typeof transformers === 'function') { + const program = service.getProgram(); + return program ? transformers(program) : undefined; + } + return transformers; + }; + // Create the compiler host for type checking. + const serviceHost = { + getProjectVersion: () => String(projectVersion), + getScriptFileNames: () => Array.from(rootFileNames), + getScriptVersion: (fileName) => { + const version = fileVersions.get(fileName); + return version ? version.toString() : ''; + }, + getScriptSnapshot(fileName) { + // TODO ordering of this with getScriptVersion? Should they sync up? + let contents = fileContents.get(fileName); + // Read contents into TypeScript memory cache. + if (contents === undefined) { + contents = cachedReadFile(fileName); + if (contents === undefined) + return; + fileVersions.set(fileName, 1); + fileContents.set(fileName, contents); + projectVersion++; + } + return ts.ScriptSnapshot.fromString(contents); + }, + readFile: cachedReadFile, + readDirectory: ts.sys.readDirectory, + getDirectories: (0, util_1.cachedLookup)(debugFn('getDirectories', ts.sys.getDirectories)), + fileExists: (0, util_1.cachedLookup)(debugFn('fileExists', fileExists)), + directoryExists: (0, util_1.cachedLookup)(debugFn('directoryExists', ts.sys.directoryExists)), + realpath: ts.sys.realpath + ? (0, util_1.cachedLookup)(debugFn('realpath', ts.sys.realpath)) + : undefined, + getNewLine: () => ts.sys.newLine, + useCaseSensitiveFileNames: () => ts.sys.useCaseSensitiveFileNames, + getCurrentDirectory: () => cwd, + getCompilationSettings: () => config.options, + getDefaultLibFileName: () => ts.getDefaultLibFilePath(config.options), + getCustomTransformers: getCustomTransformers, + trace: options.tsTrace, + }; + const { resolveModuleNames, getResolvedModuleWithFailedLookupLocationsFromCache, resolveTypeReferenceDirectives, isFileKnownToBeInternal, markBucketOfFilenameInternal, } = (0, resolver_functions_1.createResolverFunctions)({ + host: serviceHost, + getCanonicalFileName, + ts, + cwd, + config, + projectLocalResolveHelper, + options, + extensions, + }); + serviceHost.resolveModuleNames = resolveModuleNames; + serviceHost.getResolvedModuleWithFailedLookupLocationsFromCache = + getResolvedModuleWithFailedLookupLocationsFromCache; + serviceHost.resolveTypeReferenceDirectives = + resolveTypeReferenceDirectives; + const registry = ts.createDocumentRegistry(ts.sys.useCaseSensitiveFileNames, cwd); + const service = ts.createLanguageService(serviceHost, registry); + const updateMemoryCache = (contents, fileName) => { + // Add to `rootFiles` as necessary, either to make TS include a file it has not seen, + // or to trigger a re-classification of files from external to internal. + if (!rootFileNames.has(fileName) && + !isFileKnownToBeInternal(fileName)) { + markBucketOfFilenameInternal(fileName); + rootFileNames.add(fileName); + // Increment project version for every change to rootFileNames. + projectVersion++; + } + const previousVersion = fileVersions.get(fileName) || 0; + const previousContents = fileContents.get(fileName); + // Avoid incrementing cache when nothing has changed. + if (contents !== previousContents) { + fileVersions.set(fileName, previousVersion + 1); + fileContents.set(fileName, contents); + // Increment project version for every file change. + projectVersion++; + } + }; + let previousProgram = undefined; + getOutput = (code, fileName) => { + updateMemoryCache(code, fileName); + const programBefore = service.getProgram(); + if (programBefore !== previousProgram) { + (0, exports.debug)(`compiler rebuilt Program instance when getting output for ${fileName}`); + } + const output = service.getEmitOutput(fileName); + // Get the relevant diagnostics - this is 3x faster than `getPreEmitDiagnostics`. + const diagnostics = service + .getSemanticDiagnostics(fileName) + .concat(service.getSyntacticDiagnostics(fileName)); + const programAfter = service.getProgram(); + (0, exports.debug)('invariant: Is service.getProject() identical before and after getting emit output and diagnostics? (should always be true) ', programBefore === programAfter); + previousProgram = programAfter; + const diagnosticList = filterDiagnostics(diagnostics, diagnosticFilters); + if (diagnosticList.length) + reportTSError(diagnosticList); + if (output.emitSkipped) { + return [undefined, undefined, true]; + } + // Throw an error when requiring `.d.ts` files. + if (output.outputFiles.length === 0) { + throw new TypeError(`Unable to require file: ${(0, path_1.relative)(cwd, fileName)}\n` + + 'This is usually the result of a faulty configuration or import. ' + + 'Make sure there is a `.js`, `.json` or other executable extension with ' + + 'loader attached before `ts-node` available.'); + } + return [output.outputFiles[1].text, output.outputFiles[0].text, false]; + }; + getTypeInfo = (code, fileName, position) => { + const normalizedFileName = (0, util_1.normalizeSlashes)(fileName); + updateMemoryCache(code, normalizedFileName); + const info = service.getQuickInfoAtPosition(normalizedFileName, position); + const name = ts.displayPartsToString(info ? info.displayParts : []); + const comment = ts.displayPartsToString(info ? info.documentation : []); + return { name, comment }; + }; + } + else { + const sys = { + ...ts.sys, + ...diagnosticHost, + readFile: (fileName) => { + const cacheContents = fileContents.get(fileName); + if (cacheContents !== undefined) + return cacheContents; + const contents = cachedReadFile(fileName); + if (contents) + fileContents.set(fileName, contents); + return contents; + }, + readDirectory: ts.sys.readDirectory, + getDirectories: (0, util_1.cachedLookup)(debugFn('getDirectories', ts.sys.getDirectories)), + fileExists: (0, util_1.cachedLookup)(debugFn('fileExists', fileExists)), + directoryExists: (0, util_1.cachedLookup)(debugFn('directoryExists', ts.sys.directoryExists)), + resolvePath: (0, util_1.cachedLookup)(debugFn('resolvePath', ts.sys.resolvePath)), + realpath: ts.sys.realpath + ? (0, util_1.cachedLookup)(debugFn('realpath', ts.sys.realpath)) + : undefined, + }; + const host = ts.createIncrementalCompilerHost + ? ts.createIncrementalCompilerHost(config.options, sys) + : { + ...sys, + getSourceFile: (fileName, languageVersion) => { + const contents = sys.readFile(fileName); + if (contents === undefined) + return; + return ts.createSourceFile(fileName, contents, languageVersion); + }, + getDefaultLibLocation: () => (0, util_1.normalizeSlashes)((0, path_1.dirname)(compiler)), + getDefaultLibFileName: () => (0, util_1.normalizeSlashes)((0, path_1.join)((0, path_1.dirname)(compiler), ts.getDefaultLibFileName(config.options))), + useCaseSensitiveFileNames: () => sys.useCaseSensitiveFileNames, + }; + host.trace = options.tsTrace; + const { resolveModuleNames, resolveTypeReferenceDirectives, isFileKnownToBeInternal, markBucketOfFilenameInternal, } = (0, resolver_functions_1.createResolverFunctions)({ + host, + cwd, + config, + ts, + getCanonicalFileName, + projectLocalResolveHelper, + options, + extensions, + }); + host.resolveModuleNames = resolveModuleNames; + host.resolveTypeReferenceDirectives = resolveTypeReferenceDirectives; + // Fallback for older TypeScript releases without incremental API. + let builderProgram = ts.createIncrementalProgram + ? ts.createIncrementalProgram({ + rootNames: Array.from(rootFileNames), + options: config.options, + host, + configFileParsingDiagnostics: config.errors, + projectReferences: config.projectReferences, + }) + : ts.createEmitAndSemanticDiagnosticsBuilderProgram(Array.from(rootFileNames), config.options, host, undefined, config.errors, config.projectReferences); + // Read and cache custom transformers. + const customTransformers = typeof transformers === 'function' + ? transformers(builderProgram.getProgram()) + : transformers; + // Set the file contents into cache manually. + const updateMemoryCache = (contents, fileName) => { + const previousContents = fileContents.get(fileName); + const contentsChanged = previousContents !== contents; + if (contentsChanged) { + fileContents.set(fileName, contents); + } + // Add to `rootFiles` when discovered by compiler for the first time. + let addedToRootFileNames = false; + if (!rootFileNames.has(fileName) && + !isFileKnownToBeInternal(fileName)) { + markBucketOfFilenameInternal(fileName); + rootFileNames.add(fileName); + addedToRootFileNames = true; + } + // Update program when file changes. + if (addedToRootFileNames || contentsChanged) { + builderProgram = ts.createEmitAndSemanticDiagnosticsBuilderProgram(Array.from(rootFileNames), config.options, host, builderProgram, config.errors, config.projectReferences); + } + }; + getOutput = (code, fileName) => { + let outText = ''; + let outMap = ''; + updateMemoryCache(code, fileName); + const sourceFile = builderProgram.getSourceFile(fileName); + if (!sourceFile) + throw new TypeError(`Unable to read file: ${fileName}`); + const program = builderProgram.getProgram(); + const diagnostics = ts.getPreEmitDiagnostics(program, sourceFile); + const diagnosticList = filterDiagnostics(diagnostics, diagnosticFilters); + if (diagnosticList.length) + reportTSError(diagnosticList); + const result = builderProgram.emit(sourceFile, (path, file, writeByteOrderMark) => { + if (path.endsWith('.map')) { + outMap = file; + } + else { + outText = file; + } + if (options.emit) + sys.writeFile(path, file, writeByteOrderMark); + }, undefined, undefined, customTransformers); + if (result.emitSkipped) { + return [undefined, undefined, true]; + } + // Throw an error when requiring files that cannot be compiled. + if (outText === '') { + if (program.isSourceFileFromExternalLibrary(sourceFile)) { + throw new TypeError(`Unable to compile file from external library: ${(0, path_1.relative)(cwd, fileName)}`); + } + throw new TypeError(`Unable to require file: ${(0, path_1.relative)(cwd, fileName)}\n` + + 'This is usually the result of a faulty configuration or import. ' + + 'Make sure there is a `.js`, `.json` or other executable extension with ' + + 'loader attached before `ts-node` available.'); + } + return [outText, outMap, false]; + }; + getTypeInfo = (code, fileName, position) => { + const normalizedFileName = (0, util_1.normalizeSlashes)(fileName); + updateMemoryCache(code, normalizedFileName); + const sourceFile = builderProgram.getSourceFile(normalizedFileName); + if (!sourceFile) + throw new TypeError(`Unable to read file: ${fileName}`); + const node = getTokenAtPosition(ts, sourceFile, position); + const checker = builderProgram.getProgram().getTypeChecker(); + const symbol = checker.getSymbolAtLocation(node); + if (!symbol) + return { name: '', comment: '' }; + const type = checker.getTypeOfSymbolAtLocation(symbol, node); + const signatures = [ + ...type.getConstructSignatures(), + ...type.getCallSignatures(), + ]; + return { + name: signatures.length + ? signatures.map((x) => checker.signatureToString(x)).join('\n') + : checker.typeToString(type), + comment: ts.displayPartsToString(symbol ? symbol.getDocumentationComment(checker) : []), + }; + }; + // Write `.tsbuildinfo` when `--build` is enabled. + if (options.emit && config.options.incremental) { + process.on('exit', () => { + // Emits `.tsbuildinfo` to filesystem. + builderProgram.getProgram().emitBuildInfo(); + }); + } + } + } + else { + getTypeInfo = () => { + throw new TypeError('Type information is unavailable in "--transpile-only"'); + }; + } + function createTranspileOnlyGetOutputFunction(overrideModuleType, nodeModuleEmitKind) { + const compilerOptions = { ...config.options }; + if (overrideModuleType !== undefined) + compilerOptions.module = overrideModuleType; + let customTranspiler = createTranspiler === null || createTranspiler === void 0 ? void 0 : createTranspiler(compilerOptions, nodeModuleEmitKind); + let tsTranspileModule = (0, util_1.versionGteLt)(ts.version, '4.7.0') + ? (0, ts_transpile_module_1.createTsTranspileModule)(ts, { + compilerOptions, + reportDiagnostics: true, + transformers: transformers, + }) + : undefined; + return (code, fileName) => { + let result; + if (customTranspiler) { + result = customTranspiler.transpile(code, { + fileName, + }); + } + else if (tsTranspileModule) { + result = tsTranspileModule(code, { + fileName, + }, nodeModuleEmitKind === 'nodeesm' ? 'module' : 'commonjs'); + } + else { + result = ts.transpileModule(code, { + fileName, + compilerOptions, + reportDiagnostics: true, + transformers: transformers, + }); + } + const diagnosticList = filterDiagnostics(result.diagnostics || [], diagnosticFilters); + if (diagnosticList.length) + reportTSError(diagnosticList); + return [result.outputText, result.sourceMapText, false]; + }; + } + // When true, these mean that a `moduleType` override will cause a different emit + // than the TypeScript compiler, so we *must* overwrite the emit. + const shouldOverwriteEmitWhenForcingCommonJS = config.options.module !== ts.ModuleKind.CommonJS; + // [MUST_UPDATE_FOR_NEW_MODULEKIND] + const shouldOverwriteEmitWhenForcingEsm = !(config.options.module === ts.ModuleKind.ES2015 || + (ts.ModuleKind.ES2020 && config.options.module === ts.ModuleKind.ES2020) || + (ts.ModuleKind.ES2022 && config.options.module === ts.ModuleKind.ES2022) || + config.options.module === ts.ModuleKind.ESNext); + /** + * node16 or nodenext + * [MUST_UPDATE_FOR_NEW_MODULEKIND] + */ + const isNodeModuleType = (ts.ModuleKind.Node16 && config.options.module === ts.ModuleKind.Node16) || + (ts.ModuleKind.NodeNext && + config.options.module === ts.ModuleKind.NodeNext); + const getOutputForceCommonJS = createTranspileOnlyGetOutputFunction(ts.ModuleKind.CommonJS); + const getOutputForceNodeCommonJS = createTranspileOnlyGetOutputFunction(ts.ModuleKind.NodeNext, 'nodecjs'); + const getOutputForceNodeESM = createTranspileOnlyGetOutputFunction(ts.ModuleKind.NodeNext, 'nodeesm'); + // [MUST_UPDATE_FOR_NEW_MODULEKIND] + const getOutputForceESM = createTranspileOnlyGetOutputFunction(ts.ModuleKind.ES2022 || ts.ModuleKind.ES2020 || ts.ModuleKind.ES2015); + const getOutputTranspileOnly = createTranspileOnlyGetOutputFunction(); + // Create a simple TypeScript compiler proxy. + function compile(code, fileName, lineOffset = 0) { + const normalizedFileName = (0, util_1.normalizeSlashes)(fileName); + const classification = moduleTypeClassifier.classifyModuleByModuleTypeOverrides(normalizedFileName); + let value = ''; + let sourceMap = ''; + let emitSkipped = true; + if (getOutput) { + // Must always call normal getOutput to throw typechecking errors + [value, sourceMap, emitSkipped] = getOutput(code, normalizedFileName); + } + // If module classification contradicts the above, call the relevant transpiler + if (classification.moduleType === 'cjs' && + (shouldOverwriteEmitWhenForcingCommonJS || emitSkipped)) { + [value, sourceMap] = getOutputForceCommonJS(code, normalizedFileName); + } + else if (classification.moduleType === 'esm' && + (shouldOverwriteEmitWhenForcingEsm || emitSkipped)) { + [value, sourceMap] = getOutputForceESM(code, normalizedFileName); + } + else if (emitSkipped) { + // Happens when ts compiler skips emit or in transpileOnly mode + const classification = (0, node_module_type_classifier_1.classifyModule)(fileName, isNodeModuleType); + [value, sourceMap] = + classification === 'nodecjs' + ? getOutputForceNodeCommonJS(code, normalizedFileName) + : classification === 'nodeesm' + ? getOutputForceNodeESM(code, normalizedFileName) + : classification === 'cjs' + ? getOutputForceCommonJS(code, normalizedFileName) + : classification === 'esm' + ? getOutputForceESM(code, normalizedFileName) + : getOutputTranspileOnly(code, normalizedFileName); + } + const output = updateOutput(value, normalizedFileName, sourceMap, getEmitExtension); + outputCache.set(normalizedFileName, { content: output }); + return output; + } + let active = true; + const enabled = (enabled) => enabled === undefined ? active : (active = !!enabled); + const ignored = (fileName) => { + if (!active) + return true; + const ext = (0, path_1.extname)(fileName); + if (extensions.compiled.includes(ext)) { + return !isScoped(fileName) || shouldIgnore(fileName); + } + return true; + }; + function addDiagnosticFilter(filter) { + diagnosticFilters.push({ + ...filter, + filenamesAbsolute: filter.filenamesAbsolute.map((f) => (0, util_1.normalizeSlashes)(f)), + }); + } + const getNodeEsmResolver = (0, util_1.once)(() => require('../dist-raw/node-internal-modules-esm-resolve').createResolve({ + extensions, + preferTsExts: options.preferTsExts, + tsNodeExperimentalSpecifierResolution: options.experimentalSpecifierResolution, + })); + const getNodeEsmGetFormat = (0, util_1.once)(() => require('../dist-raw/node-internal-modules-esm-get_format').createGetFormat(options.experimentalSpecifierResolution, getNodeEsmResolver())); + const getNodeCjsLoader = (0, util_1.once)(() => require('../dist-raw/node-internal-modules-cjs-loader').createCjsLoader({ + extensions, + preferTsExts: options.preferTsExts, + nodeEsmResolver: getNodeEsmResolver(), + })); + return { + [TS_NODE_SERVICE_BRAND]: true, + ts, + compilerPath: compiler, + config, + compile, + getTypeInfo, + ignored, + enabled, + options, + configFilePath, + moduleTypeClassifier, + shouldReplAwait, + addDiagnosticFilter, + installSourceMapSupport, + enableExperimentalEsmLoaderInterop, + transpileOnly, + projectLocalResolveHelper, + getNodeEsmResolver, + getNodeEsmGetFormat, + getNodeCjsLoader, + extensions, + }; +} +exports.createFromPreloadedConfig = createFromPreloadedConfig; +/** + * Check if the filename should be ignored. + */ +function createIgnore(ignoreBaseDir, ignore) { + return (fileName) => { + const relname = (0, path_1.relative)(ignoreBaseDir, fileName); + const path = (0, util_1.normalizeSlashes)(relname); + return ignore.some((x) => x.test(path)); + }; +} +/** + * Register the extensions to support when importing files. + */ +function registerExtensions(preferTsExts, extensions, service, originalJsHandler) { + const exts = new Set(extensions); + // Can't add these extensions cuz would allow omitting file extension; node requires ext for .cjs and .mjs + // Unless they're already registered by something else (nyc does this): + // then we *must* hook them or else our transformer will not be called. + for (const cannotAdd of ['.mts', '.cts', '.mjs', '.cjs']) { + if (exts.has(cannotAdd) && !(0, util_1.hasOwnProperty)(require.extensions, cannotAdd)) { + // Unrecognized file exts can be transformed via the `.js` handler. + exts.add('.js'); + exts.delete(cannotAdd); + } + } + // Register new extensions. + for (const ext of exts) { + registerExtension(ext, service, originalJsHandler); + } + if (preferTsExts) { + const preferredExtensions = new Set([ + ...exts, + ...Object.keys(require.extensions), + ]); + // Re-sort iteration order of Object.keys() + for (const ext of preferredExtensions) { + const old = Object.getOwnPropertyDescriptor(require.extensions, ext); + delete require.extensions[ext]; + Object.defineProperty(require.extensions, ext, old); + } + } +} +/** + * Register the extension for node. + */ +function registerExtension(ext, service, originalHandler) { + const old = require.extensions[ext] || originalHandler; + require.extensions[ext] = function (m, filename) { + if (service.ignored(filename)) + return old(m, filename); + assertScriptCanLoadAsCJS(service, m, filename); + const _compile = m._compile; + m._compile = function (code, fileName) { + (0, exports.debug)('module._compile', fileName); + const result = service.compile(code, fileName); + return _compile.call(this, result, fileName); + }; + return old(m, filename); + }; +} +/** + * Update the output remapping the source map. + */ +function updateOutput(outputText, fileName, sourceMap, getEmitExtension) { + const base64Map = Buffer.from(updateSourceMap(sourceMap, fileName), 'utf8').toString('base64'); + const sourceMapContent = `//# sourceMappingURL=data:application/json;charset=utf-8;base64,${base64Map}`; + // Expected form: `//# sourceMappingURL=foo bar.js.map` or `//# sourceMappingURL=foo%20bar.js.map` for input file "foo bar.tsx" + // Percent-encoding behavior added in TS 4.1.1: https://github.com/microsoft/TypeScript/issues/40951 + const prefix = '//# sourceMappingURL='; + const prefixLength = prefix.length; + const baseName = /*foo.tsx*/ (0, path_1.basename)(fileName); + const extName = /*.tsx*/ (0, path_1.extname)(fileName); + const extension = /*.js*/ getEmitExtension(fileName); + const sourcemapFilename = baseName.slice(0, -extName.length) + extension + '.map'; + const sourceMapLengthWithoutPercentEncoding = prefixLength + sourcemapFilename.length; + /* + * Only rewrite if existing directive exists at the location we expect, to support: + * a) compilers that do not append a sourcemap directive + * b) situations where we did the math wrong + * Not ideal, but appending our sourcemap *after* a pre-existing sourcemap still overrides, so the end-user is happy. + */ + if (outputText.substr(-sourceMapLengthWithoutPercentEncoding, prefixLength) === + prefix) { + return (outputText.slice(0, -sourceMapLengthWithoutPercentEncoding) + + sourceMapContent); + } + // If anyone asks why we're not using URL, the URL equivalent is: `u = new URL('http://d'); u.pathname = "/" + sourcemapFilename; return u.pathname.slice(1); + const sourceMapLengthWithPercentEncoding = prefixLength + encodeURI(sourcemapFilename).length; + if (outputText.substr(-sourceMapLengthWithPercentEncoding, prefixLength) === + prefix) { + return (outputText.slice(0, -sourceMapLengthWithPercentEncoding) + + sourceMapContent); + } + return `${outputText}\n${sourceMapContent}`; +} +/** + * Update the source map contents for improved output. + */ +function updateSourceMap(sourceMapText, fileName) { + const sourceMap = JSON.parse(sourceMapText); + sourceMap.file = fileName; + sourceMap.sources = [fileName]; + delete sourceMap.sourceRoot; + return JSON.stringify(sourceMap); +} +/** + * Filter diagnostics. + */ +function filterDiagnostics(diagnostics, filters) { + return diagnostics.filter((d) => filters.every((f) => { + var _a; + return (!f.appliesToAllFiles && + f.filenamesAbsolute.indexOf((_a = d.file) === null || _a === void 0 ? void 0 : _a.fileName) === -1) || + f.diagnosticsIgnored.indexOf(d.code) === -1; + })); +} +/** + * Get token at file position. + * + * Reference: https://github.com/microsoft/TypeScript/blob/fcd9334f57d85b73dd66ad2d21c02e84822f4841/src/services/utilities.ts#L705-L731 + */ +function getTokenAtPosition(ts, sourceFile, position) { + let current = sourceFile; + outer: while (true) { + for (const child of current.getChildren(sourceFile)) { + const start = child.getFullStart(); + if (start > position) + break; + const end = child.getEnd(); + if (position <= end) { + current = child; + continue outer; + } + } + return current; + } +} +/** + * Create an implementation of node's ESM loader hooks. + * + * This may be useful if you + * want to wrap or compose the loader hooks to add additional functionality or + * combine with another loader. + * + * Node changed the hooks API, so there are two possible APIs. This function + * detects your node version and returns the appropriate API. + * + * @category ESM Loader + */ +const createEsmHooks = (tsNodeService) => require('./esm').createEsmHooks(tsNodeService); +exports.createEsmHooks = createEsmHooks; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/index.js.map b/node_modules/ts-node/dist/index.js.map new file mode 100644 index 0000000..c65cd12 --- /dev/null +++ b/node_modules/ts-node/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,+BAAkE;AAClE,mCAAgC;AAChC,6BAA6B;AAC7B,6BAAoC;AAGpC,2CAAuC;AAIvC,iCAWgB;AAChB,mDAAkE;AAElE,qEAGkC;AAClC,6DAA+D;AAE/D,2DAG6B;AAC7B,+EAA+D;AAI/D,uDAA8D;AAC9D,+DAAgE;AAGhE,+BAKgB;AAJd,kGAAA,UAAU,OAAA;AAmBZ;;;GAGG;AACH,MAAM,8BAA8B,GAClC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC;AAE1D;;;;;GAKG;AACH,IAAI,wBAAwB,GAIhB,8BAA8B;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AE,CAAC;YACnC,IAAI,KAAK,GAAG,QAAQ;gBAAE,MAAM;YAE5B,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;YAC3B,IAAI,QAAQ,IAAI,GAAG,EAAE;gBACnB,OAAO,GAAG,KAAK,CAAC;gBAChB,SAAS,KAAK,CAAC;aAChB;SACF;QAED,OAAO,OAAO,CAAC;KAChB;AACH,CAAC;AAED;;;;;;;;;;;GAWG;AACI,MAAM,cAAc,GAA4B,CACrD,aAAsB,EACtB,EAAE,CAAE,OAAO,CAAC,OAAO,CAA4B,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;AAFnE,QAAA,cAAc,kBAEqD","sourcesContent":["import { relative, basename, extname, dirname, join } from 'path';\nimport { Module } from 'module';\nimport * as util from 'util';\nimport { fileURLToPath } from 'url';\n\nimport type * as _sourceMapSupport from '@cspotcode/source-map-support';\nimport { BaseError } from 'make-error';\nimport type * as _ts from 'typescript';\n\nimport type { Transpiler, TranspilerFactory } from './transpilers/types';\nimport {\n cachedLookup,\n createProjectLocalResolveHelper,\n hasOwnProperty,\n normalizeSlashes,\n once,\n parse,\n ProjectLocalResolveHelper,\n split,\n versionGteLt,\n yn,\n} from './util';\nimport { findAndReadConfig, loadCompiler } from './configuration';\nimport type { TSCommon, TSInternal } from './ts-compiler-types';\nimport {\n createModuleTypeClassifier,\n ModuleTypeClassifier,\n} from './module-type-classifier';\nimport { createResolverFunctions } from './resolver-functions';\nimport type { createEsmHooks as createEsmHooksFn } from './esm';\nimport {\n installCommonjsResolveHooksIfNecessary,\n ModuleConstructorWithInternals,\n} from './cjs-resolve-hooks';\nimport { classifyModule } from './node-module-type-classifier';\nimport type * as _nodeInternalModulesEsmResolve from '../dist-raw/node-internal-modules-esm-resolve';\nimport type * as _nodeInternalModulesEsmGetFormat from '../dist-raw/node-internal-modules-esm-get_format';\nimport type * as _nodeInternalModulesCjsLoader from '../dist-raw/node-internal-modules-cjs-loader';\nimport { Extensions, getExtensions } from './file-extensions';\nimport { createTsTranspileModule } from './ts-transpile-module';\n\nexport { TSCommon };\nexport {\n createRepl,\n CreateReplOptions,\n ReplService,\n EvalAwarePartialHost,\n} from './repl';\nexport type {\n TranspilerModule,\n TranspilerFactory,\n CreateTranspilerOptions,\n TranspileOutput,\n TranspileOptions,\n Transpiler,\n} from './transpilers/types';\nexport type {\n NodeLoaderHooksAPI1,\n NodeLoaderHooksAPI2,\n NodeLoaderHooksFormat,\n} from './esm';\n\n/**\n * Does this version of node obey the package.json \"type\" field\n * and throw ERR_REQUIRE_ESM when attempting to require() an ESM modules.\n */\nconst engineSupportsPackageTypeField =\n parseInt(process.versions.node.split('.')[0], 10) >= 12;\n\n/**\n * Assert that script can be loaded as CommonJS when we attempt to require it.\n * If it should be loaded as ESM, throw ERR_REQUIRE_ESM like node does.\n *\n * Loaded conditionally so we don't need to support older node versions\n */\nlet assertScriptCanLoadAsCJS: (\n service: Service,\n module: NodeJS.Module,\n filename: string\n) => void = engineSupportsPackageTypeField\n ? (\n require('../dist-raw/node-internal-modules-cjs-loader') as typeof _nodeInternalModulesCjsLoader\n ).assertScriptCanLoadAsCJSImpl\n : () => {\n /* noop */\n };\n\n/**\n * Registered `ts-node` instance information.\n */\nexport const REGISTER_INSTANCE = Symbol.for('ts-node.register.instance');\n\n/**\n * Expose `REGISTER_INSTANCE` information on node.js `process`.\n */\ndeclare global {\n namespace NodeJS {\n interface Process {\n [REGISTER_INSTANCE]?: Service;\n }\n }\n}\n\n/** @internal */\nexport const env = process.env as ProcessEnv;\n/**\n * Declare all env vars, to aid discoverability.\n * If an env var affects ts-node's behavior, it should not be buried somewhere in our codebase.\n * @internal\n */\nexport interface ProcessEnv {\n TS_NODE_DEBUG?: string;\n TS_NODE_CWD?: string;\n /** @deprecated */\n TS_NODE_DIR?: string;\n TS_NODE_EMIT?: string;\n TS_NODE_SCOPE?: string;\n TS_NODE_SCOPE_DIR?: string;\n TS_NODE_FILES?: string;\n TS_NODE_PRETTY?: string;\n TS_NODE_COMPILER?: string;\n TS_NODE_COMPILER_OPTIONS?: string;\n TS_NODE_IGNORE?: string;\n TS_NODE_PROJECT?: string;\n TS_NODE_SKIP_PROJECT?: string;\n TS_NODE_SKIP_IGNORE?: string;\n TS_NODE_PREFER_TS_EXTS?: string;\n TS_NODE_IGNORE_DIAGNOSTICS?: string;\n TS_NODE_TRANSPILE_ONLY?: string;\n TS_NODE_TYPE_CHECK?: string;\n TS_NODE_COMPILER_HOST?: string;\n TS_NODE_LOG_ERROR?: string;\n TS_NODE_HISTORY?: string;\n TS_NODE_EXPERIMENTAL_REPL_AWAIT?: string;\n\n NODE_NO_READLINE?: string;\n}\n\n/**\n * @internal\n */\nexport const INSPECT_CUSTOM = util.inspect.custom || 'inspect';\n\n/**\n * Debugging `ts-node`.\n */\nconst shouldDebug = yn(env.TS_NODE_DEBUG);\n/** @internal */\nexport const debug = shouldDebug\n ? (...args: any) =>\n console.log(`[ts-node ${new Date().toISOString()}]`, ...args)\n : () => undefined;\nconst debugFn = shouldDebug\n ? (key: string, fn: (arg: T) => U) => {\n let i = 0;\n return (x: T) => {\n debug(key, x, ++i);\n return fn(x);\n };\n }\n : (_: string, fn: (arg: T) => U) => fn;\n\n/**\n * Export the current version.\n */\nexport const VERSION = require('../package.json').version;\n\n/**\n * Options for creating a new TypeScript compiler instance.\n\n * @category Basic\n */\nexport interface CreateOptions {\n /**\n * Behave as if invoked within this working directory. Roughly equivalent to `cd $dir && ts-node ...`\n *\n * @default process.cwd()\n */\n cwd?: string;\n /**\n * Legacy alias for `cwd`\n *\n * @deprecated use `projectSearchDir` or `cwd`\n */\n dir?: string;\n /**\n * Emit output files into `.ts-node` directory.\n *\n * @default false\n */\n emit?: boolean;\n /**\n * Scope compiler to files within `scopeDir`.\n *\n * @default false\n */\n scope?: boolean;\n /**\n * @default First of: `tsconfig.json` \"rootDir\" if specified, directory containing `tsconfig.json`, or cwd if no `tsconfig.json` is loaded.\n */\n scopeDir?: string;\n /**\n * Use pretty diagnostic formatter.\n *\n * @default false\n */\n pretty?: boolean;\n /**\n * Use TypeScript's faster `transpileModule`.\n *\n * @default false\n */\n transpileOnly?: boolean;\n /**\n * **DEPRECATED** Specify type-check is enabled (e.g. `transpileOnly == false`).\n *\n * @default true\n */\n typeCheck?: boolean;\n /**\n * Use TypeScript's compiler host API instead of the language service API.\n *\n * @default false\n */\n compilerHost?: boolean;\n /**\n * Logs TypeScript errors to stderr instead of throwing exceptions.\n *\n * @default false\n */\n logError?: boolean;\n /**\n * Load \"files\" and \"include\" from `tsconfig.json` on startup.\n *\n * Default is to override `tsconfig.json` \"files\" and \"include\" to only include the entrypoint script.\n *\n * @default false\n */\n files?: boolean;\n /**\n * Specify a custom TypeScript compiler.\n *\n * @default \"typescript\"\n */\n compiler?: string;\n /**\n * Specify a custom transpiler for use with transpileOnly\n */\n transpiler?: string | [string, object];\n /**\n * Transpile with swc instead of the TypeScript compiler, and skip typechecking.\n *\n * Equivalent to setting both `transpileOnly: true` and `transpiler: 'ts-node/transpilers/swc'`\n *\n * For complete instructions: https://typestrong.org/ts-node/docs/transpilers\n */\n swc?: boolean;\n /**\n * Paths which should not be compiled.\n *\n * Each string in the array is converted to a regular expression via `new RegExp()` and tested against source paths prior to compilation.\n *\n * Source paths are normalized to posix-style separators, relative to the directory containing `tsconfig.json` or to cwd if no `tsconfig.json` is loaded.\n *\n * Default is to ignore all node_modules subdirectories.\n *\n * @default [\"(?:^|/)node_modules/\"]\n */\n ignore?: string[];\n /**\n * Path to TypeScript config file or directory containing a `tsconfig.json`.\n * Similar to the `tsc --project` flag: https://www.typescriptlang.org/docs/handbook/compiler-options.html\n */\n project?: string;\n /**\n * Search for TypeScript config file (`tsconfig.json`) in this or parent directories.\n */\n projectSearchDir?: string;\n /**\n * Skip project config resolution and loading.\n *\n * @default false\n */\n skipProject?: boolean;\n /**\n * Skip ignore check, so that compilation will be attempted for all files with matching extensions.\n *\n * @default false\n */\n skipIgnore?: boolean;\n /**\n * JSON object to merge with TypeScript `compilerOptions`.\n *\n * @allOf [{\"$ref\": \"https://schemastore.azurewebsites.net/schemas/json/tsconfig.json#definitions/compilerOptionsDefinition/properties/compilerOptions\"}]\n */\n compilerOptions?: object;\n /**\n * Ignore TypeScript warnings by diagnostic code.\n */\n ignoreDiagnostics?: Array;\n /**\n * Modules to require, like node's `--require` flag.\n *\n * If specified in `tsconfig.json`, the modules will be resolved relative to the `tsconfig.json` file.\n *\n * If specified programmatically, each input string should be pre-resolved to an absolute path for\n * best results.\n */\n require?: Array;\n readFile?: (path: string) => string | undefined;\n fileExists?: (path: string) => boolean;\n transformers?:\n | _ts.CustomTransformers\n | ((p: _ts.Program) => _ts.CustomTransformers);\n /**\n * Allows the usage of top level await in REPL.\n *\n * Uses node's implementation which accomplishes this with an AST syntax transformation.\n *\n * Enabled by default when tsconfig target is es2018 or above. Set to false to disable.\n *\n * **Note**: setting to `true` when tsconfig target is too low will throw an Error. Leave as `undefined`\n * to get default, automatic behavior.\n */\n experimentalReplAwait?: boolean;\n /**\n * Override certain paths to be compiled and executed as CommonJS or ECMAScript modules.\n * When overridden, the tsconfig \"module\" and package.json \"type\" fields are overridden, and\n * the file extension is ignored.\n * This is useful if you cannot use .mts, .cts, .mjs, or .cjs file extensions;\n * it achieves the same effect.\n *\n * Each key is a glob pattern following the same rules as tsconfig's \"include\" array.\n * When multiple patterns match the same file, the last pattern takes precedence.\n *\n * `cjs` overrides matches files to compile and execute as CommonJS.\n * `esm` overrides matches files to compile and execute as native ECMAScript modules.\n * `package` overrides either of the above to default behavior, which obeys package.json \"type\" and\n * tsconfig.json \"module\" options.\n */\n moduleTypes?: ModuleTypes;\n /**\n * @internal\n * Set by our configuration loader whenever a config file contains options that\n * are relative to the config file they came from, *and* when other logic needs\n * to know this. Some options can be eagerly resolved to absolute paths by\n * the configuration loader, so it is *not* necessary for their source to be set here.\n */\n optionBasePaths?: OptionBasePaths;\n /**\n * A function to collect trace messages from the TypeScript compiler, for example when `traceResolution` is enabled.\n *\n * @default console.log\n */\n tsTrace?: (str: string) => void;\n /**\n * Enable native ESM support.\n *\n * For details, see https://typestrong.org/ts-node/docs/imports#native-ecmascript-modules\n */\n esm?: boolean;\n /**\n * Re-order file extensions so that TypeScript imports are preferred.\n *\n * For example, when both `index.js` and `index.ts` exist, enabling this option causes `require('./index')` to resolve to `index.ts` instead of `index.js`\n *\n * @default false\n */\n preferTsExts?: boolean;\n /**\n * Like node's `--experimental-specifier-resolution`, , but can also be set in your `tsconfig.json` for convenience.\n *\n * For details, see https://nodejs.org/dist/latest-v18.x/docs/api/esm.html#customizing-esm-specifier-resolution-algorithm\n */\n experimentalSpecifierResolution?: 'node' | 'explicit';\n /**\n * Allow using voluntary `.ts` file extension in import specifiers.\n *\n * Typically, in ESM projects, import specifiers must have an emit extension, `.js`, `.cjs`, or `.mjs`,\n * and we automatically map to the corresponding `.ts`, `.cts`, or `.mts` source file. This is the\n * recommended approach.\n *\n * However, if you really want to use `.ts` in import specifiers, and are aware that this may\n * break tooling, you can enable this flag.\n */\n experimentalTsImportSpecifiers?: boolean;\n}\n\nexport type ModuleTypes = Record;\nexport type ModuleTypeOverride = 'cjs' | 'esm' | 'package';\n\n/** @internal */\nexport interface OptionBasePaths {\n moduleTypes?: string;\n transpiler?: string;\n compiler?: string;\n swc?: string;\n}\n\n/**\n * Options for registering a TypeScript compiler instance globally.\n\n * @category Basic\n */\nexport interface RegisterOptions extends CreateOptions {\n /**\n * Enable experimental features that re-map imports and require calls to support:\n * `baseUrl`, `paths`, `rootDirs`, `.js` to `.ts` file extension mappings,\n * `outDir` to `rootDir` mappings for composite projects and monorepos.\n *\n * For details, see https://github.com/TypeStrong/ts-node/issues/1514\n */\n experimentalResolver?: boolean;\n}\n\nexport type ExperimentalSpecifierResolution = 'node' | 'explicit';\n\n/**\n * Must be an interface to support `typescript-json-schema`.\n */\nexport interface TsConfigOptions\n extends Omit<\n RegisterOptions,\n | 'transformers'\n | 'readFile'\n | 'fileExists'\n | 'skipProject'\n | 'project'\n | 'dir'\n | 'cwd'\n | 'projectSearchDir'\n | 'optionBasePaths'\n | 'tsTrace'\n > {}\n\n/**\n * Information retrieved from type info check.\n */\nexport interface TypeInfo {\n name: string;\n comment: string;\n}\n\n/**\n * Default register options, including values specified via environment\n * variables.\n * @internal\n */\nexport const DEFAULTS: RegisterOptions = {\n cwd: env.TS_NODE_CWD ?? env.TS_NODE_DIR,\n emit: yn(env.TS_NODE_EMIT),\n scope: yn(env.TS_NODE_SCOPE),\n scopeDir: env.TS_NODE_SCOPE_DIR,\n files: yn(env.TS_NODE_FILES),\n pretty: yn(env.TS_NODE_PRETTY),\n compiler: env.TS_NODE_COMPILER,\n compilerOptions: parse(env.TS_NODE_COMPILER_OPTIONS),\n ignore: split(env.TS_NODE_IGNORE),\n project: env.TS_NODE_PROJECT,\n skipProject: yn(env.TS_NODE_SKIP_PROJECT),\n skipIgnore: yn(env.TS_NODE_SKIP_IGNORE),\n preferTsExts: yn(env.TS_NODE_PREFER_TS_EXTS),\n ignoreDiagnostics: split(env.TS_NODE_IGNORE_DIAGNOSTICS),\n transpileOnly: yn(env.TS_NODE_TRANSPILE_ONLY),\n typeCheck: yn(env.TS_NODE_TYPE_CHECK),\n compilerHost: yn(env.TS_NODE_COMPILER_HOST),\n logError: yn(env.TS_NODE_LOG_ERROR),\n experimentalReplAwait: yn(env.TS_NODE_EXPERIMENTAL_REPL_AWAIT) ?? undefined,\n tsTrace: console.log.bind(console),\n};\n\n/**\n * TypeScript diagnostics error.\n */\nexport class TSError extends BaseError {\n name = 'TSError';\n diagnosticText!: string;\n diagnostics!: ReadonlyArray<_ts.Diagnostic>;\n\n constructor(\n diagnosticText: string,\n public diagnosticCodes: number[],\n diagnostics: ReadonlyArray<_ts.Diagnostic> = []\n ) {\n super(`⨯ Unable to compile TypeScript:\\n${diagnosticText}`);\n Object.defineProperty(this, 'diagnosticText', {\n configurable: true,\n writable: true,\n value: diagnosticText,\n });\n Object.defineProperty(this, 'diagnostics', {\n configurable: true,\n writable: true,\n value: diagnostics,\n });\n }\n\n /**\n * @internal\n */\n [INSPECT_CUSTOM]() {\n return this.diagnosticText;\n }\n}\n\nconst TS_NODE_SERVICE_BRAND = Symbol('TS_NODE_SERVICE_BRAND');\n\n/**\n * Primary ts-node service, which wraps the TypeScript API and can compile TypeScript to JavaScript\n */\nexport interface Service {\n /** @internal */\n [TS_NODE_SERVICE_BRAND]: true;\n ts: TSCommon;\n /** @internal */\n compilerPath: string;\n config: _ts.ParsedCommandLine;\n options: RegisterOptions;\n enabled(enabled?: boolean): boolean;\n ignored(fileName: string): boolean;\n compile(code: string, fileName: string, lineOffset?: number): string;\n getTypeInfo(code: string, fileName: string, position: number): TypeInfo;\n /** @internal */\n configFilePath: string | undefined;\n /** @internal */\n moduleTypeClassifier: ModuleTypeClassifier;\n /** @internal */\n readonly shouldReplAwait: boolean;\n /** @internal */\n addDiagnosticFilter(filter: DiagnosticFilter): void;\n /** @internal */\n installSourceMapSupport(): void;\n /** @internal */\n enableExperimentalEsmLoaderInterop(): void;\n /** @internal */\n transpileOnly: boolean;\n /** @internal */\n projectLocalResolveHelper: ProjectLocalResolveHelper;\n /** @internal */\n getNodeEsmResolver: () => ReturnType<\n typeof import('../dist-raw/node-internal-modules-esm-resolve').createResolve\n >;\n /** @internal */\n getNodeEsmGetFormat: () => ReturnType<\n typeof import('../dist-raw/node-internal-modules-esm-get_format').createGetFormat\n >;\n /** @internal */\n getNodeCjsLoader: () => ReturnType<\n typeof import('../dist-raw/node-internal-modules-cjs-loader').createCjsLoader\n >;\n /** @internal */\n extensions: Extensions;\n}\n\n/**\n * Re-export of `Service` interface for backwards-compatibility\n * @deprecated use `Service` instead\n * @see {Service}\n */\nexport type Register = Service;\n\n/** @internal */\nexport interface DiagnosticFilter {\n /** if true, filter applies to all files */\n appliesToAllFiles: boolean;\n /** Filter applies onto to these filenames. Only used if appliesToAllFiles is false */\n filenamesAbsolute: string[];\n /** these diagnostic codes are ignored */\n diagnosticsIgnored: number[];\n}\n\n/**\n * Create a new TypeScript compiler instance and register it onto node.js\n *\n * @category Basic\n */\nexport function register(opts?: RegisterOptions): Service;\n/**\n * Register TypeScript compiler instance onto node.js\n\n * @category Basic\n */\nexport function register(service: Service): Service;\nexport function register(\n serviceOrOpts: Service | RegisterOptions | undefined\n): Service {\n // Is this a Service or a RegisterOptions?\n let service = serviceOrOpts as Service;\n if (!(serviceOrOpts as Service)?.[TS_NODE_SERVICE_BRAND]) {\n // Not a service; is options\n service = create((serviceOrOpts ?? {}) as RegisterOptions);\n }\n\n const originalJsHandler = require.extensions['.js'];\n\n // Expose registered instance globally.\n process[REGISTER_INSTANCE] = service;\n\n // Register the extensions.\n registerExtensions(\n service.options.preferTsExts,\n service.extensions.compiled,\n service,\n originalJsHandler\n );\n\n installCommonjsResolveHooksIfNecessary(service);\n\n // Require specified modules before start-up.\n (Module as ModuleConstructorWithInternals)._preloadModules(\n service.options.require\n );\n\n return service;\n}\n\n/**\n * Create TypeScript compiler instance.\n *\n * @category Basic\n */\nexport function create(rawOptions: CreateOptions = {}): Service {\n const foundConfigResult = findAndReadConfig(rawOptions);\n return createFromPreloadedConfig(foundConfigResult);\n}\n\n/** @internal */\nexport function createFromPreloadedConfig(\n foundConfigResult: ReturnType\n): Service {\n const {\n configFilePath,\n cwd,\n options,\n config,\n compiler,\n projectLocalResolveDir,\n optionBasePaths,\n } = foundConfigResult;\n\n const projectLocalResolveHelper = createProjectLocalResolveHelper(\n projectLocalResolveDir\n );\n\n const ts = loadCompiler(compiler);\n\n // Experimental REPL await is not compatible targets lower than ES2018\n const targetSupportsTla = config.options.target! >= ts.ScriptTarget.ES2018;\n if (options.experimentalReplAwait === true && !targetSupportsTla) {\n throw new Error(\n 'Experimental REPL await is not compatible with targets lower than ES2018'\n );\n }\n // Top-level await was added in TS 3.8\n const tsVersionSupportsTla = versionGteLt(ts.version, '3.8.0');\n if (options.experimentalReplAwait === true && !tsVersionSupportsTla) {\n throw new Error(\n 'Experimental REPL await is not compatible with TypeScript versions older than 3.8'\n );\n }\n\n const shouldReplAwait =\n options.experimentalReplAwait !== false &&\n tsVersionSupportsTla &&\n targetSupportsTla;\n\n // swc implies two other options\n // typeCheck option was implemented specifically to allow overriding tsconfig transpileOnly from the command-line\n // So we should allow using typeCheck to override swc\n if (options.swc && !options.typeCheck) {\n if (options.transpileOnly === false) {\n throw new Error(\n \"Cannot enable 'swc' option with 'transpileOnly: false'. 'swc' implies 'transpileOnly'.\"\n );\n }\n if (options.transpiler) {\n throw new Error(\n \"Cannot specify both 'swc' and 'transpiler' options. 'swc' uses the built-in swc transpiler.\"\n );\n }\n }\n\n const readFile = options.readFile || ts.sys.readFile;\n const fileExists = options.fileExists || ts.sys.fileExists;\n // typeCheck can override transpileOnly, useful for CLI flag to override config file\n const transpileOnly =\n (options.transpileOnly === true || options.swc === true) &&\n options.typeCheck !== true;\n let transpiler: RegisterOptions['transpiler'] | undefined = undefined;\n let transpilerBasePath: string | undefined = undefined;\n if (options.transpiler) {\n transpiler = options.transpiler;\n transpilerBasePath = optionBasePaths.transpiler;\n } else if (options.swc) {\n transpiler = require.resolve('./transpilers/swc.js');\n transpilerBasePath = optionBasePaths.swc;\n }\n const transformers = options.transformers || undefined;\n const diagnosticFilters: Array = [\n {\n appliesToAllFiles: true,\n filenamesAbsolute: [],\n diagnosticsIgnored: [\n 6059, // \"'rootDir' is expected to contain all source files.\"\n 18002, // \"The 'files' list in config file is empty.\"\n 18003, // \"No inputs were found in config file.\"\n ...(options.experimentalTsImportSpecifiers\n ? [\n 2691, // \"An import path cannot end with a '.ts' extension. Consider importing '' instead.\"\n ]\n : []),\n ...(options.ignoreDiagnostics || []),\n ].map(Number),\n },\n ];\n\n const configDiagnosticList = filterDiagnostics(\n config.errors,\n diagnosticFilters\n );\n const outputCache = new Map<\n string,\n {\n content: string;\n }\n >();\n\n const configFileDirname = configFilePath ? dirname(configFilePath) : null;\n const scopeDir =\n options.scopeDir ?? config.options.rootDir ?? configFileDirname ?? cwd;\n const ignoreBaseDir = configFileDirname ?? cwd;\n const isScoped = options.scope\n ? (fileName: string) => relative(scopeDir, fileName).charAt(0) !== '.'\n : () => true;\n const shouldIgnore = createIgnore(\n ignoreBaseDir,\n options.skipIgnore\n ? []\n : (options.ignore || ['(?:^|/)node_modules/']).map(\n (str) => new RegExp(str)\n )\n );\n\n const diagnosticHost: _ts.FormatDiagnosticsHost = {\n getNewLine: () => ts.sys.newLine,\n getCurrentDirectory: () => cwd,\n // TODO switch to getCanonicalFileName we already create later in scope\n getCanonicalFileName: ts.sys.useCaseSensitiveFileNames\n ? (x) => x\n : (x) => x.toLowerCase(),\n };\n\n if (options.transpileOnly && typeof transformers === 'function') {\n throw new TypeError(\n 'Transformers function is unavailable in \"--transpile-only\"'\n );\n }\n let createTranspiler = initializeTranspilerFactory();\n function initializeTranspilerFactory() {\n if (transpiler) {\n if (!transpileOnly)\n throw new Error(\n 'Custom transpiler can only be used when transpileOnly is enabled.'\n );\n const transpilerName =\n typeof transpiler === 'string' ? transpiler : transpiler[0];\n const transpilerOptions =\n typeof transpiler === 'string' ? {} : transpiler[1] ?? {};\n const transpilerConfigLocalResolveHelper = transpilerBasePath\n ? createProjectLocalResolveHelper(transpilerBasePath)\n : projectLocalResolveHelper;\n const transpilerPath = transpilerConfigLocalResolveHelper(\n transpilerName,\n true\n );\n const transpilerFactory = require(transpilerPath)\n .create as TranspilerFactory;\n return createTranspiler;\n\n function createTranspiler(\n compilerOptions: TSCommon.CompilerOptions,\n nodeModuleEmitKind?: NodeModuleEmitKind\n ) {\n return transpilerFactory?.({\n service: {\n options,\n config: {\n ...config,\n options: compilerOptions,\n },\n projectLocalResolveHelper,\n },\n transpilerConfigLocalResolveHelper,\n nodeModuleEmitKind,\n ...transpilerOptions,\n });\n }\n }\n }\n\n /**\n * True if require() hooks should interop with experimental ESM loader.\n * Enabled explicitly via a flag since it is a breaking change.\n */\n let experimentalEsmLoader = false;\n function enableExperimentalEsmLoaderInterop() {\n experimentalEsmLoader = true;\n }\n\n // Install source map support and read from memory cache.\n installSourceMapSupport();\n function installSourceMapSupport() {\n const sourceMapSupport =\n require('@cspotcode/source-map-support') as typeof _sourceMapSupport;\n sourceMapSupport.install({\n environment: 'node',\n retrieveFile(pathOrUrl: string) {\n let path = pathOrUrl;\n // If it's a file URL, convert to local path\n // Note: fileURLToPath does not exist on early node v10\n // I could not find a way to handle non-URLs except to swallow an error\n if (experimentalEsmLoader && path.startsWith('file://')) {\n try {\n path = fileURLToPath(path);\n } catch (e) {\n /* swallow error */\n }\n }\n path = normalizeSlashes(path);\n return outputCache.get(path)?.content || '';\n },\n redirectConflictingLibrary: true,\n onConflictingLibraryRedirect(\n request,\n parent,\n isMain,\n options,\n redirectedRequest\n ) {\n debug(\n `Redirected an attempt to require source-map-support to instead receive @cspotcode/source-map-support. \"${\n (parent as NodeJS.Module).filename\n }\" attempted to require or resolve \"${request}\" and was redirected to \"${redirectedRequest}\".`\n );\n },\n });\n }\n\n const shouldHavePrettyErrors =\n options.pretty === undefined ? process.stdout.isTTY : options.pretty;\n\n const formatDiagnostics = shouldHavePrettyErrors\n ? ts.formatDiagnosticsWithColorAndContext || ts.formatDiagnostics\n : ts.formatDiagnostics;\n\n function createTSError(diagnostics: ReadonlyArray<_ts.Diagnostic>) {\n const diagnosticText = formatDiagnostics(diagnostics, diagnosticHost);\n const diagnosticCodes = diagnostics.map((x) => x.code);\n return new TSError(diagnosticText, diagnosticCodes, diagnostics);\n }\n\n function reportTSError(configDiagnosticList: _ts.Diagnostic[]) {\n const error = createTSError(configDiagnosticList);\n if (options.logError) {\n // Print error in red color and continue execution.\n console.error('\\x1b[31m%s\\x1b[0m', error);\n } else {\n // Throw error and exit the script.\n throw error;\n }\n }\n\n // Render the configuration errors.\n if (configDiagnosticList.length) reportTSError(configDiagnosticList);\n\n const jsxEmitPreserve = config.options.jsx === ts.JsxEmit.Preserve;\n /**\n * Get the extension for a transpiled file.\n * [MUST_UPDATE_FOR_NEW_FILE_EXTENSIONS]\n */\n function getEmitExtension(path: string) {\n const lastDotIndex = path.lastIndexOf('.');\n if (lastDotIndex >= 0) {\n const ext = path.slice(lastDotIndex);\n switch (ext) {\n case '.js':\n case '.ts':\n return '.js';\n case '.jsx':\n case '.tsx':\n return jsxEmitPreserve ? '.jsx' : '.js';\n case '.mjs':\n case '.mts':\n return '.mjs';\n case '.cjs':\n case '.cts':\n return '.cjs';\n }\n }\n return '.js';\n }\n\n type GetOutputFunction = (code: string, fileName: string) => SourceOutput;\n /**\n * Get output from TS compiler w/typechecking. `undefined` in `transpileOnly`\n * mode.\n */\n let getOutput: GetOutputFunction | undefined;\n let getTypeInfo: (\n _code: string,\n _fileName: string,\n _position: number\n ) => TypeInfo;\n\n const getCanonicalFileName = (\n ts as unknown as TSInternal\n ).createGetCanonicalFileName(ts.sys.useCaseSensitiveFileNames);\n\n const moduleTypeClassifier = createModuleTypeClassifier({\n basePath: options.optionBasePaths?.moduleTypes,\n patterns: options.moduleTypes,\n });\n\n const extensions = getExtensions(config, options, ts.version);\n\n // Use full language services when the fast option is disabled.\n if (!transpileOnly) {\n const fileContents = new Map();\n const rootFileNames = new Set(config.fileNames);\n const cachedReadFile = cachedLookup(debugFn('readFile', readFile));\n\n // Use language services by default\n if (!options.compilerHost) {\n let projectVersion = 1;\n const fileVersions = new Map(\n Array.from(rootFileNames).map((fileName) => [fileName, 0])\n );\n\n const getCustomTransformers = () => {\n if (typeof transformers === 'function') {\n const program = service.getProgram();\n return program ? transformers(program) : undefined;\n }\n\n return transformers;\n };\n\n // Create the compiler host for type checking.\n const serviceHost: _ts.LanguageServiceHost &\n Required> = {\n getProjectVersion: () => String(projectVersion),\n getScriptFileNames: () => Array.from(rootFileNames),\n getScriptVersion: (fileName: string) => {\n const version = fileVersions.get(fileName);\n return version ? version.toString() : '';\n },\n getScriptSnapshot(fileName: string) {\n // TODO ordering of this with getScriptVersion? Should they sync up?\n let contents = fileContents.get(fileName);\n\n // Read contents into TypeScript memory cache.\n if (contents === undefined) {\n contents = cachedReadFile(fileName);\n if (contents === undefined) return;\n\n fileVersions.set(fileName, 1);\n fileContents.set(fileName, contents);\n projectVersion++;\n }\n\n return ts.ScriptSnapshot.fromString(contents);\n },\n readFile: cachedReadFile,\n readDirectory: ts.sys.readDirectory,\n getDirectories: cachedLookup(\n debugFn('getDirectories', ts.sys.getDirectories)\n ),\n fileExists: cachedLookup(debugFn('fileExists', fileExists)),\n directoryExists: cachedLookup(\n debugFn('directoryExists', ts.sys.directoryExists)\n ),\n realpath: ts.sys.realpath\n ? cachedLookup(debugFn('realpath', ts.sys.realpath))\n : undefined,\n getNewLine: () => ts.sys.newLine,\n useCaseSensitiveFileNames: () => ts.sys.useCaseSensitiveFileNames,\n getCurrentDirectory: () => cwd,\n getCompilationSettings: () => config.options,\n getDefaultLibFileName: () => ts.getDefaultLibFilePath(config.options),\n getCustomTransformers: getCustomTransformers,\n trace: options.tsTrace,\n };\n const {\n resolveModuleNames,\n getResolvedModuleWithFailedLookupLocationsFromCache,\n resolveTypeReferenceDirectives,\n isFileKnownToBeInternal,\n markBucketOfFilenameInternal,\n } = createResolverFunctions({\n host: serviceHost,\n getCanonicalFileName,\n ts,\n cwd,\n config,\n projectLocalResolveHelper,\n options,\n extensions,\n });\n serviceHost.resolveModuleNames = resolveModuleNames;\n serviceHost.getResolvedModuleWithFailedLookupLocationsFromCache =\n getResolvedModuleWithFailedLookupLocationsFromCache;\n serviceHost.resolveTypeReferenceDirectives =\n resolveTypeReferenceDirectives;\n\n const registry = ts.createDocumentRegistry(\n ts.sys.useCaseSensitiveFileNames,\n cwd\n );\n const service = ts.createLanguageService(serviceHost, registry);\n\n const updateMemoryCache = (contents: string, fileName: string) => {\n // Add to `rootFiles` as necessary, either to make TS include a file it has not seen,\n // or to trigger a re-classification of files from external to internal.\n if (\n !rootFileNames.has(fileName) &&\n !isFileKnownToBeInternal(fileName)\n ) {\n markBucketOfFilenameInternal(fileName);\n rootFileNames.add(fileName);\n // Increment project version for every change to rootFileNames.\n projectVersion++;\n }\n\n const previousVersion = fileVersions.get(fileName) || 0;\n const previousContents = fileContents.get(fileName);\n // Avoid incrementing cache when nothing has changed.\n if (contents !== previousContents) {\n fileVersions.set(fileName, previousVersion + 1);\n fileContents.set(fileName, contents);\n // Increment project version for every file change.\n projectVersion++;\n }\n };\n\n let previousProgram: _ts.Program | undefined = undefined;\n\n getOutput = (code: string, fileName: string) => {\n updateMemoryCache(code, fileName);\n\n const programBefore = service.getProgram();\n if (programBefore !== previousProgram) {\n debug(\n `compiler rebuilt Program instance when getting output for ${fileName}`\n );\n }\n\n const output = service.getEmitOutput(fileName);\n\n // Get the relevant diagnostics - this is 3x faster than `getPreEmitDiagnostics`.\n const diagnostics = service\n .getSemanticDiagnostics(fileName)\n .concat(service.getSyntacticDiagnostics(fileName));\n\n const programAfter = service.getProgram();\n\n debug(\n 'invariant: Is service.getProject() identical before and after getting emit output and diagnostics? (should always be true) ',\n programBefore === programAfter\n );\n\n previousProgram = programAfter;\n\n const diagnosticList = filterDiagnostics(\n diagnostics,\n diagnosticFilters\n );\n if (diagnosticList.length) reportTSError(diagnosticList);\n\n if (output.emitSkipped) {\n return [undefined, undefined, true];\n }\n\n // Throw an error when requiring `.d.ts` files.\n if (output.outputFiles.length === 0) {\n throw new TypeError(\n `Unable to require file: ${relative(cwd, fileName)}\\n` +\n 'This is usually the result of a faulty configuration or import. ' +\n 'Make sure there is a `.js`, `.json` or other executable extension with ' +\n 'loader attached before `ts-node` available.'\n );\n }\n\n return [output.outputFiles[1].text, output.outputFiles[0].text, false];\n };\n\n getTypeInfo = (code: string, fileName: string, position: number) => {\n const normalizedFileName = normalizeSlashes(fileName);\n updateMemoryCache(code, normalizedFileName);\n\n const info = service.getQuickInfoAtPosition(\n normalizedFileName,\n position\n );\n const name = ts.displayPartsToString(info ? info.displayParts : []);\n const comment = ts.displayPartsToString(info ? info.documentation : []);\n\n return { name, comment };\n };\n } else {\n const sys: _ts.System & _ts.FormatDiagnosticsHost = {\n ...ts.sys,\n ...diagnosticHost,\n readFile: (fileName: string) => {\n const cacheContents = fileContents.get(fileName);\n if (cacheContents !== undefined) return cacheContents;\n const contents = cachedReadFile(fileName);\n if (contents) fileContents.set(fileName, contents);\n return contents;\n },\n readDirectory: ts.sys.readDirectory,\n getDirectories: cachedLookup(\n debugFn('getDirectories', ts.sys.getDirectories)\n ),\n fileExists: cachedLookup(debugFn('fileExists', fileExists)),\n directoryExists: cachedLookup(\n debugFn('directoryExists', ts.sys.directoryExists)\n ),\n resolvePath: cachedLookup(debugFn('resolvePath', ts.sys.resolvePath)),\n realpath: ts.sys.realpath\n ? cachedLookup(debugFn('realpath', ts.sys.realpath))\n : undefined,\n };\n\n const host: _ts.CompilerHost = ts.createIncrementalCompilerHost\n ? ts.createIncrementalCompilerHost(config.options, sys)\n : {\n ...sys,\n getSourceFile: (fileName, languageVersion) => {\n const contents = sys.readFile(fileName);\n if (contents === undefined) return;\n return ts.createSourceFile(fileName, contents, languageVersion);\n },\n getDefaultLibLocation: () => normalizeSlashes(dirname(compiler)),\n getDefaultLibFileName: () =>\n normalizeSlashes(\n join(\n dirname(compiler),\n ts.getDefaultLibFileName(config.options)\n )\n ),\n useCaseSensitiveFileNames: () => sys.useCaseSensitiveFileNames,\n };\n host.trace = options.tsTrace;\n const {\n resolveModuleNames,\n resolveTypeReferenceDirectives,\n isFileKnownToBeInternal,\n markBucketOfFilenameInternal,\n } = createResolverFunctions({\n host,\n cwd,\n config,\n ts,\n getCanonicalFileName,\n projectLocalResolveHelper,\n options,\n extensions,\n });\n host.resolveModuleNames = resolveModuleNames;\n host.resolveTypeReferenceDirectives = resolveTypeReferenceDirectives;\n\n // Fallback for older TypeScript releases without incremental API.\n let builderProgram = ts.createIncrementalProgram\n ? ts.createIncrementalProgram({\n rootNames: Array.from(rootFileNames),\n options: config.options,\n host,\n configFileParsingDiagnostics: config.errors,\n projectReferences: config.projectReferences,\n })\n : ts.createEmitAndSemanticDiagnosticsBuilderProgram(\n Array.from(rootFileNames),\n config.options,\n host,\n undefined,\n config.errors,\n config.projectReferences\n );\n\n // Read and cache custom transformers.\n const customTransformers =\n typeof transformers === 'function'\n ? transformers(builderProgram.getProgram())\n : transformers;\n\n // Set the file contents into cache manually.\n const updateMemoryCache = (contents: string, fileName: string) => {\n const previousContents = fileContents.get(fileName);\n const contentsChanged = previousContents !== contents;\n if (contentsChanged) {\n fileContents.set(fileName, contents);\n }\n\n // Add to `rootFiles` when discovered by compiler for the first time.\n let addedToRootFileNames = false;\n if (\n !rootFileNames.has(fileName) &&\n !isFileKnownToBeInternal(fileName)\n ) {\n markBucketOfFilenameInternal(fileName);\n rootFileNames.add(fileName);\n addedToRootFileNames = true;\n }\n\n // Update program when file changes.\n if (addedToRootFileNames || contentsChanged) {\n builderProgram = ts.createEmitAndSemanticDiagnosticsBuilderProgram(\n Array.from(rootFileNames),\n config.options,\n host,\n builderProgram,\n config.errors,\n config.projectReferences\n );\n }\n };\n\n getOutput = (code: string, fileName: string) => {\n let outText = '';\n let outMap = '';\n\n updateMemoryCache(code, fileName);\n\n const sourceFile = builderProgram.getSourceFile(fileName);\n if (!sourceFile)\n throw new TypeError(`Unable to read file: ${fileName}`);\n\n const program = builderProgram.getProgram();\n const diagnostics = ts.getPreEmitDiagnostics(program, sourceFile);\n const diagnosticList = filterDiagnostics(\n diagnostics,\n diagnosticFilters\n );\n if (diagnosticList.length) reportTSError(diagnosticList);\n\n const result = builderProgram.emit(\n sourceFile,\n (path, file, writeByteOrderMark) => {\n if (path.endsWith('.map')) {\n outMap = file;\n } else {\n outText = file;\n }\n\n if (options.emit) sys.writeFile(path, file, writeByteOrderMark);\n },\n undefined,\n undefined,\n customTransformers\n );\n\n if (result.emitSkipped) {\n return [undefined, undefined, true];\n }\n\n // Throw an error when requiring files that cannot be compiled.\n if (outText === '') {\n if (program.isSourceFileFromExternalLibrary(sourceFile)) {\n throw new TypeError(\n `Unable to compile file from external library: ${relative(\n cwd,\n fileName\n )}`\n );\n }\n\n throw new TypeError(\n `Unable to require file: ${relative(cwd, fileName)}\\n` +\n 'This is usually the result of a faulty configuration or import. ' +\n 'Make sure there is a `.js`, `.json` or other executable extension with ' +\n 'loader attached before `ts-node` available.'\n );\n }\n\n return [outText, outMap, false];\n };\n\n getTypeInfo = (code: string, fileName: string, position: number) => {\n const normalizedFileName = normalizeSlashes(fileName);\n updateMemoryCache(code, normalizedFileName);\n\n const sourceFile = builderProgram.getSourceFile(normalizedFileName);\n if (!sourceFile)\n throw new TypeError(`Unable to read file: ${fileName}`);\n\n const node = getTokenAtPosition(ts, sourceFile, position);\n const checker = builderProgram.getProgram().getTypeChecker();\n const symbol = checker.getSymbolAtLocation(node);\n\n if (!symbol) return { name: '', comment: '' };\n\n const type = checker.getTypeOfSymbolAtLocation(symbol, node);\n const signatures = [\n ...type.getConstructSignatures(),\n ...type.getCallSignatures(),\n ];\n\n return {\n name: signatures.length\n ? signatures.map((x) => checker.signatureToString(x)).join('\\n')\n : checker.typeToString(type),\n comment: ts.displayPartsToString(\n symbol ? symbol.getDocumentationComment(checker) : []\n ),\n };\n };\n\n // Write `.tsbuildinfo` when `--build` is enabled.\n if (options.emit && config.options.incremental) {\n process.on('exit', () => {\n // Emits `.tsbuildinfo` to filesystem.\n (builderProgram.getProgram() as any).emitBuildInfo();\n });\n }\n }\n } else {\n getTypeInfo = () => {\n throw new TypeError(\n 'Type information is unavailable in \"--transpile-only\"'\n );\n };\n }\n\n function createTranspileOnlyGetOutputFunction(\n overrideModuleType?: _ts.ModuleKind,\n nodeModuleEmitKind?: NodeModuleEmitKind\n ): GetOutputFunction {\n const compilerOptions = { ...config.options };\n if (overrideModuleType !== undefined)\n compilerOptions.module = overrideModuleType;\n let customTranspiler = createTranspiler?.(\n compilerOptions,\n nodeModuleEmitKind\n );\n let tsTranspileModule = versionGteLt(ts.version, '4.7.0')\n ? createTsTranspileModule(ts, {\n compilerOptions,\n reportDiagnostics: true,\n transformers: transformers as _ts.CustomTransformers | undefined,\n })\n : undefined;\n return (code: string, fileName: string): SourceOutput => {\n let result: _ts.TranspileOutput;\n if (customTranspiler) {\n result = customTranspiler.transpile(code, {\n fileName,\n });\n } else if (tsTranspileModule) {\n result = tsTranspileModule(\n code,\n {\n fileName,\n },\n nodeModuleEmitKind === 'nodeesm' ? 'module' : 'commonjs'\n );\n } else {\n result = ts.transpileModule(code, {\n fileName,\n compilerOptions,\n reportDiagnostics: true,\n transformers: transformers as _ts.CustomTransformers | undefined,\n });\n }\n\n const diagnosticList = filterDiagnostics(\n result.diagnostics || [],\n diagnosticFilters\n );\n if (diagnosticList.length) reportTSError(diagnosticList);\n\n return [result.outputText, result.sourceMapText as string, false];\n };\n }\n\n // When true, these mean that a `moduleType` override will cause a different emit\n // than the TypeScript compiler, so we *must* overwrite the emit.\n const shouldOverwriteEmitWhenForcingCommonJS =\n config.options.module !== ts.ModuleKind.CommonJS;\n // [MUST_UPDATE_FOR_NEW_MODULEKIND]\n const shouldOverwriteEmitWhenForcingEsm = !(\n config.options.module === ts.ModuleKind.ES2015 ||\n (ts.ModuleKind.ES2020 && config.options.module === ts.ModuleKind.ES2020) ||\n (ts.ModuleKind.ES2022 && config.options.module === ts.ModuleKind.ES2022) ||\n config.options.module === ts.ModuleKind.ESNext\n );\n /**\n * node16 or nodenext\n * [MUST_UPDATE_FOR_NEW_MODULEKIND]\n */\n const isNodeModuleType =\n (ts.ModuleKind.Node16 && config.options.module === ts.ModuleKind.Node16) ||\n (ts.ModuleKind.NodeNext &&\n config.options.module === ts.ModuleKind.NodeNext);\n const getOutputForceCommonJS = createTranspileOnlyGetOutputFunction(\n ts.ModuleKind.CommonJS\n );\n const getOutputForceNodeCommonJS = createTranspileOnlyGetOutputFunction(\n ts.ModuleKind.NodeNext,\n 'nodecjs'\n );\n const getOutputForceNodeESM = createTranspileOnlyGetOutputFunction(\n ts.ModuleKind.NodeNext,\n 'nodeesm'\n );\n // [MUST_UPDATE_FOR_NEW_MODULEKIND]\n const getOutputForceESM = createTranspileOnlyGetOutputFunction(\n ts.ModuleKind.ES2022 || ts.ModuleKind.ES2020 || ts.ModuleKind.ES2015\n );\n const getOutputTranspileOnly = createTranspileOnlyGetOutputFunction();\n\n // Create a simple TypeScript compiler proxy.\n function compile(code: string, fileName: string, lineOffset = 0) {\n const normalizedFileName = normalizeSlashes(fileName);\n const classification =\n moduleTypeClassifier.classifyModuleByModuleTypeOverrides(\n normalizedFileName\n );\n let value: string | undefined = '';\n let sourceMap: string | undefined = '';\n let emitSkipped = true;\n if (getOutput) {\n // Must always call normal getOutput to throw typechecking errors\n [value, sourceMap, emitSkipped] = getOutput(code, normalizedFileName);\n }\n // If module classification contradicts the above, call the relevant transpiler\n if (\n classification.moduleType === 'cjs' &&\n (shouldOverwriteEmitWhenForcingCommonJS || emitSkipped)\n ) {\n [value, sourceMap] = getOutputForceCommonJS(code, normalizedFileName);\n } else if (\n classification.moduleType === 'esm' &&\n (shouldOverwriteEmitWhenForcingEsm || emitSkipped)\n ) {\n [value, sourceMap] = getOutputForceESM(code, normalizedFileName);\n } else if (emitSkipped) {\n // Happens when ts compiler skips emit or in transpileOnly mode\n const classification = classifyModule(fileName, isNodeModuleType);\n [value, sourceMap] =\n classification === 'nodecjs'\n ? getOutputForceNodeCommonJS(code, normalizedFileName)\n : classification === 'nodeesm'\n ? getOutputForceNodeESM(code, normalizedFileName)\n : classification === 'cjs'\n ? getOutputForceCommonJS(code, normalizedFileName)\n : classification === 'esm'\n ? getOutputForceESM(code, normalizedFileName)\n : getOutputTranspileOnly(code, normalizedFileName);\n }\n const output = updateOutput(\n value!,\n normalizedFileName,\n sourceMap!,\n getEmitExtension\n );\n outputCache.set(normalizedFileName, { content: output });\n return output;\n }\n\n let active = true;\n const enabled = (enabled?: boolean) =>\n enabled === undefined ? active : (active = !!enabled);\n const ignored = (fileName: string) => {\n if (!active) return true;\n const ext = extname(fileName);\n if (extensions.compiled.includes(ext)) {\n return !isScoped(fileName) || shouldIgnore(fileName);\n }\n return true;\n };\n\n function addDiagnosticFilter(filter: DiagnosticFilter) {\n diagnosticFilters.push({\n ...filter,\n filenamesAbsolute: filter.filenamesAbsolute.map((f) =>\n normalizeSlashes(f)\n ),\n });\n }\n\n const getNodeEsmResolver = once(() =>\n (\n require('../dist-raw/node-internal-modules-esm-resolve') as typeof _nodeInternalModulesEsmResolve\n ).createResolve({\n extensions,\n preferTsExts: options.preferTsExts,\n tsNodeExperimentalSpecifierResolution:\n options.experimentalSpecifierResolution,\n })\n );\n const getNodeEsmGetFormat = once(() =>\n (\n require('../dist-raw/node-internal-modules-esm-get_format') as typeof _nodeInternalModulesEsmGetFormat\n ).createGetFormat(\n options.experimentalSpecifierResolution,\n getNodeEsmResolver()\n )\n );\n const getNodeCjsLoader = once(() =>\n (\n require('../dist-raw/node-internal-modules-cjs-loader') as typeof _nodeInternalModulesCjsLoader\n ).createCjsLoader({\n extensions,\n preferTsExts: options.preferTsExts,\n nodeEsmResolver: getNodeEsmResolver(),\n })\n );\n\n return {\n [TS_NODE_SERVICE_BRAND]: true,\n ts,\n compilerPath: compiler,\n config,\n compile,\n getTypeInfo,\n ignored,\n enabled,\n options,\n configFilePath,\n moduleTypeClassifier,\n shouldReplAwait,\n addDiagnosticFilter,\n installSourceMapSupport,\n enableExperimentalEsmLoaderInterop,\n transpileOnly,\n projectLocalResolveHelper,\n getNodeEsmResolver,\n getNodeEsmGetFormat,\n getNodeCjsLoader,\n extensions,\n };\n}\n\n/**\n * Check if the filename should be ignored.\n */\nfunction createIgnore(ignoreBaseDir: string, ignore: RegExp[]) {\n return (fileName: string) => {\n const relname = relative(ignoreBaseDir, fileName);\n const path = normalizeSlashes(relname);\n\n return ignore.some((x) => x.test(path));\n };\n}\n\n/**\n * Register the extensions to support when importing files.\n */\nfunction registerExtensions(\n preferTsExts: boolean | null | undefined,\n extensions: string[],\n service: Service,\n originalJsHandler: (m: NodeModule, filename: string) => any\n) {\n const exts = new Set(extensions);\n // Can't add these extensions cuz would allow omitting file extension; node requires ext for .cjs and .mjs\n // Unless they're already registered by something else (nyc does this):\n // then we *must* hook them or else our transformer will not be called.\n for (const cannotAdd of ['.mts', '.cts', '.mjs', '.cjs']) {\n if (exts.has(cannotAdd) && !hasOwnProperty(require.extensions, cannotAdd)) {\n // Unrecognized file exts can be transformed via the `.js` handler.\n exts.add('.js');\n exts.delete(cannotAdd);\n }\n }\n\n // Register new extensions.\n for (const ext of exts) {\n registerExtension(ext, service, originalJsHandler);\n }\n\n if (preferTsExts) {\n const preferredExtensions = new Set([\n ...exts,\n ...Object.keys(require.extensions),\n ]);\n\n // Re-sort iteration order of Object.keys()\n for (const ext of preferredExtensions) {\n const old = Object.getOwnPropertyDescriptor(require.extensions, ext);\n delete require.extensions[ext];\n Object.defineProperty(require.extensions, ext, old!);\n }\n }\n}\n\n/**\n * Register the extension for node.\n */\nfunction registerExtension(\n ext: string,\n service: Service,\n originalHandler: (m: NodeModule, filename: string) => any\n) {\n const old = require.extensions[ext] || originalHandler;\n\n require.extensions[ext] = function (m: any, filename) {\n if (service.ignored(filename)) return old(m, filename);\n\n assertScriptCanLoadAsCJS(service, m, filename);\n\n const _compile = m._compile;\n\n m._compile = function (code: string, fileName: string) {\n debug('module._compile', fileName);\n\n const result = service.compile(code, fileName);\n return _compile.call(this, result, fileName);\n };\n\n return old(m, filename);\n };\n}\n\n/**\n * Internal source output.\n */\ntype SourceOutput = [string, string, false] | [undefined, undefined, true];\n\n/**\n * Update the output remapping the source map.\n */\nfunction updateOutput(\n outputText: string,\n fileName: string,\n sourceMap: string,\n getEmitExtension: (fileName: string) => string\n) {\n const base64Map = Buffer.from(\n updateSourceMap(sourceMap, fileName),\n 'utf8'\n ).toString('base64');\n const sourceMapContent = `//# sourceMappingURL=data:application/json;charset=utf-8;base64,${base64Map}`;\n // Expected form: `//# sourceMappingURL=foo bar.js.map` or `//# sourceMappingURL=foo%20bar.js.map` for input file \"foo bar.tsx\"\n // Percent-encoding behavior added in TS 4.1.1: https://github.com/microsoft/TypeScript/issues/40951\n const prefix = '//# sourceMappingURL=';\n const prefixLength = prefix.length;\n const baseName = /*foo.tsx*/ basename(fileName);\n const extName = /*.tsx*/ extname(fileName);\n const extension = /*.js*/ getEmitExtension(fileName);\n const sourcemapFilename =\n baseName.slice(0, -extName.length) + extension + '.map';\n const sourceMapLengthWithoutPercentEncoding =\n prefixLength + sourcemapFilename.length;\n /*\n * Only rewrite if existing directive exists at the location we expect, to support:\n * a) compilers that do not append a sourcemap directive\n * b) situations where we did the math wrong\n * Not ideal, but appending our sourcemap *after* a pre-existing sourcemap still overrides, so the end-user is happy.\n */\n if (\n outputText.substr(-sourceMapLengthWithoutPercentEncoding, prefixLength) ===\n prefix\n ) {\n return (\n outputText.slice(0, -sourceMapLengthWithoutPercentEncoding) +\n sourceMapContent\n );\n }\n // If anyone asks why we're not using URL, the URL equivalent is: `u = new URL('http://d'); u.pathname = \"/\" + sourcemapFilename; return u.pathname.slice(1);\n const sourceMapLengthWithPercentEncoding =\n prefixLength + encodeURI(sourcemapFilename).length;\n if (\n outputText.substr(-sourceMapLengthWithPercentEncoding, prefixLength) ===\n prefix\n ) {\n return (\n outputText.slice(0, -sourceMapLengthWithPercentEncoding) +\n sourceMapContent\n );\n }\n\n return `${outputText}\\n${sourceMapContent}`;\n}\n\n/**\n * Update the source map contents for improved output.\n */\nfunction updateSourceMap(sourceMapText: string, fileName: string) {\n const sourceMap = JSON.parse(sourceMapText);\n sourceMap.file = fileName;\n sourceMap.sources = [fileName];\n delete sourceMap.sourceRoot;\n return JSON.stringify(sourceMap);\n}\n\n/**\n * Filter diagnostics.\n */\nfunction filterDiagnostics(\n diagnostics: readonly _ts.Diagnostic[],\n filters: DiagnosticFilter[]\n) {\n return diagnostics.filter((d) =>\n filters.every(\n (f) =>\n (!f.appliesToAllFiles &&\n f.filenamesAbsolute.indexOf(d.file?.fileName!) === -1) ||\n f.diagnosticsIgnored.indexOf(d.code) === -1\n )\n );\n}\n\n/**\n * Get token at file position.\n *\n * Reference: https://github.com/microsoft/TypeScript/blob/fcd9334f57d85b73dd66ad2d21c02e84822f4841/src/services/utilities.ts#L705-L731\n */\nfunction getTokenAtPosition(\n ts: TSCommon,\n sourceFile: _ts.SourceFile,\n position: number\n): _ts.Node {\n let current: _ts.Node = sourceFile;\n\n outer: while (true) {\n for (const child of current.getChildren(sourceFile)) {\n const start = child.getFullStart();\n if (start > position) break;\n\n const end = child.getEnd();\n if (position <= end) {\n current = child;\n continue outer;\n }\n }\n\n return current;\n }\n}\n\n/**\n * Create an implementation of node's ESM loader hooks.\n *\n * This may be useful if you\n * want to wrap or compose the loader hooks to add additional functionality or\n * combine with another loader.\n *\n * Node changed the hooks API, so there are two possible APIs. This function\n * detects your node version and returns the appropriate API.\n *\n * @category ESM Loader\n */\nexport const createEsmHooks: typeof createEsmHooksFn = (\n tsNodeService: Service\n) => (require('./esm') as typeof import('./esm')).createEsmHooks(tsNodeService);\n\n/**\n * When using `module: nodenext` or `module: node12`, there are two possible styles of emit depending in file extension or package.json \"type\":\n *\n * - CommonJS with dynamic imports preserved (not transformed into `require()` calls)\n * - ECMAScript modules with `import foo = require()` transformed into `require = createRequire(); const foo = require()`\n */\nexport type NodeModuleEmitKind = 'nodeesm' | 'nodecjs';\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/module-type-classifier.d.ts b/node_modules/ts-node/dist/module-type-classifier.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/ts-node/dist/module-type-classifier.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/ts-node/dist/module-type-classifier.js b/node_modules/ts-node/dist/module-type-classifier.js new file mode 100644 index 0000000..4d2aabb --- /dev/null +++ b/node_modules/ts-node/dist/module-type-classifier.js @@ -0,0 +1,64 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createModuleTypeClassifier = void 0; +const ts_internals_1 = require("./ts-internals"); +const util_1 = require("./util"); +/** + * @internal + * May receive non-normalized options -- basePath and patterns -- and will normalize them + * internally. + * However, calls to `classifyModule` must pass pre-normalized paths! + */ +function createModuleTypeClassifier(options) { + const { patterns, basePath: _basePath } = options; + const basePath = _basePath !== undefined + ? (0, util_1.normalizeSlashes)(_basePath).replace(/\/$/, '') + : undefined; + const patternTypePairs = Object.entries(patterns !== null && patterns !== void 0 ? patterns : []).map(([_pattern, type]) => { + const pattern = (0, util_1.normalizeSlashes)(_pattern); + return { pattern: parsePattern(basePath, pattern), type }; + }); + const classifications = { + package: { + moduleType: 'auto', + }, + cjs: { + moduleType: 'cjs', + }, + esm: { + moduleType: 'esm', + }, + }; + const auto = classifications.package; + // Passed path must be normalized! + function classifyModuleNonCached(path) { + const matched = matchPatterns(patternTypePairs, (_) => _.pattern, path); + if (matched) + return classifications[matched.type]; + return auto; + } + const classifyModule = (0, util_1.cachedLookup)(classifyModuleNonCached); + function classifyModuleAuto(path) { + return auto; + } + return { + classifyModuleByModuleTypeOverrides: patternTypePairs.length + ? classifyModule + : classifyModuleAuto, + }; +} +exports.createModuleTypeClassifier = createModuleTypeClassifier; +function parsePattern(basePath, patternString) { + const pattern = (0, ts_internals_1.getPatternFromSpec)(patternString, basePath); + return pattern !== undefined ? new RegExp(pattern) : /(?:)/; +} +function matchPatterns(objects, getPattern, candidate) { + for (let i = objects.length - 1; i >= 0; i--) { + const object = objects[i]; + const pattern = getPattern(object); + if (pattern === null || pattern === void 0 ? void 0 : pattern.test(candidate)) { + return object; + } + } +} +//# sourceMappingURL=module-type-classifier.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/module-type-classifier.js.map b/node_modules/ts-node/dist/module-type-classifier.js.map new file mode 100644 index 0000000..731dfad --- /dev/null +++ b/node_modules/ts-node/dist/module-type-classifier.js.map @@ -0,0 +1 @@ +{"version":3,"file":"module-type-classifier.js","sourceRoot":"","sources":["../src/module-type-classifier.ts"],"names":[],"mappings":";;;AACA,iDAAoD;AACpD,iCAAwD;AAwBxD;;;;;GAKG;AACH,SAAgB,0BAA0B,CACxC,OAAoC;IAEpC,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,OAAO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B,CAAC,CAAC,kBAAkB;KACvB,CAAC;AACJ,CAAC;AAhDD,gEAgDC;AAED,SAAS,YAAY,CAAC,QAAgB,EAAE,aAAqB;IAC3D,MAAM,OAAO,GAAG,IAAA,iCAAkB,EAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;IAC5D,OAAO,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AAC9D,CAAC;AAED,SAAS,aAAa,CACpB,OAAY,EACZ,UAA4B,EAC5B,SAAiB;IAEjB,KAAK,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;QAC5C,MAAM,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;QAC1B,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;QAEnC,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,CAAC,SAAS,CAAC,EAAE;YAC5B,OAAO,MAAM,CAAC;SACf;KACF;AACH,CAAC","sourcesContent":["import type { ModuleTypeOverride, ModuleTypes } from '.';\nimport { getPatternFromSpec } from './ts-internals';\nimport { cachedLookup, normalizeSlashes } from './util';\n\n// Logic to support our `moduleTypes` option, which allows overriding node's default ESM / CJS\n// classification of `.js` files based on package.json `type` field.\n\n/**\n * Seperate internal type because `auto` is clearer than `package`, but changing\n * the public API is a breaking change.\n * @internal\n */\nexport type InternalModuleTypeOverride = 'cjs' | 'esm' | 'auto';\n/** @internal */\nexport interface ModuleTypeClassification {\n moduleType: InternalModuleTypeOverride;\n}\n/** @internal */\nexport interface ModuleTypeClassifierOptions {\n basePath?: string;\n patterns?: ModuleTypes;\n}\n/** @internal */\nexport type ModuleTypeClassifier = ReturnType<\n typeof createModuleTypeClassifier\n>;\n/**\n * @internal\n * May receive non-normalized options -- basePath and patterns -- and will normalize them\n * internally.\n * However, calls to `classifyModule` must pass pre-normalized paths!\n */\nexport function createModuleTypeClassifier(\n options: ModuleTypeClassifierOptions\n) {\n const { patterns, basePath: _basePath } = options;\n const basePath =\n _basePath !== undefined\n ? normalizeSlashes(_basePath).replace(/\\/$/, '')\n : undefined;\n\n const patternTypePairs = Object.entries(patterns ?? []).map(\n ([_pattern, type]) => {\n const pattern = normalizeSlashes(_pattern);\n return { pattern: parsePattern(basePath!, pattern), type };\n }\n );\n\n const classifications: Record =\n {\n package: {\n moduleType: 'auto',\n },\n cjs: {\n moduleType: 'cjs',\n },\n esm: {\n moduleType: 'esm',\n },\n };\n const auto = classifications.package;\n\n // Passed path must be normalized!\n function classifyModuleNonCached(path: string): ModuleTypeClassification {\n const matched = matchPatterns(patternTypePairs, (_) => _.pattern, path);\n if (matched) return classifications[matched.type];\n return auto;\n }\n\n const classifyModule = cachedLookup(classifyModuleNonCached);\n\n function classifyModuleAuto(path: String) {\n return auto;\n }\n\n return {\n classifyModuleByModuleTypeOverrides: patternTypePairs.length\n ? classifyModule\n : classifyModuleAuto,\n };\n}\n\nfunction parsePattern(basePath: string, patternString: string): RegExp {\n const pattern = getPatternFromSpec(patternString, basePath);\n return pattern !== undefined ? new RegExp(pattern) : /(?:)/;\n}\n\nfunction matchPatterns(\n objects: T[],\n getPattern: (t: T) => RegExp,\n candidate: string\n): T | undefined {\n for (let i = objects.length - 1; i >= 0; i--) {\n const object = objects[i];\n const pattern = getPattern(object);\n\n if (pattern?.test(candidate)) {\n return object;\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/node-module-type-classifier.d.ts b/node_modules/ts-node/dist/node-module-type-classifier.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/ts-node/dist/node-module-type-classifier.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/ts-node/dist/node-module-type-classifier.js b/node_modules/ts-node/dist/node-module-type-classifier.js new file mode 100644 index 0000000..664cd9f --- /dev/null +++ b/node_modules/ts-node/dist/node-module-type-classifier.js @@ -0,0 +1,39 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.classifyModule = void 0; +const node_internal_modules_cjs_loader_1 = require("../dist-raw/node-internal-modules-cjs-loader"); +/** + * Determine how to emit a module based on tsconfig "module" and package.json "type" + * + * Supports module=nodenext/node16 with transpileOnly, where we cannot ask the + * TS typechecker to tell us if a file is CJS or ESM. + * + * Return values indicate: + * - cjs + * - esm + * - nodecjs == node-flavored cjs where dynamic imports are *not* transformed into `require()` + * - undefined == emit according to tsconfig `module` config, whatever that is + * @internal + */ +function classifyModule(nativeFilename, isNodeModuleType) { + // [MUST_UPDATE_FOR_NEW_FILE_EXTENSIONS] + const lastDotIndex = nativeFilename.lastIndexOf('.'); + const ext = lastDotIndex >= 0 ? nativeFilename.slice(lastDotIndex) : ''; + switch (ext) { + case '.cjs': + case '.cts': + return isNodeModuleType ? 'nodecjs' : 'cjs'; + case '.mjs': + case '.mts': + return isNodeModuleType ? 'nodeesm' : 'esm'; + } + if (isNodeModuleType) { + const packageScope = (0, node_internal_modules_cjs_loader_1.readPackageScope)(nativeFilename); + if (packageScope && packageScope.data.type === 'module') + return 'nodeesm'; + return 'nodecjs'; + } + return undefined; +} +exports.classifyModule = classifyModule; +//# sourceMappingURL=node-module-type-classifier.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/node-module-type-classifier.js.map b/node_modules/ts-node/dist/node-module-type-classifier.js.map new file mode 100644 index 0000000..b2f4bad --- /dev/null +++ b/node_modules/ts-node/dist/node-module-type-classifier.js.map @@ -0,0 +1 @@ +{"version":3,"file":"node-module-type-classifier.js","sourceRoot":"","sources":["../src/node-module-type-classifier.ts"],"names":[],"mappings":";;;AAAA,mGAAgF;AAEhF;;;;;;;;;;;;GAYG;AACH,SAAgB,cAAc,CAC5B,cAAsB,EACtB,gBAAyB;IAEzB,wCAAwC;IACxC,MAAM,YAAY,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACrD,MAAM,GAAG,GAAG,YAAY,IAAI,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACxE,QAAQ,GAAG,EAAE;QACX,KAAK,MAAM,CAAC;QACZ,KAAK,MAAM;YACT,OAAO,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC;QAC9C,KAAK,MAAM,CAAC;QACZ,KAAK,MAAM;YACT,OAAO,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC;KAC/C;IACD,IAAI,gBAAgB,EAAE;QACpB,MAAM,YAAY,GAAG,IAAA,mDAAgB,EAAC,cAAc,CAAC,CAAC;QACtD,IAAI,YAAY,IAAI,YAAY,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ;YAAE,OAAO,SAAS,CAAC;QAC1E,OAAO,SAAS,CAAC;KAClB;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AArBD,wCAqBC","sourcesContent":["import { readPackageScope } from '../dist-raw/node-internal-modules-cjs-loader';\n\n/**\n * Determine how to emit a module based on tsconfig \"module\" and package.json \"type\"\n *\n * Supports module=nodenext/node16 with transpileOnly, where we cannot ask the\n * TS typechecker to tell us if a file is CJS or ESM.\n *\n * Return values indicate:\n * - cjs\n * - esm\n * - nodecjs == node-flavored cjs where dynamic imports are *not* transformed into `require()`\n * - undefined == emit according to tsconfig `module` config, whatever that is\n * @internal\n */\nexport function classifyModule(\n nativeFilename: string,\n isNodeModuleType: boolean\n): 'nodecjs' | 'cjs' | 'esm' | 'nodeesm' | undefined {\n // [MUST_UPDATE_FOR_NEW_FILE_EXTENSIONS]\n const lastDotIndex = nativeFilename.lastIndexOf('.');\n const ext = lastDotIndex >= 0 ? nativeFilename.slice(lastDotIndex) : '';\n switch (ext) {\n case '.cjs':\n case '.cts':\n return isNodeModuleType ? 'nodecjs' : 'cjs';\n case '.mjs':\n case '.mts':\n return isNodeModuleType ? 'nodeesm' : 'esm';\n }\n if (isNodeModuleType) {\n const packageScope = readPackageScope(nativeFilename);\n if (packageScope && packageScope.data.type === 'module') return 'nodeesm';\n return 'nodecjs';\n }\n return undefined;\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/repl.d.ts b/node_modules/ts-node/dist/repl.d.ts new file mode 100644 index 0000000..4cd68bb --- /dev/null +++ b/node_modules/ts-node/dist/repl.d.ts @@ -0,0 +1,78 @@ +/// +import { Service, CreateOptions } from './index'; +export interface ReplService { + readonly state: EvalState; + /** + * Bind this REPL to a ts-node compiler service. A compiler service must be bound before `eval`-ing code or starting the REPL + */ + setService(service: Service): void; + /** + * Append code to the virtual source file, compile it to JavaScript, throw semantic errors if the typechecker is enabled, + * and execute it. + * + * Note: typically, you will want to call `start()` instead of using this method. + * + * @param code string of TypeScript. + */ + evalCode(code: string): any; + /** + * `eval` implementation compatible with node's REPL API + * + * Can be used in advanced scenarios if you want to manually create your own + * node REPL instance and delegate eval to this `ReplService`. + * + * Example: + * + * import {start} from 'repl'; + * const replService: tsNode.ReplService = ...; // assuming you have already created a ts-node ReplService + * const nodeRepl = start({eval: replService.eval}); + */ + nodeEval(code: string, context: any, _filename: string, callback: (err: Error | null, result?: any) => any): void; + evalAwarePartialHost: EvalAwarePartialHost; + /** Start a node REPL */ + start(): void; + /** + * Start a node REPL, evaling a string of TypeScript before it starts. + * @deprecated + */ + start(code: string): void; +} +/** @category REPL */ +export interface CreateReplOptions { + service?: Service; + state?: EvalState; + stdin?: NodeJS.ReadableStream; + stdout?: NodeJS.WritableStream; + stderr?: NodeJS.WritableStream; +} +/** + * Create a ts-node REPL instance. + * + * Pay close attention to the example below. Today, the API requires a few lines + * of boilerplate to correctly bind the `ReplService` to the ts-node `Service` and + * vice-versa. + * + * Usage example: + * + * const repl = tsNode.createRepl(); + * const service = tsNode.create({...repl.evalAwarePartialHost}); + * repl.setService(service); + * repl.start(); + * + * @category REPL + */ +export declare function createRepl(options?: CreateReplOptions): ReplService; +/** + * Eval state management. Stores virtual `[eval].ts` file + */ +export declare class EvalState { + path: string; + __tsNodeEvalStateBrand: unknown; + constructor(path: string); +} +/** + * Filesystem host functions which are aware of the "virtual" `[eval].ts`, ``, or `[stdin].ts` file used to compile REPL inputs. + * Must be passed to `create()` to create a ts-node compiler service which can compile REPL inputs. + */ +export declare type EvalAwarePartialHost = Pick; +export declare function createEvalAwarePartialHost(state: EvalState, composeWith?: EvalAwarePartialHost): EvalAwarePartialHost; diff --git a/node_modules/ts-node/dist/repl.js b/node_modules/ts-node/dist/repl.js new file mode 100644 index 0000000..6955818 --- /dev/null +++ b/node_modules/ts-node/dist/repl.js @@ -0,0 +1,561 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.setupContext = exports.createEvalAwarePartialHost = exports.EvalState = exports.createRepl = exports.REPL_NAME = exports.REPL_FILENAME = exports.STDIN_NAME = exports.STDIN_FILENAME = exports.EVAL_NAME = exports.EVAL_FILENAME = void 0; +const os_1 = require("os"); +const path_1 = require("path"); +const repl_1 = require("repl"); +const vm_1 = require("vm"); +const index_1 = require("./index"); +const fs_1 = require("fs"); +const console_1 = require("console"); +const assert = require("assert"); +const module_1 = require("module"); +// Lazy-loaded. +let _processTopLevelAwait; +function getProcessTopLevelAwait() { + if (_processTopLevelAwait === undefined) { + ({ + processTopLevelAwait: _processTopLevelAwait, + } = require('../dist-raw/node-internal-repl-await')); + } + return _processTopLevelAwait; +} +let diff; +function getDiffLines() { + if (diff === undefined) { + diff = require('diff'); + } + return diff.diffLines; +} +/** @internal */ +exports.EVAL_FILENAME = `[eval].ts`; +/** @internal */ +exports.EVAL_NAME = `[eval]`; +/** @internal */ +exports.STDIN_FILENAME = `[stdin].ts`; +/** @internal */ +exports.STDIN_NAME = `[stdin]`; +/** @internal */ +exports.REPL_FILENAME = '.ts'; +/** @internal */ +exports.REPL_NAME = ''; +/** + * Create a ts-node REPL instance. + * + * Pay close attention to the example below. Today, the API requires a few lines + * of boilerplate to correctly bind the `ReplService` to the ts-node `Service` and + * vice-versa. + * + * Usage example: + * + * const repl = tsNode.createRepl(); + * const service = tsNode.create({...repl.evalAwarePartialHost}); + * repl.setService(service); + * repl.start(); + * + * @category REPL + */ +function createRepl(options = {}) { + var _a, _b, _c, _d, _e; + const { ignoreDiagnosticsThatAreAnnoyingInInteractiveRepl = true } = options; + let service = options.service; + let nodeReplServer; + // If `useGlobal` is not true, then REPL creates a context when started. + // This stores a reference to it or to `global`, whichever is used, after REPL has started. + let context; + const state = (_a = options.state) !== null && _a !== void 0 ? _a : new EvalState((0, path_1.join)(process.cwd(), exports.REPL_FILENAME)); + const evalAwarePartialHost = createEvalAwarePartialHost(state, options.composeWithEvalAwarePartialHost); + const stdin = (_b = options.stdin) !== null && _b !== void 0 ? _b : process.stdin; + const stdout = (_c = options.stdout) !== null && _c !== void 0 ? _c : process.stdout; + const stderr = (_d = options.stderr) !== null && _d !== void 0 ? _d : process.stderr; + const _console = stdout === process.stdout && stderr === process.stderr + ? console + : new console_1.Console(stdout, stderr); + const replService = { + state: (_e = options.state) !== null && _e !== void 0 ? _e : new EvalState((0, path_1.join)(process.cwd(), exports.EVAL_FILENAME)), + setService, + evalCode, + evalCodeInternal, + nodeEval, + evalAwarePartialHost, + start, + startInternal, + stdin, + stdout, + stderr, + console: _console, + }; + return replService; + function setService(_service) { + service = _service; + if (ignoreDiagnosticsThatAreAnnoyingInInteractiveRepl) { + service.addDiagnosticFilter({ + appliesToAllFiles: false, + filenamesAbsolute: [state.path], + diagnosticsIgnored: [ + 2393, + 6133, + 7027, + ...(service.shouldReplAwait ? topLevelAwaitDiagnosticCodes : []), + ], + }); + } + } + function evalCode(code) { + const result = appendCompileAndEvalInput({ + service: service, + state, + input: code, + context, + overrideIsCompletion: false, + }); + assert(result.containsTopLevelAwait === false); + return result.value; + } + function evalCodeInternal(options) { + const { code, enableTopLevelAwait, context } = options; + return appendCompileAndEvalInput({ + service: service, + state, + input: code, + enableTopLevelAwait, + context, + }); + } + function nodeEval(code, context, _filename, callback) { + // TODO: Figure out how to handle completion here. + if (code === '.scope') { + callback(null); + return; + } + try { + const evalResult = evalCodeInternal({ + code, + enableTopLevelAwait: true, + context, + }); + if (evalResult.containsTopLevelAwait) { + (async () => { + try { + callback(null, await evalResult.valuePromise); + } + catch (promiseError) { + handleError(promiseError); + } + })(); + } + else { + callback(null, evalResult.value); + } + } + catch (error) { + handleError(error); + } + // Log TSErrors, check if they're recoverable, log helpful hints for certain + // well-known errors, and invoke `callback()` + // TODO should evalCode API get the same error-handling benefits? + function handleError(error) { + var _a, _b; + // Don't show TLA hint if the user explicitly disabled repl top level await + const canLogTopLevelAwaitHint = service.options.experimentalReplAwait !== false && + !service.shouldReplAwait; + if (error instanceof index_1.TSError) { + // Support recoverable compilations using >= node 6. + if (repl_1.Recoverable && isRecoverable(error)) { + callback(new repl_1.Recoverable(error)); + return; + } + else { + _console.error(error); + if (canLogTopLevelAwaitHint && + error.diagnosticCodes.some((dC) => topLevelAwaitDiagnosticCodes.includes(dC))) { + _console.error(getTopLevelAwaitHint()); + } + callback(null); + } + } + else { + let _error = error; + if (canLogTopLevelAwaitHint && + _error instanceof SyntaxError && + ((_a = _error.message) === null || _a === void 0 ? void 0 : _a.includes('await is only valid'))) { + try { + // Only way I know to make our hint appear after the error + _error.message += `\n\n${getTopLevelAwaitHint()}`; + _error.stack = (_b = _error.stack) === null || _b === void 0 ? void 0 : _b.replace(/(SyntaxError:.*)/, (_, $1) => `${$1}\n\n${getTopLevelAwaitHint()}`); + } + catch { } + } + callback(_error); + } + } + function getTopLevelAwaitHint() { + return `Hint: REPL top-level await requires TypeScript version 3.8 or higher and target ES2018 or higher. You are using TypeScript ${service.ts.version} and target ${service.ts.ScriptTarget[service.config.options.target]}.`; + } + } + // Note: `code` argument is deprecated + function start(code) { + startInternal({ code }); + } + // Note: `code` argument is deprecated + function startInternal(options) { + const { code, forceToBeModule = true, ...optionsOverride } = options !== null && options !== void 0 ? options : {}; + // TODO assert that `service` is set; remove all `service!` non-null assertions + // Eval incoming code before the REPL starts. + // Note: deprecated + if (code) { + try { + evalCode(`${code}\n`); + } + catch (err) { + _console.error(err); + // Note: should not be killing the process here, but this codepath is deprecated anyway + process.exit(1); + } + } + // In case the typescript compiler hasn't compiled anything yet, + // make it run though compilation at least one time before + // the REPL starts for a snappier user experience on startup. + service === null || service === void 0 ? void 0 : service.compile('', state.path); + const repl = (0, repl_1.start)({ + prompt: '> ', + input: replService.stdin, + output: replService.stdout, + // Mimicking node's REPL implementation: https://github.com/nodejs/node/blob/168b22ba073ee1cbf8d0bcb4ded7ff3099335d04/lib/internal/repl.js#L28-L30 + terminal: stdout.isTTY && + !parseInt(index_1.env.NODE_NO_READLINE, 10), + eval: nodeEval, + useGlobal: true, + ...optionsOverride, + }); + nodeReplServer = repl; + context = repl.context; + // Bookmark the point where we should reset the REPL state. + const resetEval = appendToEvalState(state, ''); + function reset() { + resetEval(); + // Hard fix for TypeScript forcing `Object.defineProperty(exports, ...)`. + runInContext('exports = module.exports', state.path, context); + if (forceToBeModule) { + state.input += 'export {};void 0;\n'; + } + // Declare node builtins. + // Skip the same builtins as `addBuiltinLibsToObject`: + // those starting with _ + // those containing / + // those that already exist as globals + // Intentionally suppress type errors in case @types/node does not declare any of them, and because + // `declare import` is technically invalid syntax. + // Avoid this when in transpileOnly, because third-party transpilers may not handle `declare import`. + if (!(service === null || service === void 0 ? void 0 : service.transpileOnly)) { + state.input += `// @ts-ignore\n${module_1.builtinModules + .filter((name) => !name.startsWith('_') && + !name.includes('/') && + !['console', 'module', 'process'].includes(name)) + .map((name) => `declare import ${name} = require('${name}')`) + .join(';')}\n`; + } + } + reset(); + repl.on('reset', reset); + repl.defineCommand('type', { + help: 'Check the type of a TypeScript identifier', + action: function (identifier) { + if (!identifier) { + repl.displayPrompt(); + return; + } + const undo = appendToEvalState(state, identifier); + const { name, comment } = service.getTypeInfo(state.input, state.path, state.input.length); + undo(); + if (name) + repl.outputStream.write(`${name}\n`); + if (comment) + repl.outputStream.write(`${comment}\n`); + repl.displayPrompt(); + }, + }); + // Set up REPL history when available natively via node.js >= 11. + if (repl.setupHistory) { + const historyPath = index_1.env.TS_NODE_HISTORY || (0, path_1.join)((0, os_1.homedir)(), '.ts_node_repl_history'); + repl.setupHistory(historyPath, (err) => { + if (!err) + return; + _console.error(err); + process.exit(1); + }); + } + return repl; + } +} +exports.createRepl = createRepl; +/** + * Eval state management. Stores virtual `[eval].ts` file + */ +class EvalState { + constructor(path) { + this.path = path; + /** @internal */ + this.input = ''; + /** @internal */ + this.output = ''; + /** @internal */ + this.version = 0; + /** @internal */ + this.lines = 0; + } +} +exports.EvalState = EvalState; +function createEvalAwarePartialHost(state, composeWith) { + function readFile(path) { + if (path === state.path) + return state.input; + if (composeWith === null || composeWith === void 0 ? void 0 : composeWith.readFile) + return composeWith.readFile(path); + try { + return (0, fs_1.readFileSync)(path, 'utf8'); + } + catch (err) { + /* Ignore. */ + } + } + function fileExists(path) { + if (path === state.path) + return true; + if (composeWith === null || composeWith === void 0 ? void 0 : composeWith.fileExists) + return composeWith.fileExists(path); + try { + const stats = (0, fs_1.statSync)(path); + return stats.isFile() || stats.isFIFO(); + } + catch (err) { + return false; + } + } + return { readFile, fileExists }; +} +exports.createEvalAwarePartialHost = createEvalAwarePartialHost; +const sourcemapCommentRe = /\/\/# ?sourceMappingURL=\S+[\s\r\n]*$/; +/** + * Evaluate the code snippet. + * + * Append it to virtual .ts file, compile, handle compiler errors, compute a diff of the JS, and eval any code that + * appears as "added" in the diff. + */ +function appendCompileAndEvalInput(options) { + const { service, state, wrappedErr, enableTopLevelAwait = false, context, overrideIsCompletion, } = options; + let { input } = options; + // It's confusing for `{ a: 1 }` to be interpreted as a block statement + // rather than an object literal. So, we first try to wrap it in + // parentheses, so that it will be interpreted as an expression. + // Based on https://github.com/nodejs/node/blob/c2e6822153bad023ab7ebd30a6117dcc049e475c/lib/repl.js#L413-L422 + let wrappedCmd = false; + if (!wrappedErr && /^\s*{/.test(input) && !/;\s*$/.test(input)) { + input = `(${input.trim()})\n`; + wrappedCmd = true; + } + const lines = state.lines; + const isCompletion = overrideIsCompletion !== null && overrideIsCompletion !== void 0 ? overrideIsCompletion : !/\n$/.test(input); + const undo = appendToEvalState(state, input); + let output; + // Based on https://github.com/nodejs/node/blob/92573721c7cff104ccb82b6ed3e8aa69c4b27510/lib/repl.js#L457-L461 + function adjustUseStrict(code) { + // "void 0" keeps the repl from returning "use strict" as the result + // value for statements and declarations that don't return a value. + return code.replace(/^"use strict";/, '"use strict"; void 0;'); + } + try { + output = service.compile(state.input, state.path, -lines); + } + catch (err) { + undo(); + if (wrappedCmd) { + if (err instanceof index_1.TSError && err.diagnosticCodes[0] === 2339) { + // Ensure consistent and more sane behavior between { a: 1 }['b'] and ({ a: 1 }['b']) + throw err; + } + // Unwrap and try again + return appendCompileAndEvalInput({ + ...options, + wrappedErr: err, + }); + } + if (wrappedErr) + throw wrappedErr; + throw err; + } + output = adjustUseStrict(output); + // Note: REPL does not respect sourcemaps! + // To properly do that, we'd need to prefix the code we eval -- which comes + // from `diffLines` -- with newlines so that it's at the proper line numbers. + // Then we'd need to ensure each bit of eval-ed code, if there are multiples, + // has the sourcemap appended to it. + // We might also need to integrate with our sourcemap hooks' cache; I'm not sure. + const outputWithoutSourcemapComment = output.replace(sourcemapCommentRe, ''); + const oldOutputWithoutSourcemapComment = state.output.replace(sourcemapCommentRe, ''); + // Use `diff` to check for new JavaScript to execute. + const changes = getDiffLines()(oldOutputWithoutSourcemapComment, outputWithoutSourcemapComment); + if (isCompletion) { + undo(); + } + else { + state.output = output; + // Insert a semicolon to make sure that the code doesn't interact with the next line, + // for example to prevent `2\n+ 2` from producing 4. + // This is safe since the output will not change since we can only get here with successful inputs, + // and adding a semicolon to the end of a successful input won't ever change the output. + state.input = state.input.replace(/([^\n\s])([\n\s]*)$/, (all, lastChar, whitespace) => { + if (lastChar !== ';') + return `${lastChar};${whitespace}`; + return all; + }); + } + let commands = []; + let containsTopLevelAwait = false; + // Build a list of "commands": bits of JS code in the diff that must be executed. + for (const change of changes) { + if (change.added) { + if (enableTopLevelAwait && + service.shouldReplAwait && + change.value.indexOf('await') > -1) { + const processTopLevelAwait = getProcessTopLevelAwait(); + // Newline prevents comments to mess with wrapper + const wrappedResult = processTopLevelAwait(change.value + '\n'); + if (wrappedResult !== null) { + containsTopLevelAwait = true; + commands.push({ + mustAwait: true, + execCommand: () => runInContext(wrappedResult, state.path, context), + }); + continue; + } + } + commands.push({ + execCommand: () => runInContext(change.value, state.path, context), + }); + } + } + // Execute all commands asynchronously if necessary, returning the result or a + // promise of the result. + if (containsTopLevelAwait) { + return { + containsTopLevelAwait, + valuePromise: (async () => { + let value; + for (const command of commands) { + const r = command.execCommand(); + value = command.mustAwait ? await r : r; + } + return value; + })(), + }; + } + else { + return { + containsTopLevelAwait: false, + value: commands.reduce((_, c) => c.execCommand(), undefined), + }; + } +} +/** + * Low-level execution of JS code in context + */ +function runInContext(code, filename, context) { + const script = new vm_1.Script(code, { filename }); + if (context === undefined || context === global) { + return script.runInThisContext(); + } + else { + return script.runInContext(context); + } +} +/** + * Append to the eval instance and return an undo function. + */ +function appendToEvalState(state, input) { + const undoInput = state.input; + const undoVersion = state.version; + const undoOutput = state.output; + const undoLines = state.lines; + state.input += input; + state.lines += lineCount(input); + state.version++; + return function () { + state.input = undoInput; + state.output = undoOutput; + state.version = undoVersion; + state.lines = undoLines; + }; +} +/** + * Count the number of lines. + */ +function lineCount(value) { + let count = 0; + for (const char of value) { + if (char === '\n') { + count++; + } + } + return count; +} +/** + * TS diagnostic codes which are recoverable, meaning that the user likely entered an incomplete line of code + * and should be prompted for the next. For example, starting a multi-line for() loop and not finishing it. + * null value means code is always recoverable. `Set` means code is only recoverable when occurring alongside at least one + * of the other codes. + */ +const RECOVERY_CODES = new Map([ + [1003, null], + [1005, null], + [1109, null], + [1126, null], + [ + 1136, + new Set([1005]), // happens when typing out an object literal or block scope across multiple lines: '{ foo: 123,' + ], + [1160, null], + [1161, null], + [2355, null], + [2391, null], + [ + 7010, + new Set([1005]), // happens when fn signature spread across multiple lines: 'function a(\nb: any\n) {' + ], +]); +/** + * Diagnostic codes raised when using top-level await. + * These are suppressed when top-level await is enabled. + * When it is *not* enabled, these trigger a helpful hint about enabling top-level await. + */ +const topLevelAwaitDiagnosticCodes = [ + 1375, + 1378, + 1431, + 1432, // Top-level 'for await' loops are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher. +]; +/** + * Check if a function can recover gracefully. + */ +function isRecoverable(error) { + return error.diagnosticCodes.every((code) => { + const deps = RECOVERY_CODES.get(code); + return (deps === null || + (deps && error.diagnosticCodes.some((code) => deps.has(code)))); + }); +} +/** + * @internal + * Set properties on `context` before eval-ing [stdin] or [eval] input. + */ +function setupContext(context, module, filenameAndDirname) { + if (filenameAndDirname) { + context.__dirname = '.'; + context.__filename = `[${filenameAndDirname}]`; + } + context.module = module; + context.exports = module.exports; + context.require = module.require.bind(module); +} +exports.setupContext = setupContext; +//# sourceMappingURL=repl.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/repl.js.map b/node_modules/ts-node/dist/repl.js.map new file mode 100644 index 0000000..c375c84 --- /dev/null +++ b/node_modules/ts-node/dist/repl.js.map @@ -0,0 +1 @@ +{"version":3,"file":"repl.js","sourceRoot":"","sources":["../src/repl.ts"],"names":[],"mappings":";;;AACA,2BAA6B;AAC7B,+BAA4B;AAC5B,+BAKc;AACd,2BAAoD;AACpD,mCAA+D;AAC/D,2BAA4C;AAC5C,qCAAkC;AAClC,iCAAiC;AAGjC,mCAAwC;AAExC,eAAe;AACf,IAAI,qBAAqD,CAAC;AAC1D,SAAS,uBAAuB;IAC9B,IAAI,qBAAqB,KAAK,SAAS,EAAE;QACvC,CAAC;YACC,oBAAoB,EAAE,qBAAqB;SAC5C,GAAG,OAAO,CAAC,sCAAsC,CAAC,CAAC,CAAC;KACtD;IACD,OAAO,qBAAqB,CAAC;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AI,CAAC,CAAC,EAAE,qFAAqF;KACvG;CACF,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,4BAA4B,GAAG;IACnC,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI,EAAE,8JAA8J;CACrK,CAAC;AAEF;;GAEG;AACH,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,KAAK,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE;QAC1C,MAAM,IAAI,GAAG,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACtC,OAAO,CACL,IAAI,KAAK,IAAI;YACb,CAAC,IAAI,IAAI,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAC/D,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;GAGG;AACH,SAAgB,YAAY,CAC1B,OAAY,EACZ,MAAc,EACd,kBAA2C;IAE3C,IAAI,kBAAkB,EAAE;QACtB,OAAO,CAAC,SAAS,GAAG,GAAG,CAAC;QACxB,OAAO,CAAC,UAAU,GAAG,IAAI,kBAAkB,GAAG,CAAC;KAChD;IACD,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC;IACxB,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;IACjC,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC;AAZD,oCAYC","sourcesContent":["import type * as _diff from 'diff';\nimport { homedir } from 'os';\nimport { join } from 'path';\nimport {\n Recoverable,\n ReplOptions,\n REPLServer,\n start as nodeReplStart,\n} from 'repl';\nimport { Context, createContext, Script } from 'vm';\nimport { Service, CreateOptions, TSError, env } from './index';\nimport { readFileSync, statSync } from 'fs';\nimport { Console } from 'console';\nimport * as assert from 'assert';\nimport type * as tty from 'tty';\nimport type * as Module from 'module';\nimport { builtinModules } from 'module';\n\n// Lazy-loaded.\nlet _processTopLevelAwait: (src: string) => string | null;\nfunction getProcessTopLevelAwait() {\n if (_processTopLevelAwait === undefined) {\n ({\n processTopLevelAwait: _processTopLevelAwait,\n } = require('../dist-raw/node-internal-repl-await'));\n }\n return _processTopLevelAwait;\n}\nlet diff: typeof _diff;\nfunction getDiffLines() {\n if (diff === undefined) {\n diff = require('diff');\n }\n return diff.diffLines;\n}\n\n/** @internal */\nexport const EVAL_FILENAME = `[eval].ts`;\n/** @internal */\nexport const EVAL_NAME = `[eval]`;\n/** @internal */\nexport const STDIN_FILENAME = `[stdin].ts`;\n/** @internal */\nexport const STDIN_NAME = `[stdin]`;\n/** @internal */\nexport const REPL_FILENAME = '.ts';\n/** @internal */\nexport const REPL_NAME = '';\n\nexport interface ReplService {\n readonly state: EvalState;\n /**\n * Bind this REPL to a ts-node compiler service. A compiler service must be bound before `eval`-ing code or starting the REPL\n */\n setService(service: Service): void;\n /**\n * Append code to the virtual source file, compile it to JavaScript, throw semantic errors if the typechecker is enabled,\n * and execute it.\n *\n * Note: typically, you will want to call `start()` instead of using this method.\n *\n * @param code string of TypeScript.\n */\n evalCode(code: string): any;\n /** @internal */\n evalCodeInternal(opts: {\n code: string;\n enableTopLevelAwait?: boolean;\n context?: Context;\n }):\n | {\n containsTopLevelAwait: true;\n valuePromise: Promise;\n }\n | {\n containsTopLevelAwait: false;\n value: any;\n };\n /**\n * `eval` implementation compatible with node's REPL API\n *\n * Can be used in advanced scenarios if you want to manually create your own\n * node REPL instance and delegate eval to this `ReplService`.\n *\n * Example:\n *\n * import {start} from 'repl';\n * const replService: tsNode.ReplService = ...; // assuming you have already created a ts-node ReplService\n * const nodeRepl = start({eval: replService.eval});\n */\n nodeEval(\n code: string,\n // TODO change to `Context` in a future release? Technically a breaking change\n context: any,\n _filename: string,\n callback: (err: Error | null, result?: any) => any\n ): void;\n evalAwarePartialHost: EvalAwarePartialHost;\n /** Start a node REPL */\n start(): void;\n /**\n * Start a node REPL, evaling a string of TypeScript before it starts.\n * @deprecated\n */\n start(code: string): void;\n /** @internal */\n startInternal(opts?: ReplOptions): REPLServer;\n /** @internal */\n readonly stdin: NodeJS.ReadableStream;\n /** @internal */\n readonly stdout: NodeJS.WritableStream;\n /** @internal */\n readonly stderr: NodeJS.WritableStream;\n /** @internal */\n readonly console: Console;\n}\n\n/** @category REPL */\nexport interface CreateReplOptions {\n service?: Service;\n state?: EvalState;\n stdin?: NodeJS.ReadableStream;\n stdout?: NodeJS.WritableStream;\n stderr?: NodeJS.WritableStream;\n /** @internal */\n composeWithEvalAwarePartialHost?: EvalAwarePartialHost;\n /**\n * @internal\n * Ignore diagnostics that are annoying when interactively entering input line-by-line.\n */\n ignoreDiagnosticsThatAreAnnoyingInInteractiveRepl?: boolean;\n}\n\n/**\n * Create a ts-node REPL instance.\n *\n * Pay close attention to the example below. Today, the API requires a few lines\n * of boilerplate to correctly bind the `ReplService` to the ts-node `Service` and\n * vice-versa.\n *\n * Usage example:\n *\n * const repl = tsNode.createRepl();\n * const service = tsNode.create({...repl.evalAwarePartialHost});\n * repl.setService(service);\n * repl.start();\n *\n * @category REPL\n */\nexport function createRepl(options: CreateReplOptions = {}) {\n const { ignoreDiagnosticsThatAreAnnoyingInInteractiveRepl = true } = options;\n let service = options.service;\n let nodeReplServer: REPLServer;\n // If `useGlobal` is not true, then REPL creates a context when started.\n // This stores a reference to it or to `global`, whichever is used, after REPL has started.\n let context: Context | undefined;\n const state =\n options.state ?? new EvalState(join(process.cwd(), REPL_FILENAME));\n const evalAwarePartialHost = createEvalAwarePartialHost(\n state,\n options.composeWithEvalAwarePartialHost\n );\n const stdin = options.stdin ?? process.stdin;\n const stdout = options.stdout ?? process.stdout;\n const stderr = options.stderr ?? process.stderr;\n const _console =\n stdout === process.stdout && stderr === process.stderr\n ? console\n : new Console(stdout, stderr);\n\n const replService: ReplService = {\n state: options.state ?? new EvalState(join(process.cwd(), EVAL_FILENAME)),\n setService,\n evalCode,\n evalCodeInternal,\n nodeEval,\n evalAwarePartialHost,\n start,\n startInternal,\n stdin,\n stdout,\n stderr,\n console: _console,\n };\n\n return replService;\n\n function setService(_service: Service) {\n service = _service;\n if (ignoreDiagnosticsThatAreAnnoyingInInteractiveRepl) {\n service.addDiagnosticFilter({\n appliesToAllFiles: false,\n filenamesAbsolute: [state.path],\n diagnosticsIgnored: [\n 2393, // Duplicate function implementation: https://github.com/TypeStrong/ts-node/issues/729\n 6133, // is declared but its value is never read. https://github.com/TypeStrong/ts-node/issues/850\n 7027, // Unreachable code detected. https://github.com/TypeStrong/ts-node/issues/469\n ...(service.shouldReplAwait ? topLevelAwaitDiagnosticCodes : []),\n ],\n });\n }\n }\n\n function evalCode(code: string) {\n const result = appendCompileAndEvalInput({\n service: service!,\n state,\n input: code,\n context,\n overrideIsCompletion: false,\n });\n assert(result.containsTopLevelAwait === false);\n return result.value;\n }\n\n function evalCodeInternal(options: {\n code: string;\n enableTopLevelAwait?: boolean;\n context: Context;\n }) {\n const { code, enableTopLevelAwait, context } = options;\n return appendCompileAndEvalInput({\n service: service!,\n state,\n input: code,\n enableTopLevelAwait,\n context,\n });\n }\n\n function nodeEval(\n code: string,\n context: any,\n _filename: string,\n callback: (err: Error | null, result?: any) => any\n ) {\n // TODO: Figure out how to handle completion here.\n if (code === '.scope') {\n callback(null);\n return;\n }\n\n try {\n const evalResult = evalCodeInternal({\n code,\n enableTopLevelAwait: true,\n context,\n });\n\n if (evalResult.containsTopLevelAwait) {\n (async () => {\n try {\n callback(null, await evalResult.valuePromise);\n } catch (promiseError) {\n handleError(promiseError);\n }\n })();\n } else {\n callback(null, evalResult.value);\n }\n } catch (error) {\n handleError(error);\n }\n\n // Log TSErrors, check if they're recoverable, log helpful hints for certain\n // well-known errors, and invoke `callback()`\n // TODO should evalCode API get the same error-handling benefits?\n function handleError(error: unknown) {\n // Don't show TLA hint if the user explicitly disabled repl top level await\n const canLogTopLevelAwaitHint =\n service!.options.experimentalReplAwait !== false &&\n !service!.shouldReplAwait;\n if (error instanceof TSError) {\n // Support recoverable compilations using >= node 6.\n if (Recoverable && isRecoverable(error)) {\n callback(new Recoverable(error));\n return;\n } else {\n _console.error(error);\n\n if (\n canLogTopLevelAwaitHint &&\n error.diagnosticCodes.some((dC) =>\n topLevelAwaitDiagnosticCodes.includes(dC)\n )\n ) {\n _console.error(getTopLevelAwaitHint());\n }\n callback(null);\n }\n } else {\n let _error = error as Error | undefined;\n if (\n canLogTopLevelAwaitHint &&\n _error instanceof SyntaxError &&\n _error.message?.includes('await is only valid')\n ) {\n try {\n // Only way I know to make our hint appear after the error\n _error.message += `\\n\\n${getTopLevelAwaitHint()}`;\n _error.stack = _error.stack?.replace(\n /(SyntaxError:.*)/,\n (_, $1) => `${$1}\\n\\n${getTopLevelAwaitHint()}`\n );\n } catch {}\n }\n callback(_error as Error);\n }\n }\n function getTopLevelAwaitHint() {\n return `Hint: REPL top-level await requires TypeScript version 3.8 or higher and target ES2018 or higher. You are using TypeScript ${\n service!.ts.version\n } and target ${\n service!.ts.ScriptTarget[service!.config.options.target!]\n }.`;\n }\n }\n\n // Note: `code` argument is deprecated\n function start(code?: string) {\n startInternal({ code });\n }\n\n // Note: `code` argument is deprecated\n function startInternal(\n options?: ReplOptions & { code?: string; forceToBeModule?: boolean }\n ) {\n const { code, forceToBeModule = true, ...optionsOverride } = options ?? {};\n // TODO assert that `service` is set; remove all `service!` non-null assertions\n\n // Eval incoming code before the REPL starts.\n // Note: deprecated\n if (code) {\n try {\n evalCode(`${code}\\n`);\n } catch (err) {\n _console.error(err);\n // Note: should not be killing the process here, but this codepath is deprecated anyway\n process.exit(1);\n }\n }\n\n // In case the typescript compiler hasn't compiled anything yet,\n // make it run though compilation at least one time before\n // the REPL starts for a snappier user experience on startup.\n service?.compile('', state.path);\n\n const repl = nodeReplStart({\n prompt: '> ',\n input: replService.stdin,\n output: replService.stdout,\n // Mimicking node's REPL implementation: https://github.com/nodejs/node/blob/168b22ba073ee1cbf8d0bcb4ded7ff3099335d04/lib/internal/repl.js#L28-L30\n terminal:\n (stdout as tty.WriteStream).isTTY &&\n !parseInt(env.NODE_NO_READLINE!, 10),\n eval: nodeEval,\n useGlobal: true,\n ...optionsOverride,\n });\n\n nodeReplServer = repl;\n context = repl.context;\n\n // Bookmark the point where we should reset the REPL state.\n const resetEval = appendToEvalState(state, '');\n\n function reset() {\n resetEval();\n\n // Hard fix for TypeScript forcing `Object.defineProperty(exports, ...)`.\n runInContext('exports = module.exports', state.path, context);\n if (forceToBeModule) {\n state.input += 'export {};void 0;\\n';\n }\n\n // Declare node builtins.\n // Skip the same builtins as `addBuiltinLibsToObject`:\n // those starting with _\n // those containing /\n // those that already exist as globals\n // Intentionally suppress type errors in case @types/node does not declare any of them, and because\n // `declare import` is technically invalid syntax.\n // Avoid this when in transpileOnly, because third-party transpilers may not handle `declare import`.\n if (!service?.transpileOnly) {\n state.input += `// @ts-ignore\\n${builtinModules\n .filter(\n (name) =>\n !name.startsWith('_') &&\n !name.includes('/') &&\n !['console', 'module', 'process'].includes(name)\n )\n .map((name) => `declare import ${name} = require('${name}')`)\n .join(';')}\\n`;\n }\n }\n\n reset();\n repl.on('reset', reset);\n\n repl.defineCommand('type', {\n help: 'Check the type of a TypeScript identifier',\n action: function (identifier: string) {\n if (!identifier) {\n repl.displayPrompt();\n return;\n }\n\n const undo = appendToEvalState(state, identifier);\n const { name, comment } = service!.getTypeInfo(\n state.input,\n state.path,\n state.input.length\n );\n\n undo();\n\n if (name) repl.outputStream.write(`${name}\\n`);\n if (comment) repl.outputStream.write(`${comment}\\n`);\n repl.displayPrompt();\n },\n });\n\n // Set up REPL history when available natively via node.js >= 11.\n if (repl.setupHistory) {\n const historyPath =\n env.TS_NODE_HISTORY || join(homedir(), '.ts_node_repl_history');\n\n repl.setupHistory(historyPath, (err) => {\n if (!err) return;\n\n _console.error(err);\n process.exit(1);\n });\n }\n\n return repl;\n }\n}\n\n/**\n * Eval state management. Stores virtual `[eval].ts` file\n */\nexport class EvalState {\n /** @internal */\n input = '';\n /** @internal */\n output = '';\n /** @internal */\n version = 0;\n /** @internal */\n lines = 0;\n\n __tsNodeEvalStateBrand: unknown;\n\n constructor(public path: string) {}\n}\n\n/**\n * Filesystem host functions which are aware of the \"virtual\" `[eval].ts`, ``, or `[stdin].ts` file used to compile REPL inputs.\n * Must be passed to `create()` to create a ts-node compiler service which can compile REPL inputs.\n */\nexport type EvalAwarePartialHost = Pick<\n CreateOptions,\n 'readFile' | 'fileExists'\n>;\n\nexport function createEvalAwarePartialHost(\n state: EvalState,\n composeWith?: EvalAwarePartialHost\n): EvalAwarePartialHost {\n function readFile(path: string) {\n if (path === state.path) return state.input;\n\n if (composeWith?.readFile) return composeWith.readFile(path);\n\n try {\n return readFileSync(path, 'utf8');\n } catch (err) {\n /* Ignore. */\n }\n }\n function fileExists(path: string) {\n if (path === state.path) return true;\n\n if (composeWith?.fileExists) return composeWith.fileExists(path);\n\n try {\n const stats = statSync(path);\n return stats.isFile() || stats.isFIFO();\n } catch (err) {\n return false;\n }\n }\n return { readFile, fileExists };\n}\n\nconst sourcemapCommentRe = /\\/\\/# ?sourceMappingURL=\\S+[\\s\\r\\n]*$/;\n\ntype AppendCompileAndEvalInputResult =\n | { containsTopLevelAwait: true; valuePromise: Promise }\n | { containsTopLevelAwait: false; value: any };\n/**\n * Evaluate the code snippet.\n *\n * Append it to virtual .ts file, compile, handle compiler errors, compute a diff of the JS, and eval any code that\n * appears as \"added\" in the diff.\n */\nfunction appendCompileAndEvalInput(options: {\n service: Service;\n state: EvalState;\n input: string;\n wrappedErr?: unknown;\n /** Enable top-level await but only if the TSNode service allows it. */\n enableTopLevelAwait?: boolean;\n context: Context | undefined;\n /**\n * Added so that `evalCode` can be guaranteed *not* to trigger the `isCompletion`\n * codepath. However, the `isCompletion` logic is ancient and maybe should be removed entirely.\n * Nobody's looked at it in a long time.\n */\n overrideIsCompletion?: boolean;\n}): AppendCompileAndEvalInputResult {\n const {\n service,\n state,\n wrappedErr,\n enableTopLevelAwait = false,\n context,\n overrideIsCompletion,\n } = options;\n let { input } = options;\n\n // It's confusing for `{ a: 1 }` to be interpreted as a block statement\n // rather than an object literal. So, we first try to wrap it in\n // parentheses, so that it will be interpreted as an expression.\n // Based on https://github.com/nodejs/node/blob/c2e6822153bad023ab7ebd30a6117dcc049e475c/lib/repl.js#L413-L422\n let wrappedCmd = false;\n if (!wrappedErr && /^\\s*{/.test(input) && !/;\\s*$/.test(input)) {\n input = `(${input.trim()})\\n`;\n wrappedCmd = true;\n }\n\n const lines = state.lines;\n const isCompletion = overrideIsCompletion ?? !/\\n$/.test(input);\n const undo = appendToEvalState(state, input);\n let output: string;\n\n // Based on https://github.com/nodejs/node/blob/92573721c7cff104ccb82b6ed3e8aa69c4b27510/lib/repl.js#L457-L461\n function adjustUseStrict(code: string) {\n // \"void 0\" keeps the repl from returning \"use strict\" as the result\n // value for statements and declarations that don't return a value.\n return code.replace(/^\"use strict\";/, '\"use strict\"; void 0;');\n }\n\n try {\n output = service.compile(state.input, state.path, -lines);\n } catch (err) {\n undo();\n\n if (wrappedCmd) {\n if (err instanceof TSError && err.diagnosticCodes[0] === 2339) {\n // Ensure consistent and more sane behavior between { a: 1 }['b'] and ({ a: 1 }['b'])\n throw err;\n }\n // Unwrap and try again\n return appendCompileAndEvalInput({\n ...options,\n wrappedErr: err,\n });\n }\n\n if (wrappedErr) throw wrappedErr;\n throw err;\n }\n\n output = adjustUseStrict(output);\n\n // Note: REPL does not respect sourcemaps!\n // To properly do that, we'd need to prefix the code we eval -- which comes\n // from `diffLines` -- with newlines so that it's at the proper line numbers.\n // Then we'd need to ensure each bit of eval-ed code, if there are multiples,\n // has the sourcemap appended to it.\n // We might also need to integrate with our sourcemap hooks' cache; I'm not sure.\n const outputWithoutSourcemapComment = output.replace(sourcemapCommentRe, '');\n const oldOutputWithoutSourcemapComment = state.output.replace(\n sourcemapCommentRe,\n ''\n );\n\n // Use `diff` to check for new JavaScript to execute.\n const changes = getDiffLines()(\n oldOutputWithoutSourcemapComment,\n outputWithoutSourcemapComment\n );\n\n if (isCompletion) {\n undo();\n } else {\n state.output = output;\n\n // Insert a semicolon to make sure that the code doesn't interact with the next line,\n // for example to prevent `2\\n+ 2` from producing 4.\n // This is safe since the output will not change since we can only get here with successful inputs,\n // and adding a semicolon to the end of a successful input won't ever change the output.\n state.input = state.input.replace(\n /([^\\n\\s])([\\n\\s]*)$/,\n (all, lastChar, whitespace) => {\n if (lastChar !== ';') return `${lastChar};${whitespace}`;\n return all;\n }\n );\n }\n\n let commands: Array<{ mustAwait?: true; execCommand: () => any }> = [];\n let containsTopLevelAwait = false;\n\n // Build a list of \"commands\": bits of JS code in the diff that must be executed.\n for (const change of changes) {\n if (change.added) {\n if (\n enableTopLevelAwait &&\n service.shouldReplAwait &&\n change.value.indexOf('await') > -1\n ) {\n const processTopLevelAwait = getProcessTopLevelAwait();\n\n // Newline prevents comments to mess with wrapper\n const wrappedResult = processTopLevelAwait(change.value + '\\n');\n if (wrappedResult !== null) {\n containsTopLevelAwait = true;\n commands.push({\n mustAwait: true,\n execCommand: () => runInContext(wrappedResult, state.path, context),\n });\n continue;\n }\n }\n commands.push({\n execCommand: () => runInContext(change.value, state.path, context),\n });\n }\n }\n\n // Execute all commands asynchronously if necessary, returning the result or a\n // promise of the result.\n if (containsTopLevelAwait) {\n return {\n containsTopLevelAwait,\n valuePromise: (async () => {\n let value;\n for (const command of commands) {\n const r = command.execCommand();\n value = command.mustAwait ? await r : r;\n }\n return value;\n })(),\n };\n } else {\n return {\n containsTopLevelAwait: false,\n value: commands.reduce((_, c) => c.execCommand(), undefined),\n };\n }\n}\n\n/**\n * Low-level execution of JS code in context\n */\nfunction runInContext(code: string, filename: string, context?: Context) {\n const script = new Script(code, { filename });\n\n if (context === undefined || context === global) {\n return script.runInThisContext();\n } else {\n return script.runInContext(context);\n }\n}\n\n/**\n * Append to the eval instance and return an undo function.\n */\nfunction appendToEvalState(state: EvalState, input: string) {\n const undoInput = state.input;\n const undoVersion = state.version;\n const undoOutput = state.output;\n const undoLines = state.lines;\n\n state.input += input;\n state.lines += lineCount(input);\n state.version++;\n\n return function () {\n state.input = undoInput;\n state.output = undoOutput;\n state.version = undoVersion;\n state.lines = undoLines;\n };\n}\n\n/**\n * Count the number of lines.\n */\nfunction lineCount(value: string) {\n let count = 0;\n\n for (const char of value) {\n if (char === '\\n') {\n count++;\n }\n }\n\n return count;\n}\n\n/**\n * TS diagnostic codes which are recoverable, meaning that the user likely entered an incomplete line of code\n * and should be prompted for the next. For example, starting a multi-line for() loop and not finishing it.\n * null value means code is always recoverable. `Set` means code is only recoverable when occurring alongside at least one\n * of the other codes.\n */\nconst RECOVERY_CODES: Map | null> = new Map([\n [1003, null], // \"Identifier expected.\"\n [1005, null], // \"')' expected.\", \"'}' expected.\"\n [1109, null], // \"Expression expected.\"\n [1126, null], // \"Unexpected end of text.\"\n [\n 1136, // \"Property assignment expected.\"\n new Set([1005]), // happens when typing out an object literal or block scope across multiple lines: '{ foo: 123,'\n ],\n [1160, null], // \"Unterminated template literal.\"\n [1161, null], // \"Unterminated regular expression literal.\"\n [2355, null], // \"A function whose declared type is neither 'void' nor 'any' must return a value.\"\n [2391, null], // \"Function implementation is missing or not immediately following the declaration.\"\n [\n 7010, // \"Function, which lacks return-type annotation, implicitly has an 'any' return type.\"\n new Set([1005]), // happens when fn signature spread across multiple lines: 'function a(\\nb: any\\n) {'\n ],\n]);\n\n/**\n * Diagnostic codes raised when using top-level await.\n * These are suppressed when top-level await is enabled.\n * When it is *not* enabled, these trigger a helpful hint about enabling top-level await.\n */\nconst topLevelAwaitDiagnosticCodes = [\n 1375, // 'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module.\n 1378, // Top-level 'await' expressions are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher.\n 1431, // 'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module.\n 1432, // Top-level 'for await' loops are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher.\n];\n\n/**\n * Check if a function can recover gracefully.\n */\nfunction isRecoverable(error: TSError) {\n return error.diagnosticCodes.every((code) => {\n const deps = RECOVERY_CODES.get(code);\n return (\n deps === null ||\n (deps && error.diagnosticCodes.some((code) => deps.has(code)))\n );\n });\n}\n\n/**\n * @internal\n * Set properties on `context` before eval-ing [stdin] or [eval] input.\n */\nexport function setupContext(\n context: any,\n module: Module,\n filenameAndDirname: 'eval' | 'stdin' | null\n) {\n if (filenameAndDirname) {\n context.__dirname = '.';\n context.__filename = `[${filenameAndDirname}]`;\n }\n context.module = module;\n context.exports = module.exports;\n context.require = module.require.bind(module);\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/resolver-functions.d.ts b/node_modules/ts-node/dist/resolver-functions.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/ts-node/dist/resolver-functions.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/ts-node/dist/resolver-functions.js b/node_modules/ts-node/dist/resolver-functions.js new file mode 100644 index 0000000..16ed046 --- /dev/null +++ b/node_modules/ts-node/dist/resolver-functions.js @@ -0,0 +1,143 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createResolverFunctions = void 0; +const path_1 = require("path"); +/** + * @internal + * In a factory because these are shared across both CompilerHost and LanguageService codepaths + */ +function createResolverFunctions(kwargs) { + const { host, ts, config, cwd, getCanonicalFileName, projectLocalResolveHelper, options, extensions, } = kwargs; + const moduleResolutionCache = ts.createModuleResolutionCache(cwd, getCanonicalFileName, config.options); + const knownInternalFilenames = new Set(); + /** "Buckets" (module directories) whose contents should be marked "internal" */ + const internalBuckets = new Set(); + // Get bucket for a source filename. Bucket is the containing `./node_modules/*/` directory + // For '/project/node_modules/foo/node_modules/bar/lib/index.js' bucket is '/project/node_modules/foo/node_modules/bar/' + // For '/project/node_modules/foo/node_modules/@scope/bar/lib/index.js' bucket is '/project/node_modules/foo/node_modules/@scope/bar/' + const moduleBucketRe = /.*\/node_modules\/(?:@[^\/]+\/)?[^\/]+\//; + function getModuleBucket(filename) { + const find = moduleBucketRe.exec(filename); + if (find) + return find[0]; + return ''; + } + // Mark that this file and all siblings in its bucket should be "internal" + function markBucketOfFilenameInternal(filename) { + internalBuckets.add(getModuleBucket(filename)); + } + function isFileInInternalBucket(filename) { + return internalBuckets.has(getModuleBucket(filename)); + } + function isFileKnownToBeInternal(filename) { + return knownInternalFilenames.has(filename); + } + /** + * If we need to emit JS for a file, force TS to consider it non-external + */ + const fixupResolvedModule = (resolvedModule) => { + const { resolvedFileName } = resolvedModule; + if (resolvedFileName === undefined) + return; + // [MUST_UPDATE_FOR_NEW_FILE_EXTENSIONS] + // .ts,.mts,.cts is always switched to internal + // .js is switched on-demand + if (resolvedModule.isExternalLibraryImport && + ((resolvedFileName.endsWith('.ts') && + !resolvedFileName.endsWith('.d.ts')) || + (resolvedFileName.endsWith('.cts') && + !resolvedFileName.endsWith('.d.cts')) || + (resolvedFileName.endsWith('.mts') && + !resolvedFileName.endsWith('.d.mts')) || + isFileKnownToBeInternal(resolvedFileName) || + isFileInInternalBucket(resolvedFileName))) { + resolvedModule.isExternalLibraryImport = false; + } + if (!resolvedModule.isExternalLibraryImport) { + knownInternalFilenames.add(resolvedFileName); + } + }; + /* + * NOTE: + * Older ts versions do not pass `redirectedReference` nor `options`. + * We must pass `redirectedReference` to newer ts versions, but cannot rely on `options`, hence the weird argument name + */ + const resolveModuleNames = (moduleNames, containingFile, reusedNames, redirectedReference, optionsOnlyWithNewerTsVersions, containingSourceFile) => { + return moduleNames.map((moduleName, i) => { + var _a, _b; + const mode = containingSourceFile + ? (_b = (_a = ts).getModeForResolutionAtIndex) === null || _b === void 0 ? void 0 : _b.call(_a, containingSourceFile, i) + : undefined; + let { resolvedModule } = ts.resolveModuleName(moduleName, containingFile, config.options, host, moduleResolutionCache, redirectedReference, mode); + if (!resolvedModule && options.experimentalTsImportSpecifiers) { + const lastDotIndex = moduleName.lastIndexOf('.'); + const ext = lastDotIndex >= 0 ? moduleName.slice(lastDotIndex) : ''; + if (ext) { + const replacements = extensions.tsResolverEquivalents.get(ext); + for (const replacementExt of replacements !== null && replacements !== void 0 ? replacements : []) { + ({ resolvedModule } = ts.resolveModuleName(moduleName.slice(0, -ext.length) + replacementExt, containingFile, config.options, host, moduleResolutionCache, redirectedReference, mode)); + if (resolvedModule) + break; + } + } + } + if (resolvedModule) { + fixupResolvedModule(resolvedModule); + } + return resolvedModule; + }); + }; + // language service never calls this, but TS docs recommend that we implement it + const getResolvedModuleWithFailedLookupLocationsFromCache = (moduleName, containingFile, resolutionMode) => { + const ret = ts.resolveModuleNameFromCache(moduleName, containingFile, moduleResolutionCache, resolutionMode); + if (ret && ret.resolvedModule) { + fixupResolvedModule(ret.resolvedModule); + } + return ret; + }; + const resolveTypeReferenceDirectives = (typeDirectiveNames, containingFile, redirectedReference, options, containingFileMode // new impliedNodeFormat is accepted by compilerHost + ) => { + // Note: seems to be called with empty typeDirectiveNames array for all files. + // TODO consider using `ts.loadWithTypeDirectiveCache` + return typeDirectiveNames.map((typeDirectiveName) => { + // Copy-pasted from TS source: + const nameIsString = typeof typeDirectiveName === 'string'; + const mode = nameIsString + ? undefined + : ts.getModeForFileReference(typeDirectiveName, containingFileMode); + const strName = nameIsString + ? typeDirectiveName + : typeDirectiveName.fileName.toLowerCase(); + let { resolvedTypeReferenceDirective } = ts.resolveTypeReferenceDirective(strName, containingFile, config.options, host, redirectedReference, undefined, mode); + if (typeDirectiveName === 'node' && !resolvedTypeReferenceDirective) { + // Resolve @types/node relative to project first, then __dirname (copy logic from elsewhere / refactor into reusable function) + let typesNodePackageJsonPath; + try { + typesNodePackageJsonPath = projectLocalResolveHelper('@types/node/package.json', true); + } + catch { } // gracefully do nothing when @types/node is not installed for any reason + if (typesNodePackageJsonPath) { + const typeRoots = [(0, path_1.resolve)(typesNodePackageJsonPath, '../..')]; + ({ resolvedTypeReferenceDirective } = + ts.resolveTypeReferenceDirective(typeDirectiveName, containingFile, { + ...config.options, + typeRoots, + }, host, redirectedReference)); + } + } + if (resolvedTypeReferenceDirective) { + fixupResolvedModule(resolvedTypeReferenceDirective); + } + return resolvedTypeReferenceDirective; + }); + }; + return { + resolveModuleNames, + getResolvedModuleWithFailedLookupLocationsFromCache, + resolveTypeReferenceDirectives, + isFileKnownToBeInternal, + markBucketOfFilenameInternal, + }; +} +exports.createResolverFunctions = createResolverFunctions; +//# sourceMappingURL=resolver-functions.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/resolver-functions.js.map b/node_modules/ts-node/dist/resolver-functions.js.map new file mode 100644 index 0000000..1ef0d82 --- /dev/null +++ b/node_modules/ts-node/dist/resolver-functions.js.map @@ -0,0 +1 @@ +{"version":3,"file":"resolver-functions.js","sourceRoot":"","sources":["../src/resolver-functions.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAM/B;;;GAGG;AACH,SAAgB,uBAAuB,CAAC,MASvC;IACC,MAAM,EACJ,IAAI,EACJ,EAAE,EACF,MAAM,EACN,GAAG,EACH,oBAAoB,EACpB,yBAAyB,EACzB,OAAO,EACP,UAAU,GACX,GAAG,MAAM,CAAC;IACX,MAAM,qBAAqB,GAAG,EAAE,CAAC,2BAA2B,CAC1D,GAAG,EACH,oBAAoB,EACpB,MAAM,CAAC,OAAO,CACf,CAAC;IACF,MAAM,sBAAsB,GAAG,IAAI,GAAG,EAAU,CAAC;IACjD,gFAAgF;IAChF,MAAM,eAAe,GAAG,IAAI,GAAG,EAAU,CAAC;IAE1C,4FAA4F;IAC5F,wHAAwH;IACxH,sIAAsI;IACtI,MAAM,cAAc,GAAG,0CAA0C,CAAC;IAClE,SAAS,eAAe,CAAC,QAAgB;QACvC,MAAM,IAAI,GAAG,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC3C,IAAI,IAAI;YAAE,OAAO,IAA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YACJ,IAAI,iBAAiB,KAAK,MAAM,IAAI,CAAC,8BAA8B,EAAE;gBACnE,8HAA8H;gBAC9H,IAAI,wBAA4C,CAAC;gBACjD,IAAI;oBACF,wBAAwB,GAAG,yBAAyB,CAClD,0BAA0B,EAC1B,IAAI,CACL,CAAC;iBACH;gBAAC,MAAM,GAAE,CAAC,yEAAyE;gBACpF,IAAI,wBAAwB,EAAE;oBAC5B,MAAM,SAAS,GAAG,CAAC,IAAA,cAAO,EAAC,wBAAwB,EAAE,OAAO,CAAC,CAAC,CAAC;oBAC/D,CAAC,EAAE,8BAA8B,EAAE;wBACjC,EAAE,CAAC,6BAA6B,CAC9B,iBAAiB,EACjB,cAAc,EACd;4BACE,GAAG,MAAM,CAAC,OAAO;4BACjB,SAAS;yBACV,EACD,IAAI,EACJ,mBAAmB,CACpB,CAAC,CAAC;iBACN;aACF;YACD,IAAI,8BAA8B,EAAE;gBAClC,mBAAmB,CAAC,8BAA8B,CAAC,CAAC;aACrD;YACD,OAAO,8BAA8B,CAAC;QACxC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEJ,OAAO;QACL,kBAAkB;QAClB,mDAAmD;QACnD,8BAA8B;QAC9B,uBAAuB;QACvB,4BAA4B;KAC7B,CAAC;AACJ,CAAC;AAnOD,0DAmOC","sourcesContent":["import { resolve } from 'path';\nimport type { CreateOptions } from '.';\nimport type { Extensions } from './file-extensions';\nimport type { TSCommon, TSInternal } from './ts-compiler-types';\nimport type { ProjectLocalResolveHelper } from './util';\n\n/**\n * @internal\n * In a factory because these are shared across both CompilerHost and LanguageService codepaths\n */\nexport function createResolverFunctions(kwargs: {\n ts: TSCommon;\n host: TSCommon.ModuleResolutionHost;\n cwd: string;\n getCanonicalFileName: (filename: string) => string;\n config: TSCommon.ParsedCommandLine;\n projectLocalResolveHelper: ProjectLocalResolveHelper;\n options: CreateOptions;\n extensions: Extensions;\n}) {\n const {\n host,\n ts,\n config,\n cwd,\n getCanonicalFileName,\n projectLocalResolveHelper,\n options,\n extensions,\n } = kwargs;\n const moduleResolutionCache = ts.createModuleResolutionCache(\n cwd,\n getCanonicalFileName,\n config.options\n );\n const knownInternalFilenames = new Set();\n /** \"Buckets\" (module directories) whose contents should be marked \"internal\" */\n const internalBuckets = new Set();\n\n // Get bucket for a source filename. Bucket is the containing `./node_modules/*/` directory\n // For '/project/node_modules/foo/node_modules/bar/lib/index.js' bucket is '/project/node_modules/foo/node_modules/bar/'\n // For '/project/node_modules/foo/node_modules/@scope/bar/lib/index.js' bucket is '/project/node_modules/foo/node_modules/@scope/bar/'\n const moduleBucketRe = /.*\\/node_modules\\/(?:@[^\\/]+\\/)?[^\\/]+\\//;\n function getModuleBucket(filename: string) {\n const find = moduleBucketRe.exec(filename);\n if (find) return find[0];\n return '';\n }\n\n // Mark that this file and all siblings in its bucket should be \"internal\"\n function markBucketOfFilenameInternal(filename: string) {\n internalBuckets.add(getModuleBucket(filename));\n }\n\n function isFileInInternalBucket(filename: string) {\n return internalBuckets.has(getModuleBucket(filename));\n }\n\n function isFileKnownToBeInternal(filename: string) {\n return knownInternalFilenames.has(filename);\n }\n\n /**\n * If we need to emit JS for a file, force TS to consider it non-external\n */\n const fixupResolvedModule = (\n resolvedModule:\n | TSCommon.ResolvedModule\n | TSCommon.ResolvedTypeReferenceDirective\n ) => {\n const { resolvedFileName } = resolvedModule;\n if (resolvedFileName === undefined) return;\n // [MUST_UPDATE_FOR_NEW_FILE_EXTENSIONS]\n // .ts,.mts,.cts is always switched to internal\n // .js is switched on-demand\n if (\n resolvedModule.isExternalLibraryImport &&\n ((resolvedFileName.endsWith('.ts') &&\n !resolvedFileName.endsWith('.d.ts')) ||\n (resolvedFileName.endsWith('.cts') &&\n !resolvedFileName.endsWith('.d.cts')) ||\n (resolvedFileName.endsWith('.mts') &&\n !resolvedFileName.endsWith('.d.mts')) ||\n isFileKnownToBeInternal(resolvedFileName) ||\n isFileInInternalBucket(resolvedFileName))\n ) {\n resolvedModule.isExternalLibraryImport = false;\n }\n if (!resolvedModule.isExternalLibraryImport) {\n knownInternalFilenames.add(resolvedFileName);\n }\n };\n /*\n * NOTE:\n * Older ts versions do not pass `redirectedReference` nor `options`.\n * We must pass `redirectedReference` to newer ts versions, but cannot rely on `options`, hence the weird argument name\n */\n const resolveModuleNames: TSCommon.LanguageServiceHost['resolveModuleNames'] =\n (\n moduleNames: string[],\n containingFile: string,\n reusedNames: string[] | undefined,\n redirectedReference: TSCommon.ResolvedProjectReference | undefined,\n optionsOnlyWithNewerTsVersions: TSCommon.CompilerOptions,\n containingSourceFile?: TSCommon.SourceFile\n ): (TSCommon.ResolvedModule | undefined)[] => {\n return moduleNames.map((moduleName, i) => {\n const mode = containingSourceFile\n ? (ts as any as TSInternal).getModeForResolutionAtIndex?.(\n containingSourceFile,\n i\n )\n : undefined;\n let { resolvedModule } = ts.resolveModuleName(\n moduleName,\n containingFile,\n config.options,\n host,\n moduleResolutionCache,\n redirectedReference,\n mode\n );\n if (!resolvedModule && options.experimentalTsImportSpecifiers) {\n const lastDotIndex = moduleName.lastIndexOf('.');\n const ext = lastDotIndex >= 0 ? moduleName.slice(lastDotIndex) : '';\n if (ext) {\n const replacements = extensions.tsResolverEquivalents.get(ext);\n for (const replacementExt of replacements ?? []) {\n ({ resolvedModule } = ts.resolveModuleName(\n moduleName.slice(0, -ext.length) + replacementExt,\n containingFile,\n config.options,\n host,\n moduleResolutionCache,\n redirectedReference,\n mode\n ));\n if (resolvedModule) break;\n }\n }\n }\n if (resolvedModule) {\n fixupResolvedModule(resolvedModule);\n }\n return resolvedModule;\n });\n };\n\n // language service never calls this, but TS docs recommend that we implement it\n const getResolvedModuleWithFailedLookupLocationsFromCache: TSCommon.LanguageServiceHost['getResolvedModuleWithFailedLookupLocationsFromCache'] =\n (\n moduleName,\n containingFile,\n resolutionMode?: TSCommon.ModuleKind.CommonJS | TSCommon.ModuleKind.ESNext\n ): TSCommon.ResolvedModuleWithFailedLookupLocations | undefined => {\n const ret = ts.resolveModuleNameFromCache(\n moduleName,\n containingFile,\n moduleResolutionCache,\n resolutionMode\n );\n if (ret && ret.resolvedModule) {\n fixupResolvedModule(ret.resolvedModule);\n }\n return ret;\n };\n\n const resolveTypeReferenceDirectives: TSCommon.LanguageServiceHost['resolveTypeReferenceDirectives'] =\n (\n typeDirectiveNames: string[] | readonly TSCommon.FileReference[],\n containingFile: string,\n redirectedReference: TSCommon.ResolvedProjectReference | undefined,\n options: TSCommon.CompilerOptions,\n containingFileMode?: TSCommon.SourceFile['impliedNodeFormat'] | undefined // new impliedNodeFormat is accepted by compilerHost\n ): (TSCommon.ResolvedTypeReferenceDirective | undefined)[] => {\n // Note: seems to be called with empty typeDirectiveNames array for all files.\n // TODO consider using `ts.loadWithTypeDirectiveCache`\n return typeDirectiveNames.map((typeDirectiveName) => {\n // Copy-pasted from TS source:\n const nameIsString = typeof typeDirectiveName === 'string';\n const mode = nameIsString\n ? undefined\n : (ts as any as TSInternal).getModeForFileReference!(\n typeDirectiveName,\n containingFileMode\n );\n const strName = nameIsString\n ? typeDirectiveName\n : typeDirectiveName.fileName.toLowerCase();\n let { resolvedTypeReferenceDirective } =\n ts.resolveTypeReferenceDirective(\n strName,\n containingFile,\n config.options,\n host,\n redirectedReference,\n undefined,\n mode\n );\n if (typeDirectiveName === 'node' && !resolvedTypeReferenceDirective) {\n // Resolve @types/node relative to project first, then __dirname (copy logic from elsewhere / refactor into reusable function)\n let typesNodePackageJsonPath: string | undefined;\n try {\n typesNodePackageJsonPath = projectLocalResolveHelper(\n '@types/node/package.json',\n true\n );\n } catch {} // gracefully do nothing when @types/node is not installed for any reason\n if (typesNodePackageJsonPath) {\n const typeRoots = [resolve(typesNodePackageJsonPath, '../..')];\n ({ resolvedTypeReferenceDirective } =\n ts.resolveTypeReferenceDirective(\n typeDirectiveName,\n containingFile,\n {\n ...config.options,\n typeRoots,\n },\n host,\n redirectedReference\n ));\n }\n }\n if (resolvedTypeReferenceDirective) {\n fixupResolvedModule(resolvedTypeReferenceDirective);\n }\n return resolvedTypeReferenceDirective;\n });\n };\n\n return {\n resolveModuleNames,\n getResolvedModuleWithFailedLookupLocationsFromCache,\n resolveTypeReferenceDirectives,\n isFileKnownToBeInternal,\n markBucketOfFilenameInternal,\n };\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/transpilers/swc.d.ts b/node_modules/ts-node/dist/transpilers/swc.d.ts new file mode 100644 index 0000000..942e746 --- /dev/null +++ b/node_modules/ts-node/dist/transpilers/swc.d.ts @@ -0,0 +1,11 @@ +import type * as swcWasm from '@swc/wasm'; +import type { CreateTranspilerOptions, Transpiler } from './types'; +export interface SwcTranspilerOptions extends CreateTranspilerOptions { + /** + * swc compiler to use for compilation + * Set to '@swc/wasm' to use swc's WASM compiler + * Default: '@swc/core', falling back to '@swc/wasm' + */ + swc?: string | typeof swcWasm; +} +export declare function create(createOptions: SwcTranspilerOptions): Transpiler; diff --git a/node_modules/ts-node/dist/transpilers/swc.js b/node_modules/ts-node/dist/transpilers/swc.js new file mode 100644 index 0000000..e49f881 --- /dev/null +++ b/node_modules/ts-node/dist/transpilers/swc.js @@ -0,0 +1,218 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createSwcOptions = exports.targetMapping = exports.create = void 0; +const ts_internals_1 = require("../ts-internals"); +function create(createOptions) { + const { swc, service: { config, projectLocalResolveHelper }, transpilerConfigLocalResolveHelper, nodeModuleEmitKind, } = createOptions; + // Load swc compiler + let swcInstance; + // Used later in diagnostics; merely needs to be human-readable. + let swcDepName = 'swc'; + if (typeof swc === 'string') { + swcDepName = swc; + swcInstance = require(transpilerConfigLocalResolveHelper(swc, true)); + } + else if (swc == null) { + let swcResolved; + try { + swcDepName = '@swc/core'; + swcResolved = transpilerConfigLocalResolveHelper(swcDepName, true); + } + catch (e) { + try { + swcDepName = '@swc/wasm'; + swcResolved = transpilerConfigLocalResolveHelper(swcDepName, true); + } + catch (e) { + throw new Error('swc compiler requires either @swc/core or @swc/wasm to be installed as a dependency. See https://typestrong.org/ts-node/docs/transpilers'); + } + } + swcInstance = require(swcResolved); + } + else { + swcInstance = swc; + } + // Prepare SWC options derived from typescript compiler options + const { nonTsxOptions, tsxOptions } = createSwcOptions(config.options, nodeModuleEmitKind, swcInstance, swcDepName); + const transpile = (input, transpileOptions) => { + const { fileName } = transpileOptions; + const swcOptions = fileName.endsWith('.tsx') || fileName.endsWith('.jsx') ? tsxOptions : nonTsxOptions; + const { code, map } = swcInstance.transformSync(input, { + ...swcOptions, + filename: fileName, + }); + return { outputText: code, sourceMapText: map }; + }; + return { + transpile, + }; +} +exports.create = create; +/** @internal */ +exports.targetMapping = new Map(); +exports.targetMapping.set(/* ts.ScriptTarget.ES3 */ 0, 'es3'); +exports.targetMapping.set(/* ts.ScriptTarget.ES5 */ 1, 'es5'); +exports.targetMapping.set(/* ts.ScriptTarget.ES2015 */ 2, 'es2015'); +exports.targetMapping.set(/* ts.ScriptTarget.ES2016 */ 3, 'es2016'); +exports.targetMapping.set(/* ts.ScriptTarget.ES2017 */ 4, 'es2017'); +exports.targetMapping.set(/* ts.ScriptTarget.ES2018 */ 5, 'es2018'); +exports.targetMapping.set(/* ts.ScriptTarget.ES2019 */ 6, 'es2019'); +exports.targetMapping.set(/* ts.ScriptTarget.ES2020 */ 7, 'es2020'); +exports.targetMapping.set(/* ts.ScriptTarget.ES2021 */ 8, 'es2021'); +exports.targetMapping.set(/* ts.ScriptTarget.ES2022 */ 9, 'es2022'); +exports.targetMapping.set(/* ts.ScriptTarget.ESNext */ 99, 'esnext'); +/** + * @internal + * We use this list to downgrade to a prior target when we probe swc to detect if it supports a particular target + */ +const swcTargets = [ + 'es3', + 'es5', + 'es2015', + 'es2016', + 'es2017', + 'es2018', + 'es2019', + 'es2020', + 'es2021', + 'es2022', + 'esnext', +]; +const ModuleKind = { + None: 0, + CommonJS: 1, + AMD: 2, + UMD: 3, + System: 4, + ES2015: 5, + ES2020: 6, + ESNext: 99, + Node16: 100, + NodeNext: 199, +}; +const JsxEmit = { + ReactJSX: /* ts.JsxEmit.ReactJSX */ 4, + ReactJSXDev: /* ts.JsxEmit.ReactJSXDev */ 5, +}; +/** + * Prepare SWC options derived from typescript compiler options. + * @internal exported for testing + */ +function createSwcOptions(compilerOptions, nodeModuleEmitKind, swcInstance, swcDepName) { + var _a; + const { esModuleInterop, sourceMap, importHelpers, experimentalDecorators, emitDecoratorMetadata, target, module, jsx, jsxFactory, jsxFragmentFactory, strict, alwaysStrict, noImplicitUseStrict, jsxImportSource, } = compilerOptions; + let swcTarget = (_a = exports.targetMapping.get(target)) !== null && _a !== void 0 ? _a : 'es3'; + // Downgrade to lower target if swc does not support the selected target. + // Perhaps project has an older version of swc. + // TODO cache the results of this; slightly faster + let swcTargetIndex = swcTargets.indexOf(swcTarget); + for (; swcTargetIndex >= 0; swcTargetIndex--) { + try { + swcInstance.transformSync('', { + jsc: { target: swcTargets[swcTargetIndex] }, + }); + break; + } + catch (e) { } + } + swcTarget = swcTargets[swcTargetIndex]; + const keepClassNames = target >= /* ts.ScriptTarget.ES2016 */ 3; + const isNodeModuleKind = module === ModuleKind.Node16 || module === ModuleKind.NodeNext; + // swc only supports these 4x module options [MUST_UPDATE_FOR_NEW_MODULEKIND] + const moduleType = module === ModuleKind.CommonJS + ? 'commonjs' + : module === ModuleKind.AMD + ? 'amd' + : module === ModuleKind.UMD + ? 'umd' + : isNodeModuleKind && nodeModuleEmitKind === 'nodecjs' + ? 'commonjs' + : isNodeModuleKind && nodeModuleEmitKind === 'nodeesm' + ? 'es6' + : 'es6'; + // In swc: + // strictMode means `"use strict"` is *always* emitted for non-ES module, *never* for ES module where it is assumed it can be omitted. + // (this assumption is invalid, but that's the way swc behaves) + // tsc is a bit more complex: + // alwaysStrict will force emitting it always unless `import`/`export` syntax is emitted which implies it per the JS spec. + // if not alwaysStrict, will emit implicitly whenever module target is non-ES *and* transformed module syntax is emitted. + // For node, best option is to assume that all scripts are modules (commonjs or esm) and thus should get tsc's implicit strict behavior. + // Always set strictMode, *unless* alwaysStrict is disabled and noImplicitUseStrict is enabled + const strictMode = + // if `alwaysStrict` is disabled, remembering that `strict` defaults `alwaysStrict` to true + (alwaysStrict === false || (alwaysStrict !== true && strict !== true)) && + // if noImplicitUseStrict is enabled + noImplicitUseStrict === true + ? false + : true; + const jsxRuntime = jsx === JsxEmit.ReactJSX || jsx === JsxEmit.ReactJSXDev ? 'automatic' : undefined; + const jsxDevelopment = jsx === JsxEmit.ReactJSXDev ? true : undefined; + const useDefineForClassFields = (0, ts_internals_1.getUseDefineForClassFields)(compilerOptions); + const nonTsxOptions = createVariant(false); + const tsxOptions = createVariant(true); + return { nonTsxOptions, tsxOptions }; + function createVariant(isTsx) { + const swcOptions = { + sourceMaps: sourceMap, + // isModule: true, + module: moduleType + ? { + type: moduleType, + ...(moduleType === 'amd' || moduleType === 'commonjs' || moduleType === 'umd' + ? { + noInterop: !esModuleInterop, + strictMode, + // For NodeNext and Node12, emit as CJS but do not transform dynamic imports + ignoreDynamic: nodeModuleEmitKind === 'nodecjs', + } + : {}), + } + : undefined, + swcrc: false, + jsc: { + externalHelpers: importHelpers, + parser: { + syntax: 'typescript', + tsx: isTsx, + decorators: experimentalDecorators, + dynamicImport: true, + importAssertions: true, + }, + target: swcTarget, + transform: { + decoratorMetadata: emitDecoratorMetadata, + legacyDecorator: true, + react: { + throwIfNamespace: false, + development: jsxDevelopment, + useBuiltins: false, + pragma: jsxFactory, + pragmaFrag: jsxFragmentFactory, + runtime: jsxRuntime, + importSource: jsxImportSource, + }, + useDefineForClassFields, + }, + keepClassNames, + experimental: { + keepImportAttributes: true, + emitAssertForImportAttributes: true, + }, + }, + }; + // Throw a helpful error if swc version is old, for example, if it rejects `ignoreDynamic` + try { + swcInstance.transformSync('', swcOptions); + } + catch (e) { + throw new Error(`${swcDepName} threw an error when attempting to validate swc compiler options.\n` + + 'You may be using an old version of swc which does not support the options used by ts-node.\n' + + 'Try upgrading to the latest version of swc.\n' + + 'Error message from swc:\n' + + (e === null || e === void 0 ? void 0 : e.message)); + } + return swcOptions; + } +} +exports.createSwcOptions = createSwcOptions; +//# sourceMappingURL=swc.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/transpilers/swc.js.map b/node_modules/ts-node/dist/transpilers/swc.js.map new file mode 100644 index 0000000..06330f0 --- /dev/null +++ b/node_modules/ts-node/dist/transpilers/swc.js.map @@ -0,0 +1 @@ +{"version":3,"file":"swc.js","sourceRoot":"","sources":["../../src/transpilers/swc.ts"],"names":[],"mappings":";;;AAKA,kDAA6D;AAY7D,SAAgB,MAAM,CAAC,aAAmC;IACxD,MAAM,EACJ,GAAG,EACH,OAAO,EAAE,EAAE,MAAM,EAAE,yBAAyB,EAAE,EAC9C,kCAAkC,EAClC,kBAAkB,GACnB,GAAG,aAAa,CAAC;IAElB,oBAAoB;IACpB,IAAI,WAAwB,CAAC;IAC7B,gEAAgE;IAChE,IAAI,UAAU,GAAW,KAAK,CAAC;IAC/B,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;QAC3B,UAAU,GAAG,GAAG,CAAC;QACjB,WAAW,GAAG,OAAO,CAAC,kCAAkC,CAAC,GAAG,EAAE,IAAI,CAAC,CAAgB,CAAC;KACrF;SAAM,IAAI,GAAG,IAAI,IAAI,EAAE;QACtB,IAAI,WAAW,CAAC;QAChB,IAAI;YACF,UAAU,GAAG,WAAW,CAAC;YACzB,WAAW,GAAG,kCAAkC,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;SACpE;QAAC,OAAO,CAAC,EAAE;YACV,IAAI;gBACF,UAAU,GAAG,WAAW,CAAC;gBACzB,WAAW,GAAG,kCAAkC,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;aACpE;YAAC,OAAO,CAAC,EAAE;gBACV,MAAM,IAAI,KAAK,CACb,2IAA2I,CAC5I,CAAC;aACH;SACF;QACD,WAAW,GAAG,OAAO,CAAC,WAAW,CAAgB,CAAC;KACnD;SAAM;QACL,WAAW,GAAG,GAAyB,CAAC;KACzC;IAED,+DAA+D;IAC/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GAAG,EAAE,KAAK;oBACV,UAAU,EAAE,sBAAsB;oBAClC,aAAa,EAAE,IAAI;oBACnB,gBAAgB,EAAE,IAAI;iBACG;gBAC3B,MAAM,EAAE,SAA8B;gBACtC,SAAS,EAAE;oBACT,iBAAiB,EAAE,qBAAqB;oBACxC,eAAe,EAAE,IAAI;oBACrB,KAAK,EAAE;wBACL,gBAAgB,EAAE,KAAK;wBACvB,WAAW,EAAE,cAAc;wBAC3B,WAAW,EAAE,KAAK;wBAClB,MAAM,EAAE,UAAW;wBACnB,UAAU,EAAE,kBAAmB;wBAC/B,OAAO,EAAE,UAAU;wBACnB,YAAY,EAAE,eAAe;qBAC9B;oBACD,uBAAuB;iBACxB;gBACD,cAAc;gBACd,YAAY,EAAE;oBACZ,oBAAoB,EAAE,IAAI;oBAC1B,6BAA6B,EAAE,IAAI;iBACE;aACxC;SACF,CAAC;QAEF,0FAA0F;QAC1F,IAAI;YACF,WAAW,CAAC,aAAa,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;SAC3C;QAAC,OAAO,CAAC,EAAE;YACV,MAAM,IAAI,KAAK,CACb,GAAG,UAAU,qEAAqE;gBAChF,8FAA8F;gBAC9F,+CAA+C;gBAC/C,2BAA2B;iBAC1B,CAAW,aAAX,CAAC,uBAAD,CAAC,CAAY,OAAO,CAAA,CACxB,CAAC;SACH;QAED,OAAO,UAAU,CAAC;IACpB,CAAC;AACH,CAAC;AAhJD,4CAgJC","sourcesContent":["import type * as ts from 'typescript';\nimport type * as swcWasm from '@swc/wasm';\nimport type * as swcTypes from '@swc/core';\nimport type { CreateTranspilerOptions, Transpiler } from './types';\nimport type { NodeModuleEmitKind } from '..';\nimport { getUseDefineForClassFields } from '../ts-internals';\n\ntype SwcInstance = typeof swcTypes;\nexport interface SwcTranspilerOptions extends CreateTranspilerOptions {\n /**\n * swc compiler to use for compilation\n * Set to '@swc/wasm' to use swc's WASM compiler\n * Default: '@swc/core', falling back to '@swc/wasm'\n */\n swc?: string | typeof swcWasm;\n}\n\nexport function create(createOptions: SwcTranspilerOptions): Transpiler {\n const {\n swc,\n service: { config, projectLocalResolveHelper },\n transpilerConfigLocalResolveHelper,\n nodeModuleEmitKind,\n } = createOptions;\n\n // Load swc compiler\n let swcInstance: SwcInstance;\n // Used later in diagnostics; merely needs to be human-readable.\n let swcDepName: string = 'swc';\n if (typeof swc === 'string') {\n swcDepName = swc;\n swcInstance = require(transpilerConfigLocalResolveHelper(swc, true)) as SwcInstance;\n } else if (swc == null) {\n let swcResolved;\n try {\n swcDepName = '@swc/core';\n swcResolved = transpilerConfigLocalResolveHelper(swcDepName, true);\n } catch (e) {\n try {\n swcDepName = '@swc/wasm';\n swcResolved = transpilerConfigLocalResolveHelper(swcDepName, true);\n } catch (e) {\n throw new Error(\n 'swc compiler requires either @swc/core or @swc/wasm to be installed as a dependency. See https://typestrong.org/ts-node/docs/transpilers'\n );\n }\n }\n swcInstance = require(swcResolved) as SwcInstance;\n } else {\n swcInstance = swc as any as SwcInstance;\n }\n\n // Prepare SWC options derived from typescript compiler options\n const { nonTsxOptions, tsxOptions } = createSwcOptions(config.options, nodeModuleEmitKind, swcInstance, swcDepName);\n\n const transpile: Transpiler['transpile'] = (input, transpileOptions) => {\n const { fileName } = transpileOptions;\n const swcOptions = fileName.endsWith('.tsx') || fileName.endsWith('.jsx') ? tsxOptions : nonTsxOptions;\n const { code, map } = swcInstance.transformSync(input, {\n ...swcOptions,\n filename: fileName,\n });\n return { outputText: code, sourceMapText: map };\n };\n\n return {\n transpile,\n };\n}\n\n/** @internal */\nexport const targetMapping = new Map();\ntargetMapping.set(/* ts.ScriptTarget.ES3 */ 0, 'es3');\ntargetMapping.set(/* ts.ScriptTarget.ES5 */ 1, 'es5');\ntargetMapping.set(/* ts.ScriptTarget.ES2015 */ 2, 'es2015');\ntargetMapping.set(/* ts.ScriptTarget.ES2016 */ 3, 'es2016');\ntargetMapping.set(/* ts.ScriptTarget.ES2017 */ 4, 'es2017');\ntargetMapping.set(/* ts.ScriptTarget.ES2018 */ 5, 'es2018');\ntargetMapping.set(/* ts.ScriptTarget.ES2019 */ 6, 'es2019');\ntargetMapping.set(/* ts.ScriptTarget.ES2020 */ 7, 'es2020');\ntargetMapping.set(/* ts.ScriptTarget.ES2021 */ 8, 'es2021');\ntargetMapping.set(/* ts.ScriptTarget.ES2022 */ 9, 'es2022');\ntargetMapping.set(/* ts.ScriptTarget.ESNext */ 99, 'esnext');\n\ntype SwcTarget = typeof swcTargets[number];\n/**\n * @internal\n * We use this list to downgrade to a prior target when we probe swc to detect if it supports a particular target\n */\nconst swcTargets = [\n 'es3',\n 'es5',\n 'es2015',\n 'es2016',\n 'es2017',\n 'es2018',\n 'es2019',\n 'es2020',\n 'es2021',\n 'es2022',\n 'esnext',\n] as const;\n\nconst ModuleKind = {\n None: 0,\n CommonJS: 1,\n AMD: 2,\n UMD: 3,\n System: 4,\n ES2015: 5,\n ES2020: 6,\n ESNext: 99,\n Node16: 100,\n NodeNext: 199,\n} as const;\n\nconst JsxEmit = {\n ReactJSX: /* ts.JsxEmit.ReactJSX */ 4,\n ReactJSXDev: /* ts.JsxEmit.ReactJSXDev */ 5,\n} as const;\n\n/**\n * Prepare SWC options derived from typescript compiler options.\n * @internal exported for testing\n */\nexport function createSwcOptions(\n compilerOptions: ts.CompilerOptions,\n nodeModuleEmitKind: NodeModuleEmitKind | undefined,\n swcInstance: SwcInstance,\n swcDepName: string\n) {\n const {\n esModuleInterop,\n sourceMap,\n importHelpers,\n experimentalDecorators,\n emitDecoratorMetadata,\n target,\n module,\n jsx,\n jsxFactory,\n jsxFragmentFactory,\n strict,\n alwaysStrict,\n noImplicitUseStrict,\n jsxImportSource,\n } = compilerOptions;\n\n let swcTarget = targetMapping.get(target!) ?? 'es3';\n // Downgrade to lower target if swc does not support the selected target.\n // Perhaps project has an older version of swc.\n // TODO cache the results of this; slightly faster\n let swcTargetIndex = swcTargets.indexOf(swcTarget);\n for (; swcTargetIndex >= 0; swcTargetIndex--) {\n try {\n swcInstance.transformSync('', {\n jsc: { target: swcTargets[swcTargetIndex] as swcWasm.JscTarget },\n });\n break;\n } catch (e) {}\n }\n swcTarget = swcTargets[swcTargetIndex];\n const keepClassNames = target! >= /* ts.ScriptTarget.ES2016 */ 3;\n const isNodeModuleKind = module === ModuleKind.Node16 || module === ModuleKind.NodeNext;\n // swc only supports these 4x module options [MUST_UPDATE_FOR_NEW_MODULEKIND]\n const moduleType =\n module === ModuleKind.CommonJS\n ? 'commonjs'\n : module === ModuleKind.AMD\n ? 'amd'\n : module === ModuleKind.UMD\n ? 'umd'\n : isNodeModuleKind && nodeModuleEmitKind === 'nodecjs'\n ? 'commonjs'\n : isNodeModuleKind && nodeModuleEmitKind === 'nodeesm'\n ? 'es6'\n : 'es6';\n // In swc:\n // strictMode means `\"use strict\"` is *always* emitted for non-ES module, *never* for ES module where it is assumed it can be omitted.\n // (this assumption is invalid, but that's the way swc behaves)\n // tsc is a bit more complex:\n // alwaysStrict will force emitting it always unless `import`/`export` syntax is emitted which implies it per the JS spec.\n // if not alwaysStrict, will emit implicitly whenever module target is non-ES *and* transformed module syntax is emitted.\n // For node, best option is to assume that all scripts are modules (commonjs or esm) and thus should get tsc's implicit strict behavior.\n\n // Always set strictMode, *unless* alwaysStrict is disabled and noImplicitUseStrict is enabled\n const strictMode =\n // if `alwaysStrict` is disabled, remembering that `strict` defaults `alwaysStrict` to true\n (alwaysStrict === false || (alwaysStrict !== true && strict !== true)) &&\n // if noImplicitUseStrict is enabled\n noImplicitUseStrict === true\n ? false\n : true;\n\n const jsxRuntime: swcTypes.ReactConfig['runtime'] =\n jsx === JsxEmit.ReactJSX || jsx === JsxEmit.ReactJSXDev ? 'automatic' : undefined;\n const jsxDevelopment: swcTypes.ReactConfig['development'] = jsx === JsxEmit.ReactJSXDev ? true : undefined;\n\n const useDefineForClassFields = getUseDefineForClassFields(compilerOptions);\n\n const nonTsxOptions = createVariant(false);\n const tsxOptions = createVariant(true);\n return { nonTsxOptions, tsxOptions };\n\n function createVariant(isTsx: boolean): swcTypes.Options {\n const swcOptions: swcTypes.Options = {\n sourceMaps: sourceMap,\n // isModule: true,\n module: moduleType\n ? {\n type: moduleType,\n ...(moduleType === 'amd' || moduleType === 'commonjs' || moduleType === 'umd'\n ? {\n noInterop: !esModuleInterop,\n strictMode,\n // For NodeNext and Node12, emit as CJS but do not transform dynamic imports\n ignoreDynamic: nodeModuleEmitKind === 'nodecjs',\n }\n : {}),\n }\n : undefined,\n swcrc: false,\n jsc: {\n externalHelpers: importHelpers,\n parser: {\n syntax: 'typescript',\n tsx: isTsx,\n decorators: experimentalDecorators,\n dynamicImport: true,\n importAssertions: true,\n } as swcWasm.TsParserConfig,\n target: swcTarget as swcWasm.JscTarget,\n transform: {\n decoratorMetadata: emitDecoratorMetadata,\n legacyDecorator: true,\n react: {\n throwIfNamespace: false,\n development: jsxDevelopment,\n useBuiltins: false,\n pragma: jsxFactory!,\n pragmaFrag: jsxFragmentFactory!,\n runtime: jsxRuntime,\n importSource: jsxImportSource,\n },\n useDefineForClassFields,\n },\n keepClassNames,\n experimental: {\n keepImportAttributes: true,\n emitAssertForImportAttributes: true,\n } as swcTypes.JscConfig['experimental'],\n },\n };\n\n // Throw a helpful error if swc version is old, for example, if it rejects `ignoreDynamic`\n try {\n swcInstance.transformSync('', swcOptions);\n } catch (e) {\n throw new Error(\n `${swcDepName} threw an error when attempting to validate swc compiler options.\\n` +\n 'You may be using an old version of swc which does not support the options used by ts-node.\\n' +\n 'Try upgrading to the latest version of swc.\\n' +\n 'Error message from swc:\\n' +\n (e as Error)?.message\n );\n }\n\n return swcOptions;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/transpilers/types.d.ts b/node_modules/ts-node/dist/transpilers/types.d.ts new file mode 100644 index 0000000..13049f8 --- /dev/null +++ b/node_modules/ts-node/dist/transpilers/types.d.ts @@ -0,0 +1,35 @@ +import type * as ts from 'typescript'; +import type { Service } from '../index'; +/** + * Third-party transpilers are implemented as a CommonJS module with a + * named export "create" + * + * @category Transpiler + */ +export interface TranspilerModule { + create: TranspilerFactory; +} +/** + * Called by ts-node to create a custom transpiler. + * + * @category Transpiler + */ +export declare type TranspilerFactory = (options: CreateTranspilerOptions) => Transpiler; +/** @category Transpiler */ +export interface CreateTranspilerOptions { + service: Pick>; +} +/** @category Transpiler */ +export interface Transpiler { + transpile(input: string, options: TranspileOptions): TranspileOutput; +} +/** @category Transpiler */ +export interface TranspileOptions { + fileName: string; +} +/** @category Transpiler */ +export interface TranspileOutput { + outputText: string; + diagnostics?: ts.Diagnostic[]; + sourceMapText?: string; +} diff --git a/node_modules/ts-node/dist/transpilers/types.js b/node_modules/ts-node/dist/transpilers/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/node_modules/ts-node/dist/transpilers/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/transpilers/types.js.map b/node_modules/ts-node/dist/transpilers/types.js.map new file mode 100644 index 0000000..2a00c2f --- /dev/null +++ b/node_modules/ts-node/dist/transpilers/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/transpilers/types.ts"],"names":[],"mappings":"","sourcesContent":["import type * as ts from 'typescript';\nimport type { NodeModuleEmitKind, Service } from '../index';\nimport type { ProjectLocalResolveHelper } from '../util';\n\n/**\n * Third-party transpilers are implemented as a CommonJS module with a\n * named export \"create\"\n *\n * @category Transpiler\n */\nexport interface TranspilerModule {\n create: TranspilerFactory;\n}\n/**\n * Called by ts-node to create a custom transpiler.\n *\n * @category Transpiler\n */\nexport type TranspilerFactory = (\n options: CreateTranspilerOptions\n) => Transpiler;\n/** @category Transpiler */\nexport interface CreateTranspilerOptions {\n // TODO this is confusing because its only a partial Service. Rename?\n // Careful: must avoid stripInternal breakage by guarding with Extract<>\n service: Pick<\n Service,\n Extract<'config' | 'options' | 'projectLocalResolveHelper', keyof Service>\n >;\n /**\n * If `\"transpiler\"` option is declared in an \"extends\" tsconfig, this path might be different than\n * the `projectLocalResolveHelper`\n *\n * @internal\n */\n transpilerConfigLocalResolveHelper: ProjectLocalResolveHelper;\n /**\n * When using `module: nodenext` or `module: node12`, there are two possible styles of emit:\n * - CommonJS with dynamic imports preserved (not transformed into `require()` calls)\n * - ECMAScript modules with `import foo = require()` transformed into `require = createRequire(); const foo = require()`\n * @internal\n */\n nodeModuleEmitKind?: NodeModuleEmitKind;\n}\n/** @category Transpiler */\nexport interface Transpiler {\n // TODOs\n // Create spec for returning diagnostics? Currently transpilers are allowed to\n // throw an error but that's it.\n transpile(input: string, options: TranspileOptions): TranspileOutput;\n}\n/** @category Transpiler */\nexport interface TranspileOptions {\n fileName: string;\n}\n/** @category Transpiler */\nexport interface TranspileOutput {\n outputText: string;\n diagnostics?: ts.Diagnostic[];\n sourceMapText?: string;\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/ts-compiler-types.d.ts b/node_modules/ts-node/dist/ts-compiler-types.d.ts new file mode 100644 index 0000000..99cd4c6 --- /dev/null +++ b/node_modules/ts-node/dist/ts-compiler-types.d.ts @@ -0,0 +1,63 @@ +import type * as _ts from 'typescript'; +/** + * Common TypeScript interfaces between versions. We endeavour to write ts-node's own code against these types instead + * of against `import "typescript"`, though we are not yet doing this consistently. + * + * Sometimes typescript@next adds an API we need to use. But we build ts-node against typescript@latest. + * In these cases, we must declare that API explicitly here. Our declarations include the newer typescript@next APIs. + * Importantly, these re-declarations are *not* TypeScript internals. They are public APIs that only exist in + * pre-release versions of typescript. + */ +export interface TSCommon { + version: typeof _ts.version; + sys: typeof _ts.sys; + ScriptSnapshot: typeof _ts.ScriptSnapshot; + displayPartsToString: typeof _ts.displayPartsToString; + createLanguageService: typeof _ts.createLanguageService; + getDefaultLibFilePath: typeof _ts.getDefaultLibFilePath; + getPreEmitDiagnostics: typeof _ts.getPreEmitDiagnostics; + flattenDiagnosticMessageText: typeof _ts.flattenDiagnosticMessageText; + transpileModule: typeof _ts.transpileModule; + ModuleKind: TSCommon.ModuleKindEnum; + ScriptTarget: typeof _ts.ScriptTarget; + findConfigFile: typeof _ts.findConfigFile; + readConfigFile: typeof _ts.readConfigFile; + parseJsonConfigFileContent: typeof _ts.parseJsonConfigFileContent; + formatDiagnostics: typeof _ts.formatDiagnostics; + formatDiagnosticsWithColorAndContext: typeof _ts.formatDiagnosticsWithColorAndContext; + createDocumentRegistry: typeof _ts.createDocumentRegistry; + JsxEmit: typeof _ts.JsxEmit; + createModuleResolutionCache: typeof _ts.createModuleResolutionCache; + resolveModuleName: typeof _ts.resolveModuleName; + resolveModuleNameFromCache: typeof _ts.resolveModuleNameFromCache; + resolveTypeReferenceDirective: typeof _ts.resolveTypeReferenceDirective; + createIncrementalCompilerHost: typeof _ts.createIncrementalCompilerHost; + createSourceFile: typeof _ts.createSourceFile; + getDefaultLibFileName: typeof _ts.getDefaultLibFileName; + createIncrementalProgram: typeof _ts.createIncrementalProgram; + createEmitAndSemanticDiagnosticsBuilderProgram: typeof _ts.createEmitAndSemanticDiagnosticsBuilderProgram; + Extension: typeof _ts.Extension; + ModuleResolutionKind: typeof _ts.ModuleResolutionKind; +} +export declare namespace TSCommon { + interface LanguageServiceHost extends _ts.LanguageServiceHost { + } + type ModuleResolutionHost = _ts.ModuleResolutionHost; + type ParsedCommandLine = _ts.ParsedCommandLine; + type ResolvedModule = _ts.ResolvedModule; + type ResolvedTypeReferenceDirective = _ts.ResolvedTypeReferenceDirective; + type CompilerOptions = _ts.CompilerOptions; + type ResolvedProjectReference = _ts.ResolvedProjectReference; + type ResolvedModuleWithFailedLookupLocations = _ts.ResolvedModuleWithFailedLookupLocations; + type FileReference = _ts.FileReference; + type SourceFile = _ts.SourceFile; + type ModuleKindEnum = typeof _ts.ModuleKind & { + Node16: typeof _ts.ModuleKind extends { + Node16: any; + } ? typeof _ts.ModuleKind['Node16'] : 100; + }; + namespace ModuleKind { + type CommonJS = _ts.ModuleKind.CommonJS; + type ESNext = _ts.ModuleKind.ESNext; + } +} diff --git a/node_modules/ts-node/dist/ts-compiler-types.js b/node_modules/ts-node/dist/ts-compiler-types.js new file mode 100644 index 0000000..5b1ec92 --- /dev/null +++ b/node_modules/ts-node/dist/ts-compiler-types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=ts-compiler-types.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/ts-compiler-types.js.map b/node_modules/ts-node/dist/ts-compiler-types.js.map new file mode 100644 index 0000000..07315ef --- /dev/null +++ b/node_modules/ts-node/dist/ts-compiler-types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ts-compiler-types.js","sourceRoot":"","sources":["../src/ts-compiler-types.ts"],"names":[],"mappings":"","sourcesContent":["import type * as _ts from 'typescript';\n\n/**\n * Common TypeScript interfaces between versions. We endeavour to write ts-node's own code against these types instead\n * of against `import \"typescript\"`, though we are not yet doing this consistently.\n *\n * Sometimes typescript@next adds an API we need to use. But we build ts-node against typescript@latest.\n * In these cases, we must declare that API explicitly here. Our declarations include the newer typescript@next APIs.\n * Importantly, these re-declarations are *not* TypeScript internals. They are public APIs that only exist in\n * pre-release versions of typescript.\n */\nexport interface TSCommon {\n version: typeof _ts.version;\n sys: typeof _ts.sys;\n ScriptSnapshot: typeof _ts.ScriptSnapshot;\n displayPartsToString: typeof _ts.displayPartsToString;\n createLanguageService: typeof _ts.createLanguageService;\n getDefaultLibFilePath: typeof _ts.getDefaultLibFilePath;\n getPreEmitDiagnostics: typeof _ts.getPreEmitDiagnostics;\n flattenDiagnosticMessageText: typeof _ts.flattenDiagnosticMessageText;\n transpileModule: typeof _ts.transpileModule;\n ModuleKind: TSCommon.ModuleKindEnum;\n ScriptTarget: typeof _ts.ScriptTarget;\n findConfigFile: typeof _ts.findConfigFile;\n readConfigFile: typeof _ts.readConfigFile;\n parseJsonConfigFileContent: typeof _ts.parseJsonConfigFileContent;\n formatDiagnostics: typeof _ts.formatDiagnostics;\n formatDiagnosticsWithColorAndContext: typeof _ts.formatDiagnosticsWithColorAndContext;\n\n createDocumentRegistry: typeof _ts.createDocumentRegistry;\n JsxEmit: typeof _ts.JsxEmit;\n createModuleResolutionCache: typeof _ts.createModuleResolutionCache;\n resolveModuleName: typeof _ts.resolveModuleName;\n resolveModuleNameFromCache: typeof _ts.resolveModuleNameFromCache;\n resolveTypeReferenceDirective: typeof _ts.resolveTypeReferenceDirective;\n createIncrementalCompilerHost: typeof _ts.createIncrementalCompilerHost;\n createSourceFile: typeof _ts.createSourceFile;\n getDefaultLibFileName: typeof _ts.getDefaultLibFileName;\n createIncrementalProgram: typeof _ts.createIncrementalProgram;\n createEmitAndSemanticDiagnosticsBuilderProgram: typeof _ts.createEmitAndSemanticDiagnosticsBuilderProgram;\n\n Extension: typeof _ts.Extension;\n ModuleResolutionKind: typeof _ts.ModuleResolutionKind;\n}\nexport namespace TSCommon {\n export interface LanguageServiceHost extends _ts.LanguageServiceHost {}\n export type ModuleResolutionHost = _ts.ModuleResolutionHost;\n export type ParsedCommandLine = _ts.ParsedCommandLine;\n export type ResolvedModule = _ts.ResolvedModule;\n export type ResolvedTypeReferenceDirective =\n _ts.ResolvedTypeReferenceDirective;\n export type CompilerOptions = _ts.CompilerOptions;\n export type ResolvedProjectReference = _ts.ResolvedProjectReference;\n export type ResolvedModuleWithFailedLookupLocations =\n _ts.ResolvedModuleWithFailedLookupLocations;\n export type FileReference = _ts.FileReference;\n export type SourceFile = _ts.SourceFile;\n // Hack until we start building against TS >= 4.7.0\n export type ModuleKindEnum = typeof _ts.ModuleKind & {\n Node16: typeof _ts.ModuleKind extends { Node16: any }\n ? typeof _ts.ModuleKind['Node16']\n : 100;\n };\n // Can't figure out how to re-export an enum\n // `export import ... =` complains that _ts is type-only import\n export namespace ModuleKind {\n export type CommonJS = _ts.ModuleKind.CommonJS;\n export type ESNext = _ts.ModuleKind.ESNext;\n }\n}\n\n/**\n * Compiler APIs we use that are marked internal and not included in TypeScript's public API declarations\n * @internal\n */\nexport interface TSInternal {\n // https://github.com/microsoft/TypeScript/blob/4a34294908bed6701dcba2456ca7ac5eafe0ddff/src/compiler/core.ts#L1906-L1909\n createGetCanonicalFileName(\n useCaseSensitiveFileNames: boolean\n ): TSInternal.GetCanonicalFileName;\n // https://github.com/microsoft/TypeScript/blob/c117c266e09c80e8a06b24a6e94b9d018f5fae6b/src/compiler/commandLineParser.ts#L2054\n convertToTSConfig(\n configParseResult: _ts.ParsedCommandLine,\n configFileName: string,\n host: TSInternal.ConvertToTSConfigHost\n ): any;\n libs?: string[];\n Diagnostics: {\n File_0_not_found: _ts.DiagnosticMessage;\n };\n createCompilerDiagnostic(\n message: _ts.DiagnosticMessage,\n ...args: (string | number | undefined)[]\n ): _ts.Diagnostic;\n nodeModuleNameResolver(\n moduleName: string,\n containingFile: string,\n compilerOptions: _ts.CompilerOptions,\n host: _ts.ModuleResolutionHost,\n cache?: _ts.ModuleResolutionCache,\n redirectedReference?: _ts.ResolvedProjectReference,\n conditionsOrIsConfigLookup?: string[] | boolean, // `conditions` parameter added in TS 5.3\n isConfigLookup?: boolean\n ): _ts.ResolvedModuleWithFailedLookupLocations;\n // Added in TS 4.7\n getModeForFileReference?: (\n ref: _ts.FileReference | string,\n containingFileMode: _ts.SourceFile['impliedNodeFormat']\n ) => _ts.SourceFile['impliedNodeFormat'];\n // TODO do we need these? Which TS version adds them?\n getPatternFromSpec(\n spec: string,\n basePath: string,\n usage: 'files' | 'directories' | 'exclude'\n ): string | undefined;\n getRegularExpressionForWildcard(\n specs: readonly string[] | undefined,\n basePath: string,\n usage: 'files' | 'directories' | 'exclude'\n ): string | undefined;\n // Added in TS 4.7\n getModeForResolutionAtIndex?(\n file: TSInternal.SourceFileImportsList,\n index: number\n ): _ts.SourceFile['impliedNodeFormat'];\n}\n/** @internal */\nexport namespace TSInternal {\n // https://github.com/microsoft/TypeScript/blob/4a34294908bed6701dcba2456ca7ac5eafe0ddff/src/compiler/core.ts#L1906\n export type GetCanonicalFileName = (fileName: string) => string;\n // https://github.com/microsoft/TypeScript/blob/c117c266e09c80e8a06b24a6e94b9d018f5fae6b/src/compiler/commandLineParser.ts#L2041\n export interface ConvertToTSConfigHost {\n getCurrentDirectory(): string;\n useCaseSensitiveFileNames: boolean;\n }\n // Note: is only a partial declaration, TS sources declare other fields\n export interface SourceFileImportsList {\n impliedNodeFormat?: TSCommon.SourceFile['impliedNodeFormat'];\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/ts-internals.d.ts b/node_modules/ts-node/dist/ts-internals.d.ts new file mode 100644 index 0000000..d5903d6 --- /dev/null +++ b/node_modules/ts-node/dist/ts-internals.d.ts @@ -0,0 +1,6 @@ +import type * as _ts from 'typescript'; +export declare function getUseDefineForClassFields(compilerOptions: _ts.CompilerOptions): boolean; +export declare function getEmitScriptTarget(compilerOptions: { + module?: _ts.CompilerOptions['module']; + target?: _ts.CompilerOptions['target']; +}): _ts.ScriptTarget; diff --git a/node_modules/ts-node/dist/ts-internals.js b/node_modules/ts-node/dist/ts-internals.js new file mode 100644 index 0000000..9cd1611 --- /dev/null +++ b/node_modules/ts-node/dist/ts-internals.js @@ -0,0 +1,321 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getEmitScriptTarget = exports.getUseDefineForClassFields = exports.getPatternFromSpec = exports.createTsInternals = void 0; +const path_1 = require("path"); +const util_1 = require("./util"); +/** @internal */ +exports.createTsInternals = (0, util_1.cachedLookup)(createTsInternalsUncached); +/** + * Given a reference to the TS compiler, return some TS internal functions that we + * could not or did not want to grab off the `ts` object. + * These have been copy-pasted from TS's source and tweaked as necessary. + * + * NOTE: This factory returns *only* functions which need a reference to the TS + * compiler. Other functions do not need a reference to the TS compiler so are + * exported directly from this file. + */ +function createTsInternalsUncached(_ts) { + const ts = _ts; + /** + * Copied from: + * https://github.com/microsoft/TypeScript/blob/v4.3.2/src/compiler/commandLineParser.ts#L2821-L2846 + */ + function getExtendsConfigPath(extendedConfig, host, basePath, errors, createDiagnostic) { + extendedConfig = (0, util_1.normalizeSlashes)(extendedConfig); + if (isRootedDiskPath(extendedConfig) || + startsWith(extendedConfig, './') || + startsWith(extendedConfig, '../')) { + let extendedConfigPath = getNormalizedAbsolutePath(extendedConfig, basePath); + if (!host.fileExists(extendedConfigPath) && + !endsWith(extendedConfigPath, ts.Extension.Json)) { + extendedConfigPath = `${extendedConfigPath}.json`; + if (!host.fileExists(extendedConfigPath)) { + errors.push(createDiagnostic(ts.Diagnostics.File_0_not_found, extendedConfig)); + return undefined; + } + } + return extendedConfigPath; + } + // If the path isn't a rooted or relative path, resolve like a module + const tsGte5_3_0 = (0, util_1.versionGteLt)(ts.version, '5.3.0'); + const resolved = ts.nodeModuleNameResolver(extendedConfig, combinePaths(basePath, 'tsconfig.json'), { moduleResolution: ts.ModuleResolutionKind.NodeJs }, host, + /*cache*/ undefined, + /*projectRefs*/ undefined, + /*conditionsOrIsConfigLookup*/ tsGte5_3_0 ? undefined : true, + /*isConfigLookup*/ tsGte5_3_0 ? true : undefined); + if (resolved.resolvedModule) { + return resolved.resolvedModule.resolvedFileName; + } + errors.push(createDiagnostic(ts.Diagnostics.File_0_not_found, extendedConfig)); + return undefined; + } + return { getExtendsConfigPath }; +} +// These functions have alternative implementation to avoid copying too much from TS +function isRootedDiskPath(path) { + return (0, path_1.isAbsolute)(path); +} +function combinePaths(path, ...paths) { + return (0, util_1.normalizeSlashes)((0, path_1.resolve)(path, ...paths.filter((path) => path))); +} +function getNormalizedAbsolutePath(fileName, currentDirectory) { + return (0, util_1.normalizeSlashes)(currentDirectory != null + ? (0, path_1.resolve)(currentDirectory, fileName) + : (0, path_1.resolve)(fileName)); +} +function startsWith(str, prefix) { + return str.lastIndexOf(prefix, 0) === 0; +} +function endsWith(str, suffix) { + const expectedPos = str.length - suffix.length; + return expectedPos >= 0 && str.indexOf(suffix, expectedPos) === expectedPos; +} +// Reserved characters, forces escaping of any non-word (or digit), non-whitespace character. +// It may be inefficient (we could just match (/[-[\]{}()*+?.,\\^$|#\s]/g), but this is future +// proof. +const reservedCharacterPattern = /[^\w\s\/]/g; +/** + * @internal + * See also: getRegularExpressionForWildcard, which seems to do almost the same thing + */ +function getPatternFromSpec(spec, basePath) { + const pattern = spec && getSubPatternFromSpec(spec, basePath, excludeMatcher); + return pattern && `^(${pattern})${'($|/)'}`; +} +exports.getPatternFromSpec = getPatternFromSpec; +function getSubPatternFromSpec(spec, basePath, { singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter, }) { + let subpattern = ''; + let hasWrittenComponent = false; + const components = getNormalizedPathComponents(spec, basePath); + const lastComponent = last(components); + // getNormalizedPathComponents includes the separator for the root component. + // We need to remove to create our regex correctly. + components[0] = removeTrailingDirectorySeparator(components[0]); + if (isImplicitGlob(lastComponent)) { + components.push('**', '*'); + } + let optionalCount = 0; + for (let component of components) { + if (component === '**') { + subpattern += doubleAsteriskRegexFragment; + } + else { + if (hasWrittenComponent) { + subpattern += directorySeparator; + } + subpattern += component.replace(reservedCharacterPattern, replaceWildcardCharacter); + } + hasWrittenComponent = true; + } + while (optionalCount > 0) { + subpattern += ')?'; + optionalCount--; + } + return subpattern; +} +const directoriesMatcher = { + singleAsteriskRegexFragment: '[^/]*', + /** + * Regex for the ** wildcard. Matches any num of subdirectories. When used for including + * files or directories, does not match subdirectories that start with a . character + */ + doubleAsteriskRegexFragment: `(/[^/.][^/]*)*?`, + replaceWildcardCharacter: (match) => replaceWildcardCharacter(match, directoriesMatcher.singleAsteriskRegexFragment), +}; +const excludeMatcher = { + singleAsteriskRegexFragment: '[^/]*', + doubleAsteriskRegexFragment: '(/.+?)?', + replaceWildcardCharacter: (match) => replaceWildcardCharacter(match, excludeMatcher.singleAsteriskRegexFragment), +}; +function getNormalizedPathComponents(path, currentDirectory) { + return reducePathComponents(getPathComponents(path, currentDirectory)); +} +function getPathComponents(path, currentDirectory = '') { + path = combinePaths(currentDirectory, path); + return pathComponents(path, getRootLength(path)); +} +function reducePathComponents(components) { + if (!some(components)) + return []; + const reduced = [components[0]]; + for (let i = 1; i < components.length; i++) { + const component = components[i]; + if (!component) + continue; + if (component === '.') + continue; + if (component === '..') { + if (reduced.length > 1) { + if (reduced[reduced.length - 1] !== '..') { + reduced.pop(); + continue; + } + } + else if (reduced[0]) + continue; + } + reduced.push(component); + } + return reduced; +} +function getRootLength(path) { + const rootLength = getEncodedRootLength(path); + return rootLength < 0 ? ~rootLength : rootLength; +} +function getEncodedRootLength(path) { + if (!path) + return 0; + const ch0 = path.charCodeAt(0); + // POSIX or UNC + if (ch0 === 47 /* CharacterCodes.slash */ || ch0 === 92 /* CharacterCodes.backslash */) { + if (path.charCodeAt(1) !== ch0) + return 1; // POSIX: "/" (or non-normalized "\") + const p1 = path.indexOf(ch0 === 47 /* CharacterCodes.slash */ ? directorySeparator : altDirectorySeparator, 2); + if (p1 < 0) + return path.length; // UNC: "//server" or "\\server" + return p1 + 1; // UNC: "//server/" or "\\server\" + } + // DOS + if (isVolumeCharacter(ch0) && path.charCodeAt(1) === 58 /* CharacterCodes.colon */) { + const ch2 = path.charCodeAt(2); + if (ch2 === 47 /* CharacterCodes.slash */ || ch2 === 92 /* CharacterCodes.backslash */) + return 3; // DOS: "c:/" or "c:\" + if (path.length === 2) + return 2; // DOS: "c:" (but not "c:d") + } + // URL + const schemeEnd = path.indexOf(urlSchemeSeparator); + if (schemeEnd !== -1) { + const authorityStart = schemeEnd + urlSchemeSeparator.length; + const authorityEnd = path.indexOf(directorySeparator, authorityStart); + if (authorityEnd !== -1) { + // URL: "file:///", "file://server/", "file://server/path" + // For local "file" URLs, include the leading DOS volume (if present). + // Per https://www.ietf.org/rfc/rfc1738.txt, a host of "" or "localhost" is a + // special case interpreted as "the machine from which the URL is being interpreted". + const scheme = path.slice(0, schemeEnd); + const authority = path.slice(authorityStart, authorityEnd); + if (scheme === 'file' && + (authority === '' || authority === 'localhost') && + isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) { + const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2); + if (volumeSeparatorEnd !== -1) { + if (path.charCodeAt(volumeSeparatorEnd) === 47 /* CharacterCodes.slash */) { + // URL: "file:///c:/", "file://localhost/c:/", "file:///c%3a/", "file://localhost/c%3a/" + return ~(volumeSeparatorEnd + 1); + } + if (volumeSeparatorEnd === path.length) { + // URL: "file:///c:", "file://localhost/c:", "file:///c$3a", "file://localhost/c%3a" + // but not "file:///c:d" or "file:///c%3ad" + return ~volumeSeparatorEnd; + } + } + } + return ~(authorityEnd + 1); // URL: "file://server/", "http://server/" + } + return ~path.length; // URL: "file://server", "http://server" + } + // relative + return 0; +} +function ensureTrailingDirectorySeparator(path) { + if (!hasTrailingDirectorySeparator(path)) { + return path + directorySeparator; + } + return path; +} +function hasTrailingDirectorySeparator(path) { + return (path.length > 0 && isAnyDirectorySeparator(path.charCodeAt(path.length - 1))); +} +function isAnyDirectorySeparator(charCode) { + return (charCode === 47 /* CharacterCodes.slash */ || charCode === 92 /* CharacterCodes.backslash */); +} +function removeTrailingDirectorySeparator(path) { + if (hasTrailingDirectorySeparator(path)) { + return path.substr(0, path.length - 1); + } + return path; +} +const directorySeparator = '/'; +const altDirectorySeparator = '\\'; +const urlSchemeSeparator = '://'; +function isVolumeCharacter(charCode) { + return ((charCode >= 97 /* CharacterCodes.a */ && charCode <= 122 /* CharacterCodes.z */) || + (charCode >= 65 /* CharacterCodes.A */ && charCode <= 90 /* CharacterCodes.Z */)); +} +function getFileUrlVolumeSeparatorEnd(url, start) { + const ch0 = url.charCodeAt(start); + if (ch0 === 58 /* CharacterCodes.colon */) + return start + 1; + if (ch0 === 37 /* CharacterCodes.percent */ && + url.charCodeAt(start + 1) === 51 /* CharacterCodes._3 */) { + const ch2 = url.charCodeAt(start + 2); + if (ch2 === 97 /* CharacterCodes.a */ || ch2 === 65 /* CharacterCodes.A */) + return start + 3; + } + return -1; +} +function some(array, predicate) { + if (array) { + if (predicate) { + for (const v of array) { + if (predicate(v)) { + return true; + } + } + } + else { + return array.length > 0; + } + } + return false; +} +function pathComponents(path, rootLength) { + const root = path.substring(0, rootLength); + const rest = path.substring(rootLength).split(directorySeparator); + if (rest.length && !lastOrUndefined(rest)) + rest.pop(); + return [root, ...rest]; +} +function lastOrUndefined(array) { + return array.length === 0 ? undefined : array[array.length - 1]; +} +function last(array) { + // Debug.assert(array.length !== 0); + return array[array.length - 1]; +} +function replaceWildcardCharacter(match, singleAsteriskRegexFragment) { + return match === '*' + ? singleAsteriskRegexFragment + : match === '?' + ? '[^/]' + : '\\' + match; +} +/** + * An "includes" path "foo" is implicitly a glob "foo/** /*" (without the space) if its last component has no extension, + * and does not contain any glob characters itself. + */ +function isImplicitGlob(lastPathComponent) { + return !/[.*?]/.test(lastPathComponent); +} +const ts_ScriptTarget_ES5 = 1; +const ts_ScriptTarget_ES2022 = 9; +const ts_ScriptTarget_ESNext = 99; +const ts_ModuleKind_Node16 = 100; +const ts_ModuleKind_NodeNext = 199; +// https://github.com/microsoft/TypeScript/blob/fc418a2e611c88cf9afa0115ff73490b2397d311/src/compiler/utilities.ts#L8761 +function getUseDefineForClassFields(compilerOptions) { + return compilerOptions.useDefineForClassFields === undefined + ? getEmitScriptTarget(compilerOptions) >= ts_ScriptTarget_ES2022 + : compilerOptions.useDefineForClassFields; +} +exports.getUseDefineForClassFields = getUseDefineForClassFields; +// https://github.com/microsoft/TypeScript/blob/fc418a2e611c88cf9afa0115ff73490b2397d311/src/compiler/utilities.ts#L8556 +function getEmitScriptTarget(compilerOptions) { + var _a; + return ((_a = compilerOptions.target) !== null && _a !== void 0 ? _a : ((compilerOptions.module === ts_ModuleKind_Node16 && ts_ScriptTarget_ES2022) || + (compilerOptions.module === ts_ModuleKind_NodeNext && ts_ScriptTarget_ESNext) || + ts_ScriptTarget_ES5)); +} +exports.getEmitScriptTarget = getEmitScriptTarget; +//# sourceMappingURL=ts-internals.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/ts-internals.js.map b/node_modules/ts-node/dist/ts-internals.js.map new file mode 100644 index 0000000..5a4d2d8 --- /dev/null +++ b/node_modules/ts-node/dist/ts-internals.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ts-internals.js","sourceRoot":"","sources":["../src/ts-internals.ts"],"names":[],"mappings":";;;AAAA,+BAA2C;AAC3C,iCAAsE;AAItE,gBAAgB;AACH,QAAA,iBAAiB,GAAG,IAAA,mBAAY,EAAC,yBAAyB,CAAC,CAAC;AACzE;;;;;;;;GAQG;AACH,SAAS,yBAAyB,CAAC,GAAa;IAC9C,MAAM,EAAE,GAAG,GAA4B,CAAC;IACxC;;;OAGG;IACH,SAAS,oBAAoB,CAC3B,cAAsB,EACtB,IAAyB,EACzB,QAAgB,EAChB,MAAgC,EAChC,gBAGmB;QAEnB,cAAc,GAAG,IAAA,uBAAgB,EAAC,cAAc,CAAC,CAAC;QAClD,IACE,gBAAgB,CAAC,cAAc,CAAC;YAChC,UAAU,CAAC,cAAc,EAAE,IAAI,CAAC;YAChC,UAAU,CAAC,cAAc,EAAE,KAAK,CAAC,EACjC;YACA,IAAI,kBAAkB,GAAG,yBAAyB,CAChD,cAAc,EACd,QAAQ,CACT,CAAC;YACF,IACE,CAAC,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC;gBACpC,CAAC,QAAQ,CAAC,kBAAkB,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAChD;gBACA,kBAAkB,GAAG,GAAG,kBAAkB,OAAO,CAAC;gBAClD,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC,EAAE;oBACxC,MAAM,CAAC,IAAI,CACT,gBAAgB,CAAC,EAAE,CAAC,WAAW,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAClE,CAAC;oBACF,OAAO,SAAS,CAAC;iBAClB;aACF;YACD,OAAO,kBAAkB,CAAC;SAC3B;QACD,qEAAqE;QACrE,MAAM,UAAU,GAAG,IAAA,mBAAY,EAAC,EAAE,C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AG,GAAG,CAAC;AACnC,wHAAwH;AACxH,SAAgB,0BAA0B,CAAC,eAAoC;IAC7E,OAAO,eAAe,CAAC,uBAAuB,KAAK,SAAS;QAC1D,CAAC,CAAC,mBAAmB,CAAC,eAAe,CAAC,IAAI,sBAAsB;QAChE,CAAC,CAAC,eAAe,CAAC,uBAAuB,CAAC;AAC9C,CAAC;AAJD,gEAIC;AAED,wHAAwH;AACxH,SAAgB,mBAAmB,CAAC,eAGnC;;IACC,OAAO,CACL,MAAA,eAAe,CAAC,MAAM,mCACtB,CAAC,CAAC,eAAe,CAAC,MAAM,KAAK,oBAAoB,IAAI,sBAAsB,CAAC;QAC1E,CAAC,eAAe,CAAC,MAAM,KAAK,sBAAsB,IAAI,sBAAsB,CAAC;QAC7E,mBAAmB,CAAC,CACvB,CAAC;AACJ,CAAC;AAVD,kDAUC","sourcesContent":["import { isAbsolute, resolve } from 'path';\nimport { cachedLookup, normalizeSlashes, versionGteLt } from './util';\nimport type * as _ts from 'typescript';\nimport type { TSCommon, TSInternal } from './ts-compiler-types';\n\n/** @internal */\nexport const createTsInternals = cachedLookup(createTsInternalsUncached);\n/**\n * Given a reference to the TS compiler, return some TS internal functions that we\n * could not or did not want to grab off the `ts` object.\n * These have been copy-pasted from TS's source and tweaked as necessary.\n *\n * NOTE: This factory returns *only* functions which need a reference to the TS\n * compiler. Other functions do not need a reference to the TS compiler so are\n * exported directly from this file.\n */\nfunction createTsInternalsUncached(_ts: TSCommon) {\n const ts = _ts as TSCommon & TSInternal;\n /**\n * Copied from:\n * https://github.com/microsoft/TypeScript/blob/v4.3.2/src/compiler/commandLineParser.ts#L2821-L2846\n */\n function getExtendsConfigPath(\n extendedConfig: string,\n host: _ts.ParseConfigHost,\n basePath: string,\n errors: _ts.Push<_ts.Diagnostic>,\n createDiagnostic: (\n message: _ts.DiagnosticMessage,\n arg1?: string\n ) => _ts.Diagnostic\n ) {\n extendedConfig = normalizeSlashes(extendedConfig);\n if (\n isRootedDiskPath(extendedConfig) ||\n startsWith(extendedConfig, './') ||\n startsWith(extendedConfig, '../')\n ) {\n let extendedConfigPath = getNormalizedAbsolutePath(\n extendedConfig,\n basePath\n );\n if (\n !host.fileExists(extendedConfigPath) &&\n !endsWith(extendedConfigPath, ts.Extension.Json)\n ) {\n extendedConfigPath = `${extendedConfigPath}.json`;\n if (!host.fileExists(extendedConfigPath)) {\n errors.push(\n createDiagnostic(ts.Diagnostics.File_0_not_found, extendedConfig)\n );\n return undefined;\n }\n }\n return extendedConfigPath;\n }\n // If the path isn't a rooted or relative path, resolve like a module\n const tsGte5_3_0 = versionGteLt(ts.version, '5.3.0');\n const resolved = ts.nodeModuleNameResolver(\n extendedConfig,\n combinePaths(basePath, 'tsconfig.json'),\n { moduleResolution: ts.ModuleResolutionKind.NodeJs },\n host,\n /*cache*/ undefined,\n /*projectRefs*/ undefined,\n /*conditionsOrIsConfigLookup*/ tsGte5_3_0 ? undefined : true,\n /*isConfigLookup*/ tsGte5_3_0 ? true : undefined\n );\n if (resolved.resolvedModule) {\n return resolved.resolvedModule.resolvedFileName;\n }\n errors.push(\n createDiagnostic(ts.Diagnostics.File_0_not_found, extendedConfig)\n );\n return undefined;\n }\n\n return { getExtendsConfigPath };\n}\n\n// These functions have alternative implementation to avoid copying too much from TS\nfunction isRootedDiskPath(path: string) {\n return isAbsolute(path);\n}\nfunction combinePaths(path: string, ...paths: (string | undefined)[]): string {\n return normalizeSlashes(\n resolve(path, ...(paths.filter((path) => path) as string[]))\n );\n}\nfunction getNormalizedAbsolutePath(\n fileName: string,\n currentDirectory: string | undefined\n) {\n return normalizeSlashes(\n currentDirectory != null\n ? resolve(currentDirectory!, fileName)\n : resolve(fileName)\n );\n}\n\nfunction startsWith(str: string, prefix: string): boolean {\n return str.lastIndexOf(prefix, 0) === 0;\n}\n\nfunction endsWith(str: string, suffix: string): boolean {\n const expectedPos = str.length - suffix.length;\n return expectedPos >= 0 && str.indexOf(suffix, expectedPos) === expectedPos;\n}\n// Reserved characters, forces escaping of any non-word (or digit), non-whitespace character.\n// It may be inefficient (we could just match (/[-[\\]{}()*+?.,\\\\^$|#\\s]/g), but this is future\n// proof.\nconst reservedCharacterPattern = /[^\\w\\s\\/]/g;\n\n/**\n * @internal\n * See also: getRegularExpressionForWildcard, which seems to do almost the same thing\n */\nexport function getPatternFromSpec(spec: string, basePath: string) {\n const pattern = spec && getSubPatternFromSpec(spec, basePath, excludeMatcher);\n return pattern && `^(${pattern})${'($|/)'}`;\n}\nfunction getSubPatternFromSpec(\n spec: string,\n basePath: string,\n {\n singleAsteriskRegexFragment,\n doubleAsteriskRegexFragment,\n replaceWildcardCharacter,\n }: WildcardMatcher\n): string {\n let subpattern = '';\n let hasWrittenComponent = false;\n const components = getNormalizedPathComponents(spec, basePath);\n const lastComponent = last(components);\n\n // getNormalizedPathComponents includes the separator for the root component.\n // We need to remove to create our regex correctly.\n components[0] = removeTrailingDirectorySeparator(components[0]);\n\n if (isImplicitGlob(lastComponent)) {\n components.push('**', '*');\n }\n\n let optionalCount = 0;\n for (let component of components) {\n if (component === '**') {\n subpattern += doubleAsteriskRegexFragment;\n } else {\n if (hasWrittenComponent) {\n subpattern += directorySeparator;\n }\n subpattern += component.replace(\n reservedCharacterPattern,\n replaceWildcardCharacter\n );\n }\n\n hasWrittenComponent = true;\n }\n\n while (optionalCount > 0) {\n subpattern += ')?';\n optionalCount--;\n }\n\n return subpattern;\n}\ninterface WildcardMatcher {\n singleAsteriskRegexFragment: string;\n doubleAsteriskRegexFragment: string;\n replaceWildcardCharacter: (match: string) => string;\n}\nconst directoriesMatcher: WildcardMatcher = {\n singleAsteriskRegexFragment: '[^/]*',\n /**\n * Regex for the ** wildcard. Matches any num of subdirectories. When used for including\n * files or directories, does not match subdirectories that start with a . character\n */\n doubleAsteriskRegexFragment: `(/[^/.][^/]*)*?`,\n replaceWildcardCharacter: (match) =>\n replaceWildcardCharacter(\n match,\n directoriesMatcher.singleAsteriskRegexFragment\n ),\n};\nconst excludeMatcher: WildcardMatcher = {\n singleAsteriskRegexFragment: '[^/]*',\n doubleAsteriskRegexFragment: '(/.+?)?',\n replaceWildcardCharacter: (match) =>\n replaceWildcardCharacter(match, excludeMatcher.singleAsteriskRegexFragment),\n};\nfunction getNormalizedPathComponents(\n path: string,\n currentDirectory: string | undefined\n) {\n return reducePathComponents(getPathComponents(path, currentDirectory));\n}\nfunction getPathComponents(path: string, currentDirectory = '') {\n path = combinePaths(currentDirectory, path);\n return pathComponents(path, getRootLength(path));\n}\nfunction reducePathComponents(components: readonly string[]) {\n if (!some(components)) return [];\n const reduced = [components[0]];\n for (let i = 1; i < components.length; i++) {\n const component = components[i];\n if (!component) continue;\n if (component === '.') continue;\n if (component === '..') {\n if (reduced.length > 1) {\n if (reduced[reduced.length - 1] !== '..') {\n reduced.pop();\n continue;\n }\n } else if (reduced[0]) continue;\n }\n reduced.push(component);\n }\n return reduced;\n}\nfunction getRootLength(path: string) {\n const rootLength = getEncodedRootLength(path);\n return rootLength < 0 ? ~rootLength : rootLength;\n}\nfunction getEncodedRootLength(path: string): number {\n if (!path) return 0;\n const ch0 = path.charCodeAt(0);\n\n // POSIX or UNC\n if (ch0 === CharacterCodes.slash || ch0 === CharacterCodes.backslash) {\n if (path.charCodeAt(1) !== ch0) return 1; // POSIX: \"/\" (or non-normalized \"\\\")\n\n const p1 = path.indexOf(\n ch0 === CharacterCodes.slash ? directorySeparator : altDirectorySeparator,\n 2\n );\n if (p1 < 0) return path.length; // UNC: \"//server\" or \"\\\\server\"\n\n return p1 + 1; // UNC: \"//server/\" or \"\\\\server\\\"\n }\n\n // DOS\n if (isVolumeCharacter(ch0) && path.charCodeAt(1) === CharacterCodes.colon) {\n const ch2 = path.charCodeAt(2);\n if (ch2 === CharacterCodes.slash || ch2 === CharacterCodes.backslash)\n return 3; // DOS: \"c:/\" or \"c:\\\"\n if (path.length === 2) return 2; // DOS: \"c:\" (but not \"c:d\")\n }\n\n // URL\n const schemeEnd = path.indexOf(urlSchemeSeparator);\n if (schemeEnd !== -1) {\n const authorityStart = schemeEnd + urlSchemeSeparator.length;\n const authorityEnd = path.indexOf(directorySeparator, authorityStart);\n if (authorityEnd !== -1) {\n // URL: \"file:///\", \"file://server/\", \"file://server/path\"\n // For local \"file\" URLs, include the leading DOS volume (if present).\n // Per https://www.ietf.org/rfc/rfc1738.txt, a host of \"\" or \"localhost\" is a\n // special case interpreted as \"the machine from which the URL is being interpreted\".\n const scheme = path.slice(0, schemeEnd);\n const authority = path.slice(authorityStart, authorityEnd);\n if (\n scheme === 'file' &&\n (authority === '' || authority === 'localhost') &&\n isVolumeCharacter(path.charCodeAt(authorityEnd + 1))\n ) {\n const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(\n path,\n authorityEnd + 2\n );\n if (volumeSeparatorEnd !== -1) {\n if (path.charCodeAt(volumeSeparatorEnd) === CharacterCodes.slash) {\n // URL: \"file:///c:/\", \"file://localhost/c:/\", \"file:///c%3a/\", \"file://localhost/c%3a/\"\n return ~(volumeSeparatorEnd + 1);\n }\n if (volumeSeparatorEnd === path.length) {\n // URL: \"file:///c:\", \"file://localhost/c:\", \"file:///c$3a\", \"file://localhost/c%3a\"\n // but not \"file:///c:d\" or \"file:///c%3ad\"\n return ~volumeSeparatorEnd;\n }\n }\n }\n return ~(authorityEnd + 1); // URL: \"file://server/\", \"http://server/\"\n }\n return ~path.length; // URL: \"file://server\", \"http://server\"\n }\n\n // relative\n return 0;\n}\nfunction ensureTrailingDirectorySeparator(path: string) {\n if (!hasTrailingDirectorySeparator(path)) {\n return path + directorySeparator;\n }\n\n return path;\n}\nfunction hasTrailingDirectorySeparator(path: string) {\n return (\n path.length > 0 && isAnyDirectorySeparator(path.charCodeAt(path.length - 1))\n );\n}\nfunction isAnyDirectorySeparator(charCode: number): boolean {\n return (\n charCode === CharacterCodes.slash || charCode === CharacterCodes.backslash\n );\n}\nfunction removeTrailingDirectorySeparator(path: string) {\n if (hasTrailingDirectorySeparator(path)) {\n return path.substr(0, path.length - 1);\n }\n\n return path;\n}\nconst directorySeparator = '/';\nconst altDirectorySeparator = '\\\\';\nconst urlSchemeSeparator = '://';\nfunction isVolumeCharacter(charCode: number) {\n return (\n (charCode >= CharacterCodes.a && charCode <= CharacterCodes.z) ||\n (charCode >= CharacterCodes.A && charCode <= CharacterCodes.Z)\n );\n}\nfunction getFileUrlVolumeSeparatorEnd(url: string, start: number) {\n const ch0 = url.charCodeAt(start);\n if (ch0 === CharacterCodes.colon) return start + 1;\n if (\n ch0 === CharacterCodes.percent &&\n url.charCodeAt(start + 1) === CharacterCodes._3\n ) {\n const ch2 = url.charCodeAt(start + 2);\n if (ch2 === CharacterCodes.a || ch2 === CharacterCodes.A) return start + 3;\n }\n return -1;\n}\nfunction some(array: readonly T[] | undefined): array is readonly T[];\nfunction some(\n array: readonly T[] | undefined,\n predicate: (value: T) => boolean\n): boolean;\nfunction some(\n array: readonly T[] | undefined,\n predicate?: (value: T) => boolean\n): boolean {\n if (array) {\n if (predicate) {\n for (const v of array) {\n if (predicate(v)) {\n return true;\n }\n }\n } else {\n return array.length > 0;\n }\n }\n return false;\n}\n/* @internal */\nconst enum CharacterCodes {\n _3 = 0x33,\n a = 0x61,\n z = 0x7a,\n A = 0x41,\n Z = 0x5a,\n asterisk = 0x2a, // *\n backslash = 0x5c, // \\\n colon = 0x3a, // :\n percent = 0x25, // %\n question = 0x3f, // ?\n slash = 0x2f, // /\n}\nfunction pathComponents(path: string, rootLength: number) {\n const root = path.substring(0, rootLength);\n const rest = path.substring(rootLength).split(directorySeparator);\n if (rest.length && !lastOrUndefined(rest)) rest.pop();\n return [root, ...rest];\n}\nfunction lastOrUndefined(array: readonly T[]): T | undefined {\n return array.length === 0 ? undefined : array[array.length - 1];\n}\nfunction last(array: readonly T[]): T {\n // Debug.assert(array.length !== 0);\n return array[array.length - 1];\n}\nfunction replaceWildcardCharacter(\n match: string,\n singleAsteriskRegexFragment: string\n) {\n return match === '*'\n ? singleAsteriskRegexFragment\n : match === '?'\n ? '[^/]'\n : '\\\\' + match;\n}\n/**\n * An \"includes\" path \"foo\" is implicitly a glob \"foo/** /*\" (without the space) if its last component has no extension,\n * and does not contain any glob characters itself.\n */\nfunction isImplicitGlob(lastPathComponent: string): boolean {\n return !/[.*?]/.test(lastPathComponent);\n}\n\nconst ts_ScriptTarget_ES5 = 1;\nconst ts_ScriptTarget_ES2022 = 9;\nconst ts_ScriptTarget_ESNext = 99;\nconst ts_ModuleKind_Node16 = 100;\nconst ts_ModuleKind_NodeNext = 199;\n// https://github.com/microsoft/TypeScript/blob/fc418a2e611c88cf9afa0115ff73490b2397d311/src/compiler/utilities.ts#L8761\nexport function getUseDefineForClassFields(compilerOptions: _ts.CompilerOptions): boolean {\n return compilerOptions.useDefineForClassFields === undefined\n ? getEmitScriptTarget(compilerOptions) >= ts_ScriptTarget_ES2022\n : compilerOptions.useDefineForClassFields;\n}\n\n// https://github.com/microsoft/TypeScript/blob/fc418a2e611c88cf9afa0115ff73490b2397d311/src/compiler/utilities.ts#L8556\nexport function getEmitScriptTarget(compilerOptions: {\n module?: _ts.CompilerOptions['module'];\n target?: _ts.CompilerOptions['target'];\n}): _ts.ScriptTarget {\n return (\n compilerOptions.target ??\n ((compilerOptions.module === ts_ModuleKind_Node16 && ts_ScriptTarget_ES2022) ||\n (compilerOptions.module === ts_ModuleKind_NodeNext && ts_ScriptTarget_ESNext) ||\n ts_ScriptTarget_ES5)\n );\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/ts-transpile-module.d.ts b/node_modules/ts-node/dist/ts-transpile-module.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/ts-node/dist/ts-transpile-module.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/ts-node/dist/ts-transpile-module.js b/node_modules/ts-node/dist/ts-transpile-module.js new file mode 100644 index 0000000..5002855 --- /dev/null +++ b/node_modules/ts-node/dist/ts-transpile-module.js @@ -0,0 +1,100 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createTsTranspileModule = void 0; +/** @internal */ +function createTsTranspileModule(ts, transpileOptions) { + const { createProgram, createSourceFile, getDefaultCompilerOptions, getImpliedNodeFormatForFile, fixupCompilerOptions, transpileOptionValueCompilerOptions, getNewLineCharacter, fileExtensionIs, normalizePath, Debug, toPath, getSetExternalModuleIndicator, getEntries, addRange, hasProperty, getEmitScriptTarget, getDirectoryPath, } = ts; + const compilerOptionsDiagnostics = []; + const options = transpileOptions.compilerOptions + ? fixupCompilerOptions(transpileOptions.compilerOptions, compilerOptionsDiagnostics) + : {}; + // mix in default options + const defaultOptions = getDefaultCompilerOptions(); + for (const key in defaultOptions) { + if (hasProperty(defaultOptions, key) && options[key] === undefined) { + options[key] = defaultOptions[key]; + } + } + for (const option of transpileOptionValueCompilerOptions) { + options[option.name] = option.transpileOptionValue; + } + // transpileModule does not write anything to disk so there is no need to verify that there are no conflicts between input and output paths. + options.suppressOutputPathCheck = true; + // Filename can be non-ts file. + options.allowNonTsExtensions = true; + const newLine = getNewLineCharacter(options); + // Create a compilerHost object to allow the compiler to read and write files + const compilerHost = { + getSourceFile: (fileName) => fileName === normalizePath(inputFileName) ? sourceFile : undefined, + writeFile: (name, text) => { + if (fileExtensionIs(name, '.map')) { + Debug.assertEqual(sourceMapText, undefined, 'Unexpected multiple source map outputs, file:', name); + sourceMapText = text; + } + else { + Debug.assertEqual(outputText, undefined, 'Unexpected multiple outputs, file:', name); + outputText = text; + } + }, + getDefaultLibFileName: () => 'lib.d.ts', + useCaseSensitiveFileNames: () => true, + getCanonicalFileName: (fileName) => fileName, + getCurrentDirectory: () => '', + getNewLine: () => newLine, + fileExists: (fileName) => fileName === inputFileName || fileName === packageJsonFileName, + readFile: (fileName) => fileName === packageJsonFileName ? `{"type": "${_packageJsonType}"}` : '', + directoryExists: () => true, + getDirectories: () => [], + }; + let inputFileName; + let packageJsonFileName; + let _packageJsonType; + let sourceFile; + let outputText; + let sourceMapText; + return transpileModule; + function transpileModule(input, transpileOptions2, packageJsonType = 'commonjs') { + // if jsx is specified then treat file as .tsx + inputFileName = + transpileOptions2.fileName || + (transpileOptions.compilerOptions && transpileOptions.compilerOptions.jsx + ? 'module.tsx' + : 'module.ts'); + packageJsonFileName = getDirectoryPath(inputFileName) + '/package.json'; + _packageJsonType = packageJsonType; + sourceFile = createSourceFile(inputFileName, input, { + languageVersion: getEmitScriptTarget(options), + impliedNodeFormat: getImpliedNodeFormatForFile(toPath(inputFileName, '', compilerHost.getCanonicalFileName), + /*cache*/ undefined, compilerHost, options), + setExternalModuleIndicator: getSetExternalModuleIndicator(options), + }); + if (transpileOptions2.moduleName) { + sourceFile.moduleName = transpileOptions2.moduleName; + } + if (transpileOptions2.renamedDependencies) { + sourceFile.renamedDependencies = new Map(getEntries(transpileOptions2.renamedDependencies)); + } + // Output + outputText = undefined; + sourceMapText = undefined; + const program = createProgram([inputFileName], options, compilerHost); + const diagnostics = compilerOptionsDiagnostics.slice(); + if (transpileOptions.reportDiagnostics) { + addRange( + /*to*/ diagnostics, + /*from*/ program.getSyntacticDiagnostics(sourceFile)); + addRange(/*to*/ diagnostics, /*from*/ program.getOptionsDiagnostics()); + } + // Emit + program.emit( + /*targetSourceFile*/ undefined, + /*writeFile*/ undefined, + /*cancellationToken*/ undefined, + /*emitOnlyDtsFiles*/ undefined, transpileOptions.transformers); + if (outputText === undefined) + return Debug.fail('Output generation failed'); + return { outputText, diagnostics, sourceMapText }; + } +} +exports.createTsTranspileModule = createTsTranspileModule; +//# sourceMappingURL=ts-transpile-module.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/ts-transpile-module.js.map b/node_modules/ts-node/dist/ts-transpile-module.js.map new file mode 100644 index 0000000..f2b69ad --- /dev/null +++ b/node_modules/ts-node/dist/ts-transpile-module.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ts-transpile-module.js","sourceRoot":"","sources":["../src/ts-transpile-module.ts"],"names":[],"mappings":";;;AAUA,gBAAgB;AAChB,SAAgB,uBAAuB,CACrC,EAAY,EACZ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C,CAAC;SACxE;QACD,OAAO;QACP,OAAO,CAAC,IAAI;QACV,oBAAoB,CAAC,SAAS;QAC9B,aAAa,CAAC,SAAS;QACvB,qBAAqB,CAAC,SAAS;QAC/B,oBAAoB,CAAC,SAAS,EAC9B,gBAAgB,CAAC,YAAY,CAC9B,CAAC;QAEF,IAAI,UAAU,KAAK,SAAS;YAAE,OAAO,KAAK,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;QAE5E,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC;IACpD,CAAC;AACH,CAAC;AArKD,0DAqKC","sourcesContent":["import type {\n CompilerHost,\n CompilerOptions,\n Diagnostic,\n SourceFile,\n TranspileOptions,\n TranspileOutput,\n} from 'typescript';\nimport type { TSCommon } from './ts-compiler-types';\n\n/** @internal */\nexport function createTsTranspileModule(\n ts: TSCommon,\n transpileOptions: Pick<\n TranspileOptions,\n 'compilerOptions' | 'reportDiagnostics' | 'transformers'\n >\n) {\n const {\n createProgram,\n createSourceFile,\n getDefaultCompilerOptions,\n getImpliedNodeFormatForFile,\n fixupCompilerOptions,\n transpileOptionValueCompilerOptions,\n getNewLineCharacter,\n fileExtensionIs,\n normalizePath,\n Debug,\n toPath,\n getSetExternalModuleIndicator,\n getEntries,\n addRange,\n hasProperty,\n getEmitScriptTarget,\n getDirectoryPath,\n } = ts as any;\n\n const compilerOptionsDiagnostics: Diagnostic[] = [];\n\n const options: CompilerOptions = transpileOptions.compilerOptions\n ? fixupCompilerOptions(\n transpileOptions.compilerOptions,\n compilerOptionsDiagnostics\n )\n : {};\n\n // mix in default options\n const defaultOptions = getDefaultCompilerOptions();\n for (const key in defaultOptions) {\n if (hasProperty(defaultOptions, key) && options[key] === undefined) {\n options[key] = defaultOptions[key];\n }\n }\n\n for (const option of transpileOptionValueCompilerOptions) {\n options[option.name] = option.transpileOptionValue;\n }\n\n // transpileModule does not write anything to disk so there is no need to verify that there are no conflicts between input and output paths.\n options.suppressOutputPathCheck = true;\n\n // Filename can be non-ts file.\n options.allowNonTsExtensions = true;\n\n const newLine = getNewLineCharacter(options);\n // Create a compilerHost object to allow the compiler to read and write files\n const compilerHost: CompilerHost = {\n getSourceFile: (fileName) =>\n fileName === normalizePath(inputFileName) ? sourceFile : undefined,\n writeFile: (name, text) => {\n if (fileExtensionIs(name, '.map')) {\n Debug.assertEqual(\n sourceMapText,\n undefined,\n 'Unexpected multiple source map outputs, file:',\n name\n );\n sourceMapText = text;\n } else {\n Debug.assertEqual(\n outputText,\n undefined,\n 'Unexpected multiple outputs, file:',\n name\n );\n outputText = text;\n }\n },\n getDefaultLibFileName: () => 'lib.d.ts',\n useCaseSensitiveFileNames: () => true,\n getCanonicalFileName: (fileName) => fileName,\n getCurrentDirectory: () => '',\n getNewLine: () => newLine,\n fileExists: (fileName): boolean =>\n fileName === inputFileName || fileName === packageJsonFileName,\n readFile: (fileName) =>\n fileName === packageJsonFileName ? `{\"type\": \"${_packageJsonType}\"}` : '',\n directoryExists: () => true,\n getDirectories: () => [],\n };\n\n let inputFileName: string;\n let packageJsonFileName: string;\n let _packageJsonType: 'module' | 'commonjs';\n let sourceFile: SourceFile;\n let outputText: string | undefined;\n let sourceMapText: string | undefined;\n\n return transpileModule;\n\n function transpileModule(\n input: string,\n transpileOptions2: Pick<\n TranspileOptions,\n 'fileName' | 'moduleName' | 'renamedDependencies'\n >,\n packageJsonType: 'module' | 'commonjs' = 'commonjs'\n ): TranspileOutput {\n // if jsx is specified then treat file as .tsx\n inputFileName =\n transpileOptions2.fileName ||\n (transpileOptions.compilerOptions && transpileOptions.compilerOptions.jsx\n ? 'module.tsx'\n : 'module.ts');\n packageJsonFileName = getDirectoryPath(inputFileName) + '/package.json';\n _packageJsonType = packageJsonType;\n\n sourceFile = createSourceFile(inputFileName, input, {\n languageVersion: getEmitScriptTarget(options),\n impliedNodeFormat: getImpliedNodeFormatForFile(\n toPath(inputFileName, '', compilerHost.getCanonicalFileName),\n /*cache*/ undefined,\n compilerHost,\n options\n ),\n setExternalModuleIndicator: getSetExternalModuleIndicator(options),\n });\n if (transpileOptions2.moduleName) {\n sourceFile.moduleName = transpileOptions2.moduleName;\n }\n\n if (transpileOptions2.renamedDependencies) {\n (sourceFile as any).renamedDependencies = new Map(\n getEntries(transpileOptions2.renamedDependencies)\n );\n }\n\n // Output\n outputText = undefined;\n sourceMapText = undefined;\n\n const program = createProgram([inputFileName], options, compilerHost);\n\n const diagnostics = compilerOptionsDiagnostics.slice();\n\n if (transpileOptions.reportDiagnostics) {\n addRange(\n /*to*/ diagnostics,\n /*from*/ program.getSyntacticDiagnostics(sourceFile)\n );\n addRange(/*to*/ diagnostics, /*from*/ program.getOptionsDiagnostics());\n }\n // Emit\n program.emit(\n /*targetSourceFile*/ undefined,\n /*writeFile*/ undefined,\n /*cancellationToken*/ undefined,\n /*emitOnlyDtsFiles*/ undefined,\n transpileOptions.transformers\n );\n\n if (outputText === undefined) return Debug.fail('Output generation failed');\n\n return { outputText, diagnostics, sourceMapText };\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/tsconfig-schema.d.ts b/node_modules/ts-node/dist/tsconfig-schema.d.ts new file mode 100644 index 0000000..a13c6e9 --- /dev/null +++ b/node_modules/ts-node/dist/tsconfig-schema.d.ts @@ -0,0 +1,13 @@ +import type { TsConfigOptions } from './index'; +/** + * tsconfig schema which includes "ts-node" options. + * @allOf [{"$ref": "https://schemastore.azurewebsites.net/schemas/json/tsconfig.json"}] + */ +export interface TsConfigSchema { + /** + * ts-node options. See also: https://typestrong.org/ts-node/docs/configuration + * + * ts-node offers TypeScript execution and REPL for node.js, with source map support. + */ + 'ts-node': TsConfigOptions; +} diff --git a/node_modules/ts-node/dist/tsconfig-schema.js b/node_modules/ts-node/dist/tsconfig-schema.js new file mode 100644 index 0000000..945d414 --- /dev/null +++ b/node_modules/ts-node/dist/tsconfig-schema.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=tsconfig-schema.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/tsconfig-schema.js.map b/node_modules/ts-node/dist/tsconfig-schema.js.map new file mode 100644 index 0000000..0c786f0 --- /dev/null +++ b/node_modules/ts-node/dist/tsconfig-schema.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tsconfig-schema.js","sourceRoot":"","sources":["../src/tsconfig-schema.ts"],"names":[],"mappings":"","sourcesContent":["import type { TsConfigOptions } from './index';\n\n/*\n * This interface exists solely for generating a JSON schema for tsconfig.json.\n * We do *not* extend the compiler's tsconfig interface. Instead we handle that\n * on a schema level, via \"allOf\", so we pull in the same schema that VSCode\n * already uses.\n */\n/**\n * tsconfig schema which includes \"ts-node\" options.\n * @allOf [{\"$ref\": \"https://schemastore.azurewebsites.net/schemas/json/tsconfig.json\"}]\n */\nexport interface TsConfigSchema {\n /**\n * ts-node options. See also: https://typestrong.org/ts-node/docs/configuration\n *\n * ts-node offers TypeScript execution and REPL for node.js, with source map support.\n */\n 'ts-node': TsConfigOptions;\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/tsconfigs.d.ts b/node_modules/ts-node/dist/tsconfigs.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/ts-node/dist/tsconfigs.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/ts-node/dist/tsconfigs.js b/node_modules/ts-node/dist/tsconfigs.js new file mode 100644 index 0000000..08d61b1 --- /dev/null +++ b/node_modules/ts-node/dist/tsconfigs.js @@ -0,0 +1,36 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getDefaultTsconfigJsonForNodeVersion = void 0; +const nodeMajor = parseInt(process.versions.node.split('.')[0], 10); +/** + * return parsed JSON of the bundled @tsconfig/bases config appropriate for the + * running version of nodejs + * @internal + */ +function getDefaultTsconfigJsonForNodeVersion(ts) { + const tsInternal = ts; + if (nodeMajor >= 16) { + const config = require('@tsconfig/node16/tsconfig.json'); + if (configCompatible(config)) + return config; + } + if (nodeMajor >= 14) { + const config = require('@tsconfig/node14/tsconfig.json'); + if (configCompatible(config)) + return config; + } + if (nodeMajor >= 12) { + const config = require('@tsconfig/node12/tsconfig.json'); + if (configCompatible(config)) + return config; + } + return require('@tsconfig/node10/tsconfig.json'); + // Verify that tsconfig target and lib options are compatible with TypeScript compiler + function configCompatible(config) { + return (typeof ts.ScriptTarget[config.compilerOptions.target.toUpperCase()] === 'number' && + tsInternal.libs && + config.compilerOptions.lib.every((lib) => tsInternal.libs.includes(lib))); + } +} +exports.getDefaultTsconfigJsonForNodeVersion = getDefaultTsconfigJsonForNodeVersion; +//# sourceMappingURL=tsconfigs.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/tsconfigs.js.map b/node_modules/ts-node/dist/tsconfigs.js.map new file mode 100644 index 0000000..add3514 --- /dev/null +++ b/node_modules/ts-node/dist/tsconfigs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tsconfigs.js","sourceRoot":"","sources":["../src/tsconfigs.ts"],"names":[],"mappings":";;;AAEA,MAAM,SAAS,GAAG,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACpE;;;;GAIG;AACH,SAAgB,oCAAoC,CAAC,EAAY;IAC/D,MAAM,UAAU,GAAG,EAAuB,CAAC;IAC3C,IAAI,SAAS,IAAI,EAAE,EAAE;QACnB,MAAM,MAAM,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAC;QACzD,IAAI,gBAAgB,CAAC,MAAM,CAAC;YAAE,OAAO,MAAM,CAAC;KAC7C;IACD,IAAI,SAAS,IAAI,EAAE,EAAE;QACnB,MAAM,MAAM,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAC;QACzD,IAAI,gBAAgB,CAAC,MAAM,CAAC;YAAE,OAAO,MAAM,CAAC;KAC7C;IACD,IAAI,SAAS,IAAI,EAAE,EAAE;QACnB,MAAM,MAAM,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAC;QACzD,IAAI,gBAAgB,CAAC,MAAM,CAAC;YAAE,OAAO,MAAM,CAAC;KAC7C;IACD,OAAO,OAAO,CAAC,gCAAgC,CAAC,CAAC;IAEjD,sFAAsF;IACtF,SAAS,gBAAgB,CAAC,MAKzB;QACC,OAAO,CACL,OAAQ,EAAE,CAAC,YAAoB,CAC7B,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,WAAW,EAAE,CAC5C,KAAK,QAAQ;YACd,UAAU,CAAC,IAAI;YACf,MAAM,CAAC,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,UAAU,CAAC,IAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAC1E,CAAC;IACJ,CAAC;AACH,CAAC;AA/BD,oFA+BC","sourcesContent":["import type { TSCommon, TSInternal } from './ts-compiler-types';\n\nconst nodeMajor = parseInt(process.versions.node.split('.')[0], 10);\n/**\n * return parsed JSON of the bundled @tsconfig/bases config appropriate for the\n * running version of nodejs\n * @internal\n */\nexport function getDefaultTsconfigJsonForNodeVersion(ts: TSCommon): any {\n const tsInternal = ts as any as TSInternal;\n if (nodeMajor >= 16) {\n const config = require('@tsconfig/node16/tsconfig.json');\n if (configCompatible(config)) return config;\n }\n if (nodeMajor >= 14) {\n const config = require('@tsconfig/node14/tsconfig.json');\n if (configCompatible(config)) return config;\n }\n if (nodeMajor >= 12) {\n const config = require('@tsconfig/node12/tsconfig.json');\n if (configCompatible(config)) return config;\n }\n return require('@tsconfig/node10/tsconfig.json');\n\n // Verify that tsconfig target and lib options are compatible with TypeScript compiler\n function configCompatible(config: {\n compilerOptions: {\n lib: string[];\n target: string;\n };\n }) {\n return (\n typeof (ts.ScriptTarget as any)[\n config.compilerOptions.target.toUpperCase()\n ] === 'number' &&\n tsInternal.libs &&\n config.compilerOptions.lib.every((lib) => tsInternal.libs!.includes(lib))\n );\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/dist/util.d.ts b/node_modules/ts-node/dist/util.d.ts new file mode 100644 index 0000000..0e07d4b --- /dev/null +++ b/node_modules/ts-node/dist/util.d.ts @@ -0,0 +1,4 @@ +/** + * Cached fs operation wrapper. + */ +export declare function cachedLookup(fn: (arg: T) => R): (arg: T) => R; diff --git a/node_modules/ts-node/dist/util.js b/node_modules/ts-node/dist/util.js new file mode 100644 index 0000000..fcce901 --- /dev/null +++ b/node_modules/ts-node/dist/util.js @@ -0,0 +1,175 @@ +"use strict"; +var _a; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.versionGteLt = exports.once = exports.getBasePathForProjectLocalDependencyResolution = exports.createProjectLocalResolveHelper = exports.attemptRequireWithV8CompileCache = exports.cachedLookup = exports.hasOwnProperty = exports.normalizeSlashes = exports.parse = exports.split = exports.assign = exports.yn = exports.createRequire = void 0; +const module_1 = require("module"); +const ynModule = require("yn"); +const path_1 = require("path"); +/** @internal */ +exports.createRequire = (_a = module_1.createRequire !== null && module_1.createRequire !== void 0 ? module_1.createRequire : module_1.createRequireFromPath) !== null && _a !== void 0 ? _a : require('create-require'); +/** + * Wrapper around yn module that returns `undefined` instead of `null`. + * This is implemented by yn v4, but we're staying on v3 to avoid v4's node 10 requirement. + * @internal + */ +function yn(value) { + var _a; + return (_a = ynModule(value)) !== null && _a !== void 0 ? _a : undefined; +} +exports.yn = yn; +/** + * Like `Object.assign`, but ignores `undefined` properties. + * + * @internal + */ +function assign(initialValue, ...sources) { + for (const source of sources) { + for (const key of Object.keys(source)) { + const value = source[key]; + if (value !== undefined) + initialValue[key] = value; + } + } + return initialValue; +} +exports.assign = assign; +/** + * Split a string array of values + * and remove empty strings from the resulting array. + * @internal + */ +function split(value) { + return typeof value === 'string' + ? value.split(/ *, */g).filter((v) => v !== '') + : undefined; +} +exports.split = split; +/** + * Parse a string as JSON. + * @internal + */ +function parse(value) { + return typeof value === 'string' ? JSON.parse(value) : undefined; +} +exports.parse = parse; +const directorySeparator = '/'; +const backslashRegExp = /\\/g; +/** + * Replace backslashes with forward slashes. + * @internal + */ +function normalizeSlashes(value) { + return value.replace(backslashRegExp, directorySeparator); +} +exports.normalizeSlashes = normalizeSlashes; +/** + * Safe `hasOwnProperty` + * @internal + */ +function hasOwnProperty(object, property) { + return Object.prototype.hasOwnProperty.call(object, property); +} +exports.hasOwnProperty = hasOwnProperty; +/** + * Cached fs operation wrapper. + */ +function cachedLookup(fn) { + const cache = new Map(); + return (arg) => { + if (!cache.has(arg)) { + const v = fn(arg); + cache.set(arg, v); + return v; + } + return cache.get(arg); + }; +} +exports.cachedLookup = cachedLookup; +/** + * @internal + * Require something with v8-compile-cache, which should make subsequent requires faster. + * Do lots of error-handling so that, worst case, we require without the cache, and users are not blocked. + */ +function attemptRequireWithV8CompileCache(requireFn, specifier) { + try { + const v8CC = require('v8-compile-cache-lib').install(); + try { + return requireFn(specifier); + } + finally { + v8CC === null || v8CC === void 0 ? void 0 : v8CC.uninstall(); + } + } + catch (e) { + return requireFn(specifier); + } +} +exports.attemptRequireWithV8CompileCache = attemptRequireWithV8CompileCache; +/** + * Helper to discover dependencies relative to a user's project, optionally + * falling back to relative to ts-node. This supports global installations of + * ts-node, for example where someone does `#!/usr/bin/env -S ts-node --swc` and + * we need to fallback to a global install of @swc/core + * @internal + */ +function createProjectLocalResolveHelper(localDirectory) { + return function projectLocalResolveHelper(specifier, fallbackToTsNodeRelative) { + return require.resolve(specifier, { + paths: fallbackToTsNodeRelative + ? [localDirectory, __dirname] + : [localDirectory], + }); + }; +} +exports.createProjectLocalResolveHelper = createProjectLocalResolveHelper; +/** + * Used as a reminder of all the factors we must consider when finding project-local dependencies and when a config file + * on disk may or may not exist. + * @internal + */ +function getBasePathForProjectLocalDependencyResolution(configFilePath, projectSearchDirOption, projectOption, cwdOption) { + var _a; + if (configFilePath != null) + return (0, path_1.dirname)(configFilePath); + return (_a = projectSearchDirOption !== null && projectSearchDirOption !== void 0 ? projectSearchDirOption : projectOption) !== null && _a !== void 0 ? _a : cwdOption; + // TODO technically breaks if projectOption is path to a file, not a directory, + // and we attempt to resolve relative specifiers. By the time we resolve relative specifiers, + // should have configFilePath, so not reach this codepath. +} +exports.getBasePathForProjectLocalDependencyResolution = getBasePathForProjectLocalDependencyResolution; +/** @internal */ +function once(fn) { + let value; + let ran = false; + function onceFn(...args) { + if (ran) + return value; + value = fn(...args); + ran = true; + return value; + } + return onceFn; +} +exports.once = once; +/** @internal */ +function versionGteLt(version, gteRequirement, ltRequirement) { + const [major, minor, patch, extra] = parse(version); + const [gteMajor, gteMinor, gtePatch] = parse(gteRequirement); + const isGte = major > gteMajor || + (major === gteMajor && + (minor > gteMinor || (minor === gteMinor && patch >= gtePatch))); + let isLt = true; + if (ltRequirement) { + const [ltMajor, ltMinor, ltPatch] = parse(ltRequirement); + isLt = + major < ltMajor || + (major === ltMajor && + (minor < ltMinor || (minor === ltMinor && patch < ltPatch))); + } + return isGte && isLt; + function parse(requirement) { + return requirement.split(/[\.-]/).map((s) => parseInt(s, 10)); + } +} +exports.versionGteLt = versionGteLt; +//# sourceMappingURL=util.js.map \ No newline at end of file diff --git a/node_modules/ts-node/dist/util.js.map b/node_modules/ts-node/dist/util.js.map new file mode 100644 index 0000000..1f7aa4f --- /dev/null +++ b/node_modules/ts-node/dist/util.js.map @@ -0,0 +1 @@ +{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":";;;;AAAA,mCAGgB;AAEhB,+BAA+B;AAC/B,+BAA+B;AAE/B,gBAAgB;AACH,QAAA,aAAa,GACxB,MAAA,sBAAiB,aAAjB,sBAAiB,cAAjB,sBAAiB,GACjB,8BAAyB,mCACxB,OAAO,CAAC,gBAAgB,CAA2B,CAAC;AAEvD;;;;GAIG;AACH,SAAgB,EAAE,CAAC,KAAyB;;IAC1C,OAAO,MAAA,QAAQ,CAAC,KAAK,CAAC,mCAAI,SAAS,CAAC;AACtC,CAAC;AAFD,gBAEC;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,GAAG,OAAO;gBACf,CAAC,KAAK,KAAK,OAAO;oBAChB,CAAC,KAAK,GAAG,OAAO,IAAI,CAAC,KAAK,KAAK,OAAO,IAAI,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;KAClE;IACD,OAAO,KAAK,IAAI,IAAI,CAAC;IAErB,SAAS,KAAK,CAAC,WAAmB;QAChC,OAAO,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAChE,CAAC;AACH,CAAC;AAxBD,oCAwBC","sourcesContent":["import {\n createRequire as nodeCreateRequire,\n createRequireFromPath as nodeCreateRequireFromPath,\n} from 'module';\nimport type _createRequire from 'create-require';\nimport * as ynModule from 'yn';\nimport { dirname } from 'path';\n\n/** @internal */\nexport const createRequire =\n nodeCreateRequire ??\n nodeCreateRequireFromPath ??\n (require('create-require') as typeof _createRequire);\n\n/**\n * Wrapper around yn module that returns `undefined` instead of `null`.\n * This is implemented by yn v4, but we're staying on v3 to avoid v4's node 10 requirement.\n * @internal\n */\nexport function yn(value: string | undefined) {\n return ynModule(value) ?? undefined;\n}\n\n/**\n * Like `Object.assign`, but ignores `undefined` properties.\n *\n * @internal\n */\nexport function assign(\n initialValue: T,\n ...sources: Array\n): T {\n for (const source of sources) {\n for (const key of Object.keys(source)) {\n const value = (source as any)[key];\n if (value !== undefined) (initialValue as any)[key] = value;\n }\n }\n return initialValue;\n}\n\n/**\n * Split a string array of values\n * and remove empty strings from the resulting array.\n * @internal\n */\nexport function split(value: string | undefined) {\n return typeof value === 'string'\n ? value.split(/ *, */g).filter((v) => v !== '')\n : undefined;\n}\n\n/**\n * Parse a string as JSON.\n * @internal\n */\nexport function parse(value: string | undefined): object | undefined {\n return typeof value === 'string' ? JSON.parse(value) : undefined;\n}\n\nconst directorySeparator = '/';\nconst backslashRegExp = /\\\\/g;\n/**\n * Replace backslashes with forward slashes.\n * @internal\n */\nexport function normalizeSlashes(value: string): string {\n return value.replace(backslashRegExp, directorySeparator);\n}\n\n/**\n * Safe `hasOwnProperty`\n * @internal\n */\nexport function hasOwnProperty(object: any, property: string): boolean {\n return Object.prototype.hasOwnProperty.call(object, property);\n}\n\n/**\n * Cached fs operation wrapper.\n */\nexport function cachedLookup(fn: (arg: T) => R): (arg: T) => R {\n const cache = new Map();\n\n return (arg: T): R => {\n if (!cache.has(arg)) {\n const v = fn(arg);\n cache.set(arg, v);\n return v;\n }\n return cache.get(arg)!;\n };\n}\n\n/**\n * @internal\n * Require something with v8-compile-cache, which should make subsequent requires faster.\n * Do lots of error-handling so that, worst case, we require without the cache, and users are not blocked.\n */\nexport function attemptRequireWithV8CompileCache(\n requireFn: typeof require,\n specifier: string\n) {\n try {\n const v8CC = (\n require('v8-compile-cache-lib') as typeof import('v8-compile-cache-lib')\n ).install();\n try {\n return requireFn(specifier);\n } finally {\n v8CC?.uninstall();\n }\n } catch (e) {\n return requireFn(specifier);\n }\n}\n\n/**\n * Helper to discover dependencies relative to a user's project, optionally\n * falling back to relative to ts-node. This supports global installations of\n * ts-node, for example where someone does `#!/usr/bin/env -S ts-node --swc` and\n * we need to fallback to a global install of @swc/core\n * @internal\n */\nexport function createProjectLocalResolveHelper(localDirectory: string) {\n return function projectLocalResolveHelper(\n specifier: string,\n fallbackToTsNodeRelative: boolean\n ) {\n return require.resolve(specifier, {\n paths: fallbackToTsNodeRelative\n ? [localDirectory, __dirname]\n : [localDirectory],\n });\n };\n}\n/** @internal */\nexport type ProjectLocalResolveHelper = ReturnType<\n typeof createProjectLocalResolveHelper\n>;\n\n/**\n * Used as a reminder of all the factors we must consider when finding project-local dependencies and when a config file\n * on disk may or may not exist.\n * @internal\n */\nexport function getBasePathForProjectLocalDependencyResolution(\n configFilePath: string | undefined,\n projectSearchDirOption: string | undefined,\n projectOption: string | undefined,\n cwdOption: string\n) {\n if (configFilePath != null) return dirname(configFilePath);\n return projectSearchDirOption ?? projectOption ?? cwdOption;\n // TODO technically breaks if projectOption is path to a file, not a directory,\n // and we attempt to resolve relative specifiers. By the time we resolve relative specifiers,\n // should have configFilePath, so not reach this codepath.\n}\n\n/** @internal */\nexport function once any>(fn: Fn) {\n let value: ReturnType;\n let ran = false;\n function onceFn(...args: Parameters): ReturnType {\n if (ran) return value;\n value = fn(...args);\n ran = true;\n return value;\n }\n return onceFn;\n}\n\n/** @internal */\nexport function versionGteLt(\n version: string,\n gteRequirement: string,\n ltRequirement?: string\n) {\n const [major, minor, patch, extra] = parse(version);\n const [gteMajor, gteMinor, gtePatch] = parse(gteRequirement);\n const isGte =\n major > gteMajor ||\n (major === gteMajor &&\n (minor > gteMinor || (minor === gteMinor && patch >= gtePatch)));\n let isLt = true;\n if (ltRequirement) {\n const [ltMajor, ltMinor, ltPatch] = parse(ltRequirement);\n isLt =\n major < ltMajor ||\n (major === ltMajor &&\n (minor < ltMinor || (minor === ltMinor && patch < ltPatch)));\n }\n return isGte && isLt;\n\n function parse(requirement: string) {\n return requirement.split(/[\\.-]/).map((s) => parseInt(s, 10));\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/ts-node/esm.mjs b/node_modules/ts-node/esm.mjs new file mode 100644 index 0000000..0843cf3 --- /dev/null +++ b/node_modules/ts-node/esm.mjs @@ -0,0 +1,8 @@ +import { fileURLToPath } from 'url'; +import { createRequire } from 'module'; +const require = createRequire(fileURLToPath(import.meta.url)); + +/** @type {import('./dist/esm')} */ +const esm = require('./dist/esm'); +export const { resolve, load, getFormat, transformSource } = + esm.registerAndCreateEsmHooks(); diff --git a/node_modules/ts-node/esm/transpile-only.mjs b/node_modules/ts-node/esm/transpile-only.mjs new file mode 100644 index 0000000..2e154da --- /dev/null +++ b/node_modules/ts-node/esm/transpile-only.mjs @@ -0,0 +1,8 @@ +import { fileURLToPath } from 'url'; +import { createRequire } from 'module'; +const require = createRequire(fileURLToPath(import.meta.url)); + +/** @type {import('../dist/esm')} */ +const esm = require('../dist/esm'); +export const { resolve, load, getFormat, transformSource } = + esm.registerAndCreateEsmHooks({ transpileOnly: true }); diff --git a/node_modules/ts-node/node10/tsconfig.json b/node_modules/ts-node/node10/tsconfig.json new file mode 100644 index 0000000..7079f3a --- /dev/null +++ b/node_modules/ts-node/node10/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "@tsconfig/node10/tsconfig.json" +} diff --git a/node_modules/ts-node/node12/tsconfig.json b/node_modules/ts-node/node12/tsconfig.json new file mode 100644 index 0000000..76603f1 --- /dev/null +++ b/node_modules/ts-node/node12/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "@tsconfig/node12/tsconfig.json", +} diff --git a/node_modules/ts-node/node14/tsconfig.json b/node_modules/ts-node/node14/tsconfig.json new file mode 100644 index 0000000..b082851 --- /dev/null +++ b/node_modules/ts-node/node14/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "@tsconfig/node14/tsconfig.json" +} diff --git a/node_modules/ts-node/node16/tsconfig.json b/node_modules/ts-node/node16/tsconfig.json new file mode 100644 index 0000000..e9c0baf --- /dev/null +++ b/node_modules/ts-node/node16/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "@tsconfig/node16/tsconfig.json" +} diff --git a/node_modules/ts-node/package.json b/node_modules/ts-node/package.json new file mode 100644 index 0000000..d9b281c --- /dev/null +++ b/node_modules/ts-node/package.json @@ -0,0 +1,182 @@ +{ + "name": "ts-node", + "version": "10.9.2", + "description": "TypeScript execution environment and REPL for node.js, with source map support", + "main": "dist/index.js", + "exports": { + ".": "./dist/index.js", + "./package": "./package.json", + "./package.json": "./package.json", + "./dist/bin": "./dist/bin.js", + "./dist/bin.js": "./dist/bin.js", + "./dist/bin-transpile": "./dist/bin-transpile.js", + "./dist/bin-transpile.js": "./dist/bin-transpile.js", + "./dist/bin-script": "./dist/bin-script.js", + "./dist/bin-script.js": "./dist/bin-script.js", + "./dist/bin-cwd": "./dist/bin-cwd.js", + "./dist/bin-cwd.js": "./dist/bin-cwd.js", + "./dist/bin-esm": "./dist/bin-esm.js", + "./dist/bin-esm.js": "./dist/bin-esm.js", + "./register": "./register/index.js", + "./register/files": "./register/files.js", + "./register/transpile-only": "./register/transpile-only.js", + "./register/type-check": "./register/type-check.js", + "./esm": "./esm.mjs", + "./esm.mjs": "./esm.mjs", + "./esm/transpile-only": "./esm/transpile-only.mjs", + "./esm/transpile-only.mjs": "./esm/transpile-only.mjs", + "./child-loader.mjs": "./child-loader.mjs", + "./transpilers/swc": "./transpilers/swc.js", + "./transpilers/swc-experimental": "./transpilers/swc-experimental.js", + "./node10/tsconfig.json": "./node10/tsconfig.json", + "./node12/tsconfig.json": "./node12/tsconfig.json", + "./node14/tsconfig.json": "./node14/tsconfig.json", + "./node16/tsconfig.json": "./node16/tsconfig.json" + }, + "types": "dist/index.d.ts", + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "files": [ + "/transpilers/", + "/dist/", + "!/dist/test", + "/dist-raw/NODE-LICENSE.md", + "/dist-raw/**.js", + "/register/", + "/esm/", + "/esm.mjs", + "/child-loader.mjs", + "/LICENSE", + "/tsconfig.schema.json", + "/tsconfig.schemastore-schema.json", + "/node10/", + "/node12/", + "/node14/", + "/node16/" + ], + "scripts": { + "lint": "dprint check", + "lint-fix": "dprint fmt", + "clean": "rimraf temp dist tsconfig.schema.json tsconfig.schemastore-schema.json tsconfig.tsbuildinfo tests/ts-node-packed.tgz tests/node_modules tests/tmp", + "rebuild": "npm run clean && npm run build", + "build": "npm run build-nopack && npm run build-pack", + "build-nopack": "npm run build-tsc && npm run build-configSchema", + "build-tsc": "tsc -b ./tsconfig.build-dist.json", + "build-configSchema": "typescript-json-schema --topRef --refs --validationKeywords allOf --out tsconfig.schema.json tsconfig.build-schema.json TsConfigSchema && node --require ./register ./scripts/create-merged-schema", + "build-pack": "node ./scripts/build-pack.js", + "test-spec": "ava", + "test-cov": "nyc ava", + "test": "npm run build && npm run lint && npm run test-cov --", + "test-local": "npm run lint-fix && npm run build-tsc && npm run build-pack && npm run test-spec --", + "pre-debug": "npm run build-tsc && npm run build-pack", + "coverage-report": "nyc report --reporter=lcov", + "prepare": "npm run clean && npm run build-nopack", + "api-extractor": "api-extractor run --local --verbose", + "esm-usage-example": "npm run build-tsc && cd esm-usage-example && node --experimental-specifier-resolution node --loader ../esm.mjs ./index", + "esm-usage-example2": "npm run build-tsc && cd tests && TS_NODE_PROJECT=./module-types/override-to-cjs/tsconfig.json node --loader ../esm.mjs ./module-types/override-to-cjs/test.cjs" + }, + "repository": { + "type": "git", + "url": "git://github.com/TypeStrong/ts-node.git" + }, + "keywords": [ + "typescript", + "node", + "runtime", + "environment", + "ts", + "compiler" + ], + "author": { + "name": "Blake Embrey", + "email": "hello@blakeembrey.com", + "url": "http://blakeembrey.me" + }, + "contributors": [ + { + "name": "Andrew Bradley", + "email": "cspotcode@gmail.com", + "url": "https://github.com/cspotcode" + } + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/TypeStrong/ts-node/issues" + }, + "homepage": "https://typestrong.org/ts-node", + "devDependencies": { + "@microsoft/api-extractor": "^7.19.4", + "@swc/core": "^1.3.100", + "@swc/wasm": "^1.3.100", + "@types/diff": "^4.0.2", + "@types/lodash": "^4.14.151", + "@types/node": "13.13.5", + "@types/proper-lockfile": "^4.1.2", + "@types/proxyquire": "^1.3.28", + "@types/react": "^16.14.19", + "@types/rimraf": "^3.0.0", + "@types/semver": "^7.1.0", + "@yarnpkg/fslib": "^2.4.0", + "ava": "^3.15.0", + "axios": "^0.21.1", + "dprint": "^0.25.0", + "expect": "^27.0.2", + "get-stream": "^6.0.0", + "lodash": "^4.17.15", + "ntypescript": "^1.201507091536.1", + "nyc": "^15.0.1", + "outdent": "^0.8.0", + "proper-lockfile": "^4.1.2", + "proxyquire": "^2.0.0", + "react": "^16.14.0", + "rimraf": "^3.0.0", + "semver": "^7.1.3", + "throat": "^6.0.1", + "typedoc": "^0.22.10", + "typescript": "4.7.4", + "typescript-json-schema": "^0.53.0", + "util.promisify": "^1.0.1" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + }, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "prettier": { + "singleQuote": true + }, + "volta": { + "node": "18.1.0", + "npm": "6.14.15" + } +} diff --git a/node_modules/ts-node/register/files.js b/node_modules/ts-node/register/files.js new file mode 100644 index 0000000..9be5bf5 --- /dev/null +++ b/node_modules/ts-node/register/files.js @@ -0,0 +1,3 @@ +require('../dist').register({ + files: true, +}); diff --git a/node_modules/ts-node/register/index.js b/node_modules/ts-node/register/index.js new file mode 100644 index 0000000..4569117 --- /dev/null +++ b/node_modules/ts-node/register/index.js @@ -0,0 +1 @@ +require('../').register(); diff --git a/node_modules/ts-node/register/transpile-only.js b/node_modules/ts-node/register/transpile-only.js new file mode 100644 index 0000000..4c52698 --- /dev/null +++ b/node_modules/ts-node/register/transpile-only.js @@ -0,0 +1,3 @@ +require('../').register({ + transpileOnly: true, +}); diff --git a/node_modules/ts-node/register/type-check.js b/node_modules/ts-node/register/type-check.js new file mode 100644 index 0000000..3d3c60b --- /dev/null +++ b/node_modules/ts-node/register/type-check.js @@ -0,0 +1,3 @@ +require('../').register({ + typeCheck: true, +}); diff --git a/node_modules/ts-node/transpilers/swc-experimental.js b/node_modules/ts-node/transpilers/swc-experimental.js new file mode 100644 index 0000000..7cf79b1 --- /dev/null +++ b/node_modules/ts-node/transpilers/swc-experimental.js @@ -0,0 +1 @@ +module.exports = require('../dist/transpilers/swc') diff --git a/node_modules/ts-node/transpilers/swc.js b/node_modules/ts-node/transpilers/swc.js new file mode 100644 index 0000000..7cf79b1 --- /dev/null +++ b/node_modules/ts-node/transpilers/swc.js @@ -0,0 +1 @@ +module.exports = require('../dist/transpilers/swc') diff --git a/node_modules/ts-node/tsconfig.schema.json b/node_modules/ts-node/tsconfig.schema.json new file mode 100644 index 0000000..6e8c09e --- /dev/null +++ b/node_modules/ts-node/tsconfig.schema.json @@ -0,0 +1,183 @@ +{ + "$ref": "#/definitions/TsConfigSchema", + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "ModuleTypes": { + "type": "object" + }, + "TsConfigOptions": { + "description": "Must be an interface to support `typescript-json-schema`.", + "properties": { + "compiler": { + "default": "typescript", + "description": "Specify a custom TypeScript compiler.", + "type": "string" + }, + "compilerHost": { + "default": false, + "description": "Use TypeScript's compiler host API instead of the language service API.", + "type": "boolean" + }, + "compilerOptions": { + "additionalProperties": true, + "allOf": [ + { + "$ref": "https://schemastore.azurewebsites.net/schemas/json/tsconfig.json#definitions/compilerOptionsDefinition/properties/compilerOptions" + } + ], + "description": "JSON object to merge with TypeScript `compilerOptions`.", + "properties": {}, + "type": "object" + }, + "emit": { + "default": false, + "description": "Emit output files into `.ts-node` directory.", + "type": "boolean" + }, + "esm": { + "description": "Enable native ESM support.\n\nFor details, see https://typestrong.org/ts-node/docs/imports#native-ecmascript-modules", + "type": "boolean" + }, + "experimentalReplAwait": { + "description": "Allows the usage of top level await in REPL.\n\nUses node's implementation which accomplishes this with an AST syntax transformation.\n\nEnabled by default when tsconfig target is es2018 or above. Set to false to disable.\n\n**Note**: setting to `true` when tsconfig target is too low will throw an Error. Leave as `undefined`\nto get default, automatic behavior.", + "type": "boolean" + }, + "experimentalResolver": { + "description": "Enable experimental features that re-map imports and require calls to support:\n`baseUrl`, `paths`, `rootDirs`, `.js` to `.ts` file extension mappings,\n`outDir` to `rootDir` mappings for composite projects and monorepos.\n\nFor details, see https://github.com/TypeStrong/ts-node/issues/1514", + "type": "boolean" + }, + "experimentalSpecifierResolution": { + "description": "Like node's `--experimental-specifier-resolution`, , but can also be set in your `tsconfig.json` for convenience.\n\nFor details, see https://nodejs.org/dist/latest-v18.x/docs/api/esm.html#customizing-esm-specifier-resolution-algorithm", + "enum": [ + "explicit", + "node" + ], + "type": "string" + }, + "experimentalTsImportSpecifiers": { + "description": "Allow using voluntary `.ts` file extension in import specifiers.\n\nTypically, in ESM projects, import specifiers must have an emit extension, `.js`, `.cjs`, or `.mjs`,\nand we automatically map to the corresponding `.ts`, `.cts`, or `.mts` source file. This is the\nrecommended approach.\n\nHowever, if you really want to use `.ts` in import specifiers, and are aware that this may\nbreak tooling, you can enable this flag.", + "type": "boolean" + }, + "files": { + "default": false, + "description": "Load \"files\" and \"include\" from `tsconfig.json` on startup.\n\nDefault is to override `tsconfig.json` \"files\" and \"include\" to only include the entrypoint script.", + "type": "boolean" + }, + "ignore": { + "default": [ + "(?:^|/)node_modules/" + ], + "description": "Paths which should not be compiled.\n\nEach string in the array is converted to a regular expression via `new RegExp()` and tested against source paths prior to compilation.\n\nSource paths are normalized to posix-style separators, relative to the directory containing `tsconfig.json` or to cwd if no `tsconfig.json` is loaded.\n\nDefault is to ignore all node_modules subdirectories.", + "items": { + "type": "string" + }, + "type": "array" + }, + "ignoreDiagnostics": { + "description": "Ignore TypeScript warnings by diagnostic code.", + "items": { + "type": [ + "string", + "number" + ] + }, + "type": "array" + }, + "logError": { + "default": false, + "description": "Logs TypeScript errors to stderr instead of throwing exceptions.", + "type": "boolean" + }, + "moduleTypes": { + "$ref": "#/definitions/ModuleTypes", + "description": "Override certain paths to be compiled and executed as CommonJS or ECMAScript modules.\nWhen overridden, the tsconfig \"module\" and package.json \"type\" fields are overridden, and\nthe file extension is ignored.\nThis is useful if you cannot use .mts, .cts, .mjs, or .cjs file extensions;\nit achieves the same effect.\n\nEach key is a glob pattern following the same rules as tsconfig's \"include\" array.\nWhen multiple patterns match the same file, the last pattern takes precedence.\n\n`cjs` overrides matches files to compile and execute as CommonJS.\n`esm` overrides matches files to compile and execute as native ECMAScript modules.\n`package` overrides either of the above to default behavior, which obeys package.json \"type\" and\ntsconfig.json \"module\" options." + }, + "preferTsExts": { + "default": false, + "description": "Re-order file extensions so that TypeScript imports are preferred.\n\nFor example, when both `index.js` and `index.ts` exist, enabling this option causes `require('./index')` to resolve to `index.ts` instead of `index.js`", + "type": "boolean" + }, + "pretty": { + "default": false, + "description": "Use pretty diagnostic formatter.", + "type": "boolean" + }, + "require": { + "description": "Modules to require, like node's `--require` flag.\n\nIf specified in `tsconfig.json`, the modules will be resolved relative to the `tsconfig.json` file.\n\nIf specified programmatically, each input string should be pre-resolved to an absolute path for\nbest results.", + "items": { + "type": "string" + }, + "type": "array" + }, + "scope": { + "default": false, + "description": "Scope compiler to files within `scopeDir`.", + "type": "boolean" + }, + "scopeDir": { + "default": "First of: `tsconfig.json` \"rootDir\" if specified, directory containing `tsconfig.json`, or cwd if no `tsconfig.json` is loaded.", + "type": "string" + }, + "skipIgnore": { + "default": false, + "description": "Skip ignore check, so that compilation will be attempted for all files with matching extensions.", + "type": "boolean" + }, + "swc": { + "description": "Transpile with swc instead of the TypeScript compiler, and skip typechecking.\n\nEquivalent to setting both `transpileOnly: true` and `transpiler: 'ts-node/transpilers/swc'`\n\nFor complete instructions: https://typestrong.org/ts-node/docs/transpilers", + "type": "boolean" + }, + "transpileOnly": { + "default": false, + "description": "Use TypeScript's faster `transpileModule`.", + "type": "boolean" + }, + "transpiler": { + "anyOf": [ + { + "items": [ + { + "type": "string" + }, + { + "additionalProperties": true, + "properties": {}, + "type": "object" + } + ], + "maxItems": 2, + "minItems": 2, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Specify a custom transpiler for use with transpileOnly" + }, + "typeCheck": { + "default": true, + "description": "**DEPRECATED** Specify type-check is enabled (e.g. `transpileOnly == false`).", + "type": "boolean" + } + }, + "type": "object" + }, + "TsConfigSchema": { + "allOf": [ + { + "$ref": "https://schemastore.azurewebsites.net/schemas/json/tsconfig.json" + } + ], + "description": "tsconfig schema which includes \"ts-node\" options.", + "properties": { + "ts-node": { + "$ref": "#/definitions/TsConfigOptions", + "description": "ts-node options. See also: https://typestrong.org/ts-node/docs/configuration\n\nts-node offers TypeScript execution and REPL for node.js, with source map support." + } + }, + "type": "object" + } + } +} + diff --git a/node_modules/ts-node/tsconfig.schemastore-schema.json b/node_modules/ts-node/tsconfig.schemastore-schema.json new file mode 100644 index 0000000..40d58ff --- /dev/null +++ b/node_modules/ts-node/tsconfig.schemastore-schema.json @@ -0,0 +1,1326 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "allowTrailingCommas": true, + "allOf": [ + { + "$ref": "#/definitions/compilerOptionsDefinition" + }, + { + "$ref": "#/definitions/compileOnSaveDefinition" + }, + { + "$ref": "#/definitions/typeAcquisitionDefinition" + }, + { + "$ref": "#/definitions/extendsDefinition" + }, + { + "$ref": "#/definitions/watchOptionsDefinition" + }, + { + "$ref": "#/definitions/buildOptionsDefinition" + }, + { + "$ref": "#/definitions/tsNodeDefinition" + }, + { + "anyOf": [ + { + "$ref": "#/definitions/filesDefinition" + }, + { + "$ref": "#/definitions/excludeDefinition" + }, + { + "$ref": "#/definitions/includeDefinition" + }, + { + "$ref": "#/definitions/referencesDefinition" + } + ] + } + ], + "definitions": { + "//": { + "explainer": "https://www.typescriptlang.org/docs/handbook/tsconfig-json.html#overview", + "reference": "https://www.typescriptlang.org/tsconfig", + "reference metadata": "https://github.com/microsoft/TypeScript-Website/blob/v2/packages/tsconfig-reference/scripts/tsconfigRules.ts" + }, + "filesDefinition": { + "properties": { + "files": { + "description": "If no 'files' or 'include' property is present in a tsconfig.json, the compiler defaults to including all files in the containing directory and subdirectories except those specified by 'exclude'. When a 'files' property is specified, only those files and those specified by 'include' are included.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "excludeDefinition": { + "properties": { + "exclude": { + "description": "Specifies a list of files to be excluded from compilation. The 'exclude' property only affects the files included via the 'include' property and not the 'files' property. Glob patterns require TypeScript version 2.0 or later.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "includeDefinition": { + "properties": { + "include": { + "description": "Specifies a list of glob patterns that match files to be included in compilation. If no 'files' or 'include' property is present in a tsconfig.json, the compiler defaults to including all files in the containing directory and subdirectories except those specified by 'exclude'. Requires TypeScript version 2.0 or later.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "compileOnSaveDefinition": { + "properties": { + "compileOnSave": { + "description": "Enable Compile-on-Save for this project.", + "type": "boolean" + } + } + }, + "extendsDefinition": { + "properties": { + "extends": { + "description": "Path to base configuration file to inherit from (requires TypeScript version 2.1 or later), or array of base files, with the rightmost files having the greater priority (requires TypeScript version 5.0 or later).", + "oneOf": [ + { + "default": "", + "type": "string" + }, + { + "default": [], + "items": { + "type": "string" + }, + "type": "array" + } + ] + } + } + }, + "buildOptionsDefinition": { + "properties": { + "buildOptions": { + "properties": { + "dry": { + "description": "~", + "type": "boolean", + "default": false + }, + "force": { + "description": "Build all projects, including those that appear to be up to date", + "type": "boolean", + "default": false, + "markdownDescription": "Build all projects, including those that appear to be up to date\n\nSee more: https://www.typescriptlang.org/tsconfig#force" + }, + "verbose": { + "description": "Enable verbose logging", + "type": "boolean", + "default": false, + "markdownDescription": "Enable verbose logging\n\nSee more: https://www.typescriptlang.org/tsconfig#verbose" + }, + "incremental": { + "description": "Save .tsbuildinfo files to allow for incremental compilation of projects.", + "type": "boolean", + "default": false, + "markdownDescription": "Save .tsbuildinfo files to allow for incremental compilation of projects.\n\nSee more: https://www.typescriptlang.org/tsconfig#incremental" + }, + "assumeChangesOnlyAffectDirectDependencies": { + "description": "Have recompiles in projects that use `incremental` and `watch` mode assume that changes within a file will only affect files directly depending on it.", + "type": "boolean", + "default": false, + "markdownDescription": "Have recompiles in projects that use `incremental` and `watch` mode assume that changes within a file will only affect files directly depending on it.\n\nSee more: https://www.typescriptlang.org/tsconfig#assumeChangesOnlyAffectDirectDependencies" + }, + "traceResolution": { + "description": "Log paths used during the `moduleResolution` process.", + "type": "boolean", + "default": false, + "markdownDescription": "Log paths used during the `moduleResolution` process.\n\nSee more: https://www.typescriptlang.org/tsconfig#traceResolution" + } + } + } + } + }, + "watchOptionsDefinition": { + "properties": { + "watchOptions": { + "type": "object", + "description": "Settings for the watch mode in TypeScript.", + "properties": { + "force": { + "description": "~", + "type": "string" + }, + "watchFile": { + "description": "Specify how the TypeScript watch mode works.", + "type": "string", + "markdownDescription": "Specify how the TypeScript watch mode works.\n\nSee more: https://www.typescriptlang.org/tsconfig#watchFile" + }, + "watchDirectory": { + "description": "Specify how directories are watched on systems that lack recursive file-watching functionality.", + "type": "string", + "markdownDescription": "Specify how directories are watched on systems that lack recursive file-watching functionality.\n\nSee more: https://www.typescriptlang.org/tsconfig#watchDirectory" + }, + "fallbackPolling": { + "description": "Specify what approach the watcher should use if the system runs out of native file watchers.", + "type": "string", + "markdownDescription": "Specify what approach the watcher should use if the system runs out of native file watchers.\n\nSee more: https://www.typescriptlang.org/tsconfig#fallbackPolling" + }, + "synchronousWatchDirectory": { + "description": "Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively.", + "type": "boolean", + "markdownDescription": "Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively.\n\nSee more: https://www.typescriptlang.org/tsconfig#synchronousWatchDirectory" + }, + "excludeFiles": { + "description": "Remove a list of files from the watch mode's processing.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + }, + "markdownDescription": "Remove a list of files from the watch mode's processing.\n\nSee more: https://www.typescriptlang.org/tsconfig#excludeFiles" + }, + "excludeDirectories": { + "description": "Remove a list of directories from the watch process.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + }, + "markdownDescription": "Remove a list of directories from the watch process.\n\nSee more: https://www.typescriptlang.org/tsconfig#excludeDirectories" + } + } + } + } + }, + "compilerOptionsDefinition": { + "properties": { + "compilerOptions": { + "type": "object", + "description": "Instructs the TypeScript compiler how to compile .ts files.", + "properties": { + "allowArbitraryExtensions": { + "description": "Enable importing files with any extension, provided a declaration file is present.", + "type": "boolean", + "markdownDescription": "Enable importing files with any extension, provided a declaration file is present.\n\nSee more: https://www.typescriptlang.org/tsconfig#allowImportingTsExtensions" + }, + "allowImportingTsExtensions": { + "description": "Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set.", + "type": "boolean", + "markdownDescription": "Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set.\n\nSee more: https://www.typescriptlang.org/tsconfig#allowImportingTsExtensions" + }, + "charset": { + "description": "No longer supported. In early versions, manually set the text encoding for reading files.", + "type": "string", + "markdownDescription": "No longer supported. In early versions, manually set the text encoding for reading files.\n\nSee more: https://www.typescriptlang.org/tsconfig#charset" + }, + "composite": { + "description": "Enable constraints that allow a TypeScript project to be used with project references.", + "type": "boolean", + "default": true, + "markdownDescription": "Enable constraints that allow a TypeScript project to be used with project references.\n\nSee more: https://www.typescriptlang.org/tsconfig#composite" + }, + "customConditions": { + "description": "Conditions to set in addition to the resolver-specific defaults when resolving imports.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + }, + "markdownDescription": "Conditions to set in addition to the resolver-specific defaults when resolving imports.\n\nSee more: https://www.typescriptlang.org/tsconfig#customConditions" + }, + "declaration": { + "description": "Generate .d.ts files from TypeScript and JavaScript files in your project.", + "type": "boolean", + "default": false, + "markdownDescription": "Generate .d.ts files from TypeScript and JavaScript files in your project.\n\nSee more: https://www.typescriptlang.org/tsconfig#declaration" + }, + "declarationDir": { + "description": "Specify the output directory for generated declaration files.", + "type": [ + "string", + "null" + ], + "markdownDescription": "Specify the output directory for generated declaration files.\n\nSee more: https://www.typescriptlang.org/tsconfig#declarationDir" + }, + "diagnostics": { + "description": "Output compiler performance information after building.", + "type": "boolean", + "markdownDescription": "Output compiler performance information after building.\n\nSee more: https://www.typescriptlang.org/tsconfig#diagnostics" + }, + "disableReferencedProjectLoad": { + "description": "Reduce the number of projects loaded automatically by TypeScript.", + "type": "boolean", + "markdownDescription": "Reduce the number of projects loaded automatically by TypeScript.\n\nSee more: https://www.typescriptlang.org/tsconfig#disableReferencedProjectLoad" + }, + "noPropertyAccessFromIndexSignature": { + "description": "Enforces using indexed accessors for keys declared using an indexed type", + "type": "boolean", + "markdownDescription": "Enforces using indexed accessors for keys declared using an indexed type\n\nSee more: https://www.typescriptlang.org/tsconfig#noPropertyAccessFromIndexSignature" + }, + "emitBOM": { + "description": "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.", + "type": "boolean", + "default": false, + "markdownDescription": "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.\n\nSee more: https://www.typescriptlang.org/tsconfig#emitBOM" + }, + "emitDeclarationOnly": { + "description": "Only output d.ts files and not JavaScript files.", + "type": "boolean", + "default": false, + "markdownDescription": "Only output d.ts files and not JavaScript files.\n\nSee more: https://www.typescriptlang.org/tsconfig#emitDeclarationOnly" + }, + "exactOptionalPropertyTypes": { + "description": "Differentiate between undefined and not present when type checking", + "type": "boolean", + "default": false, + "markdownDescription": "Differentiate between undefined and not present when type checking\n\nSee more: https://www.typescriptlang.org/tsconfig#exactOptionalPropertyTypes" + }, + "incremental": { + "description": "Enable incremental compilation. Requires TypeScript version 3.4 or later.", + "type": "boolean" + }, + "tsBuildInfoFile": { + "$comment": "The value of 'null' is UNDOCUMENTED.", + "description": "Specify the folder for .tsbuildinfo incremental compilation files.", + "default": ".tsbuildinfo", + "type": [ + "string", + "null" + ], + "markdownDescription": "Specify the folder for .tsbuildinfo incremental compilation files.\n\nSee more: https://www.typescriptlang.org/tsconfig#tsBuildInfoFile" + }, + "inlineSourceMap": { + "description": "Include sourcemap files inside the emitted JavaScript.", + "type": "boolean", + "default": false, + "markdownDescription": "Include sourcemap files inside the emitted JavaScript.\n\nSee more: https://www.typescriptlang.org/tsconfig#inlineSourceMap" + }, + "inlineSources": { + "description": "Include source code in the sourcemaps inside the emitted JavaScript.", + "type": "boolean", + "default": false, + "markdownDescription": "Include source code in the sourcemaps inside the emitted JavaScript.\n\nSee more: https://www.typescriptlang.org/tsconfig#inlineSources" + }, + "jsx": { + "description": "Specify what JSX code is generated.", + "enum": [ + "preserve", + "react", + "react-jsx", + "react-jsxdev", + "react-native" + ] + }, + "reactNamespace": { + "description": "Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit.", + "type": "string", + "default": "React", + "markdownDescription": "Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit.\n\nSee more: https://www.typescriptlang.org/tsconfig#reactNamespace" + }, + "jsxFactory": { + "description": "Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'", + "type": "string", + "default": "React.createElement", + "markdownDescription": "Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'\n\nSee more: https://www.typescriptlang.org/tsconfig#jsxFactory" + }, + "jsxFragmentFactory": { + "description": "Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'.", + "type": "string", + "default": "React.Fragment", + "markdownDescription": "Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'.\n\nSee more: https://www.typescriptlang.org/tsconfig#jsxFragmentFactory" + }, + "jsxImportSource": { + "description": "Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx`.", + "type": "string", + "default": "react", + "markdownDescription": "Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx`.\n\nSee more: https://www.typescriptlang.org/tsconfig#jsxImportSource" + }, + "listFiles": { + "description": "Print all of the files read during the compilation.", + "type": "boolean", + "default": false, + "markdownDescription": "Print all of the files read during the compilation.\n\nSee more: https://www.typescriptlang.org/tsconfig#listFiles" + }, + "mapRoot": { + "description": "Specify the location where debugger should locate map files instead of generated locations.", + "type": "string", + "markdownDescription": "Specify the location where debugger should locate map files instead of generated locations.\n\nSee more: https://www.typescriptlang.org/tsconfig#mapRoot" + }, + "module": { + "description": "Specify what module code is generated.", + "type": "string", + "anyOf": [ + { + "enum": [ + "CommonJS", + "AMD", + "System", + "UMD", + "ES6", + "ES2015", + "ES2020", + "ESNext", + "None", + "ES2022", + "Node16", + "NodeNext" + ] + }, + { + "pattern": "^([Cc][Oo][Mm][Mm][Oo][Nn][Jj][Ss]|[AaUu][Mm][Dd]|[Ss][Yy][Ss][Tt][Ee][Mm]|[Ee][Ss]([356]|20(1[567]|2[02])|[Nn][Ee][Xx][Tt])|[Nn][Oo][dD][Ee]16|[Nn][Oo][Dd][Ee][Nn][Ee][Xx][Tt]|[Nn][Oo][Nn][Ee])$" + } + ], + "markdownDescription": "Specify what module code is generated.\n\nSee more: https://www.typescriptlang.org/tsconfig#module" + }, + "moduleResolution": { + "description": "Specify how TypeScript looks up a file from a given module specifier.", + "type": "string", + "anyOf": [ + { + "enum": [ + "Classic", + "Node", + "Node10", + "Node16", + "NodeNext", + "Bundler" + ], + "markdownEnumDescriptions": [ + "It’s recommended to use `\"Node16\"` instead", + "Deprecated, use `\"Node10\"` in TypeScript 5.0+ instead", + "It’s recommended to use `\"Node16\"` instead", + "This is the recommended setting for libraries and Node.js applications", + "This is the recommended setting for libraries and Node.js applications", + "This is the recommended setting in TypeScript 5.0+ for applications that use a bundler" + ] + }, + { + "pattern": "^(([Nn]ode)|([Nn]ode1[06])|([Nn]ode[Nn]ext)|([Cc]lassic)|([Bb]undler))$" + } + ], + "markdownDescription": "Specify how TypeScript looks up a file from a given module specifier.\n\nSee more: https://www.typescriptlang.org/tsconfig#moduleResolution" + }, + "newLine": { + "description": "Set the newline character for emitting files.", + "type": "string", + "anyOf": [ + { + "enum": [ + "crlf", + "lf" + ] + }, + { + "pattern": "^(CRLF|LF|crlf|lf)$" + } + ], + "markdownDescription": "Set the newline character for emitting files.\n\nSee more: https://www.typescriptlang.org/tsconfig#newLine" + }, + "noEmit": { + "description": "Disable emitting file from a compilation.", + "type": "boolean", + "default": false, + "markdownDescription": "Disable emitting file from a compilation.\n\nSee more: https://www.typescriptlang.org/tsconfig#noEmit" + }, + "noEmitHelpers": { + "description": "Disable generating custom helper functions like `__extends` in compiled output.", + "type": "boolean", + "default": false, + "markdownDescription": "Disable generating custom helper functions like `__extends` in compiled output.\n\nSee more: https://www.typescriptlang.org/tsconfig#noEmitHelpers" + }, + "noEmitOnError": { + "description": "Disable emitting files if any type checking errors are reported.", + "type": "boolean", + "default": false, + "markdownDescription": "Disable emitting files if any type checking errors are reported.\n\nSee more: https://www.typescriptlang.org/tsconfig#noEmitOnError" + }, + "noImplicitAny": { + "description": "Enable error reporting for expressions and declarations with an implied `any` type..", + "type": "boolean", + "markdownDescription": "Enable error reporting for expressions and declarations with an implied `any` type..\n\nSee more: https://www.typescriptlang.org/tsconfig#noImplicitAny" + }, + "noImplicitThis": { + "description": "Enable error reporting when `this` is given the type `any`.", + "type": "boolean", + "markdownDescription": "Enable error reporting when `this` is given the type `any`.\n\nSee more: https://www.typescriptlang.org/tsconfig#noImplicitThis" + }, + "noUnusedLocals": { + "description": "Enable error reporting when a local variables aren't read.", + "type": "boolean", + "default": false, + "markdownDescription": "Enable error reporting when a local variables aren't read.\n\nSee more: https://www.typescriptlang.org/tsconfig#noUnusedLocals" + }, + "noUnusedParameters": { + "description": "Raise an error when a function parameter isn't read", + "type": "boolean", + "default": false, + "markdownDescription": "Raise an error when a function parameter isn't read\n\nSee more: https://www.typescriptlang.org/tsconfig#noUnusedParameters" + }, + "noLib": { + "description": "Disable including any library files, including the default lib.d.ts.", + "type": "boolean", + "default": false, + "markdownDescription": "Disable including any library files, including the default lib.d.ts.\n\nSee more: https://www.typescriptlang.org/tsconfig#noLib" + }, + "noResolve": { + "description": "Disallow `import`s, `require`s or ``s from expanding the number of files TypeScript should add to a project.", + "type": "boolean", + "default": false, + "markdownDescription": "Disallow `import`s, `require`s or ``s from expanding the number of files TypeScript should add to a project.\n\nSee more: https://www.typescriptlang.org/tsconfig#noResolve" + }, + "noStrictGenericChecks": { + "description": "Disable strict checking of generic signatures in function types.", + "type": "boolean", + "default": false, + "markdownDescription": "Disable strict checking of generic signatures in function types.\n\nSee more: https://www.typescriptlang.org/tsconfig#noStrictGenericChecks" + }, + "skipDefaultLibCheck": { + "description": "Skip type checking .d.ts files that are included with TypeScript.", + "type": "boolean", + "default": false, + "markdownDescription": "Skip type checking .d.ts files that are included with TypeScript.\n\nSee more: https://www.typescriptlang.org/tsconfig#skipDefaultLibCheck" + }, + "skipLibCheck": { + "description": "Skip type checking all .d.ts files.", + "type": "boolean", + "default": false, + "markdownDescription": "Skip type checking all .d.ts files.\n\nSee more: https://www.typescriptlang.org/tsconfig#skipLibCheck" + }, + "outFile": { + "description": "Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output.", + "type": "string", + "markdownDescription": "Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output.\n\nSee more: https://www.typescriptlang.org/tsconfig#outFile" + }, + "outDir": { + "description": "Specify an output folder for all emitted files.", + "type": "string", + "markdownDescription": "Specify an output folder for all emitted files.\n\nSee more: https://www.typescriptlang.org/tsconfig#outDir" + }, + "preserveConstEnums": { + "description": "Disable erasing `const enum` declarations in generated code.", + "type": "boolean", + "default": false, + "markdownDescription": "Disable erasing `const enum` declarations in generated code.\n\nSee more: https://www.typescriptlang.org/tsconfig#preserveConstEnums" + }, + "preserveSymlinks": { + "description": "Disable resolving symlinks to their realpath. This correlates to the same flag in node.", + "type": "boolean", + "default": false, + "markdownDescription": "Disable resolving symlinks to their realpath. This correlates to the same flag in node.\n\nSee more: https://www.typescriptlang.org/tsconfig#preserveSymlinks" + }, + "preserveValueImports": { + "description": "Preserve unused imported values in the JavaScript output that would otherwise be removed", + "type": "boolean", + "default": false, + "markdownDescription": "Preserve unused imported values in the JavaScript output that would otherwise be removed\n\nSee more: https://www.typescriptlang.org/tsconfig#preserveValueImports" + }, + "preserveWatchOutput": { + "description": "Disable wiping the console in watch mode", + "type": "boolean", + "markdownDescription": "Disable wiping the console in watch mode\n\nSee more: https://www.typescriptlang.org/tsconfig#preserveWatchOutput" + }, + "pretty": { + "description": "Enable color and formatting in output to make compiler errors easier to read", + "type": "boolean", + "default": true, + "markdownDescription": "Enable color and formatting in output to make compiler errors easier to read\n\nSee more: https://www.typescriptlang.org/tsconfig#pretty" + }, + "removeComments": { + "description": "Disable emitting comments.", + "type": "boolean", + "default": false, + "markdownDescription": "Disable emitting comments.\n\nSee more: https://www.typescriptlang.org/tsconfig#removeComments" + }, + "rootDir": { + "description": "Specify the root folder within your source files.", + "type": "string", + "markdownDescription": "Specify the root folder within your source files.\n\nSee more: https://www.typescriptlang.org/tsconfig#rootDir" + }, + "isolatedModules": { + "description": "Ensure that each file can be safely transpiled without relying on other imports.", + "type": "boolean", + "default": false, + "markdownDescription": "Ensure that each file can be safely transpiled without relying on other imports.\n\nSee more: https://www.typescriptlang.org/tsconfig#isolatedModules" + }, + "sourceMap": { + "description": "Create source map files for emitted JavaScript files.", + "type": "boolean", + "default": false, + "markdownDescription": "Create source map files for emitted JavaScript files.\n\nSee more: https://www.typescriptlang.org/tsconfig#sourceMap" + }, + "sourceRoot": { + "description": "Specify the root path for debuggers to find the reference source code.", + "type": "string", + "markdownDescription": "Specify the root path for debuggers to find the reference source code.\n\nSee more: https://www.typescriptlang.org/tsconfig#sourceRoot" + }, + "suppressExcessPropertyErrors": { + "description": "Disable reporting of excess property errors during the creation of object literals.", + "type": "boolean", + "default": false, + "markdownDescription": "Disable reporting of excess property errors during the creation of object literals.\n\nSee more: https://www.typescriptlang.org/tsconfig#suppressExcessPropertyErrors" + }, + "suppressImplicitAnyIndexErrors": { + "description": "Suppress `noImplicitAny` errors when indexing objects that lack index signatures.", + "type": "boolean", + "default": false, + "markdownDescription": "Suppress `noImplicitAny` errors when indexing objects that lack index signatures.\n\nSee more: https://www.typescriptlang.org/tsconfig#suppressImplicitAnyIndexErrors" + }, + "stripInternal": { + "description": "Disable emitting declarations that have `@internal` in their JSDoc comments.", + "type": "boolean", + "markdownDescription": "Disable emitting declarations that have `@internal` in their JSDoc comments.\n\nSee more: https://www.typescriptlang.org/tsconfig#stripInternal" + }, + "target": { + "description": "Set the JavaScript language version for emitted JavaScript and include compatible library declarations.", + "type": "string", + "default": "ES3", + "anyOf": [ + { + "enum": [ + "ES3", + "ES5", + "ES6", + "ES2015", + "ES2016", + "ES2017", + "ES2018", + "ES2019", + "ES2020", + "ES2021", + "ES2022", + "ES2023", + "ESNext" + ] + }, + { + "pattern": "^([Ee][Ss]([356]|(20(1[56789]|2[0123]))|[Nn][Ee][Xx][Tt]))$" + } + ], + "markdownDescription": "Set the JavaScript language version for emitted JavaScript and include compatible library declarations.\n\nSee more: https://www.typescriptlang.org/tsconfig#target" + }, + "useUnknownInCatchVariables": { + "description": "Default catch clause variables as `unknown` instead of `any`.", + "type": "boolean", + "default": false, + "markdownDescription": "Default catch clause variables as `unknown` instead of `any`.\n\nSee more: https://www.typescriptlang.org/tsconfig#useUnknownInCatchVariables" + }, + "watch": { + "description": "Watch input files.", + "type": "boolean" + }, + "fallbackPolling": { + "description": "Specify the polling strategy to use when the system runs out of or doesn't support native file watchers. Requires TypeScript version 3.8 or later.", + "enum": [ + "fixedPollingInterval", + "priorityPollingInterval", + "dynamicPriorityPolling", + "fixedInterval", + "priorityInterval", + "dynamicPriority", + "fixedChunkSize" + ] + }, + "watchDirectory": { + "description": "Specify the strategy for watching directories under systems that lack recursive file-watching functionality. Requires TypeScript version 3.8 or later.", + "enum": [ + "useFsEvents", + "fixedPollingInterval", + "dynamicPriorityPolling", + "fixedChunkSizePolling" + ], + "default": "useFsEvents" + }, + "watchFile": { + "description": "Specify the strategy for watching individual files. Requires TypeScript version 3.8 or later.", + "enum": [ + "fixedPollingInterval", + "priorityPollingInterval", + "dynamicPriorityPolling", + "useFsEvents", + "useFsEventsOnParentDirectory", + "fixedChunkSizePolling" + ], + "default": "useFsEvents" + }, + "experimentalDecorators": { + "description": "Enable experimental support for TC39 stage 2 draft decorators.", + "type": "boolean", + "markdownDescription": "Enable experimental support for TC39 stage 2 draft decorators.\n\nSee more: https://www.typescriptlang.org/tsconfig#experimentalDecorators" + }, + "emitDecoratorMetadata": { + "description": "Emit design-type metadata for decorated declarations in source files.", + "type": "boolean", + "markdownDescription": "Emit design-type metadata for decorated declarations in source files.\n\nSee more: https://www.typescriptlang.org/tsconfig#emitDecoratorMetadata" + }, + "allowUnusedLabels": { + "description": "Disable error reporting for unused labels.", + "type": "boolean", + "markdownDescription": "Disable error reporting for unused labels.\n\nSee more: https://www.typescriptlang.org/tsconfig#allowUnusedLabels" + }, + "noImplicitReturns": { + "description": "Enable error reporting for codepaths that do not explicitly return in a function.", + "type": "boolean", + "default": false, + "markdownDescription": "Enable error reporting for codepaths that do not explicitly return in a function.\n\nSee more: https://www.typescriptlang.org/tsconfig#noImplicitReturns" + }, + "noUncheckedIndexedAccess": { + "description": "Add `undefined` to a type when accessed using an index.", + "type": "boolean", + "markdownDescription": "Add `undefined` to a type when accessed using an index.\n\nSee more: https://www.typescriptlang.org/tsconfig#noUncheckedIndexedAccess" + }, + "noFallthroughCasesInSwitch": { + "description": "Enable error reporting for fallthrough cases in switch statements.", + "type": "boolean", + "default": false, + "markdownDescription": "Enable error reporting for fallthrough cases in switch statements.\n\nSee more: https://www.typescriptlang.org/tsconfig#noFallthroughCasesInSwitch" + }, + "noImplicitOverride": { + "description": "Ensure overriding members in derived classes are marked with an override modifier.", + "type": "boolean", + "default": false, + "markdownDescription": "Ensure overriding members in derived classes are marked with an override modifier.\n\nSee more: https://www.typescriptlang.org/tsconfig#noImplicitOverride" + }, + "allowUnreachableCode": { + "description": "Disable error reporting for unreachable code.", + "type": "boolean", + "markdownDescription": "Disable error reporting for unreachable code.\n\nSee more: https://www.typescriptlang.org/tsconfig#allowUnreachableCode" + }, + "forceConsistentCasingInFileNames": { + "description": "Ensure that casing is correct in imports.", + "type": "boolean", + "default": false, + "markdownDescription": "Ensure that casing is correct in imports.\n\nSee more: https://www.typescriptlang.org/tsconfig#forceConsistentCasingInFileNames" + }, + "generateCpuProfile": { + "description": "Emit a v8 CPU profile of the compiler run for debugging.", + "type": "string", + "default": "profile.cpuprofile", + "markdownDescription": "Emit a v8 CPU profile of the compiler run for debugging.\n\nSee more: https://www.typescriptlang.org/tsconfig#generateCpuProfile" + }, + "baseUrl": { + "description": "Specify the base directory to resolve non-relative module names.", + "type": "string", + "markdownDescription": "Specify the base directory to resolve non-relative module names.\n\nSee more: https://www.typescriptlang.org/tsconfig#baseUrl" + }, + "paths": { + "description": "Specify a set of entries that re-map imports to additional lookup locations.", + "type": "object", + "additionalProperties": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "description": "Path mapping to be computed relative to baseUrl option." + } + }, + "markdownDescription": "Specify a set of entries that re-map imports to additional lookup locations.\n\nSee more: https://www.typescriptlang.org/tsconfig#paths" + }, + "plugins": { + "description": "Specify a list of language service plugins to include.", + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "description": "Plugin name.", + "type": "string" + } + } + }, + "markdownDescription": "Specify a list of language service plugins to include.\n\nSee more: https://www.typescriptlang.org/tsconfig#plugins" + }, + "rootDirs": { + "description": "Allow multiple folders to be treated as one when resolving modules.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + }, + "markdownDescription": "Allow multiple folders to be treated as one when resolving modules.\n\nSee more: https://www.typescriptlang.org/tsconfig#rootDirs" + }, + "typeRoots": { + "description": "Specify multiple folders that act like `./node_modules/@types`.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + }, + "markdownDescription": "Specify multiple folders that act like `./node_modules/@types`.\n\nSee more: https://www.typescriptlang.org/tsconfig#typeRoots" + }, + "types": { + "description": "Specify type package names to be included without being referenced in a source file.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + }, + "markdownDescription": "Specify type package names to be included without being referenced in a source file.\n\nSee more: https://www.typescriptlang.org/tsconfig#types" + }, + "traceResolution": { + "description": "Enable tracing of the name resolution process. Requires TypeScript version 2.0 or later.", + "type": "boolean", + "default": false + }, + "allowJs": { + "description": "Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files.", + "type": "boolean", + "default": false, + "markdownDescription": "Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files.\n\nSee more: https://www.typescriptlang.org/tsconfig#allowJs" + }, + "noErrorTruncation": { + "description": "Disable truncating types in error messages.", + "type": "boolean", + "default": false, + "markdownDescription": "Disable truncating types in error messages.\n\nSee more: https://www.typescriptlang.org/tsconfig#noErrorTruncation" + }, + "allowSyntheticDefaultImports": { + "description": "Allow 'import x from y' when a module doesn't have a default export.", + "type": "boolean", + "markdownDescription": "Allow 'import x from y' when a module doesn't have a default export.\n\nSee more: https://www.typescriptlang.org/tsconfig#allowSyntheticDefaultImports" + }, + "noImplicitUseStrict": { + "description": "Disable adding 'use strict' directives in emitted JavaScript files.", + "type": "boolean", + "default": false, + "markdownDescription": "Disable adding 'use strict' directives in emitted JavaScript files.\n\nSee more: https://www.typescriptlang.org/tsconfig#noImplicitUseStrict" + }, + "listEmittedFiles": { + "description": "Print the names of emitted files after a compilation.", + "type": "boolean", + "default": false, + "markdownDescription": "Print the names of emitted files after a compilation.\n\nSee more: https://www.typescriptlang.org/tsconfig#listEmittedFiles" + }, + "disableSizeLimit": { + "description": "Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server.", + "type": "boolean", + "default": false, + "markdownDescription": "Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server.\n\nSee more: https://www.typescriptlang.org/tsconfig#disableSizeLimit" + }, + "lib": { + "description": "Specify a set of bundled library declaration files that describe the target runtime environment.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "anyOf": [ + { + "enum": [ + "ES5", + "ES6", + "ES2015", + "ES2015.Collection", + "ES2015.Core", + "ES2015.Generator", + "ES2015.Iterable", + "ES2015.Promise", + "ES2015.Proxy", + "ES2015.Reflect", + "ES2015.Symbol.WellKnown", + "ES2015.Symbol", + "ES2016", + "ES2016.Array.Include", + "ES2017", + "ES2017.Intl", + "ES2017.Object", + "ES2017.SharedMemory", + "ES2017.String", + "ES2017.TypedArrays", + "ES2018", + "ES2018.AsyncGenerator", + "ES2018.AsyncIterable", + "ES2018.Intl", + "ES2018.Promise", + "ES2018.Regexp", + "ES2019", + "ES2019.Array", + "ES2019.Intl", + "ES2019.Object", + "ES2019.String", + "ES2019.Symbol", + "ES2020", + "ES2020.BigInt", + "ES2020.Promise", + "ES2020.String", + "ES2020.Symbol.WellKnown", + "ESNext", + "ESNext.Array", + "ESNext.AsyncIterable", + "ESNext.BigInt", + "ESNext.Intl", + "ESNext.Promise", + "ESNext.String", + "ESNext.Symbol", + "DOM", + "DOM.Iterable", + "ScriptHost", + "WebWorker", + "WebWorker.ImportScripts", + "Webworker.Iterable", + "ES7", + "ES2021", + "ES2020.SharedMemory", + "ES2020.Intl", + "ES2020.Date", + "ES2020.Number", + "ES2021.Promise", + "ES2021.String", + "ES2021.WeakRef", + "ESNext.WeakRef", + "ES2021.Intl", + "ES2022", + "ES2022.Array", + "ES2022.Error", + "ES2022.Intl", + "ES2022.Object", + "ES2022.String", + "ES2022.SharedMemory", + "ES2022.RegExp", + "ES2023", + "ES2023.Array", + "Decorators", + "Decorators.Legacy", + "ES2017.Date", + "ES2023.Collection", + "ESNext.Decorators", + "ESNext.Disposable" + ] + }, + { + "pattern": "^[Ee][Ss]5|[Ee][Ss]6|[Ee][Ss]7$" + }, + { + "pattern": "^[Ee][Ss]2015(\\.([Cc][Oo][Ll][Ll][Ee][Cc][Tt][Ii][Oo][Nn]|[Cc][Oo][Rr][Ee]|[Gg][Ee][Nn][Ee][Rr][Aa][Tt][Oo][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}, + { + "pattern": "^[Ss][Cc][Rr][Ii][Pp][Tt][Hh][Oo][Ss][Tt]$" + }, + { + "pattern": "^[Ww][Ee][Bb][Ww][Oo][Rr][Kk][Ee][Rr](\\.([Ii][Mm][Pp][Oo][Rr][Tt][Ss][Cc][Rr][Ii][Pp][Tt][Ss]|[Ii][Tt][Ee][Rr][Aa][Bb][Ll][Ee]))?$" + }, + { + "pattern": "^[Dd][Ee][Cc][Oo][Rr][Aa][Tt][Oo][Rr][Ss](\\.([Ll][Ee][Gg][Aa][Cc][Yy]))?$" + } + ] + }, + "markdownDescription": "Specify a set of bundled library declaration files that describe the target runtime environment.\n\nSee more: https://www.typescriptlang.org/tsconfig#lib" + }, + "moduleDetection": { + "description": "Specify how TypeScript determine a file as module.", + "enum": [ + "auto", + "legacy", + "force" + ] + }, + "strictNullChecks": { + "description": "When type checking, take into account `null` and `undefined`.", + "type": "boolean", + "default": false, + "markdownDescription": "When type checking, take into account `null` and `undefined`.\n\nSee more: https://www.typescriptlang.org/tsconfig#strictNullChecks" + }, + "maxNodeModuleJsDepth": { + "description": "Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`.", + "type": "number", + "default": 0, + "markdownDescription": "Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`.\n\nSee more: https://www.typescriptlang.org/tsconfig#maxNodeModuleJsDepth" + }, + "importHelpers": { + "description": "Allow importing helper functions from tslib once per project, instead of including them per-file.", + "type": "boolean", + "default": false, + "markdownDescription": "Allow importing helper functions from tslib once per project, instead of including them per-file.\n\nSee more: https://www.typescriptlang.org/tsconfig#importHelpers" + }, + "importsNotUsedAsValues": { + "description": "Specify emit/checking behavior for imports that are only used for types.", + "default": "remove", + "enum": [ + "remove", + "preserve", + "error" + ] + }, + "alwaysStrict": { + "description": "Ensure 'use strict' is always emitted.", + "type": "boolean", + "markdownDescription": "Ensure 'use strict' is always emitted.\n\nSee more: https://www.typescriptlang.org/tsconfig#alwaysStrict" + }, + "strict": { + "description": "Enable all strict type checking options.", + "type": "boolean", + "default": false, + "markdownDescription": "Enable all strict type checking options.\n\nSee more: https://www.typescriptlang.org/tsconfig#strict" + }, + "strictBindCallApply": { + "description": "Check that the arguments for `bind`, `call`, and `apply` methods match the original function.", + "type": "boolean", + "default": false, + "markdownDescription": "Check that the arguments for `bind`, `call`, and `apply` methods match the original function.\n\nSee more: https://www.typescriptlang.org/tsconfig#strictBindCallApply" + }, + "downlevelIteration": { + "description": "Emit more compliant, but verbose and less performant JavaScript for iteration.", + "type": "boolean", + "default": false, + "markdownDescription": "Emit more compliant, but verbose and less performant JavaScript for iteration.\n\nSee more: https://www.typescriptlang.org/tsconfig#downlevelIteration" + }, + "checkJs": { + "description": "Enable error reporting in type-checked JavaScript files.", + "type": "boolean", + "default": false, + "markdownDescription": "Enable error reporting in type-checked JavaScript files.\n\nSee more: https://www.typescriptlang.org/tsconfig#checkJs" + }, + "strictFunctionTypes": { + "description": "When assigning functions, check to ensure parameters and the return values are subtype-compatible.", + "type": "boolean", + "default": false, + "markdownDescription": "When assigning functions, check to ensure parameters and the return values are subtype-compatible.\n\nSee more: https://www.typescriptlang.org/tsconfig#strictFunctionTypes" + }, + "strictPropertyInitialization": { + "description": "Check for class properties that are declared but not set in the constructor.", + "type": "boolean", + "default": false, + "markdownDescription": "Check for class properties that are declared but not set in the constructor.\n\nSee more: https://www.typescriptlang.org/tsconfig#strictPropertyInitialization" + }, + "esModuleInterop": { + "description": "Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility.", + "type": "boolean", + "default": false, + "markdownDescription": "Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility.\n\nSee more: https://www.typescriptlang.org/tsconfig#esModuleInterop" + }, + "allowUmdGlobalAccess": { + "description": "Allow accessing UMD globals from modules.", + "type": "boolean", + "default": false, + "markdownDescription": "Allow accessing UMD globals from modules.\n\nSee more: https://www.typescriptlang.org/tsconfig#allowUmdGlobalAccess" + }, + "keyofStringsOnly": { + "description": "Make keyof only return strings instead of string, numbers or symbols. Legacy option.", + "type": "boolean", + "default": false, + "markdownDescription": "Make keyof only return strings instead of string, numbers or symbols. Legacy option.\n\nSee more: https://www.typescriptlang.org/tsconfig#keyofStringsOnly" + }, + "useDefineForClassFields": { + "description": "Emit ECMAScript-standard-compliant class fields.", + "type": "boolean", + "default": false, + "markdownDescription": "Emit ECMAScript-standard-compliant class fields.\n\nSee more: https://www.typescriptlang.org/tsconfig#useDefineForClassFields" + }, + "declarationMap": { + "description": "Create sourcemaps for d.ts files.", + "type": "boolean", + "default": false, + "markdownDescription": "Create sourcemaps for d.ts files.\n\nSee more: https://www.typescriptlang.org/tsconfig#declarationMap" + }, + "resolveJsonModule": { + "description": "Enable importing .json files", + "type": "boolean", + "default": false, + "markdownDescription": "Enable importing .json files\n\nSee more: https://www.typescriptlang.org/tsconfig#resolveJsonModule" + }, + "resolvePackageJsonExports": { + "description": "Use the package.json 'exports' field when resolving package imports.", + "type": "boolean", + "default": false, + "markdownDescription": "Use the package.json 'exports' field when resolving package imports.\n\nSee more: https://www.typescriptlang.org/tsconfig#resolvePackageJsonExports" + }, + "resolvePackageJsonImports": { + "description": "Use the package.json 'imports' field when resolving imports.", + "type": "boolean", + "default": false, + "markdownDescription": "Use the package.json 'imports' field when resolving imports.\n\nSee more: https://www.typescriptlang.org/tsconfig#resolvePackageJsonImports" + }, + "assumeChangesOnlyAffectDirectDependencies": { + "description": "Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it. Requires TypeScript version 3.8 or later.", + "type": "boolean" + }, + "extendedDiagnostics": { + "description": "Output more detailed compiler performance information after building.", + "type": "boolean", + "default": false, + "markdownDescription": "Output more detailed compiler performance information after building.\n\nSee more: https://www.typescriptlang.org/tsconfig#extendedDiagnostics" + }, + "listFilesOnly": { + "description": "Print names of files that are part of the compilation and then stop processing.", + "type": "boolean" + }, + "disableSourceOfProjectReferenceRedirect": { + "description": "Disable preferring source files instead of declaration files when referencing composite projects", + "type": "boolean", + "markdownDescription": "Disable preferring source files instead of declaration files when referencing composite projects\n\nSee more: https://www.typescriptlang.org/tsconfig#disableSourceOfProjectReferenceRedirect" + }, + "disableSolutionSearching": { + "description": "Opt a project out of multi-project reference checking when editing.", + "type": "boolean", + "markdownDescription": "Opt a project out of multi-project reference checking when editing.\n\nSee more: https://www.typescriptlang.org/tsconfig#disableSolutionSearching" + }, + "verbatimModuleSyntax": { + "description": "Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting.", + "type": "boolean", + "markdownDescription": "Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting.\n\nSee more: https://www.typescriptlang.org/tsconfig#verbatimModuleSyntax" + } + } + } + } + }, + "typeAcquisitionDefinition": { + "properties": { + "typeAcquisition": { + "type": "object", + "description": "Auto type (.d.ts) acquisition options for this project. Requires TypeScript version 2.1 or later.", + "properties": { + "enable": { + "description": "Enable auto type acquisition", + "type": "boolean", + "default": false + }, + "include": { + "description": "Specifies a list of type declarations to be included in auto type acquisition. Ex. [\"jquery\", \"lodash\"]", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "exclude": { + "description": "Specifies a list of type declarations to be excluded from auto type acquisition. Ex. [\"jquery\", \"lodash\"]", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + } + } + }, + "referencesDefinition": { + "properties": { + "references": { + "type": "array", + "uniqueItems": true, + "description": "Referenced projects. Requires TypeScript version 3.0 or later.", + "items": { + "type": "object", + "description": "Project reference.", + "properties": { + "path": { + "type": "string", + "description": "Path to referenced tsconfig or to folder containing tsconfig." + } + } + } + } + } + }, + "tsNodeModuleTypes": { + "type": "object" + }, + "tsNodeDefinition": { + "properties": { + "ts-node": { + "description": "ts-node options. See also: https://typestrong.org/ts-node/docs/configuration\n\nts-node offers TypeScript execution and REPL for node.js, with source map support.", + "properties": { + "compiler": { + "default": "typescript", + "description": "Specify a custom TypeScript compiler.", + "type": "string" + }, + "compilerHost": { + "default": false, + "description": "Use TypeScript's compiler host API instead of the language service API.", + "type": "boolean" + }, + "compilerOptions": { + "additionalProperties": true, + "allOf": [ + { + "$ref": "#/definitions/compilerOptionsDefinition/properties/compilerOptions" + } + ], + "description": "JSON object to merge with TypeScript `compilerOptions`.", + "properties": {}, + "type": "object" + }, + "emit": { + "default": false, + "description": "Emit output files into `.ts-node` directory.", + "type": "boolean" + }, + "esm": { + "description": "Enable native ESM support.\n\nFor details, see https://typestrong.org/ts-node/docs/imports#native-ecmascript-modules", + "type": "boolean" + }, + "experimentalReplAwait": { + "description": "Allows the usage of top level await in REPL.\n\nUses node's implementation which accomplishes this with an AST syntax transformation.\n\nEnabled by default when tsconfig target is es2018 or above. Set to false to disable.\n\n**Note**: setting to `true` when tsconfig target is too low will throw an Error. Leave as `undefined`\nto get default, automatic behavior.", + "type": "boolean" + }, + "experimentalResolver": { + "description": "Enable experimental features that re-map imports and require calls to support:\n`baseUrl`, `paths`, `rootDirs`, `.js` to `.ts` file extension mappings,\n`outDir` to `rootDir` mappings for composite projects and monorepos.\n\nFor details, see https://github.com/TypeStrong/ts-node/issues/1514", + "type": "boolean" + }, + "experimentalSpecifierResolution": { + "description": "Like node's `--experimental-specifier-resolution`, , but can also be set in your `tsconfig.json` for convenience.\n\nFor details, see https://nodejs.org/dist/latest-v18.x/docs/api/esm.html#customizing-esm-specifier-resolution-algorithm", + "enum": [ + "explicit", + "node" + ], + "type": "string" + }, + "experimentalTsImportSpecifiers": { + "description": "Allow using voluntary `.ts` file extension in import specifiers.\n\nTypically, in ESM projects, import specifiers must have an emit extension, `.js`, `.cjs`, or `.mjs`,\nand we automatically map to the corresponding `.ts`, `.cts`, or `.mts` source file. This is the\nrecommended approach.\n\nHowever, if you really want to use `.ts` in import specifiers, and are aware that this may\nbreak tooling, you can enable this flag.", + "type": "boolean" + }, + "files": { + "default": false, + "description": "Load \"files\" and \"include\" from `tsconfig.json` on startup.\n\nDefault is to override `tsconfig.json` \"files\" and \"include\" to only include the entrypoint script.", + "type": "boolean" + }, + "ignore": { + "default": [ + "(?:^|/)node_modules/" + ], + "description": "Paths which should not be compiled.\n\nEach string in the array is converted to a regular expression via `new RegExp()` and tested against source paths prior to compilation.\n\nSource paths are normalized to posix-style separators, relative to the directory containing `tsconfig.json` or to cwd if no `tsconfig.json` is loaded.\n\nDefault is to ignore all node_modules subdirectories.", + "items": { + "type": "string" + }, + "type": "array" + }, + "ignoreDiagnostics": { + "description": "Ignore TypeScript warnings by diagnostic code.", + "items": { + "type": [ + "string", + "number" + ] + }, + "type": "array" + }, + "logError": { + "default": false, + "description": "Logs TypeScript errors to stderr instead of throwing exceptions.", + "type": "boolean" + }, + "moduleTypes": { + "$ref": "#/definitions/tsNodeModuleTypes", + "description": "Override certain paths to be compiled and executed as CommonJS or ECMAScript modules.\nWhen overridden, the tsconfig \"module\" and package.json \"type\" fields are overridden, and\nthe file extension is ignored.\nThis is useful if you cannot use .mts, .cts, .mjs, or .cjs file extensions;\nit achieves the same effect.\n\nEach key is a glob pattern following the same rules as tsconfig's \"include\" array.\nWhen multiple patterns match the same file, the last pattern takes precedence.\n\n`cjs` overrides matches files to compile and execute as CommonJS.\n`esm` overrides matches files to compile and execute as native ECMAScript modules.\n`package` overrides either of the above to default behavior, which obeys package.json \"type\" and\ntsconfig.json \"module\" options." + }, + "preferTsExts": { + "default": false, + "description": "Re-order file extensions so that TypeScript imports are preferred.\n\nFor example, when both `index.js` and `index.ts` exist, enabling this option causes `require('./index')` to resolve to `index.ts` instead of `index.js`", + "type": "boolean" + }, + "pretty": { + "default": false, + "description": "Use pretty diagnostic formatter.", + "type": "boolean" + }, + "require": { + "description": "Modules to require, like node's `--require` flag.\n\nIf specified in `tsconfig.json`, the modules will be resolved relative to the `tsconfig.json` file.\n\nIf specified programmatically, each input string should be pre-resolved to an absolute path for\nbest results.", + "items": { + "type": "string" + }, + "type": "array" + }, + "scope": { + "default": false, + "description": "Scope compiler to files within `scopeDir`.", + "type": "boolean" + }, + "scopeDir": { + "default": "First of: `tsconfig.json` \"rootDir\" if specified, directory containing `tsconfig.json`, or cwd if no `tsconfig.json` is loaded.", + "type": "string" + }, + "skipIgnore": { + "default": false, + "description": "Skip ignore check, so that compilation will be attempted for all files with matching extensions.", + "type": "boolean" + }, + "swc": { + "description": "Transpile with swc instead of the TypeScript compiler, and skip typechecking.\n\nEquivalent to setting both `transpileOnly: true` and `transpiler: 'ts-node/transpilers/swc'`\n\nFor complete instructions: https://typestrong.org/ts-node/docs/transpilers", + "type": "boolean" + }, + "transpileOnly": { + "default": false, + "description": "Use TypeScript's faster `transpileModule`.", + "type": "boolean" + }, + "transpiler": { + "anyOf": [ + { + "items": [ + { + "type": "string" + }, + { + "additionalProperties": true, + "properties": {}, + "type": "object" + } + ], + "maxItems": 2, + "minItems": 2, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Specify a custom transpiler for use with transpileOnly" + }, + "typeCheck": { + "default": true, + "description": "**DEPRECATED** Specify type-check is enabled (e.g. `transpileOnly == false`).", + "type": "boolean" + } + }, + "type": "object" + } + } + } + }, + "id": "https://json.schemastore.org/tsconfig", + "title": "JSON schema for the TypeScript compiler's configuration file", + "type": "object" +} \ No newline at end of file diff --git a/node_modules/typescript/LICENSE b/node_modules/typescript/LICENSE new file mode 100644 index 0000000..8746124 --- /dev/null +++ b/node_modules/typescript/LICENSE @@ -0,0 +1,55 @@ +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and + +You must cause any modified files to carry prominent notices stating that You changed the files; and + +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS diff --git a/node_modules/typescript/NOTICE.txt b/node_modules/typescript/NOTICE.txt new file mode 100644 index 0000000..0c40b1e --- /dev/null +++ b/node_modules/typescript/NOTICE.txt @@ -0,0 +1,436 @@ +NOTICES AND INFORMATION +Do Not Translate or Localize + +This software incorporates material from third parties. +Microsoft makes certain open source code available at https://3rdpartysource.microsoft.com, +or you may send a check or money order for US $5.00, including the product name, +the open source component name, platform, and version number, to: + +Source Code Compliance Team +Microsoft Corporation +One Microsoft Way +Redmond, WA 98052 +USA + +Notwithstanding any other terms, you may reverse engineer this software to the extent +required to debug changes to any libraries licensed under the GNU Lesser General Public License. + + +------------------- DefinitelyTyped -------------------- +This file is based on or incorporates material from the projects listed below (collectively "Third Party Code"). Microsoft is not the original author of the Third Party Code. The original copyright notice and the license, under which Microsoft received such Third Party Code, are set forth below. Such licenses and notices are provided for informational purposes only. Microsoft, not the third party, licenses the Third Party Code to you under the terms set forth in the EULA for the Microsoft Product. Microsoft reserves all other rights not expressly granted under this agreement, whether by implication, estoppel or otherwise. +DefinitelyTyped +This project is licensed under the MIT license. Copyrights are respective of each contributor listed at the beginning of each definition file. Provided for Informational Purposes Only + +MIT License +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +-------------------------------------------------------------------------------------- + +------------------- Unicode -------------------- +UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE + +Unicode Data Files include all data files under the directories +http://www.unicode.org/Public/, http://www.unicode.org/reports/, +http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and +http://www.unicode.org/utility/trac/browser/. + +Unicode Data Files do not include PDF online code charts under the +directory http://www.unicode.org/Public/. + +Software includes any source code published in the Unicode Standard +or under the directories +http://www.unicode.org/Public/, http://www.unicode.org/reports/, +http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and +http://www.unicode.org/utility/trac/browser/. + +NOTICE TO USER: Carefully read the following legal agreement. +BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S +DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), +YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE +TERMS AND CONDITIONS OF THIS AGREEMENT. +IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE +THE DATA FILES OR SOFTWARE. + +COPYRIGHT AND PERMISSION NOTICE + +Copyright (c) 1991-2017 Unicode, Inc. All rights reserved. +Distributed under the Terms of Use in http://www.unicode.org/copyright.html. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Unicode data files and any associated documentation +(the "Data Files") or Unicode software and any associated documentation +(the "Software") to deal in the Data Files or Software +without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, and/or sell copies of +the Data Files or Software, and to permit persons to whom the Data Files +or Software are furnished to do so, provided that either +(a) this copyright and permission notice appear with all copies +of the Data Files or Software, or +(b) this copyright and permission notice appear in associated +Documentation. + +THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT OF THIRD PARTY RIGHTS. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS +NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL +DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THE DATA FILES OR SOFTWARE. + +Except as contained in this notice, the name of a copyright holder +shall not be used in advertising or otherwise to promote the sale, +use or other dealings in these Data Files or Software without prior +written authorization of the copyright holder. +------------------------------------------------------------------------------------- + +-------------------Document Object Model----------------------------- +DOM + +W3C License +This work is being provided by the copyright holders under the following license. +By obtaining and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions. +Permission to copy, modify, and distribute this work, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following +on ALL copies of the work or portions thereof, including modifications: +* The full text of this NOTICE in a location viewable to users of the redistributed or derivative work. +* Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software and Document Short Notice should be included. +* Notice of any changes or modifications, through a copyright statement on the new code or document such as "This software or document includes material copied from or derived +from [title and URI of the W3C document]. Copyright © [YEAR] W3C® (MIT, ERCIM, Keio, Beihang)." +Disclaimers +THIS WORK IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR +FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENT WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. +COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENT. +The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the work without specific, written prior permission. +Title to copyright in this work will at all times remain with copyright holders. + +--------- + +DOM +Copyright © 2018 WHATWG (Apple, Google, Mozilla, Microsoft). This work is licensed under a Creative Commons Attribution 4.0 International License: Attribution 4.0 International +======================================================================= +Creative Commons Corporation ("Creative Commons") is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an "as-is" basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. Using Creative Commons Public Licenses Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC- licensed material, or material used under an exception or limitation to copyright. More considerations for licensors: + +wiki.creativecommons.org/Considerations_for_licensors Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor's permission is not necessary for any reason--for example, because of any applicable exception or limitation to copyright--then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More_considerations for the public: wiki.creativecommons.org/Considerations_for_licensees ======================================================================= +Creative Commons Attribution 4.0 International Public License By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. Section 1 -- Definitions. a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. c. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. d. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. e. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. f. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. g. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. h. Licensor means the individual(s) or entity(ies) granting rights under this Public License. i. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. j. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. k. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. Section 2 -- Scope. a. License grant. 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: a. reproduce and Share the Licensed Material, in whole or in part; and b. produce, reproduce, and Share Adapted Material. 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. 3. Term. The term of this Public License is specified in Section 6(a). 4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a) (4) never produces Adapted Material. 5. Downstream recipients. a. Offer from the Licensor -- Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. b. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. 6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). b. Other rights. 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. 2. Patent and trademark rights are not licensed under this Public License. 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties. Section 3 -- License Conditions. Your exercise of the Licensed Rights is expressly made subject to the following conditions. a. Attribution. 1. If You Share the Licensed Material (including in modified form), You must: a. retain the following if it is supplied by the Licensor with the Licensed Material: i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); ii. a copyright notice; iii. a notice that refers to this Public License; iv. a notice that refers to the disclaimer of warranties; v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; b. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and c. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. 4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License. Section 4 -- Sui Generis Database Rights. Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database; b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. Section 5 -- Disclaimer of Warranties and Limitation of Liability. a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. Section 6 -- Term and Termination. a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or 2. upon express reinstatement by the Licensor. For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. Section 7 -- Other Terms and Conditions. a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. Section 8 -- Interpretation. a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. ======================================================================= Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the "Licensor." Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark "Creative Commons" or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. Creative Commons may be contacted at creativecommons.org. + +-------------------------------------------------------------------------------- + +----------------------Web Background Synchronization------------------------------ + +Web Background Synchronization Specification +Portions of spec © by W3C + +W3C Community Final Specification Agreement +To secure commitments from participants for the full text of a Community or Business Group Report, the group may call for voluntary commitments to the following terms; a "summary" is +available. See also the related "W3C Community Contributor License Agreement". +1. The Purpose of this Agreement. +This Agreement sets forth the terms under which I make certain copyright and patent rights available to you for your implementation of the Specification. +Any other capitalized terms not specifically defined herein have the same meaning as those terms have in the "W3C Patent Policy", and if not defined there, in the "W3C Process Document". +2. Copyrights. +2.1. Copyright Grant. I grant to you a perpetual (for the duration of the applicable copyright), worldwide, non-exclusive, no-charge, royalty-free, copyright license, without any obligation for accounting to me, to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, distribute, and implement the Specification to the full extent of my copyright interest in the Specification. +2.2. Attribution. As a condition of the copyright grant, you must include an attribution to the Specification in any derivative work you make based on the Specification. That attribution must include, at minimum, the Specification name and version number. +3. Patents. +3.1. Patent Licensing Commitment. I agree to license my Essential Claims under the W3C Community RF Licensing Requirements. This requirement includes Essential Claims that I own and any that I have the right to license without obligation of payment or other consideration to an unrelated third party. W3C Community RF Licensing Requirements obligations made concerning the Specification and described in this policy are binding on me for the life of the patents in question and encumber the patents containing Essential Claims, regardless of changes in participation status or W3C Membership. I also agree to license my Essential Claims under the W3C Community RF Licensing Requirements in derivative works of the Specification so long as all normative portions of the Specification are maintained and that this licensing commitment does not extend to any portion of the derivative work that was not included in the Specification. +3.2. Optional, Additional Patent Grant. In addition to the provisions of Section 3.1, I may also, at my option, make certain intellectual property rights infringed by implementations of the Specification, including Essential Claims, available by providing those terms via the W3C Web site. +4. No Other Rights. Except as specifically set forth in this Agreement, no other express or implied patent, trademark, copyright, or other property rights are granted under this Agreement, including by implication, waiver, or estoppel. +5. Antitrust Compliance. I acknowledge that I may compete with other participants, that I am under no obligation to implement the Specification, that each participant is free to develop competing technologies and standards, and that each party is free to license its patent rights to third parties, including for the purpose of enabling competing technologies and standards. +6. Non-Circumvention. I agree that I will not intentionally take or willfully assist any third party to take any action for the purpose of circumventing my obligations under this Agreement. +7. Transition to W3C Recommendation Track. The Specification developed by the Project may transition to the W3C Recommendation Track. The W3C Team is responsible for notifying me that a Corresponding Working Group has been chartered. I have no obligation to join the Corresponding Working Group. If the Specification developed by the Project transitions to the W3C Recommendation Track, the following terms apply: +7.1. If I join the Corresponding Working Group. If I join the Corresponding Working Group, I will be subject to all W3C rules, obligations, licensing commitments, and policies that govern that Corresponding Working Group. +7.2. If I Do Not Join the Corresponding Working Group. +7.2.1. Licensing Obligations to Resulting Specification. If I do not join the Corresponding Working Group, I agree to offer patent licenses according to the W3C Royalty-Free licensing requirements described in Section 5 of the W3C Patent Policy for the portions of the Specification included in the resulting Recommendation. This licensing commitment does not extend to any portion of an implementation of the Recommendation that was not included in the Specification. This licensing commitment may not be revoked but may be modified through the exclusion process defined in Section 4 of the W3C Patent Policy. I am not required to join the Corresponding Working Group to exclude patents from the W3C Royalty-Free licensing commitment, but must otherwise follow the normal exclusion procedures defined by the W3C Patent Policy. The W3C Team will notify me of any Call for Exclusion in the Corresponding Working Group as set forth in Section 4.5 of the W3C Patent Policy. +7.2.2. No Disclosure Obligation. If I do not join the Corresponding Working Group, I have no patent disclosure obligations outside of those set forth in Section 6 of the W3C Patent Policy. +8. Conflict of Interest. I will disclose significant relationships when those relationships might reasonably be perceived as creating a conflict of interest with my role. I will notify W3C of any change in my affiliation using W3C-provided mechanisms. +9. Representations, Warranties and Disclaimers. I represent and warrant that I am legally entitled to grant the rights and promises set forth in this Agreement. IN ALL OTHER RESPECTS THE SPECIFICATION IS PROVIDED “AS IS.” The entire risk as to implementing or otherwise using the Specification is assumed by the implementer and user. Except as stated herein, I expressly disclaim any warranties (express, implied, or otherwise), including implied warranties of merchantability, non-infringement, fitness for a particular purpose, or title, related to the Specification. IN NO EVENT WILL ANY PARTY BE LIABLE TO ANY OTHER PARTY FOR LOST PROFITS OR ANY FORM OF INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER FROM ANY CAUSES OF ACTION OF ANY KIND WITH RESPECT TO THIS AGREEMENT, WHETHER BASED ON BREACH OF CONTRACT, TORT (INCLUDING NEGLIGENCE), OR OTHERWISE, AND WHETHER OR NOT THE OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. All of my obligations under Section 3 regarding the transfer, successors in interest, or assignment of Granted Claims will be satisfied if I notify the transferee or assignee of any patent that I know contains Granted Claims of the obligations under Section 3. Nothing in this Agreement requires me to undertake a patent search. +10. Definitions. +10.1. Agreement. “Agreement” means this W3C Community Final Specification Agreement. +10.2. Corresponding Working Group. “Corresponding Working Group” is a W3C Working Group that is chartered to develop a Recommendation, as defined in the W3C Process Document, that takes the Specification as an input. +10.3. Essential Claims. “Essential Claims” shall mean all claims in any patent or patent application in any jurisdiction in the world that would necessarily be infringed by implementation of the Specification. A claim is necessarily infringed hereunder only when it is not possible to avoid infringing it because there is no non-infringing alternative for implementing the normative portions of the Specification. Existence of a non-infringing alternative shall be judged based on the state of the art at the time of the publication of the Specification. The following are expressly excluded from and shall not be deemed to constitute Essential Claims: +10.3.1. any claims other than as set forth above even if contained in the same patent as Essential Claims; and +10.3.2. claims which would be infringed only by: +portions of an implementation that are not specified in the normative portions of the Specification, or +enabling technologies that may be necessary to make or use any product or portion thereof that complies with the Specification and are not themselves expressly set forth in the Specification (e.g., semiconductor manufacturing technology, compiler technology, object-oriented technology, basic operating system technology, and the like); or +the implementation of technology developed elsewhere and merely incorporated by reference in the body of the Specification. +10.3.3. design patents and design registrations. +For purposes of this definition, the normative portions of the Specification shall be deemed to include only architectural and interoperability requirements. Optional features in the RFC 2119 sense are considered normative unless they are specifically identified as informative. Implementation examples or any other material that merely illustrate the requirements of the Specification are informative, rather than normative. +10.4. I, Me, or My. “I,” “me,” or “my” refers to the signatory. +10.5 Project. “Project” means the W3C Community Group or Business Group for which I executed this Agreement. +10.6. Specification. “Specification” means the Specification identified by the Project as the target of this agreement in a call for Final Specification Commitments. W3C shall provide the authoritative mechanisms for the identification of this Specification. +10.7. W3C Community RF Licensing Requirements. “W3C Community RF Licensing Requirements” license shall mean a non-assignable, non-sublicensable license to make, have made, use, sell, have sold, offer to sell, import, and distribute and dispose of implementations of the Specification that: +10.7.1. shall be available to all, worldwide, whether or not they are W3C Members; +10.7.2. shall extend to all Essential Claims owned or controlled by me; +10.7.3. may be limited to implementations of the Specification, and to what is required by the Specification; +10.7.4. may be conditioned on a grant of a reciprocal RF license (as defined in this policy) to all Essential Claims owned or controlled by the licensee. A reciprocal license may be required to be available to all, and a reciprocal license may itself be conditioned on a further reciprocal license from all. +10.7.5. may not be conditioned on payment of royalties, fees or other consideration; +10.7.6. may be suspended with respect to any licensee when licensor issued by licensee for infringement of claims essential to implement the Specification or any W3C Recommendation; +10.7.7. may not impose any further conditions or restrictions on the use of any technology, intellectual property rights, or other restrictions on behavior of the licensee, but may include reasonable, customary terms relating to operation or maintenance of the license relationship such as the following: choice of law and dispute resolution; +10.7.8. shall not be considered accepted by an implementer who manifests an intent not to accept the terms of the W3C Community RF Licensing Requirements license as offered by the licensor. +10.7.9. The RF license conforming to the requirements in this policy shall be made available by the licensor as long as the Specification is in effect. The term of such license shall be for the life of the patents in question. +I am encouraged to provide a contact from which licensing information can be obtained and other relevant licensing information. Any such information will be made publicly available. +10.8. You or Your. “You,” “you,” or “your” means any person or entity who exercises copyright or patent rights granted under this Agreement, and any person that person or entity controls. + +------------------------------------------------------------------------------------- + +------------------- WebGL ----------------------------- +Copyright (c) 2018 The Khronos Group Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and/or associated documentation files (the +"Materials"), to deal in the Materials without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Materials, and to +permit persons to whom the Materials are furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Materials. + +THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +------------------------------------------------------ + +--------------------------------------------------------- + +github.com/zeebo/xxh3 v1.1.0 - BSD-2-Clause + + +Copyright (c) 2019, Jeff Wendling +Copyright (c) 2012-2014, Yann Collet + +Copyright (c) . All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--------------------------------------------------------- + +--------------------------------------------------------- + +github.com/go-json-experiment/json v0.0.0-20260623181947-01eb4420fa68 - BSD-3-Clause + + +Copyright 2010 The Go Authors +Copyright 2011 The Go Authors +Copyright 2016 The Go Authors +Copyright 2018 The Go Authors +Copyright 2020 The Go Authors +Copyright 2021 The Go Authors +Copyright 2022 The Go Authors +Copyright 2023 The Go Authors +Copyright 2024 The Go Authors +Copyright (c) 2020 The Go Authors + +Copyright (c) . All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--------------------------------------------------------- + +--------------------------------------------------------- + +golang.org/x/sync v0.21.0 - BSD-3-Clause AND LicenseRef-scancode-google-patent-license-golang + + +Copyright 2009 The Go Authors +Copyright 2013 The Go Authors +Copyright 2016 The Go Authors +Copyright 2017 The Go Authors +Copyright 2019 The Go Authors + +BSD-3-Clause AND LicenseRef-scancode-google-patent-license-golang + +--------------------------------------------------------- + +--------------------------------------------------------- + +golang.org/x/sys v0.46.0 - BSD-3-Clause AND LicenseRef-scancode-google-patent-license-golang + + +Copyright 2009 The Go Authors +Copyright 2010 The Go Authors +Copyright 2011 The Go Authors +Copyright 2012 The Go Authors +Copyright 2013 The Go Authors +Copyright 2014 The Go Authors +Copyright 2015 The Go Authors +Copyright 2016 The Go Authors +Copyright 2017 The Go Authors +Copyright 2018 The Go Authors +Copyright 2019 The Go Authors +Copyright 2020 The Go Authors +Copyright 2021 The Go Authors +Copyright 2022 The Go Authors +Copyright 2023 The Go Authors +Copyright 2024 The Go Authors +Copyright 2025 The Go Authors +Copyright 2009,2010 The Go Authors + +BSD-3-Clause AND LicenseRef-scancode-google-patent-license-golang + +--------------------------------------------------------- + +--------------------------------------------------------- + +golang.org/x/term v0.44.0 - BSD-3-Clause AND LicenseRef-scancode-google-patent-license-golang + + +Copyright 2009 The Go Authors +Copyright 2011 The Go Authors +Copyright 2013 The Go Authors +Copyright 2019 The Go Authors +Copyright 2021 The Go Authors + +BSD-3-Clause AND LicenseRef-scancode-google-patent-license-golang + +--------------------------------------------------------- + +--------------------------------------------------------- + +golang.org/x/text v0.38.0 - BSD-3-Clause AND LicenseRef-scancode-google-patent-license-golang + + +(c) AeHa (c) +(c) EeAoq (c) +(c) EAiE (c) A +(c) lEEe (c) AE +(c) (c) AAEE (c) +(c) oav!A (c) AY +(c) aA"AE (c) 1AE (c) +Copyright 2009 The Go Authors +Copyright 2011 The Go Authors +Copyright 2012 The Go Authors +Copyright 2013 The Go Authors +Copyright 2014 The Go Authors +Copyright 2015 The Go Authors +Copyright 2016 The Go Authors +Copyright 2017 The Go Authors +Copyright 2018 The Go Authors +Copyright 2019 The Go Authors +Copyright 2021 The Go Authors +Copyright 2025 The Go Authors + +BSD-3-Clause AND LicenseRef-scancode-google-patent-license-golang + +--------------------------------------------------------- + +--------------------------------------------------------- + +github.com/klauspost/cpuid/v2 v2.2.10 - MIT + + +Copyright (c) 2015 Klaus Post +Copyright (c) 2020 Klaus Post +Copyright (c) 2021 Klaus Post +Copyright 2018 The Go Authors +Copyright (c) 2015- Klaus Post & Contributors + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------------------------- + +--------------------------------------------------------- + +github.com/Microsoft/go-winio v0.6.2 - MIT + + +Copyright (c) 2015 Microsoft +Copyright 2013 The Go Authors + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------------------------- + +--------------------------------------------------------- + +github.com/mackerelio/go-osstat v0.2.7 - Apache-2.0 + + +Copyright 2017-2019 Hatena Co., Ltd. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +--------------------------------------------------------- + +--------------------------------------------------------- + +parcel-bundler/watcher 8926bb8b281733bbfcaf69bb4e62ab7a1431c42a - MIT + + +Copyright Node.js contributors +Copyright 2012-2020 Facebook, Inc. +Copyright (c) 2017-present Devon Govett + +MIT License + +Copyright (c) 2017-present Devon Govett + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +--------------------------------------------------------- + diff --git a/node_modules/typescript/README.md b/node_modules/typescript/README.md new file mode 100644 index 0000000..7b87989 --- /dev/null +++ b/node_modules/typescript/README.md @@ -0,0 +1,49 @@ +# TypeScript + +[![CI](https://github.com/microsoft/TypeScript/actions/workflows/ci.yml/badge.svg)](https://github.com/microsoft/TypeScript/actions/workflows/ci.yml) +[![npm version](https://badge.fury.io/js/typescript.svg)](https://www.npmjs.com/package/typescript) +[![Downloads](https://img.shields.io/npm/dm/typescript.svg)](https://www.npmjs.com/package/typescript) +[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/microsoft/TypeScript/badge)](https://securityscorecards.dev/viewer/?uri=github.com/microsoft/TypeScript) + +[TypeScript](https://www.typescriptlang.org/) is a language for application-scale JavaScript. TypeScript adds optional types to JavaScript that support tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript compiles to readable, standards-based JavaScript. Try it out at the [playground](https://www.typescriptlang.org/play/), and stay up to date via [our blog](https://devblogs.microsoft.com/typescript/) and [Bluesky](https://bsky.app/profile/typescriptlang.org). + +Find others who are using TypeScript at [our community page](https://www.typescriptlang.org/community/). + +## Installing + +For the latest stable version: + +```bash +npm install -D typescript +``` + +For our nightly builds: + +```bash +npm install -D typescript@next +``` + +## Contribute + +There are many ways to [contribute](https://github.com/microsoft/TypeScript/blob/main/CONTRIBUTING.md) to TypeScript. + +* [Submit bugs](https://github.com/microsoft/TypeScript/issues) and help us verify fixes as they are checked in. +* Review the [source code changes](https://github.com/microsoft/TypeScript/pulls). +* Engage with other TypeScript users and developers on [Stack Overflow](https://stackoverflow.com/questions/tagged/typescript). +* Help each other in the [TypeScript Community Discord](https://discord.gg/typescript). +* Join the [#typescript](https://bsky.app/search?q=%23typescript) discussion on Bluesky. +* [Contribute bug fixes](https://github.com/microsoft/TypeScript/blob/main/CONTRIBUTING.md). + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see +the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) +with any additional questions or comments. + +## Documentation + +* [TypeScript in 5 minutes](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html) +* [Programming handbook](https://www.typescriptlang.org/docs/handbook/intro.html) +* [Homepage](https://www.typescriptlang.org/) + +## Roadmap + +For details on our planned features and future direction, please refer to our [roadmap](https://github.com/microsoft/TypeScript/wiki/Roadmap). diff --git a/node_modules/typescript/bin/tsc b/node_modules/typescript/bin/tsc new file mode 100755 index 0000000..34638f8 --- /dev/null +++ b/node_modules/typescript/bin/tsc @@ -0,0 +1,2 @@ +#!/usr/bin/env node +import "../lib/tsc.js"; diff --git a/node_modules/typescript/dist/api/async/api.d.ts b/node_modules/typescript/dist/api/async/api.d.ts new file mode 100644 index 0000000..deb29e9 --- /dev/null +++ b/node_modules/typescript/dist/api/async/api.d.ts @@ -0,0 +1,529 @@ +/// +import { CompletionItemKind } from "#enums/completionItemKind"; +import { DiagnosticCategory } from "#enums/diagnosticCategory"; +import { ElementFlags } from "#enums/elementFlags"; +import { ModuleKind } from "#enums/moduleKind"; +import { NodeBuilderFlags } from "#enums/nodeBuilderFlags"; +import { ObjectFlags } from "#enums/objectFlags"; +import { SignatureFlags } from "#enums/signatureFlags"; +import { SignatureKind } from "#enums/signatureKind"; +import { SymbolFlags } from "#enums/symbolFlags"; +import { TypeFlags } from "#enums/typeFlags"; +import { TypePredicateKind } from "#enums/typePredicateKind"; +import { type __String, type Expression, type Identifier, ModifierFlags, type Node, type Path, type SourceFile, type SyntaxKind, type TypeNode } from "../../ast/index.ts"; +import type { APIOptions, LSPConnectionOptions } from "../options.ts"; +import type { CompilerOptions, ConfigResponse, DocumentIdentifier, DocumentPosition, LSPUpdateSnapshotParams, ProjectResponse, SignatureResponse, SourceFileMetadata, SymbolResponse, TypeResponse, UpdateSnapshotParams, UpdateSnapshotResponse } from "../proto.ts"; +import { SourceFileCache } from "../sourceFileCache.ts"; +import type { RequestTiming, TimingAccumulators, TimingInfo } from "../timing.ts"; +import { Client, type ClientSocketOptions, type ClientSpawnOptions } from "./client.ts"; +import type { AssertsIdentifierTypePredicate, AssertsThisTypePredicate, BigIntLiteralType, BooleanLiteralType, CompletionEntry, CompletionInfo, CompletionOptions, ConditionalType, Diagnostic, FreshableType, IdentifierTypePredicate, IndexedAccessType, IndexInfo, IndexType, InterfaceType, IntersectionType, IntrinsicType, JSDocTagInfo, LiteralType, NumberLiteralType, ObjectType, StringLiteralType, StringMappingType, SubstitutionType, TemplateLiteralType, ThisTypePredicate, TupleType, Type, TypeParameter, TypePredicate, TypePredicateBase, TypeReference, UnionOrIntersectionType, UnionType } from "./types.ts"; +export { documentURIToFileName, fileNameToDocumentURI } from "../path.ts"; +export { CompletionItemKind, DiagnosticCategory, ElementFlags, ModifierFlags, ModuleKind, NodeBuilderFlags, ObjectFlags, SignatureFlags, SignatureKind, SymbolFlags, TypeFlags, TypePredicateKind }; +export type { APIOptions, AssertsIdentifierTypePredicate, AssertsThisTypePredicate, BigIntLiteralType, BooleanLiteralType, ClientSocketOptions, ClientSpawnOptions, CompilerOptions, CompletionEntry, CompletionInfo, CompletionOptions, ConditionalType, Diagnostic, DocumentIdentifier, DocumentPosition, FreshableType, IdentifierTypePredicate, IndexedAccessType, IndexInfo, IndexType, InterfaceType, IntersectionType, IntrinsicType, JSDocTagInfo, LiteralType, LSPConnectionOptions, NumberLiteralType, ObjectType, RequestTiming, SourceFileMetadata, StringLiteralType, StringMappingType, SubstitutionType, TemplateLiteralType, ThisTypePredicate, TimingAccumulators, TimingInfo, TupleType, Type, TypeParameter, TypePredicate, TypePredicateBase, TypeReference, UnionOrIntersectionType, UnionType }; +export declare class API { + private client; + private sourceFileCache; + private toPath; + private initialized; + private activeSnapshots; + private latestSnapshot; + readonly internal: InternalAPI; + constructor(options?: APIOptions | LSPConnectionOptions); + /** + * Create an API instance from an existing LSP connection's API session. + * Use this when connecting to an API pipe provided by an LSP server via custom/initializeAPISession. + */ + static fromLSPConnection(options: LSPConnectionOptions): Promise>; + private ensureInitialized; + parseConfigFile(file: DocumentIdentifier): Promise; + updateSnapshot(params?: FromLSP extends true ? LSPUpdateSnapshotParams : UpdateSnapshotParams): Promise; + close(): Promise; + clearSourceFileCache(): void; + /** + * Returns a snapshot of collected timing information for requests made + * through this API instance: client-measured round-trip latency and bytes + * transferred, folded together with the server's own per-request processing + * time and an estimated transport overhead (round-trip minus server time). + * + * Fetching the snapshot issues a lightweight request to the server to + * retrieve its timing collection. Collection must be enabled via the + * `collectTiming` option; when it is not, the returned snapshot has + * `enabled: false` and zeroed totals. + */ + getTimingInfo(): Promise; + /** Clears all accumulated timing totals and recent-request history, on both the client and the server. */ + resetTimingInfo(): Promise; +} +export declare class InternalAPI { + private client; + private ensureInitialized; + /** @internal */ + constructor(client: Client, ensureInitialized: () => Promise); + startCPUProfile(dir: string): Promise; + stopCPUProfile(): Promise; + saveHeapProfile(dir: string): Promise; +} +export declare class Snapshot { + readonly id: number; + private projectMap; + private toPath; + private client; + private disposed; + private onDispose; + private snapshotRegistry; + constructor(data: UpdateSnapshotResponse, client: Client, sourceFileCache: SourceFileCache, toPath: (fileName: string) => Path, onDispose: () => void); + getProjects(): readonly Project[]; + getProject(configFileName: string): Project | undefined; + getDefaultProjectForFile(file: DocumentIdentifier): Promise; + [globalThis.Symbol.dispose](): void; + dispose(): Promise; + isDisposed(): boolean; + private ensureNotDisposed; +} +declare class SnapshotObjectRegistry { + private readonly symbols; + private readonly client; + private readonly snapshotId; + private readonly resolveProject; + constructor(client: Client, snapshotId: number, resolveProject: (projectId: Path) => Project | undefined); + /** Resolve a project id (a config file path) to its Project within this snapshot. */ + getProject(projectId: Path): Project | undefined; + getOrCreateSymbol(data: SymbolResponse): Symbol; + getSymbol(id: number): Symbol | undefined; + clear(): void; + fetchSymbol(source: Symbol | Signature | Type, method: string, handle: number | undefined, projectId?: Path): Promise; + fetchSymbols(source: Symbol | Signature | Type, method: string, handles?: readonly number[], projectId?: Path): Promise; +} +declare class ProjectObjectRegistry { + private client; + private snapshotId; + private project; + private snapshotRegistry; + private types; + private signatures; + constructor(client: Client, snapshotId: number, project: Project, snapshotRegistry: SnapshotObjectRegistry); + getOrCreateSymbol(data: SymbolResponse): Symbol; + getSymbol(id: number): Symbol | undefined; + getOrCreateType(data: TypeResponse): TypeObject; + getType(id: number): TypeObject | undefined; + getOrCreateSignature(data: SignatureResponse): Signature; + getSignature(id: number): Signature | undefined; + clear(): void; + fetchType(source: Symbol | Signature | Type, method: string, handle: number | false | undefined): Promise; + fetchSymbol(source: Symbol | Signature | Type, method: string, handle: number | undefined): Promise; + fetchSignature(source: Symbol | Signature | Type, method: string, handle: number | undefined): Promise; + fetchTypes(source: Symbol | Signature | Type, method: string, handles?: readonly number[]): Promise; + fetchSymbols(source: Symbol | Signature | Type, method: string, handles?: readonly number[]): Promise; + fetchBaseTypes(source: Type): Promise; +} +export declare class Project { + readonly id: Path; + readonly configFileName: string; + readonly compilerOptions: CompilerOptions; + readonly rootFiles: readonly string[]; + readonly program: Program; + readonly checker: Checker; + readonly emitter: Emitter; + private client; + constructor(data: ProjectResponse, snapshotId: number, client: Client, sourceFileCache: SourceFileCache, toPath: (fileName: string) => Path, snapshotRegistry: SnapshotObjectRegistry); + dispose(): void; +} +export declare class Program { + private snapshotId; + private project; + private client; + private sourceFileCache; + private toPath; + private decoder; + private sourceFileMetadataCache; + constructor(snapshotId: number, project: Project, client: Client, sourceFileCache: SourceFileCache, toPath: (fileName: string) => Path); + getCompilerOptions(): CompilerOptions; + getSourceFile(file: DocumentIdentifier): Promise; + getSourceFileNames(): Promise; + /** + * Returns program-stored metadata for the given source file, or `undefined` if the file + * is not part of the program. Metadata is fetched lazily per file and cached on this + * `Program` instance. + */ + getSourceFileMetadata(fileName: string): Promise; + /** + * Returns program-stored metadata for the source file at the given path, or `undefined` + * if the file is not part of the program. Like {@link getSourceFileMetadata}, but skips + * the file name to path conversion. Metadata is fetched lazily per file and cached on + * this `Program` instance. + */ + getSourceFileMetadataByPath(path: Path): Promise; + private fetchSourceFileMetadata; + /** + * Returns whether the given source file was loaded as part of an external library + * (e.g. a dependency resolved from `node_modules`). The underlying program metadata is + * fetched lazily per file and cached on this `Program` instance. + */ + isSourceFileFromExternalLibrary(file: SourceFile): Promise; + /** + * Returns whether the given source file is a default library file (e.g. `lib.d.ts`). + * The underlying program metadata is fetched lazily per file and cached on this + * `Program` instance. + */ + isSourceFileDefaultLibrary(file: SourceFile): Promise; + /** + * Get syntactic (parse) diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + getSyntacticDiagnostics(file?: DocumentIdentifier): Promise; + /** + * Get binder diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + getBindDiagnostics(file?: DocumentIdentifier): Promise; + /** + * Get semantic (type-check) diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + getSemanticDiagnostics(file?: DocumentIdentifier): Promise; + /** + * Get suggestion diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + getSuggestionDiagnostics(file?: DocumentIdentifier): Promise; + /** + * Get declaration emit diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + getDeclarationDiagnostics(file?: DocumentIdentifier): Promise; + /** + * Get program-wide diagnostics for the project, including compiler options diagnostics. + */ + getProgramDiagnostics(): Promise; + /** + * Get global (non-file-specific) semantic diagnostics for the project. + */ + getGlobalDiagnostics(): Promise; + /** + * Get config file parsing diagnostics for the project. + */ + getConfigFileParsingDiagnostics(): Promise; +} +export declare class Checker { + private snapshotId; + private project; + private client; + private objectRegistry; + private wellKnownSymbols; + constructor(snapshotId: number, project: Project, client: Client, objectRegistry: ProjectObjectRegistry); + dispose(): void; + getSymbolAtLocation(node: Node): Promise; + getSymbolAtLocation(nodes: readonly Node[]): Promise<(Symbol | undefined)[]>; + getSymbolAtPosition(file: DocumentIdentifier, position: number): Promise; + getSymbolAtPosition(file: DocumentIdentifier, positions: readonly number[]): Promise<(Symbol | undefined)[]>; + getTypeOfSymbol(symbol: Symbol): Promise; + getTypeOfSymbol(symbols: readonly Symbol[]): Promise<(Type | undefined)[]>; + /** + * Get the declared type of a symbol. Always returns a type; for symbols whose + * declared type cannot be determined the checker yields the error type (use + * {@link Type.isErrorType} to detect it). + */ + getDeclaredTypeOfSymbol(symbol: Symbol): Promise; + getReferencesToSymbolInFile(file: DocumentIdentifier, symbol: Symbol): Promise; + getReferencedSymbolsForNode(node: Node, position: number): Promise; + getSignatureUsage(signatureDecl: Node): Promise; + getCompletionsAtPosition(document: string, position: number, options?: CompletionOptions): Promise; + getTypeAtLocation(node: Node): Promise; + getTypeAtLocation(nodes: readonly Node[]): Promise<(Type | undefined)[]>; + getSignaturesOfType(type: Type, kind: SignatureKind): Promise; + getResolvedSignature(node: Node): Promise; + getTypeAtPosition(file: DocumentIdentifier, position: number): Promise; + getTypeAtPosition(file: DocumentIdentifier, positions: readonly number[]): Promise<(Type | undefined)[]>; + resolveName(name: string, meaning: SymbolFlags, location?: Node | DocumentPosition, excludeGlobals?: boolean): Promise; + getResolvedSymbol(node: Identifier): Promise; + getContextualType(node: Expression): Promise; + getBaseTypeOfLiteralType(type: Type): Promise; + getNonNullableType(type: Type): Promise; + getTypeFromTypeNode(node: TypeNode): Promise; + getWidenedType(type: Type): Promise; + getParameterType(signature: Signature, index: number): Promise; + isArrayLikeType(type: Type): Promise; + isTypeAssignableTo(source: Type, target: Type): Promise; + getShorthandAssignmentValueSymbol(node: Node): Promise; + /** + * Get the type of a symbol as narrowed at a specific location. Always returns + * a type; for symbols whose type cannot be determined the checker yields the + * error type (use {@link Type.isErrorType} to detect it). + */ + getTypeOfSymbolAtLocation(symbol: Symbol, location: Node): Promise; + private getIntrinsicType; + getAnyType(): Promise; + getStringType(): Promise; + getNumberType(): Promise; + getBooleanType(): Promise; + getVoidType(): Promise; + getUndefinedType(): Promise; + getNullType(): Promise; + getNeverType(): Promise; + getUnknownType(): Promise; + getBigIntType(): Promise; + getESSymbolType(): Promise; + typeToTypeNode(type: Type, enclosingDeclaration?: Node, flags?: number): Promise; + signatureToSignatureDeclaration(signature: Signature, kind: SyntaxKind, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): Promise; + typeToString(type: Type, enclosingDeclaration?: Node, flags?: number): Promise; + isContextSensitive(node: Node): Promise; + isArrayType(type: Type): Promise; + isTupleType(type: Type): Promise; + getReturnTypeOfSignature(signature: Signature): Promise; + getRestTypeOfSignature(signature: Signature): Promise; + getTypePredicateOfSignature(signature: Signature): Promise; + /** + * Get the base types of a class or interface type. A type with no base types + * yields an empty array. + */ + getBaseTypes(type: InterfaceType): Promise; + getApparentType(type: Type): Promise; + getPropertiesOfType(type: Type): Promise; + getIndexInfosOfType(type: Type): Promise; + /** + * Get the constraint of a type parameter (the `T` in ``), or + * undefined if it has none. + */ + getConstraintOfTypeParameter(type: TypeParameter): Promise; + getBaseConstraintOfType(type: Type): Promise; + getPropertyOfType(type: Type, name: string): Promise; + getConstantValue(node: Node): Promise; + getSignatureFromDeclaration(node: Node): Promise; + getExportSpecifierLocalTargetSymbol(node: Node): Promise; + /** + * Follow all aliases to get the original symbol. Always returns a symbol; for + * an unresolved alias the checker yields the unknown symbol (use + * {@link Checker.isUnknownSymbol} to detect it). + */ + getAliasedSymbol(symbol: Symbol): Promise; + getImmediateAliasedSymbol(symbol: Symbol): Promise; + /** + * Fetch (once, then cache) the handle ids of the per-checker singleton + * symbols (unknown, undefined, arguments). These ids are stable for the life + * of the project's checker, so identity checks against them are local after + * the first call. + */ + private getWellKnownSymbols; + /** + * Returns `true` if the symbol is the checker's "unknown" symbol (e.g. the + * result of {@link Checker.getAliasedSymbol} on an unresolved alias). + */ + isUnknownSymbol(symbol: Symbol): Promise; + /** + * Returns `true` if the symbol is the checker's "undefined" symbol. + */ + isUndefinedSymbol(symbol: Symbol): Promise; + /** + * Returns `true` if the symbol is the checker's "arguments" symbol. + */ + isArgumentsSymbol(symbol: Symbol): Promise; + getExportsOfModule(symbol: Symbol): Promise; + getMemberInModuleExports(symbol: Symbol, name: string): Promise; + getJsDocTagsOfSymbol(symbol: Symbol): Promise; + getDocumentationCommentOfSymbol(symbol: Symbol): Promise; + /** + * Get the type arguments of a type reference (e.g. the `string` in `Array`). + */ + getTypeArguments(type: TypeReference): Promise; +} +export interface PrintNodeOptions { + preserveSourceNewlines?: boolean | undefined; + neverAsciiEscape?: boolean | undefined; + terminateUnterminatedLiterals?: boolean | undefined; +} +export declare class Emitter { + private client; + constructor(client: Client); + printNode(node: Node, options?: PrintNodeOptions): Promise; +} +export declare class NodeHandle { + /** + * The project this handle was produced in, used as the default for {@link resolve}. + * Node handles are only meaningful within a project's program, so the producing project + * is remembered so callers don't have to pass it explicitly. + */ + private readonly canonicalProject; + readonly index: number; + readonly kind: SyntaxKind; + readonly path: Path; + constructor(handle: string, canonicalProject: Project); + /** + * Resolve this handle to the actual AST node by fetching the source file from a project + * and looking up the node by index. If no project is passed, the project that produced + * the handle is used. + */ + resolve(project?: Project): Promise; +} +/** A symbol definition paired with all of its reference nodes. */ +export interface ReferencedSymbolEntry { + /** The node handle for the symbol's definition. */ + definition: NodeHandle; + /** The resolved symbol for the definition, if available. */ + symbol?: Symbol | undefined; + /** The node handles for each reference to the symbol. */ + references: NodeHandle[]; +} +/** A single usage of a signature, pairing the reference name with its call expression (if any). */ +export interface SignatureUsage { + /** The node handle for the name reference. */ + name: NodeHandle; + /** The node handle for the call expression, if the reference is invoked. */ + call?: NodeHandle | undefined; +} +export declare class Symbol { + private objectRegistry; + /** + * The project this symbol was first observed in, used as the default project for + * lookups that need a project context (members/exports/parent). Symbols are shared + * snapshot-wide, so these lookups can otherwise be ambiguous about which project to use. + */ + private readonly canonicalProject; + readonly id: number; + /** The escaped (`__String`) name, used as the key in member/export tables. */ + readonly escapedName: __String; + /** The display name (escaped underscores removed). */ + readonly name: string; + readonly flags: SymbolFlags; + readonly checkFlags: number; + readonly declarations: readonly NodeHandle[]; + readonly valueDeclaration: NodeHandle | undefined; + private readonly parent; + private readonly exportSymbol; + private membersCache; + private exportsCache; + constructor(data: SymbolResponse, objectRegistry: SnapshotObjectRegistry); + getParent(): Promise; + /** + * Get this symbol's members keyed by escaped name. The result is cached on + * the symbol, so repeated calls do not round-trip to the server. + */ + getMembers(): Promise>; + /** + * Get this symbol's exports keyed by escaped name. The result is cached on + * the symbol, so repeated calls do not round-trip to the server. + */ + getExports(): Promise>; + private fetchSymbolTable; + getExportSymbol(): Promise; + getJsDocTags(checker: Checker): Promise; + getDocumentationComment(checker: Checker): Promise; +} +declare class TypeObject implements Type { + private objectRegistry; + readonly id: number; + readonly flags: TypeFlags; + readonly objectFlags: ObjectFlags; + readonly symbol: number; + readonly value: string | number | boolean | bigint; + readonly intrinsicName: string; + readonly isThisType: boolean; + readonly freshType: number; + readonly regularType: number; + readonly target: number; + readonly typeParameters: readonly number[]; + readonly outerTypeParameters: readonly number[]; + readonly localTypeParameters: readonly number[]; + readonly aliasTypeArguments: readonly number[]; + readonly aliasSymbol: number; + readonly elementFlags: readonly ElementFlags[]; + readonly fixedLength: number; + readonly readonly: boolean; + readonly texts: readonly string[]; + readonly objectType: number; + readonly indexType: number; + readonly checkType: number; + readonly extendsType: number; + readonly baseType: number; + readonly substConstraint: number; + private trueType; + private falseType; + constructor(data: TypeResponse, objectRegistry: ProjectObjectRegistry); + getSymbol(): Promise; + getAliasSymbol(): Promise; + getTarget(): Promise; + getFreshType(): Promise; + getRegularType(): Promise; + getTypes(): Promise; + getTypeParameters(): Promise; + getOuterTypeParameters(): Promise; + getLocalTypeParameters(): Promise; + getAliasTypeArguments(): Promise; + getObjectType(): Promise; + getIndexType(): Promise; + getCheckType(): Promise; + getExtendsType(): Promise; + getBaseType(): Promise; + getConstraint(): Promise; + getTrueType(): Promise; + getFalseType(): Promise; + /** + * Get the base types of this type. Returns `undefined` for any type that is + * not a class or interface. + */ + getBaseTypes(): Promise; + isClassOrInterface(): this is InterfaceType; + isUnionType(): this is UnionType; + isIntersectionType(): this is IntersectionType; + isObjectType(): this is ObjectType; + isIntrinsicType(): this is IntrinsicType; + isErrorType(): boolean; + isLiteralType(): this is LiteralType; + isStringLiteralType(): this is StringLiteralType; + isNumberLiteralType(): this is NumberLiteralType; + isBigIntLiteralType(): this is BigIntLiteralType; + isBooleanLiteralType(): this is BooleanLiteralType; + isTypeReference(): this is TypeReference; + isTupleType(): this is TupleType; + isIndexType(): this is IndexType; + isIndexedAccessType(): this is IndexedAccessType; + isConditionalType(): this is ConditionalType; + isSubstitutionType(): this is SubstitutionType; + isTemplateLiteralType(): this is TemplateLiteralType; + isStringMappingType(): this is StringMappingType; + isTypeParameter(): this is TypeParameter; +} +export declare function isUnionType(type: Type): type is UnionType; +export declare function isIntersectionType(type: Type): type is IntersectionType; +export declare function isObjectType(type: Type): type is ObjectType; +export declare function isClassOrInterfaceType(type: Type): type is InterfaceType; +export declare function isIntrinsicType(type: Type): type is IntrinsicType; +/** + * Whether this is the error type — the placeholder the checker produces when a + * type cannot be determined (e.g. an unresolved reference). It is an intrinsic + * type named `"error"` (this covers both the singleton error type and the + * per-alias error types manufactured for unresolved type alias references). + */ +export declare function isErrorType(type: Type): boolean; +export declare function isLiteralType(type: Type): type is LiteralType; +export declare function isStringLiteralType(type: Type): type is StringLiteralType; +export declare function isNumberLiteralType(type: Type): type is NumberLiteralType; +export declare function isBigIntLiteralType(type: Type): type is BigIntLiteralType; +export declare function isBooleanLiteralType(type: Type): type is BooleanLiteralType; +export declare function isTypeReference(type: Type): type is TypeReference; +export declare function isTupleType(type: Type): type is TupleType; +export declare function isIndexType(type: Type): type is IndexType; +export declare function isIndexedAccessType(type: Type): type is IndexedAccessType; +export declare function isConditionalType(type: Type): type is ConditionalType; +export declare function isSubstitutionType(type: Type): type is SubstitutionType; +export declare function isTemplateLiteralType(type: Type): type is TemplateLiteralType; +export declare function isStringMappingType(type: Type): type is StringMappingType; +export declare function isTypeParameter(type: Type): type is TypeParameter; +export declare class Signature { + private flags; + private objectRegistry; + readonly id: number; + readonly declaration?: NodeHandle | undefined; + readonly typeParameters?: readonly number[] | undefined; + readonly parameters: readonly number[]; + readonly thisParameter?: number | undefined; + readonly target?: number | undefined; + constructor(data: SignatureResponse, project: Project, objectRegistry: ProjectObjectRegistry); + getTypeParameters(): Promise; + getParameters(): Promise; + getThisParameter(): Promise; + getTarget(): Promise; + get hasRestParameter(): boolean; + get isConstruct(): boolean; + get isAbstract(): boolean; +} +//# sourceMappingURL=api.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/async/api.d.ts.map b/node_modules/typescript/dist/api/async/api.d.ts.map new file mode 100644 index 0000000..5dfbc7d --- /dev/null +++ b/node_modules/typescript/dist/api/async/api.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/api/async/api.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,E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,CAE7E;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,iBAAiB,CAEzE;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,aAAa,CAEjE;AAED,qBAAa,SAAS;IAClB,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,cAAc,CAAwB;IAE9C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,WAAW,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAC9C,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IACxD,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5C,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;gBAEzB,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,qBAAqB;IAWtF,iBAAiB,IAAI,OAAO,CAAC,SAAS,aAAa,EAAE,CAAC;IAItD,aAAa,IAAI,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC;IAI3C,gBAAgB,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAI/C,SAAS,IAAI,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;IAIjD,IAAI,gBAAgB,IAAI,OAAO,CAE9B;IAED,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED,IAAI,UAAU,IAAI,OAAO,CAExB;CACJ"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/async/api.js b/node_modules/typescript/dist/api/async/api.js new file mode 100644 index 0000000..78993ae --- /dev/null +++ b/node_modules/typescript/dist/api/async/api.js @@ -0,0 +1,1657 @@ +/// +import { CompletionItemKind } from "#enums/completionItemKind"; +import { DiagnosticCategory } from "#enums/diagnosticCategory"; +import { ElementFlags } from "#enums/elementFlags"; +import { ModuleKind } from "#enums/moduleKind"; +import { NodeBuilderFlags } from "#enums/nodeBuilderFlags"; +import { ObjectFlags } from "#enums/objectFlags"; +import { SignatureFlags } from "#enums/signatureFlags"; +import { SignatureKind } from "#enums/signatureKind"; +import { SymbolFlags } from "#enums/symbolFlags"; +import { TypeFlags } from "#enums/typeFlags"; +import { TypePredicateKind } from "#enums/typePredicateKind"; +import { ModifierFlags, unescapeLeadingUnderscores, } from "../../ast/index.js"; +import { encodeNode, uint8ArrayToBase64, } from "../node/encoder.js"; +import { decodeNode, getNodeId, parseNodeHandle, readParseOptionsKey, readSourceFileHash, RemoteSourceFile, } from "../node/node.js"; +import { Wtf8Decoder } from "../node/wtf8.js"; +import { createGetCanonicalFileName, toPath, } from "../path.js"; +import { resolveFileName, toUpdateSnapshotRequest, } from "../proto.js"; +import { SourceFileCache } from "../sourceFileCache.js"; +import { Client, } from "./client.js"; +export { documentURIToFileName, fileNameToDocumentURI } from "../path.js"; +export { CompletionItemKind, DiagnosticCategory, ElementFlags, ModifierFlags, ModuleKind, NodeBuilderFlags, ObjectFlags, SignatureFlags, SignatureKind, SymbolFlags, TypeFlags, TypePredicateKind }; +export class API { + client; + sourceFileCache; + toPath; + initialized = false; + activeSnapshots = new Set(); + latestSnapshot; + internal; + constructor(options = {}) { + this.client = new Client(options); + this.sourceFileCache = new SourceFileCache(); + this.internal = new InternalAPI(this.client, () => this.ensureInitialized()); + } + /** + * Create an API instance from an existing LSP connection's API session. + * Use this when connecting to an API pipe provided by an LSP server via custom/initializeAPISession. + */ + static async fromLSPConnection(options) { + const api = new API(options); + await api.ensureInitialized(); + return api; + } + async ensureInitialized() { + if (!this.initialized) { + const response = await this.client.apiRequest("initialize", null); + const getCanonicalFileName = createGetCanonicalFileName(response.useCaseSensitiveFileNames); + const currentDirectory = response.currentDirectory; + this.toPath = (fileName) => toPath(fileName, currentDirectory, getCanonicalFileName); + this.initialized = true; + } + } + async parseConfigFile(file) { + await this.ensureInitialized(); + return this.client.apiRequest("parseConfigFile", { file }); + } + async updateSnapshot(params) { + await this.ensureInitialized(); + const requestParams = toUpdateSnapshotRequest(params); + const data = await this.client.apiRequest("updateSnapshot", requestParams); + // Retain cached source files from previous snapshot for unchanged files + if (this.latestSnapshot) { + this.sourceFileCache.retainForSnapshot(data.snapshot, this.latestSnapshot.id, data.changes); + if (this.latestSnapshot.isDisposed()) { + this.sourceFileCache.releaseSnapshot(this.latestSnapshot.id); + } + } + const snapshot = new Snapshot(data, this.client, this.sourceFileCache, this.toPath, () => { + this.activeSnapshots.delete(snapshot); + if (snapshot !== this.latestSnapshot) { + this.sourceFileCache.releaseSnapshot(snapshot.id); + } + }); + this.latestSnapshot = snapshot; + this.activeSnapshots.add(snapshot); + return snapshot; + } + async close() { + // Dispose all active snapshots + for (const snapshot of [...this.activeSnapshots]) { + await snapshot.dispose(); + } + // Release the latest snapshot's cache refs if still held + if (this.latestSnapshot) { + this.sourceFileCache.releaseSnapshot(this.latestSnapshot.id); + this.latestSnapshot = undefined; + } + await this.client.close(); + this.sourceFileCache.clear(); + } + clearSourceFileCache() { + this.sourceFileCache.clear(); + } + /** + * Returns a snapshot of collected timing information for requests made + * through this API instance: client-measured round-trip latency and bytes + * transferred, folded together with the server's own per-request processing + * time and an estimated transport overhead (round-trip minus server time). + * + * Fetching the snapshot issues a lightweight request to the server to + * retrieve its timing collection. Collection must be enabled via the + * `collectTiming` option; when it is not, the returned snapshot has + * `enabled: false` and zeroed totals. + */ + getTimingInfo() { + return this.client.getTimingInfo(); + } + /** Clears all accumulated timing totals and recent-request history, on both the client and the server. */ + resetTimingInfo() { + return this.client.resetTimingInfo(); + } +} +export class InternalAPI { + client; + ensureInitialized; + /** @internal */ + constructor(client, ensureInitialized) { + this.client = client; + this.ensureInitialized = ensureInitialized; + } + async startCPUProfile(dir) { + await this.ensureInitialized(); + await this.client.apiRequest("startCPUProfile", { dir }); + } + async stopCPUProfile() { + await this.ensureInitialized(); + const result = await this.client.apiRequest("stopCPUProfile", null); + return result.file; + } + async saveHeapProfile(dir) { + await this.ensureInitialized(); + const result = await this.client.apiRequest("saveHeapProfile", { dir }); + return result.file; + } +} +export class Snapshot { + id; + projectMap; + toPath; + client; + disposed = false; + onDispose; + snapshotRegistry; + constructor(data, client, sourceFileCache, toPath, onDispose) { + this.id = data.snapshot; + this.client = client; + this.toPath = toPath; + this.onDispose = onDispose; + this.projectMap = new Map(); + this.snapshotRegistry = new SnapshotObjectRegistry(client, this.id, projectId => this.projectMap.get(projectId)); + for (const projData of data.projects) { + const project = new Project(projData, this.id, client, sourceFileCache, toPath, this.snapshotRegistry); + this.projectMap.set(toPath(projData.configFileName), project); + } + } + getProjects() { + this.ensureNotDisposed(); + return [...this.projectMap.values()]; + } + getProject(configFileName) { + this.ensureNotDisposed(); + return this.projectMap.get(this.toPath(configFileName)); + } + async getDefaultProjectForFile(file) { + this.ensureNotDisposed(); + const data = await this.client.apiRequest("getDefaultProjectForFile", { + snapshot: this.id, + file, + }); + if (!data) + return undefined; + return this.projectMap.get(this.toPath(data.configFileName)); + } + [globalThis.Symbol.dispose]() { + this.dispose(); + } + async dispose() { + if (this.disposed) + return; + this.disposed = true; + for (const project of this.projectMap.values()) { + project.dispose(); + } + this.projectMap.clear(); + this.snapshotRegistry.clear(); + this.onDispose(); + await this.client.apiRequest("release", { snapshot: this.id }); + } + isDisposed() { + return this.disposed; + } + ensureNotDisposed() { + if (this.disposed) { + throw new Error("Snapshot is disposed"); + } + } +} +class SnapshotObjectRegistry { + symbols = new Map(); + client; + snapshotId; + resolveProject; + constructor(client, snapshotId, resolveProject) { + this.client = client; + this.snapshotId = snapshotId; + this.resolveProject = resolveProject; + } + /** Resolve a project id (a config file path) to its Project within this snapshot. */ + getProject(projectId) { + return this.resolveProject(projectId); + } + getOrCreateSymbol(data) { + let symbol = this.symbols.get(data.id); + if (!symbol) { + symbol = new Symbol(data, this); + this.symbols.set(data.id, symbol); + } + return symbol; + } + getSymbol(id) { + return this.symbols.get(id); + } + clear() { + this.symbols.clear(); + } + async fetchSymbol(source, method, handle, projectId) { + if (!handle) + return undefined; + const cached = this.getSymbol(handle); + if (cached) + return cached; + const data = await this.client.apiRequest(method, { + snapshot: this.snapshotId, + project: projectId, + objectId: source.id, + }); + if (!data) + throw new Error(`${method} returned null symbol for ${source.constructor.name} ${source.id}`); + return this.getOrCreateSymbol(data); + } + async fetchSymbols(source, method, handles, projectId) { + if (handles) { + const result = new Array(handles.length); + let allCached = true; + for (let i = 0; i < handles.length; i++) { + const cached = this.getSymbol(handles[i]); + if (!cached) { + allCached = false; + break; + } + result[i] = cached; + } + if (allCached) + return result; + } + const symbolData = await this.client.apiRequest(method, { + snapshot: this.snapshotId, + project: projectId, + objectId: source.id, + }); + if (symbolData == null) + return []; + else + return symbolData.map(data => this.getOrCreateSymbol(data)); + } +} +class ProjectObjectRegistry { + client; + snapshotId; + project; + snapshotRegistry; + types = new Map(); + signatures = new Map(); + constructor(client, snapshotId, project, snapshotRegistry) { + this.client = client; + this.snapshotId = snapshotId; + this.project = project; + this.snapshotRegistry = snapshotRegistry; + } + getOrCreateSymbol(data) { + return this.snapshotRegistry.getOrCreateSymbol(data); + } + getSymbol(id) { + return this.snapshotRegistry.getSymbol(id); + } + getOrCreateType(data) { + let type = this.types.get(data.id); + if (!type) { + type = new TypeObject(data, this); + this.types.set(data.id, type); + } + return type; + } + getType(id) { + return this.types.get(id); + } + getOrCreateSignature(data) { + let sig = this.signatures.get(data.id); + if (!sig) { + sig = new Signature(data, this.project, this); + this.signatures.set(data.id, sig); + } + return sig; + } + getSignature(id) { + return this.signatures.get(id); + } + clear() { + this.types.clear(); + this.signatures.clear(); + } + async fetchType(source, method, handle) { + if (handle !== false) { + if (!handle) + return undefined; + const cached = this.getType(handle); + if (cached) + return cached; + } + const data = await this.client.apiRequest(method, { + snapshot: this.snapshotId, + project: this.project.id, + objectId: source.id, + }); + if (!data) + throw new Error(`${method} returned null type for ${source.constructor.name} ${source.id}`); + return this.getOrCreateType(data); + } + async fetchSymbol(source, method, handle) { + return this.snapshotRegistry.fetchSymbol(source, method, handle, this.project.id); + } + async fetchSignature(source, method, handle) { + if (!handle) + return undefined; + const cached = this.getSignature(handle); + if (cached) + return cached; + const data = await this.client.apiRequest(method, { + snapshot: this.snapshotId, + project: this.project.id, + objectId: source.id, + }); + if (!data) + throw new Error(`${method} returned null signature for ${source.constructor.name} ${source.id}`); + return this.getOrCreateSignature(data); + } + async fetchTypes(source, method, handles) { + if (handles) { + const result = new Array(handles.length); + let allCached = true; + for (let i = 0; i < handles.length; i++) { + const cached = this.getType(handles[i]); + if (!cached) { + allCached = false; + break; + } + result[i] = cached; + } + if (allCached) + return result; + } + const typesData = await this.client.apiRequest(method, { + snapshot: this.snapshotId, + project: this.project.id, + objectId: source.id, + }); + if (typesData == null) + return []; + else + return typesData.map(data => this.getOrCreateType(data)); + } + async fetchSymbols(source, method, handles) { + return this.snapshotRegistry.fetchSymbols(source, method, handles, this.project.id); + } + // getBaseTypes is a checker-level endpoint keyed by `type` (not `objectId`), + // so it cannot go through fetchTypes. This helper reuses that server method. + async fetchBaseTypes(source) { + const typesData = await this.client.apiRequest("getBaseTypes", { + snapshot: this.snapshotId, + project: this.project.id, + type: source.id, + }); + if (typesData == null) + return []; + return typesData.map(data => this.getOrCreateType(data)); + } +} +export class Project { + id; + configFileName; + compilerOptions; + rootFiles; + program; + checker; + emitter; + client; + constructor(data, snapshotId, client, sourceFileCache, toPath, snapshotRegistry) { + this.id = data.id; + this.configFileName = data.configFileName; + this.compilerOptions = data.compilerOptions; + this.rootFiles = data.rootFiles; + this.client = client; + this.program = new Program(snapshotId, this, client, sourceFileCache, toPath); + const objectRegistry = new ProjectObjectRegistry(client, snapshotId, this, snapshotRegistry); + this.checker = new Checker(snapshotId, this, client, objectRegistry); + this.emitter = new Emitter(client); + } + dispose() { + this.checker.dispose(); + } +} +export class Program { + snapshotId; + project; + client; + sourceFileCache; + toPath; + decoder = new Wtf8Decoder(); + sourceFileMetadataCache = new Map(); + constructor(snapshotId, project, client, sourceFileCache, toPath) { + this.snapshotId = snapshotId; + this.project = project; + this.client = client; + this.sourceFileCache = sourceFileCache; + this.toPath = toPath; + } + getCompilerOptions() { + return this.project.compilerOptions; + } + async getSourceFile(file) { + const fileName = resolveFileName(file); + const path = this.toPath(fileName); + // Check if we already have a retained cache entry for this (snapshot, project) pair + const retained = this.sourceFileCache.getRetained(path, this.snapshotId, this.project.id); + if (retained) { + return retained; + } + // Fetch from server + const binaryData = await this.client.apiRequestBinary("getSourceFile", { + snapshot: this.snapshotId, + project: this.project.id, + file, + }); + if (!binaryData) { + return undefined; + } + const view = new DataView(binaryData.buffer, binaryData.byteOffset, binaryData.byteLength); + const contentHash = readSourceFileHash(view); + const parseOptionsKey = readParseOptionsKey(view); + // Create a new RemoteSourceFile and cache it (set returns existing if hash matches) + const sourceFile = new RemoteSourceFile(binaryData, this.decoder, this.client.getTimingCollector()); + return this.sourceFileCache.set(path, sourceFile, parseOptionsKey, contentHash, this.snapshotId, this.project.id); + } + async getSourceFileNames() { + const data = await this.client.apiRequest("getSourceFileNames", { + snapshot: this.snapshotId, + project: this.project.id, + }); + return data ?? []; + } + /** + * Returns program-stored metadata for the given source file, or `undefined` if the file + * is not part of the program. Metadata is fetched lazily per file and cached on this + * `Program` instance. + */ + getSourceFileMetadata(fileName) { + return this.getSourceFileMetadataByPath(this.toPath(fileName)); + } + /** + * Returns program-stored metadata for the source file at the given path, or `undefined` + * if the file is not part of the program. Like {@link getSourceFileMetadata}, but skips + * the file name to path conversion. Metadata is fetched lazily per file and cached on + * this `Program` instance. + */ + getSourceFileMetadataByPath(path) { + let metadata = this.sourceFileMetadataCache.get(path); + if (metadata === undefined) { + metadata = this.fetchSourceFileMetadata(path); + this.sourceFileMetadataCache.set(path, metadata); + } + return metadata; + } + async fetchSourceFileMetadata(path) { + const data = await this.client.apiRequest("getSourceFileMetadata", { + snapshot: this.snapshotId, + project: this.project.id, + file: path, + }); + return data ?? undefined; + } + /** + * Returns whether the given source file was loaded as part of an external library + * (e.g. a dependency resolved from `node_modules`). The underlying program metadata is + * fetched lazily per file and cached on this `Program` instance. + */ + async isSourceFileFromExternalLibrary(file) { + const metadata = await this.getSourceFileMetadataByPath(file.path); + return metadata?.isFromExternalLibrary ?? false; + } + /** + * Returns whether the given source file is a default library file (e.g. `lib.d.ts`). + * The underlying program metadata is fetched lazily per file and cached on this + * `Program` instance. + */ + async isSourceFileDefaultLibrary(file) { + const metadata = await this.getSourceFileMetadataByPath(file.path); + return metadata?.isDefaultLibrary ?? false; + } + /** + * Get syntactic (parse) diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + async getSyntacticDiagnostics(file) { + const data = await this.client.apiRequest("getSyntacticDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + ...(file !== undefined ? { file } : {}), + }); + return data ?? []; + } + /** + * Get binder diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + async getBindDiagnostics(file) { + const data = await this.client.apiRequest("getBindDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + ...(file !== undefined ? { file } : {}), + }); + return data ?? []; + } + /** + * Get semantic (type-check) diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + async getSemanticDiagnostics(file) { + const data = await this.client.apiRequest("getSemanticDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + ...(file !== undefined ? { file } : {}), + }); + return data ?? []; + } + /** + * Get suggestion diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + async getSuggestionDiagnostics(file) { + const data = await this.client.apiRequest("getSuggestionDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + ...(file !== undefined ? { file } : {}), + }); + return data ?? []; + } + /** + * Get declaration emit diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + async getDeclarationDiagnostics(file) { + const data = await this.client.apiRequest("getDeclarationDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + ...(file !== undefined ? { file } : {}), + }); + return data ?? []; + } + /** + * Get program-wide diagnostics for the project, including compiler options diagnostics. + */ + async getProgramDiagnostics() { + const data = await this.client.apiRequest("getProgramDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + }); + return data ?? []; + } + /** + * Get global (non-file-specific) semantic diagnostics for the project. + */ + async getGlobalDiagnostics() { + const data = await this.client.apiRequest("getGlobalDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + }); + return data ?? []; + } + /** + * Get config file parsing diagnostics for the project. + */ + async getConfigFileParsingDiagnostics() { + const data = await this.client.apiRequest("getConfigFileParsingDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + }); + return data ?? []; + } +} +export class Checker { + snapshotId; + project; + client; + objectRegistry; + wellKnownSymbols; + constructor(snapshotId, project, client, objectRegistry) { + this.snapshotId = snapshotId; + this.project = project; + this.client = client; + this.objectRegistry = objectRegistry; + } + dispose() { + this.objectRegistry.clear(); + } + async getSymbolAtLocation(nodeOrNodes) { + if (Array.isArray(nodeOrNodes)) { + const data = await this.client.apiRequest("getSymbolsAtLocations", { + snapshot: this.snapshotId, + project: this.project.id, + locations: nodeOrNodes.map(node => getNodeId(node)), + }); + return data.map(d => d ? this.objectRegistry.getOrCreateSymbol(d) : undefined); + } + const data = await this.client.apiRequest("getSymbolAtLocation", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(nodeOrNodes), + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + async getSymbolAtPosition(file, positionOrPositions) { + if (typeof positionOrPositions === "number") { + const data = await this.client.apiRequest("getSymbolAtPosition", { + snapshot: this.snapshotId, + project: this.project.id, + file, + position: positionOrPositions, + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + const data = await this.client.apiRequest("getSymbolsAtPositions", { + snapshot: this.snapshotId, + project: this.project.id, + file, + positions: positionOrPositions, + }); + return data.map(d => d ? this.objectRegistry.getOrCreateSymbol(d) : undefined); + } + async getTypeOfSymbol(symbolOrSymbols) { + if (Array.isArray(symbolOrSymbols)) { + const data = await this.client.apiRequest("getTypesOfSymbols", { + snapshot: this.snapshotId, + project: this.project.id, + symbols: symbolOrSymbols.map(s => s.id), + }); + return data.map(d => d ? this.objectRegistry.getOrCreateType(d) : undefined); + } + const data = await this.client.apiRequest("getTypeOfSymbol", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbolOrSymbols.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + /** + * Get the declared type of a symbol. Always returns a type; for symbols whose + * declared type cannot be determined the checker yields the error type (use + * {@link Type.isErrorType} to detect it). + */ + async getDeclaredTypeOfSymbol(symbol) { + const data = await this.client.apiRequest("getDeclaredTypeOfSymbol", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + }); + if (!data) + throw new Error(`getDeclaredTypeOfSymbol returned no type for symbol ${symbol.id}`); + return this.objectRegistry.getOrCreateType(data); + } + async getReferencesToSymbolInFile(file, symbol) { + const data = await this.client.apiRequest("getReferencesToSymbolInFile", { + snapshot: this.snapshotId, + project: this.project.id, + file, + symbol: symbol.id, + }); + return (data ?? []).map(h => new NodeHandle(h, this.project)); + } + async getReferencedSymbolsForNode(node, position) { + const data = await this.client.apiRequest("getReferencedSymbolsForNode", { + snapshot: this.snapshotId, + project: this.project.id, + node: getNodeId(node), + position, + }); + return (data ?? []).map(entry => ({ + definition: new NodeHandle(entry.definition, this.project), + symbol: entry.symbol ? this.objectRegistry.getOrCreateSymbol(entry.symbol) : undefined, + references: (entry.references ?? []).map(h => new NodeHandle(h, this.project)), + })); + } + async getSignatureUsage(signatureDecl) { + const data = await this.client.apiRequest("getSignatureUsages", { + snapshot: this.snapshotId, + project: this.project.id, + signatureDecl: getNodeId(signatureDecl), + }); + return (data ?? []).map(entry => ({ + name: new NodeHandle(entry.name, this.project), + call: entry.call ? new NodeHandle(entry.call, this.project) : undefined, + })); + } + async getCompletionsAtPosition(document, position, options) { + const data = await this.client.apiRequest("getCompletionsAtPosition", { + snapshot: this.snapshotId, + project: this.project.id, + file: document, + position, + triggerCharacter: options?.triggerCharacter, + includeSymbol: options?.includeSymbol, + }); + if (!data) + return undefined; + return { + isIncomplete: data.isIncomplete, + entries: data.entries.map(e => ({ + ...e, + symbol: e.symbol ? this.objectRegistry.getOrCreateSymbol(e.symbol) : undefined, + })), + }; + } + async getTypeAtLocation(nodeOrNodes) { + if (Array.isArray(nodeOrNodes)) { + const data = await this.client.apiRequest("getTypeAtLocations", { + snapshot: this.snapshotId, + project: this.project.id, + locations: nodeOrNodes.map(node => getNodeId(node)), + }); + return data.map(d => d ? this.objectRegistry.getOrCreateType(d) : undefined); + } + const data = await this.client.apiRequest("getTypeAtLocation", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(nodeOrNodes), + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + async getSignaturesOfType(type, kind) { + const data = await this.client.apiRequest("getSignaturesOfType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + kind, + }); + return data.map(d => this.objectRegistry.getOrCreateSignature(d)); + } + async getResolvedSignature(node) { + const data = await this.client.apiRequest("getResolvedSignature", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + return data ? this.objectRegistry.getOrCreateSignature(data) : undefined; + } + async getTypeAtPosition(file, positionOrPositions) { + if (typeof positionOrPositions === "number") { + const data = await this.client.apiRequest("getTypeAtPosition", { + snapshot: this.snapshotId, + project: this.project.id, + file, + position: positionOrPositions, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + const data = await this.client.apiRequest("getTypesAtPositions", { + snapshot: this.snapshotId, + project: this.project.id, + file, + positions: positionOrPositions, + }); + return data.map(d => d ? this.objectRegistry.getOrCreateType(d) : undefined); + } + async resolveName(name, meaning, location, excludeGlobals) { + // Distinguish Node (has `kind`) from DocumentPosition (has `document` and `position`) + const isNode = location && "kind" in location; + const data = await this.client.apiRequest("resolveName", { + snapshot: this.snapshotId, + project: this.project.id, + name, + meaning, + location: isNode ? getNodeId(location) : undefined, + file: !isNode && location ? location.document : undefined, + position: !isNode && location ? location.position : undefined, + excludeGlobals, + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + async getResolvedSymbol(node) { + const text = node.text; + if (!text) + return undefined; + return this.resolveName(text, SymbolFlags.Value | SymbolFlags.ExportValue, node); + } + async getContextualType(node) { + const data = await this.client.apiRequest("getContextualType", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + async getBaseTypeOfLiteralType(type) { + const data = await this.client.apiRequest("getBaseTypeOfLiteralType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + async getNonNullableType(type) { + const data = await this.client.apiRequest("getNonNullableType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + async getTypeFromTypeNode(node) { + const data = await this.client.apiRequest("getTypeFromTypeNode", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + async getWidenedType(type) { + const data = await this.client.apiRequest("getWidenedType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + async getParameterType(signature, index) { + const data = await this.client.apiRequest("getParameterType", { + snapshot: this.snapshotId, + project: this.project.id, + signature: signature.id, + index, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + async isArrayLikeType(type) { + return this.client.apiRequest("isArrayLikeType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + } + async isTypeAssignableTo(source, target) { + return this.client.apiRequest("isTypeAssignableTo", { + snapshot: this.snapshotId, + project: this.project.id, + source: source.id, + target: target.id, + }); + } + async getShorthandAssignmentValueSymbol(node) { + const data = await this.client.apiRequest("getShorthandAssignmentValueSymbol", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + /** + * Get the type of a symbol as narrowed at a specific location. Always returns + * a type; for symbols whose type cannot be determined the checker yields the + * error type (use {@link Type.isErrorType} to detect it). + */ + async getTypeOfSymbolAtLocation(symbol, location) { + const data = await this.client.apiRequest("getTypeOfSymbolAtLocation", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + location: getNodeId(location), + }); + if (!data) + throw new Error(`getTypeOfSymbolAtLocation returned no type for symbol ${symbol.id}`); + return this.objectRegistry.getOrCreateType(data); + } + async getIntrinsicType(method) { + const data = await this.client.apiRequest(method, { + snapshot: this.snapshotId, + project: this.project.id, + }); + return this.objectRegistry.getOrCreateType(data); + } + async getAnyType() { + return this.getIntrinsicType("getAnyType"); + } + async getStringType() { + return this.getIntrinsicType("getStringType"); + } + async getNumberType() { + return this.getIntrinsicType("getNumberType"); + } + async getBooleanType() { + return this.getIntrinsicType("getBooleanType"); + } + async getVoidType() { + return this.getIntrinsicType("getVoidType"); + } + async getUndefinedType() { + return this.getIntrinsicType("getUndefinedType"); + } + async getNullType() { + return this.getIntrinsicType("getNullType"); + } + async getNeverType() { + return this.getIntrinsicType("getNeverType"); + } + async getUnknownType() { + return this.getIntrinsicType("getUnknownType"); + } + async getBigIntType() { + return this.getIntrinsicType("getBigIntType"); + } + async getESSymbolType() { + return this.getIntrinsicType("getESSymbolType"); + } + async typeToTypeNode(type, enclosingDeclaration, flags) { + const binaryData = await this.client.apiRequestBinary("typeToTypeNode", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + location: enclosingDeclaration ? getNodeId(enclosingDeclaration) : undefined, + flags, + }); + if (!binaryData) + return undefined; + return decodeNode(binaryData); + } + async signatureToSignatureDeclaration(signature, kind, enclosingDeclaration, flags) { + const binaryData = await this.client.apiRequestBinary("signatureToSignatureDeclaration", { + snapshot: this.snapshotId, + project: this.project.id, + signature: signature.id, + kind, + location: enclosingDeclaration ? getNodeId(enclosingDeclaration) : undefined, + flags, + }); + if (!binaryData) + return undefined; + return decodeNode(binaryData); + } + async typeToString(type, enclosingDeclaration, flags) { + return this.client.apiRequest("typeToString", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + location: enclosingDeclaration ? getNodeId(enclosingDeclaration) : undefined, + flags, + }); + } + async isContextSensitive(node) { + return this.client.apiRequest("isContextSensitive", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + } + async isArrayType(type) { + return this.client.apiRequest("isArrayType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + } + async isTupleType(type) { + return this.client.apiRequest("isTupleType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + } + async getReturnTypeOfSignature(signature) { + const data = await this.client.apiRequest("getReturnTypeOfSignature", { + snapshot: this.snapshotId, + project: this.project.id, + signature: signature.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + async getRestTypeOfSignature(signature) { + const data = await this.client.apiRequest("getRestTypeOfSignature", { + snapshot: this.snapshotId, + project: this.project.id, + signature: signature.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + async getTypePredicateOfSignature(signature) { + const data = await this.client.apiRequest("getTypePredicateOfSignature", { + snapshot: this.snapshotId, + project: this.project.id, + signature: signature.id, + }); + if (!data) + return undefined; + return { + kind: data.kind, + parameterIndex: data.parameterIndex, + parameterName: data.parameterName, + type: data.type ? this.objectRegistry.getOrCreateType(data.type) : undefined, + }; + } + /** + * Get the base types of a class or interface type. A type with no base types + * yields an empty array. + */ + async getBaseTypes(type) { + const data = await this.client.apiRequest("getBaseTypes", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? data.map(d => this.objectRegistry.getOrCreateType(d)) : []; + } + async getApparentType(type) { + const data = await this.client.apiRequest("getApparentType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + async getPropertiesOfType(type) { + const data = await this.client.apiRequest("getPropertiesOfType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? data.map(d => this.objectRegistry.getOrCreateSymbol(d)) : []; + } + async getIndexInfosOfType(type) { + const data = await this.client.apiRequest("getIndexInfosOfType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + if (!data) + return []; + return data.map(d => ({ + keyType: this.objectRegistry.getOrCreateType(d.keyType), + valueType: this.objectRegistry.getOrCreateType(d.valueType), + isReadonly: d.isReadonly ?? false, + declaration: d.declaration ? new NodeHandle(d.declaration, this.project) : undefined, + })); + } + /** + * Get the constraint of a type parameter (the `T` in ``), or + * undefined if it has none. + */ + async getConstraintOfTypeParameter(type) { + const data = await this.client.apiRequest("getConstraintOfTypeParameter", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + async getBaseConstraintOfType(type) { + const data = await this.client.apiRequest("getBaseConstraintOfType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + async getPropertyOfType(type, name) { + const data = await this.client.apiRequest("getPropertyOfType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + name, + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + async getConstantValue(node) { + const data = await this.client.apiRequest("getConstantValue", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + return data ?? undefined; + } + async getSignatureFromDeclaration(node) { + const data = await this.client.apiRequest("getSignatureFromDeclaration", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + return data ? this.objectRegistry.getOrCreateSignature(data) : undefined; + } + async getExportSpecifierLocalTargetSymbol(node) { + const data = await this.client.apiRequest("getExportSpecifierLocalTargetSymbol", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + /** + * Follow all aliases to get the original symbol. Always returns a symbol; for + * an unresolved alias the checker yields the unknown symbol (use + * {@link Checker.isUnknownSymbol} to detect it). + */ + async getAliasedSymbol(symbol) { + const data = await this.client.apiRequest("getAliasedSymbol", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + }); + if (!data) + throw new Error(`getAliasedSymbol returned no symbol for symbol ${symbol.id}`); + return this.objectRegistry.getOrCreateSymbol(data); + } + async getImmediateAliasedSymbol(symbol) { + const data = await this.client.apiRequest("getImmediateAliasedSymbol", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + /** + * Fetch (once, then cache) the handle ids of the per-checker singleton + * symbols (unknown, undefined, arguments). These ids are stable for the life + * of the project's checker, so identity checks against them are local after + * the first call. + */ + getWellKnownSymbols() { + return this.wellKnownSymbols ??= this.client.apiRequest("getWellKnownSymbols", { + snapshot: this.snapshotId, + project: this.project.id, + }); + } + /** + * Returns `true` if the symbol is the checker's "unknown" symbol (e.g. the + * result of {@link Checker.getAliasedSymbol} on an unresolved alias). + */ + async isUnknownSymbol(symbol) { + return symbol.id === (await this.getWellKnownSymbols()).unknown; + } + /** + * Returns `true` if the symbol is the checker's "undefined" symbol. + */ + async isUndefinedSymbol(symbol) { + return symbol.id === (await this.getWellKnownSymbols()).undefined; + } + /** + * Returns `true` if the symbol is the checker's "arguments" symbol. + */ + async isArgumentsSymbol(symbol) { + return symbol.id === (await this.getWellKnownSymbols()).arguments; + } + async getExportsOfModule(symbol) { + const data = await this.client.apiRequest("getExportsOfModule", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + }); + return data ? data.map(d => this.objectRegistry.getOrCreateSymbol(d)) : []; + } + async getMemberInModuleExports(symbol, name) { + const data = await this.client.apiRequest("getMemberInModuleExports", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + name, + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + async getJsDocTagsOfSymbol(symbol) { + const data = await this.client.apiRequest("getJsDocTags", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + }); + return data ?? []; + } + async getDocumentationCommentOfSymbol(symbol) { + return this.client.apiRequest("getDocumentationComment", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + }); + } + /** + * Get the type arguments of a type reference (e.g. the `string` in `Array`). + */ + async getTypeArguments(type) { + const data = await this.client.apiRequest("getTypeArguments", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? data.map(d => this.objectRegistry.getOrCreateType(d)) : []; + } +} +export class Emitter { + client; + constructor(client) { + this.client = client; + } + async printNode(node, options = {}) { + const encoded = encodeNode(node); + const base64 = uint8ArrayToBase64(encoded); + return this.client.apiRequest("printNode", { + data: base64, + ...options, + }); + } +} +export class NodeHandle { + /** + * The project this handle was produced in, used as the default for {@link resolve}. + * Node handles are only meaningful within a project's program, so the producing project + * is remembered so callers don't have to pass it explicitly. + */ + canonicalProject; + index; + kind; + path; + constructor(handle, canonicalProject) { + const parsed = parseNodeHandle(handle); + this.index = parsed.index; + this.kind = parsed.kind; + this.path = parsed.path; + this.canonicalProject = canonicalProject; + } + /** + * Resolve this handle to the actual AST node by fetching the source file from a project + * and looking up the node by index. If no project is passed, the project that produced + * the handle is used. + */ + async resolve(project = this.canonicalProject) { + const sourceFile = await project.program.getSourceFile(this.path); + if (!sourceFile) { + return undefined; + } + return sourceFile.getOrCreateNodeAtIndex(this.index); + } +} +export class Symbol { + objectRegistry; + /** + * The project this symbol was first observed in, used as the default project for + * lookups that need a project context (members/exports/parent). Symbols are shared + * snapshot-wide, so these lookups can otherwise be ambiguous about which project to use. + */ + canonicalProject; + id; + /** The escaped (`__String`) name, used as the key in member/export tables. */ + escapedName; + /** The display name (escaped underscores removed). */ + name; + flags; + checkFlags; + declarations; + valueDeclaration; + parent; + exportSymbol; + membersCache; + exportsCache; + constructor(data, objectRegistry) { + this.objectRegistry = objectRegistry; + this.id = data.id; + this.escapedName = data.name; + this.name = unescapeLeadingUnderscores(data.name); + this.flags = data.flags; + this.checkFlags = data.checkFlags; + const canonicalProject = objectRegistry.getProject(data.project); + if (!canonicalProject) { + throw new Error(`Symbol ${data.id} references unknown canonical project '${data.project}'`); + } + this.canonicalProject = canonicalProject; + this.declarations = (data.declarations ?? []).map(d => new NodeHandle(d, canonicalProject)); + this.valueDeclaration = data.valueDeclaration ? new NodeHandle(data.valueDeclaration, canonicalProject) : undefined; + if (data.parent !== undefined) + this.parent = data.parent; + if (data.exportSymbol !== undefined) + this.exportSymbol = data.exportSymbol; + } + async getParent() { + return this.objectRegistry.fetchSymbol(this, "getParentOfSymbol", this.parent, this.canonicalProject.id); + } + /** + * Get this symbol's members keyed by escaped name. The result is cached on + * the symbol, so repeated calls do not round-trip to the server. + */ + getMembers() { + return this.membersCache ??= this.fetchSymbolTable("getMembersOfSymbol"); + } + /** + * Get this symbol's exports keyed by escaped name. The result is cached on + * the symbol, so repeated calls do not round-trip to the server. + */ + getExports() { + return this.exportsCache ??= this.fetchSymbolTable("getExportsOfSymbol"); + } + async fetchSymbolTable(method) { + const symbols = await this.objectRegistry.fetchSymbols(this, method, undefined, this.canonicalProject.id); + const table = new Map(); + for (const symbol of symbols) { + table.set(symbol.escapedName, symbol); + } + return table; + } + async getExportSymbol() { + if (!this.exportSymbol) + return this; + return this.objectRegistry.fetchSymbol(this, "getExportSymbolOfSymbol", this.exportSymbol, this.canonicalProject.id); + } + async getJsDocTags(checker) { + return checker.getJsDocTagsOfSymbol(this); + } + async getDocumentationComment(checker) { + return checker.getDocumentationCommentOfSymbol(this); + } +} +class TypeObject { + objectRegistry; + id; + flags; + objectFlags; + symbol; + value; + intrinsicName; + isThisType; + freshType; + regularType; + target; + typeParameters; + outerTypeParameters; + localTypeParameters; + aliasTypeArguments; + aliasSymbol; + elementFlags; + fixedLength; + readonly; + texts; + objectType; + indexType; + checkType; + extendsType; + baseType; + substConstraint; + trueType; // false if not yet loaded + falseType; // false if not yet loaded + constructor(data, objectRegistry) { + this.objectRegistry = objectRegistry; + this.id = data.id; + this.flags = data.flags; + if (data.objectFlags !== undefined) + this.objectFlags = data.objectFlags; + if (data.symbol !== undefined) + this.symbol = data.symbol; + if (data.value != null) { + // BigInt literal values are serialized as decimal strings (e.g. "-123") because + // JSON cannot represent bigint. Decode them back into a real bigint here. + this.value = (data.flags & TypeFlags.BigIntLiteral) ? BigInt(data.value) : data.value; + } + if (data.intrinsicName !== undefined) + this.intrinsicName = data.intrinsicName; + if (data.isThisType !== undefined) + this.isThisType = data.isThisType; + if (data.freshType !== undefined) + this.freshType = data.freshType; + if (data.regularType !== undefined) + this.regularType = data.regularType; + if (data.target !== undefined) + this.target = data.target; + this.typeParameters = data.typeParameters ?? []; + this.outerTypeParameters = data.outerTypeParameters ?? []; + this.localTypeParameters = data.localTypeParameters ?? []; + this.aliasTypeArguments = data.aliasTypeArguments ?? []; + if (data.aliasSymbol !== undefined) + this.aliasSymbol = data.aliasSymbol; + if (data.elementFlags !== undefined) + this.elementFlags = data.elementFlags; + if (data.fixedLength !== undefined) + this.fixedLength = data.fixedLength; + if (data.readonly !== undefined) + this.readonly = data.readonly; + if (data.texts !== undefined) + this.texts = data.texts; + if (data.objectType !== undefined) + this.objectType = data.objectType; + if (data.indexType !== undefined) + this.indexType = data.indexType; + if (data.checkType !== undefined) + this.checkType = data.checkType; + if (data.extendsType !== undefined) + this.extendsType = data.extendsType; + if (data.baseType !== undefined) + this.baseType = data.baseType; + if (data.substConstraint !== undefined) + this.substConstraint = data.substConstraint; + this.trueType = false; + this.falseType = false; + } + async getSymbol() { + return this.objectRegistry.fetchSymbol(this, "getSymbolOfType", this.symbol); + } + async getAliasSymbol() { + return this.objectRegistry.fetchSymbol(this, "getAliasSymbolOfType", this.aliasSymbol); + } + async getTarget() { + return this.objectRegistry.fetchType(this, "getTargetOfType", this.target); + } + async getFreshType() { + return this.objectRegistry.fetchType(this, "getFreshTypeOfType", this.freshType); + } + async getRegularType() { + return this.objectRegistry.fetchType(this, "getRegularTypeOfType", this.regularType); + } + async getTypes() { + // Only union, intersection, and template literal types have constituent + // types; any other kind has none, so return undefined rather than sending + // a request the server cannot satisfy. + if (!(this.flags & (TypeFlags.UnionOrIntersection | TypeFlags.TemplateLiteral))) { + return undefined; + } + return this.objectRegistry.fetchTypes(this, "getTypesOfType"); + } + async getTypeParameters() { + return this.objectRegistry.fetchTypes(this, "getTypeParametersOfType", this.typeParameters); + } + async getOuterTypeParameters() { + return this.objectRegistry.fetchTypes(this, "getOuterTypeParametersOfType", this.outerTypeParameters); + } + async getLocalTypeParameters() { + return this.objectRegistry.fetchTypes(this, "getLocalTypeParametersOfType", this.localTypeParameters); + } + async getAliasTypeArguments() { + return this.objectRegistry.fetchTypes(this, "getAliasTypeArgumentsOfType", this.aliasTypeArguments); + } + async getObjectType() { + return this.objectRegistry.fetchType(this, "getObjectTypeOfType", this.objectType); + } + async getIndexType() { + return this.objectRegistry.fetchType(this, "getIndexTypeOfType", this.indexType); + } + async getCheckType() { + return this.objectRegistry.fetchType(this, "getCheckTypeOfType", this.checkType); + } + async getExtendsType() { + return this.objectRegistry.fetchType(this, "getExtendsTypeOfType", this.extendsType); + } + async getBaseType() { + return this.objectRegistry.fetchType(this, "getBaseTypeOfType", this.baseType); + } + async getConstraint() { + return this.objectRegistry.fetchType(this, "getConstraintOfType", this.substConstraint); + } + async getTrueType() { + const result = await this.objectRegistry.fetchType(this, "getTrueTypeOfConditionalType", this.trueType); + this.trueType = result.id; + return result; + } + async getFalseType() { + const result = await this.objectRegistry.fetchType(this, "getFalseTypeOfConditionalType", this.falseType); + this.falseType = result.id; + return result; + } + /** + * Get the base types of this type. Returns `undefined` for any type that is + * not a class or interface. + */ + async getBaseTypes() { + if (!this.isClassOrInterface()) { + return undefined; + } + return this.objectRegistry.fetchBaseTypes(this); + } + isClassOrInterface() { + return isClassOrInterfaceType(this); + } + isUnionType() { + return isUnionType(this); + } + isIntersectionType() { + return isIntersectionType(this); + } + isObjectType() { + return isObjectType(this); + } + isIntrinsicType() { + return isIntrinsicType(this); + } + isErrorType() { + return isErrorType(this); + } + isLiteralType() { + return isLiteralType(this); + } + isStringLiteralType() { + return isStringLiteralType(this); + } + isNumberLiteralType() { + return isNumberLiteralType(this); + } + isBigIntLiteralType() { + return isBigIntLiteralType(this); + } + isBooleanLiteralType() { + return isBooleanLiteralType(this); + } + isTypeReference() { + return isTypeReference(this); + } + isTupleType() { + return isTupleType(this); + } + isIndexType() { + return isIndexType(this); + } + isIndexedAccessType() { + return isIndexedAccessType(this); + } + isConditionalType() { + return isConditionalType(this); + } + isSubstitutionType() { + return isSubstitutionType(this); + } + isTemplateLiteralType() { + return isTemplateLiteralType(this); + } + isStringMappingType() { + return isStringMappingType(this); + } + isTypeParameter() { + return isTypeParameter(this); + } +} +export function isUnionType(type) { + return (type.flags & TypeFlags.Union) !== 0; +} +export function isIntersectionType(type) { + return (type.flags & TypeFlags.Intersection) !== 0; +} +export function isObjectType(type) { + return (type.flags & TypeFlags.Object) !== 0; +} +export function isClassOrInterfaceType(type) { + return isObjectType(type) && (type.objectFlags & ObjectFlags.ClassOrInterface) !== 0; +} +export function isIntrinsicType(type) { + return (type.flags & TypeFlags.Intrinsic) !== 0; +} +/** + * Whether this is the error type — the placeholder the checker produces when a + * type cannot be determined (e.g. an unresolved reference). It is an intrinsic + * type named `"error"` (this covers both the singleton error type and the + * per-alias error types manufactured for unresolved type alias references). + */ +export function isErrorType(type) { + return isIntrinsicType(type) && type.intrinsicName === "error"; +} +export function isLiteralType(type) { + return (type.flags & TypeFlags.Literal) !== 0; +} +export function isStringLiteralType(type) { + return (type.flags & TypeFlags.StringLiteral) !== 0; +} +export function isNumberLiteralType(type) { + return (type.flags & TypeFlags.NumberLiteral) !== 0; +} +export function isBigIntLiteralType(type) { + return (type.flags & TypeFlags.BigIntLiteral) !== 0; +} +export function isBooleanLiteralType(type) { + return (type.flags & TypeFlags.BooleanLiteral) !== 0; +} +export function isTypeReference(type) { + return isObjectType(type) && (type.objectFlags & ObjectFlags.Reference) !== 0; +} +export function isTupleType(type) { + return isObjectType(type) && (type.objectFlags & ObjectFlags.Tuple) !== 0; +} +export function isIndexType(type) { + return (type.flags & TypeFlags.Index) !== 0; +} +export function isIndexedAccessType(type) { + return (type.flags & TypeFlags.IndexedAccess) !== 0; +} +export function isConditionalType(type) { + return (type.flags & TypeFlags.Conditional) !== 0; +} +export function isSubstitutionType(type) { + return (type.flags & TypeFlags.Substitution) !== 0; +} +export function isTemplateLiteralType(type) { + return (type.flags & TypeFlags.TemplateLiteral) !== 0; +} +export function isStringMappingType(type) { + return (type.flags & TypeFlags.StringMapping) !== 0; +} +export function isTypeParameter(type) { + return (type.flags & TypeFlags.TypeParameter) !== 0; +} +export class Signature { + flags; + objectRegistry; + id; + declaration; + typeParameters; + parameters; + thisParameter; + target; + constructor(data, project, objectRegistry) { + this.id = data.id; + this.flags = data.flags; + this.objectRegistry = objectRegistry; + this.declaration = data.declaration ? new NodeHandle(data.declaration, project) : undefined; + this.typeParameters = data.typeParameters ?? []; + this.parameters = data.parameters ?? []; + this.thisParameter = data.thisParameter; + this.target = data.target; + } + async getTypeParameters() { + return this.objectRegistry.fetchTypes(this, "getTypeParametersOfSignature", this.typeParameters); + } + async getParameters() { + return this.objectRegistry.fetchSymbols(this, "getParametersOfSignature", this.parameters); + } + async getThisParameter() { + return this.objectRegistry.fetchSymbol(this, "getThisParameterOfSignature", this.thisParameter); + } + async getTarget() { + return this.objectRegistry.fetchSignature(this, "getTargetOfSignature", this.target); + } + get hasRestParameter() { + return (this.flags & SignatureFlags.HasRestParameter) !== 0; + } + get isConstruct() { + return (this.flags & SignatureFlags.Construct) !== 0; + } + get isAbstract() { + return (this.flags & SignatureFlags.Abstract) !== 0; + } +} +//# sourceMappingURL=api.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/async/api.js.map b/node_modules/typescript/dist/api/async/api.js.map new file mode 100644 index 0000000..eab4939 --- /dev/null +++ b/node_modules/typescript/dist/api/async/api.js.map @@ -0,0 +1 @@ +{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/api/async/api.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAIH,aAAa,EAMb,0BAA0B,GAC7B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACH,UAAU,EACV,kBAAkB,GACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACH,UAAU,EACV,SAAS,EACT,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,GACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAK9C,OAAO,EACH,0BAA0B,EAC1B,MAAM,GACT,MAAM,YAAY,CAAC;AAoBpB,OAAO,EACH,eAAe,EACf,uBAAuB,GAC1B,MAAM,aA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AA8B,EAAE,IAAI,CAAC,cAAc,CAAsC,CAAC;IAC1I,CAAC;IAED,KAAK,CAAC,aAAa;QACf,OAAO,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,IAAI,EAAE,0BAA0B,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IAC/F,CAAC;IAED,KAAK,CAAC,gBAAgB;QAClB,OAAO,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,IAAI,EAAE,6BAA6B,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;IACpG,CAAC;IAED,KAAK,CAAC,SAAS;QACX,OAAO,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,IAAI,EAAE,sBAAsB,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACzF,CAAC;IAED,IAAI,gBAAgB;QAChB,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,cAAc,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAChE,CAAC;IAED,IAAI,WAAW;QACX,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,cAAc,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACzD,CAAC;IAED,IAAI,UAAU;QACV,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxD,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/async/client.d.ts b/node_modules/typescript/dist/api/async/client.d.ts new file mode 100644 index 0000000..fd2f435 --- /dev/null +++ b/node_modules/typescript/dist/api/async/client.d.ts @@ -0,0 +1,39 @@ +import { type ClientOptions, type ClientSocketOptions, type ClientSpawnOptions } from "../options.ts"; +import { TimingCollector, type TimingInfo } from "../timing.ts"; +export type { ClientOptions, ClientSocketOptions, ClientSpawnOptions }; +/** + * Client handles communication with the TypeScript API server + * over STDIO (spawned process) or a Unix domain socket using JSON-RPC. + */ +export declare class Client { + private socket; + private process; + private connection; + private options; + private connected; + private timing; + constructor(options: ClientOptions); + connect(): Promise; + private connectViaSpawn; + private connectViaSocket; + private registerFSCallbacks; + apiRequest(method: string, params?: unknown): Promise; + apiRequestBinary(method: string, params?: unknown): Promise; + /** + * Returns the timing collector that per-node materialization is reported + * into, or undefined when timing collection is disabled. The returned + * collector is the same one folded into {@link getTimingInfo}, so + * materialization totals surface alongside request timings. + */ + getTimingCollector(): TimingCollector | undefined; + /** + * Returns a combined timing snapshot: client-measured round-trip and byte + * counts folded together with the server's own per-request processing time + * (fetched via a getServerTiming request) and estimated transport overhead. + */ + getTimingInfo(): Promise; + resetTimingInfo(): Promise; + private fetchServerTiming; + close(): Promise; +} +//# sourceMappingURL=client.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/async/client.d.ts.map b/node_modules/typescript/dist/api/async/client.d.ts.map new file mode 100644 index 0000000..c0b54b7 --- /dev/null +++ b/node_modules/typescript/dist/api/async/client.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/api/async/client.ts"],"names":[],"mappings":"AAeA,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EAG1B,MAAM,eAAe,CAAC;AACvB,OAAO,EAKH,eAAe,EACf,KAAK,UAAU,EAClB,MAAM,cAAc,CAAC;AAEtB,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,CAAC;AAEvE;;;GAGG;AACH,qBAAa,MAAM;IACf,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,OAAO,CAA2B;IAC1C,OAAO,CAAC,UAAU,CAAgC;IAClD,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,MAAM,CAA8B;gBAEhC,OAAO,EAAE,aAAa;IAO5B,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;YAWhB,eAAe;YAiDf,gBAAgB;IAmB9B,OAAO,CAAC,mBAAmB;IAoBrB,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC;IAgC3D,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC;IAOzF;;;;;OAKG;IACH,kBAAkB,IAAI,eAAe,GAAG,SAAS;IAIjD;;;;OAIG;IACG,aAAa,IAAI,OAAO,CAAC,UAAU,CAAC;IAYpC,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;YAUxB,iBAAiB;IAUzB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAoB/B"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/async/client.js b/node_modules/typescript/dist/api/async/client.js new file mode 100644 index 0000000..d175d96 --- /dev/null +++ b/node_modules/typescript/dist/api/async/client.js @@ -0,0 +1,211 @@ +import { createMessageConnection, RequestType, SocketMessageReader, SocketMessageWriter, StreamMessageReader, StreamMessageWriter, } from "#vscode-jsonrpc/node"; +import { fsCallbackNames, } from "../fs.js"; +import { isSpawnOptions, resolveExePath, } from "../options.js"; +import { combineTimingInfo, disabledServerTimingInfo, disabledTimingInfo, TimingCollector, } from "../timing.js"; +/** + * Client handles communication with the TypeScript API server + * over STDIO (spawned process) or a Unix domain socket using JSON-RPC. + */ +export class Client { + socket; + process; + connection; + options; + connected = false; + timing; + constructor(options) { + this.options = options; + if (isSpawnOptions(options) && options.collectTiming) { + this.timing = new TimingCollector(); + } + } + async connect() { + if (this.connected) + return; + if (isSpawnOptions(this.options)) { + await this.connectViaSpawn(this.options); + } + else { + await this.connectViaSocket(this.options); + } + } + async connectViaSpawn(options) { + const { spawn } = await import("node:child_process"); + return new Promise((resolve, reject) => { + const args = [ + "--api", + "--async", + "--cwd", + options.cwd ?? process.cwd(), + ]; + if (options.collectTiming) { + args.push("--timing"); + } + // Enable virtual FS callbacks for each provided FS function + const enabledCallbacks = []; + if (options.fs) { + for (const name of fsCallbackNames) { + if (options.fs[name]) { + enabledCallbacks.push(name); + } + } + } + if (enabledCallbacks.length > 0) { + args.push(`--callbacks=${enabledCallbacks.join(",")}`); + } + this.process = spawn(resolveExePath(options), args, { + stdio: ["pipe", "pipe", "inherit"], + }); + this.process.once("error", error => { + reject(new Error(`Failed to start tsgo process: ${error.message}`)); + }); + this.process.once("spawn", () => { + this.connected = true; + resolve(); + }); + const reader = new StreamMessageReader(this.process.stdout); + const writer = new StreamMessageWriter(this.process.stdin); + this.connection = createMessageConnection(reader, writer); + this.registerFSCallbacks(this.connection, options.fs); + this.connection.listen(); + }); + } + async connectViaSocket(options) { + const { createConnection } = await import("node:net"); + return new Promise((resolve, reject) => { + this.socket = createConnection(options.pipe, () => { + const reader = new SocketMessageReader(this.socket); + const writer = new SocketMessageWriter(this.socket); + this.connection = createMessageConnection(reader, writer); + this.connection.listen(); + this.connected = true; + resolve(); + }); + this.socket.once("error", error => { + reject(new Error(`Socket error: ${error.message}`)); + }); + }); + } + registerFSCallbacks(connection, fs) { + if (!fs) + return; + for (const name of fsCallbackNames) { + const callback = fs[name]; + if (callback) { + const requestType = new RequestType(name); + connection.onRequest(requestType, (arg) => { + const result = callback(arg); + if (name === "readFile") { + // readFile has 3 returns: string (content), null (not found), undefined (fall back). + // JSON-RPC can't distinguish null from undefined, so wrap in object. + if (result === undefined) + return null; + return { content: result }; + } + return result ?? null; + }); + } + } + } + async apiRequest(method, params) { + if (!this.connected) { + await this.connect(); + } + if (!this.connection) { + throw new Error("Connection not established"); + } + const requestType = new RequestType(method); + if (!this.timing) { + return this.connection.sendRequest(requestType, params); + } + // Round-trip latency is measured here; byte counts approximate the wire + // payload via the serialized JSON. Server-side processing time is not + // carried on the response; it is retrieved separately (via a + // getServerTiming request) and folded in by getTimingInfo(). + const bytesSent = params === undefined ? 0 : Buffer.byteLength(JSON.stringify(params), "utf-8"); + const start = performance.now(); + const result = await this.connection.sendRequest(requestType, params); + const roundTripMs = performance.now() - start; + this.timing.record({ + method, + roundTripMs, + bytesSent, + bytesReceived: result === undefined || result === null + ? 0 + : Buffer.byteLength(JSON.stringify(result), "utf-8"), + }); + return result; + } + async apiRequestBinary(method, params) { + const response = await this.apiRequest(method, params); + if (!response) + return undefined; + const buffer = Buffer.from(response.data, "base64"); + return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); + } + /** + * Returns the timing collector that per-node materialization is reported + * into, or undefined when timing collection is disabled. The returned + * collector is the same one folded into {@link getTimingInfo}, so + * materialization totals surface alongside request timings. + */ + getTimingCollector() { + return this.timing; + } + /** + * Returns a combined timing snapshot: client-measured round-trip and byte + * counts folded together with the server's own per-request processing time + * (fetched via a getServerTiming request) and estimated transport overhead. + */ + async getTimingInfo() { + if (!this.timing) { + return disabledTimingInfo(); + } + const local = this.timing.getInfo(); + // No requests have been sent yet: nothing to fetch from the server. + if (!this.connected || !this.connection) { + return local; + } + return combineTimingInfo(local, await this.fetchServerTiming()); + } + async resetTimingInfo() { + if (!this.timing) + return; + this.timing.reset(); + if (this.connected && this.connection) { + // Keep the server's collection in sync so combined totals stay meaningful. + const requestType = new RequestType("resetServerTiming"); + await this.connection.sendRequest(requestType, undefined); + } + } + async fetchServerTiming() { + if (!this.connection) { + return disabledServerTimingInfo(); + } + // Fetch the server's own timing collection via a dedicated request. This + // bypasses the client-side collector so the query does not pollute it. + const requestType = new RequestType("getServerTiming"); + return this.connection.sendRequest(requestType, undefined); + } + async close() { + if (this.connection) { + this.connection.dispose(); + this.connection = undefined; + } + if (this.socket) { + this.socket.destroy(); + this.socket = undefined; + } + if (this.process) { + // Close stdin to unblock the server's read loop, allowing it to exit cleanly. + // The server is blocked on stdin.Read(), so just sending SIGTERM would deadlock: + // - Node won't exit while child is alive + // - Child can't process SIGTERM while blocked on read + // - Read won't error until stdin is closed + this.process.stdin?.end(); + this.process = undefined; + } + this.connected = false; + } +} +//# sourceMappingURL=client.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/async/client.js.map b/node_modules/typescript/dist/api/async/client.js.map new file mode 100644 index 0000000..bc39d41 --- /dev/null +++ b/node_modules/typescript/dist/api/async/client.js.map @@ -0,0 +1 @@ +{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/api/async/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,uBAAuB,EAEvB,WAAW,EACX,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,GACtB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAEH,eAAe,GAClB,MAAM,UAAU,CAAC;AAClB,OAAO,EAIH,cAAc,EACd,cAAc,GACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EACH,iBAAiB,EACjB,wBAAwB,EACxB,kBAAkB,EAElB,eAAe,GAElB,MAAM,cAAc,CAAC;AAItB;;;GAGG;AACH,MAAM,OAAO,MAAM;IACP,MAAM,CAAqB;IAC3B,OAAO,CAA2B;IAClC,UAAU,CAAgC;IAC1C,OAAO,CAAgB;IACvB,SAAS,GAAG,KAAK,CAAC;IAClB,MAAM,CAA8B;IAE5C,YAAY,OAAsB;QAC9B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,cAAc,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;YACnD,IAAI,CAAC,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;QACxC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,OAAO;QACT,IAAI,IAAI,CAAC,SAAS;YAAE,OAAO;QAE3B,IAAI,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;YAC/B,MAAM,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7C,CAAC;aACI,CAAC;YACF,MAAM,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9C,CAAC;IACL,CAAC;IAEO,KAAK,CAAC,eAAe,CAAC,OAA2B;QAC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,CAAC,OAAO,EAAE,CAAC;YAC1B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAChC,CAAC;QACD,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YACd,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACtB,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;QAC5B,CAAC;QACD,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACf,8EAA8E;YAC9E,iFAAiF;YACjF,yCAAyC;YACzC,sDAAsD;YACtD,2CAA2C;YAC3C,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC;YAC1B,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;QAC7B,CAAC;QACD,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAC3B,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/async/types.d.ts b/node_modules/typescript/dist/api/async/types.d.ts new file mode 100644 index 0000000..fd1869c --- /dev/null +++ b/node_modules/typescript/dist/api/async/types.d.ts @@ -0,0 +1,310 @@ +import type { CompletionItemKind } from "#enums/completionItemKind"; +import type { DiagnosticCategory } from "#enums/diagnosticCategory"; +import type { ElementFlags } from "#enums/elementFlags"; +import type { ObjectFlags } from "#enums/objectFlags"; +import type { TypeFlags } from "#enums/typeFlags"; +import type { TypePredicateKind } from "#enums/typePredicateKind"; +import type { NodeHandle, Symbol } from "./api.ts"; +/** + * A TypeScript type. + * + * Use TypeFlags to determine the specific kind of type and access + * kind-specific properties. For example: + * + * ```ts + * if (type.flags & TypeFlags.StringLiteral) { + * console.log((type as StringLiteralType).value); // string + * } + * ``` + */ +export interface Type { + /** Type flags — use to determine the specific kind of type. */ + readonly flags: TypeFlags; + /** Unique identifier for this type */ + readonly id: number; + /** Get the symbol associated with this type, if any */ + getSymbol(): Promise; + /** Get the type arguments of the type alias this type was instantiated from, if any */ + getAliasTypeArguments(): Promise; + /** Get the symbol of the type alias this type was instantiated from, if any */ + getAliasSymbol(): Promise; + /** + * Get the base types of this type, or `undefined` if it is not a class or + * interface type. + */ + getBaseTypes(): Promise; + /** Whether this type is a class or interface type */ + isClassOrInterface(): this is InterfaceType; + /** Whether this type is a union type */ + isUnionType(): this is UnionType; + /** Whether this type is an intersection type */ + isIntersectionType(): this is IntersectionType; + /** Whether this type is an object type */ + isObjectType(): this is ObjectType; + /** Whether this type is an intrinsic primitive type */ + isIntrinsicType(): this is IntrinsicType; + /** + * Whether this is the error type — the placeholder produced when a type + * cannot be determined (e.g. an unresolved reference). + */ + isErrorType(): boolean; + /** Whether this type is a literal type */ + isLiteralType(): this is LiteralType; + /** Whether this type is a string literal type */ + isStringLiteralType(): this is StringLiteralType; + /** Whether this type is a number literal type */ + isNumberLiteralType(): this is NumberLiteralType; + /** Whether this type is a bigint literal type */ + isBigIntLiteralType(): this is BigIntLiteralType; + /** Whether this type is a boolean literal type */ + isBooleanLiteralType(): this is BooleanLiteralType; + /** Whether this type is a type reference */ + isTypeReference(): this is TypeReference; + /** Whether this type is a tuple type */ + isTupleType(): this is TupleType; + /** Whether this type is an index type (`keyof T`) */ + isIndexType(): this is IndexType; + /** Whether this type is an indexed access type (`T[K]`) */ + isIndexedAccessType(): this is IndexedAccessType; + /** Whether this type is a conditional type */ + isConditionalType(): this is ConditionalType; + /** Whether this type is a substitution type */ + isSubstitutionType(): this is SubstitutionType; + /** Whether this type is a template literal type */ + isTemplateLiteralType(): this is TemplateLiteralType; + /** Whether this type is a string mapping type */ + isStringMappingType(): this is StringMappingType; + /** Whether this type is a type parameter */ + isTypeParameter(): this is TypeParameter; +} +/** + * Freshable types (TypeFlags.Freshable) - literal types (TypeFlags.Literal) and computed enum types (TypeFlags.Enum). + */ +export interface FreshableType extends Type { + /** Get the fresh version of this type, if any */ + getFreshType(): Promise; + /** Get the regular (non-fresh) version of this type, if any */ + getRegularType(): Promise; +} +/** Literal types: StringLiteral, NumberLiteral, BigIntLiteral, BooleanLiteral */ +export interface LiteralType extends FreshableType { + /** The literal value. Use TypeFlags to narrow to a specific literal subtype with a concrete value type. */ + readonly value: string | number | boolean | bigint; +} +/** String literal types (TypeFlags.StringLiteral) */ +export interface StringLiteralType extends LiteralType { + /** The string value of the literal */ + readonly value: string; +} +/** Numeric literal types (TypeFlags.NumberLiteral) */ +export interface NumberLiteralType extends LiteralType { + /** The numeric value of the literal */ + readonly value: number; +} +/** BigInt literal types (TypeFlags.BigIntLiteral) */ +export interface BigIntLiteralType extends LiteralType { + /** The bigint value of the literal */ + readonly value: bigint; +} +/** Boolean literal types (TypeFlags.BooleanLiteral) */ +export interface BooleanLiteralType extends LiteralType { + /** The boolean value of the literal */ + readonly value: boolean; +} +/** Object types (TypeFlags.Object) */ +export interface ObjectType extends Type { + /** Object flags — use to determine the specific kind of object type. */ + readonly objectFlags: ObjectFlags; +} +/** Type references (ObjectFlags.Reference) — e.g. Array, Map */ +export interface TypeReference extends ObjectType { + /** Get the generic target type (e.g. Array for Array) */ + getTarget(): Promise; +} +/** Interface types — classes and interfaces (ObjectFlags.ClassOrInterface) */ +export interface InterfaceType extends TypeReference { + /** Get all type parameters (outer + local, excluding thisType) */ + getTypeParameters(): Promise; + /** Get outer type parameters from enclosing declarations */ + getOuterTypeParameters(): Promise; + /** Get local type parameters declared on this interface/class */ + getLocalTypeParameters(): Promise; +} +/** Tuple types (ObjectFlags.Tuple) */ +export interface TupleType extends InterfaceType { + /** Per-element flags (Required, Optional, Rest, Variadic) */ + readonly elementFlags: readonly ElementFlags[]; + /** Number of initial required or optional elements */ + readonly fixedLength: number; + /** Whether the tuple is readonly */ + readonly readonly: boolean; +} +/** Union or intersection types (TypeFlags.Union | TypeFlags.Intersection) */ +export interface UnionOrIntersectionType extends Type { + /** Get the constituent types */ + getTypes(): Promise; +} +/** Union types (TypeFlags.Union) */ +export interface UnionType extends UnionOrIntersectionType { +} +/** Intersection types (TypeFlags.Intersection) */ +export interface IntersectionType extends UnionOrIntersectionType { +} +/** Type parameters (TypeFlags.TypeParameter) */ +export interface TypeParameter extends Type { + /** True if this is the synthetic `this` type of an interface, class, or tuple */ + readonly isThisType?: boolean | undefined; +} +/** Index types — keyof T (TypeFlags.Index) */ +export interface IndexType extends Type { + /** Get the target type T in `keyof T` */ + getTarget(): Promise; +} +/** Indexed access types — T[K] (TypeFlags.IndexedAccess) */ +export interface IndexedAccessType extends Type { + /** Get the object type T in `T[K]` */ + getObjectType(): Promise; + /** Get the index type K in `T[K]` */ + getIndexType(): Promise; +} +/** Conditional types — T extends U ? X : Y (TypeFlags.Conditional) */ +export interface ConditionalType extends Type { + /** Get the check type T in `T extends U ? X : Y` */ + getCheckType(): Promise; + /** Get the extends type U in `T extends U ? X : Y` */ + getExtendsType(): Promise; + /** Get the true type X in `T extends U ? X : Y` */ + getTrueType(): Promise; + /** Get the false type Y in `T extends U ? X : Y` */ + getFalseType(): Promise; +} +/** Substitution types (TypeFlags.Substitution) */ +export interface SubstitutionType extends Type { + getBaseType(): Promise; + getConstraint(): Promise; +} +/** Template literal types (TypeFlags.TemplateLiteral) */ +export interface TemplateLiteralType extends Type { + /** Text segments (always one more than the number of type spans) */ + readonly texts: readonly string[]; + /** Get the types interspersed between text segments */ + getTypes(): Promise; +} +/** String mapping types — Uppercase, Lowercase, etc. (TypeFlags.StringMapping) */ +export interface StringMappingType extends Type { + /** Get the mapped type */ + getTarget(): Promise; +} +/** Intrinsic types — any, unknown, string, number, bigint, symbol, void, undefined, null, never, object (TypeFlags.Intrinsic) */ +export interface IntrinsicType extends Type { + /** The intrinsic type name (e.g. "any", "string", "never") */ + readonly intrinsicName: string; +} +/** Base for all type predicates */ +export interface TypePredicateBase { + readonly kind: TypePredicateKind; + readonly type: Type | undefined; +} +/** `this is T` */ +export interface ThisTypePredicate extends TypePredicateBase { + readonly kind: TypePredicateKind.This; + readonly parameterName: undefined; + readonly parameterIndex: undefined; + readonly type: Type; +} +/** `x is T` */ +export interface IdentifierTypePredicate extends TypePredicateBase { + readonly kind: TypePredicateKind.Identifier; + readonly parameterName: string; + readonly parameterIndex: number; + readonly type: Type; +} +/** `asserts this is T` */ +export interface AssertsThisTypePredicate extends TypePredicateBase { + readonly kind: TypePredicateKind.AssertsThis; + readonly parameterName: undefined; + readonly parameterIndex: undefined; + readonly type: Type | undefined; +} +/** `asserts x is T` */ +export interface AssertsIdentifierTypePredicate extends TypePredicateBase { + readonly kind: TypePredicateKind.AssertsIdentifier; + readonly parameterName: string; + readonly parameterIndex: number; + readonly type: Type | undefined; +} +/** A type predicate — e.g. `x is T` or `asserts x is T` */ +export type TypePredicate = ThisTypePredicate | IdentifierTypePredicate | AssertsThisTypePredicate | AssertsIdentifierTypePredicate; +/** An index signature — e.g. `[key: string]: T` */ +export interface IndexInfo { + /** The index key type (e.g. string or number) */ + readonly keyType: Type; + /** The index value type */ + readonly valueType: Type; + /** Whether the index signature is readonly */ + readonly isReadonly: boolean; + /** The index signature declaration, if any */ + readonly declaration?: NodeHandle | undefined; +} +/** + * A single JSDoc tag attached to a symbol — e.g. `@param`, `@returns`. + */ +export interface JSDocTagInfo { + /** The tag name, without the leading `@` — e.g. `"param"`. */ + readonly name: string; + /** The rendered tag text, if any — e.g. `"a the first number"` for `@param a the first number`. */ + readonly text?: string | undefined; +} +export interface CompletionEntryLabelDetails { + detail?: string | undefined; + description?: string | undefined; +} +/** Options for {@link Checker.getCompletionsAtPosition}. */ +export interface CompletionOptions { + triggerCharacter?: string | undefined; + /** Include a `symbol` property on each completion entry. Only populated for symbol-based completions (not keywords or literals). */ + includeSymbol?: boolean | undefined; +} +/** A single completion item returned by {@link Checker.getCompletionsAtPosition}. */ +export interface CompletionEntry { + readonly name: string; + readonly kind?: CompletionItemKind | undefined; + readonly sortText?: string | undefined; + readonly insertText?: string | undefined; + readonly filterText?: string | undefined; + readonly detail?: string | undefined; + readonly labelDetails?: CompletionEntryLabelDetails | undefined; + /** The symbol associated with this completion entry. Only set when `includeSymbol: true` is passed and a symbol is available. */ + readonly symbol?: Symbol | undefined; +} +/** The result of {@link Checker.getCompletionsAtPosition}. */ +export interface CompletionInfo { + readonly isIncomplete: boolean; + readonly entries: readonly CompletionEntry[]; +} +/** + * A diagnostic message from the TypeScript compiler. + */ +export interface Diagnostic { + /** File name of the source file this diagnostic belongs to, if any */ + readonly fileName?: string | undefined; + /** Start position of the diagnostic */ + readonly pos: number; + /** End position of the diagnostic */ + readonly end: number; + /** Diagnostic error code */ + readonly code: number; + /** Diagnostic category (error, warning, suggestion, message) */ + readonly category: DiagnosticCategory; + /** Localized diagnostic message text */ + readonly text: string; + /** Whether this diagnostic highlights unnecessary code */ + readonly reportsUnnecessary?: boolean | undefined; + /** Whether this diagnostic highlights deprecated code */ + readonly reportsDeprecated?: boolean | undefined; + /** Chained diagnostic messages */ + readonly messageChain?: readonly Diagnostic[] | undefined; + /** Related diagnostic information */ + readonly relatedInformation?: readonly Diagnostic[] | undefined; +} +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/async/types.d.ts.map b/node_modules/typescript/dist/api/async/types.d.ts.map new file mode 100644 index 0000000..b539050 --- /dev/null +++ b/node_modules/typescript/dist/api/async/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/api/async/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EACR,UAAU,EACV,MAAM,EACT,MAAM,UAAU,CAAC;AAElB;;;;;;;;;;;GAWG;AACH,MAAM,WAAW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C,EAAE,MAAM,GAAG,SAAS,CAAC;CACxC;AAED,8DAA8D;AAC9D,MAAM,WAAW,cAAc;IAC3B,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,CAAC;CAChD;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACvB,sEAAsE;IACtE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,uCAAuC;IACvC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,qCAAqC;IACrC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,4BAA4B;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,gEAAgE;IAChE,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IACtC,wCAAwC;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,0DAA0D;IAC1D,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAClD,yDAAyD;IACzD,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACjD,kCAAkC;IAClC,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,UAAU,EAAE,GAAG,SAAS,CAAC;IAC1D,qCAAqC;IACrC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,SAAS,UAAU,EAAE,GAAG,SAAS,CAAC;CACnE"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/async/types.js b/node_modules/typescript/dist/api/async/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/typescript/dist/api/async/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/async/types.js.map b/node_modules/typescript/dist/api/async/types.js.map new file mode 100644 index 0000000..0defc86 --- /dev/null +++ b/node_modules/typescript/dist/api/async/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/api/async/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/compilerOptions.d.ts b/node_modules/typescript/dist/api/compilerOptions.d.ts new file mode 100644 index 0000000..d514cf4 --- /dev/null +++ b/node_modules/typescript/dist/api/compilerOptions.d.ts @@ -0,0 +1,109 @@ +import type { JsxEmit } from "#enums/jsxEmit"; +import type { ModuleDetectionKind } from "#enums/moduleDetectionKind"; +import type { ModuleKind } from "#enums/moduleKind"; +import type { ModuleResolutionKind } from "#enums/moduleResolutionKind"; +import type { NewLineKind } from "#enums/newLineKind"; +import type { ScriptTarget } from "#enums/scriptTarget"; +export interface CompilerOptions { + allowJs?: boolean; + allowArbitraryExtensions?: boolean; + allowImportingTsExtensions?: boolean; + allowNonTsExtensions?: boolean; + allowUmdGlobalAccess?: boolean; + allowUnreachableCode?: boolean; + allowUnusedLabels?: boolean; + assumeChangesOnlyAffectDirectDependencies?: boolean; + checkJs?: boolean; + customConditions?: string[]; + composite?: boolean; + emitDeclarationOnly?: boolean; + emitBOM?: boolean; + emitDecoratorMetadata?: boolean; + declaration?: boolean; + declarationDir?: string; + declarationMap?: boolean; + deduplicatePackages?: boolean; + disableSizeLimit?: boolean; + disableSourceOfProjectReferenceRedirect?: boolean; + disableSolutionSearching?: boolean; + disableReferencedProjectLoad?: boolean; + erasableSyntaxOnly?: boolean; + exactOptionalPropertyTypes?: boolean; + experimentalDecorators?: boolean; + forceConsistentCasingInFileNames?: boolean; + isolatedModules?: boolean; + isolatedDeclarations?: boolean; + ignoreConfig?: boolean; + ignoreDeprecations?: string; + importHelpers?: boolean; + inlineSourceMap?: boolean; + inlineSources?: boolean; + init?: boolean; + incremental?: boolean; + jsx?: JsxEmit; + jsxFactory?: string; + jsxFragmentFactory?: string; + jsxImportSource?: string; + lib?: string[]; + libReplacement?: boolean; + locale?: string; + mapRoot?: string; + module?: ModuleKind; + moduleResolution?: ModuleResolutionKind; + moduleSuffixes?: string[]; + moduleDetection?: ModuleDetectionKind; + newLine?: NewLineKind; + noEmit?: boolean; + noCheck?: boolean; + noErrorTruncation?: boolean; + noFallthroughCasesInSwitch?: boolean; + noImplicitAny?: boolean; + noImplicitThis?: boolean; + noImplicitReturns?: boolean; + noEmitHelpers?: boolean; + noLib?: boolean; + noPropertyAccessFromIndexSignature?: boolean; + noUncheckedIndexedAccess?: boolean; + noEmitOnError?: boolean; + noUnusedLocals?: boolean; + noUnusedParameters?: boolean; + noResolve?: boolean; + noImplicitOverride?: boolean; + noUncheckedSideEffectImports?: boolean; + outDir?: string; + paths?: Record; + preserveConstEnums?: boolean; + preserveSymlinks?: boolean; + project?: string; + resolveJsonModule?: boolean; + resolvePackageJsonExports?: boolean; + resolvePackageJsonImports?: boolean; + removeComments?: boolean; + rewriteRelativeImportExtensions?: boolean; + reactNamespace?: string; + rootDir?: string; + rootDirs?: string[]; + skipLibCheck?: boolean; + stableTypeOrdering?: boolean; + strict?: boolean; + strictBindCallApply?: boolean; + strictBuiltinIteratorReturn?: boolean; + strictFunctionTypes?: boolean; + strictNullChecks?: boolean; + strictPropertyInitialization?: boolean; + stripInternal?: boolean; + skipDefaultLibCheck?: boolean; + sourceMap?: boolean; + sourceRoot?: string; + suppressOutputPathCheck?: boolean; + target?: ScriptTarget; + traceResolution?: boolean; + tsBuildInfoFile?: string; + typeRoots?: string[]; + types?: string[]; + useDefineForClassFields?: boolean; + useUnknownInCatchVariables?: boolean; + verbatimModuleSyntax?: boolean; + maxNodeModuleJsDepth?: number; +} +//# sourceMappingURL=compilerOptions.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/compilerOptions.d.ts.map b/node_modules/typescript/dist/api/compilerOptions.d.ts.map new file mode 100644 index 0000000..9a064d6 --- /dev/null +++ b/node_modules/typescript/dist/api/compilerOptions.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"compilerOptions.d.ts","sourceRoot":"","sources":["../../src/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AO,CAAC;IACvC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACjC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/compilerOptions.js b/node_modules/typescript/dist/api/compilerOptions.js new file mode 100644 index 0000000..aeadba7 --- /dev/null +++ b/node_modules/typescript/dist/api/compilerOptions.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=compilerOptions.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/compilerOptions.js.map b/node_modules/typescript/dist/api/compilerOptions.js.map new file mode 100644 index 0000000..68f5c80 --- /dev/null +++ b/node_modules/typescript/dist/api/compilerOptions.js.map @@ -0,0 +1 @@ +{"version":3,"file":"compilerOptions.js","sourceRoot":"","sources":["../../src/api/compilerOptions.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/fs.d.ts b/node_modules/typescript/dist/api/fs.d.ts new file mode 100644 index 0000000..8623183 --- /dev/null +++ b/node_modules/typescript/dist/api/fs.d.ts @@ -0,0 +1,23 @@ +export interface FileSystemEntries { + files: string[]; + directories: string[]; +} +export interface FileSystem { + directoryExists?: (directoryName: string) => boolean | undefined; + fileExists?: (fileName: string) => boolean | undefined; + getAccessibleEntries?: (directoryName: string) => FileSystemEntries | undefined; + /** + * Read a file's content. + * - Return the file content as a `string` (including `""` for empty files). + * - Return `null` to indicate the file does not exist (without falling back to the real FS). + * - Return `undefined` to fall back to the real filesystem. + */ + readFile?: (fileName: string) => string | null | undefined; + realpath?: (path: string) => string | undefined; + writeFile?: (path: string, content: string) => void; + removeFile?: (path: string) => void; +} +/** The callback names supported by the Go server for virtual FS delegation. */ +export declare const fsCallbackNames: readonly ["readFile", "fileExists", "directoryExists", "getAccessibleEntries", "realpath"]; +export declare function createVirtualFileSystem(files: Record): FileSystem; +//# sourceMappingURL=fs.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/fs.d.ts.map b/node_modules/typescript/dist/api/fs.d.ts.map new file mode 100644 index 0000000..60f8465 --- /dev/null +++ b/node_modules/typescript/dist/api/fs.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../src/api/fs.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,iBAAiB;IAC9B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,WAAW,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,UAAU;IACvB,eAAe,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,OAAO,GAAG,SAAS,CAAC;IACjE,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,GAAG,SAAS,CAAC;IACvD,oBAAoB,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,iBAAiB,GAAG,SAAS,CAAC;IAChF;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3D,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAChD,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAED,+EAA+E;AAC/E,eAAO,MAAM,eAAe,4FAA6F,CAAC;AAa1H,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,UAAU,CAkHjF"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/fs.js b/node_modules/typescript/dist/api/fs.js new file mode 100644 index 0000000..264edba --- /dev/null +++ b/node_modules/typescript/dist/api/fs.js @@ -0,0 +1,109 @@ +import { getPathComponents } from "./path.js"; +/** The callback names supported by the Go server for virtual FS delegation. */ +export const fsCallbackNames = ["readFile", "fileExists", "directoryExists", "getAccessibleEntries", "realpath"]; +export function createVirtualFileSystem(files) { + const root = { + type: "directory", + children: {}, + }; + const content = {}; + for (const filePath of Object.keys(files)) { + content[filePath] = files[filePath]; + addToTree(filePath); + } + return { + directoryExists, + fileExists, + getAccessibleEntries, + readFile, + realpath: path => path, + writeFile, + removeFile, + }; + function getNodeFromPath(path) { + if (!path || path === "/") { + return root; + } + const segments = getPathComponents(path).slice(1); + let current = root; + for (const segment of segments) { + if (current.type !== "directory") { + return undefined; + } + const child = current.children[segment]; + if (!child) { + return undefined; + } + current = child; + } + return current; + } + function ensureDirectory(segments) { + let current = root; + for (const segment of segments) { + if (!current.children[segment]) { + current.children[segment] = { type: "directory", children: {} }; + } + else if (current.children[segment].type !== "directory") { + throw new Error(`Cannot create directory: a file already exists at "/${segments.join("/")}"`); + } + current = current.children[segment]; + } + return current; + } + function addToTree(path) { + const segments = getPathComponents(path).slice(1); + if (segments.length === 0) { + throw new Error(`Invalid file path: "${path}"`); + } + const filename = segments.pop(); + const dirNode = ensureDirectory(segments); + dirNode.children[filename] = { type: "file" }; + } + function writeFile(path, data) { + content[path] = data; + addToTree(path); + } + function removeFile(path) { + delete content[path]; + const segments = getPathComponents(path).slice(1); + if (segments.length === 0) + return; + const filename = segments.pop(); + const dirNode = getNodeFromPath("/" + segments.join("/")); + if (dirNode && dirNode.type === "directory") { + delete dirNode.children[filename]; + } + } + function directoryExists(directoryName) { + const node = getNodeFromPath(directoryName); + return !!node && node.type === "directory"; + } + function fileExists(fileName) { + return fileName in content; + } + function getAccessibleEntries(directoryName) { + const node = getNodeFromPath(directoryName); + if (!node || node.type !== "directory") { + return undefined; + } + const fileEntries = []; + const directories = []; + for (const [name, child] of Object.entries(node.children)) { + if (child.type === "file") { + fileEntries.push(name); + } + else { + directories.push(name); + } + } + return { files: fileEntries, directories }; + } + function readFile(fileName) { + if (fileName in content) { + return content[fileName]; + } + return undefined; + } +} +//# sourceMappingURL=fs.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/fs.js.map b/node_modules/typescript/dist/api/fs.js.map new file mode 100644 index 0000000..9462d0a --- /dev/null +++ b/node_modules/typescript/dist/api/fs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fs.js","sourceRoot":"","sources":["../../src/api/fs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAuB9C,+EAA+E;AAC/E,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,UAAU,EAAE,YAAY,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,UAAU,CAAU,CAAC;AAa1H,MAAM,UAAU,uBAAuB,CAAC,KAA6B;IACjE,MAAM,IAAI,GAAe;QACrB,IAAI,EAAE,WAAW;QACjB,QAAQ,EAAE,EAAE;KACf,CAAC;IACF,MAAM,OAAO,GAA2B,EAAE,CAAC;IAE3C,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACxC,OAAO,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC;QACpC,SAAS,CAAC,QAAQ,CAAC,CAAC;IACxB,CAAC;IAED,OAAO;QACH,e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S,eAAe,CAAC,aAAqB;QAC1C,MAAM,IAAI,GAAG,eAAe,CAAC,aAAa,CAAC,CAAC;QAC5C,OAAO,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,WAAW,CAAC;IAC/C,CAAC;IAED,SAAS,UAAU,CAAC,QAAgB;QAChC,OAAO,QAAQ,IAAI,OAAO,CAAC;IAC/B,CAAC;IAED,SAAS,oBAAoB,CAAC,aAAqB;QAC/C,MAAM,IAAI,GAAG,eAAe,CAAC,aAAa,CAAC,CAAC;QAC5C,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;YACrC,OAAO,SAAS,CAAC;QACrB,CAAC;QACD,MAAM,WAAW,GAAa,EAAE,CAAC;QACjC,MAAM,WAAW,GAAa,EAAE,CAAC;QACjC,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;YACxD,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;gBACxB,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC3B,CAAC;iBACI,CAAC;gBACF,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC3B,CAAC;QACL,CAAC;QACD,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC;IAC/C,CAAC;IAED,SAAS,QAAQ,CAAC,QAAgB;QAC9B,IAAI,QAAQ,IAAI,OAAO,EAAE,CAAC;YACtB,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC7B,CAAC;QACD,OAAO,SAAS,CAAC;IACrB,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/encoder.d.ts b/node_modules/typescript/dist/api/node/encoder.d.ts new file mode 100644 index 0000000..415de06 --- /dev/null +++ b/node_modules/typescript/dist/api/node/encoder.d.ts @@ -0,0 +1,15 @@ +import type { Node, SourceFile } from "../../ast/index.ts"; +/** + * Encode a SourceFile AST node into the binary format. + */ +export declare function encodeSourceFile(sourceFile: SourceFile): Uint8Array; +/** + * Encode an arbitrary AST node into the binary format. + * When encoding a non-SourceFile node, the header hash and parse options fields will be zero. + */ +export declare function encodeNode(node: Node): Uint8Array; +/** + * Encode a Uint8Array to a base64 string. + */ +export declare function uint8ArrayToBase64(data: Uint8Array): string; +//# sourceMappingURL=encoder.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/encoder.d.ts.map b/node_modules/typescript/dist/api/node/encoder.d.ts.map new file mode 100644 index 0000000..69c1adb --- /dev/null +++ b/node_modules/typescript/dist/api/node/encoder.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"encoder.d.ts","sourceRoot":"","sources":["../../../src/api/node/encoder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGR,IAAI,EAEJ,UAAU,EAEb,MAAM,oBAAoB,CAAC;AAyL5B;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,CAEnE;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,UAAU,CAuKjD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAE3D"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/encoder.generated.d.ts b/node_modules/typescript/dist/api/node/encoder.generated.d.ts new file mode 100644 index 0000000..7170cd7 --- /dev/null +++ b/node_modules/typescript/dist/api/node/encoder.generated.d.ts @@ -0,0 +1,5 @@ +import type { Node } from "../../ast/index.ts"; +import { SyntaxKind } from "../../ast/index.ts"; +export declare function getNodeDataType(kind: SyntaxKind): number; +export declare function getNodeCommonData(node: Node): number; +//# sourceMappingURL=encoder.generated.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/encoder.generated.d.ts.map b/node_modules/typescript/dist/api/node/encoder.generated.d.ts.map new file mode 100644 index 0000000..622d069 --- /dev/null +++ b/node_modules/typescript/dist/api/node/encoder.generated.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"encoder.generated.d.ts","sourceRoot":"","sources":["../../../src/api/node/encoder.generated.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAiBR,IAAI,EAMP,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAOhD,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAuBxD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CA6CpD"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/encoder.generated.js b/node_modules/typescript/dist/api/node/encoder.generated.js new file mode 100644 index 0000000..fdb93ee --- /dev/null +++ b/node_modules/typescript/dist/api/node/encoder.generated.js @@ -0,0 +1,74 @@ +// Code generated by _scripts/generate-encoder.ts. DO NOT EDIT. +import { SyntaxKind } from "../../ast/index.js"; +import { NODE_DATA_TYPE_CHILDREN, NODE_DATA_TYPE_EXTENDED, NODE_DATA_TYPE_STRING, } from "./protocol.js"; +export function getNodeDataType(kind) { + switch (kind) { + case SyntaxKind.Identifier: + case SyntaxKind.PrivateIdentifier: + case SyntaxKind.JsxText: + case SyntaxKind.JSDocText: + case SyntaxKind.JSDocLink: + case SyntaxKind.JSDocLinkPlain: + case SyntaxKind.JSDocLinkCode: + return NODE_DATA_TYPE_STRING; + case SyntaxKind.StringLiteral: + case SyntaxKind.NumericLiteral: + case SyntaxKind.BigIntLiteral: + case SyntaxKind.RegularExpressionLiteral: + case SyntaxKind.NoSubstitutionTemplateLiteral: + case SyntaxKind.TemplateHead: + case SyntaxKind.TemplateMiddle: + case SyntaxKind.TemplateTail: + case SyntaxKind.SourceFile: + return NODE_DATA_TYPE_EXTENDED; + default: + return NODE_DATA_TYPE_CHILDREN; + } +} +export function getNodeCommonData(node) { + switch (node.kind) { + case SyntaxKind.Block: + return (node.multiLine ? 1 : 0) << 24; + case SyntaxKind.HeritageClause: + return (node.token === SyntaxKind.ImplementsKeyword ? 1 : 0) << 24; + case SyntaxKind.ExportAssignment: + return (node.isExportEquals ? 1 : 0) << 24; + case SyntaxKind.ExportSpecifier: + return (node.isTypeOnly ? 1 : 0) << 24; + case SyntaxKind.PrefixUnaryExpression: + return (node.operator === SyntaxKind.MinusToken ? 1 : node.operator === SyntaxKind.TildeToken ? 2 : node.operator === SyntaxKind.ExclamationToken ? 3 : node.operator === SyntaxKind.PlusPlusToken ? 4 : node.operator === SyntaxKind.MinusMinusToken ? 5 : 0) << 24; + case SyntaxKind.PostfixUnaryExpression: + return (node.operator === SyntaxKind.MinusMinusToken ? 1 : 0) << 24; + case SyntaxKind.MetaProperty: + return (node.keywordToken === SyntaxKind.NewKeyword ? 1 : 0) << 24; + case SyntaxKind.ArrayLiteralExpression: + return (node.multiLine ? 1 : 0) << 24; + case SyntaxKind.ObjectLiteralExpression: + return (node.multiLine ? 1 : 0) << 24; + case SyntaxKind.TypeOperator: + return (node.operator === SyntaxKind.ReadonlyKeyword ? 1 : node.operator === SyntaxKind.UniqueKeyword ? 2 : 0) << 24; + case SyntaxKind.ImportAttributes: + return (node.multiLine ? 1 : 0) << 24 | (node.token === SyntaxKind.AssertKeyword ? 1 : 0) << 25; + case SyntaxKind.JsxText: + return (node.containsOnlyTriviaWhiteSpaces ? 1 : 0) << 24; + case SyntaxKind.ModuleDeclaration: + return (node.keyword === SyntaxKind.NamespaceKeyword ? 1 : 0) << 24; + case SyntaxKind.ImportEqualsDeclaration: + return (node.isTypeOnly ? 1 : 0) << 24; + case SyntaxKind.ExportDeclaration: + return (node.isTypeOnly ? 1 : 0) << 24; + case SyntaxKind.ImportType: + return (node.isTypeOf ? 1 : 0) << 24; + case SyntaxKind.ImportClause: + return (node.phaseModifier === SyntaxKind.TypeKeyword ? 1 : node.phaseModifier === SyntaxKind.DeferKeyword ? 2 : 0) << 24; + case SyntaxKind.ImportSpecifier: + return (node.isTypeOnly ? 1 : 0) << 24; + case SyntaxKind.JSDocTypeLiteral: + return (node.isArrayType ? 1 : 0) << 24; + case SyntaxKind.JSDocParameterTag: + case SyntaxKind.JSDocPropertyTag: + return (node.isBracketed ? 1 : 0) << 24 | (node.isNameFirst ? 1 : 0) << 25; + } + return 0; +} +//# sourceMappingURL=encoder.generated.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/encoder.generated.js.map b/node_modules/typescript/dist/api/node/encoder.generated.js.map new file mode 100644 index 0000000..b947d51 --- /dev/null +++ b/node_modules/typescript/dist/api/node/encoder.generated.js.map @@ -0,0 +1 @@ +{"version":3,"file":"encoder.generated.js","sourceRoot":"","sources":["../../../src/api/node/encoder.generated.ts"],"names":[],"mappings":"AAAA,+DAA+D;AA0B/D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EACH,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,GACxB,MAAM,eAAe,CAAC;AAEvB,MAAM,UAAU,eAAe,CAAC,IAAgB;IAC5C,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,UAAU,CAAC,UAAU,CAAC;QAC3B,KAAK,UAAU,CAAC,iBAAiB,CAAC;QAClC,KAAK,UAAU,CAAC,OAAO,CAAC;QACxB,KAAK,UAAU,CAAC,SAAS,CAAC;QAC1B,KAAK,UAAU,CAAC,SAAS,CAAC;QAC1B,KAAK,UAAU,CAAC,cAAc,CAAC;QAC/B,KAAK,UAAU,CAAC,aAAa;YACzB,OAAO,qBAAqB,CAAC;QACjC,KAAK,UAAU,CAAC,aAAa,CAAC;QAC9B,KAAK,UAAU,CAAC,cAAc,CAAC;QAC/B,KAAK,UAAU,CAAC,aAAa,CAAC;QAC9B,KAAK,UAAU,CAAC,wBAAwB,CAAC;QACzC,KAAK,UAAU,CAAC,6BAA6B,CAAC;QAC9C,KAAK,UAAU,CAAC,YAAY,CAAC;QAC7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C,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QAClE,KAAK,UAAU,CAAC,iBAAiB,CAAC;QAClC,KAAK,UAAU,CAAC,gBAAgB;YAC5B,OAAO,CAAE,IAAoC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,GAAG,CAAE,IAAoC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACrJ,CAAC;IACD,OAAO,CAAC,CAAC;AACb,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/encoder.js b/node_modules/typescript/dist/api/node/encoder.js new file mode 100644 index 0000000..1e4f4b0 --- /dev/null +++ b/node_modules/typescript/dist/api/node/encoder.js @@ -0,0 +1,287 @@ +import { SyntaxKind } from "../../ast/index.js"; +import { getNodeCommonData, getNodeDataType, } from "./encoder.generated.js"; +import { MsgpackWriter } from "./msgpack.js"; +import { childProperties, HEADER_OFFSET_EXTENDED_DATA, HEADER_OFFSET_METADATA, HEADER_OFFSET_NODES, HEADER_OFFSET_STRING_TABLE, HEADER_OFFSET_STRING_TABLE_OFFSETS, HEADER_OFFSET_STRUCTURED_DATA, HEADER_SIZE, KIND_NODE_LIST, NODE_DATA_TYPE_CHILDREN, NODE_DATA_TYPE_EXTENDED, NODE_DATA_TYPE_STRING, NODE_LEN, PROTOCOL_VERSION, } from "./protocol.js"; +const NODE_FIELDS = NODE_LEN / 4; +const NODE_FIELD_NEXT = 3; +const NO_STRUCTURED_DATA = 0xFFFFFFFF; +// String table that accumulates strings into a flat byte pool. +class StringTable { + parts; + byteLen; + offsets; + constructor() { + this.parts = []; + this.byteLen = 0; + this.offsets = []; + } + add(text) { + const index = this.offsets.length; + const encoder = cachedEncoder(); + const encodedLength = encoder.encode(text).length; + const offset = this.byteLen; + this.parts.push(text); + this.byteLen += encodedLength; + this.offsets.push(offset, offset + encodedLength); + return index; + } + encode() { + const encoder = cachedEncoder(); + const dataBytes = encoder.encode(this.parts.join("")); + const offsetBytes = new Uint8Array(this.offsets.length * 4); + const view = new DataView(offsetBytes.buffer); + for (let i = 0; i < this.offsets.length; i++) { + view.setUint32(i * 4, this.offsets[i], true); + } + const result = new Uint8Array(offsetBytes.length + dataBytes.length); + result.set(offsetBytes, 0); + result.set(dataBytes, offsetBytes.length); + return result; + } + stringByteLength() { + return this.byteLen; + } + offsetsCount() { + return this.offsets.length; + } +} +let _encoder; +function cachedEncoder() { + return _encoder ??= new TextEncoder(); +} +function getChildrenPropertyMask(node) { + const kind = node.kind; + const props = childProperties[kind]; + if (!props) { + return 0; + } + const n = node; + let mask = 0; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop !== undefined && isChildPresent(n[prop])) { + mask |= 1 << i; + } + } + return mask; +} +// A child is "present" if it's non-null/non-undefined. +// This matches the Go encoder's behavior where non-nil NodeLists (even empty) +// are treated as present, and only nil NodeLists are absent. +function isChildPresent(v) { + if (v === undefined || v === null) + return false; + return true; +} +function recordNodeStrings(node, strs) { + return strs.add(node.text ?? ""); +} +function encodeFileReferences(refs, writer) { + if (!refs || refs.length === 0) + return NO_STRUCTURED_DATA; + const offset = writer.finish().length; + writer.writeArrayHeader(refs.length); + for (const ref of refs) { + writer.writeArrayHeader(5); + writer.writeUint(ref.pos); + writer.writeUint(ref.end); + writer.writeString(ref.fileName); + writer.writeUint(ref.resolutionMode ?? 0); + writer.writeBool(ref.preserve ?? false); + } + return offset; +} +function recordExtendedData(node, strs, extendedData, structuredWriter) { + const offset = extendedData.length * 4; + if (node.kind === SyntaxKind.SourceFile) { + const sf = node; + const textIndex = strs.add(sf.text); + const fileNameIndex = strs.add(sf.fileName); + const pathIndex = strs.add(sf.path); + const referencedFilesOffset = encodeFileReferences(sf.referencedFiles, structuredWriter); + const typeRefDirectivesOffset = encodeFileReferences(sf.typeReferenceDirectives, structuredWriter); + const libRefDirectivesOffset = encodeFileReferences(sf.libReferenceDirectives, structuredWriter); + extendedData.push(textIndex, fileNameIndex, pathIndex, sf.languageVariant, sf.scriptKind, referencedFilesOffset, typeRefDirectivesOffset, libRefDirectivesOffset, NO_STRUCTURED_DATA, NO_STRUCTURED_DATA, NO_STRUCTURED_DATA, 0); + } + else if (node.kind === SyntaxKind.TemplateHead || + node.kind === SyntaxKind.TemplateMiddle || + node.kind === SyntaxKind.TemplateTail) { + const tmpl = node; + const text = tmpl.text ?? ""; + const rawText = tmpl.rawText ?? ""; + const templateFlags = tmpl.templateFlags ?? 0; + const textIndex = strs.add(text); + const rawTextIndex = strs.add(rawText); + extendedData.push(textIndex, rawTextIndex, templateFlags); + } + else { + // StringLiteral, NumericLiteral, BigIntLiteral, RegularExpressionLiteral, + // NoSubstitutionTemplateLiteral — format: [textIndex, tokenFlags] + const n = node; + const text = n.text ?? ""; + const tokenFlags = n.tokenFlags ?? 0; + const textIndex = strs.add(text); + extendedData.push(textIndex, tokenFlags); + } + return offset; +} +function getNodeData(node, strs, extendedData, structuredWriter) { + const t = getNodeDataType(node.kind); + const common = getNodeCommonData(node); + switch (t) { + case NODE_DATA_TYPE_CHILDREN: + return t | common | getChildrenPropertyMask(node); + case NODE_DATA_TYPE_STRING: + return t | common | recordNodeStrings(node, strs); + case NODE_DATA_TYPE_EXTENDED: + return t | common | recordExtendedData(node, strs, extendedData, structuredWriter); + default: + throw new Error("unreachable"); + } +} +function getChildPropertiesForNode(node) { + return childProperties[node.kind]; +} +// Returns whether a value is a NodeArray (array-like with pos and end). +function isNodeArray(value) { + return Array.isArray(value) && typeof value.pos === "number" && typeof value.end === "number"; +} +/** + * Encode a SourceFile AST node into the binary format. + */ +export function encodeSourceFile(sourceFile) { + return encodeNode(sourceFile); +} +/** + * Encode an arbitrary AST node into the binary format. + * When encoding a non-SourceFile node, the header hash and parse options fields will be zero. + */ +export function encodeNode(node) { + const strs = new StringTable(); + const extendedDataValues = []; + const structuredWriter = new MsgpackWriter(); + // We'll build an array of uint32 values for the nodes section, 7 per node + const nodeValues = []; + // Nil node (index 0) + nodeValues.push(0, 0, 0, 0, 0, 0, 0); + let nodeCount = 0; + let parentIndex = 0; + let prevIndex = 0; + function visitNode(node) { + nodeCount++; + const currentIndex = nodeCount; + if (prevIndex !== 0) { + // Set next pointer on previous sibling + nodeValues[prevIndex * NODE_FIELDS + NODE_FIELD_NEXT] = currentIndex; + } + const data = getNodeData(node, strs, extendedDataValues, structuredWriter); + nodeValues.push(node.kind, node.pos >= 0 ? node.pos : 0, node.end >= 0 ? node.end : 0, 0, // next (filled in later) + parentIndex, data, node.flags); + const saveParentIndex = parentIndex; + const savePrevIndex = prevIndex; + parentIndex = currentIndex; + prevIndex = 0; + visitChildren(node); + prevIndex = currentIndex; + parentIndex = saveParentIndex; + } + function visitNodeList(list) { + if (!list) { + return; + } + nodeCount++; + const currentIndex = nodeCount; + if (prevIndex !== 0) { + nodeValues[prevIndex * NODE_FIELDS + NODE_FIELD_NEXT] = currentIndex; + } + nodeValues.push(KIND_NODE_LIST, list.pos >= 0 ? list.pos : 0, list.end >= 0 ? list.end : 0, 0, // next + parentIndex, list.length, // data for NodeList is its length + 0); + const saveParentIndex = parentIndex; + parentIndex = currentIndex; + prevIndex = 0; + for (const child of list) { + visitNode(child); + } + prevIndex = currentIndex; + parentIndex = saveParentIndex; + } + function visitChildren(node) { + const props = getChildPropertiesForNode(node); + const n = node; + if (props) { + for (const propName of props) { + if (propName === undefined) + continue; + const child = n[propName]; + if (child === undefined || child === null) + continue; + if (isNodeArray(child)) { + visitNodeList(child); + } + else { + visitNode(child); + } + } + } + } + // Encode root node + nodeCount++; + parentIndex++; + const rootData = getNodeData(node, strs, extendedDataValues, structuredWriter); + nodeValues.push(node.kind, node.pos >= 0 ? node.pos : 0, node.end >= 0 ? node.end : 0, 0, 0, rootData, node.flags); + const saveParent = parentIndex; + prevIndex = 0; + parentIndex = 1; // root is at index 1 + visitChildren(node); + parentIndex = saveParent; + // Encode extended data section + const extendedDataBytes = new Uint8Array(extendedDataValues.length * 4); + const extView = new DataView(extendedDataBytes.buffer); + for (let i = 0; i < extendedDataValues.length; i++) { + extView.setUint32(i * 4, extendedDataValues[i], true); + } + // Encode structured data section + const structuredDataBytes = structuredWriter.finish(); + // Encode string table + const strsBytes = strs.encode(); + // Encode nodes section + const nodesBytes = new Uint8Array(nodeValues.length * 4); + const nodesView = new DataView(nodesBytes.buffer); + for (let i = 0; i < nodeValues.length; i++) { + nodesView.setUint32(i * 4, nodeValues[i] >>> 0, true); + } + // Calculate section offsets + const offsetStringTableOffsets = HEADER_SIZE; + const offsetStringTableData = HEADER_SIZE + strs.offsetsCount() * 4; + const offsetExtendedData = offsetStringTableData + strs.stringByteLength(); + const offsetStructuredData = offsetExtendedData + extendedDataBytes.length; + const offsetNodes = offsetStructuredData + structuredDataBytes.length; + // Build header + const header = new Uint8Array(HEADER_SIZE); + const headerView = new DataView(header.buffer); + const metadata = PROTOCOL_VERSION << 24; + headerView.setUint32(HEADER_OFFSET_METADATA, metadata, true); + // bytes 4-19: hash (zero for non-SourceFile, we don't have access to xxh3 here) + // byte 20-23: parse options (zero for non-SourceFile) + headerView.setUint32(HEADER_OFFSET_STRING_TABLE_OFFSETS, offsetStringTableOffsets, true); + headerView.setUint32(HEADER_OFFSET_STRING_TABLE, offsetStringTableData, true); + headerView.setUint32(HEADER_OFFSET_EXTENDED_DATA, offsetExtendedData, true); + headerView.setUint32(HEADER_OFFSET_STRUCTURED_DATA, offsetStructuredData, true); + headerView.setUint32(HEADER_OFFSET_NODES, offsetNodes, true); + // Concatenate all sections + const result = new Uint8Array(header.length + strsBytes.length + extendedDataBytes.length + structuredDataBytes.length + nodesBytes.length); + result.set(header, 0); + result.set(strsBytes, HEADER_SIZE); + result.set(extendedDataBytes, offsetExtendedData); + result.set(structuredDataBytes, offsetStructuredData); + result.set(nodesBytes, offsetNodes); + return result; +} +/** + * Encode a Uint8Array to a base64 string. + */ +export function uint8ArrayToBase64(data) { + return Buffer.from(data).toString("base64"); +} +//# sourceMappingURL=encoder.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/encoder.js.map b/node_modules/typescript/dist/api/node/encoder.js.map new file mode 100644 index 0000000..f71efeb --- /dev/null +++ b/node_modules/typescript/dist/api/node/encoder.js.map @@ -0,0 +1 @@ +{"version":3,"file":"encoder.js","sourceRoot":"","sources":["../../../src/api/node/encoder.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EACH,iBAAiB,EACjB,eAAe,GAClB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EACH,eAAe,EACf,2BAA2B,EAC3B,sBAAsB,EACtB,mBAAmB,EACnB,0BAA0B,EAC1B,kCAAkC,EAClC,6BAA6B,EAC7B,WAAW,EACX,cAAc,EACd,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,QAAQ,EACR,gBAAgB,GACnB,MAAM,eAAe,CAAC;AAEvB,MAAM,WAAW,GAAG,QAAQ,GAAG,CAAC,CAAC;AACjC,MAAM,eAAe,GAAG,CAAC,CAAC;AAC1B,MAAM,kBAAkB,GAAG,UAAU,CAAC;AAEtC,+DAA+D;AAC/D,MAAM,WAAW;IACL,KAAK,CAAW;IAChB,OAAO,CAAS;IAChB,OAAO,CAAW;IAE1B;QACI,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;IACtB,CAAC;IAED,GAAG,CAAC,IAAY;QACZ,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;QAClC,MAAM,OAAO,GAAG,aAAa,EAAE,CAAC;QAChC,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC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kCAAkC,EAAE,wBAAwB,EAAE,IAAI,CAAC,CAAC;IACzF,UAAU,CAAC,SAAS,CAAC,0BAA0B,EAAE,qBAAqB,EAAE,IAAI,CAAC,CAAC;IAC9E,UAAU,CAAC,SAAS,CAAC,2BAA2B,EAAE,kBAAkB,EAAE,IAAI,CAAC,CAAC;IAC5E,UAAU,CAAC,SAAS,CAAC,6BAA6B,EAAE,oBAAoB,EAAE,IAAI,CAAC,CAAC;IAChF,UAAU,CAAC,SAAS,CAAC,mBAAmB,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;IAE7D,2BAA2B;IAC3B,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,GAAG,iBAAiB,CAAC,MAAM,GAAG,mBAAmB,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IAC5I,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IACtB,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;IACnC,MAAM,CAAC,GAAG,CAAC,iBAAiB,EAAE,kBAAkB,CAAC,CAAC;IAClD,MAAM,CAAC,GAAG,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,CAAC;IACtD,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;IACpC,OAAO,MAAM,CAAC;AAClB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAgB;IAC/C,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAChD,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/msgpack.d.ts b/node_modules/typescript/dist/api/node/msgpack.d.ts new file mode 100644 index 0000000..471e8e5 --- /dev/null +++ b/node_modules/typescript/dist/api/node/msgpack.d.ts @@ -0,0 +1,32 @@ +export declare const MSGPACK_FIXARRAY3 = 147; +export declare const MSGPACK_BIN8 = 196; +export declare const MSGPACK_BIN16 = 197; +export declare const MSGPACK_BIN32 = 198; +export declare const MSGPACK_UINT8 = 204; +/** Compute the MessagePack bin header size for a given data length. */ +export declare function binHeaderSize(len: number): number; +/** Write a MessagePack bin header into `buf` at `off`, return new offset. */ +export declare function writeBinHeader(buf: Uint8Array, off: number, len: number): number; +export declare class MsgpackWriter { + private buf; + private view; + private pos; + constructor(initialSize?: number); + private ensure; + writeArrayHeader(length: number): void; + writeUint(value: number): void; + writeString(str: string): void; + writeBool(value: boolean): void; + finish(): Uint8Array; +} +export declare class MsgpackReader { + private buf; + private view; + private pos; + constructor(data: Uint8Array, offset?: number); + readArrayHeader(): number; + readUint(): number; + readString(): string; + readBool(): boolean; +} +//# sourceMappingURL=msgpack.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/msgpack.d.ts.map b/node_modules/typescript/dist/api/node/msgpack.d.ts.map new file mode 100644 index 0000000..91ba1b0 --- /dev/null +++ b/node_modules/typescript/dist/api/node/msgpack.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"msgpack.d.ts","sourceRoot":"","sources":["../../../src/api/node/msgpack.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,iBAAiB,MAAO,CAAC;AACtC,eAAO,MAAM,YAAY,MAAO,CAAC;AACjC,eAAO,MAAM,aAAa,MAAO,CAAC;AAClC,eAAO,MAAM,aAAa,MAAO,CAAC;AAClC,eAAO,MAAM,aAAa,MAAO,CAAC;AAIlC,uEAAuE;AACvE,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAIjD;AAED,6EAA6E;AAC7E,wBAAgB,cAAc,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAkBhF;AAKD,qBAAa,aAAa;IACtB,OAAO,CAAC,GAAG,CAAa;IACxB,OAAO,CAAC,IAAI,CAAW;IACvB,OAAO,CAAC,GAAG,CAAS;gBAER,WAAW,SAAM;IAM7B,OAAO,CAAC,MAAM;IAWd,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAmBtC,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAwB9B,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IA4B9B,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAK/B,MAAM,IAAI,UAAU;CAGvB;AAED,qBAAa,aAAa;IACtB,OAAO,CAAC,GAAG,CAAa;IACxB,OAAO,CAAC,IAAI,CAAW;IACvB,OAAO,CAAC,GAAG,CAAS;gBAER,IAAI,EAAE,UAAU,EAAE,MAAM,SAAI;IAMxC,eAAe,IAAI,MAAM;IAgBzB,QAAQ,IAAI,MAAM;IAiBlB,UAAU,IAAI,MAAM;IAyBpB,QAAQ,IAAI,OAAO;CAMtB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/msgpack.js b/node_modules/typescript/dist/api/node/msgpack.js new file mode 100644 index 0000000..7c7048e --- /dev/null +++ b/node_modules/typescript/dist/api/node/msgpack.js @@ -0,0 +1,213 @@ +// Minimal msgpack encoder/decoder. +// Supports: arrays, unsigned integers, strings, booleans, binary data. +import { Wtf8Decoder } from "./wtf8.js"; +// ── MessagePack format constants ──────────────────────────────────── +export const MSGPACK_FIXARRAY3 = 0x93; // 3-element fixarray +export const MSGPACK_BIN8 = 0xc4; +export const MSGPACK_BIN16 = 0xc5; +export const MSGPACK_BIN32 = 0xc6; +export const MSGPACK_UINT8 = 0xcc; +// ── Bin header helpers ────────────────────────────────────────────── +/** Compute the MessagePack bin header size for a given data length. */ +export function binHeaderSize(len) { + if (len < 0x100) + return 2; // BIN8: marker + 1-byte size + if (len < 0x10000) + return 3; // BIN16: marker + 2-byte size + return 5; // BIN32: marker + 4-byte size +} +/** Write a MessagePack bin header into `buf` at `off`, return new offset. */ +export function writeBinHeader(buf, off, len) { + if (len < 0x100) { + buf[off++] = MSGPACK_BIN8; + buf[off++] = len; + } + else if (len < 0x10000) { + buf[off++] = MSGPACK_BIN16; + buf[off++] = (len >>> 8) & 0xff; + buf[off++] = len & 0xff; + } + else { + buf[off++] = MSGPACK_BIN32; + buf[off++] = (len >>> 24) & 0xff; + buf[off++] = (len >>> 16) & 0xff; + buf[off++] = (len >>> 8) & 0xff; + buf[off++] = len & 0xff; + } + return off; +} +const encoder = new TextEncoder(); +const decoder = new Wtf8Decoder(); +export class MsgpackWriter { + buf; + view; + pos; + constructor(initialSize = 256) { + this.buf = new Uint8Array(initialSize); + this.view = new DataView(this.buf.buffer); + this.pos = 0; + } + ensure(n) { + if (this.pos + n > this.buf.length) { + let newSize = this.buf.length * 2; + while (newSize < this.pos + n) + newSize *= 2; + const next = new Uint8Array(newSize); + next.set(this.buf); + this.buf = next; + this.view = new DataView(this.buf.buffer); + } + } + writeArrayHeader(length) { + if (length <= 0x0f) { + this.ensure(1); + this.buf[this.pos++] = 0x90 | length; + } + else if (length <= 0xffff) { + this.ensure(3); + this.buf[this.pos++] = 0xdc; + this.view.setUint16(this.pos, length, false); + this.pos += 2; + } + else { + this.ensure(5); + this.buf[this.pos++] = 0xdd; + this.view.setUint32(this.pos, length, false); + this.pos += 4; + } + } + writeUint(value) { + if (value <= 0x7f) { + this.ensure(1); + this.buf[this.pos++] = value; + } + else if (value <= 0xff) { + this.ensure(2); + this.buf[this.pos++] = 0xcc; + this.buf[this.pos++] = value; + } + else if (value <= 0xffff) { + this.ensure(3); + this.buf[this.pos++] = 0xcd; + this.view.setUint16(this.pos, value, false); + this.pos += 2; + } + else { + this.ensure(5); + this.buf[this.pos++] = 0xce; + this.view.setUint32(this.pos, value, false); + this.pos += 4; + } + } + writeString(str) { + const encoded = encoder.encode(str); + const len = encoded.length; + if (len <= 0x1f) { + this.ensure(1 + len); + this.buf[this.pos++] = 0xa0 | len; + } + else if (len <= 0xff) { + this.ensure(2 + len); + this.buf[this.pos++] = 0xd9; + this.buf[this.pos++] = len; + } + else if (len <= 0xffff) { + this.ensure(3 + len); + this.buf[this.pos++] = 0xda; + this.view.setUint16(this.pos, len, false); + this.pos += 2; + } + else { + this.ensure(5 + len); + this.buf[this.pos++] = 0xdb; + this.view.setUint32(this.pos, len, false); + this.pos += 4; + } + this.buf.set(encoded, this.pos); + this.pos += len; + } + writeBool(value) { + this.ensure(1); + this.buf[this.pos++] = value ? 0xc3 : 0xc2; + } + finish() { + return this.buf.subarray(0, this.pos); + } +} +export class MsgpackReader { + buf; + view; + pos; + constructor(data, offset = 0) { + this.buf = data; + this.view = new DataView(data.buffer, data.byteOffset, data.byteLength); + this.pos = offset; + } + readArrayHeader() { + const byte = this.buf[this.pos++]; + if ((byte & 0xf0) === 0x90) + return byte & 0x0f; + if (byte === 0xdc) { + const len = this.view.getUint16(this.pos, false); + this.pos += 2; + return len; + } + if (byte === 0xdd) { + const len = this.view.getUint32(this.pos, false); + this.pos += 4; + return len; + } + throw new Error(`Expected array header, got 0x${byte.toString(16)}`); + } + readUint() { + const byte = this.buf[this.pos++]; + if (byte <= 0x7f) + return byte; + if (byte === 0xcc) + return this.buf[this.pos++]; + if (byte === 0xcd) { + const val = this.view.getUint16(this.pos, false); + this.pos += 2; + return val; + } + if (byte === 0xce) { + const val = this.view.getUint32(this.pos, false); + this.pos += 4; + return val; + } + throw new Error(`Expected uint, got 0x${byte.toString(16)}`); + } + readString() { + const byte = this.buf[this.pos++]; + let len; + if ((byte & 0xe0) === 0xa0) { + len = byte & 0x1f; + } + else if (byte === 0xd9) { + len = this.buf[this.pos++]; + } + else if (byte === 0xda) { + len = this.view.getUint16(this.pos, false); + this.pos += 2; + } + else if (byte === 0xdb) { + len = this.view.getUint32(this.pos, false); + this.pos += 4; + } + else { + throw new Error(`Expected string, got 0x${byte.toString(16)}`); + } + const str = decoder.decode(this.buf.subarray(this.pos, this.pos + len)); + this.pos += len; + return str; + } + readBool() { + const byte = this.buf[this.pos++]; + if (byte === 0xc3) + return true; + if (byte === 0xc2) + return false; + throw new Error(`Expected bool, got 0x${byte.toString(16)}`); + } +} +//# sourceMappingURL=msgpack.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/msgpack.js.map b/node_modules/typescript/dist/api/node/msgpack.js.map new file mode 100644 index 0000000..9feecca --- /dev/null +++ b/node_modules/typescript/dist/api/node/msgpack.js.map @@ -0,0 +1 @@ +{"version":3,"file":"msgpack.js","sourceRoot":"","sources":["../../../src/api/node/msgpack.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,uEAAuE;AAEvE,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,uEAAuE;AACvE,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,CAAC,qBAAqB;AAC5D,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC;AACjC,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC;AAClC,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC;AAClC,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC;AAElC,uEAAuE;AAEvE,uEAAuE;AACvE,MAAM,UAAU,aAAa,CAAC,GAAW;IACrC,IAAI,GAAG,GAAG,KAAK;QAAE,OAAO,CAAC,CAAC,CAAC,6BAA6B;IACxD,IAAI,GAAG,GAAG,OAAO;QAAE,OAAO,CAAC,CAAC,CAAC,8BAA8B;IAC3D,OAAO,CAAC,CAAC,CAAC,8BAA8B;AAC5C,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,cAAc,CAAC,GAAe,EAAE,GAAW,EAAE,GAAW;IACpE,IAAI,GAAG,GAAG,KAAK,EAAE,CAAC;QACd,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,YAAY,CAAC;QAC1B,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,GAAG,CAAC;IACrB,CAAC;SACI,IAAI,GAAG,GAAG,OAAO,EAAE,CAAC;QACrB,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG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IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QAC/B,CAAC;aACI,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;YACrB,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YAC3C,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;QAClB,CAAC;aACI,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;YACrB,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YAC3C,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;QAClB,CAAC;aACI,CAAC;YACF,MAAM,IAAI,KAAK,CAAC,0BAA0B,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QACnE,CAAC;QACD,MAAM,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC;QACxE,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC;QAChB,OAAO,GAAG,CAAC;IACf,CAAC;IAED,QAAQ;QACJ,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QAClC,IAAI,IAAI,KAAK,IAAI;YAAE,OAAO,IAAI,CAAC;QAC/B,IAAI,IAAI,KAAK,IAAI;YAAE,OAAO,KAAK,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,wBAAwB,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IACjE,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/node.d.ts b/node_modules/typescript/dist/api/node/node.d.ts new file mode 100644 index 0000000..fdf9e2f --- /dev/null +++ b/node_modules/typescript/dist/api/node/node.d.ts @@ -0,0 +1,76 @@ +import { type FileReference, type LineAndCharacter, type Node, type Path, SyntaxKind } from "../../ast/index.ts"; +import type { TimingCollector } from "../timing.ts"; +import { RemoteNode, RemoteNodeList } from "./node.generated.ts"; +import { type SourceFileInfo, type TextDecoder } from "./node.infrastructure.ts"; +export { RemoteNode, RemoteNodeList } from "./node.generated.ts"; +export { readParseOptionsKey, readSourceFileHash, RemoteNodeBase } from "./node.infrastructure.ts"; +export declare class RemoteSourceFile extends RemoteNode implements SourceFileInfo { + readonly nodes: (RemoteNode | RemoteNodeList)[]; + readonly _offsetNodes: number; + readonly _offsetStringTableOffsets: number; + readonly _offsetStringTable: number; + readonly _offsetExtendedData: number; + readonly _offsetStructuredData: number; + readonly _decoder: TextDecoder; + readonly _timing: TimingCollector | undefined; + private _lineStarts; + private _cachedText; + private _cachedReferencedFiles; + private _cachedTypeReferenceDirectives; + private _cachedLibReferenceDirectives; + private _cachedImports; + private _cachedModuleAugmentations; + private _cachedAmbientModuleNames; + constructor(data: Uint8Array, decoder: TextDecoder, timing?: TimingCollector); + readFileReferences(structuredDataOffset: number): readonly FileReference[]; + readNodeIndexArray(structuredDataOffset: number): readonly Node[]; + readStringArray(structuredDataOffset: number): readonly string[]; + /** @internal */ + getOrCreateNodeAtIndex(index: number): Node; + private get extendedDataOffset(); + get fileName(): string; + get path(): string; + get languageVariant(): number; + get scriptKind(): number; + get referencedFiles(): readonly FileReference[]; + get typeReferenceDirectives(): readonly FileReference[]; + get libReferenceDirectives(): readonly FileReference[]; + get imports(): readonly Node[]; + get moduleAugmentations(): readonly Node[]; + get ambientModuleNames(): readonly string[]; + get externalModuleIndicator(): Node | true | undefined; + get isDeclarationFile(): boolean; + get text(): string; + getLineStarts(): readonly number[]; + getLineAndCharacterOfPosition(position: number): LineAndCharacter; + getPositionOfLineAndCharacter(line: number, character: number): number; +} +/** + * Find a descendant node at a specific position with matching kind and end position. + */ +export declare function findDescendant(root: Node, pos: number, end: number, kind: SyntaxKind): Node | undefined; +/** + * Parsed components of a node handle. + */ +export interface ParsedNodeHandle { + index: number; + kind: SyntaxKind; + path: Path; +} +/** + * Parse a node handle string into its components. + * Handle format: "index.kind.path" where path may contain dots. + */ +export declare function parseNodeHandle(handle: string): ParsedNodeHandle; +/** + * Decode binary-encoded AST data into a Node. + * Works for any binary-encoded node, including synthetic nodes + * (e.g. from typeToTypeNode) that don't have a source file. + */ +export declare function decodeNode(data: Uint8Array): Node; +/** + * Get the unique ID string for a remote node. + * Throws if the node is not a RemoteNode (i.e. not decoded from binary data). + */ +export declare function getNodeId(node: Node): string; +//# sourceMappingURL=node.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/node.d.ts.map b/node_modules/typescript/dist/api/node/node.d.ts.map new file mode 100644 index 0000000..71c7016 --- /dev/null +++ b/node_modules/typescript/dist/api/node/node.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/api/node/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,IAAI,EAET,KAAK,IAAI,EACT,UAAU,EAEb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EACH,UAAU,EACV,cAAc,EACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEH,KAAK,cAAc,EACnB,KAAK,WAAW,EACnB,MAAM,0BAA0B,CAAC;AAelC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAQnG,qBAAa,gBAAiB,SAAQ,UAAW,YAAW,cAAc;IACtE,QAAQ,CAAC,KAAK,EAAE,CAAC,UAAU,GAAG,cAAc,CAAC,EAAE,CAAC;IAChD,Q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AI,SAAS,aAAa,EAAE,CAMrD;IAED,IAAI,OAAO,IAAI,SAAS,IAAI,EAAE,CAM7B;IAED,IAAI,mBAAmB,IAAI,SAAS,IAAI,EAAE,CAMzC;IAED,IAAI,kBAAkB,IAAI,SAAS,MAAM,EAAE,CAM1C;IAED,IAAI,uBAAuB,IAAI,IAAI,GAAG,IAAI,GAAG,SAAS,CAKrD;IAED,IAAI,iBAAiB,IAAI,OAAO,CAE/B;IAED,IAAI,IAAI,IAAI,MAAM,CAKjB;IAID,aAAa,IAAI,SAAS,MAAM,EAAE;IAIlC,6BAA6B,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB;IAMjE,6BAA6B,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM;CAOzE;AAyBD;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,CAiBvG;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,IAAI,CAAC;CACd;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAehE;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAGjD;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAK5C"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/node.generated.d.ts b/node_modules/typescript/dist/api/node/node.generated.d.ts new file mode 100644 index 0000000..3fae8eb --- /dev/null +++ b/node_modules/typescript/dist/api/node/node.generated.d.ts @@ -0,0 +1,182 @@ +import { ModifierFlags, type Node, type NodeArray, type SourceFile, SyntaxKind } from "../../ast/index.ts"; +import { RemoteNodeBase, type SourceFileInfo } from "./node.infrastructure.ts"; +export declare class RemoteNodeList extends Array implements NodeArray { + static get [Symbol.species](): ArrayConstructor; + parent: RemoteNode; + hasTrailingComma?: boolean; + transformFlags: number; + protected view: DataView; + protected index: number; + private _byteIndex; + private _cursorIndex; + private _cursorNodeIndex; + get pos(): number; + get end(): number; + get next(): number; + private get data(); + private sourceFile; + constructor(view: DataView, index: number, parent: RemoteNode, sourceFile: SourceFileInfo, offsetNodes: number); + get 0(): RemoteNode; + get 1(): RemoteNode; + get 2(): RemoteNode; + get 3(): RemoteNode; + get 4(): RemoteNode; + get 5(): RemoteNode; + get 6(): RemoteNode; + get 7(): RemoteNode; + get 8(): RemoteNode; + get 9(): RemoteNode; + get 10(): RemoteNode; + get 11(): RemoteNode; + get 12(): RemoteNode; + get 13(): RemoteNode; + get 14(): RemoteNode; + get 15(): RemoteNode; + [Symbol.iterator](): ArrayIterator; + forEachNode(visitNode: (node: RemoteNode) => T | undefined): T | undefined; + at(index: number): RemoteNode; + private getOrCreateChildAtNodeIndex; + __print(): string; +} +export declare class RemoteNode extends RemoteNodeBase implements Node { + protected static NODE_LEN: number; + protected get sourceFile(): SourceFileInfo; + protected _sourceFile: SourceFileInfo; + get id(): string; + constructor(view: DataView, index: number, parent: RemoteNode, sourceFile: SourceFileInfo, offsetNodes: number); + forEachChild(visitNode: (node: Node) => T, visitList?: (list: NodeArray) => T): T | undefined; + get jsDoc(): readonly Node[] | undefined; + getSourceFile(): SourceFile; + getStart(sourceFile?: SourceFile, includeJsDocComment?: boolean): number; + getFullStart(): number; + getEnd(): number; + getWidth(sourceFile?: SourceFile): number; + getFullWidth(): number; + getLeadingTriviaWidth(sourceFile?: SourceFile): number; + getFullText(sourceFile?: SourceFile): string; + getText(sourceFile?: SourceFile): string; + protected getString(index: number): string; + private getOrCreateChildAtNodeIndex; + private hasChildren; + private getNamedChild; + private getChildAtOrder; + __print(): string; + __printChildren(): string; + __printSubtree(): string; + get containsOnlyTriviaWhiteSpaces(): boolean; + get isArrayType(): boolean; + get isBracketed(): boolean; + get isExportEquals(): boolean; + get isNameFirst(): boolean; + get isTypeOf(): boolean; + get isTypeOnly(): boolean; + get multiLine(): boolean; + get keyword(): SyntaxKind | undefined; + get keywordToken(): SyntaxKind | undefined; + get operator(): SyntaxKind | undefined; + get phaseModifier(): SyntaxKind | undefined; + get token(): SyntaxKind | undefined; + get templateFlags(): number | undefined; + get tokenFlags(): number; + get argument(): RemoteNode | undefined; + get argumentExpression(): RemoteNode | undefined; + get arguments(): RemoteNodeList | undefined; + get assertsModifier(): RemoteNode | undefined; + get asteriskToken(): RemoteNode | undefined; + get attributes(): RemoteNode | RemoteNodeList | undefined; + get awaitModifier(): RemoteNode | undefined; + get block(): RemoteNode | undefined; + get body(): RemoteNode | undefined; + get caseBlock(): RemoteNode | undefined; + get catchClause(): RemoteNode | undefined; + get checkType(): RemoteNode | undefined; + get children(): RemoteNode | RemoteNodeList | undefined; + get className(): RemoteNode | undefined; + get clauses(): RemoteNodeList | undefined; + get closingElement(): RemoteNode | undefined; + get closingFragment(): RemoteNode | undefined; + get colonToken(): RemoteNode | undefined; + get comment(): RemoteNodeList | undefined; + get condition(): RemoteNode | undefined; + get constraint(): RemoteNode | undefined; + get declarationList(): RemoteNode | undefined; + get declarations(): RemoteNodeList | undefined; + get defaultType(): RemoteNode | undefined; + get dotDotDotToken(): RemoteNode | undefined; + get elements(): RemoteNodeList | undefined; + get elementType(): RemoteNode | undefined; + get elseStatement(): RemoteNode | undefined; + get endOfFileToken(): RemoteNode | undefined; + get equalsGreaterThanToken(): RemoteNode | undefined; + get equalsToken(): RemoteNode | undefined; + get exclamationToken(): RemoteNode | undefined; + get exportClause(): RemoteNode | undefined; + get expression(): RemoteNode | undefined; + get exprName(): RemoteNode | undefined; + get extendsType(): RemoteNode | undefined; + get falseType(): RemoteNode | undefined; + get finallyBlock(): RemoteNode | undefined; + get head(): RemoteNode | undefined; + get heritageClauses(): RemoteNodeList | undefined; + get importClause(): RemoteNode | undefined; + get incrementor(): RemoteNode | undefined; + get indexType(): RemoteNode | undefined; + get initializer(): RemoteNode | undefined; + get jsdocPropertyTags(): RemoteNode | undefined; + get label(): RemoteNode | undefined; + get left(): RemoteNode | undefined; + get literal(): RemoteNode | undefined; + get members(): RemoteNodeList | undefined; + get modifiers(): RemoteNodeList | undefined; + get moduleReference(): RemoteNode | undefined; + get moduleSpecifier(): RemoteNode | undefined; + get name(): RemoteNode | undefined; + get namedBindings(): RemoteNode | undefined; + get nameExpression(): RemoteNode | undefined; + get namespace(): RemoteNode | undefined; + get nameType(): RemoteNode | undefined; + get objectAssignmentInitializer(): RemoteNode | undefined; + get objectType(): RemoteNode | undefined; + get openingElement(): RemoteNode | undefined; + get openingFragment(): RemoteNode | undefined; + get operand(): RemoteNode | undefined; + get operatorToken(): RemoteNode | undefined; + get parameterName(): RemoteNode | undefined; + get parameters(): RemoteNodeList | undefined; + get postfixToken(): RemoteNode | undefined; + get properties(): RemoteNodeList | undefined; + get propertyName(): RemoteNode | undefined; + get qualifier(): RemoteNode | undefined; + get questionDotToken(): RemoteNode | undefined; + get questionToken(): RemoteNode | undefined; + get readonlyToken(): RemoteNode | undefined; + get right(): RemoteNode | undefined; + get statement(): RemoteNode | undefined; + get statements(): RemoteNodeList | undefined; + get tag(): RemoteNode | undefined; + get tagName(): RemoteNode | undefined; + get tags(): RemoteNodeList | undefined; + get template(): RemoteNode | undefined; + get templateSpans(): RemoteNodeList | undefined; + get thenStatement(): RemoteNode | undefined; + get thisArg(): RemoteNode | undefined; + get trueType(): RemoteNode | undefined; + get tryBlock(): RemoteNode | undefined; + get tupleNameSource(): RemoteNode | undefined; + get type(): RemoteNode | undefined; + get typeArguments(): RemoteNodeList | undefined; + get typeExpression(): RemoteNode | undefined; + get typeName(): RemoteNode | undefined; + get typeParameter(): RemoteNode | undefined; + get typeParameters(): RemoteNodeList | undefined; + get types(): RemoteNodeList | undefined; + get value(): RemoteNode | undefined; + get variableDeclaration(): RemoteNode | undefined; + get whenFalse(): RemoteNode | undefined; + get whenTrue(): RemoteNode | undefined; + get text(): string | undefined; + get rawText(): string | undefined; + get flags(): number; + get modifierFlags(): ModifierFlags; +} +//# sourceMappingURL=node.generated.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/node.generated.d.ts.map b/node_modules/typescript/dist/api/node/node.generated.d.ts.map new file mode 100644 index 0000000..6ebc463 --- /dev/null +++ b/node_modules/typescript/dist/api/node/node.generated.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"node.generated.d.ts","sourceRoot":"","sources":["../../../src/api/node/node.generated.ts"],"names":[],"mappings":"AAEA,OAAO,EAEH,aAAa,EACb,KAAK,IAAI,EACT,KAAK,SAAS,EACd,KAAK,UAAU,EACf,UAAU,EACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAQH,cAAc,EACd,KAAK,cAAc,EACtB,MAAM,0BAA0B,CAAC;AAiBlC,qBAAa,cAAe,SAAQ,KAAK,CAAC,UAAU,CAAE,YAAW,SAAS,CAAC,UAAU,CAAC;IAGlF,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAE9C;IAED,MAAM,EAAE,UAAU,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAK;IAC3B,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC;IACzB,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,UAAU,CAAS;IAK3B,OAAO,CAAC,YAAY,CAAa;IACjC,OAAO,CAAC,gBAAgB,CAAa;IAErC,IAAI,GAAG,IAAI,MAAM,CAEhB;IAED,IAAI,GAAG,IAAI,MAAM,CAEhB;IAED,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,OAAO,KAAK,IAAI,GAEf;IAED,OAAO,CAAC,UAAU,CAAiB;gBAEvB,IAAI,EAAE,QAAQ,EAAE,KAAK,E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C;IACD,IAAI,QAAQ,IAAI,UAAU,GAAG,SAAS,CAErC;IAID,IAAI,IAAI,IAAI,MAAM,GAAG,SAAS,CA0B7B;IAED,IAAI,OAAO,IAAI,MAAM,GAAG,SAAS,CAShC;IAMD,IAAI,KAAK,IAAI,MAAM,CAElB;IAED,IAAI,aAAa,IAAI,aAAa,CAQjC;CACJ"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/node.generated.js b/node_modules/typescript/dist/api/node/node.generated.js new file mode 100644 index 0000000..e42577b --- /dev/null +++ b/node_modules/typescript/dist/api/node/node.generated.js @@ -0,0 +1,835 @@ +// Code generated by _scripts/generate-encoder.ts. DO NOT EDIT. +import { getTokenPosOfNode, ModifierFlags, SyntaxKind, } from "../../ast/index.js"; +import { modifierToFlag, NODE_CHILD_MASK, NODE_DATA_TYPE_MASK, NODE_EXTENDED_DATA_MASK, NODE_STRING_INDEX_MASK, popcount8, RemoteNodeBase, } from "./node.infrastructure.js"; +import { childProperties, KIND_NODE_LIST, NODE_DATA_TYPE_CHILDREN, NODE_DATA_TYPE_EXTENDED, NODE_DATA_TYPE_STRING, NODE_LEN, NODE_OFFSET_DATA, NODE_OFFSET_END, NODE_OFFSET_FLAGS, NODE_OFFSET_KIND, NODE_OFFSET_NEXT, NODE_OFFSET_PARENT, NODE_OFFSET_POS, } from "./protocol.js"; +export class RemoteNodeList extends Array { + // Inherited Array methods like filter/map/slice use ArraySpeciesCreate, which would + // otherwise call `new RemoteNodeList(length)` and fail. Produce a plain Array instead. + static get [Symbol.species]() { + return Array; + } + parent; + hasTrailingComma; + transformFlags = 0; + view; + index; + _byteIndex; + // Cursor memoizing the last resolved (logical index -> node index) so that + // sequential forward access (index loops and list[i], plus forEach/map/ + // reduce/filter) resumes instead of re-walking from the head, turning an + // O(n) pass over the whole list from O(n^2) into O(n). + _cursorIndex = 0; + _cursorNodeIndex = 0; + get pos() { + return this.view.getUint32(this._byteIndex + NODE_OFFSET_POS, true); + } + get end() { + return this.view.getUint32(this._byteIndex + NODE_OFFSET_END, true); + } + get next() { + return this.view.getUint32(this._byteIndex + NODE_OFFSET_NEXT, true); + } + get data() { + return this.view.getUint32(this._byteIndex + NODE_OFFSET_DATA, true); + } + sourceFile; + constructor(view, index, parent, sourceFile, offsetNodes) { + super(); + this.view = view; + this.index = index; + this.parent = parent; + this.sourceFile = sourceFile; + this._byteIndex = offsetNodes + index * NODE_LEN; + this.length = this.data; + this._cursorNodeIndex = index + 1; + const length = this.length; + for (let i = 16; i < length; i++) { + Object.defineProperty(this, i, { + get() { + return this.at(i); + }, + }); + } + } + get 0() { + return this.at(0); + } + get 1() { + return this.at(1); + } + get 2() { + return this.at(2); + } + get 3() { + return this.at(3); + } + get 4() { + return this.at(4); + } + get 5() { + return this.at(5); + } + get 6() { + return this.at(6); + } + get 7() { + return this.at(7); + } + get 8() { + return this.at(8); + } + get 9() { + return this.at(9); + } + get 10() { + return this.at(10); + } + get 11() { + return this.at(11); + } + get 12() { + return this.at(12); + } + get 13() { + return this.at(13); + } + get 14() { + return this.at(14); + } + get 15() { + return this.at(15); + } + *[Symbol.iterator]() { + if (!this.length) + return; + let next = this.index + 1; + while (next) { + const child = this.getOrCreateChildAtNodeIndex(next); + next = child.next; + yield child; + } + } + forEachNode(visitNode) { + if (!this.length) + return; + let next = this.index + 1; + while (next) { + const child = this.getOrCreateChildAtNodeIndex(next); + next = child.next; + const result = visitNode(child); + if (result) + return result; + } + } + at(index) { + if (!Number.isInteger(index)) { + return undefined; + } + if (index >= this.data || (index < 0 && -index > this.data)) { + return undefined; + } + if (index < 0) { + index = this.length + index; + } + // Walk the raw buffer following each node's `next` pointer instead of + // materializing every intermediate RemoteNode just to read it. Resume from + // the memoized cursor when possible so sequential forward access is O(1) + // amortized (a full in-order pass is O(n) rather than O(n^2)). + const offsetNodes = this.sourceFile._offsetNodes; + let i; + let next; + if (index >= this._cursorIndex) { + i = this._cursorIndex; + next = this._cursorNodeIndex; + } + else { + i = 0; + next = this.index + 1; + } + for (; i < index; i++) { + next = this.view.getUint32(offsetNodes + next * NODE_LEN + NODE_OFFSET_NEXT, true); + } + this._cursorIndex = index; + this._cursorNodeIndex = next; + return this.getOrCreateChildAtNodeIndex(next); + } + getOrCreateChildAtNodeIndex(index) { + let child = this.sourceFile.nodes[index]; + if (!child) { + const kind = this.view.getUint32(this.sourceFile._offsetNodes + index * NODE_LEN + NODE_OFFSET_KIND, true); + if (kind === KIND_NODE_LIST) { + throw new Error("NodeList cannot directly contain another NodeList"); + } + const sf = this.sourceFile; + child = new RemoteNode(this.view, index, this.parent, sf, sf._offsetNodes); + sf.nodes[index] = child; + sf._timing?.recordMaterialization(); + } + return child; + } + __print() { + const result = []; + result.push(`kind: NodeList`); + result.push(`index: ${this.index}`); + result.push(`byteIndex: ${this._byteIndex}`); + result.push(`length: ${this.length}`); + return result.join("\n"); + } +} +export class RemoteNode extends RemoteNodeBase { + static NODE_LEN = NODE_LEN; + get sourceFile() { + return this._sourceFile; + } + _sourceFile; + get id() { + return `${this.index}.${this.kind}.${this.sourceFile.path}`; + } + constructor(view, index, parent, sourceFile, offsetNodes) { + super(view, index, parent, offsetNodes + index * NODE_LEN); + this._sourceFile = sourceFile; + } + forEachChild(visitNode, visitList) { + if (this.hasChildren()) { + let next = this.index + 1; + do { + const child = this.getOrCreateChildAtNodeIndex(next); + if (child instanceof RemoteNodeList) { + if (visitList) { + const result = visitList(child); + if (result) { + return result; + } + } + else { + const result = child.forEachNode(visitNode); + if (result) { + return result; + } + } + } + else if (child.kind !== SyntaxKind.JSDoc) { + const result = visitNode(child); + if (result) { + return result; + } + } + next = child.next; + } while (next); + } + } + get jsDoc() { + if (!this.hasChildren()) { + return undefined; + } + let result; + let next = this.index + 1; + do { + const child = this.getOrCreateChildAtNodeIndex(next); + if (!(child instanceof RemoteNodeList) && child.kind === SyntaxKind.JSDoc) { + (result ??= []).push(child); + } + next = child.next; + } while (next); + return result; + } + getSourceFile() { + return this.sourceFile; + } + getStart(sourceFile, includeJsDocComment) { + return getTokenPosOfNode(this, sourceFile ?? this.getSourceFile(), includeJsDocComment); + } + getFullStart() { + return this.pos; + } + getEnd() { + return this.end; + } + getWidth(sourceFile) { + return this.getEnd() - this.getStart(sourceFile); + } + getFullWidth() { + return this.end - this.pos; + } + getLeadingTriviaWidth(sourceFile) { + return this.getStart(sourceFile) - this.pos; + } + getFullText(sourceFile) { + return (sourceFile ?? this.getSourceFile()).text.substring(this.pos, this.end); + } + getText(sourceFile) { + sourceFile ??= this.getSourceFile(); + return sourceFile.text.substring(this.getStart(sourceFile), this.end); + } + getString(index) { + const offsetStringTableOffsets = this.sourceFile._offsetStringTableOffsets; + const start = this.view.getUint32(offsetStringTableOffsets + index * 4, true); + const end = this.view.getUint32(offsetStringTableOffsets + (index + 1) * 4, true); + const offsetStringTable = this.sourceFile._offsetStringTable; + const text = new Uint8Array(this.view.buffer, this.view.byteOffset + offsetStringTable + start, end - start); + return this.sourceFile._decoder.decode(text); + } + getOrCreateChildAtNodeIndex(index) { + let child = this.sourceFile.nodes[index]; + if (!child) { + const sf = this.sourceFile; + const offsetNodes = sf._offsetNodes; + const kind = this.view.getUint32(offsetNodes + index * NODE_LEN + NODE_OFFSET_KIND, true); + child = kind === KIND_NODE_LIST + ? new RemoteNodeList(this.view, index, this, sf, offsetNodes) + : new RemoteNode(this.view, index, this, sf, offsetNodes); + sf.nodes[index] = child; + sf._timing?.recordMaterialization(); + } + return child; + } + hasChildren() { + if (this._byteIndex >= this.view.byteLength - NODE_LEN) { + return false; + } + const nextNodeParent = this.view.getUint32(this.sourceFile._offsetNodes + (this.index + 1) * NODE_LEN + NODE_OFFSET_PARENT, true); + return nextNodeParent === this.index; + } + getNamedChild(propertyName) { + const kind = this.kind; + const propertyNames = childProperties[kind]; + if (!propertyNames) { + return undefined; + } + const order = propertyNames.indexOf(propertyName); + if (order === -1) { + return undefined; + } + return this.getChildAtOrder(order); + } + getChildAtOrder(order) { + const mask = this.childMask; + if (!(mask & (1 << order))) { + // Property is not present + return undefined; + } + // The property index is `order`, minus the number of zeros in the mask that are in bit positions less + // than the `order`th bit. Example: + // + // This is a MethodDeclaration with mask 0b01110101. The possible properties are + // ["modifiers", "asteriskToken", "name", "postfixToken", "typeParameters", "parameters", "type", "body"] + // (it has modifiers, name, typeParameters, parameters, and type). + // + // | Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | + // | ----- | ---- | ---- | ---------- | -------------- | ------------ | ---- | ------------- | --------- | + // | Value | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 1 | + // | Name | body | type | parameters | typeParameters | postfixToken | name | asteriskToken | modifiers | + // + // We are trying to get the index of "parameters" (bit = 5). + // First, set all the more significant bits to 1: + // + // | Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | + // | ----- | ---- | ---- | ---------- | -------------- | ------------ | ---- | ------------- | --------- | + // | Value | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 1 | + // + // Then, flip the bits: + // + // | Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | + // | ----- | ---- | ---- | ---------- | -------------- | ------------ | ---- | ------------- | --------- | + // | Value | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | + // + // Counting the 1s gives us the number of *missing properties* before the `order`th property. If every property + // were present, we would have `parameters = children[5]`, but since `postfixToken` and `astersiskToken` are + // missing, we have `parameters = children[5 - 2]`. + const propertyIndex = order - popcount8[~(mask | ((0xff << order) & 0xff)) & 0xff]; + let childIndex = this.index + 1; + for (let i = 0; i < propertyIndex; i++) { + // Walk through children via their `next` pointer until we get to the right property index + childIndex = this.view.getUint32(this.sourceFile._offsetNodes + childIndex * NODE_LEN + NODE_OFFSET_NEXT, true); + } + return this.getOrCreateChildAtNodeIndex(childIndex); + } + __print() { + const result = []; + result.push(`index: ${this.index}`); + result.push(`byteIndex: ${this._byteIndex}`); + result.push(`kind: ${SyntaxKind[this.kind]}`); + result.push(`pos: ${this.pos}`); + result.push(`end: ${this.end}`); + result.push(`next: ${this.next}`); + result.push(`parent: ${this.parentIndex}`); + result.push(`data: ${this.data.toString(2).padStart(32, "0")}`); + const dataType = this.dataType === NODE_DATA_TYPE_CHILDREN ? "children" : + this.dataType === NODE_DATA_TYPE_STRING ? "string" : + "extended"; + result.push(`dataType: ${dataType}`); + if (this.dataType === NODE_DATA_TYPE_CHILDREN) { + result.push(`childMask: ${this.childMask.toString(2).padStart(8, "0")}`); + result.push(`childProperties: ${childProperties[this.kind]?.join(", ")}`); + } + return result.join("\n"); + } + __printChildren() { + const result = []; + let next = this.index + 1; + while (next) { + const child = this.getOrCreateChildAtNodeIndex(next); + next = child.next; + result.push(child.__print()); + } + return result.join("\n\n"); + } + __printSubtree() { + const result = [this.__print()]; + this.forEachChild(function visitNode(node) { + result.push(node.__print()); + node.forEachChild(visitNode); + }, visitList => { + result.push(visitList.__print()); + }); + return result.join("\n\n"); + } + // ═══ Generated boolean property getters ═══ + get containsOnlyTriviaWhiteSpaces() { + return (this.data & (1 << 24)) !== 0; + } + get isArrayType() { + return (this.data & (1 << 24)) !== 0; + } + get isBracketed() { + return (this.data & (1 << 24)) !== 0; + } + get isExportEquals() { + return (this.data & (1 << 24)) !== 0; + } + get isNameFirst() { + return (this.data & (1 << 25)) !== 0; + } + get isTypeOf() { + return (this.data & (1 << 24)) !== 0; + } + get isTypeOnly() { + return (this.data & (1 << 24)) !== 0; + } + get multiLine() { + return (this.data & (1 << 24)) !== 0; + } + // ═══ Generated SyntaxKind union property getters ═══ + get keyword() { + switch (this.kind) { + case SyntaxKind.ModuleDeclaration: + return (this.data >> 24) & 0x1 ? SyntaxKind.NamespaceKeyword : SyntaxKind.ModuleKeyword; + } + } + get keywordToken() { + switch (this.kind) { + case SyntaxKind.MetaProperty: + return (this.data >> 24) & 0x1 ? SyntaxKind.NewKeyword : SyntaxKind.ImportKeyword; + } + } + get operator() { + switch (this.kind) { + case SyntaxKind.PrefixUnaryExpression: { + const idx = (this.data >> 24) & 0x7; + if (idx === 1) + return SyntaxKind.MinusToken; + if (idx === 2) + return SyntaxKind.TildeToken; + if (idx === 3) + return SyntaxKind.ExclamationToken; + if (idx === 4) + return SyntaxKind.PlusPlusToken; + if (idx === 5) + return SyntaxKind.MinusMinusToken; + return SyntaxKind.PlusToken; + } + case SyntaxKind.PostfixUnaryExpression: + return (this.data >> 24) & 0x1 ? SyntaxKind.MinusMinusToken : SyntaxKind.PlusPlusToken; + case SyntaxKind.TypeOperator: { + const idx = (this.data >> 24) & 0x3; + if (idx === 1) + return SyntaxKind.ReadonlyKeyword; + if (idx === 2) + return SyntaxKind.UniqueKeyword; + return SyntaxKind.KeyOfKeyword; + } + } + } + get phaseModifier() { + switch (this.kind) { + case SyntaxKind.ImportClause: { + const idx = (this.data >> 24) & 0x3; + if (idx === 0) + return undefined; + return idx === 1 ? SyntaxKind.TypeKeyword : idx === 2 ? SyntaxKind.DeferKeyword : undefined; + } + } + } + get token() { + switch (this.kind) { + case SyntaxKind.HeritageClause: + return (this.data >> 24) & 0x1 ? SyntaxKind.ImplementsKeyword : SyntaxKind.ExtendsKeyword; + case SyntaxKind.ImportAttributes: + return (this.data >> 25) & 0x1 ? SyntaxKind.AssertKeyword : SyntaxKind.WithKeyword; + } + } + get templateFlags() { + switch (this.kind) { + case SyntaxKind.TemplateHead: + case SyntaxKind.TemplateMiddle: + case SyntaxKind.TemplateTail: + const extendedDataOffset = this.sourceFile._offsetExtendedData + (this.data & NODE_EXTENDED_DATA_MASK); + return this.view.getUint32(extendedDataOffset + 8, true); + } + } + get tokenFlags() { + switch (this.kind) { + case SyntaxKind.StringLiteral: + case SyntaxKind.NumericLiteral: + case SyntaxKind.BigIntLiteral: + case SyntaxKind.RegularExpressionLiteral: + const extendedDataOffset = this.sourceFile._offsetExtendedData + (this.data & NODE_EXTENDED_DATA_MASK); + return this.view.getUint32(extendedDataOffset + 4, true); + default: + return 0; + } + } + // ═══ Generated child property getters ═══ + get argument() { + return this.getNamedChild("argument"); + } + get argumentExpression() { + return this.getNamedChild("argumentExpression"); + } + get arguments() { + return this.getNamedChild("arguments"); + } + get assertsModifier() { + return this.getNamedChild("assertsModifier"); + } + get asteriskToken() { + return this.getNamedChild("asteriskToken"); + } + get attributes() { + return this.getNamedChild("attributes"); + } + get awaitModifier() { + return this.getNamedChild("awaitModifier"); + } + get block() { + return this.getNamedChild("block"); + } + get body() { + return this.getNamedChild("body"); + } + get caseBlock() { + return this.getNamedChild("caseBlock"); + } + get catchClause() { + return this.getNamedChild("catchClause"); + } + get checkType() { + return this.getNamedChild("checkType"); + } + get children() { + return this.getNamedChild("children"); + } + get className() { + return this.getNamedChild("className"); + } + get clauses() { + return this.getNamedChild("clauses"); + } + get closingElement() { + return this.getNamedChild("closingElement"); + } + get closingFragment() { + return this.getNamedChild("closingFragment"); + } + get colonToken() { + return this.getNamedChild("colonToken"); + } + get comment() { + return this.getNamedChild("comment"); + } + get condition() { + return this.getNamedChild("condition"); + } + get constraint() { + return this.getNamedChild("constraint"); + } + get declarationList() { + return this.getNamedChild("declarationList"); + } + get declarations() { + return this.getNamedChild("declarations"); + } + get defaultType() { + return this.getNamedChild("defaultType"); + } + get dotDotDotToken() { + return this.getNamedChild("dotDotDotToken"); + } + get elements() { + return this.getNamedChild("elements"); + } + get elementType() { + return this.getNamedChild("elementType"); + } + get elseStatement() { + return this.getNamedChild("elseStatement"); + } + get endOfFileToken() { + return this.getNamedChild("endOfFileToken"); + } + get equalsGreaterThanToken() { + return this.getNamedChild("equalsGreaterThanToken"); + } + get equalsToken() { + return this.getNamedChild("equalsToken"); + } + get exclamationToken() { + return this.getNamedChild("exclamationToken"); + } + get exportClause() { + return this.getNamedChild("exportClause"); + } + get expression() { + return this.getNamedChild("expression"); + } + get exprName() { + return this.getNamedChild("exprName"); + } + get extendsType() { + return this.getNamedChild("extendsType"); + } + get falseType() { + return this.getNamedChild("falseType"); + } + get finallyBlock() { + return this.getNamedChild("finallyBlock"); + } + get head() { + return this.getNamedChild("head"); + } + get heritageClauses() { + return this.getNamedChild("heritageClauses"); + } + get importClause() { + return this.getNamedChild("importClause"); + } + get incrementor() { + return this.getNamedChild("incrementor"); + } + get indexType() { + return this.getNamedChild("indexType"); + } + get initializer() { + return this.getNamedChild("initializer"); + } + get jsdocPropertyTags() { + return this.getNamedChild("jsdocPropertyTags"); + } + get label() { + return this.getNamedChild("label"); + } + get left() { + return this.getNamedChild("left"); + } + get literal() { + return this.getNamedChild("literal"); + } + get members() { + return this.getNamedChild("members"); + } + get modifiers() { + return this.getNamedChild("modifiers"); + } + get moduleReference() { + return this.getNamedChild("moduleReference"); + } + get moduleSpecifier() { + return this.getNamedChild("moduleSpecifier"); + } + get name() { + return this.getNamedChild("name"); + } + get namedBindings() { + return this.getNamedChild("namedBindings"); + } + get nameExpression() { + return this.getNamedChild("nameExpression"); + } + get namespace() { + return this.getNamedChild("namespace"); + } + get nameType() { + return this.getNamedChild("nameType"); + } + get objectAssignmentInitializer() { + return this.getNamedChild("objectAssignmentInitializer"); + } + get objectType() { + return this.getNamedChild("objectType"); + } + get openingElement() { + return this.getNamedChild("openingElement"); + } + get openingFragment() { + return this.getNamedChild("openingFragment"); + } + get operand() { + return this.getNamedChild("operand"); + } + get operatorToken() { + return this.getNamedChild("operatorToken"); + } + get parameterName() { + return this.getNamedChild("parameterName"); + } + get parameters() { + return this.getNamedChild("parameters"); + } + get postfixToken() { + return this.getNamedChild("postfixToken"); + } + get properties() { + return this.getNamedChild("properties"); + } + get propertyName() { + return this.getNamedChild("propertyName"); + } + get qualifier() { + return this.getNamedChild("qualifier"); + } + get questionDotToken() { + return this.getNamedChild("questionDotToken"); + } + get questionToken() { + return this.getNamedChild("questionToken"); + } + get readonlyToken() { + return this.getNamedChild("readonlyToken"); + } + get right() { + return this.getNamedChild("right"); + } + get statement() { + return this.getNamedChild("statement"); + } + get statements() { + return this.getNamedChild("statements"); + } + get tag() { + return this.getNamedChild("tag"); + } + get tagName() { + return this.getNamedChild("tagName"); + } + get tags() { + return this.getNamedChild("tags"); + } + get template() { + return this.getNamedChild("template"); + } + get templateSpans() { + return this.getNamedChild("templateSpans"); + } + get thenStatement() { + return this.getNamedChild("thenStatement"); + } + get thisArg() { + return this.getNamedChild("thisArg"); + } + get trueType() { + return this.getNamedChild("trueType"); + } + get tryBlock() { + return this.getNamedChild("tryBlock"); + } + get tupleNameSource() { + return this.getNamedChild("tupleNameSource"); + } + get type() { + return this.getNamedChild("type"); + } + get typeArguments() { + return this.getNamedChild("typeArguments"); + } + get typeExpression() { + return this.getNamedChild("typeExpression"); + } + get typeName() { + return this.getNamedChild("typeName"); + } + get typeParameter() { + return this.getNamedChild("typeParameter"); + } + get typeParameters() { + return this.getNamedChild("typeParameters"); + } + get types() { + return this.getNamedChild("types"); + } + get value() { + return this.getNamedChild("value"); + } + get variableDeclaration() { + return this.getNamedChild("variableDeclaration"); + } + get whenFalse() { + return this.getNamedChild("whenFalse"); + } + get whenTrue() { + return this.getNamedChild("whenTrue"); + } + // ═══ Generated string property getters ═══ + get text() { + switch (this.kind) { + case SyntaxKind.Identifier: + case SyntaxKind.PrivateIdentifier: + case SyntaxKind.JsxText: + case SyntaxKind.JSDocText: + case SyntaxKind.JSDocLink: + case SyntaxKind.JSDocLinkPlain: + case SyntaxKind.JSDocLinkCode: { + const stringIndex = this.data & NODE_STRING_INDEX_MASK; + return this.getString(stringIndex); + } + case SyntaxKind.StringLiteral: + case SyntaxKind.NumericLiteral: + case SyntaxKind.BigIntLiteral: + case SyntaxKind.RegularExpressionLiteral: + case SyntaxKind.NoSubstitutionTemplateLiteral: + case SyntaxKind.TemplateHead: + case SyntaxKind.TemplateMiddle: + case SyntaxKind.TemplateTail: + case SyntaxKind.SourceFile: { + const extendedDataOffset = this.sourceFile._offsetExtendedData + (this.data & NODE_EXTENDED_DATA_MASK); + const stringIndex = this.view.getUint32(extendedDataOffset, true); + return this.getString(stringIndex); + } + } + } + get rawText() { + switch (this.kind) { + case SyntaxKind.TemplateHead: + case SyntaxKind.TemplateMiddle: + case SyntaxKind.TemplateTail: + const extendedDataOffset = this.sourceFile._offsetExtendedData + (this.data & NODE_EXTENDED_DATA_MASK); + const stringIndex = this.view.getUint32(extendedDataOffset + 4, true); + return this.getString(stringIndex); + } + } + // ═══ Generated extended data property getters ═══ + // ═══ Other property getters ═══ + get flags() { + return this.view.getUint32(this._byteIndex + NODE_OFFSET_FLAGS, true); + } + get modifierFlags() { + const mods = this.modifiers; + if (!mods) + return ModifierFlags.None; + let flags = ModifierFlags.None; + for (const mod of mods) { + flags |= modifierToFlag(mod.kind); + } + return flags; + } +} +//# sourceMappingURL=node.generated.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/node.generated.js.map b/node_modules/typescript/dist/api/node/node.generated.js.map new file mode 100644 index 0000000..1ab247b --- /dev/null +++ b/node_modules/typescript/dist/api/node/node.generated.js.map @@ -0,0 +1 @@ +{"version":3,"file":"node.generated.js","sourceRoot":"","sources":["../../../src/api/node/node.generated.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAE/D,OAAO,EACH,iBAAiB,EACjB,aAAa,EAIb,UAAU,GACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACH,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,EAEtB,SAAS,EACT,cAAc,GAEjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACH,eAAe,EACf,cAAc,EACd,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,GAClB,MAAM,eAAe,CAAC;AAEvB,MAAM,OAAO,cAAe,SAAQ,KAAiB;IACjD,oFAAoF;IACpF,uFAAuF;IACvF,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC;QACvB,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,MAAM,CAAa;IACnB,gBAAgB,CAAW;IAC3B,cAAc,GAAW,CAAC,CAAC;IACjB,IAAI,CAAW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AI,CAAC,UAAU,CAAC,mBAAmB,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC,CAAC;gBACvG,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,kBAAkB,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;gBACtE,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QAC3C,CAAC;IACL,CAAC;IAED,mDAAmD;IAEnD,iCAAiC;IAEjC,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,GAAG,iBAAiB,EAAE,IAAI,CAAC,CAAC;IAC1E,CAAC;IAED,IAAI,aAAa;QACb,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC;QAC5B,IAAI,CAAC,IAAI;YAAE,OAAO,aAAa,CAAC,IAAI,CAAC;QACrC,IAAI,KAAK,GAAkB,aAAa,CAAC,IAAI,CAAC;QAC9C,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;YACrB,KAAK,IAAI,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACtC,CAAC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/node.infrastructure.d.ts b/node_modules/typescript/dist/api/node/node.infrastructure.d.ts new file mode 100644 index 0000000..d39c282 --- /dev/null +++ b/node_modules/typescript/dist/api/node/node.infrastructure.d.ts @@ -0,0 +1,62 @@ +import { type FileReference, ModifierFlags, type Node, SyntaxKind } from "../../ast/index.ts"; +import type { TimingCollector } from "../timing.ts"; +import { NODE_DATA_TYPE_CHILDREN, NODE_DATA_TYPE_EXTENDED, NODE_DATA_TYPE_STRING } from "./protocol.ts"; +export declare const popcount8: number[]; +export type NodeDataType = typeof NODE_DATA_TYPE_CHILDREN | typeof NODE_DATA_TYPE_STRING | typeof NODE_DATA_TYPE_EXTENDED; +export declare const NODE_DATA_TYPE_MASK = 3221225472; +export declare const NODE_CHILD_MASK = 255; +export declare const NODE_STRING_INDEX_MASK = 16777215; +export declare const NODE_EXTENDED_DATA_MASK = 16777215; +export interface TextDecoder { + decode(input?: ArrayBufferView | ArrayBufferLike): string; +} +export interface SourceFileInfo { + readonly _offsetNodes: number; + readonly _offsetStringTableOffsets: number; + readonly _offsetStringTable: number; + readonly _offsetExtendedData: number; + readonly _offsetStructuredData: number; + readonly _decoder: TextDecoder; + nodes: any[]; + readonly path?: string; + /** + * The timing collector that per-node materialization is reported into, and + * that this source file registered itself with when fetched. Present only + * when timing collection is enabled; when undefined, materialization is not + * timed and no clock is read. + */ + readonly _timing?: TimingCollector | undefined; + readFileReferences(offset: number): readonly FileReference[]; + readNodeIndexArray(offset: number): readonly Node[]; + readStringArray(offset: number): readonly string[]; + getOrCreateNodeAtIndex(index: number): Node; +} +/** + * Read the 128-bit content hash from a source file binary response as a hex string. + */ +export declare function readSourceFileHash(data: DataView): string; +/** + * Read the per-file parse options key from a source file binary response. + * This encodes the ExternalModuleIndicatorOptions bitmask as a string, + * allowing the client to distinguish files parsed with different options. + */ +export declare function readParseOptionsKey(data: DataView): string; +export declare function modifierToFlag(kind: SyntaxKind): ModifierFlags; +export declare class RemoteNodeBase { + parent: any; + view: DataView; + protected index: number; + protected _byteIndex: number; + constructor(view: DataView, index: number, parent: any, byteIndex: number); + get kind(): SyntaxKind; + get pos(): number; + get end(): number; + get next(): number; + protected get parentIndex(): number; + protected get data(): number; + protected get dataType(): NodeDataType; + protected get childMask(): number; + protected getFileText(start: number, end: number): string; + protected get sourceFile(): SourceFileInfo; +} +//# sourceMappingURL=node.infrastructure.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/node.infrastructure.d.ts.map b/node_modules/typescript/dist/api/node/node.infrastructure.d.ts.map new file mode 100644 index 0000000..bcd58d5 --- /dev/null +++ b/node_modules/typescript/dist/api/node/node.infrastructure.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":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,CAAC;IAC7D,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,IAAI,EAAE,CAAC;IACpD,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;IACnD,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/C;AAMD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAMzD;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAE1D;AAMD,wBAAgB,cAAc,CAAC,IAAI,EAAE,UAAU,GAAG,aAAa,CAqC9D;AAMD,qBAAa,cAAc;IACvB,MAAM,EAAE,GAAG,CAAC;IACZ,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC;gBAEjB,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM;IAOzE,IAAI,IAAI,IAAI,UAAU,CAErB;IAED,IAAI,GAAG,IAAI,MAAM,CAEhB;IAED,IAAI,GAAG,IAAI,MAAM,CAEhB;IAED,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,SAAS,KAAK,WAAW,IAAI,MAAM,CAElC;IAED,SAAS,KAAK,IAAI,IAAI,MAAM,CAE3B;IAED,SAAS,KAAK,QAAQ,IAAI,YAAY,CAErC;IAED,SAAS,KAAK,SAAS,IAAI,MAAM,CAKhC;IAED,SAAS,CAAC,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM;IAIzD,SAAS,KAAK,UAAU,IAAI,cAAc,CAGzC;CACJ"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/node.infrastructure.js b/node_modules/typescript/dist/api/node/node.infrastructure.js new file mode 100644 index 0000000..353652f --- /dev/null +++ b/node_modules/typescript/dist/api/node/node.infrastructure.js @@ -0,0 +1,122 @@ +import { ModifierFlags, SyntaxKind, } from "../../ast/index.js"; +import { HEADER_OFFSET_HASH_HI0, HEADER_OFFSET_HASH_HI1, HEADER_OFFSET_HASH_LO0, HEADER_OFFSET_HASH_LO1, HEADER_OFFSET_PARSE_OPTIONS, NODE_DATA_TYPE_CHILDREN, NODE_DATA_TYPE_EXTENDED, NODE_DATA_TYPE_STRING, NODE_OFFSET_DATA, NODE_OFFSET_END, NODE_OFFSET_KIND, NODE_OFFSET_NEXT, NODE_OFFSET_PARENT, NODE_OFFSET_POS, } from "./protocol.js"; +// ═══════════════════════════════════════════════════════════════════════════ +// Constants +// ═══════════════════════════════════════════════════════════════════════════ +export const popcount8 = [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8]; +export const NODE_DATA_TYPE_MASK = 0xc0_00_00_00; +export const NODE_CHILD_MASK = 0x00_00_00_ff; +export const NODE_STRING_INDEX_MASK = 0x00_ff_ff_ff; +export const NODE_EXTENDED_DATA_MASK = 0x00_ff_ff_ff; +// ═══════════════════════════════════════════════════════════════════════════ +// Free functions +// ═══════════════════════════════════════════════════════════════════════════ +/** + * Read the 128-bit content hash from a source file binary response as a hex string. + */ +export function readSourceFileHash(data) { + const lo0 = data.getUint32(HEADER_OFFSET_HASH_LO0, true); + const lo1 = data.getUint32(HEADER_OFFSET_HASH_LO1, true); + const hi0 = data.getUint32(HEADER_OFFSET_HASH_HI0, true); + const hi1 = data.getUint32(HEADER_OFFSET_HASH_HI1, true); + return hex8(hi1) + hex8(hi0) + hex8(lo1) + hex8(lo0); +} +/** + * Read the per-file parse options key from a source file binary response. + * This encodes the ExternalModuleIndicatorOptions bitmask as a string, + * allowing the client to distinguish files parsed with different options. + */ +export function readParseOptionsKey(data) { + return data.getUint32(HEADER_OFFSET_PARSE_OPTIONS, true).toString(); +} +function hex8(n) { + return (n >>> 0).toString(16).padStart(8, "0"); +} +export function modifierToFlag(kind) { + switch (kind) { + case SyntaxKind.StaticKeyword: + return ModifierFlags.Static; + case SyntaxKind.PublicKeyword: + return ModifierFlags.Public; + case SyntaxKind.ProtectedKeyword: + return ModifierFlags.Protected; + case SyntaxKind.PrivateKeyword: + return ModifierFlags.Private; + case SyntaxKind.AbstractKeyword: + return ModifierFlags.Abstract; + case SyntaxKind.AccessorKeyword: + return ModifierFlags.Accessor; + case SyntaxKind.ExportKeyword: + return ModifierFlags.Export; + case SyntaxKind.DeclareKeyword: + return ModifierFlags.Ambient; + case SyntaxKind.ConstKeyword: + return ModifierFlags.Const; + case SyntaxKind.DefaultKeyword: + return ModifierFlags.Default; + case SyntaxKind.AsyncKeyword: + return ModifierFlags.Async; + case SyntaxKind.ReadonlyKeyword: + return ModifierFlags.Readonly; + case SyntaxKind.OverrideKeyword: + return ModifierFlags.Override; + case SyntaxKind.InKeyword: + return ModifierFlags.In; + case SyntaxKind.OutKeyword: + return ModifierFlags.Out; + case SyntaxKind.Decorator: + return ModifierFlags.Decorator; + default: + return ModifierFlags.None; + } +} +// ═══════════════════════════════════════════════════════════════════════════ +// RemoteNodeBase +// ═══════════════════════════════════════════════════════════════════════════ +export class RemoteNodeBase { + parent; // RemoteNode at runtime + view; + index; + _byteIndex; + constructor(view, index, parent, byteIndex) { + this.view = view; + this.index = index; + this.parent = parent; + this._byteIndex = byteIndex; + } + get kind() { + return this.view.getUint32(this._byteIndex + NODE_OFFSET_KIND, true); + } + get pos() { + return this.view.getInt32(this._byteIndex + NODE_OFFSET_POS, true); + } + get end() { + return this.view.getInt32(this._byteIndex + NODE_OFFSET_END, true); + } + get next() { + return this.view.getUint32(this._byteIndex + NODE_OFFSET_NEXT, true); + } + get parentIndex() { + return this.view.getUint32(this._byteIndex + NODE_OFFSET_PARENT, true); + } + get data() { + return this.view.getUint32(this._byteIndex + NODE_OFFSET_DATA, true); + } + get dataType() { + return (this.data & NODE_DATA_TYPE_MASK); + } + get childMask() { + if (this.dataType !== NODE_DATA_TYPE_CHILDREN) { + return -1; + } + return this.data & NODE_CHILD_MASK; + } + getFileText(start, end) { + return this.sourceFile._decoder.decode(new Uint8Array(this.view.buffer, this.view.byteOffset + this.sourceFile._offsetStringTable + start, end - start)); + } + get sourceFile() { + // Overridden in RemoteNode; exists here for getFileText access + throw new Error("sourceFile not available on base"); + } +} +//# sourceMappingURL=node.infrastructure.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/node.infrastructure.js.map b/node_modules/typescript/dist/api/node/node.infrastructure.js.map new file mode 100644 index 0000000..d32e342 --- /dev/null +++ b/node_modules/typescript/dist/api/node/node.infrastructure.js.map @@ -0,0 +1 @@ +{"version":3,"file":"node.infrastructure.js","sourceRoot":"","sources":["../../../src/api/node/node.infrastructure.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,aAAa,EAEb,UAAU,GACb,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACH,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,2BAA2B,EAC3B,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,GAClB,MAAM,eAAe,CAAC;AAEvB,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E,MAAM,CAAC,MAAM,SAAS,GAAa,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EA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AE,GAAW;QAC5C,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,kBAAkB,GAAG,KAAK,EAAE,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC;IAC7J,CAAC;IAED,IAAc,UAAU;QACpB,+DAA+D;QAC/D,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;IACxD,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/node.js b/node_modules/typescript/dist/api/node/node.js new file mode 100644 index 0000000..a2e08f0 --- /dev/null +++ b/node_modules/typescript/dist/api/node/node.js @@ -0,0 +1,298 @@ +import { computeLineStarts, NodeFlags, SyntaxKind, TokenFlags, } from "../../ast/index.js"; +import { MsgpackReader } from "./msgpack.js"; +import { RemoteNode, RemoteNodeList, } from "./node.generated.js"; +import { NODE_EXTENDED_DATA_MASK, } from "./node.infrastructure.js"; +import { HEADER_OFFSET_EXTENDED_DATA, HEADER_OFFSET_NODES, HEADER_OFFSET_STRING_TABLE, HEADER_OFFSET_STRING_TABLE_OFFSETS, HEADER_OFFSET_STRUCTURED_DATA, KIND_NODE_LIST, NODE_LEN, NODE_OFFSET_KIND, NODE_OFFSET_PARENT, } from "./protocol.js"; +import { Wtf8Decoder } from "./wtf8.js"; +// Re-export everything consumers need from the other two files. +export { RemoteNode, RemoteNodeList } from "./node.generated.js"; +export { readParseOptionsKey, readSourceFileHash, RemoteNodeBase } from "./node.infrastructure.js"; +// ═══════════════════════════════════════════════════════════════════════════ +// RemoteSourceFile +// ═══════════════════════════════════════════════════════════════════════════ +const NO_STRUCTURED_DATA = 0xFFFFFFFF; +export class RemoteSourceFile extends RemoteNode { + nodes; + _offsetNodes; + _offsetStringTableOffsets; + _offsetStringTable; + _offsetExtendedData; + _offsetStructuredData; + _decoder; + _timing; + _lineStarts; + _cachedText; + _cachedReferencedFiles; + _cachedTypeReferenceDirectives; + _cachedLibReferenceDirectives; + _cachedImports; + _cachedModuleAugmentations; + _cachedAmbientModuleNames; + constructor(data, decoder, timing) { + const view = new DataView(data.buffer, data.byteOffset, data.byteLength); + const offsetNodes = view.getUint32(HEADER_OFFSET_NODES, true); + super(view, 1, undefined, undefined, offsetNodes); + this._sourceFile = this; + this._offsetNodes = offsetNodes; + this._offsetStringTableOffsets = view.getUint32(HEADER_OFFSET_STRING_TABLE_OFFSETS, true); + this._offsetStringTable = view.getUint32(HEADER_OFFSET_STRING_TABLE, true); + this._offsetExtendedData = view.getUint32(HEADER_OFFSET_EXTENDED_DATA, true); + this._offsetStructuredData = view.getUint32(HEADER_OFFSET_STRUCTURED_DATA, true); + this._decoder = decoder; + this._timing = timing; + this.nodes = Array((view.byteLength - offsetNodes) / NODE_LEN); + this.nodes[1] = this; + // Every node slot is materializable on demand except the nil sentinel at + // index 0 and the source-file node at index 1, which is pre-materialized. + timing?.recordSourceFileFetched(Math.max(0, this.nodes.length - 2)); + } + readFileReferences(structuredDataOffset) { + if (structuredDataOffset === NO_STRUCTURED_DATA) { + return []; + } + const buf = new Uint8Array(this.view.buffer, this.view.byteOffset, this.view.byteLength); + const reader = new MsgpackReader(buf, this._offsetStructuredData + structuredDataOffset); + const count = reader.readArrayHeader(); + const result = []; + for (let i = 0; i < count; i++) { + reader.readArrayHeader(); // 5-element tuple + const pos = reader.readUint(); + const end = reader.readUint(); + const fileName = reader.readString(); + const resolutionMode = reader.readUint(); + const preserve = reader.readBool(); + result.push({ pos, end, fileName, resolutionMode, preserve }); + } + return result; + } + readNodeIndexArray(structuredDataOffset) { + if (structuredDataOffset === NO_STRUCTURED_DATA) { + return []; + } + const buf = new Uint8Array(this.view.buffer, this.view.byteOffset, this.view.byteLength); + const reader = new MsgpackReader(buf, this._offsetStructuredData + structuredDataOffset); + const count = reader.readArrayHeader(); + const result = []; + for (let i = 0; i < count; i++) { + const nodeIndex = reader.readUint(); + result.push(this.getOrCreateNodeAtIndex(nodeIndex)); + } + return result; + } + readStringArray(structuredDataOffset) { + if (structuredDataOffset === NO_STRUCTURED_DATA) { + return []; + } + const buf = new Uint8Array(this.view.buffer, this.view.byteOffset, this.view.byteLength); + const reader = new MsgpackReader(buf, this._offsetStructuredData + structuredDataOffset); + const count = reader.readArrayHeader(); + const result = []; + for (let i = 0; i < count; i++) { + result.push(reader.readString()); + } + return result; + } + /** @internal */ + getOrCreateNodeAtIndex(index) { + let node = this.nodes[index]; + if (!node) { + // Resolve the real parent so that nodes looked up directly by index (e.g. via + // NodeHandle.resolve) report the correct `parent`, rather than always pointing at + // the source file. The stored parent index can refer to a synthetic NodeList + // container; skip those to mirror normal traversal, where list elements take the + // list's parent. The walk terminates at the source file, which occupies index 1 + // and is already cached. + let parentIndex = this.view.getUint32(this._offsetNodes + index * NODE_LEN + NODE_OFFSET_PARENT, true); + while (parentIndex !== index && + this.view.getUint32(this._offsetNodes + parentIndex * NODE_LEN + NODE_OFFSET_KIND, true) === KIND_NODE_LIST) { + parentIndex = this.view.getUint32(this._offsetNodes + parentIndex * NODE_LEN + NODE_OFFSET_PARENT, true); + } + const parent = parentIndex === index ? this : this.getOrCreateNodeAtIndex(parentIndex); + node = new RemoteNode(this.view, index, parent, this, this._offsetNodes); + this.nodes[index] = node; + this._timing?.recordMaterialization(); + } + return node; + } + // ═══ SourceFile-specific extended data getters ═══ + get extendedDataOffset() { + return this._offsetExtendedData + (this.data & NODE_EXTENDED_DATA_MASK); + } + get fileName() { + const stringIndex = this.view.getUint32(this.extendedDataOffset + 4, true); + return this.getString(stringIndex); + } + get path() { + const stringIndex = this.view.getUint32(this.extendedDataOffset + 8, true); + return this.getString(stringIndex); + } + get languageVariant() { + return this.view.getUint32(this.extendedDataOffset + 12, true); + } + get scriptKind() { + return this.view.getUint32(this.extendedDataOffset + 16, true); + } + get referencedFiles() { + if (this._cachedReferencedFiles !== undefined) + return this._cachedReferencedFiles; + const offset = this.view.getUint32(this.extendedDataOffset + 20, true); + const files = this.readFileReferences(offset); + this._cachedReferencedFiles = files; + return files; + } + get typeReferenceDirectives() { + if (this._cachedTypeReferenceDirectives !== undefined) + return this._cachedTypeReferenceDirectives; + const offset = this.view.getUint32(this.extendedDataOffset + 24, true); + const directives = this.readFileReferences(offset); + this._cachedTypeReferenceDirectives = directives; + return directives; + } + get libReferenceDirectives() { + if (this._cachedLibReferenceDirectives !== undefined) + return this._cachedLibReferenceDirectives; + const offset = this.view.getUint32(this.extendedDataOffset + 28, true); + const directives = this.readFileReferences(offset); + this._cachedLibReferenceDirectives = directives; + return directives; + } + get imports() { + if (this._cachedImports !== undefined) + return this._cachedImports; + const offset = this.view.getUint32(this.extendedDataOffset + 32, true); + const imports = this.readNodeIndexArray(offset); + this._cachedImports = imports; + return imports; + } + get moduleAugmentations() { + if (this._cachedModuleAugmentations !== undefined) + return this._cachedModuleAugmentations; + const offset = this.view.getUint32(this.extendedDataOffset + 36, true); + const moduleAugmentations = this.readNodeIndexArray(offset); + this._cachedModuleAugmentations = moduleAugmentations; + return moduleAugmentations; + } + get ambientModuleNames() { + if (this._cachedAmbientModuleNames !== undefined) + return this._cachedAmbientModuleNames; + const offset = this.view.getUint32(this.extendedDataOffset + 40, true); + const names = this.readStringArray(offset); + this._cachedAmbientModuleNames = names; + return names; + } + get externalModuleIndicator() { + const nodeIndex = this.view.getUint32(this.extendedDataOffset + 44, true); + if (nodeIndex === 0) + return undefined; + if (nodeIndex === this.index) + return true; + return this.getOrCreateNodeAtIndex(nodeIndex); + } + get isDeclarationFile() { + return (this.flags & NodeFlags.Ambient) !== 0; + } + get text() { + if (this._cachedText !== undefined) + return this._cachedText; + const text = super.text; + this._cachedText = text; + return text; + } + // ═══ Line/character position mapping ═══ + getLineStarts() { + return this._lineStarts ??= computeLineStarts(this.text ?? ""); + } + getLineAndCharacterOfPosition(position) { + const lineStarts = this.getLineStarts(); + const line = computeLineOfPosition(lineStarts, position); + return { line, character: position - lineStarts[line] }; + } + getPositionOfLineAndCharacter(line, character) { + const lineStarts = this.getLineStarts(); + if (line < 0 || line >= lineStarts.length) { + throw new Error(`Bad line number. Line: ${line}, lineStarts.length: ${lineStarts.length}`); + } + return lineStarts[line] + character; + } +} +/** + * Find the 0-based line number containing the given position via binary search. + * Assumes the first line starts at position 0 and `position` is non-negative. + */ +function computeLineOfPosition(lineStarts, position) { + let low = 0; + let high = lineStarts.length - 1; + while (low <= high) { + const middle = low + ((high - low) >> 1); + const value = lineStarts[middle]; + if (value < position) { + low = middle + 1; + } + else if (value > position) { + high = middle - 1; + } + else { + return middle; + } + } + return low - 1; +} +/** + * Find a descendant node at a specific position with matching kind and end position. + */ +export function findDescendant(root, pos, end, kind) { + if (root.pos === pos && root.end === end && root.kind === kind) { + return root; + } + // Search children + let result; + root.forEachChild(child => { + if (result) + return result; // Already found + // Only search in children that could contain our target + if (child.pos <= pos && child.end >= end) { + result = findDescendant(child, pos, end, kind); + } + return undefined; + }); + return result; +} +/** + * Parse a node handle string into its components. + * Handle format: "index.kind.path" where path may contain dots. + */ +export function parseNodeHandle(handle) { + const firstDot = handle.indexOf("."); + if (firstDot === -1) { + throw new Error(`Invalid node handle: ${handle}`); + } + const secondDot = handle.indexOf(".", firstDot + 1); + if (secondDot === -1) { + throw new Error(`Invalid node handle: ${handle}`); + } + return { + index: parseInt(handle.slice(0, firstDot), 10), + kind: parseInt(handle.slice(firstDot + 1, secondDot), 10), + path: handle.slice(secondDot + 1), + }; +} +/** + * Decode binary-encoded AST data into a Node. + * Works for any binary-encoded node, including synthetic nodes + * (e.g. from typeToTypeNode) that don't have a source file. + */ +export function decodeNode(data) { + const sf = new RemoteSourceFile(data, new Wtf8Decoder()); + return sf; +} +/** + * Get the unique ID string for a remote node. + * Throws if the node is not a RemoteNode (i.e. not decoded from binary data). + */ +export function getNodeId(node) { + if (!(node instanceof RemoteNode)) { + throw new Error("getNodeId requires a RemoteNode"); + } + return node.id; +} +//# sourceMappingURL=node.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/node.js.map b/node_modules/typescript/dist/api/node/node.js.map new file mode 100644 index 0000000..e39c00c --- /dev/null +++ b/node_modules/typescript/dist/api/node/node.js.map @@ -0,0 +1 @@ +{"version":3,"file":"node.js","sourceRoot":"","sources":["../../../src/api/node/node.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,iBAAiB,EAIjB,SAAS,EAET,UAAU,EACV,UAAU,GACb,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EACH,UAAU,EACV,cAAc,GACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,uBAAuB,GAG1B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACH,2BAA2B,EAC3B,mBAAmB,EACnB,0BAA0B,EAC1B,kCAAkC,EAClC,6BAA6B,EAC7B,cAAc,EACd,QAAQ,EACR,gBAAgB,EAChB,kBAAkB,GACrB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,gEAAgE;AAChE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAEnG,8EAA8E;AAC9E,mBAAmB;AACnB,8EAA8E;AAE9E,MAAM,kBAAkB,GAAG,UAAU,CAAC;AAEtC,MAAM,OAAO,gBAAiB,SAAQ,UAAU;IACnC,KAAK,CAAkC;IACvC,YAAY,CAAS;IACrB,yBAAyB,CAAS;IAClC,kBAAkB,CAAS;IAC3B,mBAAmB,CAAS;IAC5B,qBAAqB,CAAS;IAC9B,QAAQ,CAAc;IACtB,OAAO,CAA8B;IACtC,WAAW,CAAgC;IAC3C,WAAW,CAAqB;IAChC,sBAAsB,CAAuC;IAC7D,8BAA8B,CAAuC;IACrE,6BAA6B,CAAuC;I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EAAE,EAAE,CAAC;QAC9C,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,EAAE,SAAS,CAAC,EAAE,EAAE,CAAe;QACvE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAS;KAC5C,CAAC;AACN,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,IAAgB;IACvC,MAAM,EAAE,GAAG,IAAI,gBAAgB,CAAC,IAAI,EAAE,IAAI,WAAW,EAAE,CAAC,CAAC;IACzD,OAAO,EAAqB,CAAC;AACjC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,IAAU;IAChC,IAAI,CAAC,CAAC,IAAI,YAAY,UAAU,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;IACvD,CAAC;IACD,OAAO,IAAI,CAAC,EAAE,CAAC;AACnB,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/protocol.d.ts b/node_modules/typescript/dist/api/node/protocol.d.ts new file mode 100644 index 0000000..cbebf38 --- /dev/null +++ b/node_modules/typescript/dist/api/node/protocol.d.ts @@ -0,0 +1,29 @@ +export declare const PROTOCOL_VERSION = 5; +export declare const HEADER_OFFSET_METADATA = 0; +export declare const HEADER_OFFSET_HASH_LO0 = 4; +export declare const HEADER_OFFSET_HASH_LO1 = 8; +export declare const HEADER_OFFSET_HASH_HI0 = 12; +export declare const HEADER_OFFSET_HASH_HI1 = 16; +export declare const HEADER_OFFSET_PARSE_OPTIONS = 20; +export declare const HEADER_OFFSET_STRING_TABLE_OFFSETS = 24; +export declare const HEADER_OFFSET_STRING_TABLE = 28; +export declare const HEADER_OFFSET_EXTENDED_DATA = 32; +export declare const HEADER_OFFSET_STRUCTURED_DATA = 36; +export declare const HEADER_OFFSET_NODES = 40; +export declare const HEADER_SIZE = 44; +export declare const NODE_LEN = 28; +export declare const NODE_OFFSET_KIND = 0; +export declare const NODE_OFFSET_POS = 4; +export declare const NODE_OFFSET_END = 8; +export declare const NODE_OFFSET_NEXT = 12; +export declare const NODE_OFFSET_PARENT = 16; +export declare const NODE_OFFSET_DATA = 20; +export declare const NODE_OFFSET_FLAGS = 24; +export declare const KIND_NODE_LIST = 4294967295; +export declare const NODE_DATA_TYPE_CHILDREN = 0; +export declare const NODE_DATA_TYPE_STRING = 1073741824; +export declare const NODE_DATA_TYPE_EXTENDED = 2147483648; +export declare const NODE_STRING_INDEX_MASK = 16777215; +export declare const NODE_EXTENDED_DATA_MASK = 16777215; +export { childProperties, singleChildNodePropertyNames } from "./protocol.generated.ts"; +//# sourceMappingURL=protocol.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/protocol.d.ts.map b/node_modules/typescript/dist/api/node/protocol.d.ts.map new file mode 100644 index 0000000..d0f6deb --- /dev/null +++ b/node_modules/typescript/dist/api/node/protocol.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../../src/api/node/protocol.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,sBAAsB,KAAK,CAAC;AACzC,eAAO,MAAM,sBAAsB,KAAK,CAAC;AACzC,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAC9C,eAAO,MAAM,kCAAkC,KAAK,CAAC;AACrD,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAC7C,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAC9C,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAChD,eAAO,MAAM,mBAAmB,KAAK,CAAC;AACtC,eAAO,MAAM,WAAW,KAAK,CAAC;AAE9B,eAAO,MAAM,QAAQ,KAAK,CAAC;AAE3B,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,eAAO,MAAM,eAAe,IAAI,CAAC;AACjC,eAAO,MAAM,eAAe,IAAI,CAAC;AACjC,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,eAAO,MAAM,cAAc,aAAa,CAAC;AAEzC,eAAO,MAAM,uBAAuB,IAAa,CAAC;AAClD,eAAO,MAAM,qBAAqB,aAAa,CAAC;AAChD,eAAO,MAAM,uBAAuB,aAAa,CAAC;AAElD,eAAO,MAAM,sBAAsB,WAAa,CAAC;AACjD,eAAO,MAAM,uBAAuB,WAAa,CAAC;AAGlD,OAAO,EAAE,eAAe,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/protocol.generated.d.ts b/node_modules/typescript/dist/api/node/protocol.generated.d.ts new file mode 100644 index 0000000..4bcb8d5 --- /dev/null +++ b/node_modules/typescript/dist/api/node/protocol.generated.d.ts @@ -0,0 +1,4 @@ +import { SyntaxKind } from "../../ast/index.ts"; +export declare const childProperties: Readonly>>; +export declare const singleChildNodePropertyNames: Readonly>>; +//# sourceMappingURL=protocol.generated.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/protocol.generated.d.ts.map b/node_modules/typescript/dist/api/node/protocol.generated.d.ts.map new file mode 100644 index 0000000..198ac43 --- /dev/null +++ b/node_modules/typescript/dist/api/node/protocol.generated.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"protocol.generated.d.ts","sourceRoot":"","sources":["../../../src/api/node/protocol.generated.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,SAAS,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC,CA8KlG,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CA8DtF,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/protocol.generated.js b/node_modules/typescript/dist/api/node/protocol.generated.js new file mode 100644 index 0000000..628478a --- /dev/null +++ b/node_modules/typescript/dist/api/node/protocol.generated.js @@ -0,0 +1,241 @@ +// Code generated by _scripts/generate-encoder.ts. DO NOT EDIT. +import { SyntaxKind } from "../../ast/index.js"; +export const childProperties = { + [SyntaxKind.QualifiedName]: ["left", "right"], + [SyntaxKind.ComputedPropertyName]: ["expression"], + [SyntaxKind.Decorator]: ["expression"], + [SyntaxKind.IfStatement]: ["expression", "thenStatement", "elseStatement"], + [SyntaxKind.DoStatement]: ["statement", "expression"], + [SyntaxKind.WhileStatement]: ["expression", "statement"], + [SyntaxKind.ForStatement]: ["initializer", "condition", "incrementor", "statement"], + [SyntaxKind.ForInStatement]: ["awaitModifier", "initializer", "expression", "statement"], + [SyntaxKind.ForOfStatement]: ["awaitModifier", "initializer", "expression", "statement"], + [SyntaxKind.BreakStatement]: ["label"], + [SyntaxKind.ContinueStatement]: ["label"], + [SyntaxKind.ReturnStatement]: ["expression"], + [SyntaxKind.WithStatement]: ["expression", "statement"], + [SyntaxKind.SwitchStatement]: ["expression", "caseBlock"], + [SyntaxKind.CaseBlock]: ["clauses"], + [SyntaxKind.CaseClause]: ["expression", "statements"], + [SyntaxKind.DefaultClause]: ["expression", "statements"], + [SyntaxKind.ThrowStatement]: ["expression"], + [SyntaxKind.TryStatement]: ["tryBlock", "catchClause", "finallyBlock"], + [SyntaxKind.CatchClause]: ["variableDeclaration", "block"], + [SyntaxKind.LabeledStatement]: ["label", "statement"], + [SyntaxKind.ExpressionStatement]: ["expression"], + [SyntaxKind.Block]: ["statements"], + [SyntaxKind.VariableStatement]: ["modifiers", "declarationList"], + [SyntaxKind.VariableDeclaration]: ["name", "exclamationToken", "type", "initializer"], + [SyntaxKind.VariableDeclarationList]: ["declarations"], + [SyntaxKind.ObjectBindingPattern]: ["elements"], + [SyntaxKind.ArrayBindingPattern]: ["elements"], + [SyntaxKind.Parameter]: ["modifiers", "dotDotDotToken", "name", "questionToken", "type", "initializer"], + [SyntaxKind.BindingElement]: ["dotDotDotToken", "propertyName", "name", "initializer"], + [SyntaxKind.MissingDeclaration]: ["modifiers"], + [SyntaxKind.FunctionDeclaration]: ["modifiers", "asteriskToken", "name", "typeParameters", "parameters", "type", "body"], + [SyntaxKind.ClassDeclaration]: ["modifiers", "name", "typeParameters", "heritageClauses", "members"], + [SyntaxKind.ClassExpression]: ["modifiers", "name", "typeParameters", "heritageClauses", "members"], + [SyntaxKind.HeritageClause]: ["types"], + [SyntaxKind.InterfaceDeclaration]: ["modifiers", "name", "typeParameters", "heritageClauses", "members"], + [SyntaxKind.TypeAliasDeclaration]: ["modifiers", "name", "typeParameters", "type"], + [SyntaxKind.JSTypeAliasDeclaration]: ["modifiers", "name", "typeParameters", "type"], + [SyntaxKind.EnumMember]: ["name", "initializer"], + [SyntaxKind.EnumDeclaration]: ["modifiers", "name", "members"], + [SyntaxKind.ModuleBlock]: ["statements"], + [SyntaxKind.ImportDeclaration]: ["modifiers", "importClause", "moduleSpecifier", "attributes"], + [SyntaxKind.JSImportDeclaration]: ["modifiers", "importClause", "moduleSpecifier", "attributes"], + [SyntaxKind.ExternalModuleReference]: ["expression"], + [SyntaxKind.NamespaceImport]: ["name"], + [SyntaxKind.NamedImports]: ["elements"], + [SyntaxKind.ExportAssignment]: ["modifiers", "type", "expression"], + [SyntaxKind.NamespaceExportDeclaration]: ["modifiers", "name"], + [SyntaxKind.NamespaceExport]: ["name"], + [SyntaxKind.NamedExports]: ["elements"], + [SyntaxKind.ExportSpecifier]: ["propertyName", "name"], + [SyntaxKind.CallSignature]: ["typeParameters", "parameters", "type"], + [SyntaxKind.ConstructSignature]: ["typeParameters", "parameters", "type"], + [SyntaxKind.Constructor]: ["modifiers", "typeParameters", "parameters", "type", "body"], + [SyntaxKind.GetAccessor]: ["modifiers", "name", "typeParameters", "parameters", "type", "body"], + [SyntaxKind.SetAccessor]: ["modifiers", "name", "typeParameters", "parameters", "type", "body"], + [SyntaxKind.IndexSignature]: ["modifiers", "parameters", "type"], + [SyntaxKind.MethodSignature]: ["modifiers", "name", "postfixToken", "typeParameters", "parameters", "type"], + [SyntaxKind.MethodDeclaration]: ["modifiers", "asteriskToken", "name", "postfixToken", "typeParameters", "parameters", "type", "body"], + [SyntaxKind.PropertySignature]: ["modifiers", "name", "postfixToken", "type", "initializer"], + [SyntaxKind.PropertyDeclaration]: ["modifiers", "name", "postfixToken", "type", "initializer"], + [SyntaxKind.ClassStaticBlockDeclaration]: ["modifiers", "body"], + [SyntaxKind.BinaryExpression]: ["modifiers", "left", "type", "operatorToken", "right"], + [SyntaxKind.PrefixUnaryExpression]: ["operand"], + [SyntaxKind.PostfixUnaryExpression]: ["operand"], + [SyntaxKind.YieldExpression]: ["asteriskToken", "expression"], + [SyntaxKind.ArrowFunction]: ["modifiers", "typeParameters", "parameters", "type", "equalsGreaterThanToken", "body"], + [SyntaxKind.FunctionExpression]: ["modifiers", "asteriskToken", "name", "typeParameters", "parameters", "type", "body"], + [SyntaxKind.AsExpression]: ["expression", "type"], + [SyntaxKind.SatisfiesExpression]: ["expression", "type"], + [SyntaxKind.ConditionalExpression]: ["condition", "questionToken", "whenTrue", "colonToken", "whenFalse"], + [SyntaxKind.PropertyAccessExpression]: ["expression", "questionDotToken", "name"], + [SyntaxKind.ElementAccessExpression]: ["expression", "questionDotToken", "argumentExpression"], + [SyntaxKind.CallExpression]: ["expression", "questionDotToken", "typeArguments", "arguments"], + [SyntaxKind.NewExpression]: ["expression", "typeArguments", "arguments"], + [SyntaxKind.MetaProperty]: ["name"], + [SyntaxKind.NonNullExpression]: ["expression"], + [SyntaxKind.SpreadElement]: ["expression"], + [SyntaxKind.TemplateExpression]: ["head", "templateSpans"], + [SyntaxKind.TemplateSpan]: ["expression", "literal"], + [SyntaxKind.TaggedTemplateExpression]: ["tag", "questionDotToken", "typeArguments", "template"], + [SyntaxKind.ParenthesizedExpression]: ["expression"], + [SyntaxKind.ArrayLiteralExpression]: ["elements"], + [SyntaxKind.ObjectLiteralExpression]: ["properties"], + [SyntaxKind.SpreadAssignment]: ["expression"], + [SyntaxKind.PropertyAssignment]: ["modifiers", "name", "postfixToken", "type", "initializer"], + [SyntaxKind.ShorthandPropertyAssignment]: ["modifiers", "name", "postfixToken", "type", "equalsToken", "objectAssignmentInitializer"], + [SyntaxKind.DeleteExpression]: ["expression"], + [SyntaxKind.TypeOfExpression]: ["expression"], + [SyntaxKind.VoidExpression]: ["expression"], + [SyntaxKind.AwaitExpression]: ["expression"], + [SyntaxKind.TypeAssertionExpression]: ["type", "expression"], + [SyntaxKind.UnionType]: ["types"], + [SyntaxKind.IntersectionType]: ["types"], + [SyntaxKind.ConditionalType]: ["checkType", "extendsType", "trueType", "falseType"], + [SyntaxKind.TypeOperator]: ["type"], + [SyntaxKind.InferType]: ["typeParameter"], + [SyntaxKind.ArrayType]: ["elementType"], + [SyntaxKind.IndexedAccessType]: ["objectType", "indexType"], + [SyntaxKind.TypeReference]: ["typeName", "typeArguments"], + [SyntaxKind.ExpressionWithTypeArguments]: ["expression", "typeArguments"], + [SyntaxKind.LiteralType]: ["literal"], + [SyntaxKind.TypePredicate]: ["assertsModifier", "parameterName", "type"], + [SyntaxKind.ImportAttribute]: ["name", "value"], + [SyntaxKind.ImportAttributes]: ["attributes"], + [SyntaxKind.TypeQuery]: ["exprName", "typeArguments"], + [SyntaxKind.MappedType]: ["readonlyToken", "typeParameter", "nameType", "questionToken", "type", "members"], + [SyntaxKind.TypeLiteral]: ["members"], + [SyntaxKind.TupleType]: ["elements"], + [SyntaxKind.NamedTupleMember]: ["dotDotDotToken", "name", "questionToken", "type"], + [SyntaxKind.OptionalType]: ["type"], + [SyntaxKind.RestType]: ["type"], + [SyntaxKind.ParenthesizedType]: ["type"], + [SyntaxKind.FunctionType]: ["typeParameters", "parameters", "type"], + [SyntaxKind.ConstructorType]: ["modifiers", "typeParameters", "parameters", "type"], + [SyntaxKind.TemplateLiteralType]: ["head", "templateSpans"], + [SyntaxKind.TemplateLiteralTypeSpan]: ["type", "literal"], + [SyntaxKind.SyntheticExpression]: ["tupleNameSource"], + [SyntaxKind.PartiallyEmittedExpression]: ["expression"], + [SyntaxKind.JsxElement]: ["openingElement", "children", "closingElement"], + [SyntaxKind.JsxAttributes]: ["properties"], + [SyntaxKind.JsxNamespacedName]: ["namespace", "name"], + [SyntaxKind.JsxOpeningElement]: ["tagName", "typeArguments", "attributes"], + [SyntaxKind.JsxSelfClosingElement]: ["tagName", "typeArguments", "attributes"], + [SyntaxKind.JsxFragment]: ["openingFragment", "children", "closingFragment"], + [SyntaxKind.JsxAttribute]: ["name", "initializer"], + [SyntaxKind.JsxSpreadAttribute]: ["expression"], + [SyntaxKind.JsxClosingElement]: ["tagName"], + [SyntaxKind.JsxExpression]: ["dotDotDotToken", "expression"], + [SyntaxKind.SyntaxList]: ["children"], + [SyntaxKind.JSDoc]: ["comment", "tags"], + [SyntaxKind.JSDocTypeExpression]: ["type"], + [SyntaxKind.JSDocNonNullableType]: ["type"], + [SyntaxKind.JSDocNullableType]: ["type"], + [SyntaxKind.JSDocVariadicType]: ["type"], + [SyntaxKind.JSDocOptionalType]: ["type"], + [SyntaxKind.JSDocTypeTag]: ["tagName", "typeExpression", "comment"], + [SyntaxKind.JSDocUnknownTag]: ["tagName", "comment"], + [SyntaxKind.JSDocTemplateTag]: ["tagName", "constraint", "typeParameters", "comment"], + [SyntaxKind.JSDocReturnTag]: ["tagName", "typeExpression", "comment"], + [SyntaxKind.JSDocPublicTag]: ["tagName", "comment"], + [SyntaxKind.JSDocPrivateTag]: ["tagName", "comment"], + [SyntaxKind.JSDocProtectedTag]: ["tagName", "comment"], + [SyntaxKind.JSDocReadonlyTag]: ["tagName", "comment"], + [SyntaxKind.JSDocOverrideTag]: ["tagName", "comment"], + [SyntaxKind.JSDocDeprecatedTag]: ["tagName", "comment"], + [SyntaxKind.JSDocSeeTag]: ["tagName", "nameExpression", "comment"], + [SyntaxKind.JSDocImplementsTag]: ["tagName", "className", "comment"], + [SyntaxKind.JSDocAugmentsTag]: ["tagName", "className", "comment"], + [SyntaxKind.JSDocSatisfiesTag]: ["tagName", "typeExpression", "comment"], + [SyntaxKind.JSDocThrowsTag]: ["tagName", "typeExpression", "comment"], + [SyntaxKind.JSDocThisTag]: ["tagName", "typeExpression", "comment"], + [SyntaxKind.JSDocImportTag]: ["tagName", "importClause", "moduleSpecifier", "attributes", "comment"], + [SyntaxKind.JSDocCallbackTag]: ["tagName", "typeExpression", "name", "comment"], + [SyntaxKind.JSDocOverloadTag]: ["tagName", "typeExpression", "comment"], + [SyntaxKind.JSDocTypedefTag]: ["tagName", "typeExpression", "name", "comment"], + [SyntaxKind.JSDocSignature]: ["typeParameters", "parameters", "type"], + [SyntaxKind.JSDocNameReference]: ["name"], + [SyntaxKind.SourceFile]: ["statements", "endOfFileToken"], + [SyntaxKind.ModuleDeclaration]: ["modifiers", "name", "body"], + [SyntaxKind.ImportEqualsDeclaration]: ["modifiers", "name", "moduleReference"], + [SyntaxKind.ExportDeclaration]: ["modifiers", "exportClause", "moduleSpecifier", "attributes"], + [SyntaxKind.ImportType]: ["argument", "attributes", "qualifier", "typeArguments"], + [SyntaxKind.ImportClause]: ["name", "namedBindings"], + [SyntaxKind.ImportSpecifier]: ["propertyName", "name"], + [SyntaxKind.JSDocLink]: ["name"], + [SyntaxKind.JSDocLinkPlain]: ["name"], + [SyntaxKind.JSDocLinkCode]: ["name"], + [SyntaxKind.TypeParameter]: ["modifiers", "name", "constraint", "expression", "defaultType"], + [SyntaxKind.SyntheticReferenceExpression]: ["expression", "thisArg"], + [SyntaxKind.JSDocTypeLiteral]: ["jsdocPropertyTags"], + [SyntaxKind.JSDocParameterTag]: ["tagName", "name", "typeExpression", "comment"], + [SyntaxKind.JSDocPropertyTag]: ["tagName", "name", "typeExpression", "comment"], +}; +export const singleChildNodePropertyNames = { + [SyntaxKind.ComputedPropertyName]: "expression", + [SyntaxKind.Decorator]: "expression", + [SyntaxKind.BreakStatement]: "label", + [SyntaxKind.ContinueStatement]: "label", + [SyntaxKind.ReturnStatement]: "expression", + [SyntaxKind.CaseBlock]: "clauses", + [SyntaxKind.ThrowStatement]: "expression", + [SyntaxKind.ExpressionStatement]: "expression", + [SyntaxKind.Block]: "statements", + [SyntaxKind.VariableDeclarationList]: "declarations", + [SyntaxKind.ObjectBindingPattern]: "elements", + [SyntaxKind.ArrayBindingPattern]: "elements", + [SyntaxKind.MissingDeclaration]: "modifiers", + [SyntaxKind.HeritageClause]: "types", + [SyntaxKind.ModuleBlock]: "statements", + [SyntaxKind.ExternalModuleReference]: "expression", + [SyntaxKind.NamespaceImport]: "name", + [SyntaxKind.NamedImports]: "elements", + [SyntaxKind.NamespaceExport]: "name", + [SyntaxKind.NamedExports]: "elements", + [SyntaxKind.PrefixUnaryExpression]: "operand", + [SyntaxKind.PostfixUnaryExpression]: "operand", + [SyntaxKind.MetaProperty]: "name", + [SyntaxKind.NonNullExpression]: "expression", + [SyntaxKind.SpreadElement]: "expression", + [SyntaxKind.ParenthesizedExpression]: "expression", + [SyntaxKind.ArrayLiteralExpression]: "elements", + [SyntaxKind.ObjectLiteralExpression]: "properties", + [SyntaxKind.SpreadAssignment]: "expression", + [SyntaxKind.DeleteExpression]: "expression", + [SyntaxKind.TypeOfExpression]: "expression", + [SyntaxKind.VoidExpression]: "expression", + [SyntaxKind.AwaitExpression]: "expression", + [SyntaxKind.UnionType]: "types", + [SyntaxKind.IntersectionType]: "types", + [SyntaxKind.TypeOperator]: "type", + [SyntaxKind.InferType]: "typeParameter", + [SyntaxKind.ArrayType]: "elementType", + [SyntaxKind.LiteralType]: "literal", + [SyntaxKind.ImportAttributes]: "attributes", + [SyntaxKind.TypeLiteral]: "members", + [SyntaxKind.TupleType]: "elements", + [SyntaxKind.OptionalType]: "type", + [SyntaxKind.RestType]: "type", + [SyntaxKind.ParenthesizedType]: "type", + [SyntaxKind.SyntheticExpression]: "tupleNameSource", + [SyntaxKind.PartiallyEmittedExpression]: "expression", + [SyntaxKind.JsxAttributes]: "properties", + [SyntaxKind.JsxSpreadAttribute]: "expression", + [SyntaxKind.JsxClosingElement]: "tagName", + [SyntaxKind.SyntaxList]: "children", + [SyntaxKind.JSDocTypeExpression]: "type", + [SyntaxKind.JSDocNonNullableType]: "type", + [SyntaxKind.JSDocNullableType]: "type", + [SyntaxKind.JSDocVariadicType]: "type", + [SyntaxKind.JSDocOptionalType]: "type", + [SyntaxKind.JSDocNameReference]: "name", + [SyntaxKind.JSDocLink]: "name", + [SyntaxKind.JSDocLinkPlain]: "name", + [SyntaxKind.JSDocLinkCode]: "name", + [SyntaxKind.JSDocTypeLiteral]: "jsdocPropertyTags", +}; +//# sourceMappingURL=protocol.generated.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/protocol.generated.js.map b/node_modules/typescript/dist/api/node/protocol.generated.js.map new file mode 100644 index 0000000..811c073 --- /dev/null +++ b/node_modules/typescript/dist/api/node/protocol.generated.js.map @@ -0,0 +1 @@ +{"version":3,"file":"protocol.generated.js","sourceRoot":"","sources":["../../../src/api/node/protocol.generated.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAE/D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,MAAM,CAAC,MAAM,eAAe,GAA2E;IACnG,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;IAC7C,CAAC,UAAU,CAAC,oBAAoB,CAAC,EAAE,CAAC,YAAY,CAAC;IACjD,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC,YAAY,CAAC;IACtC,CAAC,UAAU,CAAC,WA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AAC,mBAAmB,CAAC,EAAE,iBAAiB;IACnD,CAAC,UAAU,CAAC,0BAA0B,CAAC,EAAE,YAAY;IACrD,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,YAAY;IACxC,CAAC,UAAU,CAAC,kBAAkB,CAAC,EAAE,YAAY;IAC7C,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,SAAS;IACzC,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,UAAU;IACnC,CAAC,UAAU,CAAC,mBAAmB,CAAC,EAAE,MAAM;IACxC,CAAC,UAAU,CAAC,oBAAoB,CAAC,EAAE,MAAM;IACzC,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,MAAM;IACtC,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,MAAM;IACtC,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,MAAM;IACtC,CAAC,UAAU,CAAC,kBAAkB,CAAC,EAAE,MAAM;IACvC,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,MAAM;IAC9B,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,MAAM;IACnC,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,MAAM;IAClC,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,mBAAmB;CACrD,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/protocol.js b/node_modules/typescript/dist/api/node/protocol.js new file mode 100644 index 0000000..6cc2352 --- /dev/null +++ b/node_modules/typescript/dist/api/node/protocol.js @@ -0,0 +1,30 @@ +export const PROTOCOL_VERSION = 5; +export const HEADER_OFFSET_METADATA = 0; +export const HEADER_OFFSET_HASH_LO0 = 4; +export const HEADER_OFFSET_HASH_LO1 = 8; +export const HEADER_OFFSET_HASH_HI0 = 12; +export const HEADER_OFFSET_HASH_HI1 = 16; +export const HEADER_OFFSET_PARSE_OPTIONS = 20; +export const HEADER_OFFSET_STRING_TABLE_OFFSETS = 24; +export const HEADER_OFFSET_STRING_TABLE = 28; +export const HEADER_OFFSET_EXTENDED_DATA = 32; +export const HEADER_OFFSET_STRUCTURED_DATA = 36; +export const HEADER_OFFSET_NODES = 40; +export const HEADER_SIZE = 44; +export const NODE_LEN = 28; +export const NODE_OFFSET_KIND = 0; +export const NODE_OFFSET_POS = 4; +export const NODE_OFFSET_END = 8; +export const NODE_OFFSET_NEXT = 12; +export const NODE_OFFSET_PARENT = 16; +export const NODE_OFFSET_DATA = 20; +export const NODE_OFFSET_FLAGS = 24; +export const KIND_NODE_LIST = 0xFFFFFFFF; +export const NODE_DATA_TYPE_CHILDREN = 0x00000000; +export const NODE_DATA_TYPE_STRING = 0x40000000; +export const NODE_DATA_TYPE_EXTENDED = 0x80000000; +export const NODE_STRING_INDEX_MASK = 0x00FFFFFF; +export const NODE_EXTENDED_DATA_MASK = 0x00FFFFFF; +// Re-export generated child properties +export { childProperties, singleChildNodePropertyNames } from "./protocol.generated.js"; +//# sourceMappingURL=protocol.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/protocol.js.map b/node_modules/typescript/dist/api/node/protocol.js.map new file mode 100644 index 0000000..7905c71 --- /dev/null +++ b/node_modules/typescript/dist/api/node/protocol.js.map @@ -0,0 +1 @@ +{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../../src/api/node/protocol.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAElC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACxC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACxC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACxC,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AACzC,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AACzC,MAAM,CAAC,MAAM,2BAA2B,GAAG,EAAE,CAAC;AAC9C,MAAM,CAAC,MAAM,kCAAkC,GAAG,EAAE,CAAC;AACrD,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAC7C,MAAM,CAAC,MAAM,2BAA2B,GAAG,EAAE,CAAC;AAC9C,MAAM,CAAC,MAAM,6BAA6B,GAAG,EAAE,CAAC;AAChD,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AACtC,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,CAAC;AAE9B,MAAM,CAAC,MAAM,QAAQ,GAAG,EAAE,CAAC;AAE3B,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAClC,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC;AACjC,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC;AACjC,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AACnC,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AACrC,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AACnC,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAEpC,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;AAEzC,MAAM,CAAC,MAAM,uBAAuB,GAAG,UAAU,CAAC;AAClD,MAAM,CAAC,MAAM,qBAAqB,GAAG,UAAU,CAAC;AAChD,MAAM,CAAC,MAAM,uBAAuB,GAAG,UAAU,CAAC;AAElD,MAAM,CAAC,MAAM,sBAAsB,GAAG,UAAU,CAAC;AACjD,MAAM,CAAC,MAAM,uBAAuB,GAAG,UAAU,CAAC;AAElD,uCAAuC;AACvC,OAAO,EAAE,eAAe,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/wtf8.d.ts b/node_modules/typescript/dist/api/node/wtf8.d.ts new file mode 100644 index 0000000..71f1845 --- /dev/null +++ b/node_modules/typescript/dist/api/node/wtf8.d.ts @@ -0,0 +1,6 @@ +type DecodeOptions = Parameters[1]; +export declare class Wtf8Decoder extends TextDecoder { + decode(input?: NodeJS.AllowSharedBufferSource, options?: DecodeOptions): string; +} +export {}; +//# sourceMappingURL=wtf8.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/wtf8.d.ts.map b/node_modules/typescript/dist/api/node/wtf8.d.ts.map new file mode 100644 index 0000000..bacab6d --- /dev/null +++ b/node_modules/typescript/dist/api/node/wtf8.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"wtf8.d.ts","sourceRoot":"","sources":["../../../src/api/node/wtf8.ts"],"names":[],"mappings":"AAOA,KAAK,aAAa,GAAG,UAAU,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AA6B1D,qBAAa,WAAY,SAAQ,WAAW;IAC/B,MAAM,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,uBAAuB,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM;CAkC3F"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/wtf8.js b/node_modules/typescript/dist/api/node/wtf8.js new file mode 100644 index 0000000..ae98df9 --- /dev/null +++ b/node_modules/typescript/dist/api/node/wtf8.js @@ -0,0 +1,61 @@ +import { Buffer } from "node:buffer"; +const surrogateLeadByte = 0xED; +const surrogateSecondByteMin = 0xA0; +const surrogateSecondByteMax = 0xBF; +const continuationByteMin = 0x80; +const continuationByteMax = 0xBF; +function isWtf8Surrogate(bytes, index) { + return index + 2 < bytes.length + && bytes[index] === surrogateLeadByte + && bytes[index + 1] >= surrogateSecondByteMin + && bytes[index + 1] <= surrogateSecondByteMax + && bytes[index + 2] >= continuationByteMin + && bytes[index + 2] <= continuationByteMax; +} +function getSurrogateCodeUnit(bytes, index) { + return 0xD000 | ((bytes[index + 1] & 0x3F) << 6) | (bytes[index + 2] & 0x3F); +} +function hasSurrogateLeadByte(bytes) { + return Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength).indexOf(surrogateLeadByte) >= 0; +} +function toUint8Array(input) { + if (input instanceof Uint8Array) { + return input; + } + if (ArrayBuffer.isView(input)) { + return new Uint8Array(input.buffer, input.byteOffset, input.byteLength); + } + return new Uint8Array(input); +} +export class Wtf8Decoder extends TextDecoder { + decode(input, options) { + if (input === undefined) { + return super.decode(input, options); + } + const bytes = toUint8Array(input); + if (!hasSurrogateLeadByte(bytes)) { + return super.decode(bytes, options); + } + const parts = []; + let segmentStart = 0; + for (let i = 0; i < bytes.length; i++) { + if (!isWtf8Surrogate(bytes, i)) { + continue; + } + if (segmentStart < i) { + parts.push(super.decode(bytes.subarray(segmentStart, i), options)); + } + parts.push(String.fromCharCode(getSurrogateCodeUnit(bytes, i))); + i += 2; + segmentStart = i + 1; + } + if (segmentStart === 0) { + return super.decode(bytes, options); + } + if (segmentStart < bytes.length) { + parts.push(super.decode(bytes.subarray(segmentStart), options)); + } + return parts.join(""); + } +} +//# sourceMappingURL=wtf8.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/node/wtf8.js.map b/node_modules/typescript/dist/api/node/wtf8.js.map new file mode 100644 index 0000000..2cffd1e --- /dev/null +++ b/node_modules/typescript/dist/api/node/wtf8.js.map @@ -0,0 +1 @@ +{"version":3,"file":"wtf8.js","sourceRoot":"","sources":["../../../src/api/node/wtf8.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAC/B,MAAM,sBAAsB,GAAG,IAAI,CAAC;AACpC,MAAM,sBAAsB,GAAG,IAAI,CAAC;AACpC,MAAM,mBAAmB,GAAG,IAAI,CAAC;AACjC,MAAM,mBAAmB,GAAG,IAAI,CAAC;AAGjC,SAAS,eAAe,CAAC,KAAiB,EAAE,KAAa;IACrD,OAAO,KAAK,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM;WACxB,KAAK,CAAC,KAAK,CAAC,KAAK,iBAAiB;WAClC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,sBA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d.ts new file mode 100644 index 0000000..1b565b8 --- /dev/null +++ b/node_modules/typescript/dist/api/options.d.ts @@ -0,0 +1,32 @@ +/** + * Shared utilities for the TypeScript API client. + */ +import type { FileSystem } from "./fs.ts"; +export interface ClientSocketOptions { + /** Path to the Unix domain socket or Windows named pipe for API communication */ + pipe: string; +} +export interface ClientSpawnOptions { + /** Path to the tsgo executable. Defaults to the bundled tsgo binary. */ + tsserverPath?: string; + /** Current working directory */ + cwd?: string; + /** Virtual filesystem callbacks */ + fs?: FileSystem; + /** + * When true, collect timing information for each request. The client + * measures round-trip latency and bytes sent/received, and the server + * measures its own per-request processing time; both are combined (along + * with an estimated transport overhead) in the snapshot returned by + * {@link API.getTimingInfo}. + */ + collectTiming?: boolean; +} +export type ClientOptions = ClientSocketOptions | ClientSpawnOptions; +export declare function isSpawnOptions(options: ClientOptions): options is ClientSpawnOptions; +export declare function resolveExePath(options: ClientSpawnOptions): string; +export interface LSPConnectionOptions extends ClientSocketOptions { +} +export interface APIOptions extends ClientSpawnOptions { +} +//# sourceMappingURL=options.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/options.d.ts.map b/node_modules/typescript/dist/api/options.d.ts.map new file mode 100644 index 0000000..c2036ef --- /dev/null +++ b/node_modules/typescript/dist/api/options.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/api/options.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,WAAW,mBAAmB;IAChC,iFAAiF;IACjF,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,kBAAkB;IAC/B,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gCAAgC;IAChC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,EAAE,CAAC,EAAE,UAAU,CAAC;IAChB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,kBAAkB,CAAC;AAErE,wBAAgB,cAAc,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,IAAI,kBAAkB,CAEpF;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,CAElE;AAED,MAAM,WAAW,oBAAqB,SAAQ,mBAAmB;CAChE;AAED,MAAM,WAAW,UAAW,SAAQ,kBAAkB;CACrD"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/options.js b/node_modules/typescript/dist/api/options.js new file mode 100644 index 0000000..f71e78b --- /dev/null +++ b/node_modules/typescript/dist/api/options.js @@ -0,0 +1,11 @@ +/** + * Shared utilities for the TypeScript API client. + */ +import getExePath from "#getExePath"; +export function isSpawnOptions(options) { + return !("pipe" in options); +} +export function resolveExePath(options) { + return options.tsserverPath ?? getExePath(); +} +//# sourceMappingURL=options.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/options.js.map b/node_modules/typescript/dist/api/options.js.map new file mode 100644 index 0000000..f815c27 --- /dev/null +++ b/node_modules/typescript/dist/api/options.js.map @@ -0,0 +1 @@ +{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/api/options.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,UAAU,MAAM,aAAa,CAAC;AA2BrC,MAAM,UAAU,cAAc,CAAC,OAAsB;IACjD,OAAO,CAAC,CAAC,MAAM,IAAI,OAAO,CAAC,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,OAA2B;IACtD,OAAO,OAAO,CAAC,YAAY,IAAI,UAAU,EAAE,CAAC;AAChD,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/path.d.ts b/node_modules/typescript/dist/api/path.d.ts new file mode 100644 index 0000000..c3e738e --- /dev/null +++ b/node_modules/typescript/dist/api/path.d.ts @@ -0,0 +1,110 @@ +/** + * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). + * + * For example: + * ```ts + * getRootLength("a") === 0 // "" + * getRootLength("/") === 1 // "/" + * getRootLength("c:") === 2 // "c:" + * getRootLength("c:d") === 0 // "" + * getRootLength("c:/") === 3 // "c:/" + * getRootLength("c:\\") === 3 // "c:\\" + * getRootLength("//server") === 7 // "//server" + * getRootLength("//server/share") === 8 // "//server/" + * getRootLength("\\\\server") === 7 // "\\\\server" + * getRootLength("\\\\server\\share") === 8 // "\\\\server\\" + * getRootLength("file:///path") === 8 // "file:///" + * getRootLength("file:///c:") === 10 // "file:///c:" + * getRootLength("file:///c:d") === 8 // "file:///" + * getRootLength("file:///c:/path") === 11 // "file:///c:/" + * getRootLength("file://server") === 13 // "file://server" + * getRootLength("file://server/path") === 14 // "file://server/" + * getRootLength("http://server") === 13 // "http://server" + * getRootLength("http://server/path") === 14 // "http://server/" + * ``` + * + * @internal + */ +export declare function getRootLength(path: string): number; +export declare function getPathComponents(path: string): string[]; +/** + * Determines whether a path has a trailing separator (`/` or `\\`). + */ +export declare function hasTrailingDirectorySeparator(path: string): boolean; +/** + * Removes a trailing directory separator from a path, if it does not already have one. + */ +export declare function removeTrailingDirectorySeparator(path: string): string; +/** + * Adds a trailing directory separator to a path, if it does not already have one. + */ +export declare function ensureTrailingDirectorySeparator(path: string): string; +/** + * Normalize path separators, converting `\\` into `/`. + */ +export declare function normalizeSlashes(path: string): string; +/** + * Combines paths. If a path is absolute, it replaces any previous path. Relative paths are not simplified. + */ +export declare function combinePaths(path: string, ...paths: (string | undefined)[]): string; +/** + * Returns the normalized absolute path, resolving `.` and `..` segments. + */ +export declare function getNormalizedAbsolutePath(path: string, currentDirectory: string | undefined): string; +/** + * Normalizes a path, resolving `.` and `..` segments and converting backslashes to forward slashes. + */ +export declare function normalizePath(path: string): string; +/** + * Determines whether a path is an absolute disk path (e.g. starts with `/`, or a DOS path + * like `c:`, `c:\\` or `c:/`). + */ +export declare function isRootedDiskPath(path: string): boolean; +/** + * Converts a file name to a normalized path. + * + * @param fileName The file name to convert + * @param basePath The base path to use for relative file names + * @param getCanonicalFileName A function to get the canonical file name (e.g., toLowerCase for case-insensitive systems) + * @returns The normalized path + */ +export declare function toPath(fileName: string, basePath: string | undefined, getCanonicalFileName: (path: string) => string): string; +/** + * Creates a getCanonicalFileName function based on case sensitivity. + */ +export declare function createGetCanonicalFileName(useCaseSensitiveFileNames: boolean): (fileName: string) => string; +/** + * Returns true if the path refers to a bundled library file. + */ +export declare function isBundled(path: string): boolean; +/** + * Returns true if the file name represents a dynamic/virtual file + * that doesn't exist on disk (e.g., untitled files with paths like "^/untitled/..."). + */ +export declare function isDynamicFileName(fileName: string): boolean; +/** + * Splits a Windows volume (e.g., "c:") from the rest of the path. + * Returns [volume, rest, ok] where ok is true if a volume was found. + */ +export declare function splitVolumePath(path: string): [volume: string, rest: string, ok: boolean]; +/** + * Converts a file name to a document URI. + * + * @example + * fileNameToDocumentURI("/path/to/file.ts") === "file:///path/to/file.ts" + * fileNameToDocumentURI("c:/path/to/file.ts") === "file:///c%3A/path/to/file.ts" + * fileNameToDocumentURI("^/untitled/ts-nul-authority/Untitled-1") === "untitled:Untitled-1" + * fileNameToDocumentURI("^/vscode-vfs/github/microsoft/typescript-go/file.ts") === "vscode-vfs://github/microsoft/typescript-go/file.ts" + */ +export declare function fileNameToDocumentURI(fileName: string): string; +/** + * Converts a document URI to a file name. + * + * @example + * documentURIToFileName("file:///path/to/file.ts") === "/path/to/file.ts" + * documentURIToFileName("file:///c%3A/path/to/file.ts") === "c:/path/to/file.ts" + * documentURIToFileName("untitled:Untitled-1") === "^/untitled/ts-nul-authority/Untitled-1" + * documentURIToFileName("vscode-vfs://github/microsoft/typescript-go/file.ts") === "^/vscode-vfs/github/microsoft/typescript-go/file.ts" + */ +export declare function documentURIToFileName(uri: string): string; +//# sourceMappingURL=path.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/path.d.ts.map b/node_modules/typescript/dist/api/path.d.ts.map new file mode 100644 index 0000000..8a074df --- /dev/null +++ b/node_modules/typescript/dist/api/path.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../src/api/path.ts"],"names":[],"mappings":"AAuCA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGlD;AAgED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAExD;AAaD;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEnE;AAED;;GAEG;AACH,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKrE;AAED;;GAEG;AACH,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKrE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIrD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,GAAG,MAAM,CAanF;AAqBD;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CA4FpG;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQlD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,oBAAoB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,CAK7H;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,yBAAyB,EAAE,OAAO,GAAG,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAE3G;AAYD;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE/C;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE3D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,CAAC,CAKzF;AAkCD;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CA8C9D;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAuDzD"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/path.js b/node_modules/typescript/dist/api/path.js new file mode 100644 index 0000000..e290d8c --- /dev/null +++ b/node_modules/typescript/dist/api/path.js @@ -0,0 +1,508 @@ +const CharacterCodesSlash = "/".charCodeAt(0); +const CharacterCodesBackslash = "\\".charCodeAt(0); +const CharacterCodesColon = ":".charCodeAt(0); +const CharacterCodesPercent = "%".charCodeAt(0); +const CharacterCodes3 = "3".charCodeAt(0); +const CharacterCodesa = "a".charCodeAt(0); +const CharacterCodesz = "z".charCodeAt(0); +const CharacterCodesA = "A".charCodeAt(0); +const CharacterCodesZ = "Z".charCodeAt(0); +const CharacterCodesDot = ".".charCodeAt(0); +const directorySeparator = "/"; +const altDirectorySeparator = "\\"; +const urlSchemeSeparator = "://"; +const backslashRegExp = /\\/g; +// check path for these segments: '', '.'. '..' +const relativePathSegmentRegExp = /\/\/|(?:^|\/)\.\.?(?:$|\/)/; +/** + * Determines whether a charCode corresponds to `/` or `\\`. + */ +function isAnyDirectorySeparator(charCode) { + return charCode === CharacterCodesSlash || charCode === CharacterCodesBackslash; +} +function isVolumeCharacter(charCode) { + return (charCode >= CharacterCodesa && charCode <= CharacterCodesz) || + (charCode >= CharacterCodesA && charCode <= CharacterCodesZ); +} +function getFileUrlVolumeSeparatorEnd(url, start) { + const ch0 = url.charCodeAt(start); + if (ch0 === CharacterCodesColon) + return start + 1; + if (ch0 === CharacterCodesPercent && url.charCodeAt(start + 1) === CharacterCodes3) { + const ch2 = url.charCodeAt(start + 2); + if (ch2 === CharacterCodesa || ch2 === CharacterCodesA) + return start + 3; + } + return -1; +} +/** + * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). + * + * For example: + * ```ts + * getRootLength("a") === 0 // "" + * getRootLength("/") === 1 // "/" + * getRootLength("c:") === 2 // "c:" + * getRootLength("c:d") === 0 // "" + * getRootLength("c:/") === 3 // "c:/" + * getRootLength("c:\\") === 3 // "c:\\" + * getRootLength("//server") === 7 // "//server" + * getRootLength("//server/share") === 8 // "//server/" + * getRootLength("\\\\server") === 7 // "\\\\server" + * getRootLength("\\\\server\\share") === 8 // "\\\\server\\" + * getRootLength("file:///path") === 8 // "file:///" + * getRootLength("file:///c:") === 10 // "file:///c:" + * getRootLength("file:///c:d") === 8 // "file:///" + * getRootLength("file:///c:/path") === 11 // "file:///c:/" + * getRootLength("file://server") === 13 // "file://server" + * getRootLength("file://server/path") === 14 // "file://server/" + * getRootLength("http://server") === 13 // "http://server" + * getRootLength("http://server/path") === 14 // "http://server/" + * ``` + * + * @internal + */ +export function getRootLength(path) { + const rootLength = getEncodedRootLength(path); + return rootLength < 0 ? ~rootLength : rootLength; +} +/** + * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). + * If the root is part of a URL, the twos-complement of the root length is returned. + */ +function getEncodedRootLength(path) { + if (!path) + return 0; + const ch0 = path.charCodeAt(0); + // POSIX or UNC + if (ch0 === CharacterCodesSlash || ch0 === CharacterCodesBackslash) { + if (path.charCodeAt(1) !== ch0) + return 1; // POSIX: "/" (or non-normalized "\") + const p1 = path.indexOf(ch0 === CharacterCodesSlash ? directorySeparator : altDirectorySeparator, 2); + if (p1 < 0) + return path.length; // UNC: "//server" or "\\server" + return p1 + 1; // UNC: "//server/" or "\\server\" + } + // DOS + if (isVolumeCharacter(ch0) && path.charCodeAt(1) === CharacterCodesColon) { + const ch2 = path.charCodeAt(2); + if (ch2 === CharacterCodesSlash || ch2 === CharacterCodesBackslash) + return 3; // DOS: "c:/" or "c:\" + if (path.length === 2) + return 2; // DOS: "c:" (but not "c:d") + } + // URL + const schemeEnd = path.indexOf(urlSchemeSeparator); + if (schemeEnd !== -1) { + const authorityStart = schemeEnd + urlSchemeSeparator.length; + const authorityEnd = path.indexOf(directorySeparator, authorityStart); + if (authorityEnd !== -1) { // URL: "file:///", "file://server/", "file://server/path" + // For local "file" URLs, include the leading DOS volume (if present). + // Per https://www.ietf.org/rfc/rfc1738.txt, a host of "" or "localhost" is a + // special case interpreted as "the machine from which the URL is being interpreted". + const scheme = path.slice(0, schemeEnd); + const authority = path.slice(authorityStart, authorityEnd); + if (scheme === "file" && (authority === "" || authority === "localhost") && + isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) { + const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2); + if (volumeSeparatorEnd !== -1) { + if (path.charCodeAt(volumeSeparatorEnd) === CharacterCodesSlash) { + // URL: "file:///c:/", "file://localhost/c:/", "file:///c%3a/", "file://localhost/c%3a/" + return ~(volumeSeparatorEnd + 1); + } + if (volumeSeparatorEnd === path.length) { + // URL: "file:///c:", "file://localhost/c:", "file:///c$3a", "file://localhost/c%3a" + // but not "file:///c:d" or "file:///c%3ad" + return ~volumeSeparatorEnd; + } + } + } + return ~(authorityEnd + 1); // URL: "file://server/", "http://server/" + } + return ~path.length; // URL: "file://server", "http://server" + } + // relative + return 0; +} +export function getPathComponents(path) { + return pathComponents(path, getRootLength(path)); +} +function pathComponents(path, rootLength) { + const root = path.substring(0, rootLength); + const rest = path.substring(rootLength).split("/"); + if (rest.length && !lastOrUndefined(rest)) + rest.pop(); + return [root, ...rest]; +} +function lastOrUndefined(array) { + return array.length ? array[array.length - 1] : undefined; +} +/** + * Determines whether a path has a trailing separator (`/` or `\\`). + */ +export function hasTrailingDirectorySeparator(path) { + return path.length > 0 && isAnyDirectorySeparator(path.charCodeAt(path.length - 1)); +} +/** + * Removes a trailing directory separator from a path, if it does not already have one. + */ +export function removeTrailingDirectorySeparator(path) { + if (hasTrailingDirectorySeparator(path)) { + return path.substr(0, path.length - 1); + } + return path; +} +/** + * Adds a trailing directory separator to a path, if it does not already have one. + */ +export function ensureTrailingDirectorySeparator(path) { + if (!hasTrailingDirectorySeparator(path)) { + return path + directorySeparator; + } + return path; +} +/** + * Normalize path separators, converting `\\` into `/`. + */ +export function normalizeSlashes(path) { + return path.includes("\\") + ? path.replace(backslashRegExp, directorySeparator) + : path; +} +/** + * Combines paths. If a path is absolute, it replaces any previous path. Relative paths are not simplified. + */ +export function combinePaths(path, ...paths) { + if (path) + path = normalizeSlashes(path); + for (let relativePath of paths) { + if (!relativePath) + continue; + relativePath = normalizeSlashes(relativePath); + if (!path || getRootLength(relativePath) !== 0) { + path = relativePath; + } + else { + path = ensureTrailingDirectorySeparator(path) + relativePath; + } + } + return path; +} +function simpleNormalizePath(path) { + // Most paths don't require normalization + if (!relativePathSegmentRegExp.test(path)) { + return path; + } + // Some paths only require cleanup of `/./` or leading `./` + let simplified = path.replace(/\/\.\//g, "/"); + if (simplified.startsWith("./")) { + simplified = simplified.slice(2); + } + if (simplified !== path) { + path = simplified; + if (!relativePathSegmentRegExp.test(path)) { + return path; + } + } + return undefined; +} +/** + * Returns the normalized absolute path, resolving `.` and `..` segments. + */ +export function getNormalizedAbsolutePath(path, currentDirectory) { + let rootLength = getRootLength(path); + if (rootLength === 0 && currentDirectory) { + path = combinePaths(currentDirectory, path); + rootLength = getRootLength(path); + } + else { + // combinePaths normalizes slashes, so not necessary in the other branch + path = normalizeSlashes(path); + } + const simpleNormalized = simpleNormalizePath(path); + if (simpleNormalized !== undefined) { + return simpleNormalized.length > rootLength ? removeTrailingDirectorySeparator(simpleNormalized) : simpleNormalized; + } + const length = path.length; + const root = path.substring(0, rootLength); + // `normalized` is only initialized once `path` is determined to be non-normalized + let normalized; + let index = rootLength; + let segmentStart = index; + let normalizedUpTo = index; + let seenNonDotDotSegment = rootLength !== 0; + while (index < length) { + // At beginning of segment + segmentStart = index; + let ch = path.charCodeAt(index); + while (ch === CharacterCodesSlash && index + 1 < length) { + index++; + ch = path.charCodeAt(index); + } + if (index > segmentStart) { + // Seen superfluous separator + normalized ??= path.substring(0, segmentStart - 1); + segmentStart = index; + } + // Past any superfluous separators + let segmentEnd = path.indexOf(directorySeparator, index + 1); + if (segmentEnd === -1) { + segmentEnd = length; + } + const segmentLength = segmentEnd - segmentStart; + if (segmentLength === 1 && path.charCodeAt(index) === CharacterCodesDot) { + // "." segment (skip) + normalized ??= path.substring(0, normalizedUpTo); + } + else if (segmentLength === 2 && path.charCodeAt(index) === CharacterCodesDot && path.charCodeAt(index + 1) === CharacterCodesDot) { + // ".." segment + if (!seenNonDotDotSegment) { + if (normalized !== undefined) { + normalized += normalized.length === rootLength ? ".." : "/.."; + } + else { + normalizedUpTo = index + 2; + } + } + else if (normalized === undefined) { + if (normalizedUpTo - 2 >= 0) { + normalized = path.substring(0, Math.max(rootLength, path.lastIndexOf(directorySeparator, normalizedUpTo - 2))); + } + else { + normalized = path.substring(0, normalizedUpTo); + } + } + else { + const lastSlash = normalized.lastIndexOf(directorySeparator); + if (lastSlash !== -1) { + normalized = normalized.substring(0, Math.max(rootLength, lastSlash)); + } + else { + normalized = root; + } + if (normalized.length === rootLength) { + seenNonDotDotSegment = rootLength !== 0; + } + } + } + else if (normalized !== undefined) { + if (normalized.length !== rootLength) { + normalized += directorySeparator; + } + seenNonDotDotSegment = true; + normalized += path.substring(segmentStart, segmentEnd); + } + else { + seenNonDotDotSegment = true; + normalizedUpTo = segmentEnd; + } + index = segmentEnd + 1; + } + return normalized ?? (length > rootLength ? removeTrailingDirectorySeparator(path) : path); +} +/** + * Normalizes a path, resolving `.` and `..` segments and converting backslashes to forward slashes. + */ +export function normalizePath(path) { + path = normalizeSlashes(path); + let normalized = simpleNormalizePath(path); + if (normalized !== undefined) { + return normalized; + } + normalized = getNormalizedAbsolutePath(path, ""); + return normalized && hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(normalized) : normalized; +} +/** + * Determines whether a path is an absolute disk path (e.g. starts with `/`, or a DOS path + * like `c:`, `c:\\` or `c:/`). + */ +export function isRootedDiskPath(path) { + return getEncodedRootLength(path) > 0; +} +/** + * Converts a file name to a normalized path. + * + * @param fileName The file name to convert + * @param basePath The base path to use for relative file names + * @param getCanonicalFileName A function to get the canonical file name (e.g., toLowerCase for case-insensitive systems) + * @returns The normalized path + */ +export function toPath(fileName, basePath, getCanonicalFileName) { + const nonCanonicalizedPath = isRootedDiskPath(fileName) + ? normalizePath(fileName) + : getNormalizedAbsolutePath(fileName, basePath); + return getCanonicalFileName(nonCanonicalizedPath); +} +/** + * Creates a getCanonicalFileName function based on case sensitivity. + */ +export function createGetCanonicalFileName(useCaseSensitiveFileNames) { + return useCaseSensitiveFileNames ? identity : toLowerCase; +} +function identity(x) { + return x; +} +function toLowerCase(s) { + return s.toLowerCase(); +} +const bundledScheme = "bundled:///"; +/** + * Returns true if the path refers to a bundled library file. + */ +export function isBundled(path) { + return path.startsWith(bundledScheme); +} +/** + * Returns true if the file name represents a dynamic/virtual file + * that doesn't exist on disk (e.g., untitled files with paths like "^/untitled/..."). + */ +export function isDynamicFileName(fileName) { + return fileName.startsWith("^/"); +} +/** + * Splits a Windows volume (e.g., "c:") from the rest of the path. + * Returns [volume, rest, ok] where ok is true if a volume was found. + */ +export function splitVolumePath(path) { + if (path.length >= 2 && isVolumeCharacter(path.charCodeAt(0)) && path.charCodeAt(1) === CharacterCodesColon) { + return [path.substring(0, 2).toLowerCase(), path.substring(2), true]; + } + return ["", path, false]; +} +// Characters that need extra escaping in URI path segments +// https://github.com/microsoft/vscode-uri/blob/edfdccd976efaf4bb8fdeca87e97c47257721729/src/uri.ts#L455 +const extraEscapeChars = { + ":": "%3A", + "/": "%2F", + "?": "%3F", + "#": "%23", + "[": "%5B", + "]": "%5D", + "@": "%40", + "!": "%21", + "$": "%24", + "&": "%26", + "'": "%27", + "(": "%28", + ")": "%29", + "*": "%2A", + "+": "%2B", + ",": "%2C", + ";": "%3B", + "=": "%3D", + " ": "%20", +}; +function extraEscape(s) { + let result = s; + for (const [char, escape] of Object.entries(extraEscapeChars)) { + result = result.replaceAll(char, escape); + } + return result; +} +/** + * Converts a file name to a document URI. + * + * @example + * fileNameToDocumentURI("/path/to/file.ts") === "file:///path/to/file.ts" + * fileNameToDocumentURI("c:/path/to/file.ts") === "file:///c%3A/path/to/file.ts" + * fileNameToDocumentURI("^/untitled/ts-nul-authority/Untitled-1") === "untitled:Untitled-1" + * fileNameToDocumentURI("^/vscode-vfs/github/microsoft/typescript-go/file.ts") === "vscode-vfs://github/microsoft/typescript-go/file.ts" + */ +export function fileNameToDocumentURI(fileName) { + // Bundled files are returned as-is + if (isBundled(fileName)) { + return fileName; + } + // Dynamic/virtual files (untitled, vscode-vfs, etc.) need special handling + if (isDynamicFileName(fileName)) { + // Format: ^/scheme/authority/path + const withoutPrefix = fileName.substring(2); // Remove "^/" + const firstSlash = withoutPrefix.indexOf("/"); + if (firstSlash === -1) { + throw new Error("invalid file name: " + fileName); + } + const scheme = withoutPrefix.substring(0, firstSlash); + const rest = withoutPrefix.substring(firstSlash + 1); + const secondSlash = rest.indexOf("/"); + if (secondSlash === -1) { + throw new Error("invalid file name: " + fileName); + } + const authority = rest.substring(0, secondSlash); + const path = rest.substring(secondSlash + 1); + // ts-nul-authority is a placeholder for URIs without an authority + if (authority === "ts-nul-authority") { + return scheme + ":" + path; + } + return scheme + "://" + authority + "/" + path; + } + // Regular file path - convert to file:// URI + let [volume, rest] = splitVolumePath(fileName); + if (volume !== "") { + volume = "/" + extraEscape(volume); + } + // Remove leading // for UNC paths (already handled by file://) + if (rest.startsWith("//")) { + rest = rest.substring(2); + } + const parts = rest.split("/"); + const encodedParts = parts.map(part => extraEscape(encodeURIComponent(part))); + return "file://" + volume + encodedParts.join("/"); +} +/** + * Converts a document URI to a file name. + * + * @example + * documentURIToFileName("file:///path/to/file.ts") === "/path/to/file.ts" + * documentURIToFileName("file:///c%3A/path/to/file.ts") === "c:/path/to/file.ts" + * documentURIToFileName("untitled:Untitled-1") === "^/untitled/ts-nul-authority/Untitled-1" + * documentURIToFileName("vscode-vfs://github/microsoft/typescript-go/file.ts") === "^/vscode-vfs/github/microsoft/typescript-go/file.ts" + */ +export function documentURIToFileName(uri) { + // Bundled files are returned as-is + if (isBundled(uri)) { + return uri; + } + // Handle file:// URIs + if (uri.startsWith("file://")) { + let parsed; + try { + parsed = new URL(uri); + } + catch { + throw new Error("invalid file URI: " + uri); + } + // UNC path: file://server/share/... + if (parsed.host !== "") { + return "//" + parsed.host + parsed.pathname; + } + // Local file - fix Windows path by removing leading slash before volume + const path = decodeURIComponent(parsed.pathname); + if (path.length >= 3 && path.charCodeAt(0) === CharacterCodesSlash) { + const [volume, rest, ok] = splitVolumePath(path.substring(1)); + if (ok) { + return volume + rest; + } + } + return path; + } + // Leave all other URIs escaped so we can round-trip them. + // Convert to dynamic file name format: ^/scheme/authority/path + const colonIndex = uri.indexOf(":"); + if (colonIndex === -1) { + throw new Error("invalid URI: " + uri); + } + const scheme = uri.substring(0, colonIndex); + let path = uri.substring(colonIndex + 1); + let authority = "ts-nul-authority"; + if (path.startsWith("//")) { + const rest = path.substring(2); + const slashIndex = rest.indexOf("/"); + if (slashIndex === -1) { + throw new Error("invalid URI: " + uri); + } + authority = rest.substring(0, slashIndex); + path = rest.substring(slashIndex + 1); + } + return "^/" + scheme + "/" + authority + "/" + path; +} +//# sourceMappingURL=path.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/path.js.map b/node_modules/typescript/dist/api/path.js.map new file mode 100644 index 0000000..13b3e83 --- /dev/null +++ b/node_modules/typescript/dist/api/path.js.map @@ -0,0 +1 @@ +{"version":3,"file":"path.js","sourceRoot":"","sources":["../../src/api/path.ts"],"names":[],"mappings":"AAAA,MAAM,mBAAmB,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAC9C,MAAM,uBAAuB,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AACnD,MAAM,mBAAmB,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAC9C,MAAM,qBAAqB,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAChD,MAAM,eAAe,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAC1C,MAAM,eAAe,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAC1C,MAAM,eAAe,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAC1C,MAAM,eAAe,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAC1C,MAAM,eAAe,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAC1C,MAAM,iBAAiB,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAC5C,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAC/B,MAAM,qBAAqB,GAAG,IAAI,CAAC;AACnC,MAAM,kBAAkB,GAAG,KAAK,CAAC;AACjC,MAAM,eAAe,GAAG,KAAK,CAAC;AAC9B,+CAA+C;AAC/C,MAAM,yBAAyB,GAAG,4BAA4B,CAAC;AAE/D;;GAEG;AACH,SAAS,uBAAuB,CAAC,QAAgB;IAC7C,OAAO,QAAQ,KAAK,mBAAmB,IAAI,QAAQ,KAAK,uBAAuB,CAAC;AACpF,CAAC;AAED,SAAS,iBAAiB,CAAC,Q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QAC1C,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;IAC1C,CAAC;IAED,OAAO,IAAI,GAAG,MAAM,GAAG,GAAG,GAAG,SAAS,GAAG,GAAG,GAAG,IAAI,CAAC;AACxD,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/proto.d.ts b/node_modules/typescript/dist/api/proto.d.ts new file mode 100644 index 0000000..4799f1e --- /dev/null +++ b/node_modules/typescript/dist/api/proto.d.ts @@ -0,0 +1,239 @@ +import type { CompletionItemKind } from "#enums/completionItemKind"; +import type { ModuleKind } from "#enums/moduleKind"; +import type { __String, Path } from "../ast/index.ts"; +import type { CompilerOptions } from "./compilerOptions.ts"; +export type { CompilerOptions } from "./compilerOptions.ts"; +/** + * A document identifier that can be either a file name (path string) or a document URI object. + * + * @example + * // Using a file name + * project.program.getSourceFile("/path/to/file.ts"); + * + * // Using a URI + * project.program.getSourceFile({ uri: "file:///path/to/file.ts" }); + */ +export type DocumentIdentifier = string | { + uri: string; +}; +/** + * A position within a document, combining a document identifier with an offset. + */ +export interface DocumentPosition { + /** The document containing the position */ + document: DocumentIdentifier; + /** The character offset within the document */ + position: number; +} +/** + * Resolves a DocumentIdentifier to a file name. + * If the identifier contains a URI, it is converted to a file name. + */ +export declare function resolveFileName(identifier: DocumentIdentifier): string; +/** + * Resolves a DocumentIdentifier to a document URI. + * If the identifier contains a file name, it is converted to a URI. + */ +export declare function resolveDocumentURI(identifier: DocumentIdentifier): string; +/** + * Response from the initialize method. + */ +export interface InitializeResponse { + /** Whether the host file system is case-sensitive */ + useCaseSensitiveFileNames: boolean; + /** The server's current working directory */ + currentDirectory: string; +} +export interface ConfigResponse { + options: Record; + fileNames: string[]; +} +export interface LSPUpdateSnapshotParams { + /** + * @deprecated Use {@link openProjects} instead. + * Path to a tsconfig.json file to open in the new snapshot. + */ + openProject?: string; + /** + * tsconfig.json files to open/load in the new snapshot. Opens are ref-counted + * and persist across snapshots until closed via {@link closeProjects}. + */ + openProjects?: DocumentIdentifier[]; + /** + * tsconfig.json files to release in the new snapshot. A project is only unloaded + * once every API client that opened it closes it. + */ + closeProjects?: DocumentIdentifier[]; + /** + * Files to keep open for the API client, mirroring LSP's `textDocument/didOpen`. + * For each file, ancestor directories are searched for a tsconfig that contains it; + * if one is found, that configured project is loaded and becomes the file's default + * project. Otherwise the file is loaded into the inferred project (e.g. a d.ts in + * node_modules that is not part of any project's import graph). Opens persist across + * subsequent snapshots until the file is closed via {@link closeFiles}. + * After calling updateSnapshot with openFiles, getDefaultProjectForFile returns the + * resolved configured or inferred project. + */ + openFiles?: DocumentIdentifier[]; + /** + * Files to release in the new snapshot. A file is only fully closed once every + * API client that opened it closes it. + */ + closeFiles?: DocumentIdentifier[]; +} +export interface FileChangeSummary { + changed?: DocumentIdentifier[]; + created?: DocumentIdentifier[]; + deleted?: DocumentIdentifier[]; +} +export type FileChanges = FileChangeSummary | { + invalidateAll: true; +}; +/** + * Parameters for updateSnapshot. + */ +export interface UpdateSnapshotParams extends LSPUpdateSnapshotParams { + fileChanges?: FileChanges; +} +/** + * Builds the wire request for updateSnapshot, applying the deprecated `openProject` + * compatibility shim: a single `openProject` is folded into `openProjects` and is + * never sent on the wire. + */ +export declare function toUpdateSnapshotRequest(params?: UpdateSnapshotParams): UpdateSnapshotParams; +/** + * Changes to source files within a single project. + */ +export interface ProjectFileChanges { + /** Source file paths whose content changed */ + changedFiles?: string[]; + /** Source file paths removed from the project's program */ + deletedFiles?: string[]; +} +/** + * Changes between two consecutive snapshots, reported per-project. + */ +export interface SnapshotChanges { + /** Project handles mapped to their file changes. Projects not listed are unchanged. */ + changedProjects?: Record; + /** Project handles that were removed from the snapshot */ + removedProjects?: string[]; +} +/** + * Response from updateSnapshot. + */ +export interface UpdateSnapshotResponse { + /** Handle for the newly created snapshot */ + snapshot: number; + /** List of projects in the snapshot */ + projects: ProjectResponse[]; + /** Changes from the previous snapshot (absent for the first snapshot) */ + changes?: SnapshotChanges; +} +export interface ProjectResponse { + id: Path; + configFileName: string; + compilerOptions: CompilerOptions; + rootFiles: string[]; +} +export interface SourceFileResponse { + /** Base64-encoded binary AST data */ + data: string; +} +export interface SourceFileMetadata { + isDefaultLibrary: boolean; + isFromExternalLibrary: boolean; + packageJsonType: string; + packageJsonDirectory: string; + impliedNodeFormat: ModuleKind; +} +export interface SymbolResponse { + id: number; + /** + * The project the symbol was first observed in. Used as the default project for + * follow-up lookups that need a project context (e.g. members/exports), since symbols + * are shared snapshot-wide and such lookups can vary by project. + */ + project: Path; + name: __String; + flags: number; + checkFlags: number; + declarations?: string[]; + valueDeclaration?: string; + parent?: number; + exportSymbol?: number; +} +export interface TypeResponse { + id: number; + flags: number; + objectFlags?: number; + /** Literal value. BigInt literals are encoded as a decimal string (e.g. "-123") since JSON cannot represent bigint. Absent values are serialized as null. */ + value?: string | number | boolean | null; + freshType?: number; + regularType?: number; + target?: number; + typeParameters?: number[]; + outerTypeParameters?: number[]; + localTypeParameters?: number[]; + elementFlags?: number[]; + fixedLength?: number; + readonly?: boolean; + objectType?: number; + indexType?: number; + checkType?: number; + extendsType?: number; + baseType?: number; + substConstraint?: number; + texts?: string[]; + intrinsicName?: string; + isThisType?: boolean; + aliasTypeArguments?: number[]; + aliasSymbol?: number; + symbol?: number; +} +export interface SignatureResponse { + id: number; + flags: number; + declaration?: string; + typeParameters?: number[]; + parameters?: number[]; + thisParameter?: number; + target?: number; +} +export interface TypePredicateResponse { + kind: number; + parameterIndex: number; + parameterName?: string; + type?: TypeResponse; +} +export interface IndexInfoResponse { + keyType: TypeResponse; + valueType: TypeResponse; + isReadonly?: boolean; + declaration?: string; +} +export interface ProfileParams { + dir: string; +} +export interface ProfileResult { + file: string; +} +export interface CompletionEntryLabelDetailsResponse { + detail?: string; + description?: string; +} +export interface CompletionEntryResponse { + name: string; + kind?: CompletionItemKind; + sortText?: string; + insertText?: string; + filterText?: string; + detail?: string; + labelDetails?: CompletionEntryLabelDetailsResponse; + symbol?: SymbolResponse; +} +export interface CompletionInfoResponse { + isIncomplete: boolean; + entries: CompletionEntryResponse[]; +} +//# sourceMappingURL=proto.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/proto.d.ts.map b/node_modules/typescript/dist/api/proto.d.ts.map new file mode 100644 index 0000000..35ac635 --- /dev/null +++ b/node_modules/typescript/dist/api/proto.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"proto.d.ts","sourceRoot":"","sources":["../../src/api/proto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EACR,QAAQ,EACR,IAAI,EACP,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAM5D,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;;;;;;;;GASG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;CAAE,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,2CAA2C;IAC3C,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,kBAAkB,GAAG,MAAM,CAKtE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,kBAAkB,GAAG,MAAM,CAKzE;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,qDAAqD;IACrD,yBAAyB,EAAE,OAAO,CAAC;IACnC,6CAA6C;IAC7C,gBAAgB,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,cAAc;IAC3B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAA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AAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,aAAa;IAC1B,GAAG,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,mCAAmC;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,uBAAuB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,mCAAmC,CAAC;IACnD,MAAM,CAAC,EAAE,cAAc,CAAC;CAC3B;AAED,MAAM,WAAW,sBAAsB;IACnC,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,uBAAuB,EAAE,CAAC;CACtC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/proto.js b/node_modules/typescript/dist/api/proto.js new file mode 100644 index 0000000..69808e0 --- /dev/null +++ b/node_modules/typescript/dist/api/proto.js @@ -0,0 +1,37 @@ +import { documentURIToFileName, fileNameToDocumentURI, } from "./path.js"; +/** + * Resolves a DocumentIdentifier to a file name. + * If the identifier contains a URI, it is converted to a file name. + */ +export function resolveFileName(identifier) { + if (typeof identifier === "string") { + return identifier; + } + return documentURIToFileName(identifier.uri); +} +/** + * Resolves a DocumentIdentifier to a document URI. + * If the identifier contains a file name, it is converted to a URI. + */ +export function resolveDocumentURI(identifier) { + if (typeof identifier === "string") { + return fileNameToDocumentURI(identifier); + } + return identifier.uri; +} +/** + * Builds the wire request for updateSnapshot, applying the deprecated `openProject` + * compatibility shim: a single `openProject` is folded into `openProjects` and is + * never sent on the wire. + */ +export function toUpdateSnapshotRequest(params) { + const { openProject, openProjects, ...rest } = params ?? {}; + const mergedOpenProjects = openProject !== undefined + ? [resolveFileName(openProject), ...(openProjects ?? [])] + : openProjects; + return { + ...rest, + ...(mergedOpenProjects !== undefined ? { openProjects: mergedOpenProjects } : {}), + }; +} +//# sourceMappingURL=proto.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/proto.js.map b/node_modules/typescript/dist/api/proto.js.map new file mode 100644 index 0000000..1311f1c --- /dev/null +++ b/node_modules/typescript/dist/api/proto.js.map @@ -0,0 +1 @@ +{"version":3,"file":"proto.js","sourceRoot":"","sources":["../../src/api/proto.ts"],"names":[],"mappings":"AAOA,OAAO,EACH,qBAAqB,EACrB,qBAAqB,GACxB,MAAM,WAAW,CAAC;AA0BnB;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,UAA8B;IAC1D,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;QACjC,OAAO,UAAU,CAAC;IACtB,CAAC;IACD,OAAO,qBAAqB,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AACjD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,UAA8B;IAC7D,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;QACjC,OAAO,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,UAAU,CAAC,GAAG,CAAC;AAC1B,CAAC;AAkED;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CAAC,MAA6B;IACjE,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;IAC5D,MAAM,kBAAkB,GAAG,WAAW,KAAK,SAAS;QAChD,CAAC,CAAC,CAAC,eAAe,CAAC,WAAW,CAAC,EAAE,GAAG,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC;QACzD,CAAC,CAAC,YAAY,CAAC;IACnB,OAAO;QACH,GAAG,IAAI;QACP,GAAG,CAAC,kBAAkB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,kBAAkB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACpF,CAAC;AACN,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/sourceFileCache.d.ts b/node_modules/typescript/dist/api/sourceFileCache.d.ts new file mode 100644 index 0000000..3113bcb --- /dev/null +++ b/node_modules/typescript/dist/api/sourceFileCache.d.ts @@ -0,0 +1,79 @@ +import type { Path, SourceFile } from "../ast/index.ts"; +import type { SnapshotChanges } from "./proto.ts"; +/** + * A cached source file entry, identified by content hash. + */ +export interface CachedSourceFile { + /** The cached source file object */ + file: SourceFile; + /** The content hash from the server */ + contentHash: string; + /** The parse options key that was used to create this file */ + parseOptionsKey: string; + /** Set of (snapshot, project) ref keys that reference this entry */ + refs: Set; +} +/** + * Client-side cache for source files keyed by (path, parseOptionsKey, contentHash). + * + * Supports multiple versions of the same file at the same path (e.g., from + * different snapshots with different file contents). Each version is identified + * by its content hash and parse options key. + * + * Entries are ref-counted by (snapshot, project) pairs. When a snapshot is + * disposed, all refs for that snapshot across all projects are released, + * and entries with no remaining references are evicted. + * + * When a new snapshot is created, unchanged cache entries from the previous + * snapshot are retained per-project. Only files within changed or removed + * projects are invalidated. + */ +export declare class SourceFileCache { + /** Map from path to all cached versions of that file */ + private cache; + /** Map from snapshotId to (projectId → Set of paths fetched through that project) */ + private snapshotProjectPaths; + /** + * Get a cached source file already retained for the given (snapshot, project) pair. + * This does not require a content hash or parse options key — it returns the entry + * if one exists with a matching ref. Used to skip the server request entirely when + * retainForSnapshot has already carried over the ref. + * + * A given (snapshot, project) pair always parses a file the same way, so there is + * at most one matching entry per ref. + */ + getRetained(path: Path, snapshotId: number, projectId: string): SourceFile | undefined; + /** + * Store a source file in the cache and retain it for the given (snapshot, project) pair. + * Returns the cached file — which may be an existing entry if the hash matches. + */ + set(path: Path, file: SourceFile, parseOptionsKey: string, contentHash: string, snapshotId: number, projectId: string): SourceFile; + /** + * Retain cache entries from a previous snapshot for a new snapshot. + * For each project in the previous snapshot: + * - Removed projects: skip (don't retain any refs). + * - Changed projects: retain refs for files not listed in changedFiles/deletedFiles. + * - Unchanged projects: retain all refs. + */ + retainForSnapshot(newSnapshotId: number, previousSnapshotId: number, changes: SnapshotChanges | undefined): void; + /** + * Release all entries retained by the given snapshot across all projects. + * Only visits paths that the snapshot actually referenced. + * Entries with no remaining refs are evicted. + */ + releaseSnapshot(snapshotId: number): void; + private trackPath; + /** + * Clear all entries from the cache. + */ + clear(): void; + /** + * Get the number of unique paths in the cache. + */ + get size(): number; + /** + * Check if a path is in the cache. + */ + has(path: Path): boolean; +} +//# sourceMappingURL=sourceFileCache.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/sourceFileCache.d.ts.map b/node_modules/typescript/dist/api/sourceFileCache.d.ts.map new file mode 100644 index 0000000..15f8f9e --- /dev/null +++ b/node_modules/typescript/dist/api/sourceFileCache.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"sourceFileCache.d.ts","sourceRoot":"","sources":["../../src/api/sourceFileCache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,IAAI,EACJ,UAAU,EACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AASlD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,oCAAoC;IACpC,IAAI,EAAE,UAAU,CAAC;IACjB,uCAAuC;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,8DAA8D;IAC9D,eAAe,EAAE,MAAM,CAAC;IACxB,oEAAoE;IACpE,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACrB;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,eAAe;IACxB,wDAAwD;IACxD,OAAO,CAAC,KAAK,CAA4C;IACzD,qFAAqF;IACrF,OAAO,CAAC,oBAAoB,CAAkD;IAE9E;;;;;;;;OAQG;IACH,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS;IAQtF;;;OAGG;IACH,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,UAAU;IAmBlI;;;;;;OAMG;IACH,iBAAiB,CAAC,aAAa,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,SAAS,GAAG,IAAI;IAmChH;;;;OAIG;IACH,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAsBzC,OAAO,CAAC,SAAS;IAcjB;;OAEG;IACH,KAAK,IAAI,IAAI;IAKb;;OAEG;IACH,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED;;OAEG;IACH,GAAG,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO;CAG3B"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/sourceFileCache.js b/node_modules/typescript/dist/api/sourceFileCache.js new file mode 100644 index 0000000..fe44aef --- /dev/null +++ b/node_modules/typescript/dist/api/sourceFileCache.js @@ -0,0 +1,169 @@ +/** + * Builds a composite ref key from a snapshot ID and project ID. + */ +function refKey(snapshotId, projectId) { + return `${snapshotId}:${projectId}`; +} +/** + * Client-side cache for source files keyed by (path, parseOptionsKey, contentHash). + * + * Supports multiple versions of the same file at the same path (e.g., from + * different snapshots with different file contents). Each version is identified + * by its content hash and parse options key. + * + * Entries are ref-counted by (snapshot, project) pairs. When a snapshot is + * disposed, all refs for that snapshot across all projects are released, + * and entries with no remaining references are evicted. + * + * When a new snapshot is created, unchanged cache entries from the previous + * snapshot are retained per-project. Only files within changed or removed + * projects are invalidated. + */ +export class SourceFileCache { + /** Map from path to all cached versions of that file */ + cache = new Map(); + /** Map from snapshotId to (projectId → Set of paths fetched through that project) */ + snapshotProjectPaths = new Map(); + /** + * Get a cached source file already retained for the given (snapshot, project) pair. + * This does not require a content hash or parse options key — it returns the entry + * if one exists with a matching ref. Used to skip the server request entirely when + * retainForSnapshot has already carried over the ref. + * + * A given (snapshot, project) pair always parses a file the same way, so there is + * at most one matching entry per ref. + */ + getRetained(path, snapshotId, projectId) { + const entries = this.cache.get(path); + if (!entries) + return undefined; + const key = refKey(snapshotId, projectId); + const entry = entries.find(e => e.refs.has(key)); + return entry?.file; + } + /** + * Store a source file in the cache and retain it for the given (snapshot, project) pair. + * Returns the cached file — which may be an existing entry if the hash matches. + */ + set(path, file, parseOptionsKey, contentHash, snapshotId, projectId) { + let entries = this.cache.get(path); + if (!entries) { + entries = []; + this.cache.set(path, entries); + } + const ref = refKey(snapshotId, projectId); + // Check if we already have this exact version + const existing = entries.find(e => e.parseOptionsKey === parseOptionsKey && e.contentHash === contentHash); + if (existing) { + existing.refs.add(ref); + this.trackPath(snapshotId, projectId, path); + return existing.file; + } + entries.push({ file, contentHash, parseOptionsKey, refs: new Set([ref]) }); + this.trackPath(snapshotId, projectId, path); + return file; + } + /** + * Retain cache entries from a previous snapshot for a new snapshot. + * For each project in the previous snapshot: + * - Removed projects: skip (don't retain any refs). + * - Changed projects: retain refs for files not listed in changedFiles/deletedFiles. + * - Unchanged projects: retain all refs. + */ + retainForSnapshot(newSnapshotId, previousSnapshotId, changes) { + const prevProjectMap = this.snapshotProjectPaths.get(previousSnapshotId); + if (!prevProjectMap) + return; + const removedProjects = new Set(changes?.removedProjects ?? []); + const changedProjects = changes?.changedProjects ?? {}; + for (const [projectId, paths] of prevProjectMap) { + if (removedProjects.has(projectId)) + continue; + const projectChanges = changedProjects[projectId]; + let invalidPaths; + if (projectChanges) { + invalidPaths = new Set(); + for (const p of projectChanges.changedFiles ?? []) + invalidPaths.add(p); + for (const p of projectChanges.deletedFiles ?? []) + invalidPaths.add(p); + } + const prevRef = refKey(previousSnapshotId, projectId); + const newRef = refKey(newSnapshotId, projectId); + for (const path of paths) { + if (invalidPaths?.has(path)) + continue; + const entries = this.cache.get(path); + if (!entries) + continue; + for (const entry of entries) { + if (entry.refs.has(prevRef)) { + entry.refs.add(newRef); + this.trackPath(newSnapshotId, projectId, path); + } + } + } + } + } + /** + * Release all entries retained by the given snapshot across all projects. + * Only visits paths that the snapshot actually referenced. + * Entries with no remaining refs are evicted. + */ + releaseSnapshot(snapshotId) { + const projectMap = this.snapshotProjectPaths.get(snapshotId); + if (!projectMap) + return; + for (const [projectId, paths] of projectMap) { + const key = refKey(snapshotId, projectId); + for (const path of paths) { + const entries = this.cache.get(path); + if (!entries) + continue; + for (let i = entries.length - 1; i >= 0; i--) { + entries[i].refs.delete(key); + if (entries[i].refs.size === 0) { + entries.splice(i, 1); + } + } + if (entries.length === 0) { + this.cache.delete(path); + } + } + } + this.snapshotProjectPaths.delete(snapshotId); + } + trackPath(snapshotId, projectId, path) { + let projectMap = this.snapshotProjectPaths.get(snapshotId); + if (!projectMap) { + projectMap = new Map(); + this.snapshotProjectPaths.set(snapshotId, projectMap); + } + let paths = projectMap.get(projectId); + if (!paths) { + paths = new Set(); + projectMap.set(projectId, paths); + } + paths.add(path); + } + /** + * Clear all entries from the cache. + */ + clear() { + this.cache.clear(); + this.snapshotProjectPaths.clear(); + } + /** + * Get the number of unique paths in the cache. + */ + get size() { + return this.cache.size; + } + /** + * Check if a path is in the cache. + */ + has(path) { + return this.cache.has(path); + } +} +//# sourceMappingURL=sourceFileCache.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/sourceFileCache.js.map b/node_modules/typescript/dist/api/sourceFileCache.js.map new file mode 100644 index 0000000..3f858e3 --- /dev/null +++ b/node_modules/typescript/dist/api/sourceFileCache.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sourceFileCache.js","sourceRoot":"","sources":["../../src/api/sourceFileCache.ts"],"names":[],"mapp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C;IACpB,CAAC;IAED;;OAEG;IACH,KAAK;QACD,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QACnB,IAAI,CAAC,oBAAoB,CAAC,KAAK,EAAE,CAAC;IACtC,CAAC;IAED;;OAEG;IACH,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,IAAU;QACV,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/sync/api.d.ts b/node_modules/typescript/dist/api/sync/api.d.ts new file mode 100644 index 0000000..1295076 --- /dev/null +++ b/node_modules/typescript/dist/api/sync/api.d.ts @@ -0,0 +1,529 @@ +/// +import { CompletionItemKind } from "#enums/completionItemKind"; +import { DiagnosticCategory } from "#enums/diagnosticCategory"; +import { ElementFlags } from "#enums/elementFlags"; +import { ModuleKind } from "#enums/moduleKind"; +import { NodeBuilderFlags } from "#enums/nodeBuilderFlags"; +import { ObjectFlags } from "#enums/objectFlags"; +import { SignatureFlags } from "#enums/signatureFlags"; +import { SignatureKind } from "#enums/signatureKind"; +import { SymbolFlags } from "#enums/symbolFlags"; +import { TypeFlags } from "#enums/typeFlags"; +import { TypePredicateKind } from "#enums/typePredicateKind"; +import { type __String, type Expression, type Identifier, ModifierFlags, type Node, type Path, type SourceFile, type SyntaxKind, type TypeNode } from "../../ast/index.ts"; +import type { APIOptions, LSPConnectionOptions } from "../options.ts"; +import type { CompilerOptions, ConfigResponse, DocumentIdentifier, DocumentPosition, LSPUpdateSnapshotParams, ProjectResponse, SignatureResponse, SourceFileMetadata, SymbolResponse, TypeResponse, UpdateSnapshotParams, UpdateSnapshotResponse } from "../proto.ts"; +import { SourceFileCache } from "../sourceFileCache.ts"; +import type { RequestTiming, TimingAccumulators, TimingInfo } from "../timing.ts"; +import { Client, type ClientSocketOptions, type ClientSpawnOptions } from "./client.ts"; +import type { AssertsIdentifierTypePredicate, AssertsThisTypePredicate, BigIntLiteralType, BooleanLiteralType, CompletionEntry, CompletionInfo, CompletionOptions, ConditionalType, Diagnostic, FreshableType, IdentifierTypePredicate, IndexedAccessType, IndexInfo, IndexType, InterfaceType, IntersectionType, IntrinsicType, JSDocTagInfo, LiteralType, NumberLiteralType, ObjectType, StringLiteralType, StringMappingType, SubstitutionType, TemplateLiteralType, ThisTypePredicate, TupleType, Type, TypeParameter, TypePredicate, TypePredicateBase, TypeReference, UnionOrIntersectionType, UnionType } from "./types.ts"; +export { documentURIToFileName, fileNameToDocumentURI } from "../path.ts"; +export { CompletionItemKind, DiagnosticCategory, ElementFlags, ModifierFlags, ModuleKind, NodeBuilderFlags, ObjectFlags, SignatureFlags, SignatureKind, SymbolFlags, TypeFlags, TypePredicateKind }; +export type { APIOptions, AssertsIdentifierTypePredicate, AssertsThisTypePredicate, BigIntLiteralType, BooleanLiteralType, ClientSocketOptions, ClientSpawnOptions, CompilerOptions, CompletionEntry, CompletionInfo, CompletionOptions, ConditionalType, Diagnostic, DocumentIdentifier, DocumentPosition, FreshableType, IdentifierTypePredicate, IndexedAccessType, IndexInfo, IndexType, InterfaceType, IntersectionType, IntrinsicType, JSDocTagInfo, LiteralType, LSPConnectionOptions, NumberLiteralType, ObjectType, RequestTiming, SourceFileMetadata, StringLiteralType, StringMappingType, SubstitutionType, TemplateLiteralType, ThisTypePredicate, TimingAccumulators, TimingInfo, TupleType, Type, TypeParameter, TypePredicate, TypePredicateBase, TypeReference, UnionOrIntersectionType, UnionType }; +export declare class API { + private client; + private sourceFileCache; + private toPath; + private initialized; + private activeSnapshots; + private latestSnapshot; + readonly internal: InternalAPI; + constructor(options?: APIOptions | LSPConnectionOptions); + /** + * Create an API instance from an existing LSP connection's API session. + * Use this when connecting to an API pipe provided by an LSP server via custom/initializeAPISession. + */ + static fromLSPConnection(options: LSPConnectionOptions): API; + private ensureInitialized; + parseConfigFile(file: DocumentIdentifier): ConfigResponse; + updateSnapshot(params?: FromLSP extends true ? LSPUpdateSnapshotParams : UpdateSnapshotParams): Snapshot; + close(): void; + clearSourceFileCache(): void; + /** + * Returns a snapshot of collected timing information for requests made + * through this API instance: client-measured round-trip latency and bytes + * transferred, folded together with the server's own per-request processing + * time and an estimated transport overhead (round-trip minus server time). + * + * Fetching the snapshot issues a lightweight request to the server to + * retrieve its timing collection. Collection must be enabled via the + * `collectTiming` option; when it is not, the returned snapshot has + * `enabled: false` and zeroed totals. + */ + getTimingInfo(): TimingInfo; + /** Clears all accumulated timing totals and recent-request history, on both the client and the server. */ + resetTimingInfo(): void; +} +export declare class InternalAPI { + private client; + private ensureInitialized; + /** @internal */ + constructor(client: Client, ensureInitialized: () => void); + startCPUProfile(dir: string): void; + stopCPUProfile(): string; + saveHeapProfile(dir: string): string; +} +export declare class Snapshot { + readonly id: number; + private projectMap; + private toPath; + private client; + private disposed; + private onDispose; + private snapshotRegistry; + constructor(data: UpdateSnapshotResponse, client: Client, sourceFileCache: SourceFileCache, toPath: (fileName: string) => Path, onDispose: () => void); + getProjects(): readonly Project[]; + getProject(configFileName: string): Project | undefined; + getDefaultProjectForFile(file: DocumentIdentifier): Project | undefined; + [globalThis.Symbol.dispose](): void; + dispose(): void; + isDisposed(): boolean; + private ensureNotDisposed; +} +declare class SnapshotObjectRegistry { + private readonly symbols; + private readonly client; + private readonly snapshotId; + private readonly resolveProject; + constructor(client: Client, snapshotId: number, resolveProject: (projectId: Path) => Project | undefined); + /** Resolve a project id (a config file path) to its Project within this snapshot. */ + getProject(projectId: Path): Project | undefined; + getOrCreateSymbol(data: SymbolResponse): Symbol; + getSymbol(id: number): Symbol | undefined; + clear(): void; + fetchSymbol(source: Symbol | Signature | Type, method: string, handle: number | undefined, projectId?: Path): Symbol; + fetchSymbols(source: Symbol | Signature | Type, method: string, handles?: readonly number[], projectId?: Path): readonly Symbol[]; +} +declare class ProjectObjectRegistry { + private client; + private snapshotId; + private project; + private snapshotRegistry; + private types; + private signatures; + constructor(client: Client, snapshotId: number, project: Project, snapshotRegistry: SnapshotObjectRegistry); + getOrCreateSymbol(data: SymbolResponse): Symbol; + getSymbol(id: number): Symbol | undefined; + getOrCreateType(data: TypeResponse): TypeObject; + getType(id: number): TypeObject | undefined; + getOrCreateSignature(data: SignatureResponse): Signature; + getSignature(id: number): Signature | undefined; + clear(): void; + fetchType(source: Symbol | Signature | Type, method: string, handle: number | false | undefined): T; + fetchSymbol(source: Symbol | Signature | Type, method: string, handle: number | undefined): Symbol; + fetchSignature(source: Symbol | Signature | Type, method: string, handle: number | undefined): Signature; + fetchTypes(source: Symbol | Signature | Type, method: string, handles?: readonly number[]): readonly Type[]; + fetchSymbols(source: Symbol | Signature | Type, method: string, handles?: readonly number[]): readonly Symbol[]; + fetchBaseTypes(source: Type): readonly Type[]; +} +export declare class Project { + readonly id: Path; + readonly configFileName: string; + readonly compilerOptions: CompilerOptions; + readonly rootFiles: readonly string[]; + readonly program: Program; + readonly checker: Checker; + readonly emitter: Emitter; + private client; + constructor(data: ProjectResponse, snapshotId: number, client: Client, sourceFileCache: SourceFileCache, toPath: (fileName: string) => Path, snapshotRegistry: SnapshotObjectRegistry); + dispose(): void; +} +export declare class Program { + private snapshotId; + private project; + private client; + private sourceFileCache; + private toPath; + private decoder; + private sourceFileMetadataCache; + constructor(snapshotId: number, project: Project, client: Client, sourceFileCache: SourceFileCache, toPath: (fileName: string) => Path); + getCompilerOptions(): CompilerOptions; + getSourceFile(file: DocumentIdentifier): SourceFile | undefined; + getSourceFileNames(): readonly string[]; + /** + * Returns program-stored metadata for the given source file, or `undefined` if the file + * is not part of the program. Metadata is fetched lazily per file and cached on this + * `Program` instance. + */ + getSourceFileMetadata(fileName: string): SourceFileMetadata | undefined; + /** + * Returns program-stored metadata for the source file at the given path, or `undefined` + * if the file is not part of the program. Like {@link getSourceFileMetadata}, but skips + * the file name to path conversion. Metadata is fetched lazily per file and cached on + * this `Program` instance. + */ + getSourceFileMetadataByPath(path: Path): SourceFileMetadata | undefined; + private fetchSourceFileMetadata; + /** + * Returns whether the given source file was loaded as part of an external library + * (e.g. a dependency resolved from `node_modules`). The underlying program metadata is + * fetched lazily per file and cached on this `Program` instance. + */ + isSourceFileFromExternalLibrary(file: SourceFile): boolean; + /** + * Returns whether the given source file is a default library file (e.g. `lib.d.ts`). + * The underlying program metadata is fetched lazily per file and cached on this + * `Program` instance. + */ + isSourceFileDefaultLibrary(file: SourceFile): boolean; + /** + * Get syntactic (parse) diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + getSyntacticDiagnostics(file?: DocumentIdentifier): readonly Diagnostic[]; + /** + * Get binder diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + getBindDiagnostics(file?: DocumentIdentifier): readonly Diagnostic[]; + /** + * Get semantic (type-check) diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + getSemanticDiagnostics(file?: DocumentIdentifier): readonly Diagnostic[]; + /** + * Get suggestion diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + getSuggestionDiagnostics(file?: DocumentIdentifier): readonly Diagnostic[]; + /** + * Get declaration emit diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + getDeclarationDiagnostics(file?: DocumentIdentifier): readonly Diagnostic[]; + /** + * Get program-wide diagnostics for the project, including compiler options diagnostics. + */ + getProgramDiagnostics(): readonly Diagnostic[]; + /** + * Get global (non-file-specific) semantic diagnostics for the project. + */ + getGlobalDiagnostics(): readonly Diagnostic[]; + /** + * Get config file parsing diagnostics for the project. + */ + getConfigFileParsingDiagnostics(): readonly Diagnostic[]; +} +export declare class Checker { + private snapshotId; + private project; + private client; + private objectRegistry; + private wellKnownSymbols; + constructor(snapshotId: number, project: Project, client: Client, objectRegistry: ProjectObjectRegistry); + dispose(): void; + getSymbolAtLocation(node: Node): Symbol | undefined; + getSymbolAtLocation(nodes: readonly Node[]): (Symbol | undefined)[]; + getSymbolAtPosition(file: DocumentIdentifier, position: number): Symbol | undefined; + getSymbolAtPosition(file: DocumentIdentifier, positions: readonly number[]): (Symbol | undefined)[]; + getTypeOfSymbol(symbol: Symbol): Type | undefined; + getTypeOfSymbol(symbols: readonly Symbol[]): (Type | undefined)[]; + /** + * Get the declared type of a symbol. Always returns a type; for symbols whose + * declared type cannot be determined the checker yields the error type (use + * {@link Type.isErrorType} to detect it). + */ + getDeclaredTypeOfSymbol(symbol: Symbol): Type; + getReferencesToSymbolInFile(file: DocumentIdentifier, symbol: Symbol): NodeHandle[]; + getReferencedSymbolsForNode(node: Node, position: number): ReferencedSymbolEntry[]; + getSignatureUsage(signatureDecl: Node): SignatureUsage[]; + getCompletionsAtPosition(document: string, position: number, options?: CompletionOptions): CompletionInfo | undefined; + getTypeAtLocation(node: Node): Type | undefined; + getTypeAtLocation(nodes: readonly Node[]): (Type | undefined)[]; + getSignaturesOfType(type: Type, kind: SignatureKind): readonly Signature[]; + getResolvedSignature(node: Node): Signature | undefined; + getTypeAtPosition(file: DocumentIdentifier, position: number): Type | undefined; + getTypeAtPosition(file: DocumentIdentifier, positions: readonly number[]): (Type | undefined)[]; + resolveName(name: string, meaning: SymbolFlags, location?: Node | DocumentPosition, excludeGlobals?: boolean): Symbol | undefined; + getResolvedSymbol(node: Identifier): Symbol | undefined; + getContextualType(node: Expression): Type | undefined; + getBaseTypeOfLiteralType(type: Type): Type | undefined; + getNonNullableType(type: Type): Type | undefined; + getTypeFromTypeNode(node: TypeNode): Type | undefined; + getWidenedType(type: Type): Type | undefined; + getParameterType(signature: Signature, index: number): Type | undefined; + isArrayLikeType(type: Type): boolean; + isTypeAssignableTo(source: Type, target: Type): boolean; + getShorthandAssignmentValueSymbol(node: Node): Symbol | undefined; + /** + * Get the type of a symbol as narrowed at a specific location. Always returns + * a type; for symbols whose type cannot be determined the checker yields the + * error type (use {@link Type.isErrorType} to detect it). + */ + getTypeOfSymbolAtLocation(symbol: Symbol, location: Node): Type; + private getIntrinsicType; + getAnyType(): Type; + getStringType(): Type; + getNumberType(): Type; + getBooleanType(): Type; + getVoidType(): Type; + getUndefinedType(): Type; + getNullType(): Type; + getNeverType(): Type; + getUnknownType(): Type; + getBigIntType(): Type; + getESSymbolType(): Type; + typeToTypeNode(type: Type, enclosingDeclaration?: Node, flags?: number): TypeNode | undefined; + signatureToSignatureDeclaration(signature: Signature, kind: SyntaxKind, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): Node | undefined; + typeToString(type: Type, enclosingDeclaration?: Node, flags?: number): string; + isContextSensitive(node: Node): boolean; + isArrayType(type: Type): boolean; + isTupleType(type: Type): boolean; + getReturnTypeOfSignature(signature: Signature): Type | undefined; + getRestTypeOfSignature(signature: Signature): Type | undefined; + getTypePredicateOfSignature(signature: Signature): TypePredicate | undefined; + /** + * Get the base types of a class or interface type. A type with no base types + * yields an empty array. + */ + getBaseTypes(type: InterfaceType): readonly Type[]; + getApparentType(type: Type): Type | undefined; + getPropertiesOfType(type: Type): readonly Symbol[]; + getIndexInfosOfType(type: Type): readonly IndexInfo[]; + /** + * Get the constraint of a type parameter (the `T` in ``), or + * undefined if it has none. + */ + getConstraintOfTypeParameter(type: TypeParameter): Type | undefined; + getBaseConstraintOfType(type: Type): Type | undefined; + getPropertyOfType(type: Type, name: string): Symbol | undefined; + getConstantValue(node: Node): string | number | undefined; + getSignatureFromDeclaration(node: Node): Signature | undefined; + getExportSpecifierLocalTargetSymbol(node: Node): Symbol | undefined; + /** + * Follow all aliases to get the original symbol. Always returns a symbol; for + * an unresolved alias the checker yields the unknown symbol (use + * {@link Checker.isUnknownSymbol} to detect it). + */ + getAliasedSymbol(symbol: Symbol): Symbol; + getImmediateAliasedSymbol(symbol: Symbol): Symbol | undefined; + /** + * Fetch (once, then cache) the handle ids of the per-checker singleton + * symbols (unknown, undefined, arguments). These ids are stable for the life + * of the project's checker, so identity checks against them are local after + * the first call. + */ + private getWellKnownSymbols; + /** + * Returns `true` if the symbol is the checker's "unknown" symbol (e.g. the + * result of {@link Checker.getAliasedSymbol} on an unresolved alias). + */ + isUnknownSymbol(symbol: Symbol): boolean; + /** + * Returns `true` if the symbol is the checker's "undefined" symbol. + */ + isUndefinedSymbol(symbol: Symbol): boolean; + /** + * Returns `true` if the symbol is the checker's "arguments" symbol. + */ + isArgumentsSymbol(symbol: Symbol): boolean; + getExportsOfModule(symbol: Symbol): readonly Symbol[]; + getMemberInModuleExports(symbol: Symbol, name: string): Symbol | undefined; + getJsDocTagsOfSymbol(symbol: Symbol): readonly JSDocTagInfo[]; + getDocumentationCommentOfSymbol(symbol: Symbol): string; + /** + * Get the type arguments of a type reference (e.g. the `string` in `Array`). + */ + getTypeArguments(type: TypeReference): readonly Type[]; +} +export interface PrintNodeOptions { + preserveSourceNewlines?: boolean | undefined; + neverAsciiEscape?: boolean | undefined; + terminateUnterminatedLiterals?: boolean | undefined; +} +export declare class Emitter { + private client; + constructor(client: Client); + printNode(node: Node, options?: PrintNodeOptions): string; +} +export declare class NodeHandle { + /** + * The project this handle was produced in, used as the default for {@link resolve}. + * Node handles are only meaningful within a project's program, so the producing project + * is remembered so callers don't have to pass it explicitly. + */ + private readonly canonicalProject; + readonly index: number; + readonly kind: SyntaxKind; + readonly path: Path; + constructor(handle: string, canonicalProject: Project); + /** + * Resolve this handle to the actual AST node by fetching the source file from a project + * and looking up the node by index. If no project is passed, the project that produced + * the handle is used. + */ + resolve(project?: Project): Node | undefined; +} +/** A symbol definition paired with all of its reference nodes. */ +export interface ReferencedSymbolEntry { + /** The node handle for the symbol's definition. */ + definition: NodeHandle; + /** The resolved symbol for the definition, if available. */ + symbol?: Symbol | undefined; + /** The node handles for each reference to the symbol. */ + references: NodeHandle[]; +} +/** A single usage of a signature, pairing the reference name with its call expression (if any). */ +export interface SignatureUsage { + /** The node handle for the name reference. */ + name: NodeHandle; + /** The node handle for the call expression, if the reference is invoked. */ + call?: NodeHandle | undefined; +} +export declare class Symbol { + private objectRegistry; + /** + * The project this symbol was first observed in, used as the default project for + * lookups that need a project context (members/exports/parent). Symbols are shared + * snapshot-wide, so these lookups can otherwise be ambiguous about which project to use. + */ + private readonly canonicalProject; + readonly id: number; + /** The escaped (`__String`) name, used as the key in member/export tables. */ + readonly escapedName: __String; + /** The display name (escaped underscores removed). */ + readonly name: string; + readonly flags: SymbolFlags; + readonly checkFlags: number; + readonly declarations: readonly NodeHandle[]; + readonly valueDeclaration: NodeHandle | undefined; + private readonly parent; + private readonly exportSymbol; + private membersCache; + private exportsCache; + constructor(data: SymbolResponse, objectRegistry: SnapshotObjectRegistry); + getParent(): Symbol | undefined; + /** + * Get this symbol's members keyed by escaped name. The result is cached on + * the symbol, so repeated calls do not round-trip to the server. + */ + getMembers(): ReadonlyMap<__String, Symbol>; + /** + * Get this symbol's exports keyed by escaped name. The result is cached on + * the symbol, so repeated calls do not round-trip to the server. + */ + getExports(): ReadonlyMap<__String, Symbol>; + private fetchSymbolTable; + getExportSymbol(): Symbol; + getJsDocTags(checker: Checker): readonly JSDocTagInfo[]; + getDocumentationComment(checker: Checker): string; +} +declare class TypeObject implements Type { + private objectRegistry; + readonly id: number; + readonly flags: TypeFlags; + readonly objectFlags: ObjectFlags; + readonly symbol: number; + readonly value: string | number | boolean | bigint; + readonly intrinsicName: string; + readonly isThisType: boolean; + readonly freshType: number; + readonly regularType: number; + readonly target: number; + readonly typeParameters: readonly number[]; + readonly outerTypeParameters: readonly number[]; + readonly localTypeParameters: readonly number[]; + readonly aliasTypeArguments: readonly number[]; + readonly aliasSymbol: number; + readonly elementFlags: readonly ElementFlags[]; + readonly fixedLength: number; + readonly readonly: boolean; + readonly texts: readonly string[]; + readonly objectType: number; + readonly indexType: number; + readonly checkType: number; + readonly extendsType: number; + readonly baseType: number; + readonly substConstraint: number; + private trueType; + private falseType; + constructor(data: TypeResponse, objectRegistry: ProjectObjectRegistry); + getSymbol(): Symbol | undefined; + getAliasSymbol(): Symbol | undefined; + getTarget(): Type; + getFreshType(): FreshableType | undefined; + getRegularType(): FreshableType | undefined; + getTypes(): readonly Type[] | undefined; + getTypeParameters(): readonly TypeParameter[]; + getOuterTypeParameters(): readonly TypeParameter[]; + getLocalTypeParameters(): readonly TypeParameter[]; + getAliasTypeArguments(): readonly Type[]; + getObjectType(): Type; + getIndexType(): Type; + getCheckType(): Type; + getExtendsType(): Type; + getBaseType(): Type; + getConstraint(): Type; + getTrueType(): Type; + getFalseType(): Type; + /** + * Get the base types of this type. Returns `undefined` for any type that is + * not a class or interface. + */ + getBaseTypes(): readonly Type[] | undefined; + isClassOrInterface(): this is InterfaceType; + isUnionType(): this is UnionType; + isIntersectionType(): this is IntersectionType; + isObjectType(): this is ObjectType; + isIntrinsicType(): this is IntrinsicType; + isErrorType(): boolean; + isLiteralType(): this is LiteralType; + isStringLiteralType(): this is StringLiteralType; + isNumberLiteralType(): this is NumberLiteralType; + isBigIntLiteralType(): this is BigIntLiteralType; + isBooleanLiteralType(): this is BooleanLiteralType; + isTypeReference(): this is TypeReference; + isTupleType(): this is TupleType; + isIndexType(): this is IndexType; + isIndexedAccessType(): this is IndexedAccessType; + isConditionalType(): this is ConditionalType; + isSubstitutionType(): this is SubstitutionType; + isTemplateLiteralType(): this is TemplateLiteralType; + isStringMappingType(): this is StringMappingType; + isTypeParameter(): this is TypeParameter; +} +export declare function isUnionType(type: Type): type is UnionType; +export declare function isIntersectionType(type: Type): type is IntersectionType; +export declare function isObjectType(type: Type): type is ObjectType; +export declare function isClassOrInterfaceType(type: Type): type is InterfaceType; +export declare function isIntrinsicType(type: Type): type is IntrinsicType; +/** + * Whether this is the error type — the placeholder the checker produces when a + * type cannot be determined (e.g. an unresolved reference). It is an intrinsic + * type named `"error"` (this covers both the singleton error type and the + * per-alias error types manufactured for unresolved type alias references). + */ +export declare function isErrorType(type: Type): boolean; +export declare function isLiteralType(type: Type): type is LiteralType; +export declare function isStringLiteralType(type: Type): type is StringLiteralType; +export declare function isNumberLiteralType(type: Type): type is NumberLiteralType; +export declare function isBigIntLiteralType(type: Type): type is BigIntLiteralType; +export declare function isBooleanLiteralType(type: Type): type is BooleanLiteralType; +export declare function isTypeReference(type: Type): type is TypeReference; +export declare function isTupleType(type: Type): type is TupleType; +export declare function isIndexType(type: Type): type is IndexType; +export declare function isIndexedAccessType(type: Type): type is IndexedAccessType; +export declare function isConditionalType(type: Type): type is ConditionalType; +export declare function isSubstitutionType(type: Type): type is SubstitutionType; +export declare function isTemplateLiteralType(type: Type): type is TemplateLiteralType; +export declare function isStringMappingType(type: Type): type is StringMappingType; +export declare function isTypeParameter(type: Type): type is TypeParameter; +export declare class Signature { + private flags; + private objectRegistry; + readonly id: number; + readonly declaration?: NodeHandle | undefined; + readonly typeParameters?: readonly number[] | undefined; + readonly parameters: readonly number[]; + readonly thisParameter?: number | undefined; + readonly target?: number | undefined; + constructor(data: SignatureResponse, project: Project, objectRegistry: ProjectObjectRegistry); + getTypeParameters(): readonly TypeParameter[]; + getParameters(): readonly Symbol[]; + getThisParameter(): Symbol | undefined; + getTarget(): Signature | undefined; + get hasRestParameter(): boolean; + get isConstruct(): boolean; + get isAbstract(): boolean; +} +//# sourceMappingURL=api.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/sync/api.d.ts.map b/node_modules/typescript/dist/api/sync/api.d.ts.map new file mode 100644 index 0000000..578ddf5 --- /dev/null +++ b/node_modules/typescript/dist/api/sync/api.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/api/sync/api.ts"],"names":[],"mappings":";AASA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,gBAAgB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IAAI,eAAe,CAErE;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,gBAAgB,CAEvE;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,mBAAmB,CAE7E;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,iBAAiB,CAEzE;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,aAAa,CAEjE;AAED,qBAAa,SAAS;IAClB,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,cAAc,CAAwB;IAE9C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,WAAW,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAC9C,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IACxD,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5C,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;gBAEzB,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,qBAAqB;IAW5F,iBAAiB,IAAI,SAAS,aAAa,EAAE;IAI7C,aAAa,IAAI,SAAS,MAAM,EAAE;IAIlC,gBAAgB,IAAI,MAAM,GAAG,SAAS;IAItC,SAAS,IAAI,SAAS,GAAG,SAAS;IAIlC,IAAI,gBAAgB,IAAI,OAAO,CAE9B;IAED,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED,IAAI,UAAU,IAAI,OAAO,CAExB;CACJ"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/sync/api.js b/node_modules/typescript/dist/api/sync/api.js new file mode 100644 index 0000000..39a465b --- /dev/null +++ b/node_modules/typescript/dist/api/sync/api.js @@ -0,0 +1,1665 @@ +// +// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +// !!! THIS FILE IS AUTO-GENERATED - DO NOT EDIT !!! +// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +// +// Source: src/api/async/api.ts +// Regenerate: npm run generate (from _packages/native-preview) +// +/// +import { CompletionItemKind } from "#enums/completionItemKind"; +import { DiagnosticCategory } from "#enums/diagnosticCategory"; +import { ElementFlags } from "#enums/elementFlags"; +import { ModuleKind } from "#enums/moduleKind"; +import { NodeBuilderFlags } from "#enums/nodeBuilderFlags"; +import { ObjectFlags } from "#enums/objectFlags"; +import { SignatureFlags } from "#enums/signatureFlags"; +import { SignatureKind } from "#enums/signatureKind"; +import { SymbolFlags } from "#enums/symbolFlags"; +import { TypeFlags } from "#enums/typeFlags"; +import { TypePredicateKind } from "#enums/typePredicateKind"; +import { ModifierFlags, unescapeLeadingUnderscores, } from "../../ast/index.js"; +import { encodeNode, uint8ArrayToBase64, } from "../node/encoder.js"; +import { decodeNode, getNodeId, parseNodeHandle, readParseOptionsKey, readSourceFileHash, RemoteSourceFile, } from "../node/node.js"; +import { Wtf8Decoder } from "../node/wtf8.js"; +import { createGetCanonicalFileName, toPath, } from "../path.js"; +import { resolveFileName, toUpdateSnapshotRequest, } from "../proto.js"; +import { SourceFileCache } from "../sourceFileCache.js"; +import { Client, } from "./client.js"; +export { documentURIToFileName, fileNameToDocumentURI } from "../path.js"; +export { CompletionItemKind, DiagnosticCategory, ElementFlags, ModifierFlags, ModuleKind, NodeBuilderFlags, ObjectFlags, SignatureFlags, SignatureKind, SymbolFlags, TypeFlags, TypePredicateKind }; +export class API { + client; + sourceFileCache; + toPath; + initialized = false; + activeSnapshots = new Set(); + latestSnapshot; + internal; + constructor(options = {}) { + this.client = new Client(options); + this.sourceFileCache = new SourceFileCache(); + this.internal = new InternalAPI(this.client, () => this.ensureInitialized()); + } + /** + * Create an API instance from an existing LSP connection's API session. + * Use this when connecting to an API pipe provided by an LSP server via custom/initializeAPISession. + */ + static fromLSPConnection(options) { + const api = new API(options); + api.ensureInitialized(); + return api; + } + ensureInitialized() { + if (!this.initialized) { + const response = this.client.apiRequest("initialize", null); + const getCanonicalFileName = createGetCanonicalFileName(response.useCaseSensitiveFileNames); + const currentDirectory = response.currentDirectory; + this.toPath = (fileName) => toPath(fileName, currentDirectory, getCanonicalFileName); + this.initialized = true; + } + } + parseConfigFile(file) { + this.ensureInitialized(); + return this.client.apiRequest("parseConfigFile", { file }); + } + updateSnapshot(params) { + this.ensureInitialized(); + const requestParams = toUpdateSnapshotRequest(params); + const data = this.client.apiRequest("updateSnapshot", requestParams); + // Retain cached source files from previous snapshot for unchanged files + if (this.latestSnapshot) { + this.sourceFileCache.retainForSnapshot(data.snapshot, this.latestSnapshot.id, data.changes); + if (this.latestSnapshot.isDisposed()) { + this.sourceFileCache.releaseSnapshot(this.latestSnapshot.id); + } + } + const snapshot = new Snapshot(data, this.client, this.sourceFileCache, this.toPath, () => { + this.activeSnapshots.delete(snapshot); + if (snapshot !== this.latestSnapshot) { + this.sourceFileCache.releaseSnapshot(snapshot.id); + } + }); + this.latestSnapshot = snapshot; + this.activeSnapshots.add(snapshot); + return snapshot; + } + close() { + // Dispose all active snapshots + for (const snapshot of [...this.activeSnapshots]) { + snapshot.dispose(); + } + // Release the latest snapshot's cache refs if still held + if (this.latestSnapshot) { + this.sourceFileCache.releaseSnapshot(this.latestSnapshot.id); + this.latestSnapshot = undefined; + } + this.client.close(); + this.sourceFileCache.clear(); + } + clearSourceFileCache() { + this.sourceFileCache.clear(); + } + /** + * Returns a snapshot of collected timing information for requests made + * through this API instance: client-measured round-trip latency and bytes + * transferred, folded together with the server's own per-request processing + * time and an estimated transport overhead (round-trip minus server time). + * + * Fetching the snapshot issues a lightweight request to the server to + * retrieve its timing collection. Collection must be enabled via the + * `collectTiming` option; when it is not, the returned snapshot has + * `enabled: false` and zeroed totals. + */ + getTimingInfo() { + return this.client.getTimingInfo(); + } + /** Clears all accumulated timing totals and recent-request history, on both the client and the server. */ + resetTimingInfo() { + return this.client.resetTimingInfo(); + } +} +export class InternalAPI { + client; + ensureInitialized; + /** @internal */ + constructor(client, ensureInitialized) { + this.client = client; + this.ensureInitialized = ensureInitialized; + } + startCPUProfile(dir) { + this.ensureInitialized(); + this.client.apiRequest("startCPUProfile", { dir }); + } + stopCPUProfile() { + this.ensureInitialized(); + const result = this.client.apiRequest("stopCPUProfile", null); + return result.file; + } + saveHeapProfile(dir) { + this.ensureInitialized(); + const result = this.client.apiRequest("saveHeapProfile", { dir }); + return result.file; + } +} +export class Snapshot { + id; + projectMap; + toPath; + client; + disposed = false; + onDispose; + snapshotRegistry; + constructor(data, client, sourceFileCache, toPath, onDispose) { + this.id = data.snapshot; + this.client = client; + this.toPath = toPath; + this.onDispose = onDispose; + this.projectMap = new Map(); + this.snapshotRegistry = new SnapshotObjectRegistry(client, this.id, projectId => this.projectMap.get(projectId)); + for (const projData of data.projects) { + const project = new Project(projData, this.id, client, sourceFileCache, toPath, this.snapshotRegistry); + this.projectMap.set(toPath(projData.configFileName), project); + } + } + getProjects() { + this.ensureNotDisposed(); + return [...this.projectMap.values()]; + } + getProject(configFileName) { + this.ensureNotDisposed(); + return this.projectMap.get(this.toPath(configFileName)); + } + getDefaultProjectForFile(file) { + this.ensureNotDisposed(); + const data = this.client.apiRequest("getDefaultProjectForFile", { + snapshot: this.id, + file, + }); + if (!data) + return undefined; + return this.projectMap.get(this.toPath(data.configFileName)); + } + [globalThis.Symbol.dispose]() { + this.dispose(); + } + dispose() { + if (this.disposed) + return; + this.disposed = true; + for (const project of this.projectMap.values()) { + project.dispose(); + } + this.projectMap.clear(); + this.snapshotRegistry.clear(); + this.onDispose(); + this.client.apiRequest("release", { snapshot: this.id }); + } + isDisposed() { + return this.disposed; + } + ensureNotDisposed() { + if (this.disposed) { + throw new Error("Snapshot is disposed"); + } + } +} +class SnapshotObjectRegistry { + symbols = new Map(); + client; + snapshotId; + resolveProject; + constructor(client, snapshotId, resolveProject) { + this.client = client; + this.snapshotId = snapshotId; + this.resolveProject = resolveProject; + } + /** Resolve a project id (a config file path) to its Project within this snapshot. */ + getProject(projectId) { + return this.resolveProject(projectId); + } + getOrCreateSymbol(data) { + let symbol = this.symbols.get(data.id); + if (!symbol) { + symbol = new Symbol(data, this); + this.symbols.set(data.id, symbol); + } + return symbol; + } + getSymbol(id) { + return this.symbols.get(id); + } + clear() { + this.symbols.clear(); + } + fetchSymbol(source, method, handle, projectId) { + if (!handle) + return undefined; + const cached = this.getSymbol(handle); + if (cached) + return cached; + const data = this.client.apiRequest(method, { + snapshot: this.snapshotId, + project: projectId, + objectId: source.id, + }); + if (!data) + throw new Error(`${method} returned null symbol for ${source.constructor.name} ${source.id}`); + return this.getOrCreateSymbol(data); + } + fetchSymbols(source, method, handles, projectId) { + if (handles) { + const result = new Array(handles.length); + let allCached = true; + for (let i = 0; i < handles.length; i++) { + const cached = this.getSymbol(handles[i]); + if (!cached) { + allCached = false; + break; + } + result[i] = cached; + } + if (allCached) + return result; + } + const symbolData = this.client.apiRequest(method, { + snapshot: this.snapshotId, + project: projectId, + objectId: source.id, + }); + if (symbolData == null) + return []; + else + return symbolData.map(data => this.getOrCreateSymbol(data)); + } +} +class ProjectObjectRegistry { + client; + snapshotId; + project; + snapshotRegistry; + types = new Map(); + signatures = new Map(); + constructor(client, snapshotId, project, snapshotRegistry) { + this.client = client; + this.snapshotId = snapshotId; + this.project = project; + this.snapshotRegistry = snapshotRegistry; + } + getOrCreateSymbol(data) { + return this.snapshotRegistry.getOrCreateSymbol(data); + } + getSymbol(id) { + return this.snapshotRegistry.getSymbol(id); + } + getOrCreateType(data) { + let type = this.types.get(data.id); + if (!type) { + type = new TypeObject(data, this); + this.types.set(data.id, type); + } + return type; + } + getType(id) { + return this.types.get(id); + } + getOrCreateSignature(data) { + let sig = this.signatures.get(data.id); + if (!sig) { + sig = new Signature(data, this.project, this); + this.signatures.set(data.id, sig); + } + return sig; + } + getSignature(id) { + return this.signatures.get(id); + } + clear() { + this.types.clear(); + this.signatures.clear(); + } + fetchType(source, method, handle) { + if (handle !== false) { + if (!handle) + return undefined; + const cached = this.getType(handle); + if (cached) + return cached; + } + const data = this.client.apiRequest(method, { + snapshot: this.snapshotId, + project: this.project.id, + objectId: source.id, + }); + if (!data) + throw new Error(`${method} returned null type for ${source.constructor.name} ${source.id}`); + return this.getOrCreateType(data); + } + fetchSymbol(source, method, handle) { + return this.snapshotRegistry.fetchSymbol(source, method, handle, this.project.id); + } + fetchSignature(source, method, handle) { + if (!handle) + return undefined; + const cached = this.getSignature(handle); + if (cached) + return cached; + const data = this.client.apiRequest(method, { + snapshot: this.snapshotId, + project: this.project.id, + objectId: source.id, + }); + if (!data) + throw new Error(`${method} returned null signature for ${source.constructor.name} ${source.id}`); + return this.getOrCreateSignature(data); + } + fetchTypes(source, method, handles) { + if (handles) { + const result = new Array(handles.length); + let allCached = true; + for (let i = 0; i < handles.length; i++) { + const cached = this.getType(handles[i]); + if (!cached) { + allCached = false; + break; + } + result[i] = cached; + } + if (allCached) + return result; + } + const typesData = this.client.apiRequest(method, { + snapshot: this.snapshotId, + project: this.project.id, + objectId: source.id, + }); + if (typesData == null) + return []; + else + return typesData.map(data => this.getOrCreateType(data)); + } + fetchSymbols(source, method, handles) { + return this.snapshotRegistry.fetchSymbols(source, method, handles, this.project.id); + } + // getBaseTypes is a checker-level endpoint keyed by `type` (not `objectId`), + // so it cannot go through fetchTypes. This helper reuses that server method. + fetchBaseTypes(source) { + const typesData = this.client.apiRequest("getBaseTypes", { + snapshot: this.snapshotId, + project: this.project.id, + type: source.id, + }); + if (typesData == null) + return []; + return typesData.map(data => this.getOrCreateType(data)); + } +} +export class Project { + id; + configFileName; + compilerOptions; + rootFiles; + program; + checker; + emitter; + client; + constructor(data, snapshotId, client, sourceFileCache, toPath, snapshotRegistry) { + this.id = data.id; + this.configFileName = data.configFileName; + this.compilerOptions = data.compilerOptions; + this.rootFiles = data.rootFiles; + this.client = client; + this.program = new Program(snapshotId, this, client, sourceFileCache, toPath); + const objectRegistry = new ProjectObjectRegistry(client, snapshotId, this, snapshotRegistry); + this.checker = new Checker(snapshotId, this, client, objectRegistry); + this.emitter = new Emitter(client); + } + dispose() { + this.checker.dispose(); + } +} +export class Program { + snapshotId; + project; + client; + sourceFileCache; + toPath; + decoder = new Wtf8Decoder(); + sourceFileMetadataCache = new Map(); + constructor(snapshotId, project, client, sourceFileCache, toPath) { + this.snapshotId = snapshotId; + this.project = project; + this.client = client; + this.sourceFileCache = sourceFileCache; + this.toPath = toPath; + } + getCompilerOptions() { + return this.project.compilerOptions; + } + getSourceFile(file) { + const fileName = resolveFileName(file); + const path = this.toPath(fileName); + // Check if we already have a retained cache entry for this (snapshot, project) pair + const retained = this.sourceFileCache.getRetained(path, this.snapshotId, this.project.id); + if (retained) { + return retained; + } + // Fetch from server + const binaryData = this.client.apiRequestBinary("getSourceFile", { + snapshot: this.snapshotId, + project: this.project.id, + file, + }); + if (!binaryData) { + return undefined; + } + const view = new DataView(binaryData.buffer, binaryData.byteOffset, binaryData.byteLength); + const contentHash = readSourceFileHash(view); + const parseOptionsKey = readParseOptionsKey(view); + // Create a new RemoteSourceFile and cache it (set returns existing if hash matches) + const sourceFile = new RemoteSourceFile(binaryData, this.decoder, this.client.getTimingCollector()); + return this.sourceFileCache.set(path, sourceFile, parseOptionsKey, contentHash, this.snapshotId, this.project.id); + } + getSourceFileNames() { + const data = this.client.apiRequest("getSourceFileNames", { + snapshot: this.snapshotId, + project: this.project.id, + }); + return data ?? []; + } + /** + * Returns program-stored metadata for the given source file, or `undefined` if the file + * is not part of the program. Metadata is fetched lazily per file and cached on this + * `Program` instance. + */ + getSourceFileMetadata(fileName) { + return this.getSourceFileMetadataByPath(this.toPath(fileName)); + } + /** + * Returns program-stored metadata for the source file at the given path, or `undefined` + * if the file is not part of the program. Like {@link getSourceFileMetadata}, but skips + * the file name to path conversion. Metadata is fetched lazily per file and cached on + * this `Program` instance. + */ + getSourceFileMetadataByPath(path) { + let metadata = this.sourceFileMetadataCache.get(path); + if (metadata === undefined) { + metadata = this.fetchSourceFileMetadata(path); + this.sourceFileMetadataCache.set(path, metadata); + } + return metadata; + } + fetchSourceFileMetadata(path) { + const data = this.client.apiRequest("getSourceFileMetadata", { + snapshot: this.snapshotId, + project: this.project.id, + file: path, + }); + return data ?? undefined; + } + /** + * Returns whether the given source file was loaded as part of an external library + * (e.g. a dependency resolved from `node_modules`). The underlying program metadata is + * fetched lazily per file and cached on this `Program` instance. + */ + isSourceFileFromExternalLibrary(file) { + const metadata = this.getSourceFileMetadataByPath(file.path); + return metadata?.isFromExternalLibrary ?? false; + } + /** + * Returns whether the given source file is a default library file (e.g. `lib.d.ts`). + * The underlying program metadata is fetched lazily per file and cached on this + * `Program` instance. + */ + isSourceFileDefaultLibrary(file) { + const metadata = this.getSourceFileMetadataByPath(file.path); + return metadata?.isDefaultLibrary ?? false; + } + /** + * Get syntactic (parse) diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + getSyntacticDiagnostics(file) { + const data = this.client.apiRequest("getSyntacticDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + ...(file !== undefined ? { file } : {}), + }); + return data ?? []; + } + /** + * Get binder diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + getBindDiagnostics(file) { + const data = this.client.apiRequest("getBindDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + ...(file !== undefined ? { file } : {}), + }); + return data ?? []; + } + /** + * Get semantic (type-check) diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + getSemanticDiagnostics(file) { + const data = this.client.apiRequest("getSemanticDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + ...(file !== undefined ? { file } : {}), + }); + return data ?? []; + } + /** + * Get suggestion diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + getSuggestionDiagnostics(file) { + const data = this.client.apiRequest("getSuggestionDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + ...(file !== undefined ? { file } : {}), + }); + return data ?? []; + } + /** + * Get declaration emit diagnostics for a specific file or all files. + * @param file - Optional file to get diagnostics for. If omitted, returns diagnostics for all files. + */ + getDeclarationDiagnostics(file) { + const data = this.client.apiRequest("getDeclarationDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + ...(file !== undefined ? { file } : {}), + }); + return data ?? []; + } + /** + * Get program-wide diagnostics for the project, including compiler options diagnostics. + */ + getProgramDiagnostics() { + const data = this.client.apiRequest("getProgramDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + }); + return data ?? []; + } + /** + * Get global (non-file-specific) semantic diagnostics for the project. + */ + getGlobalDiagnostics() { + const data = this.client.apiRequest("getGlobalDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + }); + return data ?? []; + } + /** + * Get config file parsing diagnostics for the project. + */ + getConfigFileParsingDiagnostics() { + const data = this.client.apiRequest("getConfigFileParsingDiagnostics", { + snapshot: this.snapshotId, + project: this.project.id, + }); + return data ?? []; + } +} +export class Checker { + snapshotId; + project; + client; + objectRegistry; + wellKnownSymbols; + constructor(snapshotId, project, client, objectRegistry) { + this.snapshotId = snapshotId; + this.project = project; + this.client = client; + this.objectRegistry = objectRegistry; + } + dispose() { + this.objectRegistry.clear(); + } + getSymbolAtLocation(nodeOrNodes) { + if (Array.isArray(nodeOrNodes)) { + const data = this.client.apiRequest("getSymbolsAtLocations", { + snapshot: this.snapshotId, + project: this.project.id, + locations: nodeOrNodes.map(node => getNodeId(node)), + }); + return data.map(d => d ? this.objectRegistry.getOrCreateSymbol(d) : undefined); + } + const data = this.client.apiRequest("getSymbolAtLocation", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(nodeOrNodes), + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + getSymbolAtPosition(file, positionOrPositions) { + if (typeof positionOrPositions === "number") { + const data = this.client.apiRequest("getSymbolAtPosition", { + snapshot: this.snapshotId, + project: this.project.id, + file, + position: positionOrPositions, + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + const data = this.client.apiRequest("getSymbolsAtPositions", { + snapshot: this.snapshotId, + project: this.project.id, + file, + positions: positionOrPositions, + }); + return data.map(d => d ? this.objectRegistry.getOrCreateSymbol(d) : undefined); + } + getTypeOfSymbol(symbolOrSymbols) { + if (Array.isArray(symbolOrSymbols)) { + const data = this.client.apiRequest("getTypesOfSymbols", { + snapshot: this.snapshotId, + project: this.project.id, + symbols: symbolOrSymbols.map(s => s.id), + }); + return data.map(d => d ? this.objectRegistry.getOrCreateType(d) : undefined); + } + const data = this.client.apiRequest("getTypeOfSymbol", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbolOrSymbols.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + /** + * Get the declared type of a symbol. Always returns a type; for symbols whose + * declared type cannot be determined the checker yields the error type (use + * {@link Type.isErrorType} to detect it). + */ + getDeclaredTypeOfSymbol(symbol) { + const data = this.client.apiRequest("getDeclaredTypeOfSymbol", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + }); + if (!data) + throw new Error(`getDeclaredTypeOfSymbol returned no type for symbol ${symbol.id}`); + return this.objectRegistry.getOrCreateType(data); + } + getReferencesToSymbolInFile(file, symbol) { + const data = this.client.apiRequest("getReferencesToSymbolInFile", { + snapshot: this.snapshotId, + project: this.project.id, + file, + symbol: symbol.id, + }); + return (data ?? []).map(h => new NodeHandle(h, this.project)); + } + getReferencedSymbolsForNode(node, position) { + const data = this.client.apiRequest("getReferencedSymbolsForNode", { + snapshot: this.snapshotId, + project: this.project.id, + node: getNodeId(node), + position, + }); + return (data ?? []).map(entry => ({ + definition: new NodeHandle(entry.definition, this.project), + symbol: entry.symbol ? this.objectRegistry.getOrCreateSymbol(entry.symbol) : undefined, + references: (entry.references ?? []).map(h => new NodeHandle(h, this.project)), + })); + } + getSignatureUsage(signatureDecl) { + const data = this.client.apiRequest("getSignatureUsages", { + snapshot: this.snapshotId, + project: this.project.id, + signatureDecl: getNodeId(signatureDecl), + }); + return (data ?? []).map(entry => ({ + name: new NodeHandle(entry.name, this.project), + call: entry.call ? new NodeHandle(entry.call, this.project) : undefined, + })); + } + getCompletionsAtPosition(document, position, options) { + const data = this.client.apiRequest("getCompletionsAtPosition", { + snapshot: this.snapshotId, + project: this.project.id, + file: document, + position, + triggerCharacter: options?.triggerCharacter, + includeSymbol: options?.includeSymbol, + }); + if (!data) + return undefined; + return { + isIncomplete: data.isIncomplete, + entries: data.entries.map(e => ({ + ...e, + symbol: e.symbol ? this.objectRegistry.getOrCreateSymbol(e.symbol) : undefined, + })), + }; + } + getTypeAtLocation(nodeOrNodes) { + if (Array.isArray(nodeOrNodes)) { + const data = this.client.apiRequest("getTypeAtLocations", { + snapshot: this.snapshotId, + project: this.project.id, + locations: nodeOrNodes.map(node => getNodeId(node)), + }); + return data.map(d => d ? this.objectRegistry.getOrCreateType(d) : undefined); + } + const data = this.client.apiRequest("getTypeAtLocation", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(nodeOrNodes), + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + getSignaturesOfType(type, kind) { + const data = this.client.apiRequest("getSignaturesOfType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + kind, + }); + return data.map(d => this.objectRegistry.getOrCreateSignature(d)); + } + getResolvedSignature(node) { + const data = this.client.apiRequest("getResolvedSignature", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + return data ? this.objectRegistry.getOrCreateSignature(data) : undefined; + } + getTypeAtPosition(file, positionOrPositions) { + if (typeof positionOrPositions === "number") { + const data = this.client.apiRequest("getTypeAtPosition", { + snapshot: this.snapshotId, + project: this.project.id, + file, + position: positionOrPositions, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + const data = this.client.apiRequest("getTypesAtPositions", { + snapshot: this.snapshotId, + project: this.project.id, + file, + positions: positionOrPositions, + }); + return data.map(d => d ? this.objectRegistry.getOrCreateType(d) : undefined); + } + resolveName(name, meaning, location, excludeGlobals) { + // Distinguish Node (has `kind`) from DocumentPosition (has `document` and `position`) + const isNode = location && "kind" in location; + const data = this.client.apiRequest("resolveName", { + snapshot: this.snapshotId, + project: this.project.id, + name, + meaning, + location: isNode ? getNodeId(location) : undefined, + file: !isNode && location ? location.document : undefined, + position: !isNode && location ? location.position : undefined, + excludeGlobals, + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + getResolvedSymbol(node) { + const text = node.text; + if (!text) + return undefined; + return this.resolveName(text, SymbolFlags.Value | SymbolFlags.ExportValue, node); + } + getContextualType(node) { + const data = this.client.apiRequest("getContextualType", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + getBaseTypeOfLiteralType(type) { + const data = this.client.apiRequest("getBaseTypeOfLiteralType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + getNonNullableType(type) { + const data = this.client.apiRequest("getNonNullableType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + getTypeFromTypeNode(node) { + const data = this.client.apiRequest("getTypeFromTypeNode", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + getWidenedType(type) { + const data = this.client.apiRequest("getWidenedType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + getParameterType(signature, index) { + const data = this.client.apiRequest("getParameterType", { + snapshot: this.snapshotId, + project: this.project.id, + signature: signature.id, + index, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + isArrayLikeType(type) { + return this.client.apiRequest("isArrayLikeType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + } + isTypeAssignableTo(source, target) { + return this.client.apiRequest("isTypeAssignableTo", { + snapshot: this.snapshotId, + project: this.project.id, + source: source.id, + target: target.id, + }); + } + getShorthandAssignmentValueSymbol(node) { + const data = this.client.apiRequest("getShorthandAssignmentValueSymbol", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + /** + * Get the type of a symbol as narrowed at a specific location. Always returns + * a type; for symbols whose type cannot be determined the checker yields the + * error type (use {@link Type.isErrorType} to detect it). + */ + getTypeOfSymbolAtLocation(symbol, location) { + const data = this.client.apiRequest("getTypeOfSymbolAtLocation", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + location: getNodeId(location), + }); + if (!data) + throw new Error(`getTypeOfSymbolAtLocation returned no type for symbol ${symbol.id}`); + return this.objectRegistry.getOrCreateType(data); + } + getIntrinsicType(method) { + const data = this.client.apiRequest(method, { + snapshot: this.snapshotId, + project: this.project.id, + }); + return this.objectRegistry.getOrCreateType(data); + } + getAnyType() { + return this.getIntrinsicType("getAnyType"); + } + getStringType() { + return this.getIntrinsicType("getStringType"); + } + getNumberType() { + return this.getIntrinsicType("getNumberType"); + } + getBooleanType() { + return this.getIntrinsicType("getBooleanType"); + } + getVoidType() { + return this.getIntrinsicType("getVoidType"); + } + getUndefinedType() { + return this.getIntrinsicType("getUndefinedType"); + } + getNullType() { + return this.getIntrinsicType("getNullType"); + } + getNeverType() { + return this.getIntrinsicType("getNeverType"); + } + getUnknownType() { + return this.getIntrinsicType("getUnknownType"); + } + getBigIntType() { + return this.getIntrinsicType("getBigIntType"); + } + getESSymbolType() { + return this.getIntrinsicType("getESSymbolType"); + } + typeToTypeNode(type, enclosingDeclaration, flags) { + const binaryData = this.client.apiRequestBinary("typeToTypeNode", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + location: enclosingDeclaration ? getNodeId(enclosingDeclaration) : undefined, + flags, + }); + if (!binaryData) + return undefined; + return decodeNode(binaryData); + } + signatureToSignatureDeclaration(signature, kind, enclosingDeclaration, flags) { + const binaryData = this.client.apiRequestBinary("signatureToSignatureDeclaration", { + snapshot: this.snapshotId, + project: this.project.id, + signature: signature.id, + kind, + location: enclosingDeclaration ? getNodeId(enclosingDeclaration) : undefined, + flags, + }); + if (!binaryData) + return undefined; + return decodeNode(binaryData); + } + typeToString(type, enclosingDeclaration, flags) { + return this.client.apiRequest("typeToString", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + location: enclosingDeclaration ? getNodeId(enclosingDeclaration) : undefined, + flags, + }); + } + isContextSensitive(node) { + return this.client.apiRequest("isContextSensitive", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + } + isArrayType(type) { + return this.client.apiRequest("isArrayType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + } + isTupleType(type) { + return this.client.apiRequest("isTupleType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + } + getReturnTypeOfSignature(signature) { + const data = this.client.apiRequest("getReturnTypeOfSignature", { + snapshot: this.snapshotId, + project: this.project.id, + signature: signature.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + getRestTypeOfSignature(signature) { + const data = this.client.apiRequest("getRestTypeOfSignature", { + snapshot: this.snapshotId, + project: this.project.id, + signature: signature.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + getTypePredicateOfSignature(signature) { + const data = this.client.apiRequest("getTypePredicateOfSignature", { + snapshot: this.snapshotId, + project: this.project.id, + signature: signature.id, + }); + if (!data) + return undefined; + return { + kind: data.kind, + parameterIndex: data.parameterIndex, + parameterName: data.parameterName, + type: data.type ? this.objectRegistry.getOrCreateType(data.type) : undefined, + }; + } + /** + * Get the base types of a class or interface type. A type with no base types + * yields an empty array. + */ + getBaseTypes(type) { + const data = this.client.apiRequest("getBaseTypes", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? data.map(d => this.objectRegistry.getOrCreateType(d)) : []; + } + getApparentType(type) { + const data = this.client.apiRequest("getApparentType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + getPropertiesOfType(type) { + const data = this.client.apiRequest("getPropertiesOfType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? data.map(d => this.objectRegistry.getOrCreateSymbol(d)) : []; + } + getIndexInfosOfType(type) { + const data = this.client.apiRequest("getIndexInfosOfType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + if (!data) + return []; + return data.map(d => ({ + keyType: this.objectRegistry.getOrCreateType(d.keyType), + valueType: this.objectRegistry.getOrCreateType(d.valueType), + isReadonly: d.isReadonly ?? false, + declaration: d.declaration ? new NodeHandle(d.declaration, this.project) : undefined, + })); + } + /** + * Get the constraint of a type parameter (the `T` in ``), or + * undefined if it has none. + */ + getConstraintOfTypeParameter(type) { + const data = this.client.apiRequest("getConstraintOfTypeParameter", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + getBaseConstraintOfType(type) { + const data = this.client.apiRequest("getBaseConstraintOfType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? this.objectRegistry.getOrCreateType(data) : undefined; + } + getPropertyOfType(type, name) { + const data = this.client.apiRequest("getPropertyOfType", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + name, + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + getConstantValue(node) { + const data = this.client.apiRequest("getConstantValue", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + return data ?? undefined; + } + getSignatureFromDeclaration(node) { + const data = this.client.apiRequest("getSignatureFromDeclaration", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + return data ? this.objectRegistry.getOrCreateSignature(data) : undefined; + } + getExportSpecifierLocalTargetSymbol(node) { + const data = this.client.apiRequest("getExportSpecifierLocalTargetSymbol", { + snapshot: this.snapshotId, + project: this.project.id, + location: getNodeId(node), + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + /** + * Follow all aliases to get the original symbol. Always returns a symbol; for + * an unresolved alias the checker yields the unknown symbol (use + * {@link Checker.isUnknownSymbol} to detect it). + */ + getAliasedSymbol(symbol) { + const data = this.client.apiRequest("getAliasedSymbol", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + }); + if (!data) + throw new Error(`getAliasedSymbol returned no symbol for symbol ${symbol.id}`); + return this.objectRegistry.getOrCreateSymbol(data); + } + getImmediateAliasedSymbol(symbol) { + const data = this.client.apiRequest("getImmediateAliasedSymbol", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + /** + * Fetch (once, then cache) the handle ids of the per-checker singleton + * symbols (unknown, undefined, arguments). These ids are stable for the life + * of the project's checker, so identity checks against them are local after + * the first call. + */ + getWellKnownSymbols() { + return this.wellKnownSymbols ??= this.client.apiRequest("getWellKnownSymbols", { + snapshot: this.snapshotId, + project: this.project.id, + }); + } + /** + * Returns `true` if the symbol is the checker's "unknown" symbol (e.g. the + * result of {@link Checker.getAliasedSymbol} on an unresolved alias). + */ + isUnknownSymbol(symbol) { + return symbol.id === (this.getWellKnownSymbols()).unknown; + } + /** + * Returns `true` if the symbol is the checker's "undefined" symbol. + */ + isUndefinedSymbol(symbol) { + return symbol.id === (this.getWellKnownSymbols()).undefined; + } + /** + * Returns `true` if the symbol is the checker's "arguments" symbol. + */ + isArgumentsSymbol(symbol) { + return symbol.id === (this.getWellKnownSymbols()).arguments; + } + getExportsOfModule(symbol) { + const data = this.client.apiRequest("getExportsOfModule", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + }); + return data ? data.map(d => this.objectRegistry.getOrCreateSymbol(d)) : []; + } + getMemberInModuleExports(symbol, name) { + const data = this.client.apiRequest("getMemberInModuleExports", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + name, + }); + return data ? this.objectRegistry.getOrCreateSymbol(data) : undefined; + } + getJsDocTagsOfSymbol(symbol) { + const data = this.client.apiRequest("getJsDocTags", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + }); + return data ?? []; + } + getDocumentationCommentOfSymbol(symbol) { + return this.client.apiRequest("getDocumentationComment", { + snapshot: this.snapshotId, + project: this.project.id, + symbol: symbol.id, + }); + } + /** + * Get the type arguments of a type reference (e.g. the `string` in `Array`). + */ + getTypeArguments(type) { + const data = this.client.apiRequest("getTypeArguments", { + snapshot: this.snapshotId, + project: this.project.id, + type: type.id, + }); + return data ? data.map(d => this.objectRegistry.getOrCreateType(d)) : []; + } +} +export class Emitter { + client; + constructor(client) { + this.client = client; + } + printNode(node, options = {}) { + const encoded = encodeNode(node); + const base64 = uint8ArrayToBase64(encoded); + return this.client.apiRequest("printNode", { + data: base64, + ...options, + }); + } +} +export class NodeHandle { + /** + * The project this handle was produced in, used as the default for {@link resolve}. + * Node handles are only meaningful within a project's program, so the producing project + * is remembered so callers don't have to pass it explicitly. + */ + canonicalProject; + index; + kind; + path; + constructor(handle, canonicalProject) { + const parsed = parseNodeHandle(handle); + this.index = parsed.index; + this.kind = parsed.kind; + this.path = parsed.path; + this.canonicalProject = canonicalProject; + } + /** + * Resolve this handle to the actual AST node by fetching the source file from a project + * and looking up the node by index. If no project is passed, the project that produced + * the handle is used. + */ + resolve(project = this.canonicalProject) { + const sourceFile = project.program.getSourceFile(this.path); + if (!sourceFile) { + return undefined; + } + return sourceFile.getOrCreateNodeAtIndex(this.index); + } +} +export class Symbol { + objectRegistry; + /** + * The project this symbol was first observed in, used as the default project for + * lookups that need a project context (members/exports/parent). Symbols are shared + * snapshot-wide, so these lookups can otherwise be ambiguous about which project to use. + */ + canonicalProject; + id; + /** The escaped (`__String`) name, used as the key in member/export tables. */ + escapedName; + /** The display name (escaped underscores removed). */ + name; + flags; + checkFlags; + declarations; + valueDeclaration; + parent; + exportSymbol; + membersCache; + exportsCache; + constructor(data, objectRegistry) { + this.objectRegistry = objectRegistry; + this.id = data.id; + this.escapedName = data.name; + this.name = unescapeLeadingUnderscores(data.name); + this.flags = data.flags; + this.checkFlags = data.checkFlags; + const canonicalProject = objectRegistry.getProject(data.project); + if (!canonicalProject) { + throw new Error(`Symbol ${data.id} references unknown canonical project '${data.project}'`); + } + this.canonicalProject = canonicalProject; + this.declarations = (data.declarations ?? []).map(d => new NodeHandle(d, canonicalProject)); + this.valueDeclaration = data.valueDeclaration ? new NodeHandle(data.valueDeclaration, canonicalProject) : undefined; + if (data.parent !== undefined) + this.parent = data.parent; + if (data.exportSymbol !== undefined) + this.exportSymbol = data.exportSymbol; + } + getParent() { + return this.objectRegistry.fetchSymbol(this, "getParentOfSymbol", this.parent, this.canonicalProject.id); + } + /** + * Get this symbol's members keyed by escaped name. The result is cached on + * the symbol, so repeated calls do not round-trip to the server. + */ + getMembers() { + return this.membersCache ??= this.fetchSymbolTable("getMembersOfSymbol"); + } + /** + * Get this symbol's exports keyed by escaped name. The result is cached on + * the symbol, so repeated calls do not round-trip to the server. + */ + getExports() { + return this.exportsCache ??= this.fetchSymbolTable("getExportsOfSymbol"); + } + fetchSymbolTable(method) { + const symbols = this.objectRegistry.fetchSymbols(this, method, undefined, this.canonicalProject.id); + const table = new Map(); + for (const symbol of symbols) { + table.set(symbol.escapedName, symbol); + } + return table; + } + getExportSymbol() { + if (!this.exportSymbol) + return this; + return this.objectRegistry.fetchSymbol(this, "getExportSymbolOfSymbol", this.exportSymbol, this.canonicalProject.id); + } + getJsDocTags(checker) { + return checker.getJsDocTagsOfSymbol(this); + } + getDocumentationComment(checker) { + return checker.getDocumentationCommentOfSymbol(this); + } +} +class TypeObject { + objectRegistry; + id; + flags; + objectFlags; + symbol; + value; + intrinsicName; + isThisType; + freshType; + regularType; + target; + typeParameters; + outerTypeParameters; + localTypeParameters; + aliasTypeArguments; + aliasSymbol; + elementFlags; + fixedLength; + readonly; + texts; + objectType; + indexType; + checkType; + extendsType; + baseType; + substConstraint; + trueType; // false if not yet loaded + falseType; // false if not yet loaded + constructor(data, objectRegistry) { + this.objectRegistry = objectRegistry; + this.id = data.id; + this.flags = data.flags; + if (data.objectFlags !== undefined) + this.objectFlags = data.objectFlags; + if (data.symbol !== undefined) + this.symbol = data.symbol; + if (data.value != null) { + // BigInt literal values are serialized as decimal strings (e.g. "-123") because + // JSON cannot represent bigint. Decode them back into a real bigint here. + this.value = (data.flags & TypeFlags.BigIntLiteral) ? BigInt(data.value) : data.value; + } + if (data.intrinsicName !== undefined) + this.intrinsicName = data.intrinsicName; + if (data.isThisType !== undefined) + this.isThisType = data.isThisType; + if (data.freshType !== undefined) + this.freshType = data.freshType; + if (data.regularType !== undefined) + this.regularType = data.regularType; + if (data.target !== undefined) + this.target = data.target; + this.typeParameters = data.typeParameters ?? []; + this.outerTypeParameters = data.outerTypeParameters ?? []; + this.localTypeParameters = data.localTypeParameters ?? []; + this.aliasTypeArguments = data.aliasTypeArguments ?? []; + if (data.aliasSymbol !== undefined) + this.aliasSymbol = data.aliasSymbol; + if (data.elementFlags !== undefined) + this.elementFlags = data.elementFlags; + if (data.fixedLength !== undefined) + this.fixedLength = data.fixedLength; + if (data.readonly !== undefined) + this.readonly = data.readonly; + if (data.texts !== undefined) + this.texts = data.texts; + if (data.objectType !== undefined) + this.objectType = data.objectType; + if (data.indexType !== undefined) + this.indexType = data.indexType; + if (data.checkType !== undefined) + this.checkType = data.checkType; + if (data.extendsType !== undefined) + this.extendsType = data.extendsType; + if (data.baseType !== undefined) + this.baseType = data.baseType; + if (data.substConstraint !== undefined) + this.substConstraint = data.substConstraint; + this.trueType = false; + this.falseType = false; + } + getSymbol() { + return this.objectRegistry.fetchSymbol(this, "getSymbolOfType", this.symbol); + } + getAliasSymbol() { + return this.objectRegistry.fetchSymbol(this, "getAliasSymbolOfType", this.aliasSymbol); + } + getTarget() { + return this.objectRegistry.fetchType(this, "getTargetOfType", this.target); + } + getFreshType() { + return this.objectRegistry.fetchType(this, "getFreshTypeOfType", this.freshType); + } + getRegularType() { + return this.objectRegistry.fetchType(this, "getRegularTypeOfType", this.regularType); + } + getTypes() { + // Only union, intersection, and template literal types have constituent + // types; any other kind has none, so return undefined rather than sending + // a request the server cannot satisfy. + if (!(this.flags & (TypeFlags.UnionOrIntersection | TypeFlags.TemplateLiteral))) { + return undefined; + } + return this.objectRegistry.fetchTypes(this, "getTypesOfType"); + } + getTypeParameters() { + return this.objectRegistry.fetchTypes(this, "getTypeParametersOfType", this.typeParameters); + } + getOuterTypeParameters() { + return this.objectRegistry.fetchTypes(this, "getOuterTypeParametersOfType", this.outerTypeParameters); + } + getLocalTypeParameters() { + return this.objectRegistry.fetchTypes(this, "getLocalTypeParametersOfType", this.localTypeParameters); + } + getAliasTypeArguments() { + return this.objectRegistry.fetchTypes(this, "getAliasTypeArgumentsOfType", this.aliasTypeArguments); + } + getObjectType() { + return this.objectRegistry.fetchType(this, "getObjectTypeOfType", this.objectType); + } + getIndexType() { + return this.objectRegistry.fetchType(this, "getIndexTypeOfType", this.indexType); + } + getCheckType() { + return this.objectRegistry.fetchType(this, "getCheckTypeOfType", this.checkType); + } + getExtendsType() { + return this.objectRegistry.fetchType(this, "getExtendsTypeOfType", this.extendsType); + } + getBaseType() { + return this.objectRegistry.fetchType(this, "getBaseTypeOfType", this.baseType); + } + getConstraint() { + return this.objectRegistry.fetchType(this, "getConstraintOfType", this.substConstraint); + } + getTrueType() { + const result = this.objectRegistry.fetchType(this, "getTrueTypeOfConditionalType", this.trueType); + this.trueType = result.id; + return result; + } + getFalseType() { + const result = this.objectRegistry.fetchType(this, "getFalseTypeOfConditionalType", this.falseType); + this.falseType = result.id; + return result; + } + /** + * Get the base types of this type. Returns `undefined` for any type that is + * not a class or interface. + */ + getBaseTypes() { + if (!this.isClassOrInterface()) { + return undefined; + } + return this.objectRegistry.fetchBaseTypes(this); + } + isClassOrInterface() { + return isClassOrInterfaceType(this); + } + isUnionType() { + return isUnionType(this); + } + isIntersectionType() { + return isIntersectionType(this); + } + isObjectType() { + return isObjectType(this); + } + isIntrinsicType() { + return isIntrinsicType(this); + } + isErrorType() { + return isErrorType(this); + } + isLiteralType() { + return isLiteralType(this); + } + isStringLiteralType() { + return isStringLiteralType(this); + } + isNumberLiteralType() { + return isNumberLiteralType(this); + } + isBigIntLiteralType() { + return isBigIntLiteralType(this); + } + isBooleanLiteralType() { + return isBooleanLiteralType(this); + } + isTypeReference() { + return isTypeReference(this); + } + isTupleType() { + return isTupleType(this); + } + isIndexType() { + return isIndexType(this); + } + isIndexedAccessType() { + return isIndexedAccessType(this); + } + isConditionalType() { + return isConditionalType(this); + } + isSubstitutionType() { + return isSubstitutionType(this); + } + isTemplateLiteralType() { + return isTemplateLiteralType(this); + } + isStringMappingType() { + return isStringMappingType(this); + } + isTypeParameter() { + return isTypeParameter(this); + } +} +export function isUnionType(type) { + return (type.flags & TypeFlags.Union) !== 0; +} +export function isIntersectionType(type) { + return (type.flags & TypeFlags.Intersection) !== 0; +} +export function isObjectType(type) { + return (type.flags & TypeFlags.Object) !== 0; +} +export function isClassOrInterfaceType(type) { + return isObjectType(type) && (type.objectFlags & ObjectFlags.ClassOrInterface) !== 0; +} +export function isIntrinsicType(type) { + return (type.flags & TypeFlags.Intrinsic) !== 0; +} +/** + * Whether this is the error type — the placeholder the checker produces when a + * type cannot be determined (e.g. an unresolved reference). It is an intrinsic + * type named `"error"` (this covers both the singleton error type and the + * per-alias error types manufactured for unresolved type alias references). + */ +export function isErrorType(type) { + return isIntrinsicType(type) && type.intrinsicName === "error"; +} +export function isLiteralType(type) { + return (type.flags & TypeFlags.Literal) !== 0; +} +export function isStringLiteralType(type) { + return (type.flags & TypeFlags.StringLiteral) !== 0; +} +export function isNumberLiteralType(type) { + return (type.flags & TypeFlags.NumberLiteral) !== 0; +} +export function isBigIntLiteralType(type) { + return (type.flags & TypeFlags.BigIntLiteral) !== 0; +} +export function isBooleanLiteralType(type) { + return (type.flags & TypeFlags.BooleanLiteral) !== 0; +} +export function isTypeReference(type) { + return isObjectType(type) && (type.objectFlags & ObjectFlags.Reference) !== 0; +} +export function isTupleType(type) { + return isObjectType(type) && (type.objectFlags & ObjectFlags.Tuple) !== 0; +} +export function isIndexType(type) { + return (type.flags & TypeFlags.Index) !== 0; +} +export function isIndexedAccessType(type) { + return (type.flags & TypeFlags.IndexedAccess) !== 0; +} +export function isConditionalType(type) { + return (type.flags & TypeFlags.Conditional) !== 0; +} +export function isSubstitutionType(type) { + return (type.flags & TypeFlags.Substitution) !== 0; +} +export function isTemplateLiteralType(type) { + return (type.flags & TypeFlags.TemplateLiteral) !== 0; +} +export function isStringMappingType(type) { + return (type.flags & TypeFlags.StringMapping) !== 0; +} +export function isTypeParameter(type) { + return (type.flags & TypeFlags.TypeParameter) !== 0; +} +export class Signature { + flags; + objectRegistry; + id; + declaration; + typeParameters; + parameters; + thisParameter; + target; + constructor(data, project, objectRegistry) { + this.id = data.id; + this.flags = data.flags; + this.objectRegistry = objectRegistry; + this.declaration = data.declaration ? new NodeHandle(data.declaration, project) : undefined; + this.typeParameters = data.typeParameters ?? []; + this.parameters = data.parameters ?? []; + this.thisParameter = data.thisParameter; + this.target = data.target; + } + getTypeParameters() { + return this.objectRegistry.fetchTypes(this, "getTypeParametersOfSignature", this.typeParameters); + } + getParameters() { + return this.objectRegistry.fetchSymbols(this, "getParametersOfSignature", this.parameters); + } + getThisParameter() { + return this.objectRegistry.fetchSymbol(this, "getThisParameterOfSignature", this.thisParameter); + } + getTarget() { + return this.objectRegistry.fetchSignature(this, "getTargetOfSignature", this.target); + } + get hasRestParameter() { + return (this.flags & SignatureFlags.HasRestParameter) !== 0; + } + get isConstruct() { + return (this.flags & SignatureFlags.Construct) !== 0; + } + get isAbstract() { + return (this.flags & SignatureFlags.Abstract) !== 0; + } +} +//# sourceMappingURL=api.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/sync/api.js.map b/node_modules/typescript/dist/api/sync/api.js.map new file mode 100644 index 0000000..225bab1 --- /dev/null +++ b/node_modules/typescript/dist/api/sync/api.js.map @@ -0,0 +1 @@ +{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/api/sync/api.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,oDAAoD;AACpD,oDAAoD;AACpD,oDAAoD;AACpD,EAAE;AACF,+BAA+B;AAC/B,+DAA+D;AAC/D,EAAE;AACF,wDAAwD;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAIH,aAAa,EAMb,0BAA0B,GAC7B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACH,UAAU,EACV,kBAAkB,GACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACH,UAAU,EACV,SAAS,EACT,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,GACnB,MAAM,iBAAiB,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AC,KAAK,CAAC,CAAC;IACzD,CAAC;IAED,IAAI,UAAU;QACV,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxD,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/sync/client.d.ts b/node_modules/typescript/dist/api/sync/client.d.ts new file mode 100644 index 0000000..2b3e08f --- /dev/null +++ b/node_modules/typescript/dist/api/sync/client.d.ts @@ -0,0 +1,30 @@ +import { type ClientOptions, type ClientSocketOptions, type ClientSpawnOptions } from "../options.ts"; +import { TimingCollector, type TimingInfo } from "../timing.ts"; +export type { ClientOptions, ClientSocketOptions, ClientSpawnOptions }; +export declare class Client { + private channel; + private encoder; + private timing; + constructor(options: ClientOptions); + apiRequest(method: string, params?: unknown): T; + apiRequestBinary(method: string, params?: unknown): Uint8Array | undefined; + echo(payload: string): string; + echoBinary(payload: Uint8Array): Uint8Array; + /** + * Returns a combined timing snapshot: client-measured round-trip and byte + * counts folded together with the server's own per-request processing time + * (fetched via a getServerTiming request) and estimated transport overhead. + */ + getTimingInfo(): TimingInfo; + resetTimingInfo(): void; + /** + * Returns the timing collector that per-node materialization is reported + * into, or undefined when timing collection is disabled. The returned + * collector is the same one folded into {@link getTimingInfo}, so + * materialization totals surface alongside request timings. + */ + getTimingCollector(): TimingCollector | undefined; + private recordTiming; + close(): void; +} +//# sourceMappingURL=client.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/sync/client.d.ts.map b/node_modules/typescript/dist/api/sync/client.d.ts.map new file mode 100644 index 0000000..09b1252 --- /dev/null +++ b/node_modules/typescript/dist/api/sync/client.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/api/sync/client.ts"],"names":[],"mappings":"AACA,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EAG1B,MAAM,eAAe,CAAC;AAEvB,OAAO,EAIH,eAAe,EACf,KAAK,UAAU,EAClB,MAAM,cAAc,CAAC;AAEtB,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,CAAC;AAEvE,qBAAa,MAAM;IACf,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,OAAO,CAAqB;IACpC,OAAO,CAAC,MAAM,CAA8B;gBAEhC,OAAO,EAAE,aAAa;IAmDlC,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,CAAC;IAWlD,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS;IAQ1E,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAI7B,UAAU,CAAC,OAAO,EAAE,UAAU,GAAG,UAAU;IAI3C;;;;OAIG;IACH,aAAa,IAAI,UAAU;IAW3B,eAAe,IAAI,IAAI;IAOvB;;;;;OAKG;IACH,kBAAkB,IAAI,eAAe,GAAG,SAAS;IAIjD,OAAO,CAAC,YAAY;IAUpB,KAAK,IAAI,IAAI;CAGhB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/sync/client.js b/node_modules/typescript/dist/api/sync/client.js new file mode 100644 index 0000000..59e4145 --- /dev/null +++ b/node_modules/typescript/dist/api/sync/client.js @@ -0,0 +1,124 @@ +import { fsCallbackNames } from "../fs.js"; +import { isSpawnOptions, resolveExePath, } from "../options.js"; +import { SyncRpcChannel } from "../syncChannel.js"; +import { combineTimingInfo, disabledTimingInfo, TimingCollector, } from "../timing.js"; +export class Client { + channel; + encoder = new TextEncoder(); + timing; + constructor(options) { + if (!isSpawnOptions(options)) { + throw new Error("Socket connections are not yet supported in the sync client"); + } + const cwd = options.cwd ?? process.cwd(); + const args = [ + "--api", + "--cwd", + cwd, + ]; + // Enable virtual FS callbacks for each provided FS function + const enabledCallbacks = []; + if (options.fs) { + for (const name of fsCallbackNames) { + if (options.fs[name]) { + enabledCallbacks.push(name); + } + } + } + if (enabledCallbacks.length > 0) { + args.push(`--callbacks=${enabledCallbacks.join(",")}`); + } + const collectTiming = options.collectTiming ?? false; + if (collectTiming) { + args.push("--timing"); + this.timing = new TimingCollector(); + } + const channel = new SyncRpcChannel(resolveExePath(options), args, collectTiming); + this.channel = channel; + if (options.fs) { + for (const name of enabledCallbacks) { + const callback = options.fs[name]; + channel.registerCallback(name, (_, arg) => { + const result = callback(JSON.parse(arg)); + if (name === "readFile") { + // readFile has 3 returns: string (content), null (not found), undefined (fall back). + // Wrap in object to preserve null vs undefined distinction. + if (result === undefined) + return ""; + return JSON.stringify({ content: result }); + } + return JSON.stringify(result) ?? ""; + }); + } + } + } + apiRequest(method, params) { + const encodedPayload = JSON.stringify(params); + const start = performance.now(); + const result = this.channel.requestSync(method, encodedPayload); + this.recordTiming(method, start); + if (result.length) { + return JSON.parse(result); + } + return undefined; + } + apiRequestBinary(method, params) { + const start = performance.now(); + const result = this.channel.requestBinarySync(method, this.encoder.encode(JSON.stringify(params))); + this.recordTiming(method, start); + if (result.length === 0) + return undefined; + return result; + } + echo(payload) { + return this.channel.requestSync("echo", payload); + } + echoBinary(payload) { + return this.channel.requestBinarySync("echo", payload); + } + /** + * Returns a combined timing snapshot: client-measured round-trip and byte + * counts folded together with the server's own per-request processing time + * (fetched via a getServerTiming request) and estimated transport overhead. + */ + getTimingInfo() { + if (!this.timing) { + return disabledTimingInfo(); + } + const local = this.timing.getInfo(); + // requestSync bypasses recordTiming, so this query does not pollute the + // client-side collector. + const result = this.channel.requestSync("getServerTiming", ""); + return combineTimingInfo(local, JSON.parse(result)); + } + resetTimingInfo() { + if (!this.timing) + return; + this.timing.reset(); + // Keep the server's collection in sync so combined totals stay meaningful. + this.channel.requestSync("resetServerTiming", ""); + } + /** + * Returns the timing collector that per-node materialization is reported + * into, or undefined when timing collection is disabled. The returned + * collector is the same one folded into {@link getTimingInfo}, so + * materialization totals surface alongside request timings. + */ + getTimingCollector() { + return this.timing; + } + recordTiming(method, start) { + if (!this.timing) + return; + this.timing.record({ + method, + roundTripMs: performance.now() - start, + bytesSent: this.channel.lastBytesSent, + bytesReceived: this.channel.lastBytesReceived, + }); + } + close() { + this.channel.close(); + } +} +//# sourceMappingURL=client.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/sync/client.js.map b/node_modules/typescript/dist/api/sync/client.js.map new file mode 100644 index 0000000..d436c19 --- /dev/null +++ b/node_modules/typescript/dist/api/sync/client.js.map @@ -0,0 +1 @@ +{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/api/sync/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAIH,cAAc,EACd,cAAc,GACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EACH,iBAAiB,EACjB,kBAAkB,EAElB,eAAe,GAElB,MAAM,cAAc,CAAC;AAItB,MAAM,OAAO,MAAM;IACP,OAAO,CAAiB;IACxB,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;IAC5B,MAAM,CAA8B;IAE5C,YAAY,OAAsB;QAC9B,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;QACnF,CAAC;QAED,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QACzC,MAAM,IAAI,GAAG;YACT,OAAO;YACP,OAAO;YACP,GAAG;SACN,CAAC;QAEF,4DAA4D;QAC5D,MAAM,gBAAgB,GAAuC,EAAE,CAAC;QAChE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC;YACb,KAAK,MAAM,IAAI,IAAI,eAAe,EAAE,CAAC;gBACjC,IAAI,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;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O,kBAAkB,EAAE,CAAC;QAChC,CAAC;QACD,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpC,wEAAwE;QACxE,yBAAyB;QACzB,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;QAC/D,OAAO,iBAAiB,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAqB,CAAC,CAAC;IAC5E,CAAC;IAED,eAAe;QACX,IAAI,CAAC,IAAI,CAAC,MAAM;YAAE,OAAO;QACzB,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACpB,2EAA2E;QAC3E,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC;IACtD,CAAC;IAED;;;;;OAKG;IACH,kBAAkB;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAEO,YAAY,CAAC,MAAc,EAAE,KAAa;QAC9C,IAAI,CAAC,IAAI,CAAC,MAAM;YAAE,OAAO;QACzB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;YACf,MAAM;YACN,WAAW,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,KAAK;YACtC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,aAAa;YACrC,aAAa,EAAE,IAAI,CAAC,OAAO,CAAC,iBAAiB;SAChD,CAAC,CAAC;IACP,CAAC;IAED,KAAK;QACD,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IACzB,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/sync/types.d.ts b/node_modules/typescript/dist/api/sync/types.d.ts new file mode 100644 index 0000000..8e4720f --- /dev/null +++ b/node_modules/typescript/dist/api/sync/types.d.ts @@ -0,0 +1,310 @@ +import type { CompletionItemKind } from "#enums/completionItemKind"; +import type { DiagnosticCategory } from "#enums/diagnosticCategory"; +import type { ElementFlags } from "#enums/elementFlags"; +import type { ObjectFlags } from "#enums/objectFlags"; +import type { TypeFlags } from "#enums/typeFlags"; +import type { TypePredicateKind } from "#enums/typePredicateKind"; +import type { NodeHandle, Symbol } from "./api.ts"; +/** + * A TypeScript type. + * + * Use TypeFlags to determine the specific kind of type and access + * kind-specific properties. For example: + * + * ```ts + * if (type.flags & TypeFlags.StringLiteral) { + * console.log((type as StringLiteralType).value); // string + * } + * ``` + */ +export interface Type { + /** Type flags — use to determine the specific kind of type. */ + readonly flags: TypeFlags; + /** Unique identifier for this type */ + readonly id: number; + /** Get the symbol associated with this type, if any */ + getSymbol(): Symbol | undefined; + /** Get the type arguments of the type alias this type was instantiated from, if any */ + getAliasTypeArguments(): readonly Type[]; + /** Get the symbol of the type alias this type was instantiated from, if any */ + getAliasSymbol(): Symbol | undefined; + /** + * Get the base types of this type, or `undefined` if it is not a class or + * interface type. + */ + getBaseTypes(): readonly Type[] | undefined; + /** Whether this type is a class or interface type */ + isClassOrInterface(): this is InterfaceType; + /** Whether this type is a union type */ + isUnionType(): this is UnionType; + /** Whether this type is an intersection type */ + isIntersectionType(): this is IntersectionType; + /** Whether this type is an object type */ + isObjectType(): this is ObjectType; + /** Whether this type is an intrinsic primitive type */ + isIntrinsicType(): this is IntrinsicType; + /** + * Whether this is the error type — the placeholder produced when a type + * cannot be determined (e.g. an unresolved reference). + */ + isErrorType(): boolean; + /** Whether this type is a literal type */ + isLiteralType(): this is LiteralType; + /** Whether this type is a string literal type */ + isStringLiteralType(): this is StringLiteralType; + /** Whether this type is a number literal type */ + isNumberLiteralType(): this is NumberLiteralType; + /** Whether this type is a bigint literal type */ + isBigIntLiteralType(): this is BigIntLiteralType; + /** Whether this type is a boolean literal type */ + isBooleanLiteralType(): this is BooleanLiteralType; + /** Whether this type is a type reference */ + isTypeReference(): this is TypeReference; + /** Whether this type is a tuple type */ + isTupleType(): this is TupleType; + /** Whether this type is an index type (`keyof T`) */ + isIndexType(): this is IndexType; + /** Whether this type is an indexed access type (`T[K]`) */ + isIndexedAccessType(): this is IndexedAccessType; + /** Whether this type is a conditional type */ + isConditionalType(): this is ConditionalType; + /** Whether this type is a substitution type */ + isSubstitutionType(): this is SubstitutionType; + /** Whether this type is a template literal type */ + isTemplateLiteralType(): this is TemplateLiteralType; + /** Whether this type is a string mapping type */ + isStringMappingType(): this is StringMappingType; + /** Whether this type is a type parameter */ + isTypeParameter(): this is TypeParameter; +} +/** + * Freshable types (TypeFlags.Freshable) - literal types (TypeFlags.Literal) and computed enum types (TypeFlags.Enum). + */ +export interface FreshableType extends Type { + /** Get the fresh version of this type, if any */ + getFreshType(): FreshableType | undefined; + /** Get the regular (non-fresh) version of this type, if any */ + getRegularType(): FreshableType | undefined; +} +/** Literal types: StringLiteral, NumberLiteral, BigIntLiteral, BooleanLiteral */ +export interface LiteralType extends FreshableType { + /** The literal value. Use TypeFlags to narrow to a specific literal subtype with a concrete value type. */ + readonly value: string | number | boolean | bigint; +} +/** String literal types (TypeFlags.StringLiteral) */ +export interface StringLiteralType extends LiteralType { + /** The string value of the literal */ + readonly value: string; +} +/** Numeric literal types (TypeFlags.NumberLiteral) */ +export interface NumberLiteralType extends LiteralType { + /** The numeric value of the literal */ + readonly value: number; +} +/** BigInt literal types (TypeFlags.BigIntLiteral) */ +export interface BigIntLiteralType extends LiteralType { + /** The bigint value of the literal */ + readonly value: bigint; +} +/** Boolean literal types (TypeFlags.BooleanLiteral) */ +export interface BooleanLiteralType extends LiteralType { + /** The boolean value of the literal */ + readonly value: boolean; +} +/** Object types (TypeFlags.Object) */ +export interface ObjectType extends Type { + /** Object flags — use to determine the specific kind of object type. */ + readonly objectFlags: ObjectFlags; +} +/** Type references (ObjectFlags.Reference) — e.g. Array, Map */ +export interface TypeReference extends ObjectType { + /** Get the generic target type (e.g. Array for Array) */ + getTarget(): Type; +} +/** Interface types — classes and interfaces (ObjectFlags.ClassOrInterface) */ +export interface InterfaceType extends TypeReference { + /** Get all type parameters (outer + local, excluding thisType) */ + getTypeParameters(): readonly TypeParameter[]; + /** Get outer type parameters from enclosing declarations */ + getOuterTypeParameters(): readonly TypeParameter[]; + /** Get local type parameters declared on this interface/class */ + getLocalTypeParameters(): readonly TypeParameter[]; +} +/** Tuple types (ObjectFlags.Tuple) */ +export interface TupleType extends InterfaceType { + /** Per-element flags (Required, Optional, Rest, Variadic) */ + readonly elementFlags: readonly ElementFlags[]; + /** Number of initial required or optional elements */ + readonly fixedLength: number; + /** Whether the tuple is readonly */ + readonly readonly: boolean; +} +/** Union or intersection types (TypeFlags.Union | TypeFlags.Intersection) */ +export interface UnionOrIntersectionType extends Type { + /** Get the constituent types */ + getTypes(): readonly Type[]; +} +/** Union types (TypeFlags.Union) */ +export interface UnionType extends UnionOrIntersectionType { +} +/** Intersection types (TypeFlags.Intersection) */ +export interface IntersectionType extends UnionOrIntersectionType { +} +/** Type parameters (TypeFlags.TypeParameter) */ +export interface TypeParameter extends Type { + /** True if this is the synthetic `this` type of an interface, class, or tuple */ + readonly isThisType?: boolean | undefined; +} +/** Index types — keyof T (TypeFlags.Index) */ +export interface IndexType extends Type { + /** Get the target type T in `keyof T` */ + getTarget(): Type; +} +/** Indexed access types — T[K] (TypeFlags.IndexedAccess) */ +export interface IndexedAccessType extends Type { + /** Get the object type T in `T[K]` */ + getObjectType(): Type; + /** Get the index type K in `T[K]` */ + getIndexType(): Type; +} +/** Conditional types — T extends U ? X : Y (TypeFlags.Conditional) */ +export interface ConditionalType extends Type { + /** Get the check type T in `T extends U ? X : Y` */ + getCheckType(): Type; + /** Get the extends type U in `T extends U ? X : Y` */ + getExtendsType(): Type; + /** Get the true type X in `T extends U ? X : Y` */ + getTrueType(): Type; + /** Get the false type Y in `T extends U ? X : Y` */ + getFalseType(): Type; +} +/** Substitution types (TypeFlags.Substitution) */ +export interface SubstitutionType extends Type { + getBaseType(): Type; + getConstraint(): Type; +} +/** Template literal types (TypeFlags.TemplateLiteral) */ +export interface TemplateLiteralType extends Type { + /** Text segments (always one more than the number of type spans) */ + readonly texts: readonly string[]; + /** Get the types interspersed between text segments */ + getTypes(): readonly Type[]; +} +/** String mapping types — Uppercase, Lowercase, etc. (TypeFlags.StringMapping) */ +export interface StringMappingType extends Type { + /** Get the mapped type */ + getTarget(): Type; +} +/** Intrinsic types — any, unknown, string, number, bigint, symbol, void, undefined, null, never, object (TypeFlags.Intrinsic) */ +export interface IntrinsicType extends Type { + /** The intrinsic type name (e.g. "any", "string", "never") */ + readonly intrinsicName: string; +} +/** Base for all type predicates */ +export interface TypePredicateBase { + readonly kind: TypePredicateKind; + readonly type: Type | undefined; +} +/** `this is T` */ +export interface ThisTypePredicate extends TypePredicateBase { + readonly kind: TypePredicateKind.This; + readonly parameterName: undefined; + readonly parameterIndex: undefined; + readonly type: Type; +} +/** `x is T` */ +export interface IdentifierTypePredicate extends TypePredicateBase { + readonly kind: TypePredicateKind.Identifier; + readonly parameterName: string; + readonly parameterIndex: number; + readonly type: Type; +} +/** `asserts this is T` */ +export interface AssertsThisTypePredicate extends TypePredicateBase { + readonly kind: TypePredicateKind.AssertsThis; + readonly parameterName: undefined; + readonly parameterIndex: undefined; + readonly type: Type | undefined; +} +/** `asserts x is T` */ +export interface AssertsIdentifierTypePredicate extends TypePredicateBase { + readonly kind: TypePredicateKind.AssertsIdentifier; + readonly parameterName: string; + readonly parameterIndex: number; + readonly type: Type | undefined; +} +/** A type predicate — e.g. `x is T` or `asserts x is T` */ +export type TypePredicate = ThisTypePredicate | IdentifierTypePredicate | AssertsThisTypePredicate | AssertsIdentifierTypePredicate; +/** An index signature — e.g. `[key: string]: T` */ +export interface IndexInfo { + /** The index key type (e.g. string or number) */ + readonly keyType: Type; + /** The index value type */ + readonly valueType: Type; + /** Whether the index signature is readonly */ + readonly isReadonly: boolean; + /** The index signature declaration, if any */ + readonly declaration?: NodeHandle | undefined; +} +/** + * A single JSDoc tag attached to a symbol — e.g. `@param`, `@returns`. + */ +export interface JSDocTagInfo { + /** The tag name, without the leading `@` — e.g. `"param"`. */ + readonly name: string; + /** The rendered tag text, if any — e.g. `"a the first number"` for `@param a the first number`. */ + readonly text?: string | undefined; +} +export interface CompletionEntryLabelDetails { + detail?: string | undefined; + description?: string | undefined; +} +/** Options for {@link Checker.getCompletionsAtPosition}. */ +export interface CompletionOptions { + triggerCharacter?: string | undefined; + /** Include a `symbol` property on each completion entry. Only populated for symbol-based completions (not keywords or literals). */ + includeSymbol?: boolean | undefined; +} +/** A single completion item returned by {@link Checker.getCompletionsAtPosition}. */ +export interface CompletionEntry { + readonly name: string; + readonly kind?: CompletionItemKind | undefined; + readonly sortText?: string | undefined; + readonly insertText?: string | undefined; + readonly filterText?: string | undefined; + readonly detail?: string | undefined; + readonly labelDetails?: CompletionEntryLabelDetails | undefined; + /** The symbol associated with this completion entry. Only set when `includeSymbol: true` is passed and a symbol is available. */ + readonly symbol?: Symbol | undefined; +} +/** The result of {@link Checker.getCompletionsAtPosition}. */ +export interface CompletionInfo { + readonly isIncomplete: boolean; + readonly entries: readonly CompletionEntry[]; +} +/** + * A diagnostic message from the TypeScript compiler. + */ +export interface Diagnostic { + /** File name of the source file this diagnostic belongs to, if any */ + readonly fileName?: string | undefined; + /** Start position of the diagnostic */ + readonly pos: number; + /** End position of the diagnostic */ + readonly end: number; + /** Diagnostic error code */ + readonly code: number; + /** Diagnostic category (error, warning, suggestion, message) */ + readonly category: DiagnosticCategory; + /** Localized diagnostic message text */ + readonly text: string; + /** Whether this diagnostic highlights unnecessary code */ + readonly reportsUnnecessary?: boolean | undefined; + /** Whether this diagnostic highlights deprecated code */ + readonly reportsDeprecated?: boolean | undefined; + /** Chained diagnostic messages */ + readonly messageChain?: readonly Diagnostic[] | undefined; + /** Related diagnostic information */ + readonly relatedInformation?: readonly Diagnostic[] | undefined; +} +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/sync/types.d.ts.map b/node_modules/typescript/dist/api/sync/types.d.ts.map new file mode 100644 index 0000000..84d6151 --- /dev/null +++ b/node_modules/typescript/dist/api/sync/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/api/sync/types.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EACR,UAAU,EACV,MAAM,EACT,MAAM,UAAU,CAAC;AAElB;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,IAAI;IACjB,+DAA+D;IAC/D,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAE1B,sCAAsC;IACtC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB,uDAAuD;IACvD,SAAS,IAAI,MAAM,GAAG,SAAS,CAAC;IAEhC,uFAAuF;IACvF,qBAAqB,IAAI,SAAS,IAAI,EAAE,CAAC;IAEzC,+EAA+E;IAC/E,cAAc,IAAI,MAAM,GAAG,SAAS,CAAC;IAErC;;;OAGG;IACH,YAAY,IAAI,SAAS,IAAI,EAAE,GAAG,SAAS,CAAC;IAE5C,qDAAqD;IACrD,kBAAkB,IAAI,IAAI,IAAI,aAAa,CAAC;IAC5C,wCAAwC;IACxC,WAAW,IAAI,IAAI,IAAI,SAAS,CAAC;IACjC,gDAAgD;IAChD,kBAAkB,IAAI,IAAI,IAAI,gBAAgB,CAAC;IAC/C,0CAA0C;IAC1C,YAAY,IAAI,IAAI,IAAI,UAAU,CAAC;IACnC,uDAAuD;IACvD,eAAe,IAAI,IAAI,IAAI,aAAa,CAAC;IACzC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QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,YAAY,CAAC,EAAE,2BAA2B,GAAG,SAAS,CAAC;IAChE,iIAAiI;IACjI,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACxC;AAED,8DAA8D;AAC9D,MAAM,WAAW,cAAc;IAC3B,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,CAAC;CAChD;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACvB,sEAAsE;IACtE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,uCAAuC;IACvC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,qCAAqC;IACrC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,4BAA4B;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,gEAAgE;IAChE,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IACtC,wCAAwC;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,0DAA0D;IAC1D,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAClD,yDAAyD;IACzD,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACjD,kCAAkC;IAClC,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,UAAU,EAAE,GAAG,SAAS,CAAC;IAC1D,qCAAqC;IACrC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,SAAS,UAAU,EAAE,GAAG,SAAS,CAAC;CACnE"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/sync/types.js b/node_modules/typescript/dist/api/sync/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/typescript/dist/api/sync/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/sync/types.js.map b/node_modules/typescript/dist/api/sync/types.js.map new file mode 100644 index 0000000..8f42c24 --- /dev/null +++ b/node_modules/typescript/dist/api/sync/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/api/sync/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/syncChannel.d.ts b/node_modules/typescript/dist/api/syncChannel.d.ts new file mode 100644 index 0000000..a7eadf3 --- /dev/null +++ b/node_modules/typescript/dist/api/syncChannel.d.ts @@ -0,0 +1,114 @@ +/** + * Pure JS replacement for @typescript/libsyncrpc. + * + * Spawns a child process and communicates with it synchronously over + * stdin/stdout pipes using the same MessagePack-based tuple protocol: + * [MessageType (u8), method (bin), payload (bin)] + * + * Synchronous I/O is achieved by calling fs.readSync / fs.writeSync + * directly on the pipe file descriptors obtained from the spawned + * ChildProcess. + */ +/** + * SyncRpcChannel – drop-in replacement for the native libsyncrpc class. + * + * API surface intentionally matches the original: + * - constructor(exe, args) + * - requestSync(method, payload): string + * - requestBinarySync(method, payload): Uint8Array + * - registerCallback(name, cb) + * - close() + * + * The protocol is unversioned; both sides (this JS channel and the Go + * child process) must be built from the same tree. + * + * This class is **not** thread-safe. All calls must originate from a + * single thread — do not share an instance across worker threads. + */ +export declare class SyncRpcChannel { + private child; + private readFd; + private writeFd; + private pipeFd; + private callbacks; + private methodBufCache; + private readonly collectTiming; + lastBytesSent: number; + lastBytesReceived: number; + private _msgType; + private _msgName; + private _msgPayload; + private headerBuf; + private readBuf; + private readBufPos; + private readBufLen; + private writeBuf; + constructor(exe: string, args: string[], collectTiming?: boolean); + /** + * Send a request and synchronously wait for the response (string). + * Handles Call (callback) messages from the child inline. + */ + requestSync(method: string, payload: string): string; + /** + * Send a request and synchronously wait for the response (binary). + * Handles Call (callback) messages from the child inline. + */ + requestBinarySync(method: string, payload: Uint8Array): Uint8Array; + /** Register a string→string callback that the child may invoke. */ + registerCallback(name: string, callback: (name: string, payload: string) => string): void; + /** Kill the child process and release resources. */ + close(): void; + private ensureOpen; + private getMethodBuf; + private requestBytesSync; + /** + * Handle an incoming MSG_CALL from the child process. + * + * After sending the error response back to the child, this method + * intentionally re-throws to abort the caller's request loop. + * A failed callback is treated as unrecoverable to match the + * behavior of the native libsyncrpc addon. + */ + private handleCall; + /** + * Write a complete [type, name, payload] tuple in as few writeSync + * calls as possible. For messages that fit in the pre-allocated + * write buffer (64 KB), everything is assembled and sent in a single + * syscall. Larger messages use two syscalls: one for the header + * portion and one for the payload data. + */ + private writeTuple; + /** + * Read a [type, name, payload] tuple into instance fields + * (_msgType, _msgName, _msgPayload) to avoid allocating a + * short-lived 3-element array on every call. + */ + private readTuple; + /** + * Read a MessagePack bin field. + */ + private readBin; + /** Build an EOF error with the child's exit code/signal if available. */ + private eofError; + /** Read a single byte from the buffered read-ahead. */ + private readByte; + private readExact; + /** + * Fill the internal read-ahead buffer from the pipe fd. + * Retries on EAGAIN for non-blocking mode compatibility. + */ + private fillReadBuffer; + /** + * Synchronously read exactly `length` bytes into `buffer`. + * Serves from the internal read-ahead buffer first; for large reads + * that exceed the buffer size, reads directly from the fd to avoid + * an extra copy. + */ + private readExactInto; + /** + * Synchronously write all bytes from `data` (up to `length`). + * Retries on EAGAIN. + */ + private writeAllBuf; +} +//# sourceMappingURL=syncChannel.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/syncChannel.d.ts.map b/node_modules/typescript/dist/api/syncChannel.d.ts.map new file mode 100644 index 0000000..57d212a --- /dev/null +++ b/node_modules/typescript/dist/api/syncChannel.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"syncChannel.d.ts","sourceRoot":"","sources":["../../src/api/syncChannel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AA8EH;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,cAAc;IACvB,OAAO,CA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;IAOhB,uDAAuD;IACvD,OAAO,CAAC,QAAQ;IAOhB,OAAO,CAAC,SAAS;IAiBjB;;;OAGG;IACH,OAAO,CAAC,cAAc;IAsBtB;;;;;OAKG;IACH,OAAO,CAAC,aAAa;IAoCrB;;;OAGG;IACH,OAAO,CAAC,WAAW;CAiBtB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/syncChannel.js b/node_modules/typescript/dist/api/syncChannel.js new file mode 100644 index 0000000..7b9cf99 --- /dev/null +++ b/node_modules/typescript/dist/api/syncChannel.js @@ -0,0 +1,508 @@ +/** + * Pure JS replacement for @typescript/libsyncrpc. + * + * Spawns a child process and communicates with it synchronously over + * stdin/stdout pipes using the same MessagePack-based tuple protocol: + * [MessageType (u8), method (bin), payload (bin)] + * + * Synchronous I/O is achieved by calling fs.readSync / fs.writeSync + * directly on the pipe file descriptors obtained from the spawned + * ChildProcess. + */ +import { spawn, } from "node:child_process"; +import { closeSync, openSync, readSync, writeSync, } from "node:fs"; +import { binHeaderSize, MSGPACK_BIN16, MSGPACK_BIN32, MSGPACK_BIN8, MSGPACK_FIXARRAY3, MSGPACK_UINT8, writeBinHeader, } from "./node/msgpack.js"; +// ── MessageType constants ──────────────────────────────────────────── +// Sent by channel (parent → child) +const MSG_REQUEST = 1; +const MSG_CALL_RESPONSE = 2; +const MSG_CALL_ERROR = 3; +// Sent by child (child → parent) +const MSG_RESPONSE = 4; +const MSG_ERROR = 5; +const MSG_CALL = 6; +// Pre-allocated buffer used by Atomics.wait for tiny sleeps when a +// non-blocking fd returns EAGAIN. +const sleepBuf = new Int32Array(new SharedArrayBuffer(4)); +// Shared empty buffer – avoids allocating Buffer.alloc(0) on every +// zero-length bin field. +const EMPTY_BUF = Buffer.alloc(0); +// ── Global cleanup tracking ───────────────────────────────────────── +// Track all live child processes so they can be killed on process exit. +// This mimics the auto-cleanup behavior of the native libsyncrpc module, +// whose Rust/C++ destructors would kill children automatically. +const liveChildren = new Set(); +process.on("exit", () => { + for (const child of liveChildren) { + try { + child.kill(); + } + catch { + // swallow – process may already be dead + } + } + liveChildren.clear(); +}); +/** + * SyncRpcChannel – drop-in replacement for the native libsyncrpc class. + * + * API surface intentionally matches the original: + * - constructor(exe, args) + * - requestSync(method, payload): string + * - requestBinarySync(method, payload): Uint8Array + * - registerCallback(name, cb) + * - close() + * + * The protocol is unversioned; both sides (this JS channel and the Go + * child process) must be built from the same tree. + * + * This class is **not** thread-safe. All calls must originate from a + * single thread — do not share an instance across worker threads. + */ +export class SyncRpcChannel { + child; + readFd; + writeFd; + pipeFd; + callbacks = new Map(); + methodBufCache = new Map(); + // When true, the payload byte lengths of each request/response are recorded + // and exposed via the `last*` fields below. These count only the JSON/binary + // payload bytes, not the MessagePack tuple framing (message type, method + // name, and length headers). + collectTiming; + // Per-request payload byte measurements for the most recently completed + // request. Only meaningful when `collectTiming` is true. Callers read these + // immediately after a request returns (the channel is strictly serial). + lastBytesSent = 0; + lastBytesReceived = 0; + _msgType = 0; + _msgName = EMPTY_BUF; + _msgPayload = EMPTY_BUF; + headerBuf = Buffer.allocUnsafe(4); + // Read-ahead buffer – reduces readSync syscalls by buffering data from the pipe. + readBuf = Buffer.allocUnsafe(65536); + readBufPos = 0; + readBufLen = 0; + // Write buffer – assembles entire tuples for a single writeSync. + writeBuf = Buffer.allocUnsafe(65536); + constructor(exe, args, collectTiming = false) { + this.collectTiming = collectTiming; + const isWindows = process.platform === "win32"; + if (isWindows) { + // On Windows, libuv pipe handles don't expose POSIX fds, so + // readSync/writeSync can't be used on stdio pipes. Instead, + // we create a Windows named pipe path, pass it to the child + // via --pipe, and open it with fs.openSync which returns a + // real C-runtime fd backed by a proper HANDLE. + const pipePath = `\\\\.\\pipe\\tsgo-sync-${process.pid}-${Date.now()}`; + this.child = spawn(exe, [...args, "--pipe", pipePath], { + stdio: ["ignore", "ignore", "inherit"], + }); + // Retry openSync until the child creates the named pipe. + let fd; + for (let i = 0; i < 500; i++) { + try { + fd = openSync(pipePath, "r+"); + break; + } + catch { + if (this.child.exitCode !== null) { + throw new Error(`Child process exited with code ${this.child.exitCode} before pipe was ready`); + } + Atomics.wait(sleepBuf, 0, 0, 10); + } + } + if (fd === undefined) { + this.child.kill(); + throw new Error("SyncRpcChannel: timed out connecting to named pipe"); + } + this.readFd = fd; + this.writeFd = fd; + this.pipeFd = fd; + } + else { + // POSIX: use stdio pipe file descriptors directly. + this.child = spawn(exe, args, { + stdio: ["pipe", "pipe", "inherit"], + }); + const stdout = this.child.stdout; + const stdin = this.child.stdin; + this.readFd = stdout._handle.fd; + this.writeFd = stdin._handle.fd; + if (typeof this.readFd !== "number" || this.readFd < 0 || typeof this.writeFd !== "number" || this.writeFd < 0) { + stdout.destroy(); + stdin.destroy(); + this.child.kill(); + throw new Error("SyncRpcChannel: could not obtain pipe file descriptors."); + } + // Set the pipe handles to blocking mode. Under node --test's + // process isolation, pipes are created in non-blocking mode + // (for the IPC channel). This causes readSync/writeSync to get + // EAGAIN, requiring costly 1ms sleeps per retry. Setting + // blocking mode ensures readSync blocks properly until data + // arrives, matching the behavior of the native libsyncrpc. + stdout._handle.setBlocking?.(true); + stdin._handle.setBlocking?.(true); + // Prevent Node's event-loop from reading stdout or keeping the + // process alive – we will use fs.readSync exclusively. + stdout.pause(); + stdout.unref(); + stdin.unref(); + } + // Track for auto-cleanup on process exit. + liveChildren.add(this.child); + this.child.unref(); + } + // ── Public API ────────────────────────────────────────────────── + /** + * Send a request and synchronously wait for the response (string). + * Handles Call (callback) messages from the child inline. + */ + requestSync(method, payload) { + this.ensureOpen(); + const result = this.requestBytesSync(method, payload); + return result.toString("utf-8"); + } + /** + * Send a request and synchronously wait for the response (binary). + * Handles Call (callback) messages from the child inline. + */ + requestBinarySync(method, payload) { + this.ensureOpen(); + return this.requestBytesSync(method, payload); + } + /** Register a string→string callback that the child may invoke. */ + registerCallback(name, callback) { + this.callbacks.set(name, callback); + } + /** Kill the child process and release resources. */ + close() { + try { + liveChildren.delete(this.child); + if (this.pipeFd !== undefined) { + closeSync(this.pipeFd); + this.pipeFd = undefined; + } + // Destroy the stdio streams so that their pipe handles are closed + // and no longer prevent the event loop from draining. + this.child.stdout?.destroy(); + this.child.stdin?.destroy(); + this.child.kill(); + this.readFd = -1; + this.writeFd = -1; + } + catch { + // swallow – process may already be dead + } + } + // ── Core request loop ─────────────────────────────────────────── + ensureOpen() { + if (this.readFd < 0) { + throw new Error("SyncRpcChannel is closed"); + } + } + getMethodBuf(method) { + let buf = this.methodBufCache.get(method); + if (buf === undefined) { + buf = Buffer.from(method, "utf-8"); + this.methodBufCache.set(method, buf); + } + return buf; + } + requestBytesSync(method, payload) { + const methodBuf = this.getMethodBuf(method); + if (this.collectTiming) { + this.lastBytesSent = typeof payload === "string" + ? Buffer.byteLength(payload, "utf-8") + : payload.length; + this.lastBytesReceived = 0; + } + this.writeTuple(MSG_REQUEST, methodBuf, payload); + for (;;) { + this.readTuple(); + switch (this._msgType) { + case MSG_RESPONSE: { + // Compare raw bytes instead of decoding to string. + if (!methodBuf.equals(this._msgName)) { + throw new Error(`name mismatch for response: expected \`${method}\`, got \`${this._msgName.toString("utf-8")}\``); + } + if (this.collectTiming) { + this.lastBytesReceived = this._msgPayload.length; + } + return this._msgPayload; + } + case MSG_ERROR: { + if (methodBuf.equals(this._msgName)) { + throw new Error(this._msgPayload.toString("utf-8")); + } + throw new Error(`name mismatch for response: expected \`${method}\`, got \`${this._msgName.toString("utf-8")}\``); + } + case MSG_CALL: { + this.handleCall(this._msgName.toString("utf-8"), this._msgPayload); + break; + } + default: + throw new Error(`Invalid message type from child: ${this._msgType}`); + } + } + } + // ── Callback handling ─────────────────────────────────────────── + /** + * Handle an incoming MSG_CALL from the child process. + * + * After sending the error response back to the child, this method + * intentionally re-throws to abort the caller's request loop. + * A failed callback is treated as unrecoverable to match the + * behavior of the native libsyncrpc addon. + */ + handleCall(name, payload) { + const cb = this.callbacks.get(name); + if (!cb) { + const errMsg = `unknown callback: \`${name}\`. Please make sure to register it on the JavaScript side before invoking it.`; + this.writeTuple(MSG_CALL_ERROR, Buffer.from(name, "utf-8"), Buffer.from(errMsg, "utf-8")); + throw new Error(`no callback named \`${name}\` found`); + } + try { + const result = cb(name, payload.toString("utf-8")); + this.writeTuple(MSG_CALL_RESPONSE, Buffer.from(name, "utf-8"), Buffer.from(result, "utf-8")); + } + catch (e) { + const errMsg = String(e instanceof Error ? e.message : e).trim(); + this.writeTuple(MSG_CALL_ERROR, Buffer.from(name, "utf-8"), Buffer.from(errMsg, "utf-8")); + throw new Error(`Error calling callback \`${name}\`: ${errMsg}`); + } + } + // ── MessagePack tuple write ───────────────────────────────────── + /** + * Write a complete [type, name, payload] tuple in as few writeSync + * calls as possible. For messages that fit in the pre-allocated + * write buffer (64 KB), everything is assembled and sent in a single + * syscall. Larger messages use two syscalls: one for the header + * portion and one for the payload data. + */ + writeTuple(type, name, payload) { + const nameLen = name.length; + const payloadIsString = typeof payload === "string"; + const payloadLen = payloadIsString ? Buffer.byteLength(payload, "utf-8") : payload.length; + const nameHdrSize = binHeaderSize(nameLen); + const payloadHdrSize = binHeaderSize(payloadLen); + const headerSize = 2 + nameHdrSize + nameLen + payloadHdrSize; + const totalSize = headerSize + payloadLen; + if (totalSize <= this.writeBuf.length) { + // Small message: assemble into write buffer, one syscall + let off = 0; + this.writeBuf[off++] = MSGPACK_FIXARRAY3; + this.writeBuf[off++] = type; + off = writeBinHeader(this.writeBuf, off, nameLen); + name.copy(this.writeBuf, off); + off += nameLen; + off = writeBinHeader(this.writeBuf, off, payloadLen); + if (payloadLen > 0) { + if (payloadIsString) { + // Encode string directly into write buffer — avoids + // Buffer.from(string, 'utf-8') allocation entirely. + this.writeBuf.write(payload, off, payloadLen, "utf-8"); + } + else if (payload instanceof Buffer) { + payload.copy(this.writeBuf, off); + } + else { + this.writeBuf.set(payload, off); + } + } + this.writeAllBuf(this.writeBuf, totalSize); + } + else { + // Large message: header + name in one call, payload in another + let off = 0; + this.writeBuf[off++] = MSGPACK_FIXARRAY3; + this.writeBuf[off++] = type; + off = writeBinHeader(this.writeBuf, off, nameLen); + name.copy(this.writeBuf, off); + off += nameLen; + off = writeBinHeader(this.writeBuf, off, payloadLen); + this.writeAllBuf(this.writeBuf, off); + if (payloadLen > 0) { + if (payloadIsString) { + // Large string: must allocate (can't stream-encode + // across multiple writeSync calls). + this.writeAllBuf(Buffer.from(payload, "utf-8")); + } + else { + this.writeAllBuf(payload); + } + } + } + } + // ── MessagePack tuple read ────────────────────────────────────── + /** + * Read a [type, name, payload] tuple into instance fields + * (_msgType, _msgName, _msgPayload) to avoid allocating a + * short-lived 3-element array on every call. + */ + readTuple() { + // Fixed 3-element array marker + const marker = this.readByte(); + if (marker !== MSGPACK_FIXARRAY3) { + throw new Error(`Expected fixed 3-element array (0x93), received: 0x${marker.toString(16)}`); + } + // Message type – positive fixint or uint8 + const tb = this.readByte(); + if (tb <= 0x7f) { + this._msgType = tb; + } + else if (tb === MSGPACK_UINT8) { + this._msgType = this.readByte(); + } + else { + throw new Error(`Expected positive fixint or uint8 marker, received: 0x${tb.toString(16)}`); + } + this._msgName = this.readBin(); + this._msgPayload = this.readBin(); + } + /** + * Read a MessagePack bin field. + */ + readBin() { + const marker = this.readByte(); + let size; + switch (marker) { + case MSGPACK_BIN8: + size = this.readByte(); + break; + case MSGPACK_BIN16: + this.readExactInto(this.headerBuf, 2); + size = (this.headerBuf[0] << 8) | this.headerBuf[1]; + break; + case MSGPACK_BIN32: + this.readExactInto(this.headerBuf, 4); + size = this.headerBuf.readUInt32BE(0); + break; + default: + throw new Error(`Expected binary data (0xc4-0xc6), received: 0x${marker.toString(16)}`); + } + if (size === 0) + return EMPTY_BUF; + return this.readExact(size); + } + // ── Low-level synchronous I/O ─────────────────────────────────── + /** Build an EOF error with the child's exit code/signal if available. */ + eofError() { + const code = this.child.exitCode; + const signal = this.child.signalCode; + const detail = signal ? `killed by signal ${signal}` : code !== null ? `exited with code ${code}` : "unknown reason"; + return new Error(`Unexpected EOF while reading from child process (${detail})`); + } + /** Read a single byte from the buffered read-ahead. */ + readByte() { + if (this.readBufPos >= this.readBufLen) { + this.fillReadBuffer(); + } + return this.readBuf[this.readBufPos++]; + } + readExact(length) { + // Use allocUnsafeSlow (not allocUnsafe) so the buffer has its own + // backing ArrayBuffer at byteOffset 0. This is critical because + // callers such as RemoteSourceFile create DataView/Uint8Array over + // buffer.buffer with absolute offsets. Buffer.allocUnsafe returns + // slices of a shared pool whose byteOffset is non-zero, corrupting + // those downstream views. + // + // allocUnsafeSlow (vs alloc) skips zero-fill, which matters for + // large transfers — e.g. checker.ts at ~57 MB saves ~5 ms of + // unnecessary memset. The buffer is immediately filled by + // readExactInto so uninitialized memory is never exposed. + const buf = Buffer.allocUnsafeSlow(length); + this.readExactInto(buf, length); + return buf; + } + /** + * Fill the internal read-ahead buffer from the pipe fd. + * Retries on EAGAIN for non-blocking mode compatibility. + */ + fillReadBuffer() { + this.readBufPos = 0; + this.readBufLen = 0; + for (;;) { + try { + const n = readSync(this.readFd, this.readBuf, 0, this.readBuf.length, null); + if (n === 0) { + throw this.eofError(); + } + this.readBufLen = n; + return; + } + catch (e) { + if (e instanceof Error && ("code" in e) && (e.code === "EAGAIN" || e.code === "EWOULDBLOCK")) { + Atomics.wait(sleepBuf, 0, 0, 1); + continue; + } + throw e; + } + } + } + /** + * Synchronously read exactly `length` bytes into `buffer`. + * Serves from the internal read-ahead buffer first; for large reads + * that exceed the buffer size, reads directly from the fd to avoid + * an extra copy. + */ + readExactInto(buffer, length) { + let pos = 0; + while (pos < length) { + const avail = this.readBufLen - this.readBufPos; + if (avail > 0) { + // Serve from read-ahead buffer + const toCopy = Math.min(avail, length - pos); + this.readBuf.copy(buffer, pos, this.readBufPos, this.readBufPos + toCopy); + this.readBufPos += toCopy; + pos += toCopy; + } + else if (length - pos >= this.readBuf.length) { + // Remaining data is larger than read buffer; read directly + // into the target to avoid unnecessary copying. + try { + const n = readSync(this.readFd, buffer, pos, length - pos, null); + if (n === 0) { + throw this.eofError(); + } + pos += n; + } + catch (e) { + if (e instanceof Error && ("code" in e) && (e.code === "EAGAIN" || e.code === "EWOULDBLOCK")) { + Atomics.wait(sleepBuf, 0, 0, 1); + continue; + } + throw e; + } + } + else { + // Refill the read-ahead buffer + this.fillReadBuffer(); + } + } + } + /** + * Synchronously write all bytes from `data` (up to `length`). + * Retries on EAGAIN. + */ + writeAllBuf(data, length) { + const total = length ?? data.length; + let pos = 0; + while (pos < total) { + try { + const n = writeSync(this.writeFd, data, pos, total - pos); + pos += n; + } + catch (e) { + if (e instanceof Error && ("code" in e) && (e.code === "EAGAIN" || e.code === "EWOULDBLOCK")) { + Atomics.wait(sleepBuf, 0, 0, 1); + continue; + } + throw e; + } + } + } +} +//# sourceMappingURL=syncChannel.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/syncChannel.js.map b/node_modules/typescript/dist/api/syncChannel.js.map new file mode 100644 index 0000000..fd7e975 --- /dev/null +++ b/node_modules/typescript/dist/api/syncChannel.js.map @@ -0,0 +1 @@ +{"version":3,"file":"syncChannel.js","sourceRoot":"","sources":["../../src/api/syncChannel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAEH,KAAK,GACR,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACH,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,SAAS,GACZ,MAAM,SAAS,CAAC;AAqBjB,OAAO,EACH,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,cAAc,GACjB,MAAM,mBAAmB,CAAC;AAE3B,wEAAwE;AACxE,mCAAmC;AACnC,MAAM,WAAW,GAAG,CAAC,CAAC;AACtB,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAC5B,MAAM,cAAc,GAAG,CAAC,CAAC;AACzB,iCAAiC;AACjC,MAAM,YAAY,GAAG,CAAC,CAAC;AACvB,MAAM,SAAS,GAAG,CAAC,CAAC;AACpB,MAAM,QAAQ,GAAG,CAAC,CAAC;AAEnB,mEA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M,CAAC;QACpC,IAAI,GAAG,GAAG,CAAC,CAAC;QACZ,OAAO,GAAG,GAAG,KAAK,EAAE,CAAC;YACjB,IAAI,CAAC;gBACD,MAAM,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,GAAG,CAAC,CAAC;gBAC1D,GAAG,IAAI,CAAC,CAAC;YACb,CAAC;YACD,OAAO,CAAU,EAAE,CAAC;gBAChB,IAAI,CAAC,YAAY,KAAK,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,IAAI,CAAE,CAA2B,CAAC,IAAI,KAAK,QAAQ,IAAK,CAA2B,CAAC,IAAI,KAAK,aAAa,CAAC,EAAE,CAAC;oBACjJ,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;oBAChC,SAAS;gBACb,CAAC;gBACD,MAAM,CAAC,CAAC;YACZ,CAAC;QACL,CAAC;IACL,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/timing.d.ts b/node_modules/typescript/dist/api/timing.d.ts new file mode 100644 index 0000000..941529b --- /dev/null +++ b/node_modules/typescript/dist/api/timing.d.ts @@ -0,0 +1,175 @@ +/** + * Client-side collection of per-request timing and transfer measurements. + * + * When enabled, each request records its round-trip latency and the number of + * payload bytes sent and received, accumulated into running totals and a + * fixed-size ring buffer of the most recent requests. + * + * The server measures its own per-request processing time independently. When a + * timing snapshot is requested, the client fetches the server's collection via + * a `getServerTiming` request and folds it into the returned {@link TimingInfo}, + * yielding per-request and total server processing time and an estimated + * transport overhead (round-trip minus server processing time). Normal response + * messages are left unchanged. + */ +/** Number of most-recent requests retained in the ring buffer. */ +export declare const RECENT_REQUEST_CAPACITY = 5; +/** A single request's measured timing and transfer sample. */ +export interface RequestTiming { + /** The API method that was invoked. */ + method: string; + /** Wall-clock round-trip time measured by the client, in milliseconds. */ + roundTripMs: number; + /** Number of request payload bytes sent to the server. */ + bytesSent: number; + /** Number of response payload bytes received from the server. */ + bytesReceived: number; + /** Wall-clock timestamp ({@link Date.now}) captured when the request completed. */ + timestamp: number; + /** + * Server-side processing time for this request, in milliseconds, as folded + * in from the server's own timing collection. Undefined when server timing + * for the request could not be matched. + */ + serverTimeMs?: number; + /** + * Estimated transport overhead for this request, in milliseconds + * (`roundTripMs - serverTimeMs`, clamped to be non-negative). Present + * exactly when {@link serverTimeMs} is. + */ + transportOverheadMs?: number; +} +/** Running totals accumulated across every measured request. */ +export interface TimingAccumulators { + /** Number of requests measured. */ + requestCount: number; + /** Sum of round-trip latencies, in milliseconds. */ + roundTripMs: number; + /** Sum of request payload bytes sent. */ + bytesSent: number; + /** Sum of response payload bytes received. */ + bytesReceived: number; + /** Sum of server-side processing time, in milliseconds. */ + serverTimeMs: number; + /** + * Estimated total transport overhead, in milliseconds + * (`roundTripMs - serverTimeMs`, clamped to be non-negative). + */ + transportOverheadMs: number; + /** + * Number of AST nodes materialized from binary source-file responses as the + * client walked the returned trees. Materialization is lazy and happens on + * demand, so this accrues after the originating request completes. + */ + nodesMaterialized: number; + /** + * Number of source files fetched from the server (each decoded into a + * lazily-materialized tree). + */ + sourceFilesFetched: number; + /** + * Number of AST nodes across all fetched source files that can be + * materialized on demand. Each fetched file contributes its full node count + * (excluding the pre-materialized source-file node), whether or not those + * nodes are ever walked. Serves as the denominator for the share of fetched + * nodes that end up materialized (`nodesMaterialized / nodesFetched`). + */ + nodesFetched: number; +} +/** A point-in-time snapshot of collected timing information. */ +export interface TimingInfo { + /** Whether timing collection is enabled for this API instance. */ + enabled: boolean; + /** Running totals across every measured request. */ + totals: TimingAccumulators; + /** + * The most recent requests, up to {@link RECENT_REQUEST_CAPACITY}, ordered + * from oldest to newest. + */ + recentRequests: RequestTiming[]; +} +/** A raw measurement handed to {@link TimingCollector.record}. */ +export interface TimingSample { + method: string; + roundTripMs: number; + bytesSent: number; + bytesReceived: number; +} +/** + * A single server-side request's processing-time sample, as returned by a + * `getServerTiming` request. This is an internal wire shape; consumers see the + * folded-in {@link RequestTiming.serverTimeMs}. + */ +export interface ServerRequestTiming { + /** The API method that was handled. */ + method: string; + /** Server-side processing time, in milliseconds. */ + processingTimeMs: number; + /** Unix timestamp in milliseconds captured when the request completed. */ + timestamp: number; +} +/** Running totals accumulated on the server across every handled request. */ +export interface ServerTimingTotals { + /** Total number of requests handled. */ + requestCount: number; + /** Sum of server-side processing time, in milliseconds. */ + totalProcessingTimeMs: number; +} +/** + * A snapshot of the server's own timing collection, retrieved via a + * `getServerTiming` request. This is an internal wire shape used to compute the + * server-derived fields of {@link TimingInfo}. + */ +export interface ServerTimingInfo { + /** Whether server-side timing collection is enabled. */ + enabled: boolean; + /** Running totals across every request the server handled. */ + totals: ServerTimingTotals; + /** + * The most recent requests as seen by the server, ordered from oldest to + * newest. + */ + recentRequests: ServerRequestTiming[]; +} +/** Returns a snapshot representing a disabled (never-collecting) timing state. */ +export declare function disabledTimingInfo(): TimingInfo; +/** Returns a snapshot representing disabled server-side timing collection. */ +export declare function disabledServerTimingInfo(): ServerTimingInfo; +/** + * Folds a server-side timing snapshot into a client-side snapshot, producing a + * combined {@link TimingInfo} with per-request and total server processing time + * plus estimated transport overhead. + * + * Recent requests are paired newest-to-newest and only matched when the method + * names agree, so that requests recorded by only one side (e.g. the meta + * requests used to fetch timing) do not misalign the two ring buffers. + */ +export declare function combineTimingInfo(client: TimingInfo, server: ServerTimingInfo): TimingInfo; +/** + * Accumulates request timing samples into running totals and a fixed-size ring + * buffer of the most recent requests. + */ +export declare class TimingCollector { + private totals; + private ring; + private head; + /** Records a single request's measurements. */ + record(sample: TimingSample): void; + /** + * Records a single AST node materialization. Called on demand as the consumer + * walks a binary source-file response's tree, so it is not tied to any one + * request. + */ + recordMaterialization(): void; + /** + * Records a fetched source file: increments the fetched-file counter and adds + * the file's materializable node count to the fetched-node total, which serves + * as the denominator for the share of fetched nodes that end up materialized. + */ + recordSourceFileFetched(materializableNodeCount: number): void; + /** Returns a snapshot of the collected timing information. */ + getInfo(): TimingInfo; + /** Clears all accumulated totals and recent-request history. */ + reset(): void; +} +//# sourceMappingURL=timing.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/timing.d.ts.map b/node_modules/typescript/dist/api/timing.d.ts.map new file mode 100644 index 0000000..43c00b2 --- /dev/null +++ b/node_modules/typescript/dist/api/timing.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"timing.d.ts","sourceRoot":"","sources":["../../src/api/timing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,kEAAkE;AAClE,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC,8DAA8D;AAC9D,MAAM,WAAW,aAAa;IAC1B,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,WAAW,EAAE,MAAM,CAAC;IACpB,0DAA0D;IAC1D,SAAS,EAAE,MAAM,CAAC;IAClB,iEAAiE;IACjE,aAAa,EAAE,MAAM,CAAC;IACtB,mFAAmF;IACnF,SAAS,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,gEAAgE;AAChE,MAAM,WAAW,kBAAkB;IAC/B,mCAAmC;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,oDAAoD;IACpD,WAAW,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,aAAa,EAAE,MAAM,CAAC;IACtB,2DAA2D;IAC3D,YAAY,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAC5B;;;;OAIG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;;;;;OAMG;IACH,YAAY,EAAE,MA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IAEjB,+CAA+C;IAC/C,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI;IAuBlC;;;;OAIG;IACH,qBAAqB,IAAI,IAAI;IAI7B;;;;OAIG;IACH,uBAAuB,CAAC,uBAAuB,EAAE,MAAM,GAAG,IAAI;IAK9D,8DAA8D;IAC9D,OAAO,IAAI,UAAU;IAYrB,gEAAgE;IAChE,KAAK,IAAI,IAAI;CAKhB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/api/timing.js b/node_modules/typescript/dist/api/timing.js new file mode 100644 index 0000000..cd758a4 --- /dev/null +++ b/node_modules/typescript/dist/api/timing.js @@ -0,0 +1,149 @@ +/** + * Client-side collection of per-request timing and transfer measurements. + * + * When enabled, each request records its round-trip latency and the number of + * payload bytes sent and received, accumulated into running totals and a + * fixed-size ring buffer of the most recent requests. + * + * The server measures its own per-request processing time independently. When a + * timing snapshot is requested, the client fetches the server's collection via + * a `getServerTiming` request and folds it into the returned {@link TimingInfo}, + * yielding per-request and total server processing time and an estimated + * transport overhead (round-trip minus server processing time). Normal response + * messages are left unchanged. + */ +/** Number of most-recent requests retained in the ring buffer. */ +export const RECENT_REQUEST_CAPACITY = 5; +function emptyAccumulators() { + return { + requestCount: 0, + roundTripMs: 0, + bytesSent: 0, + bytesReceived: 0, + serverTimeMs: 0, + transportOverheadMs: 0, + nodesMaterialized: 0, + sourceFilesFetched: 0, + nodesFetched: 0, + }; +} +/** Returns a snapshot representing a disabled (never-collecting) timing state. */ +export function disabledTimingInfo() { + return { + enabled: false, + totals: emptyAccumulators(), + recentRequests: [], + }; +} +/** Returns a snapshot representing disabled server-side timing collection. */ +export function disabledServerTimingInfo() { + return { + enabled: false, + totals: { requestCount: 0, totalProcessingTimeMs: 0 }, + recentRequests: [], + }; +} +/** + * Folds a server-side timing snapshot into a client-side snapshot, producing a + * combined {@link TimingInfo} with per-request and total server processing time + * plus estimated transport overhead. + * + * Recent requests are paired newest-to-newest and only matched when the method + * names agree, so that requests recorded by only one side (e.g. the meta + * requests used to fetch timing) do not misalign the two ring buffers. + */ +export function combineTimingInfo(client, server) { + if (!client.enabled) { + return client; + } + const serverTimeMs = server.totals.totalProcessingTimeMs; + const totals = { + ...client.totals, + serverTimeMs, + transportOverheadMs: Math.max(0, client.totals.roundTripMs - serverTimeMs), + }; + const recentRequests = client.recentRequests.map(r => ({ ...r })); + const serverRecent = server.recentRequests; + const pairs = Math.min(recentRequests.length, serverRecent.length); + for (let i = 1; i <= pairs; i++) { + const c = recentRequests[recentRequests.length - i]; + const s = serverRecent[serverRecent.length - i]; + if (c.method === s.method) { + c.serverTimeMs = s.processingTimeMs; + c.transportOverheadMs = Math.max(0, c.roundTripMs - s.processingTimeMs); + } + } + return { + enabled: true, + totals, + recentRequests, + }; +} +/** + * Accumulates request timing samples into running totals and a fixed-size ring + * buffer of the most recent requests. + */ +export class TimingCollector { + totals = emptyAccumulators(); + // Ring buffer of the most recent requests. `ring` grows to at most + // RECENT_REQUEST_CAPACITY; once full, `head` marks the oldest entry. + ring = []; + head = 0; + /** Records a single request's measurements. */ + record(sample) { + this.totals.requestCount++; + this.totals.roundTripMs += sample.roundTripMs; + this.totals.bytesSent += sample.bytesSent; + this.totals.bytesReceived += sample.bytesReceived; + const entry = { + method: sample.method, + roundTripMs: sample.roundTripMs, + bytesSent: sample.bytesSent, + bytesReceived: sample.bytesReceived, + timestamp: Date.now(), + }; + if (this.ring.length < RECENT_REQUEST_CAPACITY) { + this.ring.push(entry); + } + else { + this.ring[this.head] = entry; + this.head = (this.head + 1) % RECENT_REQUEST_CAPACITY; + } + } + /** + * Records a single AST node materialization. Called on demand as the consumer + * walks a binary source-file response's tree, so it is not tied to any one + * request. + */ + recordMaterialization() { + this.totals.nodesMaterialized++; + } + /** + * Records a fetched source file: increments the fetched-file counter and adds + * the file's materializable node count to the fetched-node total, which serves + * as the denominator for the share of fetched nodes that end up materialized. + */ + recordSourceFileFetched(materializableNodeCount) { + this.totals.sourceFilesFetched++; + this.totals.nodesFetched += materializableNodeCount; + } + /** Returns a snapshot of the collected timing information. */ + getInfo() { + const recentRequests = []; + for (let i = 0; i < this.ring.length; i++) { + recentRequests.push(this.ring[(this.head + i) % this.ring.length]); + } + return { + enabled: true, + totals: { ...this.totals }, + recentRequests, + }; + } + /** Clears all accumulated totals and recent-request history. */ + reset() { + this.totals = emptyAccumulators(); + this.ring = []; + this.head = 0; + } +} +//# sourceMappingURL=timing.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/api/timing.js.map b/node_modules/typescript/dist/api/timing.js.map new file mode 100644 index 0000000..4039cf0 --- /dev/null +++ b/node_modules/typescript/dist/api/timing.js.map @@ -0,0 +1 @@ +{"version":3,"file":"timing.js","sourceRoot":"","sources":["../../src/api/timing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,kEAAkE;AAClE,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AA8HzC,SAAS,iBAAiB;IACtB,OAAO;QACH,YAAY,EAAE,CAAC;QACf,WAAW,EAAE,CAAC;QACd,SAAS,EAAE,CAAC;QACZ,aAAa,EAAE,CAAC;QAChB,YAAY,EAAE,CAAC;QACf,mBAAmB,EAAE,CAAC;QACtB,iBAAiB,EAAE,CAAC;QACpB,kBAAkB,EAAE,CAAC;QACrB,YAAY,EAAE,CAAC;KAClB,CAAC;AACN,CAAC;AAED,kFAAkF;AAClF,MAAM,UAAU,kBAAkB;IAC9B,OAAO;QACH,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,iBAAiB,EAAE;QAC3B,cAAc,EAAE,EAAE;KACrB,CAAC;AACN,CAAC;AAED,8EAA8E;AAC9E,MAAM,UAAU,wBAAwB;IACpC,OAAO;QACH,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,EAAE,YAAY,EAAE,CAAC,EAAE,qBAAqB,EAAE,CAAC,EAAE;QACrD,cAAc,EAAE,EAAE;KACrB,CAAC;AACN,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,iBA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,IAAI,CAAC,MAAM,CAAC,YAAY,IAAI,uBAAuB,CAAC;IACxD,CAAC;IAED,8DAA8D;IAC9D,OAAO;QACH,MAAM,cAAc,GAAoB,EAAE,CAAC;QAC3C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACxC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QACvE,CAAC;QACD,OAAO;YACH,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE;YAC1B,cAAc;SACjB,CAAC;IACN,CAAC;IAED,gEAAgE;IAChE,KAAK;QACD,IAAI,CAAC,MAAM,GAAG,iBAAiB,EAAE,CAAC;QAClC,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;IAClB,CAAC;CACJ"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/ast.d.ts b/node_modules/typescript/dist/ast/ast.d.ts new file mode 100644 index 0000000..be41667 --- /dev/null +++ b/node_modules/typescript/dist/ast/ast.d.ts @@ -0,0 +1,100 @@ +import type { InternalSymbolName } from "#enums/internalSymbolName"; +import type { LanguageVariant } from "#enums/languageVariant"; +import type { NodeFlags } from "#enums/nodeFlags"; +import type { ScriptKind } from "#enums/scriptKind"; +import { SyntaxKind } from "#enums/syntaxKind"; +import type { EndOfFile, EntityName, Identifier, KeywordSyntaxKind, ModifierSyntaxKind, PropertyAccessExpression, PunctuationSyntaxKind, Statement, ThisExpression, Token } from "./ast.generated.ts"; +export { SyntaxKind } from "#enums/syntaxKind"; +export { TokenFlags } from "#enums/tokenFlags"; +export * from "./ast.generated.ts"; +export type Path = string & { + __pathBrand: any; +}; +/** + * The escaped form of a symbol/identifier name. Internal compiler names are + * prefixed with `__` (e.g. `__type`, `__call`), and user names that already + * begin with `__` carry an extra leading underscore. Use + * {@link unescapeLeadingUnderscores} to recover the display name and + * {@link escapeLeadingUnderscores} to produce a key from a display name. + */ +export type __String = (string & { + __escapedIdentifier: void; +}) | InternalSymbolName; +export interface TextRange { + pos: number; + end: number; +} +export interface ReadonlyTextRange { + readonly pos: number; + readonly end: number; +} +export interface NodeArray extends ReadonlyArray, ReadonlyTextRange { + hasTrailingComma?: boolean; + transformFlags: number; +} +export interface Node extends ReadonlyTextRange { + readonly kind: SyntaxKind; + readonly flags: NodeFlags; + readonly parent: Node; + readonly jsDoc?: readonly Node[] | undefined; + forEachChild(visitor: (node: Node) => T, visitArray?: (nodes: NodeArray) => T): T | undefined; + getSourceFile(): SourceFile; + getStart(sourceFile?: SourceFile, includeJsDocComment?: boolean): number; + getFullStart(): number; + getEnd(): number; + getWidth(sourceFile?: SourceFile): number; + getFullWidth(): number; + getLeadingTriviaWidth(sourceFile?: SourceFile): number; + getFullText(sourceFile?: SourceFile): string; + getText(sourceFile?: SourceFile): string; +} +export interface FileReference extends TextRange { + readonly fileName: string; + readonly resolutionMode: number; + readonly preserve: boolean; +} +export interface LineAndCharacter { + /** 0-based line number. */ + readonly line: number; + /** 0-based character offset, in UTF-16 code units, from the start of the line. */ + readonly character: number; +} +export interface SourceFile extends Node { + readonly kind: SyntaxKind.SourceFile; + readonly statements: NodeArray; + readonly endOfFileToken: EndOfFile; + readonly text: string; + readonly fileName: string; + readonly path: Path; + readonly languageVariant: LanguageVariant; + readonly scriptKind: ScriptKind; + readonly isDeclarationFile: boolean; + readonly referencedFiles: readonly FileReference[]; + readonly typeReferenceDirectives: readonly FileReference[]; + readonly libReferenceDirectives: readonly FileReference[]; + readonly imports: readonly Node[]; + readonly moduleAugmentations: readonly Node[]; + readonly ambientModuleNames: readonly string[]; + readonly externalModuleIndicator: Node | true | undefined; + /** Returns the UTF-16 code unit offset of the start of each line. */ + getLineStarts(): readonly number[]; + /** Converts a UTF-16 code unit position into a 0-based line and character. */ + getLineAndCharacterOfPosition(position: number): LineAndCharacter; + /** Converts a 0-based line and character into a UTF-16 code unit position. */ + getPositionOfLineAndCharacter(line: number, character: number): number; + /** @internal */ + tokenCache?: Map; +} +export type PunctuationToken = Token; +export type KeywordToken = Token; +export type ModifierToken = KeywordToken; +export interface PropertyAccessEntityNameExpression extends PropertyAccessExpression { + readonly expression: EntityNameExpression; + readonly name: Identifier; +} +export type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression; +export type EntityNameOrEntityNameExpression = EntityName | EntityNameExpression; +export interface JsxTagNamePropertyAccess extends PropertyAccessExpression { + readonly expression: Identifier | ThisExpression | JsxTagNamePropertyAccess; +} +//# sourceMappingURL=ast.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/ast.d.ts.map b/node_modules/typescript/dist/ast/ast.d.ts.map new file mode 100644 index 0000000..33fc88a --- /dev/null +++ b/node_modules/typescript/dist/ast/ast.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/ast/ast.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EACR,SAAS,EACT,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EACxB,qBAAqB,EACrB,SAAS,EACT,cAAc,EACd,KAAK,EACR,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AA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,UAAU,GAAG,cAAc,GAAG,wBAAwB,CAAC;CAC/E"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/ast.generated.d.ts b/node_modules/typescript/dist/ast/ast.generated.d.ts new file mode 100644 index 0000000..1a33d40 --- /dev/null +++ b/node_modules/typescript/dist/ast/ast.generated.d.ts @@ -0,0 +1,1161 @@ +import type { ModifierFlags } from "#enums/modifierFlags"; +import type { NodeFlags } from "#enums/nodeFlags"; +import { SyntaxKind } from "#enums/syntaxKind"; +import { TokenFlags } from "#enums/tokenFlags"; +import type { JsxTagNamePropertyAccess, Node, NodeArray } from "./ast.ts"; +export type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ConflictMarkerTrivia; +export type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral; +export type PseudoLiteralSyntaxKind = SyntaxKind.TemplateHead | SyntaxKind.TemplateMiddle | SyntaxKind.TemplateTail; +export type PunctuationSyntaxKind = SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.DotToken | SyntaxKind.DotDotDotToken | SyntaxKind.SemicolonToken | SyntaxKind.CommaToken | SyntaxKind.QuestionDotToken | SyntaxKind.LessThanToken | SyntaxKind.LessThanSlashToken | SyntaxKind.GreaterThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.EqualsEqualsToken | SyntaxKind.ExclamationEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.EqualsGreaterThanToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.AsteriskToken | SyntaxKind.AsteriskAsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken | SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken | SyntaxKind.ExclamationToken | SyntaxKind.TildeToken | SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken | SyntaxKind.QuestionToken | SyntaxKind.ColonToken | SyntaxKind.AtToken | SyntaxKind.QuestionQuestionToken | SyntaxKind.BacktickToken | SyntaxKind.HashToken | SyntaxKind.EqualsToken | SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.QuestionQuestionEqualsToken | SyntaxKind.CaretEqualsToken; +export type KeywordSyntaxKind = SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.LetKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.StaticKeyword | SyntaxKind.YieldKeyword | SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AssertKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.GetKeyword | SyntaxKind.ImmediateKeyword | SyntaxKind.InferKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.OutKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.RequireKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.SatisfiesKeyword | SyntaxKind.SetKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.TypeKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.UsingKeyword | SyntaxKind.FromKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.OfKeyword | SyntaxKind.DeferKeyword; +export type ModifierSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.ConstKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.ExportKeyword | SyntaxKind.InKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.StaticKeyword; +export type KeywordTypeSyntaxKind = SyntaxKind.AnyKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VoidKeyword; +export type KeywordExpressionSyntaxKind = SyntaxKind.NullKeyword | SyntaxKind.TrueKeyword | SyntaxKind.FalseKeyword | SyntaxKind.ThisKeyword | SyntaxKind.SuperKeyword | SyntaxKind.ImportKeyword; +export type TokenSyntaxKind = SyntaxKind.Unknown | SyntaxKind.EndOfFile | SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ConflictMarkerTrivia | SyntaxKind.NonTextFileMarkerTrivia | SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral | SyntaxKind.TemplateHead | SyntaxKind.TemplateMiddle | SyntaxKind.TemplateTail | SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.DotToken | SyntaxKind.DotDotDotToken | SyntaxKind.SemicolonToken | SyntaxKind.CommaToken | SyntaxKind.QuestionDotToken | SyntaxKind.LessThanToken | SyntaxKind.LessThanSlashToken | SyntaxKind.GreaterThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.EqualsEqualsToken | SyntaxKind.ExclamationEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.EqualsGreaterThanToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.AsteriskToken | SyntaxKind.AsteriskAsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken | SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken | SyntaxKind.ExclamationToken | SyntaxKind.TildeToken | SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken | SyntaxKind.QuestionToken | SyntaxKind.ColonToken | SyntaxKind.AtToken | SyntaxKind.QuestionQuestionToken | SyntaxKind.BacktickToken | SyntaxKind.HashToken | SyntaxKind.EqualsToken | SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.QuestionQuestionEqualsToken | SyntaxKind.CaretEqualsToken | SyntaxKind.Identifier | SyntaxKind.PrivateIdentifier | SyntaxKind.JSDocCommentTextToken | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.LetKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.StaticKeyword | SyntaxKind.YieldKeyword | SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AssertKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.GetKeyword | SyntaxKind.ImmediateKeyword | SyntaxKind.InferKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.OutKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.RequireKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.SatisfiesKeyword | SyntaxKind.SetKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.TypeKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.UsingKeyword | SyntaxKind.FromKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.OfKeyword | SyntaxKind.DeferKeyword; +export type JsxTokenSyntaxKind = SyntaxKind.LessThanSlashToken | SyntaxKind.EndOfFile | SyntaxKind.ConflictMarkerTrivia | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.OpenBraceToken | SyntaxKind.LessThanToken; +export type JSDocNodeSyntaxKind = SyntaxKind.JSDocTypeExpression | SyntaxKind.JSDocNameReference | SyntaxKind.JSDocAllType | SyntaxKind.JSDocNullableType | SyntaxKind.JSDocNonNullableType | SyntaxKind.JSDocOptionalType | SyntaxKind.JSDocVariadicType | SyntaxKind.JSDoc | SyntaxKind.JSDocText | SyntaxKind.JSDocTypeLiteral | SyntaxKind.JSDocSignature | SyntaxKind.JSDocLink | SyntaxKind.JSDocLinkCode | SyntaxKind.JSDocLinkPlain | SyntaxKind.JSDocUnknownTag | SyntaxKind.JSDocAugmentsTag | SyntaxKind.JSDocImplementsTag | SyntaxKind.JSDocDeprecatedTag | SyntaxKind.JSDocPublicTag | SyntaxKind.JSDocPrivateTag | SyntaxKind.JSDocProtectedTag | SyntaxKind.JSDocReadonlyTag | SyntaxKind.JSDocOverrideTag | SyntaxKind.JSDocCallbackTag | SyntaxKind.JSDocOverloadTag | SyntaxKind.JSDocParameterTag | SyntaxKind.JSDocReturnTag | SyntaxKind.JSDocThisTag | SyntaxKind.JSDocTypeTag | SyntaxKind.JSDocTemplateTag | SyntaxKind.JSDocTypedefTag | SyntaxKind.JSDocSeeTag | SyntaxKind.JSDocPropertyTag | SyntaxKind.JSDocThrowsTag | SyntaxKind.JSDocSatisfiesTag | SyntaxKind.JSDocImportTag; +export type ImportPhaseModifierSyntaxKind = SyntaxKind.TypeKeyword | SyntaxKind.DeferKeyword; +export type PostfixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken; +export type PrefixUnaryOperator = SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.TildeToken | SyntaxKind.ExclamationToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken; +export type AssignmentOperator = SyntaxKind.EqualsToken | CompoundAssignmentOperator; +export type BinaryOperator = AssignmentOperatorOrHigher | SyntaxKind.CommaToken; +export type ExponentiationOperator = SyntaxKind.AsteriskAsteriskToken; +export type MultiplicativeOperator = SyntaxKind.AsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken; +export type MultiplicativeOperatorOrHigher = ExponentiationOperator | MultiplicativeOperator; +export type AdditiveOperator = SyntaxKind.PlusToken | SyntaxKind.MinusToken; +export type AdditiveOperatorOrHigher = MultiplicativeOperatorOrHigher | AdditiveOperator; +export type ShiftOperator = SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken; +export type ShiftOperatorOrHigher = AdditiveOperatorOrHigher | ShiftOperator; +export type RelationalOperator = SyntaxKind.LessThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.InstanceOfKeyword | SyntaxKind.InKeyword; +export type RelationalOperatorOrHigher = ShiftOperatorOrHigher | RelationalOperator; +export type EqualityOperator = SyntaxKind.EqualsEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.ExclamationEqualsToken; +export type EqualityOperatorOrHigher = RelationalOperatorOrHigher | EqualityOperator; +export type BitwiseOperator = SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken; +export type BitwiseOperatorOrHigher = EqualityOperatorOrHigher | BitwiseOperator; +export type LogicalOperator = SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken; +export type LogicalOperatorOrHigher = BitwiseOperatorOrHigher | LogicalOperator; +export type CompoundAssignmentOperator = SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.QuestionQuestionEqualsToken; +export type AssignmentOperatorOrHigher = SyntaxKind.QuestionQuestionToken | LogicalOperatorOrHigher | AssignmentOperator; +export type LogicalOrCoalescingAssignmentOperator = SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.QuestionQuestionEqualsToken; +export interface NodeBase extends Node { + readonly flags: NodeFlags; +} +export interface StatementBase extends NodeBase { + readonly _statementBrand: any; +} +export interface IterationStatementBase extends StatementBase { + readonly statement: Statement; +} +export interface ExpressionBase extends NodeBase { + readonly _expressionBrand: any; +} +export interface UnaryExpressionBase extends ExpressionBase { + readonly _unaryExpressionBrand: any; +} +export interface UpdateExpressionBase extends UnaryExpressionBase { + readonly _updateExpressionBrand: any; +} +export interface LeftHandSideExpressionBase extends UpdateExpressionBase { + readonly _leftHandSideExpressionBrand: any; +} +export interface MemberExpressionBase extends LeftHandSideExpressionBase { + readonly _memberExpressionBrand: any; +} +export interface PrimaryExpressionBase extends MemberExpressionBase { + readonly _primaryExpressionBrand: any; +} +export interface TypeNodeBase extends NodeBase { + readonly _typeNodeBrand: any; +} +export interface NodeWithTypeArgumentsBase extends TypeNodeBase { + readonly typeArguments?: NodeArray; +} +export interface JSDocTypeBase extends TypeNodeBase { + readonly _jsDocTypeBrand: any; +} +export interface DeclarationBase extends Node { + readonly _declarationBrand: any; +} +export interface ModifiersBase extends Node { + readonly modifiers?: NodeArray; + readonly modifierFlags: ModifierFlags; +} +export interface FunctionLikeBase extends DeclarationBase { + readonly typeParameters?: NodeArray; + readonly parameters: NodeArray; + readonly type?: TypeNode; + readonly fullSignature?: TypeNode; +} +export interface BodyBase extends Node { + readonly asteriskToken?: AsteriskToken; + readonly body?: NodeBody; +} +export interface FunctionLikeWithBodyBase extends FunctionLikeBase, BodyBase { + readonly _functionLikeDeclarationBrand: any; + readonly body?: BlockOrExpression; +} +export interface ClassLikeBase extends DeclarationBase, ModifiersBase { + readonly name?: Identifier; + readonly typeParameters?: NodeArray; + readonly heritageClauses?: NodeArray; + readonly members: NodeArray; +} +export interface LiteralLikeNodeBase extends Node { + readonly text: string; + readonly tokenFlags: TokenFlags; +} +export interface LiteralExpressionBase extends LiteralLikeNodeBase, PrimaryExpressionBase { + readonly _literalExpressionBrand: any; +} +export interface TemplateLiteralLikeNodeBase extends LiteralLikeNodeBase { + readonly rawText: string; + readonly templateFlags: TokenFlags; +} +export interface TypeElementBase extends Node { + readonly _typeElementBrand: any; +} +export interface ClassElementBase extends Node { + readonly _classElementBrand: any; +} +export interface NamedMemberBase extends DeclarationBase, ModifiersBase { + readonly name: PropertyName; + readonly postfixToken?: QuestionToken | ExclamationToken; +} +export interface ObjectLiteralElementBase extends Node { + readonly _objectLiteralBrand: any; +} +export interface UnionOrIntersectionTypeNodeBase extends TypeNodeBase { + readonly types: NodeArray; +} +export interface JSDocTagBase extends NodeBase { + readonly tagName: Identifier; + readonly comment?: NodeArray; +} +export interface JSDocCommentBase extends NodeBase { + readonly text: string; +} +export interface Token extends NodeBase { + readonly kind: TKind; +} +export interface Identifier extends PrimaryExpressionBase { + readonly kind: SyntaxKind.Identifier; + readonly text: string; +} +export interface PrivateIdentifier extends PrimaryExpressionBase { + readonly kind: SyntaxKind.PrivateIdentifier; + readonly text: string; +} +export interface QualifiedName extends NodeBase { + readonly kind: SyntaxKind.QualifiedName; + readonly left: EntityName; + readonly right: Identifier; +} +export interface ComputedPropertyName extends NodeBase { + readonly kind: SyntaxKind.ComputedPropertyName; + readonly expression: Expression; +} +export interface Decorator extends NodeBase { + readonly kind: SyntaxKind.Decorator; + readonly expression: LeftHandSideExpression; +} +export interface EmptyStatement extends StatementBase { + readonly kind: SyntaxKind.EmptyStatement; +} +export interface IfStatement extends StatementBase { + readonly kind: SyntaxKind.IfStatement; + readonly expression: Expression; + readonly thenStatement: Statement; + readonly elseStatement?: Statement; +} +export interface DoStatement extends IterationStatementBase { + readonly kind: SyntaxKind.DoStatement; + readonly expression: Expression; +} +export interface WhileStatement extends IterationStatementBase { + readonly kind: SyntaxKind.WhileStatement; + readonly expression: Expression; +} +export interface ForStatement extends IterationStatementBase { + readonly kind: SyntaxKind.ForStatement; + readonly initializer?: ForInitializer; + readonly condition?: Expression; + readonly incrementor?: Expression; +} +export interface BreakStatement extends StatementBase { + readonly kind: SyntaxKind.BreakStatement; + readonly label?: Identifier; +} +export interface ContinueStatement extends StatementBase { + readonly kind: SyntaxKind.ContinueStatement; + readonly label?: Identifier; +} +export interface ReturnStatement extends StatementBase { + readonly kind: SyntaxKind.ReturnStatement; + readonly expression?: Expression; +} +export interface WithStatement extends StatementBase { + readonly kind: SyntaxKind.WithStatement; + readonly expression: Expression; + readonly statement: Statement; +} +export interface SwitchStatement extends StatementBase { + readonly kind: SyntaxKind.SwitchStatement; + readonly expression: Expression; + readonly caseBlock: CaseBlock; +} +export interface CaseBlock extends NodeBase { + readonly kind: SyntaxKind.CaseBlock; + readonly clauses: NodeArray; +} +export interface ThrowStatement extends StatementBase { + readonly kind: SyntaxKind.ThrowStatement; + readonly expression: Expression; +} +export interface TryStatement extends StatementBase { + readonly kind: SyntaxKind.TryStatement; + readonly tryBlock: Block; + readonly catchClause?: CatchClause; + readonly finallyBlock?: Block; +} +export interface CatchClause extends NodeBase { + readonly kind: SyntaxKind.CatchClause; + readonly variableDeclaration?: VariableDeclaration; + readonly block: Block; +} +export interface DebuggerStatement extends StatementBase { + readonly kind: SyntaxKind.DebuggerStatement; +} +export interface LabeledStatement extends StatementBase { + readonly kind: SyntaxKind.LabeledStatement; + readonly label: Identifier; + readonly statement: Statement; +} +export interface ExpressionStatement extends StatementBase { + readonly kind: SyntaxKind.ExpressionStatement; + readonly expression: Expression; +} +export interface Block extends StatementBase { + readonly kind: SyntaxKind.Block; + readonly statements: NodeArray; + readonly multiLine: boolean; +} +export interface VariableStatement extends StatementBase, ModifiersBase { + readonly kind: SyntaxKind.VariableStatement; + readonly declarationList: VariableDeclarationList; +} +export interface VariableDeclaration extends NodeBase, DeclarationBase { + readonly kind: SyntaxKind.VariableDeclaration; + readonly name: BindingName; + readonly exclamationToken?: ExclamationToken; + readonly type?: TypeNode; + readonly initializer?: Expression; +} +export interface VariableDeclarationList extends NodeBase { + readonly kind: SyntaxKind.VariableDeclarationList; + readonly declarations: NodeArray; +} +export interface ParameterDeclaration extends NodeBase, DeclarationBase, ModifiersBase { + readonly kind: SyntaxKind.Parameter; + readonly dotDotDotToken?: DotDotDotToken; + readonly name: BindingName; + readonly questionToken?: QuestionToken; + readonly type?: TypeNode; + readonly initializer?: Expression; +} +export interface BindingElement extends NodeBase, DeclarationBase { + readonly kind: SyntaxKind.BindingElement; + readonly dotDotDotToken?: DotDotDotToken; + readonly propertyName?: PropertyName; + readonly name?: BindingName; + readonly initializer?: Expression; +} +export interface MissingDeclaration extends StatementBase, DeclarationBase, ModifiersBase { + readonly kind: SyntaxKind.MissingDeclaration; +} +export interface FunctionDeclaration extends DeclarationBase, StatementBase, ModifiersBase, FunctionLikeWithBodyBase { + readonly kind: SyntaxKind.FunctionDeclaration; + readonly name?: Identifier; + readonly body?: FunctionBody; +} +export interface ClassDeclaration extends DeclarationBase, StatementBase, ClassLikeBase { + readonly kind: SyntaxKind.ClassDeclaration; +} +export interface ClassExpression extends PrimaryExpressionBase, ClassLikeBase { + readonly kind: SyntaxKind.ClassExpression; +} +export interface HeritageClause extends NodeBase { + readonly kind: SyntaxKind.HeritageClause; + readonly token: SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword; + readonly types: NodeArray; +} +export interface InterfaceDeclaration extends DeclarationBase, StatementBase, ModifiersBase { + readonly kind: SyntaxKind.InterfaceDeclaration; + readonly name: Identifier; + readonly typeParameters?: NodeArray; + readonly heritageClauses?: NodeArray; + readonly members: NodeArray; +} +export interface TypeAliasDeclaration extends DeclarationBase, StatementBase, ModifiersBase { + readonly kind: SyntaxKind.TypeAliasDeclaration; + readonly name: Identifier; + readonly typeParameters?: NodeArray; + readonly type: TypeNode; +} +export interface EnumMember extends NodeBase, NamedMemberBase { + readonly kind: SyntaxKind.EnumMember; + readonly initializer?: Expression; +} +export interface EnumDeclaration extends DeclarationBase, StatementBase, ModifiersBase { + readonly kind: SyntaxKind.EnumDeclaration; + readonly name: Identifier; + readonly members: NodeArray; +} +export interface ModuleBlock extends StatementBase { + readonly kind: SyntaxKind.ModuleBlock; + readonly statements: NodeArray; +} +export interface NotEmittedStatement extends StatementBase { + readonly kind: SyntaxKind.NotEmittedStatement; +} +export interface NotEmittedTypeElement extends NodeBase, TypeElementBase { + readonly kind: SyntaxKind.NotEmittedTypeElement; +} +export interface ImportDeclaration extends StatementBase, ModifiersBase, DeclarationBase { + readonly kind: SyntaxKind.ImportDeclaration; + readonly importClause?: ImportClause; + readonly moduleSpecifier: Expression; + readonly attributes?: ImportAttributes; +} +export interface ExternalModuleReference extends NodeBase { + readonly kind: SyntaxKind.ExternalModuleReference; + readonly expression: Expression; +} +export interface NamespaceImport extends NodeBase, DeclarationBase { + readonly kind: SyntaxKind.NamespaceImport; + readonly name: Identifier; +} +export interface NamedImports extends NodeBase { + readonly kind: SyntaxKind.NamedImports; + readonly elements: NodeArray; +} +export interface ExportAssignment extends DeclarationBase, StatementBase, ModifiersBase { + readonly kind: SyntaxKind.ExportAssignment; + readonly isExportEquals: boolean; + readonly type: TypeNode; + readonly expression: Expression; +} +export interface NamespaceExportDeclaration extends DeclarationBase, StatementBase, ModifiersBase { + readonly kind: SyntaxKind.NamespaceExportDeclaration; + readonly name: Identifier; +} +export interface NamespaceExport extends NodeBase, DeclarationBase { + readonly kind: SyntaxKind.NamespaceExport; + readonly name: ModuleExportName; +} +export interface NamedExports extends NodeBase { + readonly kind: SyntaxKind.NamedExports; + readonly elements: NodeArray; +} +export interface ExportSpecifier extends NodeBase, DeclarationBase { + readonly kind: SyntaxKind.ExportSpecifier; + readonly isTypeOnly: boolean; + readonly propertyName?: ModuleExportName; + readonly name: ModuleExportName; +} +export interface CallSignatureDeclaration extends NodeBase, DeclarationBase, FunctionLikeBase, TypeElementBase { + readonly kind: SyntaxKind.CallSignature; +} +export interface ConstructSignatureDeclaration extends NodeBase, DeclarationBase, FunctionLikeBase, TypeElementBase { + readonly kind: SyntaxKind.ConstructSignature; +} +export interface ConstructorDeclaration extends NodeBase, DeclarationBase, ModifiersBase, FunctionLikeWithBodyBase, ClassElementBase { + readonly kind: SyntaxKind.Constructor; + readonly body?: FunctionBody; +} +export interface GetAccessorDeclaration extends NamedMemberBase, FunctionLikeWithBodyBase, TypeElementBase, ClassElementBase, ObjectLiteralElementBase, NodeBase { + readonly kind: SyntaxKind.GetAccessor; + readonly body?: FunctionBody; +} +export interface SetAccessorDeclaration extends NamedMemberBase, FunctionLikeWithBodyBase, TypeElementBase, ClassElementBase, ObjectLiteralElementBase, NodeBase { + readonly kind: SyntaxKind.SetAccessor; + readonly body?: FunctionBody; +} +export interface IndexSignatureDeclaration extends NodeBase, DeclarationBase, ModifiersBase, FunctionLikeBase, TypeElementBase, ClassElementBase { + readonly kind: SyntaxKind.IndexSignature; + readonly type: TypeNode; +} +export interface MethodSignatureDeclaration extends NodeBase, NamedMemberBase, FunctionLikeBase, TypeElementBase { + readonly kind: SyntaxKind.MethodSignature; +} +export interface MethodDeclaration extends NodeBase, NamedMemberBase, FunctionLikeWithBodyBase, ClassElementBase, ObjectLiteralElementBase { + readonly kind: SyntaxKind.MethodDeclaration; + readonly body?: FunctionBody; +} +export interface PropertySignatureDeclaration extends NodeBase, NamedMemberBase, TypeElementBase { + readonly kind: SyntaxKind.PropertySignature; + readonly type: TypeNode; + readonly initializer: Expression; +} +export interface PropertyDeclaration extends NodeBase, NamedMemberBase, ClassElementBase { + readonly kind: SyntaxKind.PropertyDeclaration; + readonly type?: TypeNode; + readonly initializer?: Expression; +} +export interface SemicolonClassElement extends NodeBase, DeclarationBase, ClassElementBase { + readonly kind: SyntaxKind.SemicolonClassElement; +} +export interface ClassStaticBlockDeclaration extends NodeBase, DeclarationBase, ModifiersBase, ClassElementBase { + readonly kind: SyntaxKind.ClassStaticBlockDeclaration; + readonly body: Block; +} +export interface OmittedExpression extends ExpressionBase { + readonly kind: SyntaxKind.OmittedExpression; +} +export interface KeywordExpression extends ExpressionBase { + readonly kind: TKind; +} +export interface StringLiteral extends LiteralExpressionBase { + readonly kind: SyntaxKind.StringLiteral; +} +export interface NumericLiteral extends LiteralExpressionBase { + readonly kind: SyntaxKind.NumericLiteral; +} +export interface BigIntLiteral extends LiteralExpressionBase { + readonly kind: SyntaxKind.BigIntLiteral; +} +export interface RegularExpressionLiteral extends LiteralExpressionBase { + readonly kind: SyntaxKind.RegularExpressionLiteral; +} +export interface NoSubstitutionTemplateLiteral extends ExpressionBase, TemplateLiteralLikeNodeBase, DeclarationBase { + readonly kind: SyntaxKind.NoSubstitutionTemplateLiteral; +} +export interface BinaryExpression extends ExpressionBase, DeclarationBase, ModifiersBase { + readonly kind: SyntaxKind.BinaryExpression; + readonly left: Expression; + readonly type?: TypeNode; + readonly operatorToken: BinaryOperatorToken; + readonly right: Expression; +} +export interface PrefixUnaryExpression extends UpdateExpressionBase { + readonly kind: SyntaxKind.PrefixUnaryExpression; + readonly operator: SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.TildeToken | SyntaxKind.ExclamationToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken; + readonly operand: Expression; +} +export interface PostfixUnaryExpression extends UpdateExpressionBase { + readonly kind: SyntaxKind.PostfixUnaryExpression; + readonly operand: Expression; + readonly operator: SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken; +} +export interface YieldExpression extends ExpressionBase { + readonly kind: SyntaxKind.YieldExpression; + readonly asteriskToken?: AsteriskToken; + readonly expression?: Expression; +} +export interface ArrowFunction extends ExpressionBase, DeclarationBase, ModifiersBase, FunctionLikeWithBodyBase { + readonly kind: SyntaxKind.ArrowFunction; + readonly equalsGreaterThanToken: EqualsGreaterThanToken; + readonly body: ConciseBody; +} +export interface FunctionExpression extends PrimaryExpressionBase, DeclarationBase, ModifiersBase, FunctionLikeWithBodyBase { + readonly kind: SyntaxKind.FunctionExpression; + readonly name?: Identifier; + readonly body: FunctionBody; +} +export interface AsExpression extends ExpressionBase { + readonly kind: SyntaxKind.AsExpression; + readonly expression: Expression; + readonly type: TypeNode; +} +export interface SatisfiesExpression extends ExpressionBase { + readonly kind: SyntaxKind.SatisfiesExpression; + readonly expression: Expression; + readonly type: TypeNode; +} +export interface ConditionalExpression extends ExpressionBase { + readonly kind: SyntaxKind.ConditionalExpression; + readonly condition: Expression; + readonly questionToken: QuestionToken; + readonly whenTrue: Expression; + readonly colonToken: ColonToken; + readonly whenFalse: Expression; +} +export interface PropertyAccessExpression extends MemberExpressionBase { + readonly kind: SyntaxKind.PropertyAccessExpression; + readonly expression: Expression; + readonly questionDotToken?: QuestionDotToken; + readonly name: MemberName; +} +export interface ElementAccessExpression extends MemberExpressionBase { + readonly kind: SyntaxKind.ElementAccessExpression; + readonly expression: Expression; + readonly questionDotToken?: QuestionDotToken; + readonly argumentExpression: Expression; +} +export interface CallExpression extends LeftHandSideExpressionBase, DeclarationBase { + readonly kind: SyntaxKind.CallExpression; + readonly expression: Expression; + readonly questionDotToken?: QuestionDotToken; + readonly typeArguments?: NodeArray; + readonly arguments: NodeArray; +} +export interface NewExpression extends PrimaryExpressionBase { + readonly kind: SyntaxKind.NewExpression; + readonly expression: Expression; + readonly typeArguments?: NodeArray; + readonly arguments?: NodeArray; +} +export interface MetaProperty extends PrimaryExpressionBase { + readonly kind: SyntaxKind.MetaProperty; + readonly keywordToken: SyntaxKind.ImportKeyword | SyntaxKind.NewKeyword; + readonly name: Identifier; +} +export interface NonNullExpression extends LeftHandSideExpressionBase { + readonly kind: SyntaxKind.NonNullExpression; + readonly expression: Expression; +} +export interface SpreadElement extends ExpressionBase { + readonly kind: SyntaxKind.SpreadElement; + readonly expression: Expression; +} +export interface TemplateExpression extends PrimaryExpressionBase { + readonly kind: SyntaxKind.TemplateExpression; + readonly head: TemplateHead; + readonly templateSpans: NodeArray; +} +export interface TemplateSpan extends NodeBase { + readonly kind: SyntaxKind.TemplateSpan; + readonly expression: Expression; + readonly literal: TemplateMiddleOrTail; +} +export interface TaggedTemplateExpression extends MemberExpressionBase { + readonly kind: SyntaxKind.TaggedTemplateExpression; + readonly tag: Expression; + readonly questionDotToken: QuestionDotToken; + readonly typeArguments?: NodeArray; + readonly template: TemplateLiteral; +} +export interface ParenthesizedExpression extends PrimaryExpressionBase { + readonly kind: SyntaxKind.ParenthesizedExpression; + readonly expression: Expression; +} +export interface ArrayLiteralExpression extends PrimaryExpressionBase { + readonly kind: SyntaxKind.ArrayLiteralExpression; + readonly elements: NodeArray; + readonly multiLine: boolean; +} +export interface ObjectLiteralExpression extends PrimaryExpressionBase, DeclarationBase { + readonly kind: SyntaxKind.ObjectLiteralExpression; + readonly properties: NodeArray; + readonly multiLine: boolean; +} +export interface SpreadAssignment extends NodeBase, DeclarationBase, ObjectLiteralElementBase { + readonly kind: SyntaxKind.SpreadAssignment; + readonly expression: Expression; +} +export interface PropertyAssignment extends NodeBase, NamedMemberBase, ObjectLiteralElementBase { + readonly kind: SyntaxKind.PropertyAssignment; + readonly type: TypeNode; + readonly initializer: Expression; +} +export interface ShorthandPropertyAssignment extends NodeBase, NamedMemberBase, ObjectLiteralElementBase { + readonly kind: SyntaxKind.ShorthandPropertyAssignment; + readonly type: TypeNode; + readonly equalsToken?: EqualsToken; + readonly objectAssignmentInitializer?: Expression; +} +export interface DeleteExpression extends UnaryExpressionBase { + readonly kind: SyntaxKind.DeleteExpression; + readonly expression: Expression; +} +export interface TypeOfExpression extends UnaryExpressionBase { + readonly kind: SyntaxKind.TypeOfExpression; + readonly expression: Expression; +} +export interface VoidExpression extends UnaryExpressionBase { + readonly kind: SyntaxKind.VoidExpression; + readonly expression: Expression; +} +export interface AwaitExpression extends UnaryExpressionBase { + readonly kind: SyntaxKind.AwaitExpression; + readonly expression: Expression; +} +export interface TypeAssertion extends UnaryExpressionBase { + readonly kind: SyntaxKind.TypeAssertionExpression; + readonly type: TypeNode; + readonly expression: Expression; +} +export interface KeywordTypeNode extends TypeNodeBase { + readonly kind: TKind; +} +export interface UnionTypeNode extends TypeNodeBase, UnionOrIntersectionTypeNodeBase { + readonly kind: SyntaxKind.UnionType; +} +export interface IntersectionTypeNode extends TypeNodeBase, UnionOrIntersectionTypeNodeBase { + readonly kind: SyntaxKind.IntersectionType; +} +export interface ConditionalTypeNode extends TypeNodeBase { + readonly kind: SyntaxKind.ConditionalType; + readonly checkType: TypeNode; + readonly extendsType: TypeNode; + readonly trueType: TypeNode; + readonly falseType: TypeNode; +} +export interface TypeOperatorNode extends TypeNodeBase { + readonly kind: SyntaxKind.TypeOperator; + readonly operator: SyntaxKind.KeyOfKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.UniqueKeyword; + readonly type: TypeNode; +} +export interface InferTypeNode extends TypeNodeBase { + readonly kind: SyntaxKind.InferType; + readonly typeParameter: TypeParameterDeclaration; +} +export interface ArrayTypeNode extends TypeNodeBase { + readonly kind: SyntaxKind.ArrayType; + readonly elementType: TypeNode; +} +export interface IndexedAccessTypeNode extends TypeNodeBase { + readonly kind: SyntaxKind.IndexedAccessType; + readonly objectType: TypeNode; + readonly indexType: TypeNode; +} +export interface TypeReferenceNode extends NodeWithTypeArgumentsBase { + readonly kind: SyntaxKind.TypeReference; + readonly typeName: EntityName; +} +export interface ExpressionWithTypeArguments extends MemberExpressionBase { + readonly kind: SyntaxKind.ExpressionWithTypeArguments; + readonly expression: Expression; + readonly typeArguments?: NodeArray; +} +export interface LiteralTypeNode extends TypeNodeBase { + readonly kind: SyntaxKind.LiteralType; + readonly literal: Node; +} +export interface ThisTypeNode extends TypeNodeBase { + readonly kind: SyntaxKind.ThisType; +} +export interface TypePredicateNode extends TypeNodeBase { + readonly kind: SyntaxKind.TypePredicate; + readonly assertsModifier?: AssertsKeyword; + readonly parameterName: TypePredicateParameterName; + readonly type?: TypeNode; +} +export interface ImportAttribute extends NodeBase { + readonly kind: SyntaxKind.ImportAttribute; + readonly name: ImportAttributeName; + readonly value: Expression; +} +export interface ImportAttributes extends NodeBase { + readonly kind: SyntaxKind.ImportAttributes; + readonly token: SyntaxKind.WithKeyword | SyntaxKind.AssertKeyword; + readonly attributes: NodeArray; + readonly multiLine: boolean; +} +export interface TypeQueryNode extends NodeWithTypeArgumentsBase { + readonly kind: SyntaxKind.TypeQuery; + readonly exprName: EntityName; +} +export interface MappedTypeNode extends TypeNodeBase, DeclarationBase { + readonly kind: SyntaxKind.MappedType; + readonly readonlyToken?: ReadonlyKeyword | PlusToken | MinusToken; + readonly typeParameter: TypeParameterDeclaration; + readonly nameType?: TypeNode; + readonly questionToken?: QuestionToken | PlusToken | MinusToken; + readonly type?: TypeNode; + readonly members?: NodeArray; +} +export interface TypeLiteralNode extends TypeNodeBase, DeclarationBase { + readonly kind: SyntaxKind.TypeLiteral; + readonly members: NodeArray; +} +export interface TupleTypeNode extends TypeNodeBase { + readonly kind: SyntaxKind.TupleType; + readonly elements: NodeArray; +} +export interface NamedTupleMember extends TypeNodeBase, DeclarationBase { + readonly kind: SyntaxKind.NamedTupleMember; + readonly dotDotDotToken?: DotDotDotToken; + readonly name: Identifier; + readonly questionToken?: QuestionToken; + readonly type: TypeNode; +} +export interface OptionalTypeNode extends TypeNodeBase { + readonly kind: SyntaxKind.OptionalType; + readonly type: TypeNode; +} +export interface RestTypeNode extends TypeNodeBase { + readonly kind: SyntaxKind.RestType; + readonly type: TypeNode; +} +export interface ParenthesizedTypeNode extends TypeNodeBase { + readonly kind: SyntaxKind.ParenthesizedType; + readonly type: TypeNode; +} +export interface FunctionTypeNode extends TypeNodeBase, ModifiersBase, FunctionLikeBase { + readonly kind: SyntaxKind.FunctionType; +} +export interface ConstructorTypeNode extends TypeNodeBase, ModifiersBase, FunctionLikeBase { + readonly kind: SyntaxKind.ConstructorType; +} +export interface TemplateHead extends NodeBase, TemplateLiteralLikeNodeBase { + readonly kind: SyntaxKind.TemplateHead; +} +export interface TemplateMiddle extends NodeBase, TemplateLiteralLikeNodeBase { + readonly kind: SyntaxKind.TemplateMiddle; +} +export interface TemplateTail extends NodeBase, TemplateLiteralLikeNodeBase { + readonly kind: SyntaxKind.TemplateTail; +} +export interface TemplateLiteralTypeNode extends TypeNodeBase { + readonly kind: SyntaxKind.TemplateLiteralType; + readonly head: TemplateHead; + readonly templateSpans: NodeArray; +} +export interface TemplateLiteralTypeSpan extends TypeNodeBase { + readonly kind: SyntaxKind.TemplateLiteralTypeSpan; + readonly type: TypeNode; + readonly literal: TemplateMiddleOrTail; +} +export interface SyntheticExpression extends ExpressionBase { + readonly kind: SyntaxKind.SyntheticExpression; + readonly type: any; + readonly isSpread: boolean; + readonly tupleNameSource?: Node; +} +export interface PartiallyEmittedExpression extends LeftHandSideExpressionBase { + readonly kind: SyntaxKind.PartiallyEmittedExpression; + readonly expression: Expression; +} +export interface JsxElement extends PrimaryExpressionBase { + readonly kind: SyntaxKind.JsxElement; + readonly openingElement: JsxOpeningElement; + readonly children: NodeArray; + readonly closingElement: JsxClosingElement; +} +export interface JsxAttributes extends PrimaryExpressionBase, DeclarationBase { + readonly kind: SyntaxKind.JsxAttributes; + readonly properties: NodeArray; +} +export interface JsxNamespacedName extends ExpressionBase { + readonly kind: SyntaxKind.JsxNamespacedName; + readonly namespace: Identifier; + readonly name: Identifier; +} +export interface JsxOpeningElement extends ExpressionBase { + readonly kind: SyntaxKind.JsxOpeningElement; + readonly tagName: JsxTagNameExpression; + readonly typeArguments?: NodeArray; + readonly attributes: JsxAttributes; +} +export interface JsxSelfClosingElement extends PrimaryExpressionBase { + readonly kind: SyntaxKind.JsxSelfClosingElement; + readonly tagName: JsxTagNameExpression; + readonly typeArguments?: NodeArray; + readonly attributes: JsxAttributes; +} +export interface JsxFragment extends PrimaryExpressionBase { + readonly kind: SyntaxKind.JsxFragment; + readonly openingFragment: JsxOpeningFragment; + readonly children: NodeArray; + readonly closingFragment: JsxClosingFragment; +} +export interface JsxOpeningFragment extends ExpressionBase { + readonly kind: SyntaxKind.JsxOpeningFragment; +} +export interface JsxClosingFragment extends ExpressionBase { + readonly kind: SyntaxKind.JsxClosingFragment; +} +export interface JsxAttribute extends NodeBase, DeclarationBase { + readonly kind: SyntaxKind.JsxAttribute; + readonly name: JsxAttributeName; + readonly initializer?: JsxAttributeValue; +} +export interface JsxSpreadAttribute extends ObjectLiteralElementBase, NodeBase { + readonly kind: SyntaxKind.JsxSpreadAttribute; + readonly expression: Expression; +} +export interface JsxClosingElement extends NodeBase { + readonly kind: SyntaxKind.JsxClosingElement; + readonly tagName: JsxTagNameExpression; +} +export interface JsxExpression extends ExpressionBase { + readonly kind: SyntaxKind.JsxExpression; + readonly dotDotDotToken?: DotDotDotToken; + readonly expression?: Expression; +} +export interface JsxText extends ExpressionBase, LiteralLikeNodeBase { + readonly kind: SyntaxKind.JsxText; + readonly containsOnlyTriviaWhiteSpaces: boolean; +} +export interface SyntaxList extends NodeBase { + readonly kind: SyntaxKind.SyntaxList; + readonly children: readonly Node[]; +} +export interface JSDoc extends NodeBase { + readonly kind: SyntaxKind.JSDoc; + readonly comment: NodeArray; + readonly tags?: NodeArray; +} +export interface JSDocTypeExpression extends TypeNodeBase { + readonly kind: SyntaxKind.JSDocTypeExpression; + readonly type: TypeNode; +} +export interface JSDocNonNullableType extends JSDocTypeBase { + readonly kind: SyntaxKind.JSDocNonNullableType; + readonly type: TypeNode; +} +export interface JSDocNullableType extends JSDocTypeBase { + readonly kind: SyntaxKind.JSDocNullableType; + readonly type: TypeNode; +} +export interface JSDocAllType extends JSDocTypeBase { + readonly kind: SyntaxKind.JSDocAllType; +} +export interface JSDocVariadicType extends JSDocTypeBase { + readonly kind: SyntaxKind.JSDocVariadicType; + readonly type: TypeNode; +} +export interface JSDocOptionalType extends JSDocTypeBase { + readonly kind: SyntaxKind.JSDocOptionalType; + readonly type: TypeNode; +} +export interface JSDocTypeTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocTypeTag; + readonly typeExpression: Node; +} +export interface JSDocUnknownTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocUnknownTag; +} +export interface JSDocTemplateTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocTemplateTag; + readonly constraint: Node; + readonly typeParameters: NodeArray; +} +export interface JSDocReturnTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocReturnTag; + readonly typeExpression?: TypeNode; +} +export interface JSDocPublicTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocPublicTag; +} +export interface JSDocPrivateTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocPrivateTag; +} +export interface JSDocProtectedTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocProtectedTag; +} +export interface JSDocReadonlyTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocReadonlyTag; +} +export interface JSDocOverrideTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocOverrideTag; +} +export interface JSDocDeprecatedTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocDeprecatedTag; +} +export interface JSDocSeeTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocSeeTag; + readonly nameExpression: TypeNode; +} +export interface JSDocImplementsTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocImplementsTag; + readonly className: ExpressionWithTypeArguments; +} +export interface JSDocAugmentsTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocAugmentsTag; + readonly className: ExpressionWithTypeArguments; +} +export interface JSDocSatisfiesTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocSatisfiesTag; + readonly typeExpression: TypeNode; +} +export interface JSDocThrowsTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocThrowsTag; + readonly typeExpression?: TypeNode; +} +export interface JSDocThisTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocThisTag; + readonly typeExpression: TypeNode; +} +export interface JSDocImportTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocImportTag; + readonly importClause?: ImportClause; + readonly moduleSpecifier: Expression; + readonly attributes?: ImportAttributes; +} +export interface JSDocCallbackTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocCallbackTag; + readonly typeExpression: TypeNode; + readonly name?: JSDocFullName; +} +export interface JSDocOverloadTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocOverloadTag; + readonly typeExpression: TypeNode; +} +export interface JSDocTypedefTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocTypedefTag; + readonly typeExpression?: Node; + readonly name?: JSDocFullName; +} +export interface JSDocSignature extends JSDocTypeBase, FunctionLikeBase { + readonly kind: SyntaxKind.JSDocSignature; +} +export interface JSDocNameReference extends TypeNodeBase { + readonly kind: SyntaxKind.JSDocNameReference; + readonly name: EntityName; +} +export interface ModuleDeclaration extends DeclarationBase, StatementBase, ModifiersBase, BodyBase { + readonly kind: SyntaxKind.ModuleDeclaration; + readonly keyword: SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword; + readonly name: ModuleName; + readonly body?: ModuleBody; +} +export interface ImportEqualsDeclaration extends DeclarationBase, StatementBase, ModifiersBase { + readonly kind: SyntaxKind.ImportEqualsDeclaration; + readonly isTypeOnly: boolean; + readonly name: Identifier; + readonly moduleReference: ModuleReference; +} +export interface ExportDeclaration extends DeclarationBase, StatementBase, ModifiersBase { + readonly kind: SyntaxKind.ExportDeclaration; + readonly isTypeOnly: boolean; + readonly exportClause?: NamedExportBindings; + readonly moduleSpecifier?: Expression; + readonly attributes?: ImportAttributes; +} +export interface ImportTypeNode extends NodeWithTypeArgumentsBase { + readonly kind: SyntaxKind.ImportType; + readonly isTypeOf: boolean; + readonly argument: TypeNode; + readonly attributes?: ImportAttributes; + readonly qualifier?: EntityName; +} +export interface ImportClause extends NodeBase, DeclarationBase { + readonly kind: SyntaxKind.ImportClause; + readonly phaseModifier?: ImportPhaseModifierSyntaxKind; + readonly name?: Identifier; + readonly namedBindings?: NamedImportBindings; +} +export interface ImportSpecifier extends NodeBase, DeclarationBase { + readonly kind: SyntaxKind.ImportSpecifier; + readonly isTypeOnly: boolean; + readonly propertyName?: ModuleExportName; + readonly name: Identifier; +} +export interface JSDocText extends JSDocCommentBase { + readonly kind: SyntaxKind.JSDocText; +} +export interface JSDocLink extends JSDocCommentBase { + readonly kind: SyntaxKind.JSDocLink; + readonly name?: EntityName; +} +export interface JSDocLinkPlain extends JSDocCommentBase { + readonly kind: SyntaxKind.JSDocLinkPlain; + readonly name?: EntityName; +} +export interface JSDocLinkCode extends JSDocCommentBase { + readonly kind: SyntaxKind.JSDocLinkCode; + readonly name?: EntityName; +} +export interface TypeParameterDeclaration extends NodeBase, DeclarationBase, ModifiersBase { + readonly kind: SyntaxKind.TypeParameter; + readonly name: Identifier; + readonly constraint?: TypeNode; + readonly expression?: Expression; + readonly defaultType?: TypeNode; +} +export interface SyntheticReferenceExpression extends ExpressionBase { + readonly kind: SyntaxKind.SyntheticReferenceExpression; + readonly expression: Expression; + readonly thisArg: Expression; +} +export interface JSDocTypeLiteral extends JSDocTypeBase, DeclarationBase { + readonly kind: SyntaxKind.JSDocTypeLiteral; + readonly jsdocPropertyTags?: readonly JSDocTag[]; + readonly isArrayType: boolean; +} +export type Expression = ExpressionBase; +export type Statement = StatementBase; +export type TypeNode = TypeNodeBase; +export type BlockOrExpression = Block | Expression; +export type NodeBody = Block | Expression | ModuleBlock | ModuleDeclaration; +export type AccessExpression = PropertyAccessExpression | ElementAccessExpression; +export type DeclarationName = Identifier | PrivateIdentifier | StringLiteral | NumericLiteral | BigIntLiteral | NoSubstitutionTemplateLiteral | ComputedPropertyName | BindingPattern | ElementAccessExpression; +export type ModuleName = Identifier | StringLiteral; +export type ModuleExportName = Identifier | StringLiteral; +export type PropertyName = Identifier | StringLiteral | NoSubstitutionTemplateLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier | BigIntLiteral; +export type ModuleBody = ModuleBlock | ModuleDeclaration; +export type JSDocFullName = Identifier | ModuleDeclaration; +export type ForInitializer = Expression | MissingDeclaration | VariableDeclarationList; +export type ModuleReference = Identifier | QualifiedName | ExternalModuleReference; +export type NamedImportBindings = NamespaceImport | NamedImports; +export type NamedExportBindings = NamespaceExport | NamedExports; +export type MemberName = Identifier | PrivateIdentifier; +export type EntityName = Identifier | QualifiedName; +export type BindingName = Identifier | BindingPattern; +export type ModifierLike = Modifier | Decorator; +export type JsxChild = JsxText | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment; +export type JsxAttributeLike = JsxAttribute | JsxSpreadAttribute; +export type JsxAttributeName = Identifier | JsxNamespacedName; +export type JsxAttributeValue = StringLiteral | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment; +export type JsxTagNameExpression = Identifier | ThisExpression | JsxTagNamePropertyAccess | JsxNamespacedName; +export type ClassLikeDeclaration = ClassDeclaration | ClassExpression; +export type AccessorDeclaration = GetAccessorDeclaration | SetAccessorDeclaration; +export type LiteralLikeNode = StringLiteral | NumericLiteral | BigIntLiteral | RegularExpressionLiteral | TemplateLiteralLikeNode | JsxText; +export type LiteralExpression = StringLiteral | NumericLiteral | BigIntLiteral | RegularExpressionLiteral | NoSubstitutionTemplateLiteral; +export type UnionOrIntersectionTypeNode = UnionTypeNode | IntersectionTypeNode; +export type TemplateLiteralLikeNode = TemplateHead | TemplateMiddle | TemplateTail; +export type TemplateMiddleOrTail = TemplateMiddle | TemplateTail; +export type TemplateLiteral = TemplateExpression | NoSubstitutionTemplateLiteral; +export type TypePredicateParameterName = Identifier | ThisTypeNode; +export type ImportAttributeName = Identifier | StringLiteral; +export type LeftHandSideExpression = LeftHandSideExpressionBase; +export type JSDocComment = JSDocText | JSDocLink | JSDocLinkCode | JSDocLinkPlain; +export type SignatureDeclaration = CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignatureDeclaration | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | FunctionDeclaration | MethodDeclaration | ConstructorDeclaration | AccessorDeclaration | FunctionExpression | ArrowFunction; +export type StringLiteralLikeNode = StringLiteral | NoSubstitutionTemplateLiteral; +export type NumericOrStringLikeLiteral = StringLiteralLikeNode | NumericLiteral; +export type ObjectLiteralLikeNode = ObjectLiteralExpression | ObjectBindingPattern; +export type ObjectTypeDeclaration = ClassLikeDeclaration | InterfaceDeclaration | TypeLiteralNode; +export type JsxOpeningLikeElement = JsxOpeningElement | JsxSelfClosingElement; +export type NamedImportsOrExports = NamedImports | NamedExports; +export type BreakOrContinueStatement = BreakStatement | ContinueStatement; +export type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression | Decorator | JsxOpeningLikeElement | BinaryExpression; +export type FunctionLikeDeclaration = FunctionDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | ConstructorDeclaration | FunctionExpression | ArrowFunction; +export type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration; +export type VariableOrPropertyDeclaration = VariableDeclaration | PropertyDeclaration; +export type CallOrNewExpression = CallExpression | NewExpression; +export type ImportClauseOrBindingPattern = ImportClause | BindingPattern; +export type AnyImportSyntax = ImportDeclaration | ImportEqualsDeclaration; +export type Declaration = DeclarationBase; +export type ClassElement = ClassElementBase; +export type TypeElement = TypeElementBase; +export type ObjectLiteralElement = ObjectLiteralElementBase; +export type JSDocTag = JSDocTagBase; +export type ArrayBindingElement = BindingElement | OmittedExpression; +export type AssertionExpression = TypeAssertion | AsExpression; +export type BooleanLiteral = TrueLiteral | FalseLiteral; +export type ConciseBody = Block | Expression; +export type DestructuringAssignment = ObjectDestructuringAssignment | ArrayDestructuringAssignment; +export type LiteralToken = NumericLiteral | BigIntLiteral | StringLiteral | JsxText | RegularExpressionLiteral | NoSubstitutionTemplateLiteral; +export type Modifier = AbstractKeyword | AccessorKeyword | AsyncKeyword | ConstKeyword | DeclareKeyword | DefaultKeyword | ExportKeyword | InKeyword | PrivateKeyword | ProtectedKeyword | PublicKeyword | ReadonlyKeyword | OutKeyword | OverrideKeyword | StaticKeyword; +export type ObjectLiteralElementLike = PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration; +export type PropertyNameLiteral = Identifier | StringLiteral | NumericLiteral; +export type PseudoLiteralToken = TemplateHead | TemplateMiddle | TemplateTail; +export type TemplateLiteralToken = NoSubstitutionTemplateLiteral | PseudoLiteralToken; +export type ArrayDestructuringAssignment = BinaryExpression; +export type ObjectDestructuringAssignment = BinaryExpression; +export type FunctionBody = Block; +export type IncrementExpression = UpdateExpressionBase; +export interface ForInStatement extends StatementBase { + readonly kind: SyntaxKind.ForInStatement; + readonly awaitModifier?: AwaitKeyword; + readonly initializer: ForInitializer; + readonly expression: Expression; + readonly statement: Statement; +} +export interface ForOfStatement extends StatementBase { + readonly kind: SyntaxKind.ForOfStatement; + readonly awaitModifier?: AwaitKeyword; + readonly initializer: ForInitializer; + readonly expression: Expression; + readonly statement: Statement; +} +export interface CaseClause extends NodeBase { + readonly kind: SyntaxKind.CaseClause; + readonly expression: Expression; + readonly statements: NodeArray; +} +export interface DefaultClause extends NodeBase { + readonly kind: SyntaxKind.DefaultClause; + readonly expression: Expression; + readonly statements: NodeArray; +} +export interface ObjectBindingPattern extends NodeBase { + readonly kind: SyntaxKind.ObjectBindingPattern; + readonly elements: NodeArray; +} +export interface ArrayBindingPattern extends NodeBase { + readonly kind: SyntaxKind.ArrayBindingPattern; + readonly elements: NodeArray; +} +export interface JSDocParameterTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocParameterTag; + readonly name: EntityName; + readonly isBracketed: boolean; + readonly typeExpression?: TypeNode; + readonly isNameFirst: boolean; +} +export interface JSDocPropertyTag extends JSDocTagBase { + readonly kind: SyntaxKind.JSDocPropertyTag; + readonly name: EntityName; + readonly isBracketed: boolean; + readonly typeExpression?: TypeNode; + readonly isNameFirst: boolean; +} +export type ForInOrOfStatement = ForInStatement | ForOfStatement; +export type CaseOrDefaultClause = CaseClause | DefaultClause; +export type BindingPattern = ObjectBindingPattern | ArrayBindingPattern; +export type JSDocParameterOrPropertyTag = JSDocParameterTag | JSDocPropertyTag; +export type EndOfFile = Token; +export type DotToken = Token; +export type DotDotDotToken = Token; +export type QuestionToken = Token; +export type ExclamationToken = Token; +export type ColonToken = Token; +export type EqualsToken = Token; +export type AsteriskToken = Token; +export type EqualsGreaterThanToken = Token; +export type PlusToken = Token; +export type MinusToken = Token; +export type QuestionDotToken = Token; +export type AssertsKeyword = Token; +export type AssertKeyword = Token; +export type AwaitKeyword = Token; +export type CaseKeyword = Token; +export type AbstractKeyword = Token; +export type AccessorKeyword = Token; +export type AsyncKeyword = Token; +export type ConstKeyword = Token; +export type DeclareKeyword = Token; +export type DefaultKeyword = Token; +export type ExportKeyword = Token; +export type InKeyword = Token; +export type PrivateKeyword = Token; +export type ProtectedKeyword = Token; +export type PublicKeyword = Token; +export type ReadonlyKeyword = Token; +export type OutKeyword = Token; +export type OverrideKeyword = Token; +export type StaticKeyword = Token; +export type BinaryOperatorToken = Token; +export type AssignmentOperatorToken = Token; +export type NullLiteral = KeywordExpression; +export type TrueLiteral = KeywordExpression; +export type FalseLiteral = KeywordExpression; +export type ThisExpression = KeywordExpression; +export type SuperExpression = KeywordExpression; +export type ImportExpression = KeywordExpression; +export type StatementList = NodeArray; +export type CaseClausesList = NodeArray; +export type VariableDeclarationNodeList = NodeArray; +export type BindingElementList = NodeArray; +export type TypeParameterList = NodeArray; +export type ParameterList = NodeArray; +export type HeritageClauseList = NodeArray; +export type ClassElementList = NodeArray; +export type TypeElementList = NodeArray; +export type ExpressionWithTypeArgumentsList = NodeArray; +export type EnumMemberList = NodeArray; +export type ImportSpecifierList = NodeArray; +export type ExportSpecifierList = NodeArray; +export type TypeArgumentList = NodeArray; +export type ArgumentList = NodeArray; +export type TemplateSpanList = NodeArray; +export type ElementList = NodeArray; +export type PropertyDefinitionList = NodeArray; +export type TypeList = NodeArray; +export type ImportAttributeList = NodeArray; +export type TemplateLiteralTypeSpanList = NodeArray; +export type JsxChildList = NodeArray; +export type JsxAttributeList = NodeArray; +//# sourceMappingURL=ast.generated.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/ast.generated.d.ts.map b/node_modules/typescript/dist/ast/ast.generated.d.ts.map new file mode 100644 index 0000000..de5e12f --- /dev/null +++ b/node_modules/typescript/dist/ast/ast.generated.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ast.generated.d.ts","sourceRoot":"","sources":["../../src/ast/ast.generated.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,m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gBAAgB,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC;AACvD,MAAM,MAAM,eAAe,GAAG,SAAS,CAAC,WAAW,CAAC,CAAC;AACrD,MAAM,MAAM,+BAA+B,GAAG,SAAS,CAAC,2BAA2B,CAAC,CAAC;AACrF,MAAM,MAAM,cAAc,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC;AACnD,MAAM,MAAM,mBAAmB,GAAG,SAAS,CAAC,eAAe,CAAC,CAAC;AAC7D,MAAM,MAAM,mBAAmB,GAAG,SAAS,CAAC,eAAe,CAAC,CAAC;AAC7D,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AACnD,MAAM,MAAM,YAAY,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC;AACjD,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC;AACvD,MAAM,MAAM,WAAW,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC;AAChD,MAAM,MAAM,sBAAsB,GAAG,SAAS,CAAC,oBAAoB,CAAC,CAAC;AACrE,MAAM,MAAM,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAC3C,MAAM,MAAM,mBAAmB,GAAG,SAAS,CAAC,eAAe,CAAC,CAAC;AAC7D,MAAM,MAAM,2BAA2B,GAAG,SAAS,CAAC,uBAAuB,CAAC,CAAC;AAC7E,MAAM,MAAM,YAAY,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAC/C,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC,gBAAgB,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/ast.generated.js b/node_modules/typescript/dist/ast/ast.generated.js new file mode 100644 index 0000000..b71ee9f --- /dev/null +++ b/node_modules/typescript/dist/ast/ast.generated.js @@ -0,0 +1,4 @@ +// Code generated by _scripts/generate-ts-ast.ts. DO NOT EDIT. +import { SyntaxKind } from "#enums/syntaxKind"; +import { TokenFlags } from "#enums/tokenFlags"; +//# sourceMappingURL=ast.generated.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/ast.generated.js.map b/node_modules/typescript/dist/ast/ast.generated.js.map new file mode 100644 index 0000000..b3226d7 --- /dev/null +++ b/node_modules/typescript/dist/ast/ast.generated.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ast.generated.js","sourceRoot":"","sources":["../../src/ast/ast.generated.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAI9D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/ast.js b/node_modules/typescript/dist/ast/ast.js new file mode 100644 index 0000000..c6a0580 --- /dev/null +++ b/node_modules/typescript/dist/ast/ast.js @@ -0,0 +1,7 @@ +// ast.ts — Hand-written AST type definitions +// Generated types are in ast.generated.ts +import { SyntaxKind } from "#enums/syntaxKind"; +export { SyntaxKind } from "#enums/syntaxKind"; +export { TokenFlags } from "#enums/tokenFlags"; +export * from "./ast.generated.js"; +//# sourceMappingURL=ast.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/ast.js.map b/node_modules/typescript/dist/ast/ast.js.map new file mode 100644 index 0000000..d2693b0 --- /dev/null +++ b/node_modules/typescript/dist/ast/ast.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ast.js","sourceRoot":"","sources":["../../src/ast/ast.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,0CAA0C;AAM1C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAc/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,cAAc,oBAAoB,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/astnav.d.ts b/node_modules/typescript/dist/ast/astnav.d.ts new file mode 100644 index 0000000..518f0b6 --- /dev/null +++ b/node_modules/typescript/dist/ast/astnav.d.ts @@ -0,0 +1,19 @@ +import type { Node, SourceFile } from "./ast.ts"; +export declare function getTokenAtPosition(sourceFile: SourceFile, position: number): Node; +export declare function getTouchingPropertyName(sourceFile: SourceFile, position: number): Node; +export declare function getTouchingToken(sourceFile: SourceFile, position: number): Node; +/** + * Finds the token that starts immediately after `previousToken` ends, searching + * within `parent`. Returns `undefined` if no such token exists. + */ +export declare function findNextToken(previousToken: Node, parent: Node, sourceFile: SourceFile): Node | undefined; +/** + * Finds the leftmost token satisfying `position < token.end`. + * If the position is in the trivia of that leftmost token, or the token is invalid, + * returns the rightmost valid token with `token.end <= position`. + * Excludes `JsxText` tokens containing only whitespace. + */ +export declare function findPrecedingToken(sourceFile: SourceFile, position: number): Node | undefined; +/** @internal */ +export declare function getTokenPosOfNode(node: Node, sourceFile: SourceFile, includeJSDoc?: boolean): number; +//# sourceMappingURL=astnav.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/astnav.d.ts.map b/node_modules/typescript/dist/ast/astnav.d.ts.map new file mode 100644 index 0000000..fc03e0a --- /dev/null +++ b/node_modules/typescript/dist/ast/astnav.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"astnav.d.ts","sourceRoot":"","sources":["../../src/ast/astnav.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACR,IAAI,EAEJ,UAAU,EACb,MAAM,UAAU,CAAC;AAclB,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAEjF;AAED,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAEtF;AAED,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAE/E;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,CAiEzG;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAE7F;AAkMD,gBAAgB;AAChB,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,MAAM,CAapG"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/astnav.js b/node_modules/typescript/dist/ast/astnav.js new file mode 100644 index 0000000..527ab72 --- /dev/null +++ b/node_modules/typescript/dist/ast/astnav.js @@ -0,0 +1,596 @@ +import { NodeFlags } from "#enums/nodeFlags"; +import { SyntaxKind } from "#enums/syntaxKind"; +import { createToken } from "./factory.generated.js"; +import { isJSDocNodeKind, isKeywordKind, isPrivateIdentifier, isPropertyNameLiteral, isTokenKind, } from "./is.js"; +import { createScanner, skipTrivia, } from "./scanner.js"; +export function getTokenAtPosition(sourceFile, position) { + return getTokenAtPositionImpl(sourceFile, position, /*allowPositionInLeadingTrivia*/ true, /*includePrecedingTokenAtEndPosition*/ undefined); +} +export function getTouchingPropertyName(sourceFile, position) { + return getTokenAtPositionImpl(sourceFile, position, /*allowPositionInLeadingTrivia*/ false, node => isPropertyNameLiteral(node) || isKeywordKind(node.kind) || isPrivateIdentifier(node)); +} +export function getTouchingToken(sourceFile, position) { + return getTokenAtPositionImpl(sourceFile, position, /*allowPositionInLeadingTrivia*/ false, /*includePrecedingTokenAtEndPosition*/ undefined); +} +/** + * Finds the token that starts immediately after `previousToken` ends, searching + * within `parent`. Returns `undefined` if no such token exists. + */ +export function findNextToken(previousToken, parent, sourceFile) { + return find(parent); + function find(n) { + if (isTokenKind(n.kind) && n.pos === previousToken.end) { + // This is the token that starts at the end of previousToken – return it. + return n; + } + // Find the child node that contains `previousToken` or starts immediately after it. + let foundNode; + const visitChild = (node) => { + if (node.flags & NodeFlags.Reparsed) { + return undefined; + } + if (node.pos <= previousToken.end && node.end > previousToken.end) { + foundNode = node; + } + return undefined; + }; + // Visit JSDoc children first (mirrors Go's VisitEachChildAndJSDoc). + if (n.jsDoc) { + for (const jsdoc of n.jsDoc) { + visitChild(jsdoc); + } + } + n.forEachChild(visitChild, nodes => { + if (nodes.length > 0 && foundNode === undefined) { + for (const node of nodes) { + if (node.flags & NodeFlags.Reparsed) + continue; + if (node.pos > previousToken.end) + break; + if (node.end > previousToken.end) { + foundNode = node; + break; + } + } + } + return undefined; + }); + // Recurse into the found child. + if (foundNode !== undefined) { + return find(foundNode); + } + // No AST child covers the position; use the scanner to find the syntactic token. + // The scanner is initialized at `previousToken.end`, so tokenFullStart === previousToken.end. + const startPos = previousToken.end; + if (startPos >= n.pos && startPos < n.end) { + const scanner = getScannerForSourceFile(sourceFile, startPos); + const token = scanner.getToken(); + const tokenFullStart = scanner.getTokenFullStart(); + const tokenEnd = scanner.getTokenEnd(); + const flags = scanner.getTokenFlags(); + return getOrCreateToken(sourceFile, token, tokenFullStart, tokenEnd, n, flags); + } + return undefined; + } +} +/** + * Finds the leftmost token satisfying `position < token.end`. + * If the position is in the trivia of that leftmost token, or the token is invalid, + * returns the rightmost valid token with `token.end <= position`. + * Excludes `JsxText` tokens containing only whitespace. + */ +export function findPrecedingToken(sourceFile, position) { + return findPrecedingTokenImpl(sourceFile, position, sourceFile); +} +function getTokenAtPositionImpl(sourceFile, position, allowPositionInLeadingTrivia, includePrecedingTokenAtEndPosition) { + let current = sourceFile; + let nodeAfterLeft; + const state = { + next: undefined, + prevSubtree: undefined, + left: 0, + }; + const testNode = (node) => { + if (node.kind !== SyntaxKind.EndOfFile && node.end === position && includePrecedingTokenAtEndPosition !== undefined) { + state.prevSubtree = node; + } + // A node "contains" the position if position < end, except nodes at the file end + // treat end as inclusive (there's nowhere else to look). This applies to the EOF + // token itself, and to JSDoc nodes reaching EOF (e.g. unterminated JSDoc comments). + if (node.end < position || node.end === position && + node.kind !== SyntaxKind.EndOfFile && + (!isJSDocNodeKind(node.kind) || node.end !== sourceFile.endOfFileToken.end)) { + return -1; + } + const nodePos = getPosition(node, sourceFile, allowPositionInLeadingTrivia); + if (nodePos > position) { + return 1; + } + return 0; + }; + while (true) { + // Visit each child of current to find the one containing the position. + state.next = undefined; + nodeAfterLeft = undefined; + // In Strada, JSDoc nodes with a single comment represent that comment as a string + // property (not a child node), so forEachChild does not visit it. We replicate this + // by detecting single-comment NodeLists in visitList and skipping their elements in visitNode. + let skipSingleCommentChildren = false; + const visitNode = (node) => { + if (node.flags & NodeFlags.Reparsed) { + return undefined; + } + if (skipSingleCommentChildren && isJSDocCommentChildKind(node.kind)) { + return undefined; + } + if (nodeAfterLeft === undefined) { + nodeAfterLeft = node; + } + if (state.next === undefined) { + const result = testNode(node); + switch (result) { + case -1: + if (!isJSDocNodeKind(node.kind)) { + state.left = node.end; + } + nodeAfterLeft = undefined; + break; + case 0: + state.next = node; + break; + } + } + return undefined; + }; + // Visit JSDoc children first, then regular children (mirrors Go's VisitEachChildAndJSDoc). + if (current.jsDoc) { + for (const jsdoc of current.jsDoc) { + visitNode(jsdoc); + } + } + current.forEachChild(visitNode, nodes => { + // Track whether this NodeList is a single-comment list that should be skipped. + // The flag affects the subsequent forEachNode(visitNode) calls for this NodeList. + skipSingleCommentChildren = isJSDocSingleCommentNodeList(nodes); + if (nodes.length === 0 || skipSingleCommentChildren) { + return undefined; + } + if (nodeAfterLeft === undefined) { + for (const node of nodes) { + if (!(node.flags & NodeFlags.Reparsed)) { + nodeAfterLeft = node; + break; + } + } + } + if (state.next === undefined) { + if (nodes.end === position && includePrecedingTokenAtEndPosition !== undefined) { + state.left = nodes.end; + nodeAfterLeft = undefined; + state.prevSubtree = nodes[nodes.length - 1]; + } + else if (nodes.end <= position) { + state.left = nodes.end; + nodeAfterLeft = undefined; + } + else if (nodes.pos <= position) { + binarySearchNodeList(nodes, testNode, (node, middle, arr) => { + state.left = node.end; + nodeAfterLeft = undefined; + for (let i = middle + 1; i < arr.length; i++) { + if (!(arr[i].flags & NodeFlags.Reparsed)) { + nodeAfterLeft = arr[i]; + break; + } + } + }, found => { + state.next = found; + }); + } + } + return undefined; + }); + // If prevSubtree was set, check if the rightmost token of prevSubtree should be returned. + if (state.prevSubtree !== undefined) { + const child = findPrecedingTokenImpl(sourceFile, position, state.prevSubtree); + if (child !== undefined && child.end === position && includePrecedingTokenAtEndPosition(child)) { + return child; + } + state.prevSubtree = undefined; + } + if (state.next === undefined) { + if (isTokenKind(current.kind) || shouldSkipChild(current)) { + return current; + } + // Use the scanner to find a token not stored in the AST. + const scanner = getScannerForSourceFile(sourceFile, state.left); + let end = current.end; + const afterLeft = nodeAfterLeft; + if (afterLeft !== undefined) { + end = afterLeft.pos; + } + while (state.left < end) { + const token = scanner.getToken(); + const tokenFullStart = scanner.getTokenFullStart(); + const tokenStart = allowPositionInLeadingTrivia ? tokenFullStart : scanner.getTokenStart(); + const tokenEnd = scanner.getTokenEnd(); + const flags = scanner.getTokenFlags(); + if (tokenEnd > end) { + break; + } + if (tokenStart <= position && position < tokenEnd) { + if (token === SyntaxKind.Identifier || !isTokenKind(token)) { + if (isJSDocNodeKind(current.kind)) { + return current; + } + throw new Error(`did not expect ${SyntaxKind[current.kind]} to have ${SyntaxKind[token]} in its trivia`); + } + return getOrCreateToken(sourceFile, token, tokenFullStart, tokenEnd, current, flags); + } + if (includePrecedingTokenAtEndPosition !== undefined && tokenEnd === position) { + const prevToken = getOrCreateToken(sourceFile, token, tokenFullStart, tokenEnd, current, flags); + if (includePrecedingTokenAtEndPosition(prevToken)) { + return prevToken; + } + } + state.left = tokenEnd; + scanner.scan(); + } + return current; + } + current = state.next; + state.left = current.pos; + nodeAfterLeft = undefined; + } +} +function getPosition(node, sourceFile, allowPositionInLeadingTrivia) { + if (allowPositionInLeadingTrivia) { + return node.pos; + } + return getTokenPosOfNode(node, sourceFile, /*includeJSDoc*/ true); +} +/** @internal */ +export function getTokenPosOfNode(node, sourceFile, includeJSDoc) { + // With nodes that have no width (i.e. 'Missing' nodes), we actually *don't* + // want to skip trivia because this will launch us forward to the next token. + if (nodeIsMissing(node)) { + return node.pos; + } + if (isJSDocNodeKind(node.kind) || node.kind === SyntaxKind.JsxText) { + return skipTrivia(sourceFile.text, node.pos, /*stopAfterLineBreak*/ false, /*stopAtComments*/ true); + } + if (includeJSDoc && node.jsDoc && node.jsDoc.length > 0) { + return getTokenPosOfNode(node.jsDoc[0], sourceFile, /*includeJSDoc*/ false); + } + return skipTrivia(sourceFile.text, node.pos, /*stopAfterLineBreak*/ false, /*stopAtComments*/ false, /*inJSDoc*/ !!(node.flags & NodeFlags.JSDoc)); +} +function nodeIsMissing(node) { + return node.pos === node.end && node.pos >= 0 && node.kind !== SyntaxKind.EndOfFile; +} +function findPrecedingTokenImpl(sourceFile, position, startNode) { + const find = (n) => { + if (isTokenKind(n.kind) && n.kind !== SyntaxKind.EndOfFile) { + return n; + } + let foundChild; + let prevChild; + // Visit JSDoc nodes first (mirrors Go's VisitEachChildAndJSDoc). + if (n.jsDoc) { + for (const jsdoc of n.jsDoc) { + if (jsdoc.flags & NodeFlags.Reparsed) + continue; + if (foundChild !== undefined) + break; + if (position < jsdoc.end && (prevChild === undefined || prevChild.end <= position)) { + foundChild = jsdoc; + } + else { + prevChild = jsdoc; + } + } + } + let skipSingleCommentChildrenImpl = false; + n.forEachChild(node => { + if (node.flags & NodeFlags.Reparsed) { + return undefined; + } + if (skipSingleCommentChildrenImpl && isJSDocCommentChildKind(node.kind)) { + return undefined; + } + if (foundChild !== undefined) { + return undefined; + } + if (position < node.end && (prevChild === undefined || prevChild.end <= position)) { + foundChild = node; + } + else { + prevChild = node; + } + return undefined; + }, nodes => { + skipSingleCommentChildrenImpl = isJSDocSingleCommentNodeList(nodes); + if (foundChild !== undefined) { + return undefined; + } + if (nodes.length > 0 && !skipSingleCommentChildrenImpl) { + const index = binarySearchForPrecedingToken(nodes, position); + if (index >= 0 && !(nodes[index].flags & NodeFlags.Reparsed)) { + foundChild = nodes[index]; + } + const lookupIndex = index >= 0 ? index - 1 : nodes.length - 1; + for (let i = lookupIndex; i >= 0; i--) { + if (!(nodes[i].flags & NodeFlags.Reparsed)) { + if (prevChild === undefined) { + prevChild = nodes[i]; + } + break; + } + } + } + return undefined; + }); + if (foundChild !== undefined) { + const start = getTokenPosOfNode(foundChild, sourceFile, /*includeJSDoc*/ true); + if (start >= position) { + if (position >= foundChild.pos) { + // We are in the leading trivia of foundChild. Check for JSDoc nodes of n + // preceding foundChild, mirroring Go's findPrecedingToken logic. + let jsDoc; + if (n.jsDoc) { + for (let i = n.jsDoc.length - 1; i >= 0; i--) { + if (n.jsDoc[i].pos >= foundChild.pos) { + jsDoc = n.jsDoc[i]; + break; + } + } + } + if (jsDoc !== undefined) { + if (position < jsDoc.end) { + return find(jsDoc); + } + return findRightmostValidToken(sourceFile, jsDoc.end, n, position); + } + return findRightmostValidToken(sourceFile, foundChild.pos, n, -1); + } + // Answer is in tokens between two visited children. + return findRightmostValidToken(sourceFile, foundChild.pos, n, position); + } + return find(foundChild); + } + if (position >= n.end) { + return findRightmostValidToken(sourceFile, n.end, n, -1); + } + return findRightmostValidToken(sourceFile, n.end, n, position); + }; + return find(startNode); +} +function findRightmostValidToken(sourceFile, endPos, containingNode, position) { + if (position === -1) { + position = containingNode.end; + } + const find = (n, endPos) => { + if (isTokenKind(n.kind) && n.kind !== SyntaxKind.EndOfFile) { + return n; + } + let rightmostValidNode; + let hasChildren = false; + // Visit JSDoc nodes first (mirrors Go's VisitEachChildAndJSDoc). + if (n.jsDoc) { + hasChildren = true; + for (const jsdoc of n.jsDoc) { + if (jsdoc.flags & NodeFlags.Reparsed) + continue; + if (jsdoc.end > endPos || getTokenPosOfNode(jsdoc, sourceFile) >= position) + continue; + if (isValidPrecedingNode(jsdoc, sourceFile)) { + rightmostValidNode = jsdoc; + } + } + } + let skipSingleCommentChildren = false; + n.forEachChild(node => { + if (node.flags & NodeFlags.Reparsed) { + return undefined; + } + if (skipSingleCommentChildren && isJSDocCommentChildKind(node.kind)) { + return undefined; + } + hasChildren = true; + if (node.end > endPos || getTokenPosOfNode(node, sourceFile) >= position) { + return undefined; + } + if (isValidPrecedingNode(node, sourceFile)) { + rightmostValidNode = node; + } + return undefined; + }, nodes => { + // Skip single-comment JSDoc NodeLists (e.g. JSDocText children of a JSDoc node): + // In Go, these are stored as string properties and are never visited as children. + skipSingleCommentChildren = isJSDocSingleCommentNodeList(nodes); + if (nodes.length > 0 && !skipSingleCommentChildren) { + hasChildren = true; + for (let i = nodes.length - 1; i >= 0; i--) { + const node = nodes[i]; + if (node.flags & NodeFlags.Reparsed) + continue; + if (node.end > endPos || getTokenPosOfNode(node, sourceFile) >= position) + continue; + if (isValidPrecedingNode(node, sourceFile)) { + rightmostValidNode = node; + break; + } + } + } + return undefined; + }); + // Scan for syntactic tokens (e.g. `{`, `,`) between AST nodes, matching Go's + // findRightmostValidToken scanner step. + if (!shouldSkipChild(n)) { + const startPos = rightmostValidNode !== undefined ? rightmostValidNode.end : n.pos; + const targetEnd = Math.min(endPos, position); + if (startPos < targetEnd) { + const scanner = getScannerForSourceFile(sourceFile, startPos); + let pos = startPos; + let lastScannedToken; + while (pos < targetEnd) { + const tokenStart = scanner.getTokenStart(); + if (tokenStart >= position) + break; + const tokenFullStart = scanner.getTokenFullStart(); + const tokenEnd = scanner.getTokenEnd(); + const token = scanner.getToken(); + const flags = scanner.getTokenFlags(); + lastScannedToken = getOrCreateToken(sourceFile, token, tokenFullStart, tokenEnd, n, flags); + pos = tokenEnd; + scanner.scan(); + } + if (lastScannedToken !== undefined) { + return lastScannedToken; + } + } + } + if (!hasChildren) { + if (n !== containingNode) { + return n; + } + return undefined; + } + if (rightmostValidNode !== undefined) { + return find(rightmostValidNode, rightmostValidNode.end); + } + return undefined; + }; + return find(containingNode, endPos); +} +function isValidPrecedingNode(node, sourceFile) { + if (node.kind === SyntaxKind.EndOfFile) { + return false; + } + const start = getTokenPosOfNode(node, sourceFile); + const width = node.end - start; + return width > 0; +} +function shouldSkipChild(node) { + return node.kind === SyntaxKind.JSDoc || + node.kind === SyntaxKind.JSDocText || + node.kind === SyntaxKind.JSDocTypeLiteral || + node.kind === SyntaxKind.JSDocSignature || + node.kind === SyntaxKind.JSDocLink || + node.kind === SyntaxKind.JSDocLinkCode || + node.kind === SyntaxKind.JSDocLinkPlain || + isJSDocTag(node); +} +function isJSDocTag(node) { + return node.kind >= SyntaxKind.FirstJSDocTagNode && node.kind <= SyntaxKind.LastJSDocTagNode; +} +// In Strada, if a JSDoc node has a single comment, that comment is represented as a string +// property as a simplification, and therefore that comment is not visited by forEachChild. +// To match, we skip single-element comment NodeLists within JSDoc/JSDocTag nodes. +function isJSDocCommentChildKind(kind) { + switch (kind) { + case SyntaxKind.JSDocText: + case SyntaxKind.JSDocLink: + case SyntaxKind.JSDocLinkCode: + case SyntaxKind.JSDocLinkPlain: + return true; + default: + return false; + } +} +function isJSDocSingleCommentNodeList(nodes) { + return nodes.length === 1 && isJSDocCommentChildKind(nodes[0].kind); +} +function getScannerForSourceFile(sourceFile, pos) { + const scanner = createScanner(/*skipTrivia*/ true, sourceFile.languageVariant, sourceFile.text); + scanner.resetTokenState(pos); + scanner.scan(); + return scanner; +} +function getOrCreateToken(sourceFile, kind, pos, end, parent, _flags) { + const key = `${pos}_${end}`; + if (!sourceFile.tokenCache) { + sourceFile.tokenCache = new Map(); + } + const existing = sourceFile.tokenCache.get(key); + if (existing !== undefined) { + return existing; + } + const token = createToken(kind); + token.pos = pos; + token.end = end; + token.parent = parent; + sourceFile.tokenCache.set(key, token); + return token; +} +/** Binary search a node list for the node containing position. */ +function binarySearchNodeList(nodes, testNode, onLeft, onMatch) { + let lo = 0; + let hi = nodes.length - 1; + while (lo <= hi) { + const mid = (lo + hi) >>> 1; + const node = nodes[mid]; + if (node.flags & NodeFlags.Reparsed) { + // Skip reparsed nodes: try to find a non-reparsed node nearby + let found = false; + for (let i = mid + 1; i <= hi; i++) { + if (!(nodes[i].flags & NodeFlags.Reparsed)) { + const cmp = testNode(nodes[i]); + if (cmp < 0) { + onLeft(nodes[i], i, nodes); + lo = i + 1; + } + else if (cmp > 0) { + hi = i - 1; + } + else { + onMatch(nodes[i]); + return; + } + found = true; + break; + } + } + if (!found) { + hi = mid - 1; + } + continue; + } + const cmp = testNode(node); + if (cmp < 0) { + onLeft(node, mid, nodes); + lo = mid + 1; + } + else if (cmp > 0) { + hi = mid - 1; + } + else { + onMatch(node); + return; + } + } +} +function binarySearchForPrecedingToken(nodes, position) { + let lo = 0; + let hi = nodes.length - 1; + let result = -1; + while (lo <= hi) { + const mid = (lo + hi) >>> 1; + const node = nodes[mid]; + if (node.flags & NodeFlags.Reparsed) { + lo = mid + 1; + continue; + } + if (position < node.end) { + if (mid === 0 || position >= nodes[mid - 1].end) { + result = mid; + break; + } + hi = mid - 1; + } + else { + lo = mid + 1; + } + } + return result; +} +//# sourceMappingURL=astnav.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/astnav.js.map b/node_modules/typescript/dist/ast/astnav.js.map new file mode 100644 index 0000000..e3cd3d0 --- /dev/null +++ b/node_modules/typescript/dist/ast/astnav.js.map @@ -0,0 +1 @@ +{"version":3,"file":"astnav.js","sourceRoot":"","sources":["../../src/ast/astnav.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAO/C,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EACH,eAAe,EACf,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,WAAW,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EACH,aAAa,EACb,UAAU,GACb,MAAM,cAAc,CAAC;AAEtB,MAAM,UAAU,kBAAkB,CAAC,UAAsB,EAAE,QAAgB;IACvE,OAAO,sBAAsB,CAA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AAG,GAAG,GAAG,CAAC,CAAC;QACjB,CAAC;aACI,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC;YACf,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC;QACjB,CAAC;aACI,CAAC;YACF,OAAO,CAAC,IAAI,CAAC,CAAC;YACd,OAAO;QACX,CAAC;IACL,CAAC;AACL,CAAC;AAED,SAAS,6BAA6B,CAAC,KAAsB,EAAE,QAAgB;IAC3E,IAAI,EAAE,GAAG,CAAC,CAAC;IACX,IAAI,EAAE,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IAC1B,IAAI,MAAM,GAAG,CAAC,CAAC,CAAC;IAChB,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC;QACd,MAAM,GAAG,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;QAC5B,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;QACxB,IAAI,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,QAAQ,EAAE,CAAC;YAClC,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC;YACb,SAAS;QACb,CAAC;QACD,IAAI,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;YACtB,IAAI,GAAG,KAAK,CAAC,IAAI,QAAQ,IAAI,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;gBAC9C,MAAM,GAAG,GAAG,CAAC;gBACb,MAAM;YACV,CAAC;YACD,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC;QACjB,CAAC;aACI,CAAC;YACF,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC;QACjB,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/clone.d.ts b/node_modules/typescript/dist/ast/clone.d.ts new file mode 100644 index 0000000..f4aad2d --- /dev/null +++ b/node_modules/typescript/dist/ast/clone.d.ts @@ -0,0 +1,16 @@ +import type { Node, NodeArray } from "./ast.ts"; +/** + * Creates a deep clone of a node and its subtree, synthesizing new nodes for every child. + * The resulting tree has fully set parent pointers. + * + * @param node The node to clone. + * @param includeTrivia Whether to preserve the text range (pos/end) on the clone. + */ +export declare function getSynthesizedDeepClone(node: T, includeTrivia?: boolean): T; +export declare function getSynthesizedDeepClone(node: T | undefined, includeTrivia?: boolean): T | undefined; +/** + * Creates deep clones of a NodeArray and all its elements. + */ +export declare function getSynthesizedDeepClones(nodes: NodeArray, includeTrivia?: boolean): NodeArray; +export declare function getSynthesizedDeepClones(nodes: NodeArray | undefined, includeTrivia?: boolean): NodeArray | undefined; +//# sourceMappingURL=clone.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/clone.d.ts.map b/node_modules/typescript/dist/ast/clone.d.ts.map new file mode 100644 index 0000000..51a7dd3 --- /dev/null +++ b/node_modules/typescript/dist/ast/clone.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"clone.d.ts","sourceRoot":"","sources":["../../src/ast/clone.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACR,IAAI,EACJ,SAAS,EAIZ,MAAM,UAAU,CAAC;AAgFlB;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC;AAC7F,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC,GAAG,SAAS,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,CAAC,GAAG,SAAS,CAAC;AAUrH;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;AACrH,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/clone.js b/node_modules/typescript/dist/ast/clone.js new file mode 100644 index 0000000..eaf403f --- /dev/null +++ b/node_modules/typescript/dist/ast/clone.js @@ -0,0 +1,104 @@ +import { SyntaxKind } from "#enums/syntaxKind"; +import { cloneNode, createNodeArray, createNumericLiteral, createStringLiteral, } from "./factory.generated.js"; +import { visitEachChild } from "./visitor.js"; +function isArray(value) { + // See: https://github.com/microsoft/TypeScript/issues/17002 + return Array.isArray(value); +} +function forEachChildRecursively(rootNode, cbNode, cbNodes) { + const queue = gatherPossibleChildren(rootNode); + const parents = []; // tracks parent references for elements in queue + while (parents.length < queue.length) { + parents.push(rootNode); + } + while (queue.length !== 0) { + const current = queue.pop(); + const parent = parents.pop(); + if (isArray(current)) { + if (cbNodes) { + const res = cbNodes(current, parent); + if (res) { + if (res === "skip") + continue; + return res; + } + } + for (let i = current.length - 1; i >= 0; --i) { + queue.push(current[i]); + parents.push(parent); + } + } + else { + const res = cbNode(current, parent); + if (res) { + if (res === "skip") + continue; + return res; + } + if (current.kind >= SyntaxKind.FirstNode) { + // add children in reverse order to the queue, so popping gives the first child + for (const child of gatherPossibleChildren(current)) { + queue.push(child); + parents.push(current); + } + } + } + } +} +function gatherPossibleChildren(node) { + const children = []; + node.forEachChild(addWorkItem, addWorkItem); // By using a stack above and `unshift` here, we emulate a depth-first preorder traversal + return children; + function addWorkItem(n) { + children.unshift(n); + } +} +function setParentRecursive(rootNode) { + if (rootNode === undefined) + return rootNode; + forEachChildRecursively(rootNode, (child, parent) => { + child.parent = parent; + return undefined; + }); + return rootNode; +} +function setTextRange(node, range) { + if (range) { + node.pos = range.pos; + node.end = range.end; + } + return node; +} +export function getSynthesizedDeepClone(node, includeTrivia = true) { + const clone = node && getSynthesizedDeepCloneWorker(node); + if (clone && !includeTrivia) { + clone.pos = -1; + clone.end = -1; + } + return setParentRecursive(clone); +} +export function getSynthesizedDeepClones(nodes, includeTrivia = true) { + if (nodes) { + const cloned = createNodeArray(nodes.map(n => getSynthesizedDeepClone(n, includeTrivia)), nodes.pos, nodes.end); + return cloned; + } + return nodes; +} +function getSynthesizedDeepCloneWorker(node) { + const visited = visitEachChild(node, n => getSynthesizedDeepCloneWorker(n)); + if (visited === node) { + // Leaf node — visitEachChild returned the same node since there are no children. + // We need to explicitly clone it. + const clone = node.kind === SyntaxKind.StringLiteral + ? createStringLiteral(node.text, node.tokenFlags) + : node.kind === SyntaxKind.NumericLiteral + ? createNumericLiteral(node.text, node.tokenFlags) + : cloneNode(node); + return setTextRange(clone, node); + } + // visitEachChild already created a new node with visited children. + // Clear the parent since setParentRecursive will set it later. + visited.parent = undefined; + return visited; +} +//# sourceMappingURL=clone.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/clone.js.map b/node_modules/typescript/dist/ast/clone.js.map new file mode 100644 index 0000000..707bfdd --- /dev/null +++ b/node_modules/typescript/dist/ast/clone.js.map @@ -0,0 +1 @@ +{"version":3,"file":"clone.js","sourceRoot":"","sources":["../../src/ast/clone.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAQ/C,OAAO,EACH,SAAS,EACT,eAAe,EACf,oBAAoB,EACpB,mBAAmB,GACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,SAAS,OAAO,CAAC,KAAU;IACvB,4DAA4D;IAC5D,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAChC,CAAC;AAED,SAAS,uBAAuB,CAAI,QAAc,EAAE,MAA4D,EAAE,OAA0E;IACxL,MAAM,KAAK,GAA+B,sBAAsB,CAAC,QAAQ,CAAC,CAAC;IAC3E,MAAM,OAAO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,CAAC,CAAC;AACrC,CAAC;AAOD,MAAM,UAAU,wBAAwB,CAAiB,KAA+B,EAAE,aAAa,GAAG,IAAI;IAC1G,IAAI,KAAK,EAAE,CAAC;QACR,MAAM,MAAM,GAAG,eAAe,CAC1B,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,uBAAuB,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,EACzD,KAAK,CAAC,GAAG,EACT,KAAK,CAAC,GAAG,CACZ,CAAC;QACF,OAAO,MAAM,CAAC;IAClB,CAAC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC;AAED,SAAS,6BAA6B,CAAiB,IAAO;IAC1D,MAAM,OAAO,GAAG,cAAc,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC,CAAC;IAE5E,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACnB,iFAAiF;QACjF,kCAAkC;QAClC,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,aAAa;YAChD,CAAC,CAAC,mBAAmB,CAAE,IAA8B,CAAC,IAAI,EAAG,IAA8B,CAAC,UAAU,CAAc;YACpH,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,cAAc;gBACzC,CAAC,CAAC,oBAAoB,CAAE,IAA+B,CAAC,IAAI,EAAG,IAA+B,CAAC,UAAU,CAAc;gBACvH,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACtB,OAAO,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACrC,CAAC;IAED,mEAAmE;IACnE,+DAA+D;IAC9D,OAAe,CAAC,MAAM,GAAG,SAAU,CAAC;IACrC,OAAO,OAAO,CAAC;AACnB,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/factory.generated.d.ts b/node_modules/typescript/dist/ast/factory.generated.d.ts new file mode 100644 index 0000000..e9073d9 --- /dev/null +++ b/node_modules/typescript/dist/ast/factory.generated.d.ts @@ -0,0 +1,520 @@ +import { NodeFlags } from "#enums/nodeFlags"; +import { SyntaxKind } from "#enums/syntaxKind"; +import { TokenFlags } from "#enums/tokenFlags"; +import type { ArrayBindingPattern, ArrayLiteralExpression, ArrayTypeNode, ArrowFunction, AsExpression, AssertsKeyword, AsteriskToken, AwaitExpression, AwaitKeyword, BigIntLiteral, BinaryExpression, BinaryOperatorToken, BindingElement, BindingName, Block, BreakStatement, CallExpression, CallSignatureDeclaration, CaseBlock, CaseClause, CaseOrDefaultClause, CatchClause, ClassDeclaration, ClassElement, ClassExpression, ClassStaticBlockDeclaration, ColonToken, ComputedPropertyName, ConciseBody, ConditionalExpression, ConditionalTypeNode, ConstructorDeclaration, ConstructorTypeNode, ConstructSignatureDeclaration, ContinueStatement, DebuggerStatement, Decorator, DefaultClause, DeleteExpression, DoStatement, DotDotDotToken, ElementAccessExpression, EmptyStatement, EndOfFile, EntityName, EnumDeclaration, EnumMember, EqualsGreaterThanToken, EqualsToken, ExclamationToken, ExportAssignment, ExportDeclaration, ExportSpecifier, Expression, ExpressionStatement, ExpressionWithTypeArguments, ExternalModuleReference, ForInitializer, ForInStatement, ForOfStatement, ForStatement, FunctionBody, FunctionDeclaration, FunctionExpression, FunctionTypeNode, GetAccessorDeclaration, HeritageClause, Identifier, IfStatement, ImportAttribute, ImportAttributeName, ImportAttributes, ImportClause, ImportDeclaration, ImportEqualsDeclaration, ImportPhaseModifierSyntaxKind, ImportSpecifier, ImportTypeNode, IndexedAccessTypeNode, IndexSignatureDeclaration, InferTypeNode, InterfaceDeclaration, IntersectionTypeNode, JSDoc, JSDocAllType, JSDocAugmentsTag, JSDocCallbackTag, JSDocComment, JSDocDeprecatedTag, JSDocFullName, JSDocImplementsTag, JSDocImportTag, JSDocLink, JSDocLinkCode, JSDocLinkPlain, JSDocNameReference, JSDocNonNullableType, JSDocNullableType, JSDocOptionalType, JSDocOverloadTag, JSDocOverrideTag, JSDocParameterTag, JSDocPrivateTag, JSDocPropertyTag, JSDocProtectedTag, JSDocPublicTag, JSDocReadonlyTag, JSDocReturnTag, JSDocSatisfiesTag, JSDocSeeTag, JSDocSignature, JSDocTag, JSDocTemplateTag, JSDocText, JSDocThisTag, JSDocThrowsTag, JSDocTypedefTag, JSDocTypeExpression, JSDocTypeLiteral, JSDocTypeTag, JSDocUnknownTag, JSDocVariadicType, JsxAttribute, JsxAttributeLike, JsxAttributeName, JsxAttributes, JsxAttributeValue, JsxChild, JsxClosingElement, JsxClosingFragment, JsxElement, JsxExpression, JsxFragment, JsxNamespacedName, JsxOpeningElement, JsxOpeningFragment, JsxSelfClosingElement, JsxSpreadAttribute, JsxTagNameExpression, JsxText, KeywordExpression, KeywordExpressionSyntaxKind, KeywordTypeNode, KeywordTypeSyntaxKind, LabeledStatement, LeftHandSideExpression, LiteralTypeNode, MappedTypeNode, MemberName, MetaProperty, MethodDeclaration, MethodSignatureDeclaration, MinusToken, MissingDeclaration, ModifierLike, ModuleBlock, ModuleBody, ModuleDeclaration, ModuleExportName, ModuleName, ModuleReference, NamedExportBindings, NamedExports, NamedImportBindings, NamedImports, NamedTupleMember, NamespaceExport, NamespaceExportDeclaration, NamespaceImport, NewExpression, Node, NodeArray, NonNullExpression, NoSubstitutionTemplateLiteral, NotEmittedStatement, NotEmittedTypeElement, NumericLiteral, ObjectBindingPattern, ObjectLiteralElementLike, ObjectLiteralExpression, OmittedExpression, OptionalTypeNode, ParameterDeclaration, ParenthesizedExpression, ParenthesizedTypeNode, PartiallyEmittedExpression, Path, PlusToken, PostfixUnaryExpression, PrefixUnaryExpression, PrivateIdentifier, PropertyAccessExpression, PropertyAssignment, PropertyDeclaration, PropertyName, PropertySignatureDeclaration, QualifiedName, QuestionDotToken, QuestionToken, ReadonlyKeyword, RegularExpressionLiteral, RestTypeNode, ReturnStatement, SatisfiesExpression, SemicolonClassElement, SetAccessorDeclaration, ShorthandPropertyAssignment, SourceFile, SpreadAssignment, SpreadElement, Statement, StringLiteral, SwitchStatement, SyntaxList, SyntheticExpression, SyntheticReferenceExpression, TaggedTemplateExpression, TemplateExpression, TemplateHead, TemplateLiteral, TemplateLiteralTypeNode, TemplateLiteralTypeSpan, TemplateMiddle, TemplateMiddleOrTail, TemplateSpan, TemplateTail, ThisTypeNode, ThrowStatement, Token, TokenSyntaxKind, TryStatement, TupleTypeNode, TypeAliasDeclaration, TypeAssertion, TypeElement, TypeLiteralNode, TypeNode, TypeOfExpression, TypeOperatorNode, TypeParameterDeclaration, TypePredicateNode, TypePredicateParameterName, TypeQueryNode, TypeReferenceNode, UnionTypeNode, VariableDeclaration, VariableDeclarationList, VariableStatement, VoidExpression, WhileStatement, WithStatement, YieldExpression } from "./ast.ts"; +export declare class NodeObject { + readonly kind: SyntaxKind; + flags: NodeFlags; + readonly pos: number; + readonly end: number; + parent: Node; + _data: any; + constructor(kind: SyntaxKind, data: any); + get ambientModuleNames(): any; + get argument(): any; + get argumentExpression(): any; + get arguments(): any; + get assertsModifier(): any; + get asteriskToken(): any; + get attributes(): any; + get awaitModifier(): any; + get block(): any; + get body(): any; + get caseBlock(): any; + get catchClause(): any; + get checkType(): any; + get children(): any; + get className(): any; + get clauses(): any; + get closingElement(): any; + get closingFragment(): any; + get colonToken(): any; + get comment(): any; + get condition(): any; + get constraint(): any; + get containsOnlyTriviaWhiteSpaces(): any; + get declarationList(): any; + get declarations(): any; + get defaultType(): any; + get dotDotDotToken(): any; + get elementType(): any; + get elements(): any; + get elseStatement(): any; + get endOfFileToken(): any; + get equalsGreaterThanToken(): any; + get equalsToken(): any; + get exclamationToken(): any; + get exportClause(): any; + get exprName(): any; + get expression(): any; + get extendsType(): any; + get externalModuleIndicator(): any; + get falseType(): any; + get fileName(): any; + get finallyBlock(): any; + get head(): any; + get heritageClauses(): any; + get importClause(): any; + get imports(): any; + get incrementor(): any; + get indexType(): any; + get initializer(): any; + get isArrayType(): any; + get isBracketed(): any; + get isDeclarationFile(): any; + get isExportEquals(): any; + get isNameFirst(): any; + get isSpread(): any; + get isTypeOf(): any; + get isTypeOnly(): any; + get jsdocPropertyTags(): any; + get keyword(): any; + get keywordToken(): any; + get label(): any; + get languageVariant(): any; + get left(): any; + get libReferenceDirectives(): any; + get literal(): any; + get members(): any; + get modifiers(): any; + get moduleAugmentations(): any; + get moduleReference(): any; + get moduleSpecifier(): any; + get multiLine(): any; + get name(): any; + get nameExpression(): any; + get nameType(): any; + get namedBindings(): any; + get namespace(): any; + get objectAssignmentInitializer(): any; + get objectType(): any; + get openingElement(): any; + get openingFragment(): any; + get operand(): any; + get operator(): any; + get operatorToken(): any; + get parameterName(): any; + get parameters(): any; + get path(): any; + get phaseModifier(): any; + get postfixToken(): any; + get properties(): any; + get propertyName(): any; + get qualifier(): any; + get questionDotToken(): any; + get questionToken(): any; + get rawText(): any; + get readonlyToken(): any; + get referencedFiles(): any; + get right(): any; + get scriptKind(): any; + get statement(): any; + get statements(): any; + get tag(): any; + get tagName(): any; + get tags(): any; + get template(): any; + get templateFlags(): any; + get templateSpans(): any; + get text(): any; + get thenStatement(): any; + get thisArg(): any; + get token(): any; + get tokenCache(): any; + get tokenFlags(): any; + get trueType(): any; + get tryBlock(): any; + get tupleNameSource(): any; + get type(): any; + get typeArguments(): any; + get typeExpression(): any; + get typeName(): any; + get typeParameter(): any; + get typeParameters(): any; + get typeReferenceDirectives(): any; + get types(): any; + get value(): any; + get variableDeclaration(): any; + get whenFalse(): any; + get whenTrue(): any; + forEachChild(visitor: (node: Node) => T, visitArray?: (nodes: NodeArray) => T): T | undefined; + getSourceFile(): SourceFile; + getStart(sourceFile?: SourceFile, includeJsDocComment?: boolean): number; + getFullStart(): number; + getEnd(): number; + getWidth(sourceFile?: SourceFile): number; + getFullWidth(): number; + getLeadingTriviaWidth(sourceFile?: SourceFile): number; + getFullText(sourceFile?: SourceFile): string; + getText(sourceFile?: SourceFile): string; +} +export declare function createNodeArray(elements: readonly T[], pos?: number, end?: number): NodeArray; +export declare function cloneNode(node: T): T; +export declare function createToken(kind: TKind): Token; +export declare function createIdentifier(text: string): Identifier; +export declare function createPrivateIdentifier(text: string): PrivateIdentifier; +export declare function createQualifiedName(left: EntityName, right: Identifier): QualifiedName; +export declare function createComputedPropertyName(expression: Expression): ComputedPropertyName; +export declare function createDecorator(expression: LeftHandSideExpression): Decorator; +export declare function createEmptyStatement(): EmptyStatement; +export declare function createIfStatement(expression: Expression, thenStatement: Statement, elseStatement?: Statement): IfStatement; +export declare function createDoStatement(statement: Statement, expression: Expression): DoStatement; +export declare function createWhileStatement(expression: Expression, statement: Statement): WhileStatement; +export declare function createForStatement(initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement): ForStatement; +export declare function createBreakStatement(label?: Identifier): BreakStatement; +export declare function createContinueStatement(label?: Identifier): ContinueStatement; +export declare function createReturnStatement(expression?: Expression): ReturnStatement; +export declare function createWithStatement(expression: Expression, statement: Statement): WithStatement; +export declare function createSwitchStatement(expression: Expression, caseBlock: CaseBlock): SwitchStatement; +export declare function createCaseBlock(clauses: readonly CaseOrDefaultClause[]): CaseBlock; +export declare function createThrowStatement(expression: Expression): ThrowStatement; +export declare function createTryStatement(tryBlock: Block, catchClause?: CatchClause, finallyBlock?: Block): TryStatement; +export declare function createCatchClause(variableDeclaration: VariableDeclaration | undefined, block: Block): CatchClause; +export declare function createDebuggerStatement(): DebuggerStatement; +export declare function createLabeledStatement(label: Identifier, statement: Statement): LabeledStatement; +export declare function createExpressionStatement(expression: Expression): ExpressionStatement; +export declare function createBlock(statements: readonly Statement[], multiLine?: boolean): Block; +export declare function createVariableStatement(modifiers: readonly ModifierLike[] | undefined, declarationList: VariableDeclarationList): VariableStatement; +export declare function createVariableDeclaration(name: BindingName, exclamationToken?: ExclamationToken, type?: TypeNode, initializer?: Expression): VariableDeclaration; +export declare function createVariableDeclarationList(declarations: readonly VariableDeclaration[], flags: NodeFlags): VariableDeclarationList; +export declare function createParameterDeclaration(modifiers: readonly ModifierLike[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: BindingName, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression): ParameterDeclaration; +export declare function createBindingElement(dotDotDotToken?: DotDotDotToken, propertyName?: PropertyName, name?: BindingName, initializer?: Expression): BindingElement; +export declare function createMissingDeclaration(modifiers?: readonly ModifierLike[]): MissingDeclaration; +export declare function createFunctionDeclaration(modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode, body?: FunctionBody): FunctionDeclaration; +export declare function createClassDeclaration(modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration; +export declare function createClassExpression(modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression; +export declare function createHeritageClause(token: SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword, types: readonly ExpressionWithTypeArguments[]): HeritageClause; +export declare function createInterfaceDeclaration(modifiers: readonly ModifierLike[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; +export declare function createTypeAliasDeclaration(modifiers: readonly ModifierLike[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; +export declare function createEnumMember(name: PropertyName, initializer?: Expression): EnumMember; +export declare function createEnumDeclaration(modifiers: readonly ModifierLike[] | undefined, name: Identifier, members: readonly EnumMember[]): EnumDeclaration; +export declare function createModuleBlock(statements: readonly Statement[]): ModuleBlock; +export declare function createNotEmittedStatement(): NotEmittedStatement; +export declare function createNotEmittedTypeElement(): NotEmittedTypeElement; +export declare function createImportDeclaration(modifiers: readonly ModifierLike[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, attributes?: ImportAttributes): ImportDeclaration; +export declare function createExternalModuleReference(expression: Expression): ExternalModuleReference; +export declare function createNamespaceImport(name: Identifier): NamespaceImport; +export declare function createNamedImports(elements: readonly ImportSpecifier[]): NamedImports; +export declare function createExportAssignment(modifiers: readonly ModifierLike[] | undefined, isExportEquals: boolean | undefined, type: TypeNode, expression: Expression): ExportAssignment; +export declare function createNamespaceExportDeclaration(modifiers: readonly ModifierLike[] | undefined, name: Identifier): NamespaceExportDeclaration; +export declare function createNamespaceExport(name: ModuleExportName): NamespaceExport; +export declare function createNamedExports(elements: readonly ExportSpecifier[]): NamedExports; +export declare function createExportSpecifier(isTypeOnly: boolean | undefined, propertyName: ModuleExportName | undefined, name: ModuleExportName): ExportSpecifier; +export declare function createCallSignatureDeclaration(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): CallSignatureDeclaration; +export declare function createConstructSignatureDeclaration(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): ConstructSignatureDeclaration; +export declare function createConstructorDeclaration(modifiers: readonly ModifierLike[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode, body?: FunctionBody): ConstructorDeclaration; +export declare function createGetAccessorDeclaration(modifiers: readonly ModifierLike[] | undefined, name: PropertyName, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode, body?: FunctionBody): GetAccessorDeclaration; +export declare function createSetAccessorDeclaration(modifiers: readonly ModifierLike[] | undefined, name: PropertyName, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode, body?: FunctionBody): SetAccessorDeclaration; +export declare function createIndexSignatureDeclaration(modifiers: readonly ModifierLike[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; +export declare function createMethodSignatureDeclaration(modifiers: readonly ModifierLike[] | undefined, name: PropertyName, postfixToken: QuestionToken | ExclamationToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): MethodSignatureDeclaration; +export declare function createMethodDeclaration(modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: PropertyName, postfixToken: QuestionToken | ExclamationToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode, body?: FunctionBody): MethodDeclaration; +export declare function createPropertySignatureDeclaration(modifiers: readonly ModifierLike[] | undefined, name: PropertyName, postfixToken: QuestionToken | ExclamationToken | undefined, type: TypeNode, initializer: Expression): PropertySignatureDeclaration; +export declare function createPropertyDeclaration(modifiers: readonly ModifierLike[] | undefined, name: PropertyName, postfixToken?: QuestionToken | ExclamationToken, type?: TypeNode, initializer?: Expression): PropertyDeclaration; +export declare function createSemicolonClassElement(): SemicolonClassElement; +export declare function createClassStaticBlockDeclaration(modifiers: readonly ModifierLike[] | undefined, body: Block): ClassStaticBlockDeclaration; +export declare function createOmittedExpression(): OmittedExpression; +export declare function createKeywordExpression(kind: TKind): KeywordExpression; +export declare function createStringLiteral(text: string, tokenFlags: TokenFlags): StringLiteral; +export declare function createNumericLiteral(text: string, tokenFlags: TokenFlags): NumericLiteral; +export declare function createBigIntLiteral(text: string, tokenFlags: TokenFlags): BigIntLiteral; +export declare function createRegularExpressionLiteral(text: string, tokenFlags: TokenFlags): RegularExpressionLiteral; +export declare function createNoSubstitutionTemplateLiteral(text: string, templateFlags: TokenFlags): NoSubstitutionTemplateLiteral; +export declare function createBinaryExpression(modifiers: readonly ModifierLike[] | undefined, left: Expression, type: TypeNode | undefined, operatorToken: BinaryOperatorToken, right: Expression): BinaryExpression; +export declare function createPrefixUnaryExpression(operator: SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.TildeToken | SyntaxKind.ExclamationToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken, operand: Expression): PrefixUnaryExpression; +export declare function createPostfixUnaryExpression(operand: Expression, operator: SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken): PostfixUnaryExpression; +export declare function createYieldExpression(asteriskToken?: AsteriskToken, expression?: Expression): YieldExpression; +export declare function createArrowFunction(modifiers: readonly ModifierLike[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken, body: ConciseBody): ArrowFunction; +export declare function createFunctionExpression(modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: FunctionBody): FunctionExpression; +export declare function createAsExpression(expression: Expression, type: TypeNode): AsExpression; +export declare function createSatisfiesExpression(expression: Expression, type: TypeNode): SatisfiesExpression; +export declare function createConditionalExpression(condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression): ConditionalExpression; +export declare function createPropertyAccessExpression(expression: Expression, questionDotToken: QuestionDotToken | undefined, name: MemberName, flags: NodeFlags): PropertyAccessExpression; +export declare function createElementAccessExpression(expression: Expression, questionDotToken: QuestionDotToken | undefined, argumentExpression: Expression, flags: NodeFlags): ElementAccessExpression; +export declare function createCallExpression(expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, arguments_: readonly Expression[], flags: NodeFlags): CallExpression; +export declare function createNewExpression(expression: Expression, typeArguments?: readonly TypeNode[], arguments_?: readonly Expression[]): NewExpression; +export declare function createMetaProperty(keywordToken: SyntaxKind.ImportKeyword | SyntaxKind.NewKeyword, name: Identifier): MetaProperty; +export declare function createNonNullExpression(expression: Expression, flags: NodeFlags): NonNullExpression; +export declare function createSpreadElement(expression: Expression): SpreadElement; +export declare function createTemplateExpression(head: TemplateHead, templateSpans: readonly TemplateSpan[]): TemplateExpression; +export declare function createTemplateSpan(expression: Expression, literal: TemplateMiddleOrTail): TemplateSpan; +export declare function createTaggedTemplateExpression(tag: Expression, questionDotToken: QuestionDotToken, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral, flags: NodeFlags): TaggedTemplateExpression; +export declare function createParenthesizedExpression(expression: Expression): ParenthesizedExpression; +export declare function createArrayLiteralExpression(elements: readonly Expression[], multiLine?: boolean): ArrayLiteralExpression; +export declare function createObjectLiteralExpression(properties: readonly ObjectLiteralElementLike[], multiLine?: boolean): ObjectLiteralExpression; +export declare function createSpreadAssignment(expression: Expression): SpreadAssignment; +export declare function createPropertyAssignment(modifiers: readonly ModifierLike[] | undefined, name: PropertyName, postfixToken: QuestionToken | ExclamationToken | undefined, type: TypeNode, initializer: Expression): PropertyAssignment; +export declare function createShorthandPropertyAssignment(modifiers: readonly ModifierLike[] | undefined, name: PropertyName, postfixToken: QuestionToken | ExclamationToken | undefined, type: TypeNode, equalsToken?: EqualsToken, objectAssignmentInitializer?: Expression): ShorthandPropertyAssignment; +export declare function createDeleteExpression(expression: Expression): DeleteExpression; +export declare function createTypeOfExpression(expression: Expression): TypeOfExpression; +export declare function createVoidExpression(expression: Expression): VoidExpression; +export declare function createAwaitExpression(expression: Expression): AwaitExpression; +export declare function createTypeAssertion(type: TypeNode, expression: Expression): TypeAssertion; +export declare function createKeywordTypeNode(kind: TKind): KeywordTypeNode; +export declare function createUnionTypeNode(types: readonly TypeNode[]): UnionTypeNode; +export declare function createIntersectionTypeNode(types: readonly TypeNode[]): IntersectionTypeNode; +export declare function createConditionalTypeNode(checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode): ConditionalTypeNode; +export declare function createTypeOperatorNode(operator: SyntaxKind.KeyOfKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.UniqueKeyword, type: TypeNode): TypeOperatorNode; +export declare function createInferTypeNode(typeParameter: TypeParameterDeclaration): InferTypeNode; +export declare function createArrayTypeNode(elementType: TypeNode): ArrayTypeNode; +export declare function createIndexedAccessTypeNode(objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode; +export declare function createTypeReferenceNode(typeName: EntityName, typeArguments?: readonly TypeNode[]): TypeReferenceNode; +export declare function createExpressionWithTypeArguments(expression: Expression, typeArguments?: readonly TypeNode[]): ExpressionWithTypeArguments; +export declare function createLiteralTypeNode(literal: Node): LiteralTypeNode; +export declare function createThisTypeNode(): ThisTypeNode; +export declare function createTypePredicateNode(assertsModifier: AssertsKeyword | undefined, parameterName: TypePredicateParameterName, type?: TypeNode): TypePredicateNode; +export declare function createImportAttribute(name: ImportAttributeName, value: Expression): ImportAttribute; +export declare function createImportAttributes(token: SyntaxKind.WithKeyword | SyntaxKind.AssertKeyword, attributes: readonly ImportAttribute[], multiLine?: boolean): ImportAttributes; +export declare function createTypeQueryNode(exprName: EntityName, typeArguments?: readonly TypeNode[]): TypeQueryNode; +export declare function createMappedTypeNode(readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType?: TypeNode, questionToken?: QuestionToken | PlusToken | MinusToken, type?: TypeNode, members?: readonly TypeElement[]): MappedTypeNode; +export declare function createTypeLiteralNode(members: readonly TypeElement[]): TypeLiteralNode; +export declare function createTupleTypeNode(elements: readonly TypeNode[]): TupleTypeNode; +export declare function createNamedTupleMember(dotDotDotToken: DotDotDotToken | undefined, name: Identifier, questionToken: QuestionToken | undefined, type: TypeNode): NamedTupleMember; +export declare function createOptionalTypeNode(type: TypeNode): OptionalTypeNode; +export declare function createRestTypeNode(type: TypeNode): RestTypeNode; +export declare function createParenthesizedTypeNode(type: TypeNode): ParenthesizedTypeNode; +export declare function createFunctionTypeNode(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): FunctionTypeNode; +export declare function createConstructorTypeNode(modifiers: readonly ModifierLike[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): ConstructorTypeNode; +export declare function createTemplateHead(text: string, rawText: string, templateFlags: TokenFlags): TemplateHead; +export declare function createTemplateMiddle(text: string, rawText: string, templateFlags: TokenFlags): TemplateMiddle; +export declare function createTemplateTail(text: string, rawText: string, templateFlags: TokenFlags): TemplateTail; +export declare function createTemplateLiteralTypeNode(head: TemplateHead, templateSpans: readonly TemplateLiteralTypeSpan[]): TemplateLiteralTypeNode; +export declare function createTemplateLiteralTypeSpan(type: TypeNode, literal: TemplateMiddleOrTail): TemplateLiteralTypeSpan; +export declare function createSyntheticExpression(type: any, isSpread?: boolean, tupleNameSource?: Node): SyntheticExpression; +export declare function createPartiallyEmittedExpression(expression: Expression): PartiallyEmittedExpression; +export declare function createJsxElement(openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement): JsxElement; +export declare function createJsxAttributes(properties: readonly JsxAttributeLike[]): JsxAttributes; +export declare function createJsxNamespacedName(namespace: Identifier, name: Identifier): JsxNamespacedName; +export declare function createJsxOpeningElement(tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxOpeningElement; +export declare function createJsxSelfClosingElement(tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxSelfClosingElement; +export declare function createJsxFragment(openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment; +export declare function createJsxOpeningFragment(): JsxOpeningFragment; +export declare function createJsxClosingFragment(): JsxClosingFragment; +export declare function createJsxAttribute(name: JsxAttributeName, initializer?: JsxAttributeValue): JsxAttribute; +export declare function createJsxSpreadAttribute(expression: Expression): JsxSpreadAttribute; +export declare function createJsxClosingElement(tagName: JsxTagNameExpression): JsxClosingElement; +export declare function createJsxExpression(dotDotDotToken?: DotDotDotToken, expression?: Expression): JsxExpression; +export declare function createJsxText(text: string, containsOnlyTriviaWhiteSpaces?: boolean): JsxText; +export declare function createSyntaxList(children: readonly Node[]): SyntaxList; +export declare function createJSDoc(comment: readonly JSDocComment[], tags?: readonly JSDocTag[]): JSDoc; +export declare function createJSDocTypeExpression(type: TypeNode): JSDocTypeExpression; +export declare function createJSDocNonNullableType(type: TypeNode): JSDocNonNullableType; +export declare function createJSDocNullableType(type: TypeNode): JSDocNullableType; +export declare function createJSDocAllType(): JSDocAllType; +export declare function createJSDocVariadicType(type: TypeNode): JSDocVariadicType; +export declare function createJSDocOptionalType(type: TypeNode): JSDocOptionalType; +export declare function createJSDocTypeTag(tagName: Identifier, typeExpression: Node, comment?: readonly JSDocComment[]): JSDocTypeTag; +export declare function createJSDocUnknownTag(tagName: Identifier, comment?: readonly JSDocComment[]): JSDocUnknownTag; +export declare function createJSDocTemplateTag(tagName: Identifier, constraint: Node, typeParameters: readonly TypeParameterDeclaration[], comment?: readonly JSDocComment[]): JSDocTemplateTag; +export declare function createJSDocReturnTag(tagName: Identifier, typeExpression?: TypeNode, comment?: readonly JSDocComment[]): JSDocReturnTag; +export declare function createJSDocPublicTag(tagName: Identifier, comment?: readonly JSDocComment[]): JSDocPublicTag; +export declare function createJSDocPrivateTag(tagName: Identifier, comment?: readonly JSDocComment[]): JSDocPrivateTag; +export declare function createJSDocProtectedTag(tagName: Identifier, comment?: readonly JSDocComment[]): JSDocProtectedTag; +export declare function createJSDocReadonlyTag(tagName: Identifier, comment?: readonly JSDocComment[]): JSDocReadonlyTag; +export declare function createJSDocOverrideTag(tagName: Identifier, comment?: readonly JSDocComment[]): JSDocOverrideTag; +export declare function createJSDocDeprecatedTag(tagName: Identifier, comment?: readonly JSDocComment[]): JSDocDeprecatedTag; +export declare function createJSDocSeeTag(tagName: Identifier, nameExpression: TypeNode, comment?: readonly JSDocComment[]): JSDocSeeTag; +export declare function createJSDocImplementsTag(tagName: Identifier, className: ExpressionWithTypeArguments, comment?: readonly JSDocComment[]): JSDocImplementsTag; +export declare function createJSDocAugmentsTag(tagName: Identifier, className: ExpressionWithTypeArguments, comment?: readonly JSDocComment[]): JSDocAugmentsTag; +export declare function createJSDocSatisfiesTag(tagName: Identifier, typeExpression: TypeNode, comment?: readonly JSDocComment[]): JSDocSatisfiesTag; +export declare function createJSDocThrowsTag(tagName: Identifier, typeExpression?: TypeNode, comment?: readonly JSDocComment[]): JSDocThrowsTag; +export declare function createJSDocThisTag(tagName: Identifier, typeExpression: TypeNode, comment?: readonly JSDocComment[]): JSDocThisTag; +export declare function createJSDocImportTag(tagName: Identifier, importClause: ImportClause | undefined, moduleSpecifier: Expression, attributes?: ImportAttributes, comment?: readonly JSDocComment[]): JSDocImportTag; +export declare function createJSDocCallbackTag(tagName: Identifier, typeExpression: TypeNode, name?: JSDocFullName, comment?: readonly JSDocComment[]): JSDocCallbackTag; +export declare function createJSDocOverloadTag(tagName: Identifier, typeExpression: TypeNode, comment?: readonly JSDocComment[]): JSDocOverloadTag; +export declare function createJSDocTypedefTag(tagName: Identifier, typeExpression?: Node, name?: JSDocFullName, comment?: readonly JSDocComment[]): JSDocTypedefTag; +export declare function createJSDocSignature(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): JSDocSignature; +export declare function createJSDocNameReference(name: EntityName): JSDocNameReference; +export declare function createModuleDeclaration(modifiers: readonly ModifierLike[] | undefined, keyword: SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword, name: ModuleName, body?: ModuleBody): ModuleDeclaration; +export declare function createImportEqualsDeclaration(modifiers: readonly ModifierLike[] | undefined, isTypeOnly: boolean | undefined, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; +export declare function createExportDeclaration(modifiers?: readonly ModifierLike[], isTypeOnly?: boolean, exportClause?: NamedExportBindings, moduleSpecifier?: Expression, attributes?: ImportAttributes): ExportDeclaration; +export declare function createImportTypeNode(isTypeOf: boolean | undefined, argument: TypeNode, attributes?: ImportAttributes, qualifier?: EntityName, typeArguments?: readonly TypeNode[]): ImportTypeNode; +export declare function createImportClause(phaseModifier?: ImportPhaseModifierSyntaxKind, name?: Identifier, namedBindings?: NamedImportBindings): ImportClause; +export declare function createImportSpecifier(isTypeOnly: boolean | undefined, propertyName: ModuleExportName | undefined, name: Identifier): ImportSpecifier; +export declare function createJSDocText(text: string): JSDocText; +export declare function createJSDocLink(name: EntityName | undefined, text: string): JSDocLink; +export declare function createJSDocLinkPlain(name: EntityName | undefined, text: string): JSDocLinkPlain; +export declare function createJSDocLinkCode(name: EntityName | undefined, text: string): JSDocLinkCode; +export declare function createTypeParameterDeclaration(modifiers: readonly ModifierLike[] | undefined, name: Identifier, constraint?: TypeNode, expression?: Expression, defaultType?: TypeNode): TypeParameterDeclaration; +export declare function createSyntheticReferenceExpression(expression: Expression, thisArg: Expression): SyntheticReferenceExpression; +export declare function createJSDocTypeLiteral(jsdocPropertyTags?: readonly JSDocTag[], isArrayType?: boolean): JSDocTypeLiteral; +export declare function createForInStatement(awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement): ForInStatement; +export declare function createForOfStatement(awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement): ForOfStatement; +export declare function createCaseClause(expression: Expression, statements: readonly Statement[]): CaseClause; +export declare function createDefaultClause(expression: Expression, statements: readonly Statement[]): DefaultClause; +export declare function createObjectBindingPattern(elements: readonly BindingElement[]): ObjectBindingPattern; +export declare function createArrayBindingPattern(elements: readonly BindingElement[]): ArrayBindingPattern; +export declare function createJSDocParameterTag(tagName: Identifier, name: EntityName, isBracketed: boolean, typeExpression: TypeNode | undefined, isNameFirst: boolean, comment: readonly JSDocComment[] | undefined): JSDocParameterTag; +export declare function createJSDocPropertyTag(tagName: Identifier, name: EntityName, isBracketed: boolean, typeExpression: TypeNode | undefined, isNameFirst: boolean, comment: readonly JSDocComment[] | undefined): JSDocPropertyTag; +export declare function updateQualifiedName(node: QualifiedName, left: EntityName, right: Identifier): QualifiedName; +export declare function updateComputedPropertyName(node: ComputedPropertyName, expression: Expression): ComputedPropertyName; +export declare function updateDecorator(node: Decorator, expression: LeftHandSideExpression): Decorator; +export declare function updateIfStatement(node: IfStatement, expression: Expression, thenStatement: Statement, elseStatement?: Statement): IfStatement; +export declare function updateDoStatement(node: DoStatement, statement: Statement, expression: Expression): DoStatement; +export declare function updateWhileStatement(node: WhileStatement, expression: Expression, statement: Statement): WhileStatement; +export declare function updateForStatement(node: ForStatement, initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement): ForStatement; +export declare function updateBreakStatement(node: BreakStatement, label?: Identifier): BreakStatement; +export declare function updateContinueStatement(node: ContinueStatement, label?: Identifier): ContinueStatement; +export declare function updateReturnStatement(node: ReturnStatement, expression?: Expression): ReturnStatement; +export declare function updateWithStatement(node: WithStatement, expression: Expression, statement: Statement): WithStatement; +export declare function updateSwitchStatement(node: SwitchStatement, expression: Expression, caseBlock: CaseBlock): SwitchStatement; +export declare function updateCaseBlock(node: CaseBlock, clauses: readonly CaseOrDefaultClause[]): CaseBlock; +export declare function updateThrowStatement(node: ThrowStatement, expression: Expression): ThrowStatement; +export declare function updateTryStatement(node: TryStatement, tryBlock: Block, catchClause?: CatchClause, finallyBlock?: Block): TryStatement; +export declare function updateCatchClause(node: CatchClause, variableDeclaration: VariableDeclaration | undefined, block: Block): CatchClause; +export declare function updateLabeledStatement(node: LabeledStatement, label: Identifier, statement: Statement): LabeledStatement; +export declare function updateExpressionStatement(node: ExpressionStatement, expression: Expression): ExpressionStatement; +export declare function updateBlock(node: Block, statements: readonly Statement[]): Block; +export declare function updateVariableStatement(node: VariableStatement, modifiers: readonly ModifierLike[] | undefined, declarationList: VariableDeclarationList): VariableStatement; +export declare function updateVariableDeclaration(node: VariableDeclaration, name: BindingName, exclamationToken?: ExclamationToken, type?: TypeNode, initializer?: Expression): VariableDeclaration; +export declare function updateVariableDeclarationList(node: VariableDeclarationList, declarations: readonly VariableDeclaration[]): VariableDeclarationList; +export declare function updateParameterDeclaration(node: ParameterDeclaration, modifiers: readonly ModifierLike[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: BindingName, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression): ParameterDeclaration; +export declare function updateBindingElement(node: BindingElement, dotDotDotToken?: DotDotDotToken, propertyName?: PropertyName, name?: BindingName, initializer?: Expression): BindingElement; +export declare function updateMissingDeclaration(node: MissingDeclaration, modifiers?: readonly ModifierLike[]): MissingDeclaration; +export declare function updateFunctionDeclaration(node: FunctionDeclaration, modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode, body?: FunctionBody): FunctionDeclaration; +export declare function updateClassDeclaration(node: ClassDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration; +export declare function updateClassExpression(node: ClassExpression, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression; +export declare function updateHeritageClause(node: HeritageClause, types: readonly ExpressionWithTypeArguments[]): HeritageClause; +export declare function updateInterfaceDeclaration(node: InterfaceDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; +export declare function updateTypeAliasDeclaration(node: TypeAliasDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; +export declare function updateEnumMember(node: EnumMember, name: PropertyName, initializer?: Expression): EnumMember; +export declare function updateEnumDeclaration(node: EnumDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier, members: readonly EnumMember[]): EnumDeclaration; +export declare function updateModuleBlock(node: ModuleBlock, statements: readonly Statement[]): ModuleBlock; +export declare function updateImportDeclaration(node: ImportDeclaration, modifiers: readonly ModifierLike[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, attributes?: ImportAttributes): ImportDeclaration; +export declare function updateExternalModuleReference(node: ExternalModuleReference, expression: Expression): ExternalModuleReference; +export declare function updateNamespaceImport(node: NamespaceImport, name: Identifier): NamespaceImport; +export declare function updateNamedImports(node: NamedImports, elements: readonly ImportSpecifier[]): NamedImports; +export declare function updateExportAssignment(node: ExportAssignment, modifiers: readonly ModifierLike[] | undefined, type: TypeNode, expression: Expression): ExportAssignment; +export declare function updateNamespaceExportDeclaration(node: NamespaceExportDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier): NamespaceExportDeclaration; +export declare function updateNamespaceExport(node: NamespaceExport, name: ModuleExportName): NamespaceExport; +export declare function updateNamedExports(node: NamedExports, elements: readonly ExportSpecifier[]): NamedExports; +export declare function updateExportSpecifier(node: ExportSpecifier, propertyName: ModuleExportName | undefined, name: ModuleExportName): ExportSpecifier; +export declare function updateCallSignatureDeclaration(node: CallSignatureDeclaration, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): CallSignatureDeclaration; +export declare function updateConstructSignatureDeclaration(node: ConstructSignatureDeclaration, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): ConstructSignatureDeclaration; +export declare function updateConstructorDeclaration(node: ConstructorDeclaration, modifiers: readonly ModifierLike[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode, body?: FunctionBody): ConstructorDeclaration; +export declare function updateGetAccessorDeclaration(node: GetAccessorDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode, body?: FunctionBody): GetAccessorDeclaration; +export declare function updateSetAccessorDeclaration(node: SetAccessorDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode, body?: FunctionBody): SetAccessorDeclaration; +export declare function updateIndexSignatureDeclaration(node: IndexSignatureDeclaration, modifiers: readonly ModifierLike[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; +export declare function updateMethodSignatureDeclaration(node: MethodSignatureDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, postfixToken: QuestionToken | ExclamationToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): MethodSignatureDeclaration; +export declare function updateMethodDeclaration(node: MethodDeclaration, modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: PropertyName, postfixToken: QuestionToken | ExclamationToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode, body?: FunctionBody): MethodDeclaration; +export declare function updatePropertySignatureDeclaration(node: PropertySignatureDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, postfixToken: QuestionToken | ExclamationToken | undefined, type: TypeNode, initializer: Expression): PropertySignatureDeclaration; +export declare function updatePropertyDeclaration(node: PropertyDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, postfixToken?: QuestionToken | ExclamationToken, type?: TypeNode, initializer?: Expression): PropertyDeclaration; +export declare function updateClassStaticBlockDeclaration(node: ClassStaticBlockDeclaration, modifiers: readonly ModifierLike[] | undefined, body: Block): ClassStaticBlockDeclaration; +export declare function updateBinaryExpression(node: BinaryExpression, modifiers: readonly ModifierLike[] | undefined, left: Expression, type: TypeNode | undefined, operatorToken: BinaryOperatorToken, right: Expression): BinaryExpression; +export declare function updatePrefixUnaryExpression(node: PrefixUnaryExpression, operand: Expression): PrefixUnaryExpression; +export declare function updatePostfixUnaryExpression(node: PostfixUnaryExpression, operand: Expression): PostfixUnaryExpression; +export declare function updateYieldExpression(node: YieldExpression, asteriskToken?: AsteriskToken, expression?: Expression): YieldExpression; +export declare function updateArrowFunction(node: ArrowFunction, modifiers: readonly ModifierLike[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken, body: ConciseBody): ArrowFunction; +export declare function updateFunctionExpression(node: FunctionExpression, modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: FunctionBody): FunctionExpression; +export declare function updateAsExpression(node: AsExpression, expression: Expression, type: TypeNode): AsExpression; +export declare function updateSatisfiesExpression(node: SatisfiesExpression, expression: Expression, type: TypeNode): SatisfiesExpression; +export declare function updateConditionalExpression(node: ConditionalExpression, condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression): ConditionalExpression; +export declare function updatePropertyAccessExpression(node: PropertyAccessExpression, expression: Expression, questionDotToken: QuestionDotToken | undefined, name: MemberName): PropertyAccessExpression; +export declare function updateElementAccessExpression(node: ElementAccessExpression, expression: Expression, questionDotToken: QuestionDotToken | undefined, argumentExpression: Expression): ElementAccessExpression; +export declare function updateCallExpression(node: CallExpression, expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, arguments_: readonly Expression[]): CallExpression; +export declare function updateNewExpression(node: NewExpression, expression: Expression, typeArguments?: readonly TypeNode[], arguments_?: readonly Expression[]): NewExpression; +export declare function updateMetaProperty(node: MetaProperty, name: Identifier): MetaProperty; +export declare function updateNonNullExpression(node: NonNullExpression, expression: Expression): NonNullExpression; +export declare function updateSpreadElement(node: SpreadElement, expression: Expression): SpreadElement; +export declare function updateTemplateExpression(node: TemplateExpression, head: TemplateHead, templateSpans: readonly TemplateSpan[]): TemplateExpression; +export declare function updateTemplateSpan(node: TemplateSpan, expression: Expression, literal: TemplateMiddleOrTail): TemplateSpan; +export declare function updateTaggedTemplateExpression(node: TaggedTemplateExpression, tag: Expression, questionDotToken: QuestionDotToken, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression; +export declare function updateParenthesizedExpression(node: ParenthesizedExpression, expression: Expression): ParenthesizedExpression; +export declare function updateArrayLiteralExpression(node: ArrayLiteralExpression, elements: readonly Expression[]): ArrayLiteralExpression; +export declare function updateObjectLiteralExpression(node: ObjectLiteralExpression, properties: readonly ObjectLiteralElementLike[]): ObjectLiteralExpression; +export declare function updateSpreadAssignment(node: SpreadAssignment, expression: Expression): SpreadAssignment; +export declare function updatePropertyAssignment(node: PropertyAssignment, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, postfixToken: QuestionToken | ExclamationToken | undefined, type: TypeNode, initializer: Expression): PropertyAssignment; +export declare function updateShorthandPropertyAssignment(node: ShorthandPropertyAssignment, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, postfixToken: QuestionToken | ExclamationToken | undefined, type: TypeNode, equalsToken?: EqualsToken, objectAssignmentInitializer?: Expression): ShorthandPropertyAssignment; +export declare function updateDeleteExpression(node: DeleteExpression, expression: Expression): DeleteExpression; +export declare function updateTypeOfExpression(node: TypeOfExpression, expression: Expression): TypeOfExpression; +export declare function updateVoidExpression(node: VoidExpression, expression: Expression): VoidExpression; +export declare function updateAwaitExpression(node: AwaitExpression, expression: Expression): AwaitExpression; +export declare function updateTypeAssertion(node: TypeAssertion, type: TypeNode, expression: Expression): TypeAssertion; +export declare function updateUnionTypeNode(node: UnionTypeNode, types: readonly TypeNode[]): UnionTypeNode; +export declare function updateIntersectionTypeNode(node: IntersectionTypeNode, types: readonly TypeNode[]): IntersectionTypeNode; +export declare function updateConditionalTypeNode(node: ConditionalTypeNode, checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode): ConditionalTypeNode; +export declare function updateTypeOperatorNode(node: TypeOperatorNode, type: TypeNode): TypeOperatorNode; +export declare function updateInferTypeNode(node: InferTypeNode, typeParameter: TypeParameterDeclaration): InferTypeNode; +export declare function updateArrayTypeNode(node: ArrayTypeNode, elementType: TypeNode): ArrayTypeNode; +export declare function updateIndexedAccessTypeNode(node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode; +export declare function updateTypeReferenceNode(node: TypeReferenceNode, typeName: EntityName, typeArguments?: readonly TypeNode[]): TypeReferenceNode; +export declare function updateExpressionWithTypeArguments(node: ExpressionWithTypeArguments, expression: Expression, typeArguments?: readonly TypeNode[]): ExpressionWithTypeArguments; +export declare function updateLiteralTypeNode(node: LiteralTypeNode, literal: Node): LiteralTypeNode; +export declare function updateTypePredicateNode(node: TypePredicateNode, assertsModifier: AssertsKeyword | undefined, parameterName: TypePredicateParameterName, type?: TypeNode): TypePredicateNode; +export declare function updateImportAttribute(node: ImportAttribute, name: ImportAttributeName, value: Expression): ImportAttribute; +export declare function updateImportAttributes(node: ImportAttributes, attributes: readonly ImportAttribute[]): ImportAttributes; +export declare function updateTypeQueryNode(node: TypeQueryNode, exprName: EntityName, typeArguments?: readonly TypeNode[]): TypeQueryNode; +export declare function updateMappedTypeNode(node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType?: TypeNode, questionToken?: QuestionToken | PlusToken | MinusToken, type?: TypeNode, members?: readonly TypeElement[]): MappedTypeNode; +export declare function updateTypeLiteralNode(node: TypeLiteralNode, members: readonly TypeElement[]): TypeLiteralNode; +export declare function updateTupleTypeNode(node: TupleTypeNode, elements: readonly TypeNode[]): TupleTypeNode; +export declare function updateNamedTupleMember(node: NamedTupleMember, dotDotDotToken: DotDotDotToken | undefined, name: Identifier, questionToken: QuestionToken | undefined, type: TypeNode): NamedTupleMember; +export declare function updateOptionalTypeNode(node: OptionalTypeNode, type: TypeNode): OptionalTypeNode; +export declare function updateRestTypeNode(node: RestTypeNode, type: TypeNode): RestTypeNode; +export declare function updateParenthesizedTypeNode(node: ParenthesizedTypeNode, type: TypeNode): ParenthesizedTypeNode; +export declare function updateFunctionTypeNode(node: FunctionTypeNode, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): FunctionTypeNode; +export declare function updateConstructorTypeNode(node: ConstructorTypeNode, modifiers: readonly ModifierLike[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): ConstructorTypeNode; +export declare function updateTemplateLiteralTypeNode(node: TemplateLiteralTypeNode, head: TemplateHead, templateSpans: readonly TemplateLiteralTypeSpan[]): TemplateLiteralTypeNode; +export declare function updateTemplateLiteralTypeSpan(node: TemplateLiteralTypeSpan, type: TypeNode, literal: TemplateMiddleOrTail): TemplateLiteralTypeSpan; +export declare function updateSyntheticExpression(node: SyntheticExpression, tupleNameSource?: Node): SyntheticExpression; +export declare function updatePartiallyEmittedExpression(node: PartiallyEmittedExpression, expression: Expression): PartiallyEmittedExpression; +export declare function updateJsxElement(node: JsxElement, openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement): JsxElement; +export declare function updateJsxAttributes(node: JsxAttributes, properties: readonly JsxAttributeLike[]): JsxAttributes; +export declare function updateJsxNamespacedName(node: JsxNamespacedName, namespace: Identifier, name: Identifier): JsxNamespacedName; +export declare function updateJsxOpeningElement(node: JsxOpeningElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxOpeningElement; +export declare function updateJsxSelfClosingElement(node: JsxSelfClosingElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxSelfClosingElement; +export declare function updateJsxFragment(node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment; +export declare function updateJsxAttribute(node: JsxAttribute, name: JsxAttributeName, initializer?: JsxAttributeValue): JsxAttribute; +export declare function updateJsxSpreadAttribute(node: JsxSpreadAttribute, expression: Expression): JsxSpreadAttribute; +export declare function updateJsxClosingElement(node: JsxClosingElement, tagName: JsxTagNameExpression): JsxClosingElement; +export declare function updateJsxExpression(node: JsxExpression, dotDotDotToken?: DotDotDotToken, expression?: Expression): JsxExpression; +export declare function updateSyntaxList(node: SyntaxList, children: readonly Node[]): SyntaxList; +export declare function updateJSDoc(node: JSDoc, comment: readonly JSDocComment[], tags?: readonly JSDocTag[]): JSDoc; +export declare function updateJSDocTypeExpression(node: JSDocTypeExpression, type: TypeNode): JSDocTypeExpression; +export declare function updateJSDocNonNullableType(node: JSDocNonNullableType, type: TypeNode): JSDocNonNullableType; +export declare function updateJSDocNullableType(node: JSDocNullableType, type: TypeNode): JSDocNullableType; +export declare function updateJSDocVariadicType(node: JSDocVariadicType, type: TypeNode): JSDocVariadicType; +export declare function updateJSDocOptionalType(node: JSDocOptionalType, type: TypeNode): JSDocOptionalType; +export declare function updateJSDocTypeTag(node: JSDocTypeTag, tagName: Identifier, typeExpression: Node, comment?: readonly JSDocComment[]): JSDocTypeTag; +export declare function updateJSDocUnknownTag(node: JSDocUnknownTag, tagName: Identifier, comment?: readonly JSDocComment[]): JSDocUnknownTag; +export declare function updateJSDocTemplateTag(node: JSDocTemplateTag, tagName: Identifier, constraint: Node, typeParameters: readonly TypeParameterDeclaration[], comment?: readonly JSDocComment[]): JSDocTemplateTag; +export declare function updateJSDocReturnTag(node: JSDocReturnTag, tagName: Identifier, typeExpression?: TypeNode, comment?: readonly JSDocComment[]): JSDocReturnTag; +export declare function updateJSDocPublicTag(node: JSDocPublicTag, tagName: Identifier, comment?: readonly JSDocComment[]): JSDocPublicTag; +export declare function updateJSDocPrivateTag(node: JSDocPrivateTag, tagName: Identifier, comment?: readonly JSDocComment[]): JSDocPrivateTag; +export declare function updateJSDocProtectedTag(node: JSDocProtectedTag, tagName: Identifier, comment?: readonly JSDocComment[]): JSDocProtectedTag; +export declare function updateJSDocReadonlyTag(node: JSDocReadonlyTag, tagName: Identifier, comment?: readonly JSDocComment[]): JSDocReadonlyTag; +export declare function updateJSDocOverrideTag(node: JSDocOverrideTag, tagName: Identifier, comment?: readonly JSDocComment[]): JSDocOverrideTag; +export declare function updateJSDocDeprecatedTag(node: JSDocDeprecatedTag, tagName: Identifier, comment?: readonly JSDocComment[]): JSDocDeprecatedTag; +export declare function updateJSDocSeeTag(node: JSDocSeeTag, tagName: Identifier, nameExpression: TypeNode, comment?: readonly JSDocComment[]): JSDocSeeTag; +export declare function updateJSDocImplementsTag(node: JSDocImplementsTag, tagName: Identifier, className: ExpressionWithTypeArguments, comment?: readonly JSDocComment[]): JSDocImplementsTag; +export declare function updateJSDocAugmentsTag(node: JSDocAugmentsTag, tagName: Identifier, className: ExpressionWithTypeArguments, comment?: readonly JSDocComment[]): JSDocAugmentsTag; +export declare function updateJSDocSatisfiesTag(node: JSDocSatisfiesTag, tagName: Identifier, typeExpression: TypeNode, comment?: readonly JSDocComment[]): JSDocSatisfiesTag; +export declare function updateJSDocThrowsTag(node: JSDocThrowsTag, tagName: Identifier, typeExpression?: TypeNode, comment?: readonly JSDocComment[]): JSDocThrowsTag; +export declare function updateJSDocThisTag(node: JSDocThisTag, tagName: Identifier, typeExpression: TypeNode, comment?: readonly JSDocComment[]): JSDocThisTag; +export declare function updateJSDocImportTag(node: JSDocImportTag, tagName: Identifier, importClause: ImportClause | undefined, moduleSpecifier: Expression, attributes?: ImportAttributes, comment?: readonly JSDocComment[]): JSDocImportTag; +export declare function updateJSDocCallbackTag(node: JSDocCallbackTag, tagName: Identifier, typeExpression: TypeNode, name?: JSDocFullName, comment?: readonly JSDocComment[]): JSDocCallbackTag; +export declare function updateJSDocOverloadTag(node: JSDocOverloadTag, tagName: Identifier, typeExpression: TypeNode, comment?: readonly JSDocComment[]): JSDocOverloadTag; +export declare function updateJSDocTypedefTag(node: JSDocTypedefTag, tagName: Identifier, typeExpression?: Node, name?: JSDocFullName, comment?: readonly JSDocComment[]): JSDocTypedefTag; +export declare function updateJSDocSignature(node: JSDocSignature, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type?: TypeNode): JSDocSignature; +export declare function updateJSDocNameReference(node: JSDocNameReference, name: EntityName): JSDocNameReference; +export declare function updateModuleDeclaration(node: ModuleDeclaration, modifiers: readonly ModifierLike[] | undefined, name: ModuleName, body?: ModuleBody): ModuleDeclaration; +export declare function updateImportEqualsDeclaration(node: ImportEqualsDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; +export declare function updateExportDeclaration(node: ExportDeclaration, modifiers?: readonly ModifierLike[], exportClause?: NamedExportBindings, moduleSpecifier?: Expression, attributes?: ImportAttributes): ExportDeclaration; +export declare function updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, attributes?: ImportAttributes, qualifier?: EntityName, typeArguments?: readonly TypeNode[]): ImportTypeNode; +export declare function updateImportClause(node: ImportClause, name?: Identifier, namedBindings?: NamedImportBindings): ImportClause; +export declare function updateImportSpecifier(node: ImportSpecifier, propertyName: ModuleExportName | undefined, name: Identifier): ImportSpecifier; +export declare function updateJSDocLink(node: JSDocLink, name?: EntityName): JSDocLink; +export declare function updateJSDocLinkPlain(node: JSDocLinkPlain, name?: EntityName): JSDocLinkPlain; +export declare function updateJSDocLinkCode(node: JSDocLinkCode, name?: EntityName): JSDocLinkCode; +export declare function updateTypeParameterDeclaration(node: TypeParameterDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier, constraint?: TypeNode, expression?: Expression, defaultType?: TypeNode): TypeParameterDeclaration; +export declare function updateSyntheticReferenceExpression(node: SyntheticReferenceExpression, expression: Expression, thisArg: Expression): SyntheticReferenceExpression; +export declare function updateJSDocTypeLiteral(node: JSDocTypeLiteral, jsdocPropertyTags?: readonly JSDocTag[]): JSDocTypeLiteral; +export declare function updateForInStatement(node: ForInStatement, awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement): ForInStatement; +export declare function updateForOfStatement(node: ForOfStatement, awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement): ForOfStatement; +export declare function updateCaseClause(node: CaseClause, expression: Expression, statements: readonly Statement[]): CaseClause; +export declare function updateDefaultClause(node: DefaultClause, expression: Expression, statements: readonly Statement[]): DefaultClause; +export declare function updateObjectBindingPattern(node: ObjectBindingPattern, elements: readonly BindingElement[]): ObjectBindingPattern; +export declare function updateArrayBindingPattern(node: ArrayBindingPattern, elements: readonly BindingElement[]): ArrayBindingPattern; +export declare function updateJSDocParameterTag(node: JSDocParameterTag, tagName: Identifier, name: EntityName, typeExpression: TypeNode | undefined, comment: readonly JSDocComment[] | undefined): JSDocParameterTag; +export declare function updateJSDocPropertyTag(node: JSDocPropertyTag, tagName: Identifier, name: EntityName, typeExpression: TypeNode | undefined, comment: readonly JSDocComment[] | undefined): JSDocPropertyTag; +export declare function createSourceFile(statements: readonly Statement[], endOfFileToken: EndOfFile, text: string, fileName: string, path: Path): SourceFile; +export declare function updateSourceFile(node: SourceFile, statements: readonly Statement[], endOfFileToken: EndOfFile): SourceFile; +//# sourceMappingURL=factory.generated.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/factory.generated.d.ts.map b/node_modules/typescript/dist/ast/factory.generated.d.ts.map new file mode 100644 index 0000000..2f4f1e6 --- /dev/null +++ b/node_modules/typescript/dist/ast/factory.generated.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"factory.generated.d.ts","sourceRoot":"","sources":["../../src/ast/factory.generated.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;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AAE,SAAS,SAAS,EAAE,GAAG,aAAa,CAEhI;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,oBAAoB,EAAE,QAAQ,EAAE,SAAS,cAAc,EAAE,GAAG,oBAAoB,CAEhI;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,mBAAmB,EAAE,QAAQ,EAAE,SAAS,cAAc,EAAE,GAAG,mBAAmB,CAE7H;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,QAAQ,GAAG,SAAS,EAAE,OAAO,EAAE,SAAS,YAAY,EAAE,GAAG,SAAS,GAAG,iBAAiB,CAE7M;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,QAAQ,GAAG,SAAS,EAAE,OAAO,EAAE,SAAS,YAAY,EAAE,GAAG,SAAS,GAAG,gBAAgB,CAE1M;AAED,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,SAAS,SAAS,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,UAAU,CAQpJ;AAUD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,SAAS,EAAE,EAAE,cAAc,EAAE,SAAS,GAAG,UAAU,CAI1H"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/factory.generated.js b/node_modules/typescript/dist/ast/factory.generated.js new file mode 100644 index 0000000..40cdd76 --- /dev/null +++ b/node_modules/typescript/dist/ast/factory.generated.js @@ -0,0 +1,3057 @@ +// Code generated by _scripts/generate-ts-ast.ts. DO NOT EDIT. +import { NodeFlags } from "#enums/nodeFlags"; +import { SyntaxKind } from "#enums/syntaxKind"; +import { TokenFlags } from "#enums/tokenFlags"; +import { getTokenPosOfNode } from "./astnav.js"; +import { cloneSourceFileData } from "./utils.js"; +import { forEachChildOfJSDocParameterTag, forEachChildOfJSDocPropertyTag, } from "./visitor.js"; +export class NodeObject { + kind; + flags = 0; + pos = -1; + end = -1; + parent = undefined; + _data; + constructor(kind, data) { + this.kind = kind; + this._data = data; + } + get ambientModuleNames() { + return this._data?.ambientModuleNames; + } + get argument() { + return this._data?.argument; + } + get argumentExpression() { + return this._data?.argumentExpression; + } + get arguments() { + return this._data?.arguments; + } + get assertsModifier() { + return this._data?.assertsModifier; + } + get asteriskToken() { + return this._data?.asteriskToken; + } + get attributes() { + return this._data?.attributes; + } + get awaitModifier() { + return this._data?.awaitModifier; + } + get block() { + return this._data?.block; + } + get body() { + return this._data?.body; + } + get caseBlock() { + return this._data?.caseBlock; + } + get catchClause() { + return this._data?.catchClause; + } + get checkType() { + return this._data?.checkType; + } + get children() { + return this._data?.children; + } + get className() { + return this._data?.className; + } + get clauses() { + return this._data?.clauses; + } + get closingElement() { + return this._data?.closingElement; + } + get closingFragment() { + return this._data?.closingFragment; + } + get colonToken() { + return this._data?.colonToken; + } + get comment() { + return this._data?.comment; + } + get condition() { + return this._data?.condition; + } + get constraint() { + return this._data?.constraint; + } + get containsOnlyTriviaWhiteSpaces() { + return this._data?.containsOnlyTriviaWhiteSpaces; + } + get declarationList() { + return this._data?.declarationList; + } + get declarations() { + return this._data?.declarations; + } + get defaultType() { + return this._data?.defaultType; + } + get dotDotDotToken() { + return this._data?.dotDotDotToken; + } + get elementType() { + return this._data?.elementType; + } + get elements() { + return this._data?.elements; + } + get elseStatement() { + return this._data?.elseStatement; + } + get endOfFileToken() { + return this._data?.endOfFileToken; + } + get equalsGreaterThanToken() { + return this._data?.equalsGreaterThanToken; + } + get equalsToken() { + return this._data?.equalsToken; + } + get exclamationToken() { + return this._data?.exclamationToken; + } + get exportClause() { + return this._data?.exportClause; + } + get exprName() { + return this._data?.exprName; + } + get expression() { + return this._data?.expression; + } + get extendsType() { + return this._data?.extendsType; + } + get externalModuleIndicator() { + return this._data?.externalModuleIndicator; + } + get falseType() { + return this._data?.falseType; + } + get fileName() { + return this._data?.fileName; + } + get finallyBlock() { + return this._data?.finallyBlock; + } + get head() { + return this._data?.head; + } + get heritageClauses() { + return this._data?.heritageClauses; + } + get importClause() { + return this._data?.importClause; + } + get imports() { + return this._data?.imports; + } + get incrementor() { + return this._data?.incrementor; + } + get indexType() { + return this._data?.indexType; + } + get initializer() { + return this._data?.initializer; + } + get isArrayType() { + return this._data?.isArrayType; + } + get isBracketed() { + return this._data?.isBracketed; + } + get isDeclarationFile() { + return this._data?.isDeclarationFile; + } + get isExportEquals() { + return this._data?.isExportEquals; + } + get isNameFirst() { + return this._data?.isNameFirst; + } + get isSpread() { + return this._data?.isSpread; + } + get isTypeOf() { + return this._data?.isTypeOf; + } + get isTypeOnly() { + return this._data?.isTypeOnly; + } + get jsdocPropertyTags() { + return this._data?.jsdocPropertyTags; + } + get keyword() { + return this._data?.keyword; + } + get keywordToken() { + return this._data?.keywordToken; + } + get label() { + return this._data?.label; + } + get languageVariant() { + return this._data?.languageVariant; + } + get left() { + return this._data?.left; + } + get libReferenceDirectives() { + return this._data?.libReferenceDirectives; + } + get literal() { + return this._data?.literal; + } + get members() { + return this._data?.members; + } + get modifiers() { + return this._data?.modifiers; + } + get moduleAugmentations() { + return this._data?.moduleAugmentations; + } + get moduleReference() { + return this._data?.moduleReference; + } + get moduleSpecifier() { + return this._data?.moduleSpecifier; + } + get multiLine() { + return this._data?.multiLine; + } + get name() { + return this._data?.name; + } + get nameExpression() { + return this._data?.nameExpression; + } + get nameType() { + return this._data?.nameType; + } + get namedBindings() { + return this._data?.namedBindings; + } + get namespace() { + return this._data?.namespace; + } + get objectAssignmentInitializer() { + return this._data?.objectAssignmentInitializer; + } + get objectType() { + return this._data?.objectType; + } + get openingElement() { + return this._data?.openingElement; + } + get openingFragment() { + return this._data?.openingFragment; + } + get operand() { + return this._data?.operand; + } + get operator() { + return this._data?.operator; + } + get operatorToken() { + return this._data?.operatorToken; + } + get parameterName() { + return this._data?.parameterName; + } + get parameters() { + return this._data?.parameters; + } + get path() { + return this._data?.path; + } + get phaseModifier() { + return this._data?.phaseModifier; + } + get postfixToken() { + return this._data?.postfixToken; + } + get properties() { + return this._data?.properties; + } + get propertyName() { + return this._data?.propertyName; + } + get qualifier() { + return this._data?.qualifier; + } + get questionDotToken() { + return this._data?.questionDotToken; + } + get questionToken() { + return this._data?.questionToken; + } + get rawText() { + return this._data?.rawText; + } + get readonlyToken() { + return this._data?.readonlyToken; + } + get referencedFiles() { + return this._data?.referencedFiles; + } + get right() { + return this._data?.right; + } + get scriptKind() { + return this._data?.scriptKind; + } + get statement() { + return this._data?.statement; + } + get statements() { + return this._data?.statements; + } + get tag() { + return this._data?.tag; + } + get tagName() { + return this._data?.tagName; + } + get tags() { + return this._data?.tags; + } + get template() { + return this._data?.template; + } + get templateFlags() { + return this._data?.templateFlags; + } + get templateSpans() { + return this._data?.templateSpans; + } + get text() { + return this._data?.text; + } + get thenStatement() { + return this._data?.thenStatement; + } + get thisArg() { + return this._data?.thisArg; + } + get token() { + return this._data?.token; + } + get tokenCache() { + return this._data?.tokenCache; + } + get tokenFlags() { + return this._data?.tokenFlags; + } + get trueType() { + return this._data?.trueType; + } + get tryBlock() { + return this._data?.tryBlock; + } + get tupleNameSource() { + return this._data?.tupleNameSource; + } + get type() { + return this._data?.type; + } + get typeArguments() { + return this._data?.typeArguments; + } + get typeExpression() { + return this._data?.typeExpression; + } + get typeName() { + return this._data?.typeName; + } + get typeParameter() { + return this._data?.typeParameter; + } + get typeParameters() { + return this._data?.typeParameters; + } + get typeReferenceDirectives() { + return this._data?.typeReferenceDirectives; + } + get types() { + return this._data?.types; + } + get value() { + return this._data?.value; + } + get variableDeclaration() { + return this._data?.variableDeclaration; + } + get whenFalse() { + return this._data?.whenFalse; + } + get whenTrue() { + return this._data?.whenTrue; + } + forEachChild(visitor, visitArray) { + const fn = forEachChildTable[this.kind]; + return fn ? fn(this._data, visitor, visitArray) : undefined; + } + getSourceFile() { + let node = this; + while (node.parent) + node = node.parent; + return node; + } + getStart(sourceFile, includeJsDocComment) { + return getTokenPosOfNode(this, sourceFile ?? this.getSourceFile(), includeJsDocComment); + } + getFullStart() { + return this.pos; + } + getEnd() { + return this.end; + } + getWidth(sourceFile) { + return this.getEnd() - this.getStart(sourceFile); + } + getFullWidth() { + return this.end - this.pos; + } + getLeadingTriviaWidth(sourceFile) { + return this.getStart(sourceFile) - this.pos; + } + getFullText(sourceFile) { + return (sourceFile ?? this.getSourceFile()).text.substring(this.pos, this.end); + } + getText(sourceFile) { + sourceFile ??= this.getSourceFile(); + return sourceFile.text.substring(this.getStart(sourceFile), this.end); + } +} +function isNodeArray(array) { + return "pos" in array && "end" in array; +} +export function createNodeArray(elements, pos = -1, end = -1) { + if (isNodeArray(elements)) + return elements; + const arr = elements.slice(); + arr.pos = pos; + arr.end = end; + return arr; +} +export function cloneNode(node) { + const data = cloneNodeData(node); + const clone = new NodeObject(node.kind, data); + clone.flags = node.flags; + clone.pos = node.pos; + clone.end = node.end; + return clone; +} +function cloneNodeData(node) { + const n = node; + switch (node.kind) { + case SyntaxKind.Identifier: + return { text: n.text }; + case SyntaxKind.PrivateIdentifier: + return { text: n.text }; + case SyntaxKind.QualifiedName: + return { left: n.left, right: n.right }; + case SyntaxKind.ComputedPropertyName: + return { expression: n.expression }; + case SyntaxKind.Decorator: + return { expression: n.expression }; + case SyntaxKind.IfStatement: + return { expression: n.expression, thenStatement: n.thenStatement, elseStatement: n.elseStatement }; + case SyntaxKind.DoStatement: + return { statement: n.statement, expression: n.expression }; + case SyntaxKind.WhileStatement: + return { expression: n.expression, statement: n.statement }; + case SyntaxKind.ForStatement: + return { initializer: n.initializer, condition: n.condition, incrementor: n.incrementor, statement: n.statement }; + case SyntaxKind.BreakStatement: + return { label: n.label }; + case SyntaxKind.ContinueStatement: + return { label: n.label }; + case SyntaxKind.ReturnStatement: + return { expression: n.expression }; + case SyntaxKind.WithStatement: + return { expression: n.expression, statement: n.statement }; + case SyntaxKind.SwitchStatement: + return { expression: n.expression, caseBlock: n.caseBlock }; + case SyntaxKind.CaseBlock: + return { clauses: n.clauses }; + case SyntaxKind.ThrowStatement: + return { expression: n.expression }; + case SyntaxKind.TryStatement: + return { tryBlock: n.tryBlock, catchClause: n.catchClause, finallyBlock: n.finallyBlock }; + case SyntaxKind.CatchClause: + return { variableDeclaration: n.variableDeclaration, block: n.block }; + case SyntaxKind.LabeledStatement: + return { label: n.label, statement: n.statement }; + case SyntaxKind.ExpressionStatement: + return { expression: n.expression }; + case SyntaxKind.Block: + return { statements: n.statements, multiLine: n.multiLine }; + case SyntaxKind.VariableStatement: + return { modifiers: n.modifiers, declarationList: n.declarationList }; + case SyntaxKind.VariableDeclaration: + return { name: n.name, exclamationToken: n.exclamationToken, type: n.type, initializer: n.initializer }; + case SyntaxKind.VariableDeclarationList: + return { declarations: n.declarations }; + case SyntaxKind.Parameter: + return { modifiers: n.modifiers, dotDotDotToken: n.dotDotDotToken, name: n.name, questionToken: n.questionToken, type: n.type, initializer: n.initializer }; + case SyntaxKind.BindingElement: + return { dotDotDotToken: n.dotDotDotToken, propertyName: n.propertyName, name: n.name, initializer: n.initializer }; + case SyntaxKind.MissingDeclaration: + return { modifiers: n.modifiers }; + case SyntaxKind.FunctionDeclaration: + return { modifiers: n.modifiers, asteriskToken: n.asteriskToken, name: n.name, typeParameters: n.typeParameters, parameters: n.parameters, type: n.type, body: n.body }; + case SyntaxKind.ClassDeclaration: + return { modifiers: n.modifiers, name: n.name, typeParameters: n.typeParameters, heritageClauses: n.heritageClauses, members: n.members }; + case SyntaxKind.ClassExpression: + return { modifiers: n.modifiers, name: n.name, typeParameters: n.typeParameters, heritageClauses: n.heritageClauses, members: n.members }; + case SyntaxKind.HeritageClause: + return { token: n.token, types: n.types }; + case SyntaxKind.InterfaceDeclaration: + return { modifiers: n.modifiers, name: n.name, typeParameters: n.typeParameters, heritageClauses: n.heritageClauses, members: n.members }; + case SyntaxKind.TypeAliasDeclaration: + case SyntaxKind.JSTypeAliasDeclaration: + return { modifiers: n.modifiers, name: n.name, typeParameters: n.typeParameters, type: n.type }; + case SyntaxKind.EnumMember: + return { name: n.name, initializer: n.initializer }; + case SyntaxKind.EnumDeclaration: + return { modifiers: n.modifiers, name: n.name, members: n.members }; + case SyntaxKind.ModuleBlock: + return { statements: n.statements }; + case SyntaxKind.ImportDeclaration: + case SyntaxKind.JSImportDeclaration: + return { modifiers: n.modifiers, importClause: n.importClause, moduleSpecifier: n.moduleSpecifier, attributes: n.attributes }; + case SyntaxKind.ExternalModuleReference: + return { expression: n.expression }; + case SyntaxKind.NamespaceImport: + return { name: n.name }; + case SyntaxKind.NamedImports: + return { elements: n.elements }; + case SyntaxKind.ExportAssignment: + return { modifiers: n.modifiers, isExportEquals: n.isExportEquals, type: n.type, expression: n.expression }; + case SyntaxKind.NamespaceExportDeclaration: + return { modifiers: n.modifiers, name: n.name }; + case SyntaxKind.NamespaceExport: + return { name: n.name }; + case SyntaxKind.NamedExports: + return { elements: n.elements }; + case SyntaxKind.ExportSpecifier: + return { isTypeOnly: n.isTypeOnly, propertyName: n.propertyName, name: n.name }; + case SyntaxKind.CallSignature: + return { typeParameters: n.typeParameters, parameters: n.parameters, type: n.type }; + case SyntaxKind.ConstructSignature: + return { typeParameters: n.typeParameters, parameters: n.parameters, type: n.type }; + case SyntaxKind.Constructor: + return { modifiers: n.modifiers, typeParameters: n.typeParameters, parameters: n.parameters, type: n.type, body: n.body }; + case SyntaxKind.GetAccessor: + return { modifiers: n.modifiers, name: n.name, typeParameters: n.typeParameters, parameters: n.parameters, type: n.type, body: n.body }; + case SyntaxKind.SetAccessor: + return { modifiers: n.modifiers, name: n.name, typeParameters: n.typeParameters, parameters: n.parameters, type: n.type, body: n.body }; + case SyntaxKind.IndexSignature: + return { modifiers: n.modifiers, parameters: n.parameters, type: n.type }; + case SyntaxKind.MethodSignature: + return { modifiers: n.modifiers, name: n.name, postfixToken: n.postfixToken, typeParameters: n.typeParameters, parameters: n.parameters, type: n.type }; + case SyntaxKind.MethodDeclaration: + return { modifiers: n.modifiers, asteriskToken: n.asteriskToken, name: n.name, postfixToken: n.postfixToken, typeParameters: n.typeParameters, parameters: n.parameters, type: n.type, body: n.body }; + case SyntaxKind.PropertySignature: + return { modifiers: n.modifiers, name: n.name, postfixToken: n.postfixToken, type: n.type, initializer: n.initializer }; + case SyntaxKind.PropertyDeclaration: + return { modifiers: n.modifiers, name: n.name, postfixToken: n.postfixToken, type: n.type, initializer: n.initializer }; + case SyntaxKind.ClassStaticBlockDeclaration: + return { modifiers: n.modifiers, body: n.body }; + case SyntaxKind.StringLiteral: + return { text: n.text, tokenFlags: n.tokenFlags }; + case SyntaxKind.NumericLiteral: + return { text: n.text, tokenFlags: n.tokenFlags }; + case SyntaxKind.BigIntLiteral: + return { text: n.text, tokenFlags: n.tokenFlags }; + case SyntaxKind.RegularExpressionLiteral: + return { text: n.text, tokenFlags: n.tokenFlags }; + case SyntaxKind.NoSubstitutionTemplateLiteral: + return { text: n.text, templateFlags: n.templateFlags }; + case SyntaxKind.BinaryExpression: + return { modifiers: n.modifiers, left: n.left, type: n.type, operatorToken: n.operatorToken, right: n.right }; + case SyntaxKind.PrefixUnaryExpression: + return { operator: n.operator, operand: n.operand }; + case SyntaxKind.PostfixUnaryExpression: + return { operand: n.operand, operator: n.operator }; + case SyntaxKind.YieldExpression: + return { asteriskToken: n.asteriskToken, expression: n.expression }; + case SyntaxKind.ArrowFunction: + return { modifiers: n.modifiers, typeParameters: n.typeParameters, parameters: n.parameters, type: n.type, equalsGreaterThanToken: n.equalsGreaterThanToken, body: n.body }; + case SyntaxKind.FunctionExpression: + return { modifiers: n.modifiers, asteriskToken: n.asteriskToken, name: n.name, typeParameters: n.typeParameters, parameters: n.parameters, type: n.type, body: n.body }; + case SyntaxKind.AsExpression: + return { expression: n.expression, type: n.type }; + case SyntaxKind.SatisfiesExpression: + return { expression: n.expression, type: n.type }; + case SyntaxKind.ConditionalExpression: + return { condition: n.condition, questionToken: n.questionToken, whenTrue: n.whenTrue, colonToken: n.colonToken, whenFalse: n.whenFalse }; + case SyntaxKind.PropertyAccessExpression: + return { expression: n.expression, questionDotToken: n.questionDotToken, name: n.name }; + case SyntaxKind.ElementAccessExpression: + return { expression: n.expression, questionDotToken: n.questionDotToken, argumentExpression: n.argumentExpression }; + case SyntaxKind.CallExpression: + return { expression: n.expression, questionDotToken: n.questionDotToken, typeArguments: n.typeArguments, arguments: n.arguments }; + case SyntaxKind.NewExpression: + return { expression: n.expression, typeArguments: n.typeArguments, arguments: n.arguments }; + case SyntaxKind.MetaProperty: + return { keywordToken: n.keywordToken, name: n.name }; + case SyntaxKind.NonNullExpression: + return { expression: n.expression }; + case SyntaxKind.SpreadElement: + return { expression: n.expression }; + case SyntaxKind.TemplateExpression: + return { head: n.head, templateSpans: n.templateSpans }; + case SyntaxKind.TemplateSpan: + return { expression: n.expression, literal: n.literal }; + case SyntaxKind.TaggedTemplateExpression: + return { tag: n.tag, questionDotToken: n.questionDotToken, typeArguments: n.typeArguments, template: n.template }; + case SyntaxKind.ParenthesizedExpression: + return { expression: n.expression }; + case SyntaxKind.ArrayLiteralExpression: + return { elements: n.elements, multiLine: n.multiLine }; + case SyntaxKind.ObjectLiteralExpression: + return { properties: n.properties, multiLine: n.multiLine }; + case SyntaxKind.SpreadAssignment: + return { expression: n.expression }; + case SyntaxKind.PropertyAssignment: + return { modifiers: n.modifiers, name: n.name, postfixToken: n.postfixToken, type: n.type, initializer: n.initializer }; + case SyntaxKind.ShorthandPropertyAssignment: + return { modifiers: n.modifiers, name: n.name, postfixToken: n.postfixToken, type: n.type, equalsToken: n.equalsToken, objectAssignmentInitializer: n.objectAssignmentInitializer }; + case SyntaxKind.DeleteExpression: + return { expression: n.expression }; + case SyntaxKind.TypeOfExpression: + return { expression: n.expression }; + case SyntaxKind.VoidExpression: + return { expression: n.expression }; + case SyntaxKind.AwaitExpression: + return { expression: n.expression }; + case SyntaxKind.TypeAssertionExpression: + return { type: n.type, expression: n.expression }; + case SyntaxKind.UnionType: + return { types: n.types }; + case SyntaxKind.IntersectionType: + return { types: n.types }; + case SyntaxKind.ConditionalType: + return { checkType: n.checkType, extendsType: n.extendsType, trueType: n.trueType, falseType: n.falseType }; + case SyntaxKind.TypeOperator: + return { operator: n.operator, type: n.type }; + case SyntaxKind.InferType: + return { typeParameter: n.typeParameter }; + case SyntaxKind.ArrayType: + return { elementType: n.elementType }; + case SyntaxKind.IndexedAccessType: + return { objectType: n.objectType, indexType: n.indexType }; + case SyntaxKind.TypeReference: + return { typeName: n.typeName, typeArguments: n.typeArguments }; + case SyntaxKind.ExpressionWithTypeArguments: + return { expression: n.expression, typeArguments: n.typeArguments }; + case SyntaxKind.LiteralType: + return { literal: n.literal }; + case SyntaxKind.TypePredicate: + return { assertsModifier: n.assertsModifier, parameterName: n.parameterName, type: n.type }; + case SyntaxKind.ImportAttribute: + return { name: n.name, value: n.value }; + case SyntaxKind.ImportAttributes: + return { token: n.token, attributes: n.attributes, multiLine: n.multiLine }; + case SyntaxKind.TypeQuery: + return { exprName: n.exprName, typeArguments: n.typeArguments }; + case SyntaxKind.MappedType: + return { readonlyToken: n.readonlyToken, typeParameter: n.typeParameter, nameType: n.nameType, questionToken: n.questionToken, type: n.type, members: n.members }; + case SyntaxKind.TypeLiteral: + return { members: n.members }; + case SyntaxKind.TupleType: + return { elements: n.elements }; + case SyntaxKind.NamedTupleMember: + return { dotDotDotToken: n.dotDotDotToken, name: n.name, questionToken: n.questionToken, type: n.type }; + case SyntaxKind.OptionalType: + return { type: n.type }; + case SyntaxKind.RestType: + return { type: n.type }; + case SyntaxKind.ParenthesizedType: + return { type: n.type }; + case SyntaxKind.FunctionType: + return { typeParameters: n.typeParameters, parameters: n.parameters, type: n.type }; + case SyntaxKind.ConstructorType: + return { modifiers: n.modifiers, typeParameters: n.typeParameters, parameters: n.parameters, type: n.type }; + case SyntaxKind.TemplateHead: + return { text: n.text, rawText: n.rawText, templateFlags: n.templateFlags }; + case SyntaxKind.TemplateMiddle: + return { text: n.text, rawText: n.rawText, templateFlags: n.templateFlags }; + case SyntaxKind.TemplateTail: + return { text: n.text, rawText: n.rawText, templateFlags: n.templateFlags }; + case SyntaxKind.TemplateLiteralType: + return { head: n.head, templateSpans: n.templateSpans }; + case SyntaxKind.TemplateLiteralTypeSpan: + return { type: n.type, literal: n.literal }; + case SyntaxKind.SyntheticExpression: + return { type: n.type, isSpread: n.isSpread, tupleNameSource: n.tupleNameSource }; + case SyntaxKind.PartiallyEmittedExpression: + return { expression: n.expression }; + case SyntaxKind.JsxElement: + return { openingElement: n.openingElement, children: n.children, closingElement: n.closingElement }; + case SyntaxKind.JsxAttributes: + return { properties: n.properties }; + case SyntaxKind.JsxNamespacedName: + return { namespace: n.namespace, name: n.name }; + case SyntaxKind.JsxOpeningElement: + return { tagName: n.tagName, typeArguments: n.typeArguments, attributes: n.attributes }; + case SyntaxKind.JsxSelfClosingElement: + return { tagName: n.tagName, typeArguments: n.typeArguments, attributes: n.attributes }; + case SyntaxKind.JsxFragment: + return { openingFragment: n.openingFragment, children: n.children, closingFragment: n.closingFragment }; + case SyntaxKind.JsxAttribute: + return { name: n.name, initializer: n.initializer }; + case SyntaxKind.JsxSpreadAttribute: + return { expression: n.expression }; + case SyntaxKind.JsxClosingElement: + return { tagName: n.tagName }; + case SyntaxKind.JsxExpression: + return { dotDotDotToken: n.dotDotDotToken, expression: n.expression }; + case SyntaxKind.JsxText: + return { text: n.text, containsOnlyTriviaWhiteSpaces: n.containsOnlyTriviaWhiteSpaces }; + case SyntaxKind.SyntaxList: + return { children: n.children }; + case SyntaxKind.JSDoc: + return { comment: n.comment, tags: n.tags }; + case SyntaxKind.JSDocTypeExpression: + return { type: n.type }; + case SyntaxKind.JSDocNonNullableType: + return { type: n.type }; + case SyntaxKind.JSDocNullableType: + return { type: n.type }; + case SyntaxKind.JSDocVariadicType: + return { type: n.type }; + case SyntaxKind.JSDocOptionalType: + return { type: n.type }; + case SyntaxKind.JSDocTypeTag: + return { tagName: n.tagName, typeExpression: n.typeExpression, comment: n.comment }; + case SyntaxKind.JSDocUnknownTag: + return { tagName: n.tagName, comment: n.comment }; + case SyntaxKind.JSDocTemplateTag: + return { tagName: n.tagName, constraint: n.constraint, typeParameters: n.typeParameters, comment: n.comment }; + case SyntaxKind.JSDocReturnTag: + return { tagName: n.tagName, typeExpression: n.typeExpression, comment: n.comment }; + case SyntaxKind.JSDocPublicTag: + return { tagName: n.tagName, comment: n.comment }; + case SyntaxKind.JSDocPrivateTag: + return { tagName: n.tagName, comment: n.comment }; + case SyntaxKind.JSDocProtectedTag: + return { tagName: n.tagName, comment: n.comment }; + case SyntaxKind.JSDocReadonlyTag: + return { tagName: n.tagName, comment: n.comment }; + case SyntaxKind.JSDocOverrideTag: + return { tagName: n.tagName, comment: n.comment }; + case SyntaxKind.JSDocDeprecatedTag: + return { tagName: n.tagName, comment: n.comment }; + case SyntaxKind.JSDocSeeTag: + return { tagName: n.tagName, nameExpression: n.nameExpression, comment: n.comment }; + case SyntaxKind.JSDocImplementsTag: + return { tagName: n.tagName, className: n.className, comment: n.comment }; + case SyntaxKind.JSDocAugmentsTag: + return { tagName: n.tagName, className: n.className, comment: n.comment }; + case SyntaxKind.JSDocSatisfiesTag: + return { tagName: n.tagName, typeExpression: n.typeExpression, comment: n.comment }; + case SyntaxKind.JSDocThrowsTag: + return { tagName: n.tagName, typeExpression: n.typeExpression, comment: n.comment }; + case SyntaxKind.JSDocThisTag: + return { tagName: n.tagName, typeExpression: n.typeExpression, comment: n.comment }; + case SyntaxKind.JSDocImportTag: + return { tagName: n.tagName, importClause: n.importClause, moduleSpecifier: n.moduleSpecifier, attributes: n.attributes, comment: n.comment }; + case SyntaxKind.JSDocCallbackTag: + return { tagName: n.tagName, typeExpression: n.typeExpression, name: n.name, comment: n.comment }; + case SyntaxKind.JSDocOverloadTag: + return { tagName: n.tagName, typeExpression: n.typeExpression, comment: n.comment }; + case SyntaxKind.JSDocTypedefTag: + return { tagName: n.tagName, typeExpression: n.typeExpression, name: n.name, comment: n.comment }; + case SyntaxKind.JSDocSignature: + return { typeParameters: n.typeParameters, parameters: n.parameters, type: n.type }; + case SyntaxKind.JSDocNameReference: + return { name: n.name }; + case SyntaxKind.ModuleDeclaration: + return { modifiers: n.modifiers, keyword: n.keyword, name: n.name, body: n.body }; + case SyntaxKind.ImportEqualsDeclaration: + return { modifiers: n.modifiers, isTypeOnly: n.isTypeOnly, name: n.name, moduleReference: n.moduleReference }; + case SyntaxKind.ExportDeclaration: + return { modifiers: n.modifiers, isTypeOnly: n.isTypeOnly, exportClause: n.exportClause, moduleSpecifier: n.moduleSpecifier, attributes: n.attributes }; + case SyntaxKind.ImportType: + return { isTypeOf: n.isTypeOf, argument: n.argument, attributes: n.attributes, qualifier: n.qualifier, typeArguments: n.typeArguments }; + case SyntaxKind.ImportClause: + return { phaseModifier: n.phaseModifier, name: n.name, namedBindings: n.namedBindings }; + case SyntaxKind.ImportSpecifier: + return { isTypeOnly: n.isTypeOnly, propertyName: n.propertyName, name: n.name }; + case SyntaxKind.JSDocText: + return { text: n.text }; + case SyntaxKind.JSDocLink: + return { name: n.name, text: n.text }; + case SyntaxKind.JSDocLinkPlain: + return { name: n.name, text: n.text }; + case SyntaxKind.JSDocLinkCode: + return { name: n.name, text: n.text }; + case SyntaxKind.TypeParameter: + return { modifiers: n.modifiers, name: n.name, constraint: n.constraint, expression: n.expression, defaultType: n.defaultType }; + case SyntaxKind.SyntheticReferenceExpression: + return { expression: n.expression, thisArg: n.thisArg }; + case SyntaxKind.JSDocTypeLiteral: + return { jsdocPropertyTags: n.jsdocPropertyTags, isArrayType: n.isArrayType }; + case SyntaxKind.ForInStatement: + return { awaitModifier: n.awaitModifier, initializer: n.initializer, expression: n.expression, statement: n.statement }; + case SyntaxKind.ForOfStatement: + return { awaitModifier: n.awaitModifier, initializer: n.initializer, expression: n.expression, statement: n.statement }; + case SyntaxKind.CaseClause: + return { expression: n.expression, statements: n.statements }; + case SyntaxKind.DefaultClause: + return { expression: n.expression, statements: n.statements }; + case SyntaxKind.ObjectBindingPattern: + return { elements: n.elements }; + case SyntaxKind.ArrayBindingPattern: + return { elements: n.elements }; + case SyntaxKind.JSDocParameterTag: + return { tagName: n.tagName, name: n.name, isBracketed: n.isBracketed, typeExpression: n.typeExpression, isNameFirst: n.isNameFirst, comment: n.comment }; + case SyntaxKind.JSDocPropertyTag: + return { tagName: n.tagName, name: n.name, isBracketed: n.isBracketed, typeExpression: n.typeExpression, isNameFirst: n.isNameFirst, comment: n.comment }; + case SyntaxKind.SourceFile: + return cloneSourceFileData(n); + default: + return undefined; + } +} +const forEachChildTable = { + [SyntaxKind.QualifiedName]: (data, cbNode, cbNodes) => visitNode(cbNode, data.left) || + visitNode(cbNode, data.right), + [SyntaxKind.ComputedPropertyName]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.Decorator]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.IfStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) || + visitNode(cbNode, data.thenStatement) || + visitNode(cbNode, data.elseStatement), + [SyntaxKind.DoStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.statement) || + visitNode(cbNode, data.expression), + [SyntaxKind.WhileStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) || + visitNode(cbNode, data.statement), + [SyntaxKind.ForStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.initializer) || + visitNode(cbNode, data.condition) || + visitNode(cbNode, data.incrementor) || + visitNode(cbNode, data.statement), + [SyntaxKind.BreakStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.label), + [SyntaxKind.ContinueStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.label), + [SyntaxKind.ReturnStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.WithStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) || + visitNode(cbNode, data.statement), + [SyntaxKind.SwitchStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) || + visitNode(cbNode, data.caseBlock), + [SyntaxKind.CaseBlock]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.clauses), + [SyntaxKind.ThrowStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.TryStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tryBlock) || + visitNode(cbNode, data.catchClause) || + visitNode(cbNode, data.finallyBlock), + [SyntaxKind.CatchClause]: (data, cbNode, cbNodes) => visitNode(cbNode, data.variableDeclaration) || + visitNode(cbNode, data.block), + [SyntaxKind.LabeledStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.label) || + visitNode(cbNode, data.statement), + [SyntaxKind.ExpressionStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.Block]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.statements), + [SyntaxKind.VariableStatement]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.declarationList), + [SyntaxKind.VariableDeclaration]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name) || + visitNode(cbNode, data.exclamationToken) || + visitNode(cbNode, data.type) || + visitNode(cbNode, data.initializer), + [SyntaxKind.VariableDeclarationList]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.declarations), + [SyntaxKind.Parameter]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.dotDotDotToken) || + visitNode(cbNode, data.name) || + visitNode(cbNode, data.questionToken) || + visitNode(cbNode, data.type) || + visitNode(cbNode, data.initializer), + [SyntaxKind.BindingElement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.dotDotDotToken) || + visitNode(cbNode, data.propertyName) || + visitNode(cbNode, data.name) || + visitNode(cbNode, data.initializer), + [SyntaxKind.MissingDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers), + [SyntaxKind.FunctionDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.asteriskToken) || + visitNode(cbNode, data.name) || + visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.parameters) || + visitNode(cbNode, data.type) || + visitNode(cbNode, data.body), + [SyntaxKind.ClassDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.heritageClauses) || + visitNodes(cbNode, cbNodes, data.members), + [SyntaxKind.ClassExpression]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.heritageClauses) || + visitNodes(cbNode, cbNodes, data.members), + [SyntaxKind.HeritageClause]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.types), + [SyntaxKind.InterfaceDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.heritageClauses) || + visitNodes(cbNode, cbNodes, data.members), + [SyntaxKind.TypeAliasDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNode(cbNode, data.type), + [SyntaxKind.JSTypeAliasDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNode(cbNode, data.type), + [SyntaxKind.EnumMember]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name) || + visitNode(cbNode, data.initializer), + [SyntaxKind.EnumDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNodes(cbNode, cbNodes, data.members), + [SyntaxKind.ModuleBlock]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.statements), + [SyntaxKind.ImportDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.importClause) || + visitNode(cbNode, data.moduleSpecifier) || + visitNode(cbNode, data.attributes), + [SyntaxKind.JSImportDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.importClause) || + visitNode(cbNode, data.moduleSpecifier) || + visitNode(cbNode, data.attributes), + [SyntaxKind.ExternalModuleReference]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.NamespaceImport]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name), + [SyntaxKind.NamedImports]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.elements), + [SyntaxKind.ExportAssignment]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.type) || + visitNode(cbNode, data.expression), + [SyntaxKind.NamespaceExportDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name), + [SyntaxKind.NamespaceExport]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name), + [SyntaxKind.NamedExports]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.elements), + [SyntaxKind.ExportSpecifier]: (data, cbNode, cbNodes) => visitNode(cbNode, data.propertyName) || + visitNode(cbNode, data.name), + [SyntaxKind.CallSignature]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.parameters) || + visitNode(cbNode, data.type), + [SyntaxKind.ConstructSignature]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.parameters) || + visitNode(cbNode, data.type), + [SyntaxKind.Constructor]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.parameters) || + visitNode(cbNode, data.type) || + visitNode(cbNode, data.body), + [SyntaxKind.GetAccessor]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.parameters) || + visitNode(cbNode, data.type) || + visitNode(cbNode, data.body), + [SyntaxKind.SetAccessor]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.parameters) || + visitNode(cbNode, data.type) || + visitNode(cbNode, data.body), + [SyntaxKind.IndexSignature]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNodes(cbNode, cbNodes, data.parameters) || + visitNode(cbNode, data.type), + [SyntaxKind.MethodSignature]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNode(cbNode, data.postfixToken) || + visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.parameters) || + visitNode(cbNode, data.type), + [SyntaxKind.MethodDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.asteriskToken) || + visitNode(cbNode, data.name) || + visitNode(cbNode, data.postfixToken) || + visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.parameters) || + visitNode(cbNode, data.type) || + visitNode(cbNode, data.body), + [SyntaxKind.PropertySignature]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNode(cbNode, data.postfixToken) || + visitNode(cbNode, data.type) || + visitNode(cbNode, data.initializer), + [SyntaxKind.PropertyDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNode(cbNode, data.postfixToken) || + visitNode(cbNode, data.type) || + visitNode(cbNode, data.initializer), + [SyntaxKind.ClassStaticBlockDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.body), + [SyntaxKind.BinaryExpression]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.left) || + visitNode(cbNode, data.type) || + visitNode(cbNode, data.operatorToken) || + visitNode(cbNode, data.right), + [SyntaxKind.PrefixUnaryExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.operand), + [SyntaxKind.PostfixUnaryExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.operand), + [SyntaxKind.YieldExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.asteriskToken) || + visitNode(cbNode, data.expression), + [SyntaxKind.ArrowFunction]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.parameters) || + visitNode(cbNode, data.type) || + visitNode(cbNode, data.equalsGreaterThanToken) || + visitNode(cbNode, data.body), + [SyntaxKind.FunctionExpression]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.asteriskToken) || + visitNode(cbNode, data.name) || + visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.parameters) || + visitNode(cbNode, data.type) || + visitNode(cbNode, data.body), + [SyntaxKind.AsExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) || + visitNode(cbNode, data.type), + [SyntaxKind.SatisfiesExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) || + visitNode(cbNode, data.type), + [SyntaxKind.ConditionalExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.condition) || + visitNode(cbNode, data.questionToken) || + visitNode(cbNode, data.whenTrue) || + visitNode(cbNode, data.colonToken) || + visitNode(cbNode, data.whenFalse), + [SyntaxKind.PropertyAccessExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) || + visitNode(cbNode, data.questionDotToken) || + visitNode(cbNode, data.name), + [SyntaxKind.ElementAccessExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) || + visitNode(cbNode, data.questionDotToken) || + visitNode(cbNode, data.argumentExpression), + [SyntaxKind.CallExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) || + visitNode(cbNode, data.questionDotToken) || + visitNodes(cbNode, cbNodes, data.typeArguments) || + visitNodes(cbNode, cbNodes, data.arguments), + [SyntaxKind.NewExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) || + visitNodes(cbNode, cbNodes, data.typeArguments) || + visitNodes(cbNode, cbNodes, data.arguments), + [SyntaxKind.MetaProperty]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name), + [SyntaxKind.NonNullExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.SpreadElement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.TemplateExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.head) || + visitNodes(cbNode, cbNodes, data.templateSpans), + [SyntaxKind.TemplateSpan]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) || + visitNode(cbNode, data.literal), + [SyntaxKind.TaggedTemplateExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tag) || + visitNode(cbNode, data.questionDotToken) || + visitNodes(cbNode, cbNodes, data.typeArguments) || + visitNode(cbNode, data.template), + [SyntaxKind.ParenthesizedExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.ArrayLiteralExpression]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.elements), + [SyntaxKind.ObjectLiteralExpression]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.properties), + [SyntaxKind.SpreadAssignment]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.PropertyAssignment]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNode(cbNode, data.postfixToken) || + visitNode(cbNode, data.type) || + visitNode(cbNode, data.initializer), + [SyntaxKind.ShorthandPropertyAssignment]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNode(cbNode, data.postfixToken) || + visitNode(cbNode, data.type) || + visitNode(cbNode, data.equalsToken) || + visitNode(cbNode, data.objectAssignmentInitializer), + [SyntaxKind.DeleteExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.TypeOfExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.VoidExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.AwaitExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.TypeAssertionExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type) || + visitNode(cbNode, data.expression), + [SyntaxKind.UnionType]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.types), + [SyntaxKind.IntersectionType]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.types), + [SyntaxKind.ConditionalType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.checkType) || + visitNode(cbNode, data.extendsType) || + visitNode(cbNode, data.trueType) || + visitNode(cbNode, data.falseType), + [SyntaxKind.TypeOperator]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type), + [SyntaxKind.InferType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.typeParameter), + [SyntaxKind.ArrayType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.elementType), + [SyntaxKind.IndexedAccessType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.objectType) || + visitNode(cbNode, data.indexType), + [SyntaxKind.TypeReference]: (data, cbNode, cbNodes) => visitNode(cbNode, data.typeName) || + visitNodes(cbNode, cbNodes, data.typeArguments), + [SyntaxKind.ExpressionWithTypeArguments]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) || + visitNodes(cbNode, cbNodes, data.typeArguments), + [SyntaxKind.LiteralType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.literal), + [SyntaxKind.TypePredicate]: (data, cbNode, cbNodes) => visitNode(cbNode, data.assertsModifier) || + visitNode(cbNode, data.parameterName) || + visitNode(cbNode, data.type), + [SyntaxKind.ImportAttribute]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name) || + visitNode(cbNode, data.value), + [SyntaxKind.ImportAttributes]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.attributes), + [SyntaxKind.TypeQuery]: (data, cbNode, cbNodes) => visitNode(cbNode, data.exprName) || + visitNodes(cbNode, cbNodes, data.typeArguments), + [SyntaxKind.MappedType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.readonlyToken) || + visitNode(cbNode, data.typeParameter) || + visitNode(cbNode, data.nameType) || + visitNode(cbNode, data.questionToken) || + visitNode(cbNode, data.type) || + visitNodes(cbNode, cbNodes, data.members), + [SyntaxKind.TypeLiteral]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.members), + [SyntaxKind.TupleType]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.elements), + [SyntaxKind.NamedTupleMember]: (data, cbNode, cbNodes) => visitNode(cbNode, data.dotDotDotToken) || + visitNode(cbNode, data.name) || + visitNode(cbNode, data.questionToken) || + visitNode(cbNode, data.type), + [SyntaxKind.OptionalType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type), + [SyntaxKind.RestType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type), + [SyntaxKind.ParenthesizedType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type), + [SyntaxKind.FunctionType]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.parameters) || + visitNode(cbNode, data.type), + [SyntaxKind.ConstructorType]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.parameters) || + visitNode(cbNode, data.type), + [SyntaxKind.TemplateLiteralType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.head) || + visitNodes(cbNode, cbNodes, data.templateSpans), + [SyntaxKind.TemplateLiteralTypeSpan]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type) || + visitNode(cbNode, data.literal), + [SyntaxKind.SyntheticExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tupleNameSource), + [SyntaxKind.PartiallyEmittedExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.JsxElement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.openingElement) || + visitNodes(cbNode, cbNodes, data.children) || + visitNode(cbNode, data.closingElement), + [SyntaxKind.JsxAttributes]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.properties), + [SyntaxKind.JsxNamespacedName]: (data, cbNode, cbNodes) => visitNode(cbNode, data.namespace) || + visitNode(cbNode, data.name), + [SyntaxKind.JsxOpeningElement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNodes(cbNode, cbNodes, data.typeArguments) || + visitNode(cbNode, data.attributes), + [SyntaxKind.JsxSelfClosingElement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNodes(cbNode, cbNodes, data.typeArguments) || + visitNode(cbNode, data.attributes), + [SyntaxKind.JsxFragment]: (data, cbNode, cbNodes) => visitNode(cbNode, data.openingFragment) || + visitNodes(cbNode, cbNodes, data.children) || + visitNode(cbNode, data.closingFragment), + [SyntaxKind.JsxAttribute]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name) || + visitNode(cbNode, data.initializer), + [SyntaxKind.JsxSpreadAttribute]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression), + [SyntaxKind.JsxClosingElement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName), + [SyntaxKind.JsxExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.dotDotDotToken) || + visitNode(cbNode, data.expression), + [SyntaxKind.SyntaxList]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.children), + [SyntaxKind.JSDoc]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.comment) || + visitNodes(cbNode, cbNodes, data.tags), + [SyntaxKind.JSDocTypeExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type), + [SyntaxKind.JSDocNonNullableType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type), + [SyntaxKind.JSDocNullableType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type), + [SyntaxKind.JSDocVariadicType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type), + [SyntaxKind.JSDocOptionalType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.type), + [SyntaxKind.JSDocTypeTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNode(cbNode, data.typeExpression) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocUnknownTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocTemplateTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNode(cbNode, data.constraint) || + visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocReturnTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNode(cbNode, data.typeExpression) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocPublicTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocPrivateTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocProtectedTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocReadonlyTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocOverrideTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocDeprecatedTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocSeeTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNode(cbNode, data.nameExpression) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocImplementsTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNode(cbNode, data.className) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocAugmentsTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNode(cbNode, data.className) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocSatisfiesTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNode(cbNode, data.typeExpression) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocThrowsTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNode(cbNode, data.typeExpression) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocThisTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNode(cbNode, data.typeExpression) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocImportTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNode(cbNode, data.importClause) || + visitNode(cbNode, data.moduleSpecifier) || + visitNode(cbNode, data.attributes) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocCallbackTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNode(cbNode, data.typeExpression) || + visitNode(cbNode, data.name) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocOverloadTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNode(cbNode, data.typeExpression) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocTypedefTag]: (data, cbNode, cbNodes) => visitNode(cbNode, data.tagName) || + visitNode(cbNode, data.typeExpression) || + visitNode(cbNode, data.name) || + visitNodes(cbNode, cbNodes, data.comment), + [SyntaxKind.JSDocSignature]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.typeParameters) || + visitNodes(cbNode, cbNodes, data.parameters) || + visitNode(cbNode, data.type), + [SyntaxKind.JSDocNameReference]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name), + [SyntaxKind.ModuleDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNode(cbNode, data.body), + [SyntaxKind.ImportEqualsDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNode(cbNode, data.moduleReference), + [SyntaxKind.ExportDeclaration]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.exportClause) || + visitNode(cbNode, data.moduleSpecifier) || + visitNode(cbNode, data.attributes), + [SyntaxKind.ImportType]: (data, cbNode, cbNodes) => visitNode(cbNode, data.argument) || + visitNode(cbNode, data.attributes) || + visitNode(cbNode, data.qualifier) || + visitNodes(cbNode, cbNodes, data.typeArguments), + [SyntaxKind.ImportClause]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name) || + visitNode(cbNode, data.namedBindings), + [SyntaxKind.ImportSpecifier]: (data, cbNode, cbNodes) => visitNode(cbNode, data.propertyName) || + visitNode(cbNode, data.name), + [SyntaxKind.JSDocLink]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name), + [SyntaxKind.JSDocLinkPlain]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name), + [SyntaxKind.JSDocLinkCode]: (data, cbNode, cbNodes) => visitNode(cbNode, data.name), + [SyntaxKind.TypeParameter]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.modifiers) || + visitNode(cbNode, data.name) || + visitNode(cbNode, data.constraint) || + visitNode(cbNode, data.expression) || + visitNode(cbNode, data.defaultType), + [SyntaxKind.SyntheticReferenceExpression]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) || + visitNode(cbNode, data.thisArg), + [SyntaxKind.JSDocTypeLiteral]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.jsdocPropertyTags), + [SyntaxKind.ForInStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.awaitModifier) || + visitNode(cbNode, data.initializer) || + visitNode(cbNode, data.expression) || + visitNode(cbNode, data.statement), + [SyntaxKind.ForOfStatement]: (data, cbNode, cbNodes) => visitNode(cbNode, data.awaitModifier) || + visitNode(cbNode, data.initializer) || + visitNode(cbNode, data.expression) || + visitNode(cbNode, data.statement), + [SyntaxKind.CaseClause]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) || + visitNodes(cbNode, cbNodes, data.statements), + [SyntaxKind.DefaultClause]: (data, cbNode, cbNodes) => visitNode(cbNode, data.expression) || + visitNodes(cbNode, cbNodes, data.statements), + [SyntaxKind.ObjectBindingPattern]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.elements), + [SyntaxKind.ArrayBindingPattern]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.elements), + [SyntaxKind.JSDocParameterTag]: forEachChildOfJSDocParameterTag, + [SyntaxKind.JSDocPropertyTag]: forEachChildOfJSDocPropertyTag, + [SyntaxKind.SourceFile]: (data, cbNode, cbNodes) => visitNodes(cbNode, cbNodes, data.statements) || + visitNode(cbNode, data.endOfFileToken), +}; +function visitNode(cbNode, node) { + return node ? cbNode(node) : undefined; +} +function visitNodes(cbNode, cbNodes, nodes) { + if (!nodes) + return undefined; + if (cbNodes) + return cbNodes(nodes); + for (const node of nodes) { + const result = cbNode(node); + if (result) + return result; + } + return undefined; +} +export function createToken(kind) { + return new NodeObject(kind, undefined); +} +export function createIdentifier(text) { + return new NodeObject(SyntaxKind.Identifier, { + text, + }); +} +export function createPrivateIdentifier(text) { + return new NodeObject(SyntaxKind.PrivateIdentifier, { + text, + }); +} +export function createQualifiedName(left, right) { + return new NodeObject(SyntaxKind.QualifiedName, { + left, + right, + }); +} +export function createComputedPropertyName(expression) { + return new NodeObject(SyntaxKind.ComputedPropertyName, { + expression, + }); +} +export function createDecorator(expression) { + return new NodeObject(SyntaxKind.Decorator, { + expression, + }); +} +export function createEmptyStatement() { + return new NodeObject(SyntaxKind.EmptyStatement, undefined); +} +export function createIfStatement(expression, thenStatement, elseStatement) { + return new NodeObject(SyntaxKind.IfStatement, { + expression, + thenStatement, + elseStatement, + }); +} +export function createDoStatement(statement, expression) { + return new NodeObject(SyntaxKind.DoStatement, { + statement, + expression, + }); +} +export function createWhileStatement(expression, statement) { + return new NodeObject(SyntaxKind.WhileStatement, { + expression, + statement, + }); +} +export function createForStatement(initializer, condition, incrementor, statement) { + return new NodeObject(SyntaxKind.ForStatement, { + initializer, + condition, + incrementor, + statement, + }); +} +export function createBreakStatement(label) { + return new NodeObject(SyntaxKind.BreakStatement, { + label, + }); +} +export function createContinueStatement(label) { + return new NodeObject(SyntaxKind.ContinueStatement, { + label, + }); +} +export function createReturnStatement(expression) { + return new NodeObject(SyntaxKind.ReturnStatement, { + expression, + }); +} +export function createWithStatement(expression, statement) { + return new NodeObject(SyntaxKind.WithStatement, { + expression, + statement, + }); +} +export function createSwitchStatement(expression, caseBlock) { + return new NodeObject(SyntaxKind.SwitchStatement, { + expression, + caseBlock, + }); +} +export function createCaseBlock(clauses) { + return new NodeObject(SyntaxKind.CaseBlock, { + clauses: createNodeArray(clauses), + }); +} +export function createThrowStatement(expression) { + return new NodeObject(SyntaxKind.ThrowStatement, { + expression, + }); +} +export function createTryStatement(tryBlock, catchClause, finallyBlock) { + return new NodeObject(SyntaxKind.TryStatement, { + tryBlock, + catchClause, + finallyBlock, + }); +} +export function createCatchClause(variableDeclaration, block) { + return new NodeObject(SyntaxKind.CatchClause, { + variableDeclaration, + block, + }); +} +export function createDebuggerStatement() { + return new NodeObject(SyntaxKind.DebuggerStatement, undefined); +} +export function createLabeledStatement(label, statement) { + return new NodeObject(SyntaxKind.LabeledStatement, { + label, + statement, + }); +} +export function createExpressionStatement(expression) { + return new NodeObject(SyntaxKind.ExpressionStatement, { + expression, + }); +} +export function createBlock(statements, multiLine) { + return new NodeObject(SyntaxKind.Block, { + statements: createNodeArray(statements), + multiLine, + }); +} +export function createVariableStatement(modifiers, declarationList) { + return new NodeObject(SyntaxKind.VariableStatement, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + declarationList, + }); +} +export function createVariableDeclaration(name, exclamationToken, type, initializer) { + return new NodeObject(SyntaxKind.VariableDeclaration, { + name, + exclamationToken, + type, + initializer, + }); +} +export function createVariableDeclarationList(declarations, flags) { + const node = new NodeObject(SyntaxKind.VariableDeclarationList, { + declarations: createNodeArray(declarations), + }); + node.flags = flags; + return node; +} +export function createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer) { + return new NodeObject(SyntaxKind.Parameter, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + dotDotDotToken, + name, + questionToken, + type, + initializer, + }); +} +export function createBindingElement(dotDotDotToken, propertyName, name, initializer) { + return new NodeObject(SyntaxKind.BindingElement, { + dotDotDotToken, + propertyName, + name, + initializer, + }); +} +export function createMissingDeclaration(modifiers) { + return new NodeObject(SyntaxKind.MissingDeclaration, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + }); +} +export function createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { + return new NodeObject(SyntaxKind.FunctionDeclaration, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + asteriskToken, + name, + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + parameters: createNodeArray(parameters), + type, + body, + }); +} +export function createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) { + return new NodeObject(SyntaxKind.ClassDeclaration, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + name, + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + heritageClauses: heritageClauses ? createNodeArray(heritageClauses) : undefined, + members: createNodeArray(members), + }); +} +export function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) { + return new NodeObject(SyntaxKind.ClassExpression, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + name, + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + heritageClauses: heritageClauses ? createNodeArray(heritageClauses) : undefined, + members: createNodeArray(members), + }); +} +export function createHeritageClause(token, types) { + return new NodeObject(SyntaxKind.HeritageClause, { + token, + types: createNodeArray(types), + }); +} +export function createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members) { + return new NodeObject(SyntaxKind.InterfaceDeclaration, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + name, + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + heritageClauses: heritageClauses ? createNodeArray(heritageClauses) : undefined, + members: createNodeArray(members), + }); +} +export function createTypeAliasDeclaration(modifiers, name, typeParameters, type) { + return new NodeObject(SyntaxKind.TypeAliasDeclaration, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + name, + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + type, + }); +} +export function createEnumMember(name, initializer) { + return new NodeObject(SyntaxKind.EnumMember, { + name, + initializer, + }); +} +export function createEnumDeclaration(modifiers, name, members) { + return new NodeObject(SyntaxKind.EnumDeclaration, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + name, + members: createNodeArray(members), + }); +} +export function createModuleBlock(statements) { + return new NodeObject(SyntaxKind.ModuleBlock, { + statements: createNodeArray(statements), + }); +} +export function createNotEmittedStatement() { + return new NodeObject(SyntaxKind.NotEmittedStatement, undefined); +} +export function createNotEmittedTypeElement() { + return new NodeObject(SyntaxKind.NotEmittedTypeElement, undefined); +} +export function createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes) { + return new NodeObject(SyntaxKind.ImportDeclaration, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + importClause, + moduleSpecifier, + attributes, + }); +} +export function createExternalModuleReference(expression) { + return new NodeObject(SyntaxKind.ExternalModuleReference, { + expression, + }); +} +export function createNamespaceImport(name) { + return new NodeObject(SyntaxKind.NamespaceImport, { + name, + }); +} +export function createNamedImports(elements) { + return new NodeObject(SyntaxKind.NamedImports, { + elements: createNodeArray(elements), + }); +} +export function createExportAssignment(modifiers, isExportEquals = false, type, expression) { + return new NodeObject(SyntaxKind.ExportAssignment, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + isExportEquals, + type, + expression, + }); +} +export function createNamespaceExportDeclaration(modifiers, name) { + return new NodeObject(SyntaxKind.NamespaceExportDeclaration, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + name, + }); +} +export function createNamespaceExport(name) { + return new NodeObject(SyntaxKind.NamespaceExport, { + name, + }); +} +export function createNamedExports(elements) { + return new NodeObject(SyntaxKind.NamedExports, { + elements: createNodeArray(elements), + }); +} +export function createExportSpecifier(isTypeOnly = false, propertyName, name) { + return new NodeObject(SyntaxKind.ExportSpecifier, { + isTypeOnly, + propertyName, + name, + }); +} +export function createCallSignatureDeclaration(typeParameters, parameters, type) { + return new NodeObject(SyntaxKind.CallSignature, { + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + parameters: createNodeArray(parameters), + type, + }); +} +export function createConstructSignatureDeclaration(typeParameters, parameters, type) { + return new NodeObject(SyntaxKind.ConstructSignature, { + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + parameters: createNodeArray(parameters), + type, + }); +} +export function createConstructorDeclaration(modifiers, typeParameters, parameters, type, body) { + return new NodeObject(SyntaxKind.Constructor, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + parameters: createNodeArray(parameters), + type, + body, + }); +} +export function createGetAccessorDeclaration(modifiers, name, typeParameters, parameters, type, body) { + return new NodeObject(SyntaxKind.GetAccessor, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + name, + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + parameters: createNodeArray(parameters), + type, + body, + }); +} +export function createSetAccessorDeclaration(modifiers, name, typeParameters, parameters, type, body) { + return new NodeObject(SyntaxKind.SetAccessor, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + name, + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + parameters: createNodeArray(parameters), + type, + body, + }); +} +export function createIndexSignatureDeclaration(modifiers, parameters, type) { + return new NodeObject(SyntaxKind.IndexSignature, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + parameters: createNodeArray(parameters), + type, + }); +} +export function createMethodSignatureDeclaration(modifiers, name, postfixToken, typeParameters, parameters, type) { + return new NodeObject(SyntaxKind.MethodSignature, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + name, + postfixToken, + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + parameters: createNodeArray(parameters), + type, + }); +} +export function createMethodDeclaration(modifiers, asteriskToken, name, postfixToken, typeParameters, parameters, type, body) { + return new NodeObject(SyntaxKind.MethodDeclaration, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + asteriskToken, + name, + postfixToken, + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + parameters: createNodeArray(parameters), + type, + body, + }); +} +export function createPropertySignatureDeclaration(modifiers, name, postfixToken, type, initializer) { + return new NodeObject(SyntaxKind.PropertySignature, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + name, + postfixToken, + type, + initializer, + }); +} +export function createPropertyDeclaration(modifiers, name, postfixToken, type, initializer) { + return new NodeObject(SyntaxKind.PropertyDeclaration, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + name, + postfixToken, + type, + initializer, + }); +} +export function createSemicolonClassElement() { + return new NodeObject(SyntaxKind.SemicolonClassElement, undefined); +} +export function createClassStaticBlockDeclaration(modifiers, body) { + return new NodeObject(SyntaxKind.ClassStaticBlockDeclaration, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + body, + }); +} +export function createOmittedExpression() { + return new NodeObject(SyntaxKind.OmittedExpression, undefined); +} +export function createKeywordExpression(kind) { + return new NodeObject(kind, undefined); +} +export function createStringLiteral(text, tokenFlags) { + return new NodeObject(SyntaxKind.StringLiteral, { + text, + tokenFlags, + }); +} +export function createNumericLiteral(text, tokenFlags) { + return new NodeObject(SyntaxKind.NumericLiteral, { + text, + tokenFlags, + }); +} +export function createBigIntLiteral(text, tokenFlags) { + return new NodeObject(SyntaxKind.BigIntLiteral, { + text, + tokenFlags, + }); +} +export function createRegularExpressionLiteral(text, tokenFlags) { + return new NodeObject(SyntaxKind.RegularExpressionLiteral, { + text, + tokenFlags, + }); +} +export function createNoSubstitutionTemplateLiteral(text, templateFlags) { + return new NodeObject(SyntaxKind.NoSubstitutionTemplateLiteral, { + text, + templateFlags, + }); +} +export function createBinaryExpression(modifiers, left, type, operatorToken, right) { + return new NodeObject(SyntaxKind.BinaryExpression, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + left, + type, + operatorToken, + right, + }); +} +export function createPrefixUnaryExpression(operator, operand) { + return new NodeObject(SyntaxKind.PrefixUnaryExpression, { + operator, + operand, + }); +} +export function createPostfixUnaryExpression(operand, operator) { + return new NodeObject(SyntaxKind.PostfixUnaryExpression, { + operand, + operator, + }); +} +export function createYieldExpression(asteriskToken, expression) { + return new NodeObject(SyntaxKind.YieldExpression, { + asteriskToken, + expression, + }); +} +export function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) { + return new NodeObject(SyntaxKind.ArrowFunction, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + parameters: createNodeArray(parameters), + type, + equalsGreaterThanToken, + body, + }); +} +export function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { + return new NodeObject(SyntaxKind.FunctionExpression, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + asteriskToken, + name, + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + parameters: createNodeArray(parameters), + type, + body, + }); +} +export function createAsExpression(expression, type) { + return new NodeObject(SyntaxKind.AsExpression, { + expression, + type, + }); +} +export function createSatisfiesExpression(expression, type) { + return new NodeObject(SyntaxKind.SatisfiesExpression, { + expression, + type, + }); +} +export function createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse) { + return new NodeObject(SyntaxKind.ConditionalExpression, { + condition, + questionToken, + whenTrue, + colonToken, + whenFalse, + }); +} +export function createPropertyAccessExpression(expression, questionDotToken, name, flags) { + const node = new NodeObject(SyntaxKind.PropertyAccessExpression, { + expression, + questionDotToken, + name, + }); + node.flags = flags; + return node; +} +export function createElementAccessExpression(expression, questionDotToken, argumentExpression, flags) { + const node = new NodeObject(SyntaxKind.ElementAccessExpression, { + expression, + questionDotToken, + argumentExpression, + }); + node.flags = flags; + return node; +} +export function createCallExpression(expression, questionDotToken, typeArguments, arguments_, flags) { + const node = new NodeObject(SyntaxKind.CallExpression, { + expression, + questionDotToken, + typeArguments: typeArguments ? createNodeArray(typeArguments) : undefined, + arguments: createNodeArray(arguments_), + }); + node.flags = flags; + return node; +} +export function createNewExpression(expression, typeArguments, arguments_) { + return new NodeObject(SyntaxKind.NewExpression, { + expression, + typeArguments: typeArguments ? createNodeArray(typeArguments) : undefined, + arguments: arguments_ ? createNodeArray(arguments_) : undefined, + }); +} +export function createMetaProperty(keywordToken, name) { + return new NodeObject(SyntaxKind.MetaProperty, { + keywordToken, + name, + }); +} +export function createNonNullExpression(expression, flags) { + const node = new NodeObject(SyntaxKind.NonNullExpression, { + expression, + }); + node.flags = flags; + return node; +} +export function createSpreadElement(expression) { + return new NodeObject(SyntaxKind.SpreadElement, { + expression, + }); +} +export function createTemplateExpression(head, templateSpans) { + return new NodeObject(SyntaxKind.TemplateExpression, { + head, + templateSpans: createNodeArray(templateSpans), + }); +} +export function createTemplateSpan(expression, literal) { + return new NodeObject(SyntaxKind.TemplateSpan, { + expression, + literal, + }); +} +export function createTaggedTemplateExpression(tag, questionDotToken, typeArguments, template, flags) { + const node = new NodeObject(SyntaxKind.TaggedTemplateExpression, { + tag, + questionDotToken, + typeArguments: typeArguments ? createNodeArray(typeArguments) : undefined, + template, + }); + node.flags = flags; + return node; +} +export function createParenthesizedExpression(expression) { + return new NodeObject(SyntaxKind.ParenthesizedExpression, { + expression, + }); +} +export function createArrayLiteralExpression(elements, multiLine) { + return new NodeObject(SyntaxKind.ArrayLiteralExpression, { + elements: createNodeArray(elements), + multiLine, + }); +} +export function createObjectLiteralExpression(properties, multiLine) { + return new NodeObject(SyntaxKind.ObjectLiteralExpression, { + properties: createNodeArray(properties), + multiLine, + }); +} +export function createSpreadAssignment(expression) { + return new NodeObject(SyntaxKind.SpreadAssignment, { + expression, + }); +} +export function createPropertyAssignment(modifiers, name, postfixToken, type, initializer) { + return new NodeObject(SyntaxKind.PropertyAssignment, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + name, + postfixToken, + type, + initializer, + }); +} +export function createShorthandPropertyAssignment(modifiers, name, postfixToken, type, equalsToken, objectAssignmentInitializer) { + return new NodeObject(SyntaxKind.ShorthandPropertyAssignment, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + name, + postfixToken, + type, + equalsToken, + objectAssignmentInitializer, + }); +} +export function createDeleteExpression(expression) { + return new NodeObject(SyntaxKind.DeleteExpression, { + expression, + }); +} +export function createTypeOfExpression(expression) { + return new NodeObject(SyntaxKind.TypeOfExpression, { + expression, + }); +} +export function createVoidExpression(expression) { + return new NodeObject(SyntaxKind.VoidExpression, { + expression, + }); +} +export function createAwaitExpression(expression) { + return new NodeObject(SyntaxKind.AwaitExpression, { + expression, + }); +} +export function createTypeAssertion(type, expression) { + return new NodeObject(SyntaxKind.TypeAssertionExpression, { + type, + expression, + }); +} +export function createKeywordTypeNode(kind) { + return new NodeObject(kind, undefined); +} +export function createUnionTypeNode(types) { + return new NodeObject(SyntaxKind.UnionType, { + types: createNodeArray(types), + }); +} +export function createIntersectionTypeNode(types) { + return new NodeObject(SyntaxKind.IntersectionType, { + types: createNodeArray(types), + }); +} +export function createConditionalTypeNode(checkType, extendsType, trueType, falseType) { + return new NodeObject(SyntaxKind.ConditionalType, { + checkType, + extendsType, + trueType, + falseType, + }); +} +export function createTypeOperatorNode(operator, type) { + return new NodeObject(SyntaxKind.TypeOperator, { + operator, + type, + }); +} +export function createInferTypeNode(typeParameter) { + return new NodeObject(SyntaxKind.InferType, { + typeParameter, + }); +} +export function createArrayTypeNode(elementType) { + return new NodeObject(SyntaxKind.ArrayType, { + elementType, + }); +} +export function createIndexedAccessTypeNode(objectType, indexType) { + return new NodeObject(SyntaxKind.IndexedAccessType, { + objectType, + indexType, + }); +} +export function createTypeReferenceNode(typeName, typeArguments) { + return new NodeObject(SyntaxKind.TypeReference, { + typeName, + typeArguments: typeArguments ? createNodeArray(typeArguments) : undefined, + }); +} +export function createExpressionWithTypeArguments(expression, typeArguments) { + return new NodeObject(SyntaxKind.ExpressionWithTypeArguments, { + expression, + typeArguments: typeArguments ? createNodeArray(typeArguments) : undefined, + }); +} +export function createLiteralTypeNode(literal) { + return new NodeObject(SyntaxKind.LiteralType, { + literal, + }); +} +export function createThisTypeNode() { + return new NodeObject(SyntaxKind.ThisType, undefined); +} +export function createTypePredicateNode(assertsModifier, parameterName, type) { + return new NodeObject(SyntaxKind.TypePredicate, { + assertsModifier, + parameterName, + type, + }); +} +export function createImportAttribute(name, value) { + return new NodeObject(SyntaxKind.ImportAttribute, { + name, + value, + }); +} +export function createImportAttributes(token, attributes, multiLine) { + return new NodeObject(SyntaxKind.ImportAttributes, { + token, + attributes: createNodeArray(attributes), + multiLine, + }); +} +export function createTypeQueryNode(exprName, typeArguments) { + return new NodeObject(SyntaxKind.TypeQuery, { + exprName, + typeArguments: typeArguments ? createNodeArray(typeArguments) : undefined, + }); +} +export function createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members) { + return new NodeObject(SyntaxKind.MappedType, { + readonlyToken, + typeParameter, + nameType, + questionToken, + type, + members: members ? createNodeArray(members) : undefined, + }); +} +export function createTypeLiteralNode(members) { + return new NodeObject(SyntaxKind.TypeLiteral, { + members: createNodeArray(members), + }); +} +export function createTupleTypeNode(elements) { + return new NodeObject(SyntaxKind.TupleType, { + elements: createNodeArray(elements), + }); +} +export function createNamedTupleMember(dotDotDotToken, name, questionToken, type) { + return new NodeObject(SyntaxKind.NamedTupleMember, { + dotDotDotToken, + name, + questionToken, + type, + }); +} +export function createOptionalTypeNode(type) { + return new NodeObject(SyntaxKind.OptionalType, { + type, + }); +} +export function createRestTypeNode(type) { + return new NodeObject(SyntaxKind.RestType, { + type, + }); +} +export function createParenthesizedTypeNode(type) { + return new NodeObject(SyntaxKind.ParenthesizedType, { + type, + }); +} +export function createFunctionTypeNode(typeParameters, parameters, type) { + return new NodeObject(SyntaxKind.FunctionType, { + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + parameters: createNodeArray(parameters), + type, + }); +} +export function createConstructorTypeNode(modifiers, typeParameters, parameters, type) { + return new NodeObject(SyntaxKind.ConstructorType, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + parameters: createNodeArray(parameters), + type, + }); +} +export function createTemplateHead(text, rawText, templateFlags) { + return new NodeObject(SyntaxKind.TemplateHead, { + text, + rawText, + templateFlags, + }); +} +export function createTemplateMiddle(text, rawText, templateFlags) { + return new NodeObject(SyntaxKind.TemplateMiddle, { + text, + rawText, + templateFlags, + }); +} +export function createTemplateTail(text, rawText, templateFlags) { + return new NodeObject(SyntaxKind.TemplateTail, { + text, + rawText, + templateFlags, + }); +} +export function createTemplateLiteralTypeNode(head, templateSpans) { + return new NodeObject(SyntaxKind.TemplateLiteralType, { + head, + templateSpans: createNodeArray(templateSpans), + }); +} +export function createTemplateLiteralTypeSpan(type, literal) { + return new NodeObject(SyntaxKind.TemplateLiteralTypeSpan, { + type, + literal, + }); +} +export function createSyntheticExpression(type, isSpread, tupleNameSource) { + return new NodeObject(SyntaxKind.SyntheticExpression, { + type, + isSpread, + tupleNameSource, + }); +} +export function createPartiallyEmittedExpression(expression) { + return new NodeObject(SyntaxKind.PartiallyEmittedExpression, { + expression, + }); +} +export function createJsxElement(openingElement, children, closingElement) { + return new NodeObject(SyntaxKind.JsxElement, { + openingElement, + children: createNodeArray(children), + closingElement, + }); +} +export function createJsxAttributes(properties) { + return new NodeObject(SyntaxKind.JsxAttributes, { + properties: createNodeArray(properties), + }); +} +export function createJsxNamespacedName(namespace, name) { + return new NodeObject(SyntaxKind.JsxNamespacedName, { + namespace, + name, + }); +} +export function createJsxOpeningElement(tagName, typeArguments, attributes) { + return new NodeObject(SyntaxKind.JsxOpeningElement, { + tagName, + typeArguments: typeArguments ? createNodeArray(typeArguments) : undefined, + attributes, + }); +} +export function createJsxSelfClosingElement(tagName, typeArguments, attributes) { + return new NodeObject(SyntaxKind.JsxSelfClosingElement, { + tagName, + typeArguments: typeArguments ? createNodeArray(typeArguments) : undefined, + attributes, + }); +} +export function createJsxFragment(openingFragment, children, closingFragment) { + return new NodeObject(SyntaxKind.JsxFragment, { + openingFragment, + children: createNodeArray(children), + closingFragment, + }); +} +export function createJsxOpeningFragment() { + return new NodeObject(SyntaxKind.JsxOpeningFragment, undefined); +} +export function createJsxClosingFragment() { + return new NodeObject(SyntaxKind.JsxClosingFragment, undefined); +} +export function createJsxAttribute(name, initializer) { + return new NodeObject(SyntaxKind.JsxAttribute, { + name, + initializer, + }); +} +export function createJsxSpreadAttribute(expression) { + return new NodeObject(SyntaxKind.JsxSpreadAttribute, { + expression, + }); +} +export function createJsxClosingElement(tagName) { + return new NodeObject(SyntaxKind.JsxClosingElement, { + tagName, + }); +} +export function createJsxExpression(dotDotDotToken, expression) { + return new NodeObject(SyntaxKind.JsxExpression, { + dotDotDotToken, + expression, + }); +} +export function createJsxText(text, containsOnlyTriviaWhiteSpaces) { + return new NodeObject(SyntaxKind.JsxText, { + text, + containsOnlyTriviaWhiteSpaces, + }); +} +export function createSyntaxList(children) { + return new NodeObject(SyntaxKind.SyntaxList, { + children, + }); +} +export function createJSDoc(comment, tags) { + return new NodeObject(SyntaxKind.JSDoc, { + comment: createNodeArray(comment), + tags: tags ? createNodeArray(tags) : undefined, + }); +} +export function createJSDocTypeExpression(type) { + return new NodeObject(SyntaxKind.JSDocTypeExpression, { + type, + }); +} +export function createJSDocNonNullableType(type) { + return new NodeObject(SyntaxKind.JSDocNonNullableType, { + type, + }); +} +export function createJSDocNullableType(type) { + return new NodeObject(SyntaxKind.JSDocNullableType, { + type, + }); +} +export function createJSDocAllType() { + return new NodeObject(SyntaxKind.JSDocAllType, undefined); +} +export function createJSDocVariadicType(type) { + return new NodeObject(SyntaxKind.JSDocVariadicType, { + type, + }); +} +export function createJSDocOptionalType(type) { + return new NodeObject(SyntaxKind.JSDocOptionalType, { + type, + }); +} +export function createJSDocTypeTag(tagName, typeExpression, comment) { + return new NodeObject(SyntaxKind.JSDocTypeTag, { + tagName, + typeExpression, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocUnknownTag(tagName, comment) { + return new NodeObject(SyntaxKind.JSDocUnknownTag, { + tagName, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocTemplateTag(tagName, constraint, typeParameters, comment) { + return new NodeObject(SyntaxKind.JSDocTemplateTag, { + tagName, + constraint, + typeParameters: createNodeArray(typeParameters), + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocReturnTag(tagName, typeExpression, comment) { + return new NodeObject(SyntaxKind.JSDocReturnTag, { + tagName, + typeExpression, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocPublicTag(tagName, comment) { + return new NodeObject(SyntaxKind.JSDocPublicTag, { + tagName, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocPrivateTag(tagName, comment) { + return new NodeObject(SyntaxKind.JSDocPrivateTag, { + tagName, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocProtectedTag(tagName, comment) { + return new NodeObject(SyntaxKind.JSDocProtectedTag, { + tagName, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocReadonlyTag(tagName, comment) { + return new NodeObject(SyntaxKind.JSDocReadonlyTag, { + tagName, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocOverrideTag(tagName, comment) { + return new NodeObject(SyntaxKind.JSDocOverrideTag, { + tagName, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocDeprecatedTag(tagName, comment) { + return new NodeObject(SyntaxKind.JSDocDeprecatedTag, { + tagName, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocSeeTag(tagName, nameExpression, comment) { + return new NodeObject(SyntaxKind.JSDocSeeTag, { + tagName, + nameExpression, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocImplementsTag(tagName, className, comment) { + return new NodeObject(SyntaxKind.JSDocImplementsTag, { + tagName, + className, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocAugmentsTag(tagName, className, comment) { + return new NodeObject(SyntaxKind.JSDocAugmentsTag, { + tagName, + className, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocSatisfiesTag(tagName, typeExpression, comment) { + return new NodeObject(SyntaxKind.JSDocSatisfiesTag, { + tagName, + typeExpression, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocThrowsTag(tagName, typeExpression, comment) { + return new NodeObject(SyntaxKind.JSDocThrowsTag, { + tagName, + typeExpression, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocThisTag(tagName, typeExpression, comment) { + return new NodeObject(SyntaxKind.JSDocThisTag, { + tagName, + typeExpression, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocImportTag(tagName, importClause, moduleSpecifier, attributes, comment) { + return new NodeObject(SyntaxKind.JSDocImportTag, { + tagName, + importClause, + moduleSpecifier, + attributes, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocCallbackTag(tagName, typeExpression, name, comment) { + return new NodeObject(SyntaxKind.JSDocCallbackTag, { + tagName, + typeExpression, + name, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocOverloadTag(tagName, typeExpression, comment) { + return new NodeObject(SyntaxKind.JSDocOverloadTag, { + tagName, + typeExpression, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocTypedefTag(tagName, typeExpression, name, comment) { + return new NodeObject(SyntaxKind.JSDocTypedefTag, { + tagName, + typeExpression, + name, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocSignature(typeParameters, parameters, type) { + return new NodeObject(SyntaxKind.JSDocSignature, { + typeParameters: typeParameters ? createNodeArray(typeParameters) : undefined, + parameters: createNodeArray(parameters), + type, + }); +} +export function createJSDocNameReference(name) { + return new NodeObject(SyntaxKind.JSDocNameReference, { + name, + }); +} +export function createModuleDeclaration(modifiers, keyword, name, body) { + return new NodeObject(SyntaxKind.ModuleDeclaration, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + keyword, + name, + body, + }); +} +export function createImportEqualsDeclaration(modifiers, isTypeOnly = false, name, moduleReference) { + return new NodeObject(SyntaxKind.ImportEqualsDeclaration, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + isTypeOnly, + name, + moduleReference, + }); +} +export function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes) { + return new NodeObject(SyntaxKind.ExportDeclaration, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + isTypeOnly, + exportClause, + moduleSpecifier, + attributes, + }); +} +export function createImportTypeNode(isTypeOf = false, argument, attributes, qualifier, typeArguments) { + return new NodeObject(SyntaxKind.ImportType, { + isTypeOf, + argument, + attributes, + qualifier, + typeArguments: typeArguments ? createNodeArray(typeArguments) : undefined, + }); +} +export function createImportClause(phaseModifier, name, namedBindings) { + return new NodeObject(SyntaxKind.ImportClause, { + phaseModifier, + name, + namedBindings, + }); +} +export function createImportSpecifier(isTypeOnly = false, propertyName, name) { + return new NodeObject(SyntaxKind.ImportSpecifier, { + isTypeOnly, + propertyName, + name, + }); +} +export function createJSDocText(text) { + return new NodeObject(SyntaxKind.JSDocText, { + text, + }); +} +export function createJSDocLink(name, text) { + return new NodeObject(SyntaxKind.JSDocLink, { + name, + text, + }); +} +export function createJSDocLinkPlain(name, text) { + return new NodeObject(SyntaxKind.JSDocLinkPlain, { + name, + text, + }); +} +export function createJSDocLinkCode(name, text) { + return new NodeObject(SyntaxKind.JSDocLinkCode, { + name, + text, + }); +} +export function createTypeParameterDeclaration(modifiers, name, constraint, expression, defaultType) { + return new NodeObject(SyntaxKind.TypeParameter, { + modifiers: modifiers ? createNodeArray(modifiers) : undefined, + name, + constraint, + expression, + defaultType, + }); +} +export function createSyntheticReferenceExpression(expression, thisArg) { + return new NodeObject(SyntaxKind.SyntheticReferenceExpression, { + expression, + thisArg, + }); +} +export function createJSDocTypeLiteral(jsdocPropertyTags, isArrayType) { + return new NodeObject(SyntaxKind.JSDocTypeLiteral, { + jsdocPropertyTags, + isArrayType, + }); +} +export function createForInStatement(awaitModifier, initializer, expression, statement) { + return new NodeObject(SyntaxKind.ForInStatement, { + awaitModifier, + initializer, + expression, + statement, + }); +} +export function createForOfStatement(awaitModifier, initializer, expression, statement) { + return new NodeObject(SyntaxKind.ForOfStatement, { + awaitModifier, + initializer, + expression, + statement, + }); +} +export function createCaseClause(expression, statements) { + return new NodeObject(SyntaxKind.CaseClause, { + expression, + statements: createNodeArray(statements), + }); +} +export function createDefaultClause(expression, statements) { + return new NodeObject(SyntaxKind.DefaultClause, { + expression, + statements: createNodeArray(statements), + }); +} +export function createObjectBindingPattern(elements) { + return new NodeObject(SyntaxKind.ObjectBindingPattern, { + elements: createNodeArray(elements), + }); +} +export function createArrayBindingPattern(elements) { + return new NodeObject(SyntaxKind.ArrayBindingPattern, { + elements: createNodeArray(elements), + }); +} +export function createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { + return new NodeObject(SyntaxKind.JSDocParameterTag, { + tagName, + name, + isBracketed, + typeExpression, + isNameFirst, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { + return new NodeObject(SyntaxKind.JSDocPropertyTag, { + tagName, + name, + isBracketed, + typeExpression, + isNameFirst, + comment: comment ? createNodeArray(comment) : undefined, + }); +} +export function updateQualifiedName(node, left, right) { + return node.left !== left || node.right !== right ? createQualifiedName(left, right) : node; +} +export function updateComputedPropertyName(node, expression) { + return node.expression !== expression ? createComputedPropertyName(expression) : node; +} +export function updateDecorator(node, expression) { + return node.expression !== expression ? createDecorator(expression) : node; +} +export function updateIfStatement(node, expression, thenStatement, elseStatement) { + return node.expression !== expression || node.thenStatement !== thenStatement || node.elseStatement !== elseStatement ? createIfStatement(expression, thenStatement, elseStatement) : node; +} +export function updateDoStatement(node, statement, expression) { + return node.statement !== statement || node.expression !== expression ? createDoStatement(statement, expression) : node; +} +export function updateWhileStatement(node, expression, statement) { + return node.expression !== expression || node.statement !== statement ? createWhileStatement(expression, statement) : node; +} +export function updateForStatement(node, initializer, condition, incrementor, statement) { + return node.initializer !== initializer || node.condition !== condition || node.incrementor !== incrementor || node.statement !== statement ? createForStatement(initializer, condition, incrementor, statement) : node; +} +export function updateBreakStatement(node, label) { + return node.label !== label ? createBreakStatement(label) : node; +} +export function updateContinueStatement(node, label) { + return node.label !== label ? createContinueStatement(label) : node; +} +export function updateReturnStatement(node, expression) { + return node.expression !== expression ? createReturnStatement(expression) : node; +} +export function updateWithStatement(node, expression, statement) { + return node.expression !== expression || node.statement !== statement ? createWithStatement(expression, statement) : node; +} +export function updateSwitchStatement(node, expression, caseBlock) { + return node.expression !== expression || node.caseBlock !== caseBlock ? createSwitchStatement(expression, caseBlock) : node; +} +export function updateCaseBlock(node, clauses) { + return node.clauses !== clauses ? createCaseBlock(clauses) : node; +} +export function updateThrowStatement(node, expression) { + return node.expression !== expression ? createThrowStatement(expression) : node; +} +export function updateTryStatement(node, tryBlock, catchClause, finallyBlock) { + return node.tryBlock !== tryBlock || node.catchClause !== catchClause || node.finallyBlock !== finallyBlock ? createTryStatement(tryBlock, catchClause, finallyBlock) : node; +} +export function updateCatchClause(node, variableDeclaration, block) { + return node.variableDeclaration !== variableDeclaration || node.block !== block ? createCatchClause(variableDeclaration, block) : node; +} +export function updateLabeledStatement(node, label, statement) { + return node.label !== label || node.statement !== statement ? createLabeledStatement(label, statement) : node; +} +export function updateExpressionStatement(node, expression) { + return node.expression !== expression ? createExpressionStatement(expression) : node; +} +export function updateBlock(node, statements) { + return node.statements !== statements ? createBlock(statements, node.multiLine) : node; +} +export function updateVariableStatement(node, modifiers, declarationList) { + return node.modifiers !== modifiers || node.declarationList !== declarationList ? createVariableStatement(modifiers, declarationList) : node; +} +export function updateVariableDeclaration(node, name, exclamationToken, type, initializer) { + return node.name !== name || node.exclamationToken !== exclamationToken || node.type !== type || node.initializer !== initializer ? createVariableDeclaration(name, exclamationToken, type, initializer) : node; +} +export function updateVariableDeclarationList(node, declarations) { + return node.declarations !== declarations ? createVariableDeclarationList(declarations, node.flags) : node; +} +export function updateParameterDeclaration(node, modifiers, dotDotDotToken, name, questionToken, type, initializer) { + return node.modifiers !== modifiers || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type || node.initializer !== initializer ? createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer) : node; +} +export function updateBindingElement(node, dotDotDotToken, propertyName, name, initializer) { + return node.dotDotDotToken !== dotDotDotToken || node.propertyName !== propertyName || node.name !== name || node.initializer !== initializer ? createBindingElement(dotDotDotToken, propertyName, name, initializer) : node; +} +export function updateMissingDeclaration(node, modifiers) { + return node.modifiers !== modifiers ? createMissingDeclaration(modifiers) : node; +} +export function updateFunctionDeclaration(node, modifiers, asteriskToken, name, typeParameters, parameters, type, body) { + return node.modifiers !== modifiers || node.asteriskToken !== asteriskToken || node.name !== name || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body) : node; +} +export function updateClassDeclaration(node, modifiers, name, typeParameters, heritageClauses, members) { + return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) : node; +} +export function updateClassExpression(node, modifiers, name, typeParameters, heritageClauses, members) { + return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? createClassExpression(modifiers, name, typeParameters, heritageClauses, members) : node; +} +export function updateHeritageClause(node, types) { + return node.types !== types ? createHeritageClause(node.token, types) : node; +} +export function updateInterfaceDeclaration(node, modifiers, name, typeParameters, heritageClauses, members) { + return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members) : node; +} +export function updateTypeAliasDeclaration(node, modifiers, name, typeParameters, type) { + return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.type !== type ? createTypeAliasDeclaration(modifiers, name, typeParameters, type) : node; +} +export function updateEnumMember(node, name, initializer) { + return node.name !== name || node.initializer !== initializer ? createEnumMember(name, initializer) : node; +} +export function updateEnumDeclaration(node, modifiers, name, members) { + return node.modifiers !== modifiers || node.name !== name || node.members !== members ? createEnumDeclaration(modifiers, name, members) : node; +} +export function updateModuleBlock(node, statements) { + return node.statements !== statements ? createModuleBlock(statements) : node; +} +export function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, attributes) { + return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.attributes !== attributes ? createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes) : node; +} +export function updateExternalModuleReference(node, expression) { + return node.expression !== expression ? createExternalModuleReference(expression) : node; +} +export function updateNamespaceImport(node, name) { + return node.name !== name ? createNamespaceImport(name) : node; +} +export function updateNamedImports(node, elements) { + return node.elements !== elements ? createNamedImports(elements) : node; +} +export function updateExportAssignment(node, modifiers, type, expression) { + return node.modifiers !== modifiers || node.type !== type || node.expression !== expression ? createExportAssignment(modifiers, node.isExportEquals, type, expression) : node; +} +export function updateNamespaceExportDeclaration(node, modifiers, name) { + return node.modifiers !== modifiers || node.name !== name ? createNamespaceExportDeclaration(modifiers, name) : node; +} +export function updateNamespaceExport(node, name) { + return node.name !== name ? createNamespaceExport(name) : node; +} +export function updateNamedExports(node, elements) { + return node.elements !== elements ? createNamedExports(elements) : node; +} +export function updateExportSpecifier(node, propertyName, name) { + return node.propertyName !== propertyName || node.name !== name ? createExportSpecifier(node.isTypeOnly, propertyName, name) : node; +} +export function updateCallSignatureDeclaration(node, typeParameters, parameters, type) { + return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? createCallSignatureDeclaration(typeParameters, parameters, type) : node; +} +export function updateConstructSignatureDeclaration(node, typeParameters, parameters, type) { + return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? createConstructSignatureDeclaration(typeParameters, parameters, type) : node; +} +export function updateConstructorDeclaration(node, modifiers, typeParameters, parameters, type, body) { + return node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? createConstructorDeclaration(modifiers, typeParameters, parameters, type, body) : node; +} +export function updateGetAccessorDeclaration(node, modifiers, name, typeParameters, parameters, type, body) { + return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? createGetAccessorDeclaration(modifiers, name, typeParameters, parameters, type, body) : node; +} +export function updateSetAccessorDeclaration(node, modifiers, name, typeParameters, parameters, type, body) { + return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? createSetAccessorDeclaration(modifiers, name, typeParameters, parameters, type, body) : node; +} +export function updateIndexSignatureDeclaration(node, modifiers, parameters, type) { + return node.modifiers !== modifiers || node.parameters !== parameters || node.type !== type ? createIndexSignatureDeclaration(modifiers, parameters, type) : node; +} +export function updateMethodSignatureDeclaration(node, modifiers, name, postfixToken, typeParameters, parameters, type) { + return node.modifiers !== modifiers || node.name !== name || node.postfixToken !== postfixToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? createMethodSignatureDeclaration(modifiers, name, postfixToken, typeParameters, parameters, type) : node; +} +export function updateMethodDeclaration(node, modifiers, asteriskToken, name, postfixToken, typeParameters, parameters, type, body) { + return node.modifiers !== modifiers || node.asteriskToken !== asteriskToken || node.name !== name || node.postfixToken !== postfixToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? createMethodDeclaration(modifiers, asteriskToken, name, postfixToken, typeParameters, parameters, type, body) : node; +} +export function updatePropertySignatureDeclaration(node, modifiers, name, postfixToken, type, initializer) { + return node.modifiers !== modifiers || node.name !== name || node.postfixToken !== postfixToken || node.type !== type || node.initializer !== initializer ? createPropertySignatureDeclaration(modifiers, name, postfixToken, type, initializer) : node; +} +export function updatePropertyDeclaration(node, modifiers, name, postfixToken, type, initializer) { + return node.modifiers !== modifiers || node.name !== name || node.postfixToken !== postfixToken || node.type !== type || node.initializer !== initializer ? createPropertyDeclaration(modifiers, name, postfixToken, type, initializer) : node; +} +export function updateClassStaticBlockDeclaration(node, modifiers, body) { + return node.modifiers !== modifiers || node.body !== body ? createClassStaticBlockDeclaration(modifiers, body) : node; +} +export function updateBinaryExpression(node, modifiers, left, type, operatorToken, right) { + return node.modifiers !== modifiers || node.left !== left || node.type !== type || node.operatorToken !== operatorToken || node.right !== right ? createBinaryExpression(modifiers, left, type, operatorToken, right) : node; +} +export function updatePrefixUnaryExpression(node, operand) { + return node.operand !== operand ? createPrefixUnaryExpression(node.operator, operand) : node; +} +export function updatePostfixUnaryExpression(node, operand) { + return node.operand !== operand ? createPostfixUnaryExpression(operand, node.operator) : node; +} +export function updateYieldExpression(node, asteriskToken, expression) { + return node.asteriskToken !== asteriskToken || node.expression !== expression ? createYieldExpression(asteriskToken, expression) : node; +} +export function updateArrowFunction(node, modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) { + return node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.equalsGreaterThanToken !== equalsGreaterThanToken || node.body !== body ? createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) : node; +} +export function updateFunctionExpression(node, modifiers, asteriskToken, name, typeParameters, parameters, type, body) { + return node.modifiers !== modifiers || node.asteriskToken !== asteriskToken || node.name !== name || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) : node; +} +export function updateAsExpression(node, expression, type) { + return node.expression !== expression || node.type !== type ? createAsExpression(expression, type) : node; +} +export function updateSatisfiesExpression(node, expression, type) { + return node.expression !== expression || node.type !== type ? createSatisfiesExpression(expression, type) : node; +} +export function updateConditionalExpression(node, condition, questionToken, whenTrue, colonToken, whenFalse) { + return node.condition !== condition || node.questionToken !== questionToken || node.whenTrue !== whenTrue || node.colonToken !== colonToken || node.whenFalse !== whenFalse ? createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse) : node; +} +export function updatePropertyAccessExpression(node, expression, questionDotToken, name) { + return node.expression !== expression || node.questionDotToken !== questionDotToken || node.name !== name ? createPropertyAccessExpression(expression, questionDotToken, name, node.flags) : node; +} +export function updateElementAccessExpression(node, expression, questionDotToken, argumentExpression) { + return node.expression !== expression || node.questionDotToken !== questionDotToken || node.argumentExpression !== argumentExpression ? createElementAccessExpression(expression, questionDotToken, argumentExpression, node.flags) : node; +} +export function updateCallExpression(node, expression, questionDotToken, typeArguments, arguments_) { + return node.expression !== expression || node.questionDotToken !== questionDotToken || node.typeArguments !== typeArguments || node.arguments !== arguments_ ? createCallExpression(expression, questionDotToken, typeArguments, arguments_, node.flags) : node; +} +export function updateNewExpression(node, expression, typeArguments, arguments_) { + return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== arguments_ ? createNewExpression(expression, typeArguments, arguments_) : node; +} +export function updateMetaProperty(node, name) { + return node.name !== name ? createMetaProperty(node.keywordToken, name) : node; +} +export function updateNonNullExpression(node, expression) { + return node.expression !== expression ? createNonNullExpression(expression, node.flags) : node; +} +export function updateSpreadElement(node, expression) { + return node.expression !== expression ? createSpreadElement(expression) : node; +} +export function updateTemplateExpression(node, head, templateSpans) { + return node.head !== head || node.templateSpans !== templateSpans ? createTemplateExpression(head, templateSpans) : node; +} +export function updateTemplateSpan(node, expression, literal) { + return node.expression !== expression || node.literal !== literal ? createTemplateSpan(expression, literal) : node; +} +export function updateTaggedTemplateExpression(node, tag, questionDotToken, typeArguments, template) { + return node.tag !== tag || node.questionDotToken !== questionDotToken || node.typeArguments !== typeArguments || node.template !== template ? createTaggedTemplateExpression(tag, questionDotToken, typeArguments, template, node.flags) : node; +} +export function updateParenthesizedExpression(node, expression) { + return node.expression !== expression ? createParenthesizedExpression(expression) : node; +} +export function updateArrayLiteralExpression(node, elements) { + return node.elements !== elements ? createArrayLiteralExpression(elements, node.multiLine) : node; +} +export function updateObjectLiteralExpression(node, properties) { + return node.properties !== properties ? createObjectLiteralExpression(properties, node.multiLine) : node; +} +export function updateSpreadAssignment(node, expression) { + return node.expression !== expression ? createSpreadAssignment(expression) : node; +} +export function updatePropertyAssignment(node, modifiers, name, postfixToken, type, initializer) { + return node.modifiers !== modifiers || node.name !== name || node.postfixToken !== postfixToken || node.type !== type || node.initializer !== initializer ? createPropertyAssignment(modifiers, name, postfixToken, type, initializer) : node; +} +export function updateShorthandPropertyAssignment(node, modifiers, name, postfixToken, type, equalsToken, objectAssignmentInitializer) { + return node.modifiers !== modifiers || node.name !== name || node.postfixToken !== postfixToken || node.type !== type || node.equalsToken !== equalsToken || node.objectAssignmentInitializer !== objectAssignmentInitializer ? createShorthandPropertyAssignment(modifiers, name, postfixToken, type, equalsToken, objectAssignmentInitializer) : node; +} +export function updateDeleteExpression(node, expression) { + return node.expression !== expression ? createDeleteExpression(expression) : node; +} +export function updateTypeOfExpression(node, expression) { + return node.expression !== expression ? createTypeOfExpression(expression) : node; +} +export function updateVoidExpression(node, expression) { + return node.expression !== expression ? createVoidExpression(expression) : node; +} +export function updateAwaitExpression(node, expression) { + return node.expression !== expression ? createAwaitExpression(expression) : node; +} +export function updateTypeAssertion(node, type, expression) { + return node.type !== type || node.expression !== expression ? createTypeAssertion(type, expression) : node; +} +export function updateUnionTypeNode(node, types) { + return node.types !== types ? createUnionTypeNode(types) : node; +} +export function updateIntersectionTypeNode(node, types) { + return node.types !== types ? createIntersectionTypeNode(types) : node; +} +export function updateConditionalTypeNode(node, checkType, extendsType, trueType, falseType) { + return node.checkType !== checkType || node.extendsType !== extendsType || node.trueType !== trueType || node.falseType !== falseType ? createConditionalTypeNode(checkType, extendsType, trueType, falseType) : node; +} +export function updateTypeOperatorNode(node, type) { + return node.type !== type ? createTypeOperatorNode(node.operator, type) : node; +} +export function updateInferTypeNode(node, typeParameter) { + return node.typeParameter !== typeParameter ? createInferTypeNode(typeParameter) : node; +} +export function updateArrayTypeNode(node, elementType) { + return node.elementType !== elementType ? createArrayTypeNode(elementType) : node; +} +export function updateIndexedAccessTypeNode(node, objectType, indexType) { + return node.objectType !== objectType || node.indexType !== indexType ? createIndexedAccessTypeNode(objectType, indexType) : node; +} +export function updateTypeReferenceNode(node, typeName, typeArguments) { + return node.typeName !== typeName || node.typeArguments !== typeArguments ? createTypeReferenceNode(typeName, typeArguments) : node; +} +export function updateExpressionWithTypeArguments(node, expression, typeArguments) { + return node.expression !== expression || node.typeArguments !== typeArguments ? createExpressionWithTypeArguments(expression, typeArguments) : node; +} +export function updateLiteralTypeNode(node, literal) { + return node.literal !== literal ? createLiteralTypeNode(literal) : node; +} +export function updateTypePredicateNode(node, assertsModifier, parameterName, type) { + return node.assertsModifier !== assertsModifier || node.parameterName !== parameterName || node.type !== type ? createTypePredicateNode(assertsModifier, parameterName, type) : node; +} +export function updateImportAttribute(node, name, value) { + return node.name !== name || node.value !== value ? createImportAttribute(name, value) : node; +} +export function updateImportAttributes(node, attributes) { + return node.attributes !== attributes ? createImportAttributes(node.token, attributes, node.multiLine) : node; +} +export function updateTypeQueryNode(node, exprName, typeArguments) { + return node.exprName !== exprName || node.typeArguments !== typeArguments ? createTypeQueryNode(exprName, typeArguments) : node; +} +export function updateMappedTypeNode(node, readonlyToken, typeParameter, nameType, questionToken, type, members) { + return node.readonlyToken !== readonlyToken || node.typeParameter !== typeParameter || node.nameType !== nameType || node.questionToken !== questionToken || node.type !== type || node.members !== members ? createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members) : node; +} +export function updateTypeLiteralNode(node, members) { + return node.members !== members ? createTypeLiteralNode(members) : node; +} +export function updateTupleTypeNode(node, elements) { + return node.elements !== elements ? createTupleTypeNode(elements) : node; +} +export function updateNamedTupleMember(node, dotDotDotToken, name, questionToken, type) { + return node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type ? createNamedTupleMember(dotDotDotToken, name, questionToken, type) : node; +} +export function updateOptionalTypeNode(node, type) { + return node.type !== type ? createOptionalTypeNode(type) : node; +} +export function updateRestTypeNode(node, type) { + return node.type !== type ? createRestTypeNode(type) : node; +} +export function updateParenthesizedTypeNode(node, type) { + return node.type !== type ? createParenthesizedTypeNode(type) : node; +} +export function updateFunctionTypeNode(node, typeParameters, parameters, type) { + return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? createFunctionTypeNode(typeParameters, parameters, type) : node; +} +export function updateConstructorTypeNode(node, modifiers, typeParameters, parameters, type) { + return node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? createConstructorTypeNode(modifiers, typeParameters, parameters, type) : node; +} +export function updateTemplateLiteralTypeNode(node, head, templateSpans) { + return node.head !== head || node.templateSpans !== templateSpans ? createTemplateLiteralTypeNode(head, templateSpans) : node; +} +export function updateTemplateLiteralTypeSpan(node, type, literal) { + return node.type !== type || node.literal !== literal ? createTemplateLiteralTypeSpan(type, literal) : node; +} +export function updateSyntheticExpression(node, tupleNameSource) { + return node.tupleNameSource !== tupleNameSource ? createSyntheticExpression(node.type, node.isSpread, tupleNameSource) : node; +} +export function updatePartiallyEmittedExpression(node, expression) { + return node.expression !== expression ? createPartiallyEmittedExpression(expression) : node; +} +export function updateJsxElement(node, openingElement, children, closingElement) { + return node.openingElement !== openingElement || node.children !== children || node.closingElement !== closingElement ? createJsxElement(openingElement, children, closingElement) : node; +} +export function updateJsxAttributes(node, properties) { + return node.properties !== properties ? createJsxAttributes(properties) : node; +} +export function updateJsxNamespacedName(node, namespace, name) { + return node.namespace !== namespace || node.name !== name ? createJsxNamespacedName(namespace, name) : node; +} +export function updateJsxOpeningElement(node, tagName, typeArguments, attributes) { + return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? createJsxOpeningElement(tagName, typeArguments, attributes) : node; +} +export function updateJsxSelfClosingElement(node, tagName, typeArguments, attributes) { + return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? createJsxSelfClosingElement(tagName, typeArguments, attributes) : node; +} +export function updateJsxFragment(node, openingFragment, children, closingFragment) { + return node.openingFragment !== openingFragment || node.children !== children || node.closingFragment !== closingFragment ? createJsxFragment(openingFragment, children, closingFragment) : node; +} +export function updateJsxAttribute(node, name, initializer) { + return node.name !== name || node.initializer !== initializer ? createJsxAttribute(name, initializer) : node; +} +export function updateJsxSpreadAttribute(node, expression) { + return node.expression !== expression ? createJsxSpreadAttribute(expression) : node; +} +export function updateJsxClosingElement(node, tagName) { + return node.tagName !== tagName ? createJsxClosingElement(tagName) : node; +} +export function updateJsxExpression(node, dotDotDotToken, expression) { + return node.dotDotDotToken !== dotDotDotToken || node.expression !== expression ? createJsxExpression(dotDotDotToken, expression) : node; +} +export function updateSyntaxList(node, children) { + return node.children !== children ? createSyntaxList(children) : node; +} +export function updateJSDoc(node, comment, tags) { + return node.comment !== comment || node.tags !== tags ? createJSDoc(comment, tags) : node; +} +export function updateJSDocTypeExpression(node, type) { + return node.type !== type ? createJSDocTypeExpression(type) : node; +} +export function updateJSDocNonNullableType(node, type) { + return node.type !== type ? createJSDocNonNullableType(type) : node; +} +export function updateJSDocNullableType(node, type) { + return node.type !== type ? createJSDocNullableType(type) : node; +} +export function updateJSDocVariadicType(node, type) { + return node.type !== type ? createJSDocVariadicType(type) : node; +} +export function updateJSDocOptionalType(node, type) { + return node.type !== type ? createJSDocOptionalType(type) : node; +} +export function updateJSDocTypeTag(node, tagName, typeExpression, comment) { + return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? createJSDocTypeTag(tagName, typeExpression, comment) : node; +} +export function updateJSDocUnknownTag(node, tagName, comment) { + return node.tagName !== tagName || node.comment !== comment ? createJSDocUnknownTag(tagName, comment) : node; +} +export function updateJSDocTemplateTag(node, tagName, constraint, typeParameters, comment) { + return node.tagName !== tagName || node.constraint !== constraint || node.typeParameters !== typeParameters || node.comment !== comment ? createJSDocTemplateTag(tagName, constraint, typeParameters, comment) : node; +} +export function updateJSDocReturnTag(node, tagName, typeExpression, comment) { + return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? createJSDocReturnTag(tagName, typeExpression, comment) : node; +} +export function updateJSDocPublicTag(node, tagName, comment) { + return node.tagName !== tagName || node.comment !== comment ? createJSDocPublicTag(tagName, comment) : node; +} +export function updateJSDocPrivateTag(node, tagName, comment) { + return node.tagName !== tagName || node.comment !== comment ? createJSDocPrivateTag(tagName, comment) : node; +} +export function updateJSDocProtectedTag(node, tagName, comment) { + return node.tagName !== tagName || node.comment !== comment ? createJSDocProtectedTag(tagName, comment) : node; +} +export function updateJSDocReadonlyTag(node, tagName, comment) { + return node.tagName !== tagName || node.comment !== comment ? createJSDocReadonlyTag(tagName, comment) : node; +} +export function updateJSDocOverrideTag(node, tagName, comment) { + return node.tagName !== tagName || node.comment !== comment ? createJSDocOverrideTag(tagName, comment) : node; +} +export function updateJSDocDeprecatedTag(node, tagName, comment) { + return node.tagName !== tagName || node.comment !== comment ? createJSDocDeprecatedTag(tagName, comment) : node; +} +export function updateJSDocSeeTag(node, tagName, nameExpression, comment) { + return node.tagName !== tagName || node.nameExpression !== nameExpression || node.comment !== comment ? createJSDocSeeTag(tagName, nameExpression, comment) : node; +} +export function updateJSDocImplementsTag(node, tagName, className, comment) { + return node.tagName !== tagName || node.className !== className || node.comment !== comment ? createJSDocImplementsTag(tagName, className, comment) : node; +} +export function updateJSDocAugmentsTag(node, tagName, className, comment) { + return node.tagName !== tagName || node.className !== className || node.comment !== comment ? createJSDocAugmentsTag(tagName, className, comment) : node; +} +export function updateJSDocSatisfiesTag(node, tagName, typeExpression, comment) { + return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? createJSDocSatisfiesTag(tagName, typeExpression, comment) : node; +} +export function updateJSDocThrowsTag(node, tagName, typeExpression, comment) { + return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? createJSDocThrowsTag(tagName, typeExpression, comment) : node; +} +export function updateJSDocThisTag(node, tagName, typeExpression, comment) { + return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? createJSDocThisTag(tagName, typeExpression, comment) : node; +} +export function updateJSDocImportTag(node, tagName, importClause, moduleSpecifier, attributes, comment) { + return node.tagName !== tagName || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.attributes !== attributes || node.comment !== comment ? createJSDocImportTag(tagName, importClause, moduleSpecifier, attributes, comment) : node; +} +export function updateJSDocCallbackTag(node, tagName, typeExpression, name, comment) { + return node.tagName !== tagName || node.typeExpression !== typeExpression || node.name !== name || node.comment !== comment ? createJSDocCallbackTag(tagName, typeExpression, name, comment) : node; +} +export function updateJSDocOverloadTag(node, tagName, typeExpression, comment) { + return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? createJSDocOverloadTag(tagName, typeExpression, comment) : node; +} +export function updateJSDocTypedefTag(node, tagName, typeExpression, name, comment) { + return node.tagName !== tagName || node.typeExpression !== typeExpression || node.name !== name || node.comment !== comment ? createJSDocTypedefTag(tagName, typeExpression, name, comment) : node; +} +export function updateJSDocSignature(node, typeParameters, parameters, type) { + return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? createJSDocSignature(typeParameters, parameters, type) : node; +} +export function updateJSDocNameReference(node, name) { + return node.name !== name ? createJSDocNameReference(name) : node; +} +export function updateModuleDeclaration(node, modifiers, name, body) { + return node.modifiers !== modifiers || node.name !== name || node.body !== body ? createModuleDeclaration(modifiers, node.keyword, name, body) : node; +} +export function updateImportEqualsDeclaration(node, modifiers, name, moduleReference) { + return node.modifiers !== modifiers || node.name !== name || node.moduleReference !== moduleReference ? createImportEqualsDeclaration(modifiers, node.isTypeOnly, name, moduleReference) : node; +} +export function updateExportDeclaration(node, modifiers, exportClause, moduleSpecifier, attributes) { + return node.modifiers !== modifiers || node.exportClause !== exportClause || node.moduleSpecifier !== moduleSpecifier || node.attributes !== attributes ? createExportDeclaration(modifiers, node.isTypeOnly, exportClause, moduleSpecifier, attributes) : node; +} +export function updateImportTypeNode(node, argument, attributes, qualifier, typeArguments) { + return node.argument !== argument || node.attributes !== attributes || node.qualifier !== qualifier || node.typeArguments !== typeArguments ? createImportTypeNode(node.isTypeOf, argument, attributes, qualifier, typeArguments) : node; +} +export function updateImportClause(node, name, namedBindings) { + return node.name !== name || node.namedBindings !== namedBindings ? createImportClause(node.phaseModifier, name, namedBindings) : node; +} +export function updateImportSpecifier(node, propertyName, name) { + return node.propertyName !== propertyName || node.name !== name ? createImportSpecifier(node.isTypeOnly, propertyName, name) : node; +} +export function updateJSDocLink(node, name) { + return node.name !== name ? createJSDocLink(name, node.text) : node; +} +export function updateJSDocLinkPlain(node, name) { + return node.name !== name ? createJSDocLinkPlain(name, node.text) : node; +} +export function updateJSDocLinkCode(node, name) { + return node.name !== name ? createJSDocLinkCode(name, node.text) : node; +} +export function updateTypeParameterDeclaration(node, modifiers, name, constraint, expression, defaultType) { + return node.modifiers !== modifiers || node.name !== name || node.constraint !== constraint || node.expression !== expression || node.defaultType !== defaultType ? createTypeParameterDeclaration(modifiers, name, constraint, expression, defaultType) : node; +} +export function updateSyntheticReferenceExpression(node, expression, thisArg) { + return node.expression !== expression || node.thisArg !== thisArg ? createSyntheticReferenceExpression(expression, thisArg) : node; +} +export function updateJSDocTypeLiteral(node, jsdocPropertyTags) { + return node.jsdocPropertyTags !== jsdocPropertyTags ? createJSDocTypeLiteral(jsdocPropertyTags, node.isArrayType) : node; +} +export function updateForInStatement(node, awaitModifier, initializer, expression, statement) { + return node.awaitModifier !== awaitModifier || node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? createForInStatement(awaitModifier, initializer, expression, statement) : node; +} +export function updateForOfStatement(node, awaitModifier, initializer, expression, statement) { + return node.awaitModifier !== awaitModifier || node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? createForOfStatement(awaitModifier, initializer, expression, statement) : node; +} +export function updateCaseClause(node, expression, statements) { + return node.expression !== expression || node.statements !== statements ? createCaseClause(expression, statements) : node; +} +export function updateDefaultClause(node, expression, statements) { + return node.expression !== expression || node.statements !== statements ? createDefaultClause(expression, statements) : node; +} +export function updateObjectBindingPattern(node, elements) { + return node.elements !== elements ? createObjectBindingPattern(elements) : node; +} +export function updateArrayBindingPattern(node, elements) { + return node.elements !== elements ? createArrayBindingPattern(elements) : node; +} +export function updateJSDocParameterTag(node, tagName, name, typeExpression, comment) { + return node.tagName !== tagName || node.name !== name || node.typeExpression !== typeExpression || node.comment !== comment ? createJSDocParameterTag(tagName, name, node.isBracketed, typeExpression, node.isNameFirst, comment) : node; +} +export function updateJSDocPropertyTag(node, tagName, name, typeExpression, comment) { + return node.tagName !== tagName || node.name !== name || node.typeExpression !== typeExpression || node.comment !== comment ? createJSDocPropertyTag(tagName, name, node.isBracketed, typeExpression, node.isNameFirst, comment) : node; +} +export function createSourceFile(statements, endOfFileToken, text, fileName, path) { + return new NodeObject(SyntaxKind.SourceFile, { + statements: createNodeArray(statements), + endOfFileToken, + text, + fileName, + path, + }); +} +function cloneSourceFileWithChanges(source, statements, endOfFileToken) { + return new NodeObject(SyntaxKind.SourceFile, { + ...cloneSourceFileData(source), + statements: createNodeArray(statements), + endOfFileToken, + }); +} +export function updateSourceFile(node, statements, endOfFileToken) { + return node.statements !== statements || node.endOfFileToken !== endOfFileToken + ? cloneSourceFileWithChanges(node, statements, endOfFileToken) + : node; +} +//# sourceMappingURL=factory.generated.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/factory.generated.js.map b/node_modules/typescript/dist/ast/factory.generated.js.map new file mode 100644 index 0000000..512faca --- /dev/null +++ b/node_modules/typescript/dist/ast/factory.generated.js.map @@ -0,0 +1 @@ +{"version":3,"file":"factory.generated.js","sourceRoot":"","sources":["../../src/ast/factory.generated.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAE9D,OAAO,EAAE,S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AU;IACpI,OAAO,IAAI,UAAU,CAAC,UAAU,CAAC,UAAU,EAAE;QACzC,UAAU,EAAE,eAAe,CAAC,UAAU,CAAC;QACvC,cAAc;QACd,IAAI;QACJ,QAAQ;QACR,IAAI;KACP,CAA0B,CAAC;AAChC,CAAC;AAED,SAAS,0BAA0B,CAAC,MAAkB,EAAE,UAAgC,EAAE,cAAyB;IAC/G,OAAO,IAAI,UAAU,CAAC,UAAU,CAAC,UAAU,EAAE;QACzC,GAAG,mBAAmB,CAAC,MAAM,CAAC;QAC9B,UAAU,EAAE,eAAe,CAAC,UAAU,CAAC;QACvC,cAAc;KACjB,CAA0B,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAgB,EAAE,UAAgC,EAAE,cAAyB;IAC1G,OAAO,IAAI,CAAC,UAAU,KAAK,UAAU,IAAI,IAAI,CAAC,cAAc,KAAK,cAAc;QAC3E,CAAC,CAAC,0BAA0B,CAAC,IAAI,EAAE,UAAU,EAAE,cAAc,CAAC;QAC9D,CAAC,CAAC,IAAI,CAAC;AACf,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/index.d.ts b/node_modules/typescript/dist/ast/index.d.ts new file mode 100644 index 0000000..7a74699 --- /dev/null +++ b/node_modules/typescript/dist/ast/index.d.ts @@ -0,0 +1,20 @@ +export { CharacterCodes } from "#enums/characterCodes"; +export { CommentDirectiveType } from "#enums/commentDirectiveType"; +export { InternalSymbolName } from "#enums/internalSymbolName"; +export { LanguageVariant } from "#enums/languageVariant"; +export { ModifierFlags } from "#enums/modifierFlags"; +export { NodeFlags } from "#enums/nodeFlags"; +export { RegularExpressionFlags } from "#enums/regularExpressionFlags"; +export { ScriptKind } from "#enums/scriptKind"; +export { ScriptTarget } from "#enums/scriptTarget"; +export { SyntaxKind } from "#enums/syntaxKind"; +export { TokenFlags } from "#enums/tokenFlags"; +export * from "./ast.ts"; +export * from "./astnav.ts"; +export * from "./clone.ts"; +export * from "./is.ts"; +export * from "./jsdoc.ts"; +export * from "./scanner.ts"; +export * from "./utils.ts"; +export * from "./visitor.ts"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/index.d.ts.map b/node_modules/typescript/dist/ast/index.d.ts.map new file mode 100644 index 0000000..53d8898 --- /dev/null +++ b/node_modules/typescript/dist/ast/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/index.js b/node_modules/typescript/dist/ast/index.js new file mode 100644 index 0000000..2621741 --- /dev/null +++ b/node_modules/typescript/dist/ast/index.js @@ -0,0 +1,20 @@ +export { CharacterCodes } from "#enums/characterCodes"; +export { CommentDirectiveType } from "#enums/commentDirectiveType"; +export { InternalSymbolName } from "#enums/internalSymbolName"; +export { LanguageVariant } from "#enums/languageVariant"; +export { ModifierFlags } from "#enums/modifierFlags"; +export { NodeFlags } from "#enums/nodeFlags"; +export { RegularExpressionFlags } from "#enums/regularExpressionFlags"; +export { ScriptKind } from "#enums/scriptKind"; +export { ScriptTarget } from "#enums/scriptTarget"; +export { SyntaxKind } from "#enums/syntaxKind"; +export { TokenFlags } from "#enums/tokenFlags"; +export * from "./ast.js"; +export * from "./astnav.js"; +export * from "./clone.js"; +export * from "./is.js"; +export * from "./jsdoc.js"; +export * from "./scanner.js"; +export * from "./utils.js"; +export * from "./visitor.js"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/index.js.map b/node_modules/typescript/dist/ast/index.js.map new file mode 100644 index 0000000..7017eee --- /dev/null +++ b/node_modules/typescript/dist/ast/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/is.d.ts b/node_modules/typescript/dist/ast/is.d.ts new file mode 100644 index 0000000..77d81a1 --- /dev/null +++ b/node_modules/typescript/dist/ast/is.d.ts @@ -0,0 +1,35 @@ +import { OuterExpressionKinds } from "#enums/outerExpressionKinds"; +import type { AsExpression, BindingPattern, BlockOrExpression, BooleanLiteral, ConciseBody, ExclamationToken, Expression, ExpressionWithTypeArguments, ForInitializer, Identifier, JSDocTypeExpression, JSDocTypeLiteral, JsxTagNameExpression, LeftHandSideExpression, LiteralExpression, MinusToken, ModuleDeclaration, Node, NonNullExpression, NullLiteral, ParenthesizedExpression, PartiallyEmittedExpression, PlusToken, PrefixUnaryExpression, QuestionToken, ReadonlyKeyword, SatisfiesExpression, Statement, TemplateMiddle, TemplateTail, ThisTypeNode, TypeAssertion, TypeNode, UnaryExpressionBase } from "./ast.ts"; +export * from "./is.generated.ts"; +type JSDocNamespaceDeclaration = ModuleDeclaration; +type WrappedExpression = ParenthesizedExpression | TypeAssertion | AsExpression | SatisfiesExpression | ExpressionWithTypeArguments | NonNullExpression | PartiallyEmittedExpression; +type OuterExpression = WrappedExpression; +export declare function isTypeNode(node: Node): node is TypeNode; +export declare function isStatement(node: Node): node is Statement; +export declare function isExpression(node: Node): node is Expression; +export declare function isBlockOrExpression(node: Node): node is BlockOrExpression; +export declare function isLeftHandSideExpression(node: Node): node is LeftHandSideExpression; +export declare function skipPartiallyEmittedExpressions(node: Expression): Expression; +export declare function skipPartiallyEmittedExpressions(node: Node): Node; +export declare function isUnaryExpression(node: Node): node is UnaryExpressionBase; +/** @internal */ +export declare function isOuterExpression(node: Node, kinds?: OuterExpressionKinds): node is OuterExpression; +/** @internal */ +export declare function skipOuterExpressions(node: WrappedExpression): T; +/** @internal */ +export declare function skipOuterExpressions(node: Expression, kinds?: OuterExpressionKinds): Expression; +/** @internal */ +export declare function skipOuterExpressions(node: Node, kinds?: OuterExpressionKinds): Node; +export declare function isBindingPattern(node: Node): node is BindingPattern; +export declare function isConciseBody(node: Node): node is ConciseBody; +export declare function isForInitializer(node: Node): node is ForInitializer; +export declare function isQuestionOrExclamationToken(node: Node): node is QuestionToken | ExclamationToken; +export declare function isIdentifierOrThisTypeNode(node: Node): node is Identifier | ThisTypeNode; +export declare function isReadonlyKeywordOrPlusOrMinusToken(node: Node): node is ReadonlyKeyword | PlusToken | MinusToken; +export declare function isQuestionOrPlusOrMinusToken(node: Node): node is QuestionToken | PlusToken | MinusToken; +export declare function isTemplateMiddleOrTemplateTail(node: Node): node is TemplateMiddle | TemplateTail; +export declare function isLiteralTypeLiteral(node: Node): node is NullLiteral | BooleanLiteral | LiteralExpression | PrefixUnaryExpression; +export declare function isIdentifierOrJSDocNamespaceDeclaration(node: Node): node is Identifier | JSDocNamespaceDeclaration; +export declare function isJSDocTypeExpressionOrJSDocTypeLiteral(node: Node): node is JSDocTypeExpression | JSDocTypeLiteral; +export declare function isJsxTagNameExpression(node: Node): node is JsxTagNameExpression; +//# sourceMappingURL=is.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/is.d.ts.map b/node_modules/typescript/dist/ast/is.d.ts.map new file mode 100644 index 0000000..4b19750 --- /dev/null +++ b/node_modules/typescript/dist/ast/is.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"is.d.ts","sourceRoot":"","sources":["../../src/ast/is.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAGnE,OAAO,KAAK,EACR,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,UAAU,E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AAG,IAAI,IAAI,WAAW,GAAG,cAAc,GAAG,iBAAiB,GAAG,qBAAqB,CAKjI;AAED,wBAAgB,uCAAuC,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,UAAU,GAAG,yBAAyB,CAElH;AAED,wBAAgB,uCAAuC,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,mBAAmB,GAAG,gBAAgB,CAElH;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,oBAAoB,CAM/E"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/is.generated.d.ts b/node_modules/typescript/dist/ast/is.generated.d.ts new file mode 100644 index 0000000..2b785fc --- /dev/null +++ b/node_modules/typescript/dist/ast/is.generated.d.ts @@ -0,0 +1,329 @@ +import { SyntaxKind } from "#enums/syntaxKind"; +import type { AbstractKeyword, AccessExpression, AccessorDeclaration, AccessorKeyword, AdditiveOperator, AdditiveOperatorOrHigher, AnyImportSyntax, ArrayBindingElement, ArrayBindingPattern, ArrayDestructuringAssignment, ArrayLiteralExpression, ArrayTypeNode, ArrowFunction, AsExpression, AssertionExpression, AssertKeyword, AssertsKeyword, AssignmentOperator, AssignmentOperatorOrHigher, AssignmentOperatorToken, AsteriskToken, AsyncKeyword, AwaitExpression, AwaitKeyword, BigIntLiteral, BinaryExpression, BinaryOperator, BinaryOperatorToken, BindingElement, BindingName, BitwiseOperator, BitwiseOperatorOrHigher, Block, BooleanLiteral, BreakOrContinueStatement, BreakStatement, CallExpression, CallLikeExpression, CallOrNewExpression, CallSignatureDeclaration, CaseBlock, CaseClause, CaseKeyword, CatchClause, ClassDeclaration, ClassExpression, ClassLikeDeclaration, ClassStaticBlockDeclaration, ColonToken, CompoundAssignmentOperator, ComputedPropertyName, ConditionalExpression, ConditionalTypeNode, ConstKeyword, ConstructorDeclaration, ConstructorTypeNode, ConstructSignatureDeclaration, ContinueStatement, DebuggerStatement, DeclarationName, DeclareKeyword, Decorator, DefaultClause, DefaultKeyword, DeleteExpression, DestructuringAssignment, DoStatement, DotDotDotToken, DotToken, ElementAccessExpression, EmptyStatement, EndOfFile, EntityName, EnumDeclaration, EnumMember, EqualityOperator, EqualityOperatorOrHigher, EqualsGreaterThanToken, EqualsToken, ExclamationToken, ExponentiationOperator, ExportAssignment, ExportDeclaration, ExportKeyword, ExportSpecifier, ExpressionStatement, ExpressionWithTypeArguments, ExternalModuleReference, FalseLiteral, ForInStatement, ForOfStatement, ForStatement, FunctionBody, FunctionDeclaration, FunctionExpression, FunctionLikeDeclaration, FunctionTypeNode, GetAccessorDeclaration, HeritageClause, Identifier, IfStatement, ImportAttribute, ImportAttributeName, ImportAttributes, ImportClause, ImportClauseOrBindingPattern, ImportDeclaration, ImportEqualsDeclaration, ImportExpression, ImportPhaseModifierSyntaxKind, ImportSpecifier, ImportTypeNode, IndexedAccessTypeNode, IndexSignatureDeclaration, InferTypeNode, InKeyword, InterfaceDeclaration, IntersectionTypeNode, JSDoc, JSDocAllType, JSDocAugmentsTag, JSDocCallbackTag, JSDocComment, JSDocDeprecatedTag, JSDocFullName, JSDocImplementsTag, JSDocImportTag, JSDocLink, JSDocLinkCode, JSDocLinkPlain, JSDocNameReference, JSDocNonNullableType, JSDocNullableType, JSDocOptionalType, JSDocOverloadTag, JSDocOverrideTag, JSDocParameterTag, JSDocPrivateTag, JSDocPropertyTag, JSDocProtectedTag, JSDocPublicTag, JSDocReadonlyTag, JSDocReturnTag, JSDocSatisfiesTag, JSDocSeeTag, JSDocSignature, JSDocTemplateTag, JSDocText, JSDocThisTag, JSDocThrowsTag, JSDocTypedefTag, JSDocTypeExpression, JSDocTypeLiteral, JSDocTypeTag, JSDocUnknownTag, JSDocVariadicType, JsxAttribute, JsxAttributeLike, JsxAttributeName, JsxAttributes, JsxAttributeValue, JsxChild, JsxClosingElement, JsxClosingFragment, JsxElement, JsxExpression, JsxFragment, JsxNamespacedName, JsxOpeningElement, JsxOpeningFragment, JsxOpeningLikeElement, JsxSelfClosingElement, JsxSpreadAttribute, JsxText, JsxTokenSyntaxKind, KeywordExpression, KeywordExpressionSyntaxKind, KeywordTypeNode, KeywordTypeSyntaxKind, LabeledStatement, LiteralExpression, LiteralLikeNode, LiteralToken, LiteralTypeNode, LogicalOperator, LogicalOperatorOrHigher, LogicalOrCoalescingAssignmentOperator, MappedTypeNode, MemberName, MetaProperty, MethodDeclaration, MethodSignatureDeclaration, MinusToken, MissingDeclaration, Modifier, ModifierLike, ModifierSyntaxKind, ModuleBlock, ModuleBody, ModuleDeclaration, ModuleExportName, ModuleName, ModuleReference, MultiplicativeOperator, MultiplicativeOperatorOrHigher, NamedExportBindings, NamedExports, NamedImportBindings, NamedImports, NamedImportsOrExports, NamedTupleMember, NamespaceExport, NamespaceExportDeclaration, NamespaceImport, NewExpression, Node, NonNullExpression, NoSubstitutionTemplateLiteral, NotEmittedStatement, NotEmittedTypeElement, NullLiteral, NumericLiteral, NumericOrStringLikeLiteral, ObjectBindingPattern, ObjectDestructuringAssignment, ObjectLiteralElementLike, ObjectLiteralExpression, ObjectLiteralLikeNode, ObjectTypeDeclaration, OmittedExpression, OptionalTypeNode, OutKeyword, OverrideKeyword, ParameterDeclaration, ParenthesizedExpression, ParenthesizedTypeNode, PartiallyEmittedExpression, PlusToken, PostfixUnaryExpression, PostfixUnaryOperator, PrefixUnaryExpression, PrefixUnaryOperator, PrivateIdentifier, PrivateKeyword, PropertyAccessExpression, PropertyAssignment, PropertyDeclaration, PropertyName, PropertyNameLiteral, PropertySignatureDeclaration, ProtectedKeyword, PseudoLiteralSyntaxKind, PseudoLiteralToken, PublicKeyword, QualifiedName, QuestionDotToken, QuestionToken, ReadonlyKeyword, RegularExpressionLiteral, RelationalOperator, RelationalOperatorOrHigher, RestTypeNode, ReturnStatement, SatisfiesExpression, SemicolonClassElement, SetAccessorDeclaration, ShiftOperator, ShiftOperatorOrHigher, ShorthandPropertyAssignment, SignatureDeclaration, SourceFile, SpreadAssignment, SpreadElement, StaticKeyword, StringLiteral, StringLiteralLikeNode, SuperExpression, SwitchStatement, SyntaxList, SyntheticExpression, SyntheticReferenceExpression, TaggedTemplateExpression, TemplateExpression, TemplateHead, TemplateLiteral, TemplateLiteralLikeNode, TemplateLiteralToken, TemplateLiteralTypeNode, TemplateLiteralTypeSpan, TemplateMiddle, TemplateMiddleOrTail, TemplateSpan, TemplateTail, ThisExpression, ThisTypeNode, ThrowStatement, Token, TriviaSyntaxKind, TrueLiteral, TryStatement, TupleTypeNode, TypeAliasDeclaration, TypeAssertion, TypeLiteralNode, TypeOfExpression, TypeOperatorNode, TypeParameterDeclaration, TypePredicateNode, TypePredicateParameterName, TypeQueryNode, TypeReferenceNode, UnionOrIntersectionTypeNode, UnionTypeNode, VariableDeclaration, VariableDeclarationList, VariableOrParameterDeclaration, VariableOrPropertyDeclaration, VariableStatement, VoidExpression, WhileStatement, WithStatement, YieldExpression } from "./ast.ts"; +export declare function isToken(node: Node): node is Token; +export declare function isIdentifier(node: Node): node is Identifier; +export declare function isPrivateIdentifier(node: Node): node is PrivateIdentifier; +export declare function isQualifiedName(node: Node): node is QualifiedName; +export declare function isComputedPropertyName(node: Node): node is ComputedPropertyName; +export declare function isDecorator(node: Node): node is Decorator; +export declare function isEmptyStatement(node: Node): node is EmptyStatement; +export declare function isIfStatement(node: Node): node is IfStatement; +export declare function isDoStatement(node: Node): node is DoStatement; +export declare function isWhileStatement(node: Node): node is WhileStatement; +export declare function isForStatement(node: Node): node is ForStatement; +export declare function isBreakStatement(node: Node): node is BreakStatement; +export declare function isContinueStatement(node: Node): node is ContinueStatement; +export declare function isReturnStatement(node: Node): node is ReturnStatement; +export declare function isWithStatement(node: Node): node is WithStatement; +export declare function isSwitchStatement(node: Node): node is SwitchStatement; +export declare function isCaseBlock(node: Node): node is CaseBlock; +export declare function isThrowStatement(node: Node): node is ThrowStatement; +export declare function isTryStatement(node: Node): node is TryStatement; +export declare function isCatchClause(node: Node): node is CatchClause; +export declare function isDebuggerStatement(node: Node): node is DebuggerStatement; +export declare function isLabeledStatement(node: Node): node is LabeledStatement; +export declare function isExpressionStatement(node: Node): node is ExpressionStatement; +export declare function isBlock(node: Node): node is Block; +export declare function isVariableStatement(node: Node): node is VariableStatement; +export declare function isVariableDeclaration(node: Node): node is VariableDeclaration; +export declare function isVariableDeclarationList(node: Node): node is VariableDeclarationList; +export declare function isParameterDeclaration(node: Node): node is ParameterDeclaration; +export declare function isBindingElement(node: Node): node is BindingElement; +export declare function isMissingDeclaration(node: Node): node is MissingDeclaration; +export declare function isFunctionDeclaration(node: Node): node is FunctionDeclaration; +export declare function isClassDeclaration(node: Node): node is ClassDeclaration; +export declare function isClassExpression(node: Node): node is ClassExpression; +export declare function isHeritageClause(node: Node): node is HeritageClause; +export declare function isInterfaceDeclaration(node: Node): node is InterfaceDeclaration; +export declare function isTypeAliasDeclaration(node: Node): node is TypeAliasDeclaration; +export declare function isEnumMember(node: Node): node is EnumMember; +export declare function isEnumDeclaration(node: Node): node is EnumDeclaration; +export declare function isModuleBlock(node: Node): node is ModuleBlock; +export declare function isNotEmittedStatement(node: Node): node is NotEmittedStatement; +export declare function isNotEmittedTypeElement(node: Node): node is NotEmittedTypeElement; +export declare function isImportDeclaration(node: Node): node is ImportDeclaration; +export declare function isExternalModuleReference(node: Node): node is ExternalModuleReference; +export declare function isNamespaceImport(node: Node): node is NamespaceImport; +export declare function isNamedImports(node: Node): node is NamedImports; +export declare function isExportAssignment(node: Node): node is ExportAssignment; +export declare function isNamespaceExportDeclaration(node: Node): node is NamespaceExportDeclaration; +export declare function isNamespaceExport(node: Node): node is NamespaceExport; +export declare function isNamedExports(node: Node): node is NamedExports; +export declare function isExportSpecifier(node: Node): node is ExportSpecifier; +export declare function isCallSignatureDeclaration(node: Node): node is CallSignatureDeclaration; +export declare function isConstructSignatureDeclaration(node: Node): node is ConstructSignatureDeclaration; +export declare function isConstructorDeclaration(node: Node): node is ConstructorDeclaration; +export declare function isGetAccessorDeclaration(node: Node): node is GetAccessorDeclaration; +export declare function isSetAccessorDeclaration(node: Node): node is SetAccessorDeclaration; +export declare function isIndexSignatureDeclaration(node: Node): node is IndexSignatureDeclaration; +export declare function isMethodSignatureDeclaration(node: Node): node is MethodSignatureDeclaration; +export declare function isMethodDeclaration(node: Node): node is MethodDeclaration; +export declare function isPropertySignatureDeclaration(node: Node): node is PropertySignatureDeclaration; +export declare function isPropertyDeclaration(node: Node): node is PropertyDeclaration; +export declare function isSemicolonClassElement(node: Node): node is SemicolonClassElement; +export declare function isClassStaticBlockDeclaration(node: Node): node is ClassStaticBlockDeclaration; +export declare function isOmittedExpression(node: Node): node is OmittedExpression; +export declare function isKeywordExpression(node: Node): node is KeywordExpression; +export declare function isStringLiteral(node: Node): node is StringLiteral; +export declare function isNumericLiteral(node: Node): node is NumericLiteral; +export declare function isBigIntLiteral(node: Node): node is BigIntLiteral; +export declare function isRegularExpressionLiteral(node: Node): node is RegularExpressionLiteral; +export declare function isNoSubstitutionTemplateLiteral(node: Node): node is NoSubstitutionTemplateLiteral; +export declare function isBinaryExpression(node: Node): node is BinaryExpression; +export declare function isPrefixUnaryExpression(node: Node): node is PrefixUnaryExpression; +export declare function isPostfixUnaryExpression(node: Node): node is PostfixUnaryExpression; +export declare function isYieldExpression(node: Node): node is YieldExpression; +export declare function isArrowFunction(node: Node): node is ArrowFunction; +export declare function isFunctionExpression(node: Node): node is FunctionExpression; +export declare function isAsExpression(node: Node): node is AsExpression; +export declare function isSatisfiesExpression(node: Node): node is SatisfiesExpression; +export declare function isConditionalExpression(node: Node): node is ConditionalExpression; +export declare function isPropertyAccessExpression(node: Node): node is PropertyAccessExpression; +export declare function isElementAccessExpression(node: Node): node is ElementAccessExpression; +export declare function isCallExpression(node: Node): node is CallExpression; +export declare function isNewExpression(node: Node): node is NewExpression; +export declare function isMetaProperty(node: Node): node is MetaProperty; +export declare function isNonNullExpression(node: Node): node is NonNullExpression; +export declare function isSpreadElement(node: Node): node is SpreadElement; +export declare function isTemplateExpression(node: Node): node is TemplateExpression; +export declare function isTemplateSpan(node: Node): node is TemplateSpan; +export declare function isTaggedTemplateExpression(node: Node): node is TaggedTemplateExpression; +export declare function isParenthesizedExpression(node: Node): node is ParenthesizedExpression; +export declare function isArrayLiteralExpression(node: Node): node is ArrayLiteralExpression; +export declare function isObjectLiteralExpression(node: Node): node is ObjectLiteralExpression; +export declare function isSpreadAssignment(node: Node): node is SpreadAssignment; +export declare function isPropertyAssignment(node: Node): node is PropertyAssignment; +export declare function isShorthandPropertyAssignment(node: Node): node is ShorthandPropertyAssignment; +export declare function isDeleteExpression(node: Node): node is DeleteExpression; +export declare function isTypeOfExpression(node: Node): node is TypeOfExpression; +export declare function isVoidExpression(node: Node): node is VoidExpression; +export declare function isAwaitExpression(node: Node): node is AwaitExpression; +export declare function isTypeAssertion(node: Node): node is TypeAssertion; +export declare function isKeywordTypeNode(node: Node): node is KeywordTypeNode; +export declare function isUnionTypeNode(node: Node): node is UnionTypeNode; +export declare function isIntersectionTypeNode(node: Node): node is IntersectionTypeNode; +export declare function isConditionalTypeNode(node: Node): node is ConditionalTypeNode; +export declare function isTypeOperatorNode(node: Node): node is TypeOperatorNode; +export declare function isInferTypeNode(node: Node): node is InferTypeNode; +export declare function isArrayTypeNode(node: Node): node is ArrayTypeNode; +export declare function isIndexedAccessTypeNode(node: Node): node is IndexedAccessTypeNode; +export declare function isTypeReferenceNode(node: Node): node is TypeReferenceNode; +export declare function isExpressionWithTypeArguments(node: Node): node is ExpressionWithTypeArguments; +export declare function isLiteralTypeNode(node: Node): node is LiteralTypeNode; +export declare function isThisTypeNode(node: Node): node is ThisTypeNode; +export declare function isTypePredicateNode(node: Node): node is TypePredicateNode; +export declare function isImportAttribute(node: Node): node is ImportAttribute; +export declare function isImportAttributes(node: Node): node is ImportAttributes; +export declare function isTypeQueryNode(node: Node): node is TypeQueryNode; +export declare function isMappedTypeNode(node: Node): node is MappedTypeNode; +export declare function isTypeLiteralNode(node: Node): node is TypeLiteralNode; +export declare function isTupleTypeNode(node: Node): node is TupleTypeNode; +export declare function isNamedTupleMember(node: Node): node is NamedTupleMember; +export declare function isOptionalTypeNode(node: Node): node is OptionalTypeNode; +export declare function isRestTypeNode(node: Node): node is RestTypeNode; +export declare function isParenthesizedTypeNode(node: Node): node is ParenthesizedTypeNode; +export declare function isFunctionTypeNode(node: Node): node is FunctionTypeNode; +export declare function isConstructorTypeNode(node: Node): node is ConstructorTypeNode; +export declare function isTemplateHead(node: Node): node is TemplateHead; +export declare function isTemplateMiddle(node: Node): node is TemplateMiddle; +export declare function isTemplateTail(node: Node): node is TemplateTail; +export declare function isTemplateLiteralTypeNode(node: Node): node is TemplateLiteralTypeNode; +export declare function isTemplateLiteralTypeSpan(node: Node): node is TemplateLiteralTypeSpan; +export declare function isSyntheticExpression(node: Node): node is SyntheticExpression; +export declare function isPartiallyEmittedExpression(node: Node): node is PartiallyEmittedExpression; +export declare function isJsxElement(node: Node): node is JsxElement; +export declare function isJsxAttributes(node: Node): node is JsxAttributes; +export declare function isJsxNamespacedName(node: Node): node is JsxNamespacedName; +export declare function isJsxOpeningElement(node: Node): node is JsxOpeningElement; +export declare function isJsxSelfClosingElement(node: Node): node is JsxSelfClosingElement; +export declare function isJsxFragment(node: Node): node is JsxFragment; +export declare function isJsxOpeningFragment(node: Node): node is JsxOpeningFragment; +export declare function isJsxClosingFragment(node: Node): node is JsxClosingFragment; +export declare function isJsxAttribute(node: Node): node is JsxAttribute; +export declare function isJsxSpreadAttribute(node: Node): node is JsxSpreadAttribute; +export declare function isJsxClosingElement(node: Node): node is JsxClosingElement; +export declare function isJsxExpression(node: Node): node is JsxExpression; +export declare function isJsxText(node: Node): node is JsxText; +export declare function isSyntaxList(node: Node): node is SyntaxList; +export declare function isJSDoc(node: Node): node is JSDoc; +export declare function isJSDocTypeExpression(node: Node): node is JSDocTypeExpression; +export declare function isJSDocNonNullableType(node: Node): node is JSDocNonNullableType; +export declare function isJSDocNullableType(node: Node): node is JSDocNullableType; +export declare function isJSDocAllType(node: Node): node is JSDocAllType; +export declare function isJSDocVariadicType(node: Node): node is JSDocVariadicType; +export declare function isJSDocOptionalType(node: Node): node is JSDocOptionalType; +export declare function isJSDocTypeTag(node: Node): node is JSDocTypeTag; +export declare function isJSDocUnknownTag(node: Node): node is JSDocUnknownTag; +export declare function isJSDocTemplateTag(node: Node): node is JSDocTemplateTag; +export declare function isJSDocReturnTag(node: Node): node is JSDocReturnTag; +export declare function isJSDocPublicTag(node: Node): node is JSDocPublicTag; +export declare function isJSDocPrivateTag(node: Node): node is JSDocPrivateTag; +export declare function isJSDocProtectedTag(node: Node): node is JSDocProtectedTag; +export declare function isJSDocReadonlyTag(node: Node): node is JSDocReadonlyTag; +export declare function isJSDocOverrideTag(node: Node): node is JSDocOverrideTag; +export declare function isJSDocDeprecatedTag(node: Node): node is JSDocDeprecatedTag; +export declare function isJSDocSeeTag(node: Node): node is JSDocSeeTag; +export declare function isJSDocImplementsTag(node: Node): node is JSDocImplementsTag; +export declare function isJSDocAugmentsTag(node: Node): node is JSDocAugmentsTag; +export declare function isJSDocSatisfiesTag(node: Node): node is JSDocSatisfiesTag; +export declare function isJSDocThrowsTag(node: Node): node is JSDocThrowsTag; +export declare function isJSDocThisTag(node: Node): node is JSDocThisTag; +export declare function isJSDocImportTag(node: Node): node is JSDocImportTag; +export declare function isJSDocCallbackTag(node: Node): node is JSDocCallbackTag; +export declare function isJSDocOverloadTag(node: Node): node is JSDocOverloadTag; +export declare function isJSDocTypedefTag(node: Node): node is JSDocTypedefTag; +export declare function isJSDocSignature(node: Node): node is JSDocSignature; +export declare function isJSDocNameReference(node: Node): node is JSDocNameReference; +export declare function isSourceFile(node: Node): node is SourceFile; +export declare function isModuleDeclaration(node: Node): node is ModuleDeclaration; +export declare function isImportEqualsDeclaration(node: Node): node is ImportEqualsDeclaration; +export declare function isExportDeclaration(node: Node): node is ExportDeclaration; +export declare function isImportTypeNode(node: Node): node is ImportTypeNode; +export declare function isImportClause(node: Node): node is ImportClause; +export declare function isImportSpecifier(node: Node): node is ImportSpecifier; +export declare function isJSDocText(node: Node): node is JSDocText; +export declare function isJSDocLink(node: Node): node is JSDocLink; +export declare function isJSDocLinkPlain(node: Node): node is JSDocLinkPlain; +export declare function isJSDocLinkCode(node: Node): node is JSDocLinkCode; +export declare function isTypeParameterDeclaration(node: Node): node is TypeParameterDeclaration; +export declare function isSyntheticReferenceExpression(node: Node): node is SyntheticReferenceExpression; +export declare function isJSDocTypeLiteral(node: Node): node is JSDocTypeLiteral; +export declare function isForInStatement(node: Node): node is ForInStatement; +export declare function isForOfStatement(node: Node): node is ForOfStatement; +export declare function isCaseClause(node: Node): node is CaseClause; +export declare function isDefaultClause(node: Node): node is DefaultClause; +export declare function isObjectBindingPattern(node: Node): node is ObjectBindingPattern; +export declare function isArrayBindingPattern(node: Node): node is ArrayBindingPattern; +export declare function isJSDocParameterTag(node: Node): node is JSDocParameterTag; +export declare function isJSDocPropertyTag(node: Node): node is JSDocPropertyTag; +export declare function isAccessExpression(node: Node): node is AccessExpression; +export declare function isDeclarationName(node: Node): node is DeclarationName; +export declare function isModuleName(node: Node): node is ModuleName; +export declare function isModuleExportName(node: Node): node is ModuleExportName; +export declare function isPropertyName(node: Node): node is PropertyName; +export declare function isModuleBody(node: Node): node is ModuleBody; +export declare function isJSDocFullName(node: Node): node is JSDocFullName; +export declare function isModuleReference(node: Node): node is ModuleReference; +export declare function isNamedImportBindings(node: Node): node is NamedImportBindings; +export declare function isNamedExportBindings(node: Node): node is NamedExportBindings; +export declare function isMemberName(node: Node): node is MemberName; +export declare function isEntityName(node: Node): node is EntityName; +export declare function isBindingName(node: Node): node is BindingName; +export declare function isModifierLike(node: Node): node is ModifierLike; +export declare function isJsxChild(node: Node): node is JsxChild; +export declare function isJsxAttributeLike(node: Node): node is JsxAttributeLike; +export declare function isJsxAttributeName(node: Node): node is JsxAttributeName; +export declare function isJsxAttributeValue(node: Node): node is JsxAttributeValue; +export declare function isClassLikeDeclaration(node: Node): node is ClassLikeDeclaration; +export declare function isAccessorDeclaration(node: Node): node is AccessorDeclaration; +export declare function isLiteralLikeNode(node: Node): node is LiteralLikeNode; +export declare function isLiteralExpression(node: Node): node is LiteralExpression; +export declare function isUnionOrIntersectionTypeNode(node: Node): node is UnionOrIntersectionTypeNode; +export declare function isTemplateLiteralLikeNode(node: Node): node is TemplateLiteralLikeNode; +export declare function isTemplateMiddleOrTail(node: Node): node is TemplateMiddleOrTail; +export declare function isTemplateLiteral(node: Node): node is TemplateLiteral; +export declare function isTypePredicateParameterName(node: Node): node is TypePredicateParameterName; +export declare function isImportAttributeName(node: Node): node is ImportAttributeName; +export declare function isJSDocComment(node: Node): node is JSDocComment; +export declare function isSignatureDeclaration(node: Node): node is SignatureDeclaration; +export declare function isStringLiteralLikeNode(node: Node): node is StringLiteralLikeNode; +export declare function isNumericOrStringLikeLiteral(node: Node): node is NumericOrStringLikeLiteral; +export declare function isObjectLiteralLikeNode(node: Node): node is ObjectLiteralLikeNode; +export declare function isObjectTypeDeclaration(node: Node): node is ObjectTypeDeclaration; +export declare function isJsxOpeningLikeElement(node: Node): node is JsxOpeningLikeElement; +export declare function isNamedImportsOrExports(node: Node): node is NamedImportsOrExports; +export declare function isBreakOrContinueStatement(node: Node): node is BreakOrContinueStatement; +export declare function isCallLikeExpression(node: Node): node is CallLikeExpression; +export declare function isFunctionLikeDeclaration(node: Node): node is FunctionLikeDeclaration; +export declare function isVariableOrParameterDeclaration(node: Node): node is VariableOrParameterDeclaration; +export declare function isVariableOrPropertyDeclaration(node: Node): node is VariableOrPropertyDeclaration; +export declare function isCallOrNewExpression(node: Node): node is CallOrNewExpression; +export declare function isImportClauseOrBindingPattern(node: Node): node is ImportClauseOrBindingPattern; +export declare function isAnyImportSyntax(node: Node): node is AnyImportSyntax; +export declare function isArrayBindingElement(node: Node): node is ArrayBindingElement; +export declare function isAssertionExpression(node: Node): node is AssertionExpression; +export declare function isBooleanLiteral(node: Node): node is BooleanLiteral; +export declare function isDestructuringAssignment(node: Node): node is DestructuringAssignment; +export declare function isLiteralToken(node: Node): node is LiteralToken; +export declare function isModifier(node: Node): node is Modifier; +export declare function isObjectLiteralElementLike(node: Node): node is ObjectLiteralElementLike; +export declare function isPropertyNameLiteral(node: Node): node is PropertyNameLiteral; +export declare function isPseudoLiteralToken(node: Node): node is PseudoLiteralToken; +export declare function isTemplateLiteralToken(node: Node): node is TemplateLiteralToken; +export declare function isArrayDestructuringAssignment(node: Node): node is ArrayDestructuringAssignment; +export declare function isObjectDestructuringAssignment(node: Node): node is ObjectDestructuringAssignment; +export declare function isFunctionBody(node: Node): node is FunctionBody; +export declare function isTriviaKind(kind: SyntaxKind): kind is TriviaSyntaxKind; +export declare function isPseudoLiteralKind(kind: SyntaxKind): kind is PseudoLiteralSyntaxKind; +export declare function isModifierKind(kind: SyntaxKind): kind is ModifierSyntaxKind; +export declare function isKeywordTypeKind(kind: SyntaxKind): kind is KeywordTypeSyntaxKind; +export declare function isKeywordExpressionKind(kind: SyntaxKind): kind is KeywordExpressionSyntaxKind; +export declare function isJsxTokenKind(kind: SyntaxKind): kind is JsxTokenSyntaxKind; +export declare function isImportPhaseModifierKind(kind: SyntaxKind): kind is ImportPhaseModifierSyntaxKind; +export declare function isPostfixUnaryOperator(kind: SyntaxKind): kind is PostfixUnaryOperator; +export declare function isPrefixUnaryOperator(kind: SyntaxKind): kind is PrefixUnaryOperator; +export declare function isAssignmentOperator(kind: SyntaxKind): kind is AssignmentOperator; +export declare function isBinaryOperator(kind: SyntaxKind): kind is BinaryOperator; +export declare function isExponentiationOperator(kind: SyntaxKind): kind is ExponentiationOperator; +export declare function isMultiplicativeOperator(kind: SyntaxKind): kind is MultiplicativeOperator; +export declare function isMultiplicativeOperatorOrHigher(kind: SyntaxKind): kind is MultiplicativeOperatorOrHigher; +export declare function isAdditiveOperator(kind: SyntaxKind): kind is AdditiveOperator; +export declare function isAdditiveOperatorOrHigher(kind: SyntaxKind): kind is AdditiveOperatorOrHigher; +export declare function isShiftOperator(kind: SyntaxKind): kind is ShiftOperator; +export declare function isShiftOperatorOrHigher(kind: SyntaxKind): kind is ShiftOperatorOrHigher; +export declare function isRelationalOperator(kind: SyntaxKind): kind is RelationalOperator; +export declare function isRelationalOperatorOrHigher(kind: SyntaxKind): kind is RelationalOperatorOrHigher; +export declare function isEqualityOperator(kind: SyntaxKind): kind is EqualityOperator; +export declare function isEqualityOperatorOrHigher(kind: SyntaxKind): kind is EqualityOperatorOrHigher; +export declare function isBitwiseOperator(kind: SyntaxKind): kind is BitwiseOperator; +export declare function isBitwiseOperatorOrHigher(kind: SyntaxKind): kind is BitwiseOperatorOrHigher; +export declare function isLogicalOperator(kind: SyntaxKind): kind is LogicalOperator; +export declare function isLogicalOperatorOrHigher(kind: SyntaxKind): kind is LogicalOperatorOrHigher; +export declare function isCompoundAssignmentOperator(kind: SyntaxKind): kind is CompoundAssignmentOperator; +export declare function isAssignmentOperatorOrHigher(kind: SyntaxKind): kind is AssignmentOperatorOrHigher; +export declare function isLogicalOrCoalescingAssignmentOperator(kind: SyntaxKind): kind is LogicalOrCoalescingAssignmentOperator; +export declare function isLiteralKind(kind: SyntaxKind): boolean; +export declare function isPunctuationKind(kind: SyntaxKind): boolean; +export declare function isKeywordKind(kind: SyntaxKind): boolean; +export declare function isTokenKind(kind: SyntaxKind): boolean; +export declare function isJSDocNodeKind(kind: SyntaxKind): boolean; +export declare function isEndOfFile(node: Node): node is EndOfFile; +export declare function isDotToken(node: Node): node is DotToken; +export declare function isDotDotDotToken(node: Node): node is DotDotDotToken; +export declare function isQuestionToken(node: Node): node is QuestionToken; +export declare function isExclamationToken(node: Node): node is ExclamationToken; +export declare function isColonToken(node: Node): node is ColonToken; +export declare function isEqualsToken(node: Node): node is EqualsToken; +export declare function isAsteriskToken(node: Node): node is AsteriskToken; +export declare function isEqualsGreaterThanToken(node: Node): node is EqualsGreaterThanToken; +export declare function isPlusToken(node: Node): node is PlusToken; +export declare function isMinusToken(node: Node): node is MinusToken; +export declare function isQuestionDotToken(node: Node): node is QuestionDotToken; +export declare function isAssertsKeyword(node: Node): node is AssertsKeyword; +export declare function isAssertKeyword(node: Node): node is AssertKeyword; +export declare function isAwaitKeyword(node: Node): node is AwaitKeyword; +export declare function isCaseKeyword(node: Node): node is CaseKeyword; +export declare function isAbstractKeyword(node: Node): node is AbstractKeyword; +export declare function isAccessorKeyword(node: Node): node is AccessorKeyword; +export declare function isAsyncKeyword(node: Node): node is AsyncKeyword; +export declare function isConstKeyword(node: Node): node is ConstKeyword; +export declare function isDeclareKeyword(node: Node): node is DeclareKeyword; +export declare function isDefaultKeyword(node: Node): node is DefaultKeyword; +export declare function isExportKeyword(node: Node): node is ExportKeyword; +export declare function isInKeyword(node: Node): node is InKeyword; +export declare function isPrivateKeyword(node: Node): node is PrivateKeyword; +export declare function isProtectedKeyword(node: Node): node is ProtectedKeyword; +export declare function isPublicKeyword(node: Node): node is PublicKeyword; +export declare function isReadonlyKeyword(node: Node): node is ReadonlyKeyword; +export declare function isOutKeyword(node: Node): node is OutKeyword; +export declare function isOverrideKeyword(node: Node): node is OverrideKeyword; +export declare function isStaticKeyword(node: Node): node is StaticKeyword; +export declare function isBinaryOperatorToken(node: Node): node is BinaryOperatorToken; +export declare function isAssignmentOperatorToken(node: Node): node is AssignmentOperatorToken; +export declare function isNullLiteral(node: Node): node is NullLiteral; +export declare function isTrueLiteral(node: Node): node is TrueLiteral; +export declare function isFalseLiteral(node: Node): node is FalseLiteral; +export declare function isThisExpression(node: Node): node is ThisExpression; +export declare function isSuperExpression(node: Node): node is SuperExpression; +export declare function isImportExpression(node: Node): node is ImportExpression; +//# sourceMappingURL=is.generated.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/is.generated.d.ts.map b/node_modules/typescript/dist/ast/is.generated.d.ts.map new file mode 100644 index 0000000..6346fa0 --- /dev/null +++ b/node_modules/typescript/dist/ast/is.generated.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"is.generated.d.ts","sourceRoot":"","sources":["../../src/ast/is.generated.ts"],"names":[],"mappings":"AA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,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,cAAc,CAEnE;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,gBAAgB,CAEvE;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,aAAa,CAEjE;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,eAAe,CAErE;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,UAAU,CAE3D;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,eAAe,CAErE;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,aAAa,CAEjE;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,mBAAmB,CAE7E;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,uBAAuB,CAErF;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,WAAW,CAE7D;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,WAAW,CAE7D;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,YAAY,CAE/D;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,cAAc,CAEnE;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,eAAe,CAErE;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,gBAAgB,CAEvE"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/is.generated.js b/node_modules/typescript/dist/ast/is.generated.js new file mode 100644 index 0000000..d4204f9 --- /dev/null +++ b/node_modules/typescript/dist/ast/is.generated.js @@ -0,0 +1,1103 @@ +// Code generated by _scripts/generate-ts-ast.ts. DO NOT EDIT. +import { SyntaxKind } from "#enums/syntaxKind"; +export function isToken(node) { + return isTokenKind(node.kind); +} +export function isIdentifier(node) { + return node.kind === SyntaxKind.Identifier; +} +export function isPrivateIdentifier(node) { + return node.kind === SyntaxKind.PrivateIdentifier; +} +export function isQualifiedName(node) { + return node.kind === SyntaxKind.QualifiedName; +} +export function isComputedPropertyName(node) { + return node.kind === SyntaxKind.ComputedPropertyName; +} +export function isDecorator(node) { + return node.kind === SyntaxKind.Decorator; +} +export function isEmptyStatement(node) { + return node.kind === SyntaxKind.EmptyStatement; +} +export function isIfStatement(node) { + return node.kind === SyntaxKind.IfStatement; +} +export function isDoStatement(node) { + return node.kind === SyntaxKind.DoStatement; +} +export function isWhileStatement(node) { + return node.kind === SyntaxKind.WhileStatement; +} +export function isForStatement(node) { + return node.kind === SyntaxKind.ForStatement; +} +export function isBreakStatement(node) { + return node.kind === SyntaxKind.BreakStatement; +} +export function isContinueStatement(node) { + return node.kind === SyntaxKind.ContinueStatement; +} +export function isReturnStatement(node) { + return node.kind === SyntaxKind.ReturnStatement; +} +export function isWithStatement(node) { + return node.kind === SyntaxKind.WithStatement; +} +export function isSwitchStatement(node) { + return node.kind === SyntaxKind.SwitchStatement; +} +export function isCaseBlock(node) { + return node.kind === SyntaxKind.CaseBlock; +} +export function isThrowStatement(node) { + return node.kind === SyntaxKind.ThrowStatement; +} +export function isTryStatement(node) { + return node.kind === SyntaxKind.TryStatement; +} +export function isCatchClause(node) { + return node.kind === SyntaxKind.CatchClause; +} +export function isDebuggerStatement(node) { + return node.kind === SyntaxKind.DebuggerStatement; +} +export function isLabeledStatement(node) { + return node.kind === SyntaxKind.LabeledStatement; +} +export function isExpressionStatement(node) { + return node.kind === SyntaxKind.ExpressionStatement; +} +export function isBlock(node) { + return node.kind === SyntaxKind.Block; +} +export function isVariableStatement(node) { + return node.kind === SyntaxKind.VariableStatement; +} +export function isVariableDeclaration(node) { + return node.kind === SyntaxKind.VariableDeclaration; +} +export function isVariableDeclarationList(node) { + return node.kind === SyntaxKind.VariableDeclarationList; +} +export function isParameterDeclaration(node) { + return node.kind === SyntaxKind.Parameter; +} +export function isBindingElement(node) { + return node.kind === SyntaxKind.BindingElement; +} +export function isMissingDeclaration(node) { + return node.kind === SyntaxKind.MissingDeclaration; +} +export function isFunctionDeclaration(node) { + return node.kind === SyntaxKind.FunctionDeclaration; +} +export function isClassDeclaration(node) { + return node.kind === SyntaxKind.ClassDeclaration; +} +export function isClassExpression(node) { + return node.kind === SyntaxKind.ClassExpression; +} +export function isHeritageClause(node) { + return node.kind === SyntaxKind.HeritageClause; +} +export function isInterfaceDeclaration(node) { + return node.kind === SyntaxKind.InterfaceDeclaration; +} +export function isTypeAliasDeclaration(node) { + switch (node.kind) { + case SyntaxKind.TypeAliasDeclaration: + case SyntaxKind.JSTypeAliasDeclaration: + return true; + default: + return false; + } +} +export function isEnumMember(node) { + return node.kind === SyntaxKind.EnumMember; +} +export function isEnumDeclaration(node) { + return node.kind === SyntaxKind.EnumDeclaration; +} +export function isModuleBlock(node) { + return node.kind === SyntaxKind.ModuleBlock; +} +export function isNotEmittedStatement(node) { + return node.kind === SyntaxKind.NotEmittedStatement; +} +export function isNotEmittedTypeElement(node) { + return node.kind === SyntaxKind.NotEmittedTypeElement; +} +export function isImportDeclaration(node) { + switch (node.kind) { + case SyntaxKind.ImportDeclaration: + case SyntaxKind.JSImportDeclaration: + return true; + default: + return false; + } +} +export function isExternalModuleReference(node) { + return node.kind === SyntaxKind.ExternalModuleReference; +} +export function isNamespaceImport(node) { + return node.kind === SyntaxKind.NamespaceImport; +} +export function isNamedImports(node) { + return node.kind === SyntaxKind.NamedImports; +} +export function isExportAssignment(node) { + return node.kind === SyntaxKind.ExportAssignment; +} +export function isNamespaceExportDeclaration(node) { + return node.kind === SyntaxKind.NamespaceExportDeclaration; +} +export function isNamespaceExport(node) { + return node.kind === SyntaxKind.NamespaceExport; +} +export function isNamedExports(node) { + return node.kind === SyntaxKind.NamedExports; +} +export function isExportSpecifier(node) { + return node.kind === SyntaxKind.ExportSpecifier; +} +export function isCallSignatureDeclaration(node) { + return node.kind === SyntaxKind.CallSignature; +} +export function isConstructSignatureDeclaration(node) { + return node.kind === SyntaxKind.ConstructSignature; +} +export function isConstructorDeclaration(node) { + return node.kind === SyntaxKind.Constructor; +} +export function isGetAccessorDeclaration(node) { + return node.kind === SyntaxKind.GetAccessor; +} +export function isSetAccessorDeclaration(node) { + return node.kind === SyntaxKind.SetAccessor; +} +export function isIndexSignatureDeclaration(node) { + return node.kind === SyntaxKind.IndexSignature; +} +export function isMethodSignatureDeclaration(node) { + return node.kind === SyntaxKind.MethodSignature; +} +export function isMethodDeclaration(node) { + return node.kind === SyntaxKind.MethodDeclaration; +} +export function isPropertySignatureDeclaration(node) { + return node.kind === SyntaxKind.PropertySignature; +} +export function isPropertyDeclaration(node) { + return node.kind === SyntaxKind.PropertyDeclaration; +} +export function isSemicolonClassElement(node) { + return node.kind === SyntaxKind.SemicolonClassElement; +} +export function isClassStaticBlockDeclaration(node) { + return node.kind === SyntaxKind.ClassStaticBlockDeclaration; +} +export function isOmittedExpression(node) { + return node.kind === SyntaxKind.OmittedExpression; +} +export function isKeywordExpression(node) { + return isKeywordExpressionKind(node.kind); +} +export function isStringLiteral(node) { + return node.kind === SyntaxKind.StringLiteral; +} +export function isNumericLiteral(node) { + return node.kind === SyntaxKind.NumericLiteral; +} +export function isBigIntLiteral(node) { + return node.kind === SyntaxKind.BigIntLiteral; +} +export function isRegularExpressionLiteral(node) { + return node.kind === SyntaxKind.RegularExpressionLiteral; +} +export function isNoSubstitutionTemplateLiteral(node) { + return node.kind === SyntaxKind.NoSubstitutionTemplateLiteral; +} +export function isBinaryExpression(node) { + return node.kind === SyntaxKind.BinaryExpression; +} +export function isPrefixUnaryExpression(node) { + return node.kind === SyntaxKind.PrefixUnaryExpression; +} +export function isPostfixUnaryExpression(node) { + return node.kind === SyntaxKind.PostfixUnaryExpression; +} +export function isYieldExpression(node) { + return node.kind === SyntaxKind.YieldExpression; +} +export function isArrowFunction(node) { + return node.kind === SyntaxKind.ArrowFunction; +} +export function isFunctionExpression(node) { + return node.kind === SyntaxKind.FunctionExpression; +} +export function isAsExpression(node) { + return node.kind === SyntaxKind.AsExpression; +} +export function isSatisfiesExpression(node) { + return node.kind === SyntaxKind.SatisfiesExpression; +} +export function isConditionalExpression(node) { + return node.kind === SyntaxKind.ConditionalExpression; +} +export function isPropertyAccessExpression(node) { + return node.kind === SyntaxKind.PropertyAccessExpression; +} +export function isElementAccessExpression(node) { + return node.kind === SyntaxKind.ElementAccessExpression; +} +export function isCallExpression(node) { + return node.kind === SyntaxKind.CallExpression; +} +export function isNewExpression(node) { + return node.kind === SyntaxKind.NewExpression; +} +export function isMetaProperty(node) { + return node.kind === SyntaxKind.MetaProperty; +} +export function isNonNullExpression(node) { + return node.kind === SyntaxKind.NonNullExpression; +} +export function isSpreadElement(node) { + return node.kind === SyntaxKind.SpreadElement; +} +export function isTemplateExpression(node) { + return node.kind === SyntaxKind.TemplateExpression; +} +export function isTemplateSpan(node) { + return node.kind === SyntaxKind.TemplateSpan; +} +export function isTaggedTemplateExpression(node) { + return node.kind === SyntaxKind.TaggedTemplateExpression; +} +export function isParenthesizedExpression(node) { + return node.kind === SyntaxKind.ParenthesizedExpression; +} +export function isArrayLiteralExpression(node) { + return node.kind === SyntaxKind.ArrayLiteralExpression; +} +export function isObjectLiteralExpression(node) { + return node.kind === SyntaxKind.ObjectLiteralExpression; +} +export function isSpreadAssignment(node) { + return node.kind === SyntaxKind.SpreadAssignment; +} +export function isPropertyAssignment(node) { + return node.kind === SyntaxKind.PropertyAssignment; +} +export function isShorthandPropertyAssignment(node) { + return node.kind === SyntaxKind.ShorthandPropertyAssignment; +} +export function isDeleteExpression(node) { + return node.kind === SyntaxKind.DeleteExpression; +} +export function isTypeOfExpression(node) { + return node.kind === SyntaxKind.TypeOfExpression; +} +export function isVoidExpression(node) { + return node.kind === SyntaxKind.VoidExpression; +} +export function isAwaitExpression(node) { + return node.kind === SyntaxKind.AwaitExpression; +} +export function isTypeAssertion(node) { + return node.kind === SyntaxKind.TypeAssertionExpression; +} +export function isKeywordTypeNode(node) { + return isKeywordTypeKind(node.kind); +} +export function isUnionTypeNode(node) { + return node.kind === SyntaxKind.UnionType; +} +export function isIntersectionTypeNode(node) { + return node.kind === SyntaxKind.IntersectionType; +} +export function isConditionalTypeNode(node) { + return node.kind === SyntaxKind.ConditionalType; +} +export function isTypeOperatorNode(node) { + return node.kind === SyntaxKind.TypeOperator; +} +export function isInferTypeNode(node) { + return node.kind === SyntaxKind.InferType; +} +export function isArrayTypeNode(node) { + return node.kind === SyntaxKind.ArrayType; +} +export function isIndexedAccessTypeNode(node) { + return node.kind === SyntaxKind.IndexedAccessType; +} +export function isTypeReferenceNode(node) { + return node.kind === SyntaxKind.TypeReference; +} +export function isExpressionWithTypeArguments(node) { + return node.kind === SyntaxKind.ExpressionWithTypeArguments; +} +export function isLiteralTypeNode(node) { + return node.kind === SyntaxKind.LiteralType; +} +export function isThisTypeNode(node) { + return node.kind === SyntaxKind.ThisType; +} +export function isTypePredicateNode(node) { + return node.kind === SyntaxKind.TypePredicate; +} +export function isImportAttribute(node) { + return node.kind === SyntaxKind.ImportAttribute; +} +export function isImportAttributes(node) { + return node.kind === SyntaxKind.ImportAttributes; +} +export function isTypeQueryNode(node) { + return node.kind === SyntaxKind.TypeQuery; +} +export function isMappedTypeNode(node) { + return node.kind === SyntaxKind.MappedType; +} +export function isTypeLiteralNode(node) { + return node.kind === SyntaxKind.TypeLiteral; +} +export function isTupleTypeNode(node) { + return node.kind === SyntaxKind.TupleType; +} +export function isNamedTupleMember(node) { + return node.kind === SyntaxKind.NamedTupleMember; +} +export function isOptionalTypeNode(node) { + return node.kind === SyntaxKind.OptionalType; +} +export function isRestTypeNode(node) { + return node.kind === SyntaxKind.RestType; +} +export function isParenthesizedTypeNode(node) { + return node.kind === SyntaxKind.ParenthesizedType; +} +export function isFunctionTypeNode(node) { + return node.kind === SyntaxKind.FunctionType; +} +export function isConstructorTypeNode(node) { + return node.kind === SyntaxKind.ConstructorType; +} +export function isTemplateHead(node) { + return node.kind === SyntaxKind.TemplateHead; +} +export function isTemplateMiddle(node) { + return node.kind === SyntaxKind.TemplateMiddle; +} +export function isTemplateTail(node) { + return node.kind === SyntaxKind.TemplateTail; +} +export function isTemplateLiteralTypeNode(node) { + return node.kind === SyntaxKind.TemplateLiteralType; +} +export function isTemplateLiteralTypeSpan(node) { + return node.kind === SyntaxKind.TemplateLiteralTypeSpan; +} +export function isSyntheticExpression(node) { + return node.kind === SyntaxKind.SyntheticExpression; +} +export function isPartiallyEmittedExpression(node) { + return node.kind === SyntaxKind.PartiallyEmittedExpression; +} +export function isJsxElement(node) { + return node.kind === SyntaxKind.JsxElement; +} +export function isJsxAttributes(node) { + return node.kind === SyntaxKind.JsxAttributes; +} +export function isJsxNamespacedName(node) { + return node.kind === SyntaxKind.JsxNamespacedName; +} +export function isJsxOpeningElement(node) { + return node.kind === SyntaxKind.JsxOpeningElement; +} +export function isJsxSelfClosingElement(node) { + return node.kind === SyntaxKind.JsxSelfClosingElement; +} +export function isJsxFragment(node) { + return node.kind === SyntaxKind.JsxFragment; +} +export function isJsxOpeningFragment(node) { + return node.kind === SyntaxKind.JsxOpeningFragment; +} +export function isJsxClosingFragment(node) { + return node.kind === SyntaxKind.JsxClosingFragment; +} +export function isJsxAttribute(node) { + return node.kind === SyntaxKind.JsxAttribute; +} +export function isJsxSpreadAttribute(node) { + return node.kind === SyntaxKind.JsxSpreadAttribute; +} +export function isJsxClosingElement(node) { + return node.kind === SyntaxKind.JsxClosingElement; +} +export function isJsxExpression(node) { + return node.kind === SyntaxKind.JsxExpression; +} +export function isJsxText(node) { + return node.kind === SyntaxKind.JsxText; +} +export function isSyntaxList(node) { + return node.kind === SyntaxKind.SyntaxList; +} +export function isJSDoc(node) { + return node.kind === SyntaxKind.JSDoc; +} +export function isJSDocTypeExpression(node) { + return node.kind === SyntaxKind.JSDocTypeExpression; +} +export function isJSDocNonNullableType(node) { + return node.kind === SyntaxKind.JSDocNonNullableType; +} +export function isJSDocNullableType(node) { + return node.kind === SyntaxKind.JSDocNullableType; +} +export function isJSDocAllType(node) { + return node.kind === SyntaxKind.JSDocAllType; +} +export function isJSDocVariadicType(node) { + return node.kind === SyntaxKind.JSDocVariadicType; +} +export function isJSDocOptionalType(node) { + return node.kind === SyntaxKind.JSDocOptionalType; +} +export function isJSDocTypeTag(node) { + return node.kind === SyntaxKind.JSDocTypeTag; +} +export function isJSDocUnknownTag(node) { + return node.kind === SyntaxKind.JSDocUnknownTag; +} +export function isJSDocTemplateTag(node) { + return node.kind === SyntaxKind.JSDocTemplateTag; +} +export function isJSDocReturnTag(node) { + return node.kind === SyntaxKind.JSDocReturnTag; +} +export function isJSDocPublicTag(node) { + return node.kind === SyntaxKind.JSDocPublicTag; +} +export function isJSDocPrivateTag(node) { + return node.kind === SyntaxKind.JSDocPrivateTag; +} +export function isJSDocProtectedTag(node) { + return node.kind === SyntaxKind.JSDocProtectedTag; +} +export function isJSDocReadonlyTag(node) { + return node.kind === SyntaxKind.JSDocReadonlyTag; +} +export function isJSDocOverrideTag(node) { + return node.kind === SyntaxKind.JSDocOverrideTag; +} +export function isJSDocDeprecatedTag(node) { + return node.kind === SyntaxKind.JSDocDeprecatedTag; +} +export function isJSDocSeeTag(node) { + return node.kind === SyntaxKind.JSDocSeeTag; +} +export function isJSDocImplementsTag(node) { + return node.kind === SyntaxKind.JSDocImplementsTag; +} +export function isJSDocAugmentsTag(node) { + return node.kind === SyntaxKind.JSDocAugmentsTag; +} +export function isJSDocSatisfiesTag(node) { + return node.kind === SyntaxKind.JSDocSatisfiesTag; +} +export function isJSDocThrowsTag(node) { + return node.kind === SyntaxKind.JSDocThrowsTag; +} +export function isJSDocThisTag(node) { + return node.kind === SyntaxKind.JSDocThisTag; +} +export function isJSDocImportTag(node) { + return node.kind === SyntaxKind.JSDocImportTag; +} +export function isJSDocCallbackTag(node) { + return node.kind === SyntaxKind.JSDocCallbackTag; +} +export function isJSDocOverloadTag(node) { + return node.kind === SyntaxKind.JSDocOverloadTag; +} +export function isJSDocTypedefTag(node) { + return node.kind === SyntaxKind.JSDocTypedefTag; +} +export function isJSDocSignature(node) { + return node.kind === SyntaxKind.JSDocSignature; +} +export function isJSDocNameReference(node) { + return node.kind === SyntaxKind.JSDocNameReference; +} +export function isSourceFile(node) { + return node.kind === SyntaxKind.SourceFile; +} +export function isModuleDeclaration(node) { + return node.kind === SyntaxKind.ModuleDeclaration; +} +export function isImportEqualsDeclaration(node) { + return node.kind === SyntaxKind.ImportEqualsDeclaration; +} +export function isExportDeclaration(node) { + return node.kind === SyntaxKind.ExportDeclaration; +} +export function isImportTypeNode(node) { + return node.kind === SyntaxKind.ImportType; +} +export function isImportClause(node) { + return node.kind === SyntaxKind.ImportClause; +} +export function isImportSpecifier(node) { + return node.kind === SyntaxKind.ImportSpecifier; +} +export function isJSDocText(node) { + return node.kind === SyntaxKind.JSDocText; +} +export function isJSDocLink(node) { + return node.kind === SyntaxKind.JSDocLink; +} +export function isJSDocLinkPlain(node) { + return node.kind === SyntaxKind.JSDocLinkPlain; +} +export function isJSDocLinkCode(node) { + return node.kind === SyntaxKind.JSDocLinkCode; +} +export function isTypeParameterDeclaration(node) { + return node.kind === SyntaxKind.TypeParameter; +} +export function isSyntheticReferenceExpression(node) { + return node.kind === SyntaxKind.SyntheticReferenceExpression; +} +export function isJSDocTypeLiteral(node) { + return node.kind === SyntaxKind.JSDocTypeLiteral; +} +export function isForInStatement(node) { + return node.kind === SyntaxKind.ForInStatement; +} +export function isForOfStatement(node) { + return node.kind === SyntaxKind.ForOfStatement; +} +export function isCaseClause(node) { + return node.kind === SyntaxKind.CaseClause; +} +export function isDefaultClause(node) { + return node.kind === SyntaxKind.DefaultClause; +} +export function isObjectBindingPattern(node) { + return node.kind === SyntaxKind.ObjectBindingPattern; +} +export function isArrayBindingPattern(node) { + return node.kind === SyntaxKind.ArrayBindingPattern; +} +export function isJSDocParameterTag(node) { + return node.kind === SyntaxKind.JSDocParameterTag; +} +export function isJSDocPropertyTag(node) { + return node.kind === SyntaxKind.JSDocPropertyTag; +} +export function isAccessExpression(node) { + return node.kind === SyntaxKind.PropertyAccessExpression || node.kind === SyntaxKind.ElementAccessExpression; +} +export function isDeclarationName(node) { + const kind = node.kind; + return kind === SyntaxKind.Identifier || kind === SyntaxKind.PrivateIdentifier || kind === SyntaxKind.StringLiteral || kind === SyntaxKind.NumericLiteral || kind === SyntaxKind.BigIntLiteral || kind === SyntaxKind.NoSubstitutionTemplateLiteral || kind === SyntaxKind.ComputedPropertyName || kind === SyntaxKind.ObjectBindingPattern || kind === SyntaxKind.ArrayBindingPattern || kind === SyntaxKind.ElementAccessExpression; +} +export function isModuleName(node) { + return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.StringLiteral; +} +export function isModuleExportName(node) { + return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.StringLiteral; +} +export function isPropertyName(node) { + const kind = node.kind; + return kind === SyntaxKind.Identifier || kind === SyntaxKind.StringLiteral || kind === SyntaxKind.NoSubstitutionTemplateLiteral || kind === SyntaxKind.NumericLiteral || kind === SyntaxKind.ComputedPropertyName || kind === SyntaxKind.PrivateIdentifier || kind === SyntaxKind.BigIntLiteral; +} +export function isModuleBody(node) { + return node.kind === SyntaxKind.ModuleBlock || node.kind === SyntaxKind.ModuleDeclaration; +} +export function isJSDocFullName(node) { + return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.ModuleDeclaration; +} +export function isModuleReference(node) { + return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.QualifiedName || node.kind === SyntaxKind.ExternalModuleReference; +} +export function isNamedImportBindings(node) { + return node.kind === SyntaxKind.NamespaceImport || node.kind === SyntaxKind.NamedImports; +} +export function isNamedExportBindings(node) { + return node.kind === SyntaxKind.NamespaceExport || node.kind === SyntaxKind.NamedExports; +} +export function isMemberName(node) { + return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.PrivateIdentifier; +} +export function isEntityName(node) { + return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.QualifiedName; +} +export function isBindingName(node) { + return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.ObjectBindingPattern || node.kind === SyntaxKind.ArrayBindingPattern; +} +export function isModifierLike(node) { + const kind = node.kind; + return kind === SyntaxKind.AbstractKeyword || kind === SyntaxKind.AccessorKeyword || kind === SyntaxKind.AsyncKeyword || kind === SyntaxKind.ConstKeyword || kind === SyntaxKind.DeclareKeyword || kind === SyntaxKind.DefaultKeyword || kind === SyntaxKind.ExportKeyword || kind === SyntaxKind.InKeyword || kind === SyntaxKind.PrivateKeyword || kind === SyntaxKind.ProtectedKeyword || kind === SyntaxKind.PublicKeyword || kind === SyntaxKind.ReadonlyKeyword || kind === SyntaxKind.OutKeyword || kind === SyntaxKind.OverrideKeyword || kind === SyntaxKind.StaticKeyword || kind === SyntaxKind.Decorator; +} +export function isJsxChild(node) { + const kind = node.kind; + return kind === SyntaxKind.JsxText || kind === SyntaxKind.JsxExpression || kind === SyntaxKind.JsxElement || kind === SyntaxKind.JsxSelfClosingElement || kind === SyntaxKind.JsxFragment; +} +export function isJsxAttributeLike(node) { + return node.kind === SyntaxKind.JsxAttribute || node.kind === SyntaxKind.JsxSpreadAttribute; +} +export function isJsxAttributeName(node) { + return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.JsxNamespacedName; +} +export function isJsxAttributeValue(node) { + const kind = node.kind; + return kind === SyntaxKind.StringLiteral || kind === SyntaxKind.JsxExpression || kind === SyntaxKind.JsxElement || kind === SyntaxKind.JsxSelfClosingElement || kind === SyntaxKind.JsxFragment; +} +export function isClassLikeDeclaration(node) { + return node.kind === SyntaxKind.ClassDeclaration || node.kind === SyntaxKind.ClassExpression; +} +export function isAccessorDeclaration(node) { + return node.kind === SyntaxKind.GetAccessor || node.kind === SyntaxKind.SetAccessor; +} +export function isLiteralLikeNode(node) { + const kind = node.kind; + return kind === SyntaxKind.StringLiteral || kind === SyntaxKind.NumericLiteral || kind === SyntaxKind.BigIntLiteral || kind === SyntaxKind.RegularExpressionLiteral || kind === SyntaxKind.TemplateHead || kind === SyntaxKind.TemplateMiddle || kind === SyntaxKind.TemplateTail || kind === SyntaxKind.JsxText; +} +export function isLiteralExpression(node) { + const kind = node.kind; + return kind === SyntaxKind.StringLiteral || kind === SyntaxKind.NumericLiteral || kind === SyntaxKind.BigIntLiteral || kind === SyntaxKind.RegularExpressionLiteral || kind === SyntaxKind.NoSubstitutionTemplateLiteral; +} +export function isUnionOrIntersectionTypeNode(node) { + return node.kind === SyntaxKind.UnionType || node.kind === SyntaxKind.IntersectionType; +} +export function isTemplateLiteralLikeNode(node) { + const kind = node.kind; + return isPseudoLiteralKind(kind); +} +export function isTemplateMiddleOrTail(node) { + return node.kind === SyntaxKind.TemplateMiddle || node.kind === SyntaxKind.TemplateTail; +} +export function isTemplateLiteral(node) { + return node.kind === SyntaxKind.TemplateExpression || node.kind === SyntaxKind.NoSubstitutionTemplateLiteral; +} +export function isTypePredicateParameterName(node) { + return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.ThisType; +} +export function isImportAttributeName(node) { + return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.StringLiteral; +} +export function isJSDocComment(node) { + const kind = node.kind; + return kind === SyntaxKind.JSDocText || kind === SyntaxKind.JSDocLink || kind === SyntaxKind.JSDocLinkCode || kind === SyntaxKind.JSDocLinkPlain; +} +export function isSignatureDeclaration(node) { + const kind = node.kind; + return kind === SyntaxKind.CallSignature || kind === SyntaxKind.ConstructSignature || kind === SyntaxKind.MethodSignature || kind === SyntaxKind.IndexSignature || kind === SyntaxKind.FunctionType || kind === SyntaxKind.ConstructorType || kind === SyntaxKind.FunctionDeclaration || kind === SyntaxKind.MethodDeclaration || kind === SyntaxKind.Constructor || kind === SyntaxKind.GetAccessor || kind === SyntaxKind.SetAccessor || kind === SyntaxKind.FunctionExpression || kind === SyntaxKind.ArrowFunction; +} +export function isStringLiteralLikeNode(node) { + return node.kind === SyntaxKind.StringLiteral || node.kind === SyntaxKind.NoSubstitutionTemplateLiteral; +} +export function isNumericOrStringLikeLiteral(node) { + return node.kind === SyntaxKind.StringLiteral || node.kind === SyntaxKind.NoSubstitutionTemplateLiteral || node.kind === SyntaxKind.NumericLiteral; +} +export function isObjectLiteralLikeNode(node) { + return node.kind === SyntaxKind.ObjectLiteralExpression || node.kind === SyntaxKind.ObjectBindingPattern; +} +export function isObjectTypeDeclaration(node) { + const kind = node.kind; + return kind === SyntaxKind.ClassDeclaration || kind === SyntaxKind.ClassExpression || kind === SyntaxKind.InterfaceDeclaration || kind === SyntaxKind.TypeLiteral; +} +export function isJsxOpeningLikeElement(node) { + return node.kind === SyntaxKind.JsxOpeningElement || node.kind === SyntaxKind.JsxSelfClosingElement; +} +export function isNamedImportsOrExports(node) { + return node.kind === SyntaxKind.NamedImports || node.kind === SyntaxKind.NamedExports; +} +export function isBreakOrContinueStatement(node) { + return node.kind === SyntaxKind.BreakStatement || node.kind === SyntaxKind.ContinueStatement; +} +export function isCallLikeExpression(node) { + const kind = node.kind; + return kind === SyntaxKind.CallExpression || kind === SyntaxKind.NewExpression || kind === SyntaxKind.TaggedTemplateExpression || kind === SyntaxKind.Decorator || kind === SyntaxKind.JsxOpeningElement || kind === SyntaxKind.JsxSelfClosingElement || kind === SyntaxKind.BinaryExpression; +} +export function isFunctionLikeDeclaration(node) { + const kind = node.kind; + return kind === SyntaxKind.FunctionDeclaration || kind === SyntaxKind.MethodDeclaration || kind === SyntaxKind.GetAccessor || kind === SyntaxKind.SetAccessor || kind === SyntaxKind.Constructor || kind === SyntaxKind.FunctionExpression || kind === SyntaxKind.ArrowFunction; +} +export function isVariableOrParameterDeclaration(node) { + return node.kind === SyntaxKind.VariableDeclaration || node.kind === SyntaxKind.Parameter; +} +export function isVariableOrPropertyDeclaration(node) { + return node.kind === SyntaxKind.VariableDeclaration || node.kind === SyntaxKind.PropertyDeclaration; +} +export function isCallOrNewExpression(node) { + return node.kind === SyntaxKind.CallExpression || node.kind === SyntaxKind.NewExpression; +} +export function isImportClauseOrBindingPattern(node) { + return node.kind === SyntaxKind.ImportClause || node.kind === SyntaxKind.ObjectBindingPattern || node.kind === SyntaxKind.ArrayBindingPattern; +} +export function isAnyImportSyntax(node) { + return node.kind === SyntaxKind.ImportDeclaration || node.kind === SyntaxKind.JSImportDeclaration || node.kind === SyntaxKind.ImportEqualsDeclaration; +} +export function isArrayBindingElement(node) { + return node.kind === SyntaxKind.BindingElement || node.kind === SyntaxKind.OmittedExpression; +} +export function isAssertionExpression(node) { + return node.kind === SyntaxKind.TypeAssertionExpression || node.kind === SyntaxKind.AsExpression; +} +export function isBooleanLiteral(node) { + return node.kind === SyntaxKind.TrueKeyword || node.kind === SyntaxKind.FalseKeyword; +} +export function isDestructuringAssignment(node) { + return node.kind === SyntaxKind.BinaryExpression; +} +export function isLiteralToken(node) { + const kind = node.kind; + return kind === SyntaxKind.NumericLiteral || kind === SyntaxKind.BigIntLiteral || kind === SyntaxKind.StringLiteral || kind === SyntaxKind.JsxText || kind === SyntaxKind.RegularExpressionLiteral || kind === SyntaxKind.NoSubstitutionTemplateLiteral; +} +export function isModifier(node) { + const kind = node.kind; + return isModifierKind(kind); +} +export function isObjectLiteralElementLike(node) { + const kind = node.kind; + return kind === SyntaxKind.PropertyAssignment || kind === SyntaxKind.ShorthandPropertyAssignment || kind === SyntaxKind.SpreadAssignment || kind === SyntaxKind.MethodDeclaration || kind === SyntaxKind.GetAccessor || kind === SyntaxKind.SetAccessor; +} +export function isPropertyNameLiteral(node) { + return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.StringLiteral || node.kind === SyntaxKind.NumericLiteral; +} +export function isPseudoLiteralToken(node) { + const kind = node.kind; + return isPseudoLiteralKind(kind); +} +export function isTemplateLiteralToken(node) { + const kind = node.kind; + return kind === SyntaxKind.NoSubstitutionTemplateLiteral || kind === SyntaxKind.TemplateHead || kind === SyntaxKind.TemplateMiddle || kind === SyntaxKind.TemplateTail; +} +export function isArrayDestructuringAssignment(node) { + return node.kind === SyntaxKind.BinaryExpression; +} +export function isObjectDestructuringAssignment(node) { + return node.kind === SyntaxKind.BinaryExpression; +} +export function isFunctionBody(node) { + return node.kind === SyntaxKind.Block; +} +export function isTriviaKind(kind) { + return kind === SyntaxKind.SingleLineCommentTrivia + || kind === SyntaxKind.MultiLineCommentTrivia + || kind === SyntaxKind.NewLineTrivia + || kind === SyntaxKind.WhitespaceTrivia + || kind === SyntaxKind.ConflictMarkerTrivia; +} +export function isPseudoLiteralKind(kind) { + return kind === SyntaxKind.TemplateHead + || kind === SyntaxKind.TemplateMiddle + || kind === SyntaxKind.TemplateTail; +} +export function isModifierKind(kind) { + return kind === SyntaxKind.AbstractKeyword + || kind === SyntaxKind.AccessorKeyword + || kind === SyntaxKind.AsyncKeyword + || kind === SyntaxKind.ConstKeyword + || kind === SyntaxKind.DeclareKeyword + || kind === SyntaxKind.DefaultKeyword + || kind === SyntaxKind.ExportKeyword + || kind === SyntaxKind.InKeyword + || kind === SyntaxKind.PrivateKeyword + || kind === SyntaxKind.ProtectedKeyword + || kind === SyntaxKind.PublicKeyword + || kind === SyntaxKind.ReadonlyKeyword + || kind === SyntaxKind.OutKeyword + || kind === SyntaxKind.OverrideKeyword + || kind === SyntaxKind.StaticKeyword; +} +export function isKeywordTypeKind(kind) { + return kind === SyntaxKind.AnyKeyword + || kind === SyntaxKind.BigIntKeyword + || kind === SyntaxKind.BooleanKeyword + || kind === SyntaxKind.IntrinsicKeyword + || kind === SyntaxKind.NeverKeyword + || kind === SyntaxKind.NumberKeyword + || kind === SyntaxKind.ObjectKeyword + || kind === SyntaxKind.StringKeyword + || kind === SyntaxKind.SymbolKeyword + || kind === SyntaxKind.UndefinedKeyword + || kind === SyntaxKind.UnknownKeyword + || kind === SyntaxKind.VoidKeyword; +} +export function isKeywordExpressionKind(kind) { + return kind === SyntaxKind.NullKeyword + || kind === SyntaxKind.TrueKeyword + || kind === SyntaxKind.FalseKeyword + || kind === SyntaxKind.ThisKeyword + || kind === SyntaxKind.SuperKeyword + || kind === SyntaxKind.ImportKeyword; +} +export function isJsxTokenKind(kind) { + return kind === SyntaxKind.LessThanSlashToken + || kind === SyntaxKind.EndOfFile + || kind === SyntaxKind.ConflictMarkerTrivia + || kind === SyntaxKind.JsxText + || kind === SyntaxKind.JsxTextAllWhiteSpaces + || kind === SyntaxKind.OpenBraceToken + || kind === SyntaxKind.LessThanToken; +} +export function isImportPhaseModifierKind(kind) { + return kind === SyntaxKind.TypeKeyword + || kind === SyntaxKind.DeferKeyword; +} +export function isPostfixUnaryOperator(kind) { + return kind === SyntaxKind.PlusPlusToken + || kind === SyntaxKind.MinusMinusToken; +} +export function isPrefixUnaryOperator(kind) { + return kind === SyntaxKind.PlusToken + || kind === SyntaxKind.MinusToken + || kind === SyntaxKind.TildeToken + || kind === SyntaxKind.ExclamationToken + || kind === SyntaxKind.PlusPlusToken + || kind === SyntaxKind.MinusMinusToken; +} +export function isAssignmentOperator(kind) { + return kind === SyntaxKind.EqualsToken + || isCompoundAssignmentOperator(kind); +} +export function isBinaryOperator(kind) { + return isAssignmentOperatorOrHigher(kind) + || kind === SyntaxKind.CommaToken; +} +export function isExponentiationOperator(kind) { + return kind === SyntaxKind.AsteriskAsteriskToken; +} +export function isMultiplicativeOperator(kind) { + return kind === SyntaxKind.AsteriskToken + || kind === SyntaxKind.SlashToken + || kind === SyntaxKind.PercentToken; +} +export function isMultiplicativeOperatorOrHigher(kind) { + return isExponentiationOperator(kind) + || isMultiplicativeOperator(kind); +} +export function isAdditiveOperator(kind) { + return kind === SyntaxKind.PlusToken + || kind === SyntaxKind.MinusToken; +} +export function isAdditiveOperatorOrHigher(kind) { + return isMultiplicativeOperatorOrHigher(kind) + || isAdditiveOperator(kind); +} +export function isShiftOperator(kind) { + return kind === SyntaxKind.LessThanLessThanToken + || kind === SyntaxKind.GreaterThanGreaterThanToken + || kind === SyntaxKind.GreaterThanGreaterThanGreaterThanToken; +} +export function isShiftOperatorOrHigher(kind) { + return isAdditiveOperatorOrHigher(kind) + || isShiftOperator(kind); +} +export function isRelationalOperator(kind) { + return kind === SyntaxKind.LessThanToken + || kind === SyntaxKind.LessThanEqualsToken + || kind === SyntaxKind.GreaterThanToken + || kind === SyntaxKind.GreaterThanEqualsToken + || kind === SyntaxKind.InstanceOfKeyword + || kind === SyntaxKind.InKeyword; +} +export function isRelationalOperatorOrHigher(kind) { + return isShiftOperatorOrHigher(kind) + || isRelationalOperator(kind); +} +export function isEqualityOperator(kind) { + return kind === SyntaxKind.EqualsEqualsToken + || kind === SyntaxKind.EqualsEqualsEqualsToken + || kind === SyntaxKind.ExclamationEqualsEqualsToken + || kind === SyntaxKind.ExclamationEqualsToken; +} +export function isEqualityOperatorOrHigher(kind) { + return isRelationalOperatorOrHigher(kind) + || isEqualityOperator(kind); +} +export function isBitwiseOperator(kind) { + return kind === SyntaxKind.AmpersandToken + || kind === SyntaxKind.BarToken + || kind === SyntaxKind.CaretToken; +} +export function isBitwiseOperatorOrHigher(kind) { + return isEqualityOperatorOrHigher(kind) + || isBitwiseOperator(kind); +} +export function isLogicalOperator(kind) { + return kind === SyntaxKind.AmpersandAmpersandToken + || kind === SyntaxKind.BarBarToken; +} +export function isLogicalOperatorOrHigher(kind) { + return isBitwiseOperatorOrHigher(kind) + || isLogicalOperator(kind); +} +export function isCompoundAssignmentOperator(kind) { + return kind === SyntaxKind.PlusEqualsToken + || kind === SyntaxKind.MinusEqualsToken + || kind === SyntaxKind.AsteriskAsteriskEqualsToken + || kind === SyntaxKind.AsteriskEqualsToken + || kind === SyntaxKind.SlashEqualsToken + || kind === SyntaxKind.PercentEqualsToken + || kind === SyntaxKind.AmpersandEqualsToken + || kind === SyntaxKind.BarEqualsToken + || kind === SyntaxKind.CaretEqualsToken + || kind === SyntaxKind.LessThanLessThanEqualsToken + || kind === SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken + || kind === SyntaxKind.GreaterThanGreaterThanEqualsToken + || kind === SyntaxKind.BarBarEqualsToken + || kind === SyntaxKind.AmpersandAmpersandEqualsToken + || kind === SyntaxKind.QuestionQuestionEqualsToken; +} +export function isAssignmentOperatorOrHigher(kind) { + return kind === SyntaxKind.QuestionQuestionToken + || isLogicalOperatorOrHigher(kind) + || isAssignmentOperator(kind); +} +export function isLogicalOrCoalescingAssignmentOperator(kind) { + return kind === SyntaxKind.AmpersandAmpersandEqualsToken + || kind === SyntaxKind.BarBarEqualsToken + || kind === SyntaxKind.QuestionQuestionEqualsToken; +} +export function isLiteralKind(kind) { + return kind >= SyntaxKind.FirstLiteralToken && kind <= SyntaxKind.LastLiteralToken; +} +export function isPunctuationKind(kind) { + return kind >= SyntaxKind.FirstPunctuation && kind <= SyntaxKind.LastPunctuation; +} +export function isKeywordKind(kind) { + return kind >= SyntaxKind.FirstKeyword && kind <= SyntaxKind.LastKeyword; +} +export function isTokenKind(kind) { + return kind >= SyntaxKind.FirstToken && kind <= SyntaxKind.LastToken; +} +export function isJSDocNodeKind(kind) { + return kind >= SyntaxKind.FirstJSDocNode && kind <= SyntaxKind.LastJSDocNode; +} +export function isEndOfFile(node) { + return node.kind === SyntaxKind.EndOfFile; +} +export function isDotToken(node) { + return node.kind === SyntaxKind.DotToken; +} +export function isDotDotDotToken(node) { + return node.kind === SyntaxKind.DotDotDotToken; +} +export function isQuestionToken(node) { + return node.kind === SyntaxKind.QuestionToken; +} +export function isExclamationToken(node) { + return node.kind === SyntaxKind.ExclamationToken; +} +export function isColonToken(node) { + return node.kind === SyntaxKind.ColonToken; +} +export function isEqualsToken(node) { + return node.kind === SyntaxKind.EqualsToken; +} +export function isAsteriskToken(node) { + return node.kind === SyntaxKind.AsteriskToken; +} +export function isEqualsGreaterThanToken(node) { + return node.kind === SyntaxKind.EqualsGreaterThanToken; +} +export function isPlusToken(node) { + return node.kind === SyntaxKind.PlusToken; +} +export function isMinusToken(node) { + return node.kind === SyntaxKind.MinusToken; +} +export function isQuestionDotToken(node) { + return node.kind === SyntaxKind.QuestionDotToken; +} +export function isAssertsKeyword(node) { + return node.kind === SyntaxKind.AssertsKeyword; +} +export function isAssertKeyword(node) { + return node.kind === SyntaxKind.AssertKeyword; +} +export function isAwaitKeyword(node) { + return node.kind === SyntaxKind.AwaitKeyword; +} +export function isCaseKeyword(node) { + return node.kind === SyntaxKind.CaseKeyword; +} +export function isAbstractKeyword(node) { + return node.kind === SyntaxKind.AbstractKeyword; +} +export function isAccessorKeyword(node) { + return node.kind === SyntaxKind.AccessorKeyword; +} +export function isAsyncKeyword(node) { + return node.kind === SyntaxKind.AsyncKeyword; +} +export function isConstKeyword(node) { + return node.kind === SyntaxKind.ConstKeyword; +} +export function isDeclareKeyword(node) { + return node.kind === SyntaxKind.DeclareKeyword; +} +export function isDefaultKeyword(node) { + return node.kind === SyntaxKind.DefaultKeyword; +} +export function isExportKeyword(node) { + return node.kind === SyntaxKind.ExportKeyword; +} +export function isInKeyword(node) { + return node.kind === SyntaxKind.InKeyword; +} +export function isPrivateKeyword(node) { + return node.kind === SyntaxKind.PrivateKeyword; +} +export function isProtectedKeyword(node) { + return node.kind === SyntaxKind.ProtectedKeyword; +} +export function isPublicKeyword(node) { + return node.kind === SyntaxKind.PublicKeyword; +} +export function isReadonlyKeyword(node) { + return node.kind === SyntaxKind.ReadonlyKeyword; +} +export function isOutKeyword(node) { + return node.kind === SyntaxKind.OutKeyword; +} +export function isOverrideKeyword(node) { + return node.kind === SyntaxKind.OverrideKeyword; +} +export function isStaticKeyword(node) { + return node.kind === SyntaxKind.StaticKeyword; +} +export function isBinaryOperatorToken(node) { + return isBinaryOperator(node.kind); +} +export function isAssignmentOperatorToken(node) { + return isAssignmentOperator(node.kind); +} +export function isNullLiteral(node) { + return node.kind === SyntaxKind.NullKeyword; +} +export function isTrueLiteral(node) { + return node.kind === SyntaxKind.TrueKeyword; +} +export function isFalseLiteral(node) { + return node.kind === SyntaxKind.FalseKeyword; +} +export function isThisExpression(node) { + return node.kind === SyntaxKind.ThisKeyword; +} +export function isSuperExpression(node) { + return node.kind === SyntaxKind.SuperKeyword; +} +export function isImportExpression(node) { + return node.kind === SyntaxKind.ImportKeyword; +} +//# sourceMappingURL=is.generated.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/is.generated.js.map b/node_modules/typescript/dist/ast/is.generated.js.map new file mode 100644 index 0000000..ad137f8 --- /dev/null +++ b/node_modules/typescript/dist/ast/is.generated.js.map @@ -0,0 +1 @@ +{"version":3,"file":"is.generated.js","sourceRoot":"","sources":["../../src/ast/is.generated.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAE9D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAsU/C,MAAM,UAAU,OAAO,CAAC,IAAU;IAC9B,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,IAAU;IACnC,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,UAAU,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,IAAU;IAC1C,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,iBAAiB,CAAC;AACtD,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,IAAU;IACtC,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,aAAa,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,IAAU;IAC7C,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,oBAAoB,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,IAAU;IAClC,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,SAAS,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAU;IACvC,OAAO,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ACrC,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,YAAY,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAU;IACvC,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,WAAW,CAAC;AAChD,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,IAAU;IACxC,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,YAAY,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,IAAU;IACzC,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,aAAa,CAAC;AAClD,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/is.js b/node_modules/typescript/dist/ast/is.js new file mode 100644 index 0000000..10fd05c --- /dev/null +++ b/node_modules/typescript/dist/ast/is.js @@ -0,0 +1,233 @@ +// is.ts — Hand-written type guard functions +// Generated guards are in is.generated.ts +import { NodeFlags } from "#enums/nodeFlags"; +import { OuterExpressionKinds } from "#enums/outerExpressionKinds"; +import { ScriptKind } from "#enums/scriptKind"; +import { SyntaxKind } from "#enums/syntaxKind"; +import { isLiteralExpression } from "./is.generated.js"; +export * from "./is.generated.js"; +export function isTypeNode(node) { + return isTypeNodeKind(node.kind); +} +function isTypeNodeKind(kind) { + return kind >= SyntaxKind.FirstTypeNode && kind <= SyntaxKind.LastTypeNode + || kind === SyntaxKind.AnyKeyword + || kind === SyntaxKind.UnknownKeyword + || kind === SyntaxKind.NumberKeyword + || kind === SyntaxKind.BigIntKeyword + || kind === SyntaxKind.ObjectKeyword + || kind === SyntaxKind.BooleanKeyword + || kind === SyntaxKind.StringKeyword + || kind === SyntaxKind.SymbolKeyword + || kind === SyntaxKind.VoidKeyword + || kind === SyntaxKind.UndefinedKeyword + || kind === SyntaxKind.NeverKeyword + || kind === SyntaxKind.IntrinsicKeyword + || kind === SyntaxKind.ExpressionWithTypeArguments + || kind === SyntaxKind.JSDocAllType + || kind === SyntaxKind.JSDocNullableType + || kind === SyntaxKind.JSDocNonNullableType + || kind === SyntaxKind.JSDocOptionalType + || kind === SyntaxKind.JSDocVariadicType + || kind === SyntaxKind.JSDocTypeExpression + || kind === SyntaxKind.JSDocTypeLiteral + || kind === SyntaxKind.JSDocSignature; +} +export function isStatement(node) { + const kind = node.kind; + return kind === SyntaxKind.VariableStatement || kind === SyntaxKind.EmptyStatement + || kind === SyntaxKind.ExpressionStatement || kind === SyntaxKind.IfStatement + || kind === SyntaxKind.DoStatement || kind === SyntaxKind.WhileStatement + || kind === SyntaxKind.ForStatement || kind === SyntaxKind.ForInStatement + || kind === SyntaxKind.ForOfStatement || kind === SyntaxKind.ContinueStatement + || kind === SyntaxKind.BreakStatement || kind === SyntaxKind.ReturnStatement + || kind === SyntaxKind.WithStatement || kind === SyntaxKind.SwitchStatement + || kind === SyntaxKind.LabeledStatement || kind === SyntaxKind.ThrowStatement + || kind === SyntaxKind.TryStatement || kind === SyntaxKind.DebuggerStatement + || kind === SyntaxKind.InterfaceDeclaration || kind === SyntaxKind.TypeAliasDeclaration + || kind === SyntaxKind.EnumDeclaration || kind === SyntaxKind.ModuleDeclaration + || kind === SyntaxKind.ImportDeclaration || kind === SyntaxKind.ImportEqualsDeclaration + || kind === SyntaxKind.ExportDeclaration || kind === SyntaxKind.ExportAssignment + || kind === SyntaxKind.NamespaceExportDeclaration || kind === SyntaxKind.FunctionDeclaration + || kind === SyntaxKind.ClassDeclaration || kind === SyntaxKind.MissingDeclaration + || kind === SyntaxKind.NotEmittedStatement || kind === SyntaxKind.Block; +} +export function isExpression(node) { + const kind = node.kind; + return kind === SyntaxKind.ConditionalExpression || kind === SyntaxKind.YieldExpression + || kind === SyntaxKind.ArrowFunction || kind === SyntaxKind.BinaryExpression + || kind === SyntaxKind.SpreadElement || kind === SyntaxKind.AsExpression + || kind === SyntaxKind.OmittedExpression + || kind === SyntaxKind.SatisfiesExpression + || kind === SyntaxKind.PrefixUnaryExpression || kind === SyntaxKind.PostfixUnaryExpression + || kind === SyntaxKind.DeleteExpression || kind === SyntaxKind.TypeOfExpression + || kind === SyntaxKind.VoidExpression || kind === SyntaxKind.AwaitExpression + || kind === SyntaxKind.TypeAssertionExpression + || kind === SyntaxKind.CallExpression || kind === SyntaxKind.NewExpression + || kind === SyntaxKind.TaggedTemplateExpression || kind === SyntaxKind.NonNullExpression + || kind === SyntaxKind.MetaProperty || kind === SyntaxKind.JsxExpression + || kind === SyntaxKind.PropertyAccessExpression || kind === SyntaxKind.ElementAccessExpression + || kind === SyntaxKind.FunctionExpression || kind === SyntaxKind.ClassExpression + || kind === SyntaxKind.ParenthesizedExpression || kind === SyntaxKind.ArrayLiteralExpression + || kind === SyntaxKind.ObjectLiteralExpression || kind === SyntaxKind.TemplateExpression + || kind === SyntaxKind.Identifier + || kind === SyntaxKind.PrivateIdentifier + || kind === SyntaxKind.NumericLiteral || kind === SyntaxKind.BigIntLiteral + || kind === SyntaxKind.StringLiteral || kind === SyntaxKind.RegularExpressionLiteral + || kind === SyntaxKind.NoSubstitutionTemplateLiteral || kind === SyntaxKind.JsxElement + || kind === SyntaxKind.JsxSelfClosingElement || kind === SyntaxKind.JsxFragment + || kind === SyntaxKind.NullKeyword || kind === SyntaxKind.TrueKeyword + || kind === SyntaxKind.FalseKeyword || kind === SyntaxKind.ThisKeyword + || kind === SyntaxKind.SuperKeyword || kind === SyntaxKind.ImportKeyword + || kind === SyntaxKind.ExpressionWithTypeArguments; +} +export function isBlockOrExpression(node) { + return node.kind === SyntaxKind.Block || isExpression(node); +} +export function isLeftHandSideExpression(node) { + return isLeftHandSideExpressionKind(skipPartiallyEmittedExpressions(node).kind); +} +export function skipPartiallyEmittedExpressions(node) { + return skipOuterExpressions(node, OuterExpressionKinds.PartiallyEmittedExpressions); +} +function isLeftHandSideExpressionKind(kind) { + switch (kind) { + case SyntaxKind.PropertyAccessExpression: + case SyntaxKind.ElementAccessExpression: + case SyntaxKind.NewExpression: + case SyntaxKind.CallExpression: + case SyntaxKind.JsxElement: + case SyntaxKind.JsxSelfClosingElement: + case SyntaxKind.JsxFragment: + case SyntaxKind.TaggedTemplateExpression: + case SyntaxKind.ArrayLiteralExpression: + case SyntaxKind.ParenthesizedExpression: + case SyntaxKind.ObjectLiteralExpression: + case SyntaxKind.ClassExpression: + case SyntaxKind.FunctionExpression: + case SyntaxKind.Identifier: + case SyntaxKind.PrivateIdentifier: // technically this is only an Expression if it's in a `#field in expr` BinaryExpression + case SyntaxKind.RegularExpressionLiteral: + case SyntaxKind.NumericLiteral: + case SyntaxKind.BigIntLiteral: + case SyntaxKind.StringLiteral: + case SyntaxKind.NoSubstitutionTemplateLiteral: + case SyntaxKind.TemplateExpression: + case SyntaxKind.FalseKeyword: + case SyntaxKind.NullKeyword: + case SyntaxKind.ThisKeyword: + case SyntaxKind.TrueKeyword: + case SyntaxKind.SuperKeyword: + case SyntaxKind.NonNullExpression: + case SyntaxKind.ExpressionWithTypeArguments: + case SyntaxKind.MetaProperty: + case SyntaxKind.ImportKeyword: // technically this is only an Expression if it's in a CallExpression + case SyntaxKind.MissingDeclaration: + return true; + default: + return false; + } +} +export function isUnaryExpression(node) { + return isUnaryExpressionKind(skipPartiallyEmittedExpressions(node).kind); +} +function isUnaryExpressionKind(kind) { + switch (kind) { + case SyntaxKind.PrefixUnaryExpression: + case SyntaxKind.PostfixUnaryExpression: + case SyntaxKind.DeleteExpression: + case SyntaxKind.TypeOfExpression: + case SyntaxKind.VoidExpression: + case SyntaxKind.AwaitExpression: + case SyntaxKind.TypeAssertionExpression: + return true; + default: + return isLeftHandSideExpressionKind(kind); + } +} +/** @internal */ +export function isOuterExpression(node, kinds = OuterExpressionKinds.All) { + switch (node.kind) { + case SyntaxKind.ParenthesizedExpression: + if (kinds & OuterExpressionKinds.ExcludeJSDocTypeAssertion && isJSDocTypeAssertion(node)) { + return false; + } + return (kinds & OuterExpressionKinds.Parentheses) !== 0; + case SyntaxKind.TypeAssertionExpression: + case SyntaxKind.AsExpression: + return (kinds & OuterExpressionKinds.TypeAssertions) !== 0; + case SyntaxKind.SatisfiesExpression: + return (kinds & (OuterExpressionKinds.ExpressionsWithTypeArguments | OuterExpressionKinds.Satisfies)) !== 0; + case SyntaxKind.ExpressionWithTypeArguments: + return (kinds & OuterExpressionKinds.ExpressionsWithTypeArguments) !== 0; + case SyntaxKind.NonNullExpression: + return (kinds & OuterExpressionKinds.NonNullAssertions) !== 0; + case SyntaxKind.PartiallyEmittedExpression: + return (kinds & OuterExpressionKinds.PartiallyEmittedExpressions) !== 0; + } + return false; +} +/** @internal */ +export function skipOuterExpressions(node, kinds = OuterExpressionKinds.All) { + while (isOuterExpression(node, kinds)) { + node = node.expression; + } + return node; +} +function isJSDocTypeAssertion(node) { + const sourceFile = node.getSourceFile(); + if (sourceFile.scriptKind !== ScriptKind.JS && sourceFile.scriptKind !== ScriptKind.JSX) { + return false; + } + const expression = node.expression; + if (expression.kind !== SyntaxKind.AsExpression) { + return false; + } + const asExpression = expression; + return !!asExpression.type + && (asExpression.type.flags & NodeFlags.Reparsed) !== 0; +} +export function isBindingPattern(node) { + return node.kind === SyntaxKind.ObjectBindingPattern || node.kind === SyntaxKind.ArrayBindingPattern; +} +export function isConciseBody(node) { + return node.kind === SyntaxKind.Block || isExpression(node); +} +export function isForInitializer(node) { + return node.kind === SyntaxKind.VariableDeclarationList || isExpression(node); +} +export function isQuestionOrExclamationToken(node) { + return node.kind === SyntaxKind.QuestionToken || node.kind === SyntaxKind.ExclamationToken; +} +export function isIdentifierOrThisTypeNode(node) { + return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.ThisType; +} +export function isReadonlyKeywordOrPlusOrMinusToken(node) { + return node.kind === SyntaxKind.ReadonlyKeyword || node.kind === SyntaxKind.PlusToken || node.kind === SyntaxKind.MinusToken; +} +export function isQuestionOrPlusOrMinusToken(node) { + return node.kind === SyntaxKind.QuestionToken || node.kind === SyntaxKind.PlusToken || node.kind === SyntaxKind.MinusToken; +} +export function isTemplateMiddleOrTemplateTail(node) { + return node.kind === SyntaxKind.TemplateMiddle || node.kind === SyntaxKind.TemplateTail; +} +export function isLiteralTypeLiteral(node) { + const kind = node.kind; + return kind === SyntaxKind.NullKeyword || kind === SyntaxKind.TrueKeyword + || kind === SyntaxKind.FalseKeyword || kind === SyntaxKind.PrefixUnaryExpression + || isLiteralExpression(node); +} +export function isIdentifierOrJSDocNamespaceDeclaration(node) { + return node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.ModuleDeclaration; +} +export function isJSDocTypeExpressionOrJSDocTypeLiteral(node) { + return node.kind === SyntaxKind.JSDocTypeExpression || node.kind === SyntaxKind.JSDocTypeLiteral; +} +export function isJsxTagNameExpression(node) { + const kind = node.kind; + return kind === SyntaxKind.ThisKeyword + || kind === SyntaxKind.Identifier + || kind === SyntaxKind.PropertyAccessExpression + || kind === SyntaxKind.JsxNamespacedName; +} +//# sourceMappingURL=is.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/is.js.map b/node_modules/typescript/dist/ast/is.js.map new file mode 100644 index 0000000..d72de8b --- /dev/null +++ b/node_modules/typescript/dist/ast/is.js.map @@ -0,0 +1 @@ +{"version":3,"file":"is.js","sourceRoot":"","sources":["../../src/ast/is.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,0CAA0C;AAE1C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAqC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,cAAc,mBAAmB,CAAC;AAelC,MAAM,UAAU,UAAU,CAAC,IAAU;IACjC,OAAO,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACrC,CAAC;AAED,SAAS,cAAc,CAAC,IAAgB;IACpC,OAAO,IAAI,IAAI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I,CAAC,IAAI,KAAK,UAAU,CAAC,iBAAiB,CAAC;AAC7F,CAAC;AAED,MAAM,UAAU,uCAAuC,CAAC,IAAU;IAC9D,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,mBAAmB,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,gBAAgB,CAAC;AACrG,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,IAAU;IAC7C,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;IACvB,OAAO,IAAI,KAAK,UAAU,CAAC,WAAW;WAC/B,IAAI,KAAK,UAAU,CAAC,UAAU;WAC9B,IAAI,KAAK,UAAU,CAAC,wBAAwB;WAC5C,IAAI,KAAK,UAAU,CAAC,iBAAiB,CAAC;AACjD,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/jsdoc.d.ts b/node_modules/typescript/dist/ast/jsdoc.d.ts new file mode 100644 index 0000000..81247a4 --- /dev/null +++ b/node_modules/typescript/dist/ast/jsdoc.d.ts @@ -0,0 +1,11 @@ +import type { JSDocComment, JSDocTag } from "./ast.generated.ts"; +import { type Node, type NodeArray, SyntaxKind } from "./ast.ts"; +/** Get all JSDoc tags related to a node, including those on parent nodes. */ +export declare function getJSDocTags(node: Node): readonly JSDocTag[]; +/** Gets all JSDoc tags that match a specified predicate */ +export declare function getAllJSDocTags(node: Node, predicate: (tag: JSDocTag) => tag is T): readonly T[]; +/** Gets all JSDoc tags of a specified kind */ +export declare function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): readonly JSDocTag[]; +/** Gets the text of a jsdoc comment, flattening links to their text. */ +export declare function getTextOfJSDocComment(comment?: string | NodeArray): string | undefined; +//# sourceMappingURL=jsdoc.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/jsdoc.d.ts.map b/node_modules/typescript/dist/ast/jsdoc.d.ts.map new file mode 100644 index 0000000..378820d --- /dev/null +++ b/node_modules/typescript/dist/ast/jsdoc.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"jsdoc.d.ts","sourceRoot":"","sources":["../../src/ast/jsdoc.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAER,YAAY,EAKZ,QAAQ,EAOX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEH,KAAK,IAAI,EACT,KAAK,SAAS,EACd,UAAU,EACb,MAAM,UAAU,CAAC;AAalB,6EAA6E;AAC7E,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,QAAQ,EAAE,CAE5D;AAED,2DAA2D;AAC3D,wBAAgB,eAAe,CAAC,CAAC,SAAS,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,GAAG,EAAE,QAAQ,KAAK,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC,EAAE,CAEpH;AAED,8CAA8C;AAC9C,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,GAAG,SAAS,QAAQ,EAAE,CAEvF;AAED,wEAAwE;AACxE,wBAAgB,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,YAAY,CAAC,GAAG,MAAM,GAAG,SAAS,CAGpG"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/jsdoc.js b/node_modules/typescript/dist/ast/jsdoc.js new file mode 100644 index 0000000..ae6b7a6 --- /dev/null +++ b/node_modules/typescript/dist/ast/jsdoc.js @@ -0,0 +1,202 @@ +import { assertNever } from "../internal/utils.js"; +import { SyntaxKind, } from "./ast.js"; +import { isIdentifier, isJSDoc, isJSDocOverloadTag, isJSDocParameterTag, isJSDocSatisfiesTag, isJSDocTemplateTag, isJSDocTypeTag, isParenthesizedExpression, isPrivateIdentifier, } from "./is.generated.js"; +/** Get all JSDoc tags related to a node, including those on parent nodes. */ +export function getJSDocTags(node) { + return getJSDocCommentsAndTags(node); +} +/** Gets all JSDoc tags that match a specified predicate */ +export function getAllJSDocTags(node, predicate) { + return getJSDocTags(node).filter(predicate); +} +/** Gets all JSDoc tags of a specified kind */ +export function getAllJSDocTagsOfKind(node, kind) { + return getJSDocTags(node).filter(doc => doc.kind === kind); +} +/** Gets the text of a jsdoc comment, flattening links to their text. */ +export function getTextOfJSDocComment(comment) { + return typeof comment === "string" ? comment + : comment?.map(c => c.kind === SyntaxKind.JSDocText ? c.text : formatJSDocLink(c)).join(""); +} +function isVariableLike(node) { + switch (node.kind) { + case SyntaxKind.BindingElement: + case SyntaxKind.EnumMember: + case SyntaxKind.Parameter: + case SyntaxKind.PropertyAssignment: + case SyntaxKind.PropertyDeclaration: + case SyntaxKind.PropertySignature: + case SyntaxKind.ShorthandPropertyAssignment: + case SyntaxKind.VariableDeclaration: + return true; + } + return false; +} +function getJSDocNodes(node) { + const jsDoc = node.jsDoc; + if (!jsDoc || jsDoc.length === 0) { + return []; + } + const result = []; + for (const j of jsDoc) { + if (isJSDoc(j)) { + result.push(j); + } + } + return result; +} +/** + * Determines whether a host node owns a JSDoc tag. A `@type` / `@satisfies` tag + * attached to a parenthesized expression belongs only to that expression. + */ +function ownsJSDocTag(hostNode, tag) { + return !(isJSDocTypeTag(tag) || isJSDocSatisfiesTag(tag)) + || !tag.parent + || !isJSDoc(tag.parent) + || !tag.parent.parent + || !isParenthesizedExpression(tag.parent.parent) + || tag.parent.parent === hostNode; +} +function filterOwnedJSDocTags(hostNode, comments) { + const result = []; + const lastJSDoc = comments[comments.length - 1]; + for (const jsDoc of comments) { + if (!jsDoc.tags) { + continue; + } + if (jsDoc === lastJSDoc) { + for (const tag of jsDoc.tags) { + if (ownsJSDocTag(hostNode, tag)) { + result.push(tag); + } + } + } + else { + // Tags from earlier comments only contribute their `@overload` tags. + for (const tag of jsDoc.tags) { + if (isJSDocOverloadTag(tag)) { + result.push(tag); + } + } + } + } + return result; +} +function getJSDocParameterTags(param) { + const result = []; + const name = param.name; + const parentTags = getJSDocTags(param.parent); + if (name && isIdentifier(name)) { + for (const tag of parentTags) { + if (isJSDocParameterTag(tag) && isIdentifier(tag.name) && tag.name.text === name.text) { + result.push(tag); + } + } + } + else if (name) { + // Binding patterns and JSDoc function syntax match parameter tags by position. + const parameters = param.parent.parameters; + const i = parameters ? [...parameters].indexOf(param) : -1; + if (i > -1) { + const paramTags = parentTags.filter(isJSDocParameterTag); + if (i < paramTags.length) { + result.push(paramTags[i]); + } + } + } + return result; +} +function getJSDocTypeParameterTags(typeParam) { + const result = []; + const name = typeParam.name.text; + for (const tag of getJSDocTags(typeParam.parent)) { + if (isJSDocTemplateTag(tag) && [...tag.typeParameters].some(tp => tp.name.text === name)) { + result.push(tag); + } + } + return result; +} +// Keep in sync with ast.GetNextJSDocCommentLocation. +function getNextJSDocCommentLocation(node) { + const parent = node.parent; + if (parent) { + switch (parent.kind) { + case SyntaxKind.PropertyAssignment: + case SyntaxKind.ExportAssignment: + case SyntaxKind.PropertyDeclaration: + case SyntaxKind.VariableDeclaration: + case SyntaxKind.SatisfiesExpression: + case SyntaxKind.ReturnStatement: + case SyntaxKind.VariableStatement: + case SyntaxKind.ExpressionStatement: + return parent; + case SyntaxKind.VariableDeclarationList: + if (parent.declarations[0] === node) { + return parent; + } + break; + } + } + return undefined; +} +function getJSDocCommentsAndTags(hostNode) { + const result = []; + // Pull parameter comments from a declaring initializer (e.g. `var x = function () {}`). + if (isVariableLike(hostNode)) { + const initializer = hostNode.initializer; + if (initializer) { + const initJSDoc = getJSDocNodes(initializer); + if (initJSDoc.length) { + result.push(...filterOwnedJSDocTags(hostNode, initJSDoc)); + } + } + } + let node = hostNode; + while (node && node.parent) { + const jsDocNodes = getJSDocNodes(node); + if (jsDocNodes.length) { + result.push(...filterOwnedJSDocTags(hostNode, jsDocNodes)); + } + if (node.kind === SyntaxKind.Parameter) { + result.push(...getJSDocParameterTags(node)); + break; + } + if (node.kind === SyntaxKind.TypeParameter) { + result.push(...getJSDocTypeParameterTags(node)); + break; + } + node = getNextJSDocCommentLocation(node); + } + return result; +} +function formatJSDocLink(link) { + const kind = link.kind === SyntaxKind.JSDocLink ? "link" + : link.kind === SyntaxKind.JSDocLinkCode ? "linkcode" + : "linkplain"; + const name = link.name ? entityNameToString(link.name) : ""; + const space = link.name && (link.text === "" || link.text.startsWith("://")) ? "" : " "; + return `{@${kind} ${name}${space}${link.text}}`; +} +function entityNameToString(name) { + switch (name.kind) { + case SyntaxKind.ThisKeyword: + return "this"; + case SyntaxKind.PrivateIdentifier: + case SyntaxKind.Identifier: + return name.getFullWidth() === 0 ? name.text : name.getText(); + case SyntaxKind.QualifiedName: + return entityNameToString(name.left) + "." + entityNameToString(name.right); + case SyntaxKind.PropertyAccessExpression: + if (isIdentifier(name.name) || isPrivateIdentifier(name.name)) { + return entityNameToString(name.expression) + "." + entityNameToString(name.name); + } + else { + return assertNever(name.name); + } + case SyntaxKind.JsxNamespacedName: + return entityNameToString(name.namespace) + ":" + entityNameToString(name.name); + default: + return assertNever(name); + } +} +//# sourceMappingURL=jsdoc.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/jsdoc.js.map b/node_modules/typescript/dist/ast/jsdoc.js.map new file mode 100644 index 0000000..87f71d7 --- /dev/null +++ b/node_modules/typescript/dist/ast/jsdoc.js.map @@ -0,0 +1 @@ +{"version":3,"file":"jsdoc.js","sourceRoot":"","sources":["../../src/ast/jsdoc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAgBnD,OAAO,EAIH,UAAU,GACb,MAAM,UAAU,CAAC;AAClB,OAAO,EACH,YAAY,EACZ,OAAO,EACP,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EACd,yBAAyB,EACzB,mBAAmB,GACtB,MAAM,mBAAmB,CAAC;AAE3B,6EAA6E;AAC7E,MAAM,UAAU,YAAY,CAAC,IAAU;IACnC,OAAO,uBAAuB,CAAC,IAAI,CAAC,CAAC;AACzC,CAAC;AAED,2DAA2D;AAC3D,MAAM,UAAU,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,IAAI,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC5D,OAAO,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,GAAG,GAAG,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACrF,CAAC;iBACI,CAAC;gBACF,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAClC,CAAC;QACL,KAAK,UAAU,CAAC,iBAAiB;YAC7B,OAAO,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,GAAG,GAAG,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpF;YACI,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/scanner.d.ts b/node_modules/typescript/dist/ast/scanner.d.ts new file mode 100644 index 0000000..49d87ce --- /dev/null +++ b/node_modules/typescript/dist/ast/scanner.d.ts @@ -0,0 +1,97 @@ +import { CommentDirectiveType } from "#enums/commentDirectiveType"; +import { LanguageVariant } from "#enums/languageVariant"; +import { RegularExpressionFlags } from "#enums/regularExpressionFlags"; +import { ScriptTarget } from "#enums/scriptTarget"; +import { SyntaxKind } from "#enums/syntaxKind"; +import { TokenFlags } from "#enums/tokenFlags"; +import type { JsxTokenSyntaxKind, KeywordSyntaxKind } from "./ast.ts"; +export type JSDocTokenKind = SyntaxKind.EndOfFile | SyntaxKind.WhitespaceTrivia | SyntaxKind.AtToken | SyntaxKind.NewLineTrivia | SyntaxKind.AsteriskToken | SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.LessThanToken | SyntaxKind.GreaterThanToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.EqualsToken | SyntaxKind.CommaToken | SyntaxKind.DotToken | SyntaxKind.Identifier | SyntaxKind.BacktickToken | SyntaxKind.HashToken | SyntaxKind.Unknown | KeywordSyntaxKind; +export interface CommentDirective { + range: { + pos: number; + end: number; + }; + type: CommentDirectiveType; +} +export declare function tokenIsIdentifierOrKeyword(token: SyntaxKind): boolean; +export declare function tokenIsIdentifierOrKeywordOrGreaterThan(token: SyntaxKind): boolean; +export interface Scanner { + getTokenFullStart(): number; + getToken(): SyntaxKind; + getTokenStart(): number; + getTokenEnd(): number; + getTokenText(): string; + getTokenValue(): string; + hasUnicodeEscape(): boolean; + hasExtendedUnicodeEscape(): boolean; + hasPrecedingLineBreak(): boolean; + hasPrecedingJSDocComment(): boolean; + hasPrecedingJSDocLeadingAsterisks(): boolean; + hasPrecedingJSDocWithDeprecatedTag(): boolean; + hasPrecedingJSDocWithSeeOrLink(): boolean; + isIdentifier(): boolean; + isReservedWord(): boolean; + isUnterminated(): boolean; + getNumericLiteralFlags(): TokenFlags; + getCommentDirectives(): CommentDirective[] | undefined; + getTokenFlags(): TokenFlags; + reScanGreaterToken(): SyntaxKind; + reScanSlashToken(): SyntaxKind; + reScanAsteriskEqualsToken(): SyntaxKind; + reScanTemplateToken(isTaggedTemplate: boolean): SyntaxKind; + reScanTemplateHeadOrNoSubstitutionTemplate(): SyntaxKind; + scanJsxIdentifier(): SyntaxKind; + scanJsxAttributeValue(): SyntaxKind; + reScanJsxAttributeValue(): SyntaxKind; + reScanJsxToken(allowMultilineJsxText?: boolean): JsxTokenSyntaxKind; + reScanLessThanToken(): SyntaxKind; + reScanHashToken(): SyntaxKind; + reScanQuestionToken(): SyntaxKind; + reScanInvalidIdentifier(): SyntaxKind; + scanJsxToken(): JsxTokenSyntaxKind; + scanJsDocToken(): JSDocTokenKind; + scanJSDocCommentTextToken(inBackticks: boolean): JSDocTokenKind | SyntaxKind.JSDocCommentTextToken; + scan(): SyntaxKind; + getText(): string; + clearCommentDirectives(): void; + setText(text: string | undefined, start?: number, length?: number): void; + setLanguageVariant(variant: LanguageVariant): void; + resetTokenState(pos: number): void; + setSkipJsDocLeadingAsterisks(skip: boolean): void; + lookAhead(callback: () => T): T; + scanRange(start: number, length: number, callback: () => T): T; + tryScan(callback: () => T): T; +} +export declare const textToKeywordObj: Record; +export declare function isUnicodeIdentifierStart(code: number): boolean; +export declare function tokenToString(t: SyntaxKind): string | undefined; +export declare function stringToToken(s: string): SyntaxKind | undefined; +export declare function characterCodeToRegularExpressionFlag(ch: number): RegularExpressionFlags | undefined; +export declare function computeLineStarts(text: string): number[]; +export declare function isWhiteSpaceLike(ch: number): boolean; +export declare function isWhiteSpaceSingleLine(ch: number): boolean; +export declare function isLineBreak(ch: number): boolean; +export declare function couldStartTrivia(text: string, pos: number): boolean; +export declare function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean, stopAtComments?: boolean, inJSDoc?: boolean): number; +export type CommentKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia; +export interface CommentRange { + pos: number; + end: number; + hasTrailingNewLine?: boolean; + kind: CommentKind; +} +export declare function forEachLeadingCommentRange(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T): U | undefined; +export declare function forEachLeadingCommentRange(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean) => U): U | undefined; +export declare function forEachTrailingCommentRange(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T): U | undefined; +export declare function forEachTrailingCommentRange(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean) => U): U | undefined; +export declare function reduceEachLeadingCommentRange(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T, initial: U): U | undefined; +export declare function reduceEachTrailingCommentRange(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T, initial: U): U | undefined; +export declare function getLeadingCommentRanges(text: string, pos: number): CommentRange[] | undefined; +export declare function getTrailingCommentRanges(text: string, pos: number): CommentRange[] | undefined; +export declare function getShebang(text: string): string | undefined; +export declare function isIdentifierStart(ch: number, _languageVersion?: ScriptTarget): boolean; +export declare function isIdentifierPart(ch: number, _languageVersion?: ScriptTarget, identifierVariant?: LanguageVariant): boolean; +export declare function isIdentifierText(name: string, _languageVersion?: ScriptTarget, identifierVariant?: LanguageVariant): boolean; +export declare function utf16EncodeAsString(codePoint: number): string; +export declare function createScanner(skipTrivia: boolean, languageVariant?: LanguageVariant, textInitial?: string, start?: number, length?: number): Scanner; +//# sourceMappingURL=scanner.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/scanner.d.ts.map b/node_modules/typescript/dist/ast/scanner.d.ts.map new file mode 100644 index 0000000..3c3142e --- /dev/null +++ b/node_modules/typescript/dist/ast/scanner.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"scanner.d.ts","sourceRoot":"","sources":["../../src/ast/scanner.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EACR,kBAAkB,EAClB,iBAAiB,EACpB,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,SAAS,GAAG,UAAU,CAAC,gBAAgB,GAAG,UAAU,CAAC,OAAO,GAAG,UAAU,CAAC,aAAa,GAAG,UAAU,CAAC,aAAa,GAAG,UAAU,CAAC,cAAc,GAAG,UAAU,CAAC,eAAe,GAAG,UAAU,CAAC,aAAa,GAAG,UAAU,CAAC,g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a,CACzB,UAAU,EAAE,OAAO,EACnB,eAAe,GAAE,eAA0C,EAC3D,WAAW,CAAC,EAAE,MAAM,EACpB,KAAK,CAAC,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,MAAM,GAChB,OAAO,CAumDT"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/scanner.js b/node_modules/typescript/dist/ast/scanner.js new file mode 100644 index 0000000..eec847f --- /dev/null +++ b/node_modules/typescript/dist/ast/scanner.js @@ -0,0 +1,2230 @@ +import { CharacterCodes } from "#enums/characterCodes"; +import { CommentDirectiveType } from "#enums/commentDirectiveType"; +import { LanguageVariant } from "#enums/languageVariant"; +import { RegularExpressionFlags } from "#enums/regularExpressionFlags"; +import { ScriptTarget } from "#enums/scriptTarget"; +import { SyntaxKind } from "#enums/syntaxKind"; +import { TokenFlags } from "#enums/tokenFlags"; +// Internal-only, not exported +const EscapeSequenceScanningFlags = { + String: 1 << 0, + ReportErrors: 1 << 1, + RegularExpression: 1 << 2, + AnnexB: 1 << 3, + AnyUnicodeMode: 1 << 4, + AtomEscape: 1 << 5, + ReportInvalidEscapeErrors: (1 << 2) | (1 << 1), + AllowExtendedUnicodeEscape: (1 << 0) | (1 << 4), +}; +export function tokenIsIdentifierOrKeyword(token) { + return token >= SyntaxKind.Identifier; +} +export function tokenIsIdentifierOrKeywordOrGreaterThan(token) { + return token === SyntaxKind.GreaterThanToken || tokenIsIdentifierOrKeyword(token); +} +export const textToKeywordObj = { + abstract: SyntaxKind.AbstractKeyword, + accessor: SyntaxKind.AccessorKeyword, + any: SyntaxKind.AnyKeyword, + as: SyntaxKind.AsKeyword, + asserts: SyntaxKind.AssertsKeyword, + assert: SyntaxKind.AssertKeyword, + bigint: SyntaxKind.BigIntKeyword, + boolean: SyntaxKind.BooleanKeyword, + break: SyntaxKind.BreakKeyword, + case: SyntaxKind.CaseKeyword, + catch: SyntaxKind.CatchKeyword, + class: SyntaxKind.ClassKeyword, + continue: SyntaxKind.ContinueKeyword, + const: SyntaxKind.ConstKeyword, + ["" + "constructor"]: SyntaxKind.ConstructorKeyword, + debugger: SyntaxKind.DebuggerKeyword, + declare: SyntaxKind.DeclareKeyword, + default: SyntaxKind.DefaultKeyword, + defer: SyntaxKind.DeferKeyword, + delete: SyntaxKind.DeleteKeyword, + do: SyntaxKind.DoKeyword, + else: SyntaxKind.ElseKeyword, + enum: SyntaxKind.EnumKeyword, + export: SyntaxKind.ExportKeyword, + extends: SyntaxKind.ExtendsKeyword, + false: SyntaxKind.FalseKeyword, + finally: SyntaxKind.FinallyKeyword, + for: SyntaxKind.ForKeyword, + from: SyntaxKind.FromKeyword, + function: SyntaxKind.FunctionKeyword, + get: SyntaxKind.GetKeyword, + if: SyntaxKind.IfKeyword, + implements: SyntaxKind.ImplementsKeyword, + import: SyntaxKind.ImportKeyword, + in: SyntaxKind.InKeyword, + infer: SyntaxKind.InferKeyword, + instanceof: SyntaxKind.InstanceOfKeyword, + interface: SyntaxKind.InterfaceKeyword, + intrinsic: SyntaxKind.IntrinsicKeyword, + is: SyntaxKind.IsKeyword, + keyof: SyntaxKind.KeyOfKeyword, + let: SyntaxKind.LetKeyword, + module: SyntaxKind.ModuleKeyword, + namespace: SyntaxKind.NamespaceKeyword, + never: SyntaxKind.NeverKeyword, + new: SyntaxKind.NewKeyword, + null: SyntaxKind.NullKeyword, + number: SyntaxKind.NumberKeyword, + object: SyntaxKind.ObjectKeyword, + package: SyntaxKind.PackageKeyword, + private: SyntaxKind.PrivateKeyword, + protected: SyntaxKind.ProtectedKeyword, + public: SyntaxKind.PublicKeyword, + override: SyntaxKind.OverrideKeyword, + out: SyntaxKind.OutKeyword, + readonly: SyntaxKind.ReadonlyKeyword, + require: SyntaxKind.RequireKeyword, + global: SyntaxKind.GlobalKeyword, + return: SyntaxKind.ReturnKeyword, + satisfies: SyntaxKind.SatisfiesKeyword, + set: SyntaxKind.SetKeyword, + static: SyntaxKind.StaticKeyword, + string: SyntaxKind.StringKeyword, + super: SyntaxKind.SuperKeyword, + switch: SyntaxKind.SwitchKeyword, + symbol: SyntaxKind.SymbolKeyword, + this: SyntaxKind.ThisKeyword, + throw: SyntaxKind.ThrowKeyword, + true: SyntaxKind.TrueKeyword, + try: SyntaxKind.TryKeyword, + type: SyntaxKind.TypeKeyword, + typeof: SyntaxKind.TypeOfKeyword, + undefined: SyntaxKind.UndefinedKeyword, + unique: SyntaxKind.UniqueKeyword, + unknown: SyntaxKind.UnknownKeyword, + using: SyntaxKind.UsingKeyword, + var: SyntaxKind.VarKeyword, + void: SyntaxKind.VoidKeyword, + while: SyntaxKind.WhileKeyword, + with: SyntaxKind.WithKeyword, + yield: SyntaxKind.YieldKeyword, + async: SyntaxKind.AsyncKeyword, + await: SyntaxKind.AwaitKeyword, + of: SyntaxKind.OfKeyword, +}; +const textToKeyword = new Map(Object.entries(textToKeywordObj)); +const textToToken = new Map(Object.entries({ + ...textToKeywordObj, + "{": SyntaxKind.OpenBraceToken, + "}": SyntaxKind.CloseBraceToken, + "(": SyntaxKind.OpenParenToken, + ")": SyntaxKind.CloseParenToken, + "[": SyntaxKind.OpenBracketToken, + "]": SyntaxKind.CloseBracketToken, + ".": SyntaxKind.DotToken, + "...": SyntaxKind.DotDotDotToken, + ";": SyntaxKind.SemicolonToken, + ",": SyntaxKind.CommaToken, + "<": SyntaxKind.LessThanToken, + ">": SyntaxKind.GreaterThanToken, + "<=": SyntaxKind.LessThanEqualsToken, + ">=": SyntaxKind.GreaterThanEqualsToken, + "==": SyntaxKind.EqualsEqualsToken, + "!=": SyntaxKind.ExclamationEqualsToken, + "===": SyntaxKind.EqualsEqualsEqualsToken, + "!==": SyntaxKind.ExclamationEqualsEqualsToken, + "=>": SyntaxKind.EqualsGreaterThanToken, + "+": SyntaxKind.PlusToken, + "-": SyntaxKind.MinusToken, + "**": SyntaxKind.AsteriskAsteriskToken, + "*": SyntaxKind.AsteriskToken, + "/": SyntaxKind.SlashToken, + "%": SyntaxKind.PercentToken, + "++": SyntaxKind.PlusPlusToken, + "--": SyntaxKind.MinusMinusToken, + "<<": SyntaxKind.LessThanLessThanToken, + ">": SyntaxKind.GreaterThanGreaterThanToken, + ">>>": SyntaxKind.GreaterThanGreaterThanGreaterThanToken, + "&": SyntaxKind.AmpersandToken, + "|": SyntaxKind.BarToken, + "^": SyntaxKind.CaretToken, + "!": SyntaxKind.ExclamationToken, + "~": SyntaxKind.TildeToken, + "&&": SyntaxKind.AmpersandAmpersandToken, + "||": SyntaxKind.BarBarToken, + "?": SyntaxKind.QuestionToken, + "??": SyntaxKind.QuestionQuestionToken, + "?.": SyntaxKind.QuestionDotToken, + ":": SyntaxKind.ColonToken, + "=": SyntaxKind.EqualsToken, + "+=": SyntaxKind.PlusEqualsToken, + "-=": SyntaxKind.MinusEqualsToken, + "*=": SyntaxKind.AsteriskEqualsToken, + "**=": SyntaxKind.AsteriskAsteriskEqualsToken, + "/=": SyntaxKind.SlashEqualsToken, + "%=": SyntaxKind.PercentEqualsToken, + "<<=": SyntaxKind.LessThanLessThanEqualsToken, + ">>=": SyntaxKind.GreaterThanGreaterThanEqualsToken, + ">>>=": SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken, + "&=": SyntaxKind.AmpersandEqualsToken, + "|=": SyntaxKind.BarEqualsToken, + "^=": SyntaxKind.CaretEqualsToken, + "||=": SyntaxKind.BarBarEqualsToken, + "&&=": SyntaxKind.AmpersandAmpersandEqualsToken, + "??=": SyntaxKind.QuestionQuestionEqualsToken, + "@": SyntaxKind.AtToken, + "#": SyntaxKind.HashToken, + "`": SyntaxKind.BacktickToken, +})); +const charCodeToRegExpFlag = new Map([ + [CharacterCodes.d, RegularExpressionFlags.HasIndices], + [CharacterCodes.g, RegularExpressionFlags.Global], + [CharacterCodes.i, RegularExpressionFlags.IgnoreCase], + [CharacterCodes.m, RegularExpressionFlags.Multiline], + [CharacterCodes.s, RegularExpressionFlags.DotAll], + [CharacterCodes.u, RegularExpressionFlags.Unicode], + [CharacterCodes.v, RegularExpressionFlags.UnicodeSets], + [CharacterCodes.y, RegularExpressionFlags.Sticky], +]); +/** + * Generated by scripts/regenerate-unicode-identifier-parts.mjs on node v22.1.0 with unicode 15.1 + * based on http://www.unicode.org/reports/tr31/ and https://www.ecma-international.org/ecma-262/6.0/#sec-names-and-keywords + * unicodeESNextIdentifierStart corresponds to the ID_Start and Other_ID_Start property, and + * unicodeESNextIdentifierPart corresponds to ID_Continue, Other_ID_Continue, plus ID_Start and Other_ID_Start + */ +// dprint-ignore +const unicodeESNextIdentifierStart = [65, 90, 97, 122, 170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 895, 895, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1327, 1329, 1366, 1369, 1369, 1376, 1416, 1488, 1514, 1519, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2144, 2154, 2160, 2183, 2185, 2190, 2208, 2249, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2432, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2556, 2556, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2809, 2809, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3133, 3133, 3160, 3162, 3165, 3165, 3168, 3169, 3200, 3200, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3293, 3294, 3296, 3297, 3313, 3314, 3332, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3412, 3414, 3423, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3718, 3722, 3724, 3747, 3749, 3749, 3751, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5905, 5919, 5937, 5952, 5969, 5984, 5996, 5998, 6000, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6264, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6430, 6480, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6988, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7296, 7304, 7312, 7354, 7357, 7359, 7401, 7404, 7406, 7411, 7413, 7414, 7418, 7418, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8472, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12443, 12447, 12449, 12538, 12540, 12543, 12549, 12591, 12593, 12686, 12704, 12735, 12784, 12799, 13312, 19903, 19968, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42653, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42954, 42960, 42961, 42963, 42963, 42965, 42969, 42994, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43261, 43262, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43488, 43492, 43494, 43503, 43514, 43518, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43646, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43881, 43888, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66176, 66204, 66208, 66256, 66304, 66335, 66349, 66378, 66384, 66421, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 66928, 66938, 66940, 66954, 66956, 66962, 66964, 66965, 66967, 66977, 66979, 66993, 66995, 67001, 67003, 67004, 67072, 67382, 67392, 67413, 67424, 67431, 67456, 67461, 67463, 67504, 67506, 67514, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68096, 68096, 68112, 68115, 68117, 68119, 68121, 68149, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68324, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 68864, 68899, 69248, 69289, 69296, 69297, 69376, 69404, 69415, 69415, 69424, 69445, 69488, 69505, 69552, 69572, 69600, 69622, 69635, 69687, 69745, 69746, 69749, 69749, 69763, 69807, 69840, 69864, 69891, 69926, 69956, 69956, 69959, 69959, 69968, 70002, 70006, 70006, 70019, 70066, 70081, 70084, 70106, 70106, 70108, 70108, 70144, 70161, 70163, 70187, 70207, 70208, 70272, 70278, 70280, 70280, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70366, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70461, 70461, 70480, 70480, 70493, 70497, 70656, 70708, 70727, 70730, 70751, 70753, 70784, 70831, 70852, 70853, 70855, 70855, 71040, 71086, 71128, 71131, 71168, 71215, 71236, 71236, 71296, 71338, 71352, 71352, 71424, 71450, 71488, 71494, 71680, 71723, 71840, 71903, 71935, 71942, 71945, 71945, 71948, 71955, 71957, 71958, 71960, 71983, 71999, 71999, 72001, 72001, 72096, 72103, 72106, 72144, 72161, 72161, 72163, 72163, 72192, 72192, 72203, 72242, 72250, 72250, 72272, 72272, 72284, 72329, 72349, 72349, 72368, 72440, 72704, 72712, 72714, 72750, 72768, 72768, 72818, 72847, 72960, 72966, 72968, 72969, 72971, 73008, 73030, 73030, 73056, 73061, 73063, 73064, 73066, 73097, 73112, 73112, 73440, 73458, 73474, 73474, 73476, 73488, 73490, 73523, 73648, 73648, 73728, 74649, 74752, 74862, 74880, 75075, 77712, 77808, 77824, 78895, 78913, 78918, 82944, 83526, 92160, 92728, 92736, 92766, 92784, 92862, 92880, 92909, 92928, 92975, 92992, 92995, 93027, 93047, 93053, 93071, 93760, 93823, 93952, 94026, 94032, 94032, 94099, 94111, 94176, 94177, 94179, 94179, 94208, 100343, 100352, 101589, 101632, 101640, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 122624, 122654, 122661, 122666, 122928, 122989, 123136, 123180, 123191, 123197, 123214, 123214, 123536, 123565, 123584, 123627, 124112, 124139, 124896, 124902, 124904, 124907, 124909, 124910, 124912, 124926, 124928, 125124, 125184, 125251, 125259, 125259, 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 131072, 173791, 173824, 177977, 177984, 178205, 178208, 183969, 183984, 191456, 191472, 192093, 194560, 195101, 196608, 201546, 201552, 205743]; +// dprint-ignore +const unicodeESNextIdentifierPart = [48, 57, 65, 90, 95, 95, 97, 122, 170, 170, 181, 181, 183, 183, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 895, 895, 902, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1327, 1329, 1366, 1369, 1369, 1376, 1416, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1519, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2045, 2045, 2048, 2093, 2112, 2139, 2144, 2154, 2160, 2183, 2185, 2190, 2200, 2273, 2275, 2403, 2406, 2415, 2417, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2556, 2556, 2558, 2558, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2809, 2815, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2901, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3072, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3132, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3162, 3165, 3165, 3168, 3171, 3174, 3183, 3200, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3293, 3294, 3296, 3299, 3302, 3311, 3313, 3315, 3328, 3340, 3342, 3344, 3346, 3396, 3398, 3400, 3402, 3406, 3412, 3415, 3423, 3427, 3430, 3439, 3450, 3455, 3457, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3558, 3567, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3718, 3722, 3724, 3747, 3749, 3749, 3751, 3773, 3776, 3780, 3782, 3782, 3784, 3790, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4969, 4977, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5909, 5919, 5940, 5952, 5971, 5984, 5996, 5998, 6000, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6159, 6169, 6176, 6264, 6272, 6314, 6320, 6389, 6400, 6430, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6618, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6832, 6845, 6847, 6862, 6912, 6988, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7296, 7304, 7312, 7354, 7357, 7359, 7376, 7378, 7380, 7418, 7424, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8205, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8472, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12447, 12449, 12543, 12549, 12591, 12593, 12686, 12704, 12735, 12784, 12799, 13312, 19903, 19968, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42737, 42775, 42783, 42786, 42888, 42891, 42954, 42960, 42961, 42963, 42963, 42965, 42969, 42994, 43047, 43052, 43052, 43072, 43123, 43136, 43205, 43216, 43225, 43232, 43255, 43259, 43259, 43261, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43488, 43518, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43881, 43888, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65071, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65381, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66045, 66045, 66176, 66204, 66208, 66256, 66272, 66272, 66304, 66335, 66349, 66378, 66384, 66426, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66720, 66729, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 66928, 66938, 66940, 66954, 66956, 66962, 66964, 66965, 66967, 66977, 66979, 66993, 66995, 67001, 67003, 67004, 67072, 67382, 67392, 67413, 67424, 67431, 67456, 67461, 67463, 67504, 67506, 67514, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68096, 68099, 68101, 68102, 68108, 68115, 68117, 68119, 68121, 68149, 68152, 68154, 68159, 68159, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68326, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 68864, 68903, 68912, 68921, 69248, 69289, 69291, 69292, 69296, 69297, 69373, 69404, 69415, 69415, 69424, 69456, 69488, 69509, 69552, 69572, 69600, 69622, 69632, 69702, 69734, 69749, 69759, 69818, 69826, 69826, 69840, 69864, 69872, 69881, 69888, 69940, 69942, 69951, 69956, 69959, 69968, 70003, 70006, 70006, 70016, 70084, 70089, 70092, 70094, 70106, 70108, 70108, 70144, 70161, 70163, 70199, 70206, 70209, 70272, 70278, 70280, 70280, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70378, 70384, 70393, 70400, 70403, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70459, 70468, 70471, 70472, 70475, 70477, 70480, 70480, 70487, 70487, 70493, 70499, 70502, 70508, 70512, 70516, 70656, 70730, 70736, 70745, 70750, 70753, 70784, 70853, 70855, 70855, 70864, 70873, 71040, 71093, 71096, 71104, 71128, 71133, 71168, 71232, 71236, 71236, 71248, 71257, 71296, 71352, 71360, 71369, 71424, 71450, 71453, 71467, 71472, 71481, 71488, 71494, 71680, 71738, 71840, 71913, 71935, 71942, 71945, 71945, 71948, 71955, 71957, 71958, 71960, 71989, 71991, 71992, 71995, 72003, 72016, 72025, 72096, 72103, 72106, 72151, 72154, 72161, 72163, 72164, 72192, 72254, 72263, 72263, 72272, 72345, 72349, 72349, 72368, 72440, 72704, 72712, 72714, 72758, 72760, 72768, 72784, 72793, 72818, 72847, 72850, 72871, 72873, 72886, 72960, 72966, 72968, 72969, 72971, 73014, 73018, 73018, 73020, 73021, 73023, 73031, 73040, 73049, 73056, 73061, 73063, 73064, 73066, 73102, 73104, 73105, 73107, 73112, 73120, 73129, 73440, 73462, 73472, 73488, 73490, 73530, 73534, 73538, 73552, 73561, 73648, 73648, 73728, 74649, 74752, 74862, 74880, 75075, 77712, 77808, 77824, 78895, 78912, 78933, 82944, 83526, 92160, 92728, 92736, 92766, 92768, 92777, 92784, 92862, 92864, 92873, 92880, 92909, 92912, 92916, 92928, 92982, 92992, 92995, 93008, 93017, 93027, 93047, 93053, 93071, 93760, 93823, 93952, 94026, 94031, 94087, 94095, 94111, 94176, 94177, 94179, 94180, 94192, 94193, 94208, 100343, 100352, 101589, 101632, 101640, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 113821, 113822, 118528, 118573, 118576, 118598, 119141, 119145, 119149, 119154, 119163, 119170, 119173, 119179, 119210, 119213, 119362, 119364, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 120782, 120831, 121344, 121398, 121403, 121452, 121461, 121461, 121476, 121476, 121499, 121503, 121505, 121519, 122624, 122654, 122661, 122666, 122880, 122886, 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922, 122928, 122989, 123023, 123023, 123136, 123180, 123184, 123197, 123200, 123209, 123214, 123214, 123536, 123566, 123584, 123641, 124112, 124153, 124896, 124902, 124904, 124907, 124909, 124910, 124912, 124926, 124928, 125124, 125136, 125142, 125184, 125259, 125264, 125273, 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 130032, 130041, 131072, 173791, 173824, 177977, 177984, 178205, 178208, 183969, 183984, 191456, 191472, 192093, 194560, 195101, 196608, 201546, 201552, 205743, 917760, 917999]; +const commentDirectiveRegExSingleLine = /^\/\/\/?\s*@(ts-expect-error|ts-ignore)/; +const commentDirectiveRegExMultiLine = /^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/; +const jsDocTagTerminators = new Set([" ", "\t", "\n", "\r", "}", "*"]); +function hasJSDocTag(text, offset, ...tags) { + for (const tag of tags) { + if (text.startsWith(tag, offset)) { + if (offset + tag.length === text.length) { + return true; + } + if (jsDocTagTerminators.has(text[offset + tag.length])) { + return true; + } + } + } + return false; +} +function scanJSDocCommentForTags(text, tokenFlags) { + let offset = 0; + while (true) { + const i = text.indexOf("@", offset); + if (i < 0) { + return tokenFlags; + } + offset = i + 1; + if (!(tokenFlags & TokenFlags.PrecedingJSDocWithDeprecated) && hasJSDocTag(text, offset, "deprecated")) { + tokenFlags |= TokenFlags.PrecedingJSDocWithDeprecated; + } + if (!(tokenFlags & TokenFlags.PrecedingJSDocWithSeeOrLink) && hasJSDocTag(text, offset, "see", "link", "linkcode", "linkplain")) { + tokenFlags |= TokenFlags.PrecedingJSDocWithSeeOrLink; + } + if ((tokenFlags & (TokenFlags.PrecedingJSDocWithDeprecated | TokenFlags.PrecedingJSDocWithSeeOrLink)) === + (TokenFlags.PrecedingJSDocWithDeprecated | TokenFlags.PrecedingJSDocWithSeeOrLink)) { + return tokenFlags; + } + } +} +function lookupInUnicodeMap(code, map) { + if (code < map[0]) { + return false; + } + let lo = 0; + let hi = map.length; + let mid; + while (lo + 1 < hi) { + mid = lo + (hi - lo) / 2; + mid -= mid % 2; + if (map[mid] <= code && code <= map[mid + 1]) { + return true; + } + if (code < map[mid]) { + hi = mid; + } + else { + lo = mid + 2; + } + } + return false; +} +export function isUnicodeIdentifierStart(code) { + return lookupInUnicodeMap(code, unicodeESNextIdentifierStart); +} +function isUnicodeIdentifierPart(code) { + return lookupInUnicodeMap(code, unicodeESNextIdentifierPart); +} +function makeReverseMap(source) { + const result = []; + source.forEach((value, name) => { + result[value] = name; + }); + return result; +} +const tokenStrings = makeReverseMap(textToToken); +export function tokenToString(t) { + return tokenStrings[t]; +} +export function stringToToken(s) { + return textToToken.get(s); +} +export function characterCodeToRegularExpressionFlag(ch) { + return charCodeToRegExpFlag.get(ch); +} +export function computeLineStarts(text) { + const result = []; + let pos = 0; + let lineStart = 0; + while (pos < text.length) { + const ch = text.charCodeAt(pos); + pos++; + switch (ch) { + case CharacterCodes.carriageReturn: + if (text.charCodeAt(pos) === CharacterCodes.lineFeed) { + pos++; + } + // falls through + case CharacterCodes.lineFeed: + result.push(lineStart); + lineStart = pos; + break; + default: + if (ch > CharacterCodes.maxAsciiCharacter && isLineBreak(ch)) { + result.push(lineStart); + lineStart = pos; + } + break; + } + } + result.push(lineStart); + return result; +} +export function isWhiteSpaceLike(ch) { + return isWhiteSpaceSingleLine(ch) || isLineBreak(ch); +} +export function isWhiteSpaceSingleLine(ch) { + return ch === CharacterCodes.space || + ch === CharacterCodes.tab || + ch === CharacterCodes.verticalTab || + ch === CharacterCodes.formFeed || + ch === CharacterCodes.nonBreakingSpace || + ch === CharacterCodes.nextLine || + ch === CharacterCodes.ogham || + ch >= CharacterCodes.enQuad && ch <= CharacterCodes.zeroWidthSpace || + ch === CharacterCodes.narrowNoBreakSpace || + ch === CharacterCodes.mathematicalSpace || + ch === CharacterCodes.ideographicSpace || + ch === CharacterCodes.byteOrderMark; +} +export function isLineBreak(ch) { + return ch === CharacterCodes.lineFeed || + ch === CharacterCodes.carriageReturn || + ch === CharacterCodes.lineSeparator || + ch === CharacterCodes.paragraphSeparator; +} +function isDigit(ch) { + return ch >= CharacterCodes._0 && ch <= CharacterCodes._9; +} +function isHexDigit(ch) { + return isDigit(ch) || ch >= CharacterCodes.A && ch <= CharacterCodes.F || ch >= CharacterCodes.a && ch <= CharacterCodes.f; +} +function isOctalDigit(ch) { + return ch >= CharacterCodes._0 && ch <= CharacterCodes._7; +} +export function couldStartTrivia(text, pos) { + const ch = text.charCodeAt(pos); + switch (ch) { + case CharacterCodes.carriageReturn: + case CharacterCodes.lineFeed: + case CharacterCodes.tab: + case CharacterCodes.verticalTab: + case CharacterCodes.formFeed: + case CharacterCodes.space: + case CharacterCodes.slash: + case CharacterCodes.lessThan: + case CharacterCodes.bar: + case CharacterCodes.equals: + case CharacterCodes.greaterThan: + return true; + case CharacterCodes.hash: + return pos === 0; + default: + return ch > CharacterCodes.maxAsciiCharacter; + } +} +export function skipTrivia(text, pos, stopAfterLineBreak, stopAtComments, inJSDoc) { + if (pos < 0) { + return pos; + } + let canConsumeStar = false; + while (true) { + const ch = text.charCodeAt(pos); + switch (ch) { + case CharacterCodes.carriageReturn: + if (text.charCodeAt(pos + 1) === CharacterCodes.lineFeed) { + pos++; + } + // falls through + case CharacterCodes.lineFeed: + pos++; + if (stopAfterLineBreak) { + return pos; + } + canConsumeStar = !!inJSDoc; + continue; + case CharacterCodes.tab: + case CharacterCodes.verticalTab: + case CharacterCodes.formFeed: + case CharacterCodes.space: + pos++; + continue; + case CharacterCodes.slash: + if (stopAtComments) { + break; + } + if (text.charCodeAt(pos + 1) === CharacterCodes.slash) { + pos += 2; + while (pos < text.length) { + if (isLineBreak(text.charCodeAt(pos))) { + break; + } + pos++; + } + canConsumeStar = false; + continue; + } + if (text.charCodeAt(pos + 1) === CharacterCodes.asterisk) { + pos += 2; + while (pos < text.length) { + if (text.charCodeAt(pos) === CharacterCodes.asterisk && text.charCodeAt(pos + 1) === CharacterCodes.slash) { + pos += 2; + break; + } + pos++; + } + canConsumeStar = false; + continue; + } + break; + case CharacterCodes.lessThan: + case CharacterCodes.bar: + case CharacterCodes.equals: + case CharacterCodes.greaterThan: + if (isConflictMarkerTrivia(text, pos)) { + pos = scanConflictMarkerTrivia(text, pos); + canConsumeStar = false; + continue; + } + break; + case CharacterCodes.hash: + if (pos === 0 && isShebangTrivia(text, pos)) { + pos = scanShebangTrivia(text, pos); + continue; + } + break; + case CharacterCodes.asterisk: + if (canConsumeStar) { + pos++; + canConsumeStar = false; + continue; + } + break; + default: + if (ch > CharacterCodes.maxAsciiCharacter && (isWhiteSpaceLike(ch))) { + pos++; + continue; + } + break; + } + return pos; + } +} +function isConflictMarkerTrivia(text, pos) { + if (pos >= text.length) { + return false; + } + const ch = text.charCodeAt(pos); + if (pos === 0 || isLineBreak(text.charCodeAt(pos - 1))) { + if (ch === CharacterCodes.lessThan || ch === CharacterCodes.greaterThan || ch === CharacterCodes.equals) { + if (pos + 6 < text.length && text.charCodeAt(pos + 1) === ch && text.charCodeAt(pos + 2) === ch && text.charCodeAt(pos + 3) === ch && text.charCodeAt(pos + 4) === ch && text.charCodeAt(pos + 5) === ch && text.charCodeAt(pos + 6) === ch) { + return ch === CharacterCodes.equals || text.charCodeAt(pos + 7) === CharacterCodes.space; + } + } + if (ch === CharacterCodes.bar && pos + 6 < text.length && text.charCodeAt(pos + 1) === ch && text.charCodeAt(pos + 2) === ch && text.charCodeAt(pos + 3) === ch && text.charCodeAt(pos + 4) === ch && text.charCodeAt(pos + 5) === ch && text.charCodeAt(pos + 6) === ch) { + return true; + } + } + return false; +} +function scanConflictMarkerTrivia(text, pos) { + const ch = text.charCodeAt(pos); + const len = text.length; + if (ch === CharacterCodes.lessThan || ch === CharacterCodes.greaterThan) { + while (pos < len && !isLineBreak(text.charCodeAt(pos))) { + pos++; + } + } + else { + // Consume everything from the start of a ||||||| or ======= marker to the start + // of the next ======= or >>>>>>> marker. + pos += 7; // skip marker + while (pos < len) { + const currentChar = text.charCodeAt(pos); + if ((currentChar === CharacterCodes.equals || currentChar === CharacterCodes.greaterThan) && isConflictMarkerTrivia(text, pos)) { + break; + } + pos++; + } + } + return pos; +} +function isShebangTrivia(text, pos) { + return pos === 0 && text.charCodeAt(0) === CharacterCodes.hash && text.charCodeAt(1) === CharacterCodes.exclamation; +} +function scanShebangTrivia(text, pos) { + pos += 2; + while (pos < text.length) { + if (isLineBreak(text.charCodeAt(pos))) { + break; + } + pos++; + } + return pos; +} +function iterateCommentRanges(reduce, text, pos, trailing, cb, state, initial) { + let pendingPos; + let pendingEnd; + let pendingKind; + let pendingHasTrailingNewLine; + let hasPendingCommentRange = false; + let collecting = trailing; + let accumulator = initial; + if (pos === 0) { + collecting = true; + const shebang = getShebang(text); + if (shebang) { + pos = shebang.length; + } + } + scan: while (pos >= 0 && pos < text.length) { + const ch = text.charCodeAt(pos); + switch (ch) { + case CharacterCodes.carriageReturn: + if (text.charCodeAt(pos + 1) === CharacterCodes.lineFeed) { + pos++; + } + // falls through + case CharacterCodes.lineFeed: + pos++; + if (trailing) { + break scan; + } + collecting = true; + if (hasPendingCommentRange) { + pendingHasTrailingNewLine = true; + } + continue; + case CharacterCodes.tab: + case CharacterCodes.verticalTab: + case CharacterCodes.formFeed: + case CharacterCodes.space: + pos++; + continue; + case CharacterCodes.slash: + const nextChar = text.charCodeAt(pos + 1); + let hasTrailingNewLine = false; + if (nextChar === CharacterCodes.slash || nextChar === CharacterCodes.asterisk) { + const kind = nextChar === CharacterCodes.slash ? SyntaxKind.SingleLineCommentTrivia : SyntaxKind.MultiLineCommentTrivia; + const startPos = pos; + pos += 2; + if (nextChar === CharacterCodes.slash) { + while (pos < text.length) { + if (isLineBreak(text.charCodeAt(pos))) { + hasTrailingNewLine = true; + break; + } + pos++; + } + } + else { + while (pos < text.length) { + if (text.charCodeAt(pos) === CharacterCodes.asterisk && text.charCodeAt(pos + 1) === CharacterCodes.slash) { + pos += 2; + break; + } + pos++; + } + } + if (collecting) { + if (hasPendingCommentRange) { + accumulator = cb(pendingPos, pendingEnd, pendingKind, pendingHasTrailingNewLine, state, accumulator); + if (!reduce && accumulator) { + return accumulator; + } + } + pendingPos = startPos; + pendingEnd = pos; + pendingKind = kind; + pendingHasTrailingNewLine = hasTrailingNewLine; + hasPendingCommentRange = true; + } + continue; + } + break scan; + default: + if (ch > CharacterCodes.maxAsciiCharacter && (isWhiteSpaceLike(ch))) { + if (hasPendingCommentRange && isLineBreak(ch)) { + pendingHasTrailingNewLine = true; + } + pos++; + continue; + } + break scan; + } + } + if (hasPendingCommentRange) { + accumulator = cb(pendingPos, pendingEnd, pendingKind, pendingHasTrailingNewLine, state, accumulator); + } + return accumulator; +} +function appendCommentRange(pos, end, kind, hasTrailingNewLine, _state, comments = []) { + comments.push({ kind, pos, end, hasTrailingNewLine }); + return comments; +} +export function forEachLeadingCommentRange(text, pos, cb, state) { + return iterateCommentRanges(/*reduce*/ false, text, pos, /*trailing*/ false, cb, state, /*initial*/ undefined); +} +export function forEachTrailingCommentRange(text, pos, cb, state) { + return iterateCommentRanges(/*reduce*/ false, text, pos, /*trailing*/ true, cb, state, /*initial*/ undefined); +} +export function reduceEachLeadingCommentRange(text, pos, cb, state, initial) { + return iterateCommentRanges(/*reduce*/ true, text, pos, /*trailing*/ false, cb, state, initial); +} +export function reduceEachTrailingCommentRange(text, pos, cb, state, initial) { + return iterateCommentRanges(/*reduce*/ true, text, pos, /*trailing*/ true, cb, state, initial); +} +export function getLeadingCommentRanges(text, pos) { + return reduceEachLeadingCommentRange(text, pos, appendCommentRange, /*state*/ undefined, /*initial*/ undefined); +} +export function getTrailingCommentRanges(text, pos) { + return reduceEachTrailingCommentRange(text, pos, appendCommentRange, /*state*/ undefined, /*initial*/ undefined); +} +export function getShebang(text) { + const shebang = /^#!.*/; + if (isShebangTrivia(text, 0)) { + const match = shebang.exec(text); + if (match) { + return match[0]; + } + } + return undefined; +} +export function isIdentifierStart(ch, _languageVersion) { + return ch >= CharacterCodes.A && ch <= CharacterCodes.Z || ch >= CharacterCodes.a && ch <= CharacterCodes.z || + ch === CharacterCodes.$ || ch === CharacterCodes._ || + ch > CharacterCodes.maxAsciiCharacter && isUnicodeIdentifierStart(ch); +} +export function isIdentifierPart(ch, _languageVersion, identifierVariant) { + return ch >= CharacterCodes.A && ch <= CharacterCodes.Z || ch >= CharacterCodes.a && ch <= CharacterCodes.z || + ch >= CharacterCodes._0 && ch <= CharacterCodes._9 || ch === CharacterCodes.$ || ch === CharacterCodes._ || + // "-" and ":" are valid in JSX Identifiers + (identifierVariant === LanguageVariant.JSX ? (ch === CharacterCodes.minus || ch === CharacterCodes.colon) : false) || + ch > CharacterCodes.maxAsciiCharacter && isUnicodeIdentifierPart(ch); +} +export function isIdentifierText(name, _languageVersion, identifierVariant) { + let ch = name.codePointAt(0); + if (!isIdentifierStart(ch)) { + return false; + } + for (let i = charSize(ch); i < name.length; i += charSize(ch)) { + if (!isIdentifierPart(ch = name.codePointAt(i), undefined, identifierVariant)) { + return false; + } + } + return true; +} +function codePointAt(s, i) { + return s.codePointAt(i); +} +function charSize(ch) { + if (ch >= 0x10000) { + return 2; + } + if (ch === CharacterCodes.EOF) { + return 0; + } + return 1; +} +export function utf16EncodeAsString(codePoint) { + return String.fromCodePoint(codePoint); +} +function parsePseudoBigInt(stringValue) { + let log2Base; + switch (stringValue.charCodeAt(1)) { + case CharacterCodes.b: + case CharacterCodes.B: + log2Base = 1; + break; + case CharacterCodes.o: + case CharacterCodes.O: + log2Base = 3; + break; + case CharacterCodes.x: + case CharacterCodes.X: + log2Base = 4; + break; + default: + // decimals for now just peel the trailing "n" and return + const nIndex = stringValue.length - 1; + let nonZeroStart = 0; + while (stringValue.charCodeAt(nonZeroStart) === CharacterCodes._0) { + nonZeroStart++; + } + return stringValue.slice(nonZeroStart, nIndex) || "0"; + } + // exit early for zero + const startIndex = 2; + const endIndex = stringValue.length - 1; + const bitsNeeded = (endIndex - startIndex) * log2Base; + // Stores the value specified by the string as a LE array of 16-bit integers + // using Uint16 instead of Uint32 so combining steps can use bitwise operators + const segments = new Uint16Array((bitsNeeded >>> 4) + (bitsNeeded & 15 ? 1 : 0)); + // Add the digits, one at a time + for (let i = endIndex - 1, bitOffset = 0; i >= startIndex; i--, bitOffset += log2Base) { + const segment = bitOffset >>> 4; + const digitChar = stringValue.charCodeAt(i); + // Find character value + const digit = digitChar <= CharacterCodes._9 + ? digitChar - CharacterCodes._0 + : 10 + digitChar - (digitChar <= CharacterCodes.F ? CharacterCodes.A : CharacterCodes.a); + // Add bits into segment + const shiftedDigit = digit << (bitOffset & 15); + segments[segment] |= shiftedDigit; + // overflow to next segment + const residual = shiftedDigit >>> 16; + if (residual) + segments[segment + 1] |= residual; + } + // Repeatedly divide by 10 to find each decimal digit + let base10Value = ""; + let firstNonzeroSegment = segments.length - 1; + let segmentsRemaining = true; + while (segmentsRemaining) { + let mod10 = 0; + segmentsRemaining = false; + for (let segment = firstNonzeroSegment; segment >= 0; segment--) { + const newSegment = mod10 << 16 | segments[segment]; + const segmentValue = (newSegment / 10) | 0; + segments[segment] = segmentValue; + mod10 = newSegment - segmentValue * 10; + if (segmentValue && !segmentsRemaining) { + firstNonzeroSegment = segment; + segmentsRemaining = true; + } + } + base10Value = mod10 + base10Value; + } + return base10Value; +} +// Creates a scanner over a (possibly unspecified) range of a piece of text. +export function createScanner(skipTrivia, languageVariant = LanguageVariant.Standard, textInitial, start, length) { + // Why var? It avoids TDZ checks in the runtime which can be costly. + // See: https://github.com/microsoft/TypeScript/issues/52924 + /* eslint-disable no-var */ + var text = textInitial; + // Current position (end position of text of current token) + var pos; + // end of text + var end; + // Start position of whitespace before current token + var fullStartPos; + // Start position of text of current token + var tokenStart; + var token; + var tokenValue; + var tokenFlags; + var commentDirectives; + var skipJsDocLeadingAsterisks = 0; + setText(text, start, length); + var scanner = { + getTokenFullStart: () => fullStartPos, + getTokenEnd: () => pos, + getToken: () => token, + getTokenStart: () => tokenStart, + getTokenText: () => text.substring(tokenStart, pos), + getTokenValue: () => tokenValue, + hasUnicodeEscape: () => (tokenFlags & TokenFlags.UnicodeEscape) !== 0, + hasExtendedUnicodeEscape: () => (tokenFlags & TokenFlags.ExtendedUnicodeEscape) !== 0, + hasPrecedingLineBreak: () => (tokenFlags & TokenFlags.PrecedingLineBreak) !== 0, + hasPrecedingJSDocComment: () => (tokenFlags & TokenFlags.PrecedingJSDocComment) !== 0, + hasPrecedingJSDocLeadingAsterisks: () => (tokenFlags & TokenFlags.PrecedingJSDocLeadingAsterisks) !== 0, + hasPrecedingJSDocWithDeprecatedTag: () => (tokenFlags & TokenFlags.PrecedingJSDocWithDeprecated) !== 0, + hasPrecedingJSDocWithSeeOrLink: () => (tokenFlags & TokenFlags.PrecedingJSDocWithSeeOrLink) !== 0, + isIdentifier: () => token === SyntaxKind.Identifier || token > SyntaxKind.LastReservedWord, + isReservedWord: () => token >= SyntaxKind.FirstReservedWord && token <= SyntaxKind.LastReservedWord, + isUnterminated: () => (tokenFlags & TokenFlags.Unterminated) !== 0, + getCommentDirectives: () => commentDirectives, + getNumericLiteralFlags: () => tokenFlags & TokenFlags.NumericLiteralFlags, + getTokenFlags: () => tokenFlags, + reScanGreaterToken, + reScanAsteriskEqualsToken, + reScanSlashToken, + reScanTemplateToken, + reScanTemplateHeadOrNoSubstitutionTemplate, + scanJsxIdentifier, + scanJsxAttributeValue, + reScanJsxAttributeValue, + reScanJsxToken, + reScanLessThanToken, + reScanHashToken, + reScanQuestionToken, + reScanInvalidIdentifier, + scanJsxToken, + scanJsDocToken, + scanJSDocCommentTextToken, + scan, + getText, + clearCommentDirectives, + setText, + setLanguageVariant, + resetTokenState, + setSkipJsDocLeadingAsterisks, + tryScan, + lookAhead, + scanRange, + }; + /* eslint-enable no-var */ + return scanner; + function codePointUnchecked(pos) { + return codePointAt(text, pos); + } + function codePointChecked(pos) { + return pos >= 0 && pos < end ? codePointUnchecked(pos) : CharacterCodes.EOF; + } + function charCodeUnchecked(pos) { + return text.charCodeAt(pos); + } + function charCodeChecked(pos) { + return pos >= 0 && pos < end ? charCodeUnchecked(pos) : CharacterCodes.EOF; + } + function scanNumberFragment() { + let start = pos; + let allowSeparator = false; + let isPreviousTokenSeparator = false; + let result = ""; + while (true) { + const ch = charCodeUnchecked(pos); + if (ch === CharacterCodes._) { + tokenFlags |= TokenFlags.ContainsSeparator; + if (allowSeparator) { + allowSeparator = false; + isPreviousTokenSeparator = true; + result += text.substring(start, pos); + } + else { + tokenFlags |= TokenFlags.ContainsInvalidSeparator; + } + pos++; + start = pos; + continue; + } + if (isDigit(ch)) { + allowSeparator = true; + isPreviousTokenSeparator = false; + pos++; + continue; + } + break; + } + if (charCodeUnchecked(pos - 1) === CharacterCodes._) { + tokenFlags |= TokenFlags.ContainsInvalidSeparator; + } + return result + text.substring(start, pos); + } + function scanNumber() { + let start = pos; + let mainFragment; + if (charCodeUnchecked(pos) === CharacterCodes._0) { + pos++; + if (charCodeUnchecked(pos) === CharacterCodes._) { + tokenFlags |= TokenFlags.ContainsSeparator | TokenFlags.ContainsInvalidSeparator; + pos--; + mainFragment = scanNumberFragment(); + } + else if (!scanDigits()) { + tokenFlags |= TokenFlags.ContainsLeadingZero; + mainFragment = "" + +tokenValue; + } + else if (!tokenValue) { + mainFragment = "0"; + } + else { + tokenValue = "" + parseInt(tokenValue, 8); + tokenFlags |= TokenFlags.Octal; + const withMinus = token === SyntaxKind.MinusToken; + const literal = (withMinus ? "-" : "") + "0o" + (+tokenValue).toString(8); + if (withMinus) + start--; + return SyntaxKind.NumericLiteral; + } + } + else { + mainFragment = scanNumberFragment(); + } + let decimalFragment; + let scientificFragment; + if (charCodeUnchecked(pos) === CharacterCodes.dot) { + pos++; + decimalFragment = scanNumberFragment(); + } + let end = pos; + if (charCodeUnchecked(pos) === CharacterCodes.E || charCodeUnchecked(pos) === CharacterCodes.e) { + pos++; + tokenFlags |= TokenFlags.Scientific; + if (charCodeUnchecked(pos) === CharacterCodes.plus || charCodeUnchecked(pos) === CharacterCodes.minus) + pos++; + const preNumericPart = pos; + const finalFragment = scanNumberFragment(); + if (finalFragment) { + scientificFragment = text.substring(end, preNumericPart) + finalFragment; + end = pos; + } + } + let result; + if (tokenFlags & TokenFlags.ContainsSeparator) { + result = mainFragment; + if (decimalFragment) { + result += "." + decimalFragment; + } + if (scientificFragment) { + result += scientificFragment; + } + } + else { + result = text.substring(start, end); + } + if (tokenFlags & TokenFlags.ContainsLeadingZero) { + tokenValue = "" + +result; + return SyntaxKind.NumericLiteral; + } + if (decimalFragment !== undefined || tokenFlags & TokenFlags.Scientific) { + checkForIdentifierStartAfterNumericLiteral(); + tokenValue = "" + +result; + return SyntaxKind.NumericLiteral; + } + else { + tokenValue = result; + const type = checkBigIntSuffix(); + checkForIdentifierStartAfterNumericLiteral(); + return type; + } + } + function checkForIdentifierStartAfterNumericLiteral() { + if (!isIdentifierStart(codePointUnchecked(pos))) { + return; + } + const identifierStart = pos; + const { length } = scanIdentifierParts(); + if (!(length === 1 && text[identifierStart] === "n")) { + pos = identifierStart; + } + } + function scanDigits() { + const start = pos; + let isOctal = true; + while (isDigit(charCodeChecked(pos))) { + if (!isOctalDigit(charCodeUnchecked(pos))) { + isOctal = false; + } + pos++; + } + tokenValue = text.substring(start, pos); + return isOctal; + } + function scanExactNumberOfHexDigits(count, canHaveSeparators) { + const valueString = scanHexDigits(count, /*scanAsManyAsPossible*/ false, canHaveSeparators); + return valueString ? parseInt(valueString, 16) : -1; + } + function scanMinimumNumberOfHexDigits(count, canHaveSeparators) { + return scanHexDigits(count, /*scanAsManyAsPossible*/ true, canHaveSeparators); + } + function scanHexDigits(minCount, scanAsManyAsPossible, canHaveSeparators) { + let valueChars = []; + let allowSeparator = false; + while (valueChars.length < minCount || scanAsManyAsPossible) { + let ch = charCodeUnchecked(pos); + if (canHaveSeparators && ch === CharacterCodes._) { + tokenFlags |= TokenFlags.ContainsSeparator; + if (allowSeparator) { + allowSeparator = false; + } + pos++; + continue; + } + allowSeparator = canHaveSeparators; + if (ch >= CharacterCodes.A && ch <= CharacterCodes.F) { + ch += CharacterCodes.a - CharacterCodes.A; + } + else if (!((ch >= CharacterCodes._0 && ch <= CharacterCodes._9) || + (ch >= CharacterCodes.a && ch <= CharacterCodes.f))) { + break; + } + valueChars.push(ch); + pos++; + } + if (valueChars.length < minCount) { + valueChars = []; + } + return String.fromCharCode(...valueChars); + } + function scanString(jsxAttributeString = false) { + const quote = charCodeUnchecked(pos); + pos++; + let result = ""; + let start = pos; + while (true) { + if (pos >= end) { + result += text.substring(start, pos); + tokenFlags |= TokenFlags.Unterminated; + break; + } + const ch = charCodeUnchecked(pos); + if (ch === quote) { + result += text.substring(start, pos); + pos++; + break; + } + if (ch === CharacterCodes.backslash && !jsxAttributeString) { + result += text.substring(start, pos); + result += scanEscapeSequence(EscapeSequenceScanningFlags.String | EscapeSequenceScanningFlags.ReportErrors); + start = pos; + continue; + } + if ((ch === CharacterCodes.lineFeed || ch === CharacterCodes.carriageReturn) && !jsxAttributeString) { + result += text.substring(start, pos); + tokenFlags |= TokenFlags.Unterminated; + break; + } + pos++; + } + return result; + } + function scanTemplateAndSetTokenValue(shouldEmitInvalidEscapeError) { + const startedWithBacktick = charCodeUnchecked(pos) === CharacterCodes.backtick; + pos++; + let start = pos; + let contents = ""; + let resultingToken; + while (true) { + if (pos >= end) { + contents += text.substring(start, pos); + tokenFlags |= TokenFlags.Unterminated; + resultingToken = startedWithBacktick ? SyntaxKind.NoSubstitutionTemplateLiteral : SyntaxKind.TemplateTail; + break; + } + const currChar = charCodeUnchecked(pos); + if (currChar === CharacterCodes.backtick) { + contents += text.substring(start, pos); + pos++; + resultingToken = startedWithBacktick ? SyntaxKind.NoSubstitutionTemplateLiteral : SyntaxKind.TemplateTail; + break; + } + if (currChar === CharacterCodes.$ && pos + 1 < end && charCodeUnchecked(pos + 1) === CharacterCodes.openBrace) { + contents += text.substring(start, pos); + pos += 2; + resultingToken = startedWithBacktick ? SyntaxKind.TemplateHead : SyntaxKind.TemplateMiddle; + break; + } + if (currChar === CharacterCodes.backslash) { + contents += text.substring(start, pos); + contents += scanEscapeSequence(EscapeSequenceScanningFlags.String | (shouldEmitInvalidEscapeError ? EscapeSequenceScanningFlags.ReportErrors : 0)); + start = pos; + continue; + } + if (currChar === CharacterCodes.carriageReturn) { + contents += text.substring(start, pos); + pos++; + if (pos < end && charCodeUnchecked(pos) === CharacterCodes.lineFeed) { + pos++; + } + contents += "\n"; + start = pos; + continue; + } + pos++; + } + tokenValue = contents; + return resultingToken; + } + function scanEscapeSequence(flags) { + const start = pos; + pos++; + if (pos >= end) { + return ""; + } + const ch = charCodeUnchecked(pos); + pos++; + switch (ch) { + case CharacterCodes._0: + if (pos >= end || !isDigit(charCodeUnchecked(pos))) { + return "\0"; + } + // falls through + case CharacterCodes._1: + case CharacterCodes._2: + case CharacterCodes._3: + if (pos < end && isOctalDigit(charCodeUnchecked(pos))) { + pos++; + } + // falls through + case CharacterCodes._4: + case CharacterCodes._5: + case CharacterCodes._6: + case CharacterCodes._7: + if (pos < end && isOctalDigit(charCodeUnchecked(pos))) { + pos++; + } + tokenFlags |= TokenFlags.ContainsInvalidEscape; + if (flags & EscapeSequenceScanningFlags.ReportInvalidEscapeErrors) { + const code = parseInt(text.substring(start + 1, pos), 8); + return String.fromCharCode(code); + } + return text.substring(start, pos); + case CharacterCodes._8: + case CharacterCodes._9: + tokenFlags |= TokenFlags.ContainsInvalidEscape; + if (flags & EscapeSequenceScanningFlags.ReportInvalidEscapeErrors) { + return String.fromCharCode(ch); + } + return text.substring(start, pos); + case CharacterCodes.b: + return "\b"; + case CharacterCodes.t: + return "\t"; + case CharacterCodes.n: + return "\n"; + case CharacterCodes.v: + return "\v"; + case CharacterCodes.f: + return "\f"; + case CharacterCodes.r: + return "\r"; + case CharacterCodes.singleQuote: + return "'"; + case CharacterCodes.doubleQuote: + return '"'; + case CharacterCodes.u: + if (pos < end && charCodeUnchecked(pos) === CharacterCodes.openBrace) { + pos -= 2; + const result = scanExtendedUnicodeEscape(); + if (!(flags & EscapeSequenceScanningFlags.AllowExtendedUnicodeEscape)) { + tokenFlags |= TokenFlags.ContainsInvalidEscape; + } + return result; + } + // '\uDDDD' + for (; pos < start + 6; pos++) { + if (!(pos < end && isHexDigit(charCodeUnchecked(pos)))) { + tokenFlags |= TokenFlags.ContainsInvalidEscape; + return text.substring(start, pos); + } + } + tokenFlags |= TokenFlags.UnicodeEscape; + { + const escapedValue = parseInt(text.substring(start + 2, pos), 16); + const escapedValueString = String.fromCharCode(escapedValue); + if (flags & EscapeSequenceScanningFlags.AnyUnicodeMode && escapedValue >= 0xD800 && escapedValue <= 0xDBFF && + pos + 6 < end && text.substring(pos, pos + 2) === "\\u" && charCodeUnchecked(pos + 2) !== CharacterCodes.openBrace) { + const nextStart = pos; + let nextPos = pos + 2; + for (; nextPos < nextStart + 6; nextPos++) { + if (!isHexDigit(charCodeUnchecked(nextPos))) { + return escapedValueString; + } + } + const nextEscapedValue = parseInt(text.substring(nextStart + 2, nextPos), 16); + if (nextEscapedValue >= 0xDC00 && nextEscapedValue <= 0xDFFF) { + pos = nextPos; + return escapedValueString + String.fromCharCode(nextEscapedValue); + } + } + return escapedValueString; + } + case CharacterCodes.x: + for (; pos < start + 4; pos++) { + if (!(pos < end && isHexDigit(charCodeUnchecked(pos)))) { + tokenFlags |= TokenFlags.ContainsInvalidEscape; + return text.substring(start, pos); + } + } + tokenFlags |= TokenFlags.HexEscape; + return String.fromCharCode(parseInt(text.substring(start + 2, pos), 16)); + case CharacterCodes.carriageReturn: + if (pos < end && charCodeUnchecked(pos) === CharacterCodes.lineFeed) { + pos++; + } + // falls through + case CharacterCodes.lineFeed: + case CharacterCodes.lineSeparator: + case CharacterCodes.paragraphSeparator: + return ""; + default: + return String.fromCharCode(ch); + } + } + function scanExtendedUnicodeEscape() { + const start = pos; + pos += 3; + const escapedValueString = scanMinimumNumberOfHexDigits(1, /*canHaveSeparators*/ false); + const escapedValue = escapedValueString ? parseInt(escapedValueString, 16) : -1; + let isInvalidExtendedEscape = false; + if (escapedValue < 0) { + isInvalidExtendedEscape = true; + } + else if (escapedValue > 0x10FFFF) { + isInvalidExtendedEscape = true; + } + if (pos >= end) { + isInvalidExtendedEscape = true; + } + else if (charCodeUnchecked(pos) === CharacterCodes.closeBrace) { + pos++; + } + else { + isInvalidExtendedEscape = true; + } + if (isInvalidExtendedEscape) { + tokenFlags |= TokenFlags.ContainsInvalidEscape; + return text.substring(start, pos); + } + tokenFlags |= TokenFlags.ExtendedUnicodeEscape; + return utf16EncodeAsString(escapedValue); + } + function peekUnicodeEscape() { + if (pos + 5 < end && charCodeUnchecked(pos + 1) === CharacterCodes.u) { + const start = pos; + pos += 2; + const value = scanExactNumberOfHexDigits(4, /*canHaveSeparators*/ false); + pos = start; + return value; + } + return -1; + } + function peekExtendedUnicodeEscape() { + if (codePointUnchecked(pos + 1) === CharacterCodes.u && codePointUnchecked(pos + 2) === CharacterCodes.openBrace) { + const start = pos; + pos += 3; + const escapedValueString = scanMinimumNumberOfHexDigits(1, /*canHaveSeparators*/ false); + const escapedValue = escapedValueString ? parseInt(escapedValueString, 16) : -1; + pos = start; + return escapedValue; + } + return -1; + } + function scanIdentifierParts() { + let result = ""; + let start = pos; + while (pos < end) { + let ch = codePointUnchecked(pos); + if (isIdentifierPart(ch)) { + pos += charSize(ch); + } + else if (ch === CharacterCodes.backslash) { + ch = peekExtendedUnicodeEscape(); + if (ch >= 0 && isIdentifierPart(ch)) { + result += scanExtendedUnicodeEscape(); + start = pos; + continue; + } + ch = peekUnicodeEscape(); + if (!(ch >= 0 && isIdentifierPart(ch))) { + break; + } + tokenFlags |= TokenFlags.UnicodeEscape; + result += text.substring(start, pos); + result += utf16EncodeAsString(ch); + pos += 6; + start = pos; + } + else { + break; + } + } + result += text.substring(start, pos); + return result; + } + function getIdentifierToken() { + const len = tokenValue.length; + if (len >= 2 && len <= 12) { + const ch = tokenValue.charCodeAt(0); + if (ch >= CharacterCodes.a && ch <= CharacterCodes.z) { + const keyword = textToKeyword.get(tokenValue); + if (keyword !== undefined) { + return token = keyword; + } + } + } + return token = SyntaxKind.Identifier; + } + function scanBinaryOrOctalDigits(base) { + let value = ""; + let separatorAllowed = false; + let isPreviousTokenSeparator = false; + while (true) { + const ch = charCodeUnchecked(pos); + if (ch === CharacterCodes._) { + tokenFlags |= TokenFlags.ContainsSeparator; + if (separatorAllowed) { + separatorAllowed = false; + isPreviousTokenSeparator = true; + } + pos++; + continue; + } + separatorAllowed = true; + if (!isDigit(ch) || ch - CharacterCodes._0 >= base) { + break; + } + value += text[pos]; + pos++; + isPreviousTokenSeparator = false; + } + return value; + } + function checkBigIntSuffix() { + if (charCodeUnchecked(pos) === CharacterCodes.n) { + tokenValue += "n"; + if (tokenFlags & TokenFlags.BinaryOrOctalSpecifier) { + tokenValue = parsePseudoBigInt(tokenValue) + "n"; + } + pos++; + return SyntaxKind.BigIntLiteral; + } + else { + const numericValue = tokenFlags & TokenFlags.BinarySpecifier + ? parseInt(tokenValue.slice(2), 2) + : tokenFlags & TokenFlags.OctalSpecifier + ? parseInt(tokenValue.slice(2), 8) + : +tokenValue; + tokenValue = "" + numericValue; + return SyntaxKind.NumericLiteral; + } + } + function scan() { + fullStartPos = pos; + tokenFlags = TokenFlags.None; + while (true) { + tokenStart = pos; + if (pos >= end) { + return token = SyntaxKind.EndOfFile; + } + const ch = codePointUnchecked(pos); + if (pos === 0) { + if (ch === CharacterCodes.hash && isShebangTrivia(text, pos)) { + pos = scanShebangTrivia(text, pos); + if (skipTrivia) { + continue; + } + else { + return token = SyntaxKind.Unknown; + } + } + } + switch (ch) { + case CharacterCodes.lineFeed: + case CharacterCodes.carriageReturn: + tokenFlags |= TokenFlags.PrecedingLineBreak; + if (skipTrivia) { + pos++; + continue; + } + else { + if (ch === CharacterCodes.carriageReturn && pos + 1 < end && charCodeUnchecked(pos + 1) === CharacterCodes.lineFeed) { + pos += 2; + } + else { + pos++; + } + return token = SyntaxKind.NewLineTrivia; + } + case CharacterCodes.tab: + case CharacterCodes.verticalTab: + case CharacterCodes.formFeed: + case CharacterCodes.space: + case CharacterCodes.nonBreakingSpace: + case CharacterCodes.ogham: + case CharacterCodes.enQuad: + case CharacterCodes.emQuad: + case CharacterCodes.enSpace: + case CharacterCodes.emSpace: + case CharacterCodes.threePerEmSpace: + case CharacterCodes.fourPerEmSpace: + case CharacterCodes.sixPerEmSpace: + case CharacterCodes.figureSpace: + case CharacterCodes.punctuationSpace: + case CharacterCodes.thinSpace: + case CharacterCodes.hairSpace: + case CharacterCodes.zeroWidthSpace: + case CharacterCodes.narrowNoBreakSpace: + case CharacterCodes.mathematicalSpace: + case CharacterCodes.ideographicSpace: + case CharacterCodes.byteOrderMark: + if (skipTrivia) { + pos++; + continue; + } + else { + while (pos < end && isWhiteSpaceSingleLine(charCodeUnchecked(pos))) { + pos++; + } + return token = SyntaxKind.WhitespaceTrivia; + } + case CharacterCodes.exclamation: + if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) { + if (charCodeUnchecked(pos + 2) === CharacterCodes.equals) { + return pos += 3, token = SyntaxKind.ExclamationEqualsEqualsToken; + } + return pos += 2, token = SyntaxKind.ExclamationEqualsToken; + } + pos++; + return token = SyntaxKind.ExclamationToken; + case CharacterCodes.doubleQuote: + case CharacterCodes.singleQuote: + tokenValue = scanString(); + return token = SyntaxKind.StringLiteral; + case CharacterCodes.backtick: + return token = scanTemplateAndSetTokenValue(/*shouldEmitInvalidEscapeError*/ false); + case CharacterCodes.percent: + if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) { + return pos += 2, token = SyntaxKind.PercentEqualsToken; + } + pos++; + return token = SyntaxKind.PercentToken; + case CharacterCodes.ampersand: + if (charCodeUnchecked(pos + 1) === CharacterCodes.ampersand) { + if (charCodeUnchecked(pos + 2) === CharacterCodes.equals) { + return pos += 3, token = SyntaxKind.AmpersandAmpersandEqualsToken; + } + return pos += 2, token = SyntaxKind.AmpersandAmpersandToken; + } + if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) { + return pos += 2, token = SyntaxKind.AmpersandEqualsToken; + } + pos++; + return token = SyntaxKind.AmpersandToken; + case CharacterCodes.openParen: + pos++; + return token = SyntaxKind.OpenParenToken; + case CharacterCodes.closeParen: + pos++; + return token = SyntaxKind.CloseParenToken; + case CharacterCodes.asterisk: + if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) { + return pos += 2, token = SyntaxKind.AsteriskEqualsToken; + } + if (charCodeUnchecked(pos + 1) === CharacterCodes.asterisk) { + if (charCodeUnchecked(pos + 2) === CharacterCodes.equals) { + return pos += 3, token = SyntaxKind.AsteriskAsteriskEqualsToken; + } + return pos += 2, token = SyntaxKind.AsteriskAsteriskToken; + } + pos++; + if (skipJsDocLeadingAsterisks && + (tokenFlags & TokenFlags.PrecedingJSDocLeadingAsterisks) === 0 && + (tokenFlags & TokenFlags.PrecedingLineBreak)) { + tokenFlags |= TokenFlags.PrecedingJSDocLeadingAsterisks; + continue; + } + return token = SyntaxKind.AsteriskToken; + case CharacterCodes.plus: + if (charCodeUnchecked(pos + 1) === CharacterCodes.plus) { + return pos += 2, token = SyntaxKind.PlusPlusToken; + } + if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) { + return pos += 2, token = SyntaxKind.PlusEqualsToken; + } + pos++; + return token = SyntaxKind.PlusToken; + case CharacterCodes.comma: + pos++; + return token = SyntaxKind.CommaToken; + case CharacterCodes.minus: + if (charCodeUnchecked(pos + 1) === CharacterCodes.minus) { + return pos += 2, token = SyntaxKind.MinusMinusToken; + } + if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) { + return pos += 2, token = SyntaxKind.MinusEqualsToken; + } + pos++; + return token = SyntaxKind.MinusToken; + case CharacterCodes.dot: + if (isDigit(charCodeUnchecked(pos + 1))) { + scanNumber(); + return token = SyntaxKind.NumericLiteral; + } + if (charCodeUnchecked(pos + 1) === CharacterCodes.dot && charCodeUnchecked(pos + 2) === CharacterCodes.dot) { + return pos += 3, token = SyntaxKind.DotDotDotToken; + } + pos++; + return token = SyntaxKind.DotToken; + case CharacterCodes.slash: + // Single-line comment + if (charCodeUnchecked(pos + 1) === CharacterCodes.slash) { + pos += 2; + while (pos < end) { + if (isLineBreak(charCodeUnchecked(pos))) { + break; + } + pos++; + } + commentDirectives = appendIfCommentDirective(commentDirectives, text.slice(tokenStart, pos), commentDirectiveRegExSingleLine, tokenStart); + if (skipTrivia) { + continue; + } + else { + return token = SyntaxKind.SingleLineCommentTrivia; + } + } + // Multi-line comment + if (charCodeUnchecked(pos + 1) === CharacterCodes.asterisk) { + pos += 2; + const isJSDoc = charCodeUnchecked(pos) === CharacterCodes.asterisk && charCodeUnchecked(pos + 1) !== CharacterCodes.slash; + let commentClosed = false; + let lastLineStart = tokenStart; + while (pos < end) { + const ch = charCodeUnchecked(pos); + if (ch === CharacterCodes.asterisk && charCodeUnchecked(pos + 1) === CharacterCodes.slash) { + pos += 2; + commentClosed = true; + break; + } + pos++; + if (isLineBreak(ch)) { + lastLineStart = pos; + tokenFlags |= TokenFlags.PrecedingLineBreak; + } + } + if (isJSDoc) { + tokenFlags |= TokenFlags.PrecedingJSDocComment; + tokenFlags = scanJSDocCommentForTags(text.slice(tokenStart, pos), tokenFlags); + } + commentDirectives = appendIfCommentDirective(commentDirectives, text.slice(lastLineStart, pos), commentDirectiveRegExMultiLine, lastLineStart); + if (skipTrivia) { + continue; + } + else { + if (!commentClosed) { + tokenFlags |= TokenFlags.Unterminated; + } + return token = SyntaxKind.MultiLineCommentTrivia; + } + } + if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) { + return pos += 2, token = SyntaxKind.SlashEqualsToken; + } + pos++; + return token = SyntaxKind.SlashToken; + case CharacterCodes._0: + if (pos + 2 < end && (charCodeUnchecked(pos + 1) === CharacterCodes.X || charCodeUnchecked(pos + 1) === CharacterCodes.x)) { + pos += 2; + tokenValue = scanMinimumNumberOfHexDigits(1, /*canHaveSeparators*/ true); + if (!tokenValue) { + tokenValue = "0"; + } + tokenValue = "0x" + tokenValue; + tokenFlags |= TokenFlags.HexSpecifier; + return token = checkBigIntSuffix(); + } + else if (pos + 2 < end && (charCodeUnchecked(pos + 1) === CharacterCodes.B || charCodeUnchecked(pos + 1) === CharacterCodes.b)) { + pos += 2; + tokenValue = scanBinaryOrOctalDigits(2); + if (!tokenValue) { + tokenValue = "0"; + } + tokenValue = "0b" + tokenValue; + tokenFlags |= TokenFlags.BinarySpecifier; + return token = checkBigIntSuffix(); + } + else if (pos + 2 < end && (charCodeUnchecked(pos + 1) === CharacterCodes.O || charCodeUnchecked(pos + 1) === CharacterCodes.o)) { + pos += 2; + tokenValue = scanBinaryOrOctalDigits(8); + if (!tokenValue) { + tokenValue = "0"; + } + tokenValue = "0o" + tokenValue; + tokenFlags |= TokenFlags.OctalSpecifier; + return token = checkBigIntSuffix(); + } + // falls through + case CharacterCodes._1: + case CharacterCodes._2: + case CharacterCodes._3: + case CharacterCodes._4: + case CharacterCodes._5: + case CharacterCodes._6: + case CharacterCodes._7: + case CharacterCodes._8: + case CharacterCodes._9: + return token = scanNumber(); + case CharacterCodes.colon: + pos++; + return token = SyntaxKind.ColonToken; + case CharacterCodes.semicolon: + pos++; + return token = SyntaxKind.SemicolonToken; + case CharacterCodes.lessThan: + if (isConflictMarkerTrivia(text, pos)) { + pos = scanConflictMarkerTrivia(text, pos); + if (skipTrivia) { + continue; + } + else { + return token = SyntaxKind.ConflictMarkerTrivia; + } + } + if (charCodeUnchecked(pos + 1) === CharacterCodes.lessThan) { + if (charCodeUnchecked(pos + 2) === CharacterCodes.equals) { + return pos += 3, token = SyntaxKind.LessThanLessThanEqualsToken; + } + return pos += 2, token = SyntaxKind.LessThanLessThanToken; + } + if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) { + return pos += 2, token = SyntaxKind.LessThanEqualsToken; + } + if (languageVariant === LanguageVariant.JSX && + charCodeUnchecked(pos + 1) === CharacterCodes.slash && + charCodeUnchecked(pos + 2) !== CharacterCodes.asterisk) { + return pos += 2, token = SyntaxKind.LessThanSlashToken; + } + pos++; + return token = SyntaxKind.LessThanToken; + case CharacterCodes.equals: + if (isConflictMarkerTrivia(text, pos)) { + pos = scanConflictMarkerTrivia(text, pos); + if (skipTrivia) { + continue; + } + else { + return token = SyntaxKind.ConflictMarkerTrivia; + } + } + if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) { + if (charCodeUnchecked(pos + 2) === CharacterCodes.equals) { + return pos += 3, token = SyntaxKind.EqualsEqualsEqualsToken; + } + return pos += 2, token = SyntaxKind.EqualsEqualsToken; + } + if (charCodeUnchecked(pos + 1) === CharacterCodes.greaterThan) { + return pos += 2, token = SyntaxKind.EqualsGreaterThanToken; + } + pos++; + return token = SyntaxKind.EqualsToken; + case CharacterCodes.greaterThan: + if (isConflictMarkerTrivia(text, pos)) { + pos = scanConflictMarkerTrivia(text, pos); + if (skipTrivia) { + continue; + } + else { + return token = SyntaxKind.ConflictMarkerTrivia; + } + } + pos++; + return token = SyntaxKind.GreaterThanToken; + case CharacterCodes.question: + if (charCodeUnchecked(pos + 1) === CharacterCodes.dot && !isDigit(charCodeUnchecked(pos + 2))) { + return pos += 2, token = SyntaxKind.QuestionDotToken; + } + if (charCodeUnchecked(pos + 1) === CharacterCodes.question) { + if (charCodeUnchecked(pos + 2) === CharacterCodes.equals) { + return pos += 3, token = SyntaxKind.QuestionQuestionEqualsToken; + } + return pos += 2, token = SyntaxKind.QuestionQuestionToken; + } + pos++; + return token = SyntaxKind.QuestionToken; + case CharacterCodes.openBracket: + pos++; + return token = SyntaxKind.OpenBracketToken; + case CharacterCodes.closeBracket: + pos++; + return token = SyntaxKind.CloseBracketToken; + case CharacterCodes.caret: + if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) { + return pos += 2, token = SyntaxKind.CaretEqualsToken; + } + pos++; + return token = SyntaxKind.CaretToken; + case CharacterCodes.openBrace: + pos++; + return token = SyntaxKind.OpenBraceToken; + case CharacterCodes.bar: + if (isConflictMarkerTrivia(text, pos)) { + pos = scanConflictMarkerTrivia(text, pos); + if (skipTrivia) { + continue; + } + else { + return token = SyntaxKind.ConflictMarkerTrivia; + } + } + if (charCodeUnchecked(pos + 1) === CharacterCodes.bar) { + if (charCodeUnchecked(pos + 2) === CharacterCodes.equals) { + return pos += 3, token = SyntaxKind.BarBarEqualsToken; + } + return pos += 2, token = SyntaxKind.BarBarToken; + } + if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) { + return pos += 2, token = SyntaxKind.BarEqualsToken; + } + pos++; + return token = SyntaxKind.BarToken; + case CharacterCodes.closeBrace: + pos++; + return token = SyntaxKind.CloseBraceToken; + case CharacterCodes.tilde: + pos++; + return token = SyntaxKind.TildeToken; + case CharacterCodes.at: + pos++; + return token = SyntaxKind.AtToken; + case CharacterCodes.backslash: { + const extendedCookedChar = peekExtendedUnicodeEscape(); + if (extendedCookedChar >= 0 && isIdentifierStart(extendedCookedChar)) { + tokenValue = scanExtendedUnicodeEscape() + scanIdentifierParts(); + return token = getIdentifierToken(); + } + const cookedChar = peekUnicodeEscape(); + if (cookedChar >= 0 && isIdentifierStart(cookedChar)) { + pos += 6; + tokenFlags |= TokenFlags.UnicodeEscape; + tokenValue = String.fromCharCode(cookedChar) + scanIdentifierParts(); + return token = getIdentifierToken(); + } + pos++; + return token = SyntaxKind.Unknown; + } + case CharacterCodes.hash: + if (pos !== 0 && text[pos + 1] === "!") { + pos++; + return token = SyntaxKind.Unknown; + } + { + const charAfterHash = codePointUnchecked(pos + 1); + if (charAfterHash === CharacterCodes.backslash) { + pos++; + const extendedCookedChar = peekExtendedUnicodeEscape(); + if (extendedCookedChar >= 0 && isIdentifierStart(extendedCookedChar)) { + tokenValue = "#" + scanExtendedUnicodeEscape() + scanIdentifierParts(); + return token = SyntaxKind.PrivateIdentifier; + } + const cookedChar = peekUnicodeEscape(); + if (cookedChar >= 0 && isIdentifierStart(cookedChar)) { + pos += 6; + tokenFlags |= TokenFlags.UnicodeEscape; + tokenValue = "#" + String.fromCharCode(cookedChar) + scanIdentifierParts(); + return token = SyntaxKind.PrivateIdentifier; + } + pos--; + } + if (isIdentifierStart(charAfterHash)) { + pos++; + scanIdentifier(charAfterHash); + } + else { + tokenValue = "#"; + } + return token = SyntaxKind.PrivateIdentifier; + } + case CharacterCodes.replacementCharacter: + pos = end; + return token = SyntaxKind.NonTextFileMarkerTrivia; + default: { + const identifierKind = scanIdentifier(ch); + if (identifierKind) { + return token = identifierKind; + } + else if (isWhiteSpaceSingleLine(ch)) { + pos += charSize(ch); + continue; + } + else if (isLineBreak(ch)) { + tokenFlags |= TokenFlags.PrecedingLineBreak; + pos += charSize(ch); + continue; + } + const size = charSize(ch); + pos += size; + return token = SyntaxKind.Unknown; + } + } + } + } + function reScanInvalidIdentifier() { + pos = tokenStart = fullStartPos; + tokenFlags = 0; + const ch = codePointUnchecked(pos); + const identifierKind = scanIdentifier(ch); + if (identifierKind) { + return token = identifierKind; + } + pos += charSize(ch); + return token; // Still `SyntaxKind.Unknown` + } + function scanIdentifier(startCharacter) { + let ch = startCharacter; + if (isIdentifierStart(ch)) { + pos += charSize(ch); + while (pos < end && isIdentifierPart(ch = codePointUnchecked(pos))) + pos += charSize(ch); + tokenValue = text.substring(tokenStart, pos); + if (ch === CharacterCodes.backslash) { + tokenValue += scanIdentifierParts(); + } + return getIdentifierToken(); + } + } + function reScanGreaterToken() { + if (token === SyntaxKind.GreaterThanToken) { + if (charCodeUnchecked(pos) === CharacterCodes.greaterThan) { + if (charCodeUnchecked(pos + 1) === CharacterCodes.greaterThan) { + if (charCodeUnchecked(pos + 2) === CharacterCodes.equals) { + return pos += 3, token = SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken; + } + return pos += 2, token = SyntaxKind.GreaterThanGreaterThanGreaterThanToken; + } + if (charCodeUnchecked(pos + 1) === CharacterCodes.equals) { + return pos += 2, token = SyntaxKind.GreaterThanGreaterThanEqualsToken; + } + pos++; + return token = SyntaxKind.GreaterThanGreaterThanToken; + } + if (charCodeUnchecked(pos) === CharacterCodes.equals) { + pos++; + return token = SyntaxKind.GreaterThanEqualsToken; + } + } + return token; + } + function reScanAsteriskEqualsToken() { + pos = tokenStart + 1; + return token = SyntaxKind.EqualsToken; + } + function reScanSlashToken() { + if (token === SyntaxKind.SlashToken || token === SyntaxKind.SlashEqualsToken) { + const startOfRegExpBody = tokenStart + 1; + pos = startOfRegExpBody; + let inEscape = false; + let inCharacterClass = false; + while (true) { + const ch = charCodeChecked(pos); + if (ch === CharacterCodes.EOF || isLineBreak(ch)) { + tokenFlags |= TokenFlags.Unterminated; + break; + } + if (inEscape) { + inEscape = false; + } + else if (ch === CharacterCodes.slash && !inCharacterClass) { + break; + } + else if (ch === CharacterCodes.openBracket) { + inCharacterClass = true; + } + else if (ch === CharacterCodes.backslash) { + inEscape = true; + } + else if (ch === CharacterCodes.closeBracket) { + inCharacterClass = false; + } + pos++; + } + if (tokenFlags & TokenFlags.Unterminated) { + // Find best recovery position + pos = startOfRegExpBody; + inEscape = false; + let characterClassDepth = 0; + let inDecimalQuantifier = false; + let groupDepth = 0; + while (pos < end && !isLineBreak(charCodeUnchecked(pos))) { + const ch = charCodeUnchecked(pos); + if (inEscape) { + inEscape = false; + } + else if (ch === CharacterCodes.backslash) { + inEscape = true; + } + else if (ch === CharacterCodes.openBracket) { + characterClassDepth++; + } + else if (ch === CharacterCodes.closeBracket && characterClassDepth) { + characterClassDepth--; + } + else if (!characterClassDepth) { + if (ch === CharacterCodes.openBrace) { + inDecimalQuantifier = true; + } + else if (ch === CharacterCodes.closeBrace && inDecimalQuantifier) { + inDecimalQuantifier = false; + } + else if (!inDecimalQuantifier) { + if (ch === CharacterCodes.openParen) { + groupDepth++; + } + else if (ch === CharacterCodes.closeParen && groupDepth) { + groupDepth--; + } + else if (ch === CharacterCodes.closeParen || ch === CharacterCodes.closeBracket || ch === CharacterCodes.closeBrace) { + break; + } + } + } + pos++; + } + while (isWhiteSpaceLike(charCodeChecked(pos - 1)) || charCodeChecked(pos - 1) === CharacterCodes.semicolon) + pos--; + } + else { + pos++; + let regExpFlags = RegularExpressionFlags.None; + while (true) { + const ch = codePointChecked(pos); + if (ch === CharacterCodes.EOF || !isIdentifierPart(ch)) { + break; + } + const size = charSize(ch); + const flag = characterCodeToRegularExpressionFlag(ch); + if (flag !== undefined) { + regExpFlags |= flag; + } + pos += size; + } + } + tokenValue = text.substring(tokenStart, pos); + token = SyntaxKind.RegularExpressionLiteral; + } + return token; + } + function appendIfCommentDirective(commentDirectives, text, commentDirectiveRegEx, lineStart) { + const type = getDirectiveFromComment(text.trimStart(), commentDirectiveRegEx); + if (type === undefined) { + return commentDirectives; + } + if (!commentDirectives) { + commentDirectives = []; + } + commentDirectives.push({ + range: { pos: lineStart, end: pos }, + type, + }); + return commentDirectives; + } + function getDirectiveFromComment(text, commentDirectiveRegEx) { + const match = commentDirectiveRegEx.exec(text); + if (!match) { + return undefined; + } + switch (match[1]) { + case "ts-expect-error": + return CommentDirectiveType.ExpectError; + case "ts-ignore": + return CommentDirectiveType.Ignore; + } + return undefined; + } + function reScanTemplateToken(isTaggedTemplate) { + pos = tokenStart; + return token = scanTemplateAndSetTokenValue(!isTaggedTemplate); + } + function reScanTemplateHeadOrNoSubstitutionTemplate() { + pos = tokenStart; + return token = scanTemplateAndSetTokenValue(/*shouldEmitInvalidEscapeError*/ true); + } + function reScanJsxToken(allowMultilineJsxText = true) { + pos = tokenStart = fullStartPos; + return token = scanJsxToken(allowMultilineJsxText); + } + function reScanLessThanToken() { + if (token === SyntaxKind.LessThanLessThanToken) { + pos = tokenStart + 1; + return token = SyntaxKind.LessThanToken; + } + return token; + } + function reScanHashToken() { + if (token === SyntaxKind.PrivateIdentifier) { + pos = tokenStart + 1; + return token = SyntaxKind.HashToken; + } + return token; + } + function reScanQuestionToken() { + pos = tokenStart + 1; + return token = SyntaxKind.QuestionToken; + } + function scanJsxToken(allowMultilineJsxText = true) { + fullStartPos = tokenStart = pos; + if (pos >= end) { + return token = SyntaxKind.EndOfFile; + } + let char = charCodeUnchecked(pos); + if (char === CharacterCodes.lessThan) { + if (charCodeUnchecked(pos + 1) === CharacterCodes.slash) { + pos += 2; + return token = SyntaxKind.LessThanSlashToken; + } + pos++; + return token = SyntaxKind.LessThanToken; + } + if (char === CharacterCodes.openBrace) { + pos++; + return token = SyntaxKind.OpenBraceToken; + } + let firstNonWhitespace = 0; + while (pos < end) { + char = charCodeUnchecked(pos); + if (char === CharacterCodes.openBrace) { + break; + } + if (char === CharacterCodes.lessThan) { + if (isConflictMarkerTrivia(text, pos)) { + pos = scanConflictMarkerTrivia(text, pos); + return token = SyntaxKind.ConflictMarkerTrivia; + } + break; + } + if (isLineBreak(char) && firstNonWhitespace === 0) { + firstNonWhitespace = -1; + } + else if (!allowMultilineJsxText && isLineBreak(char) && firstNonWhitespace > 0) { + break; + } + else if (!isWhiteSpaceLike(char)) { + firstNonWhitespace = pos; + } + pos++; + } + tokenValue = text.substring(fullStartPos, pos); + return firstNonWhitespace === -1 ? SyntaxKind.JsxTextAllWhiteSpaces : SyntaxKind.JsxText; + } + function scanJsxIdentifier() { + if (tokenIsIdentifierOrKeyword(token)) { + while (pos < end) { + const ch = charCodeUnchecked(pos); + if (ch === CharacterCodes.minus) { + tokenValue += "-"; + pos++; + continue; + } + const oldPos = pos; + tokenValue += scanIdentifierParts(); + if (pos === oldPos) { + break; + } + } + return getIdentifierToken(); + } + return token; + } + function scanJsxAttributeValue() { + fullStartPos = pos; + switch (charCodeUnchecked(pos)) { + case CharacterCodes.doubleQuote: + case CharacterCodes.singleQuote: + tokenValue = scanString(/*jsxAttributeString*/ true); + return token = SyntaxKind.StringLiteral; + default: + return scan(); + } + } + function reScanJsxAttributeValue() { + pos = tokenStart = fullStartPos; + return scanJsxAttributeValue(); + } + function scanJSDocCommentTextToken(inBackticks) { + fullStartPos = tokenStart = pos; + tokenFlags = TokenFlags.None; + if (pos >= end) { + return token = SyntaxKind.EndOfFile; + } + for (let ch = charCodeUnchecked(pos); pos < end && (!isLineBreak(ch) && ch !== CharacterCodes.backtick); ch = codePointUnchecked(++pos)) { + if (!inBackticks) { + if (ch === CharacterCodes.openBrace) { + break; + } + else if (ch === CharacterCodes.at + && pos - 1 >= 0 && isWhiteSpaceSingleLine(charCodeUnchecked(pos - 1)) + && pos + 1 < end && isIdentifierStart(charCodeUnchecked(pos + 1))) { + break; + } + } + } + if (pos === tokenStart) { + return scanJsDocToken(); + } + tokenValue = text.substring(tokenStart, pos); + return token = SyntaxKind.JSDocCommentTextToken; + } + function scanJsDocToken() { + fullStartPos = tokenStart = pos; + tokenFlags = TokenFlags.None; + if (pos >= end) { + return token = SyntaxKind.EndOfFile; + } + const ch = codePointUnchecked(pos); + pos += charSize(ch); + switch (ch) { + case CharacterCodes.tab: + case CharacterCodes.verticalTab: + case CharacterCodes.formFeed: + case CharacterCodes.space: + while (pos < end && isWhiteSpaceSingleLine(charCodeUnchecked(pos))) { + pos++; + } + return token = SyntaxKind.WhitespaceTrivia; + case CharacterCodes.at: + return token = SyntaxKind.AtToken; + case CharacterCodes.carriageReturn: + if (charCodeUnchecked(pos) === CharacterCodes.lineFeed) { + pos++; + } + // falls through + case CharacterCodes.lineFeed: + tokenFlags |= TokenFlags.PrecedingLineBreak; + return token = SyntaxKind.NewLineTrivia; + case CharacterCodes.asterisk: + return token = SyntaxKind.AsteriskToken; + case CharacterCodes.openBrace: + return token = SyntaxKind.OpenBraceToken; + case CharacterCodes.closeBrace: + return token = SyntaxKind.CloseBraceToken; + case CharacterCodes.openBracket: + return token = SyntaxKind.OpenBracketToken; + case CharacterCodes.closeBracket: + return token = SyntaxKind.CloseBracketToken; + case CharacterCodes.openParen: + return token = SyntaxKind.OpenParenToken; + case CharacterCodes.closeParen: + return token = SyntaxKind.CloseParenToken; + case CharacterCodes.lessThan: + return token = SyntaxKind.LessThanToken; + case CharacterCodes.greaterThan: + return token = SyntaxKind.GreaterThanToken; + case CharacterCodes.equals: + return token = SyntaxKind.EqualsToken; + case CharacterCodes.comma: + return token = SyntaxKind.CommaToken; + case CharacterCodes.dot: + return token = SyntaxKind.DotToken; + case CharacterCodes.backtick: + return token = SyntaxKind.BacktickToken; + case CharacterCodes.hash: + return token = SyntaxKind.HashToken; + case CharacterCodes.backslash: + pos--; + { + const extendedCookedChar = peekExtendedUnicodeEscape(); + if (extendedCookedChar >= 0 && isIdentifierStart(extendedCookedChar)) { + tokenValue = scanExtendedUnicodeEscape() + scanIdentifierParts(); + return token = getIdentifierToken(); + } + const cookedChar = peekUnicodeEscape(); + if (cookedChar >= 0 && isIdentifierStart(cookedChar)) { + pos += 6; + tokenFlags |= TokenFlags.UnicodeEscape; + tokenValue = String.fromCharCode(cookedChar) + scanIdentifierParts(); + return token = getIdentifierToken(); + } + } + pos++; + return token = SyntaxKind.Unknown; + } + if (isIdentifierStart(ch)) { + let char = ch; + while (pos < end && isIdentifierPart(char = codePointUnchecked(pos)) || char === CharacterCodes.minus) + pos += charSize(char); + tokenValue = text.substring(tokenStart, pos); + if (char === CharacterCodes.backslash) { + tokenValue += scanIdentifierParts(); + } + return token = getIdentifierToken(); + } + else { + return token = SyntaxKind.Unknown; + } + } + function speculationHelper(callback, isLookahead) { + const savePos = pos; + const saveStartPos = fullStartPos; + const saveTokenPos = tokenStart; + const saveToken = token; + const saveTokenValue = tokenValue; + const saveTokenFlags = tokenFlags; + const result = callback(); + if (!result || isLookahead) { + pos = savePos; + fullStartPos = saveStartPos; + tokenStart = saveTokenPos; + token = saveToken; + tokenValue = saveTokenValue; + tokenFlags = saveTokenFlags; + } + return result; + } + function scanRange(start, length, callback) { + const saveEnd = end; + const savePos = pos; + const saveStartPos = fullStartPos; + const saveTokenPos = tokenStart; + const saveToken = token; + const saveTokenValue = tokenValue; + const saveTokenFlags = tokenFlags; + const saveErrorExpectations = commentDirectives; + setText(text, start, length); + const result = callback(); + end = saveEnd; + pos = savePos; + fullStartPos = saveStartPos; + tokenStart = saveTokenPos; + token = saveToken; + tokenValue = saveTokenValue; + tokenFlags = saveTokenFlags; + commentDirectives = saveErrorExpectations; + return result; + } + function lookAhead(callback) { + return speculationHelper(callback, /*isLookahead*/ true); + } + function tryScan(callback) { + return speculationHelper(callback, /*isLookahead*/ false); + } + function getText() { + return text; + } + function clearCommentDirectives() { + commentDirectives = undefined; + } + function setText(newText, start, length) { + text = newText || ""; + end = length === undefined ? text.length : start + length; + resetTokenState(start || 0); + } + function setLanguageVariant(variant) { + languageVariant = variant; + } + function resetTokenState(position) { + pos = position; + fullStartPos = position; + tokenStart = position; + token = SyntaxKind.Unknown; + tokenValue = undefined; + tokenFlags = TokenFlags.None; + } + function setSkipJsDocLeadingAsterisks(skip) { + skipJsDocLeadingAsterisks += skip ? 1 : -1; + } +} +//# sourceMappingURL=scanner.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/scanner.js.map b/node_modules/typescript/dist/ast/scanner.js.map new file mode 100644 index 0000000..cbb1999 --- /dev/null +++ b/node_modules/typescript/dist/ast/scanner.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scanner.js","sourceRoot":"","sources":["../../src/ast/scanner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAa/C,8BAA8B;AAC9B,MAAM,2BAA2B,GAAG;IAChC,MAAM,EAAE,CAAC,IAAI,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,CAAC;IACpB,iBAAiB,EAAE,CAAC,IAAI,CAAC;IACzB,MAAM,EAAE,CAAC,IAAI,CAAC;IACd,cAAc,EAAE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CAAC,OAAO,CAAC;QAC3B,UAAU,GAAG,SAAU,CAAC;QACxB,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC;IACjC,CAAC;IAED,SAAS,4BAA4B,CAAC,IAAa;QAC/C,yBAAyB,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/C,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/utils.d.ts b/node_modules/typescript/dist/ast/utils.d.ts new file mode 100644 index 0000000..75e4cab --- /dev/null +++ b/node_modules/typescript/dist/ast/utils.d.ts @@ -0,0 +1,17 @@ +import { SyntaxKind } from "#enums/syntaxKind"; +import type { __String, SourceFile } from "./ast.ts"; +export declare function formatSyntaxKind(kind: SyntaxKind): string; +/** + * Remove one extra leading underscore from an identifier name, recovering the + * display form from its escaped {@link __String} key. + */ +export declare function unescapeLeadingUnderscores(identifier: __String): string; +/** + * Add an extra leading underscore to a display name that already begins with + * `__`, producing its escaped {@link __String} key. + */ +export declare function escapeLeadingUnderscores(identifier: string): __String; +export declare function tryCast(value: TIn | undefined, test: (value: TIn) => value is TOut): TOut | undefined; +export declare function cast(value: TIn | undefined, test: (value: TIn) => value is TOut): TOut; +export declare function cloneSourceFileData(sourceFile: SourceFile): Record; +//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/utils.d.ts.map b/node_modules/typescript/dist/ast/utils.d.ts.map new file mode 100644 index 0000000..875319b --- /dev/null +++ b/node_modules/typescript/dist/ast/utils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/ast/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EACR,QAAQ,EACR,UAAU,EACb,MAAM,UAAU,CAAC;AAiBlB,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAEzD;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,QAAQ,GAAG,MAAM,CAKvE;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,GAAG,QAAQ,CAIrE;AAED,wBAAgB,OAAO,CAAC,IAAI,SAAS,GAAG,EAAE,GAAG,GAAG,GAAG,EAAE,KAAK,EAAE,GAAG,GAAG,SAAS,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,KAAK,IAAI,IAAI,GAAG,IAAI,GAAG,SAAS,CAElI;AAED,wBAAgB,IAAI,CAAC,IAAI,SAAS,GAAG,EAAE,GAAG,GAAG,GAAG,EAAE,KAAK,EAAE,GAAG,GAAG,SAAS,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,KAAK,IAAI,IAAI,GAAG,IAAI,CAInH;AAED,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAmBnF"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/utils.js b/node_modules/typescript/dist/ast/utils.js new file mode 100644 index 0000000..e0bd1ea --- /dev/null +++ b/node_modules/typescript/dist/ast/utils.js @@ -0,0 +1,67 @@ +import { CharacterCodes } from "#enums/characterCodes"; +import { SyntaxKind } from "#enums/syntaxKind"; +let syntaxKindNames; +function getSyntaxKindNames() { + if (!syntaxKindNames) { + syntaxKindNames = new Map(); + for (const name of Object.keys(SyntaxKind)) { + const val = SyntaxKind[name]; + if (typeof val === "number" && !syntaxKindNames.has(val)) { + syntaxKindNames.set(val, name); + } + } + syntaxKindNames.set(SyntaxKind.EndOfFile, "EndOfFileToken"); + } + return syntaxKindNames; +} +export function formatSyntaxKind(kind) { + return getSyntaxKindNames().get(kind) ?? `Unknown(${kind})`; +} +/** + * Remove one extra leading underscore from an identifier name, recovering the + * display form from its escaped {@link __String} key. + */ +export function unescapeLeadingUnderscores(identifier) { + const id = identifier; + return id.length >= 3 && id.charCodeAt(0) === CharacterCodes._ && id.charCodeAt(1) === CharacterCodes._ && id.charCodeAt(2) === CharacterCodes._ + ? id.slice(1) + : id; +} +/** + * Add an extra leading underscore to a display name that already begins with + * `__`, producing its escaped {@link __String} key. + */ +export function escapeLeadingUnderscores(identifier) { + return (identifier.length >= 2 && identifier.charCodeAt(0) === CharacterCodes._ && identifier.charCodeAt(1) === CharacterCodes._ + ? "_" + identifier + : identifier); +} +export function tryCast(value, test) { + return value !== undefined && test(value) ? value : undefined; +} +export function cast(value, test) { + if (value !== undefined && test(value)) + return value; + throw new Error(`Invalid cast. The supplied value ${value} did not pass the test '${test.name}'.`); +} +export function cloneSourceFileData(sourceFile) { + return { + statements: sourceFile.statements, + endOfFileToken: sourceFile.endOfFileToken, + text: sourceFile.text, + fileName: sourceFile.fileName, + path: sourceFile.path, + languageVariant: sourceFile.languageVariant, + scriptKind: sourceFile.scriptKind, + isDeclarationFile: sourceFile.isDeclarationFile, + referencedFiles: sourceFile.referencedFiles, + typeReferenceDirectives: sourceFile.typeReferenceDirectives, + libReferenceDirectives: sourceFile.libReferenceDirectives, + imports: sourceFile.imports, + moduleAugmentations: sourceFile.moduleAugmentations, + ambientModuleNames: sourceFile.ambientModuleNames, + externalModuleIndicator: sourceFile.externalModuleIndicator, + tokenCache: undefined, + }; +} +//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/utils.js.map b/node_modules/typescript/dist/ast/utils.js.map new file mode 100644 index 0000000..0206293 --- /dev/null +++ b/node_modules/typescript/dist/ast/utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/ast/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAM/C,IAAI,eAAgD,CAAC;AACrD,SAAS,kBAAkB;I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S;KACxB,CAAC;AACN,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/visitor.d.ts b/node_modules/typescript/dist/ast/visitor.d.ts new file mode 100644 index 0000000..4f8f351 --- /dev/null +++ b/node_modules/typescript/dist/ast/visitor.d.ts @@ -0,0 +1,14 @@ +/** + * Hand-written visitor implementations for nodes with runtime-dependent + * child ordering. Generated code in visitor.generated.ts and factory.generated.ts + * delegates to these functions. + */ +import type { JSDocParameterOrPropertyTag, Node, NodeArray } from "./ast.ts"; +import type { Visitor } from "./visitor.generated.ts"; +export type { Visitor }; +export { visitEachChild, visitNode, visitNodes, visitNodesArray } from "./visitor.generated.ts"; +declare function forEachChildOfJSDocParameterOrPropertyTag(data: any, cbNode: (node: Node) => T, cbNodes: ((nodes: NodeArray) => T) | undefined): T | undefined; +export { forEachChildOfJSDocParameterOrPropertyTag as forEachChildOfJSDocParameterTag, forEachChildOfJSDocParameterOrPropertyTag as forEachChildOfJSDocPropertyTag }; +declare function visitEachChildOfJSDocParameterOrPropertyTag(node: JSDocParameterOrPropertyTag, visitor: Visitor): JSDocParameterOrPropertyTag; +export { visitEachChildOfJSDocParameterOrPropertyTag as visitEachChildOfJSDocParameterTag, visitEachChildOfJSDocParameterOrPropertyTag as visitEachChildOfJSDocPropertyTag }; +//# sourceMappingURL=visitor.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/visitor.d.ts.map b/node_modules/typescript/dist/ast/visitor.d.ts.map new file mode 100644 index 0000000..05cba32 --- /dev/null +++ b/node_modules/typescript/dist/ast/visitor.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"visitor.d.ts","sourceRoot":"","sources":["../../src/ast/visitor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAER,2BAA2B,EAG3B,IAAI,EACJ,SAAS,EACZ,MAAM,UAAU,CAAC;AAUlB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAMtD,YAAY,EAAE,OAAO,EAAE,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAoBhG,iBAAS,yCAAyC,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,SAAS,GAAG,CAAC,GAAG,SAAS,CAM/J;AAED,OAAO,EAAE,yCAAyC,IAAI,+BAA+B,EAAE,yCAAyC,IAAI,8BAA8B,EAAE,CAAC;AAIrK,iBAAS,2CAA2C,CAAC,IAAI,EAAE,2BAA2B,EAAE,OAAO,EAAE,OAAO,GAAG,2BAA2B,CAQrI;AAED,OAAO,EAAE,2CAA2C,IAAI,iCAAiC,EAAE,2CAA2C,IAAI,gCAAgC,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/visitor.generated.d.ts b/node_modules/typescript/dist/ast/visitor.generated.d.ts new file mode 100644 index 0000000..67313e5 --- /dev/null +++ b/node_modules/typescript/dist/ast/visitor.generated.d.ts @@ -0,0 +1,50 @@ +import type { Node, NodeArray } from "./ast.ts"; +/** + * A callback that receives a node and returns a visited node (or undefined to remove it). + */ +export type Visitor = (node: Node) => Node | undefined; +/** + * Visits a Node using the supplied visitor, possibly returning a new Node in its place. + * + * - If the input node is undefined, then the output is undefined. + * - If the visitor returns undefined, then the output is undefined. + * - If the output node is not undefined, then it will satisfy the test function. + * - In order to obtain a return type that is more specific than `Node`, a test + * function must be provided, and that function must be a type predicate. + * + * @param node The Node to visit. + * @param visitor The callback used to visit the Node. + * @param test A callback to execute to verify the Node is valid. + */ +export declare function visitNode(node: TIn, visitor: Visitor, test: (node: Node) => node is TOut): TOut | (TIn & undefined); +/** + * Visits a Node using the supplied visitor, possibly returning a new Node in its place. + * + * - If the input node is undefined, then the output is undefined. + * - If the visitor returns undefined, then the output is undefined. + * + * @param node The Node to visit. + * @param visitor The callback used to visit the Node. + * @param test An optional callback to execute to verify the Node is valid. + */ +export declare function visitNode(node: TIn, visitor: Visitor, test?: (node: Node) => boolean): Node | (TIn & undefined); +/** + * Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place. + * + * - If the input node array is undefined, the output is undefined. + * - If the visitor returns undefined for a node, that node is dropped from the result. + */ +export declare function visitNodes(nodes: NodeArray, visitor: Visitor): NodeArray; +export declare function visitNodes(nodes: NodeArray | undefined, visitor: Visitor): NodeArray | undefined; +export declare function visitNodesArray(nodes: readonly T[], visitor: Visitor): readonly T[]; +export declare function visitNodesArray(nodes: readonly T[] | undefined, visitor: Visitor): readonly T[] | undefined; +/** + * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place. + * + * @param node The Node whose children will be visited. + * @param visitor The callback used to visit each child. + * @returns The original node if no children changed, or a new node with visited children. + */ +export declare function visitEachChild(node: T, visitor: Visitor): T; +export declare function visitEachChild(node: T | undefined, visitor: Visitor): T | undefined; +//# sourceMappingURL=visitor.generated.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/visitor.generated.d.ts.map b/node_modules/typescript/dist/ast/visitor.generated.d.ts.map new file mode 100644 index 0000000..d7f4d44 --- /dev/null +++ b/node_modules/typescript/dist/ast/visitor.generated.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"visitor.generated.d.ts","sourceRoot":"","sources":["../../src/ast/visitor.generated.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAwHR,IAAI,EACJ,SAAS,EAqDZ,MAAM,UAAU,CAAC;AA4OlB;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,GAAG,SAAS,CAAC;AAEvD;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,GAAG,SAAS,IAAI,GAAG,SAAS,EAAE,IAAI,SAAS,I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E,CAAC,GAAG,SAAS,EAAE,OAAO,EAAE,OAAO,GAAG,CAAC,GAAG,SAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/visitor.generated.js b/node_modules/typescript/dist/ast/visitor.generated.js new file mode 100644 index 0000000..ad6528f --- /dev/null +++ b/node_modules/typescript/dist/ast/visitor.generated.js @@ -0,0 +1,978 @@ +// Code generated by _scripts/generate-ts-ast.ts. DO NOT EDIT. +import { SyntaxKind } from "#enums/syntaxKind"; +import { createNodeArray, updateArrayBindingPattern, updateArrayLiteralExpression, updateArrayTypeNode, updateArrowFunction, updateAsExpression, updateAwaitExpression, updateBinaryExpression, updateBindingElement, updateBlock, updateBreakStatement, updateCallExpression, updateCallSignatureDeclaration, updateCaseBlock, updateCaseClause, updateCatchClause, updateClassDeclaration, updateClassExpression, updateClassStaticBlockDeclaration, updateComputedPropertyName, updateConditionalExpression, updateConditionalTypeNode, updateConstructorDeclaration, updateConstructorTypeNode, updateConstructSignatureDeclaration, updateContinueStatement, updateDecorator, updateDefaultClause, updateDeleteExpression, updateDoStatement, updateElementAccessExpression, updateEnumDeclaration, updateEnumMember, updateExportAssignment, updateExportDeclaration, updateExportSpecifier, updateExpressionStatement, updateExpressionWithTypeArguments, updateExternalModuleReference, updateForInStatement, updateForOfStatement, updateForStatement, updateFunctionDeclaration, updateFunctionExpression, updateFunctionTypeNode, updateGetAccessorDeclaration, updateHeritageClause, updateIfStatement, updateImportAttribute, updateImportAttributes, updateImportClause, updateImportDeclaration, updateImportEqualsDeclaration, updateImportSpecifier, updateImportTypeNode, updateIndexedAccessTypeNode, updateIndexSignatureDeclaration, updateInferTypeNode, updateInterfaceDeclaration, updateIntersectionTypeNode, updateJSDoc, updateJSDocAugmentsTag, updateJSDocCallbackTag, updateJSDocDeprecatedTag, updateJSDocImplementsTag, updateJSDocImportTag, updateJSDocLink, updateJSDocLinkCode, updateJSDocLinkPlain, updateJSDocNameReference, updateJSDocNonNullableType, updateJSDocNullableType, updateJSDocOptionalType, updateJSDocOverloadTag, updateJSDocOverrideTag, updateJSDocPrivateTag, updateJSDocProtectedTag, updateJSDocPublicTag, updateJSDocReadonlyTag, updateJSDocReturnTag, updateJSDocSatisfiesTag, updateJSDocSeeTag, updateJSDocSignature, updateJSDocTemplateTag, updateJSDocThisTag, updateJSDocThrowsTag, updateJSDocTypedefTag, updateJSDocTypeExpression, updateJSDocTypeLiteral, updateJSDocTypeTag, updateJSDocUnknownTag, updateJSDocVariadicType, updateJsxAttribute, updateJsxAttributes, updateJsxClosingElement, updateJsxElement, updateJsxExpression, updateJsxFragment, updateJsxNamespacedName, updateJsxOpeningElement, updateJsxSelfClosingElement, updateJsxSpreadAttribute, updateLabeledStatement, updateLiteralTypeNode, updateMappedTypeNode, updateMetaProperty, updateMethodDeclaration, updateMethodSignatureDeclaration, updateMissingDeclaration, updateModuleBlock, updateModuleDeclaration, updateNamedExports, updateNamedImports, updateNamedTupleMember, updateNamespaceExport, updateNamespaceExportDeclaration, updateNamespaceImport, updateNewExpression, updateNonNullExpression, updateObjectBindingPattern, updateObjectLiteralExpression, updateOptionalTypeNode, updateParameterDeclaration, updateParenthesizedExpression, updateParenthesizedTypeNode, updatePartiallyEmittedExpression, updatePostfixUnaryExpression, updatePrefixUnaryExpression, updatePropertyAccessExpression, updatePropertyAssignment, updatePropertyDeclaration, updatePropertySignatureDeclaration, updateQualifiedName, updateRestTypeNode, updateReturnStatement, updateSatisfiesExpression, updateSetAccessorDeclaration, updateShorthandPropertyAssignment, updateSourceFile, updateSpreadAssignment, updateSpreadElement, updateSwitchStatement, updateSyntaxList, updateSyntheticExpression, updateSyntheticReferenceExpression, updateTaggedTemplateExpression, updateTemplateExpression, updateTemplateLiteralTypeNode, updateTemplateLiteralTypeSpan, updateTemplateSpan, updateThrowStatement, updateTryStatement, updateTupleTypeNode, updateTypeAliasDeclaration, updateTypeAssertion, updateTypeLiteralNode, updateTypeOfExpression, updateTypeOperatorNode, updateTypeParameterDeclaration, updateTypePredicateNode, updateTypeQueryNode, updateTypeReferenceNode, updateUnionTypeNode, updateVariableDeclaration, updateVariableDeclarationList, updateVariableStatement, updateVoidExpression, updateWhileStatement, updateWithStatement, updateYieldExpression, } from "./factory.generated.js"; +import { isAssertsKeyword, isAsteriskToken, isAwaitKeyword, isBinaryOperatorToken, isBindingName, isBlock, isCaseBlock, isCatchClause, isColonToken, isConciseBody, isDotDotDotToken, isEndOfFile, isEntityName, isEqualsGreaterThanToken, isEqualsToken, isExclamationToken, isExpression, isExpressionWithTypeArguments, isForInitializer, isFunctionBody, isIdentifier, isImportAttributeName, isImportAttributes, isImportClause, isJSDocFullName, isJsxAttributeName, isJsxAttributes, isJsxAttributeValue, isJsxClosingElement, isJsxClosingFragment, isJsxOpeningElement, isJsxOpeningFragment, isJsxTagNameExpression, isLeftHandSideExpression, isMemberName, isModuleBody, isModuleExportName, isModuleName, isModuleReference, isNamedExportBindings, isNamedImportBindings, isPropertyName, isQuestionDotToken, isQuestionOrExclamationToken, isQuestionOrPlusOrMinusToken, isQuestionToken, isReadonlyKeywordOrPlusOrMinusToken, isStatement, isTemplateHead, isTemplateLiteral, isTemplateMiddleOrTail, isTypeNode, isTypeParameterDeclaration, isTypePredicateParameterName, isVariableDeclaration, isVariableDeclarationList, } from "./is.js"; +import { visitEachChildOfJSDocParameterTag, visitEachChildOfJSDocPropertyTag, } from "./visitor.js"; +export function visitNode(node, visitor, test) { + if (node === undefined) + return undefined; + const visited = visitor(node); + if (visited !== undefined && test !== undefined && !test(visited)) { + throw new Error("Visited node failed test assertion."); + } + return visited; +} +export function visitNodes(nodes, visitor) { + if (nodes === undefined) + return undefined; + const updated = visitNodesArray(nodes, visitor); + if (updated === nodes) { + return nodes; + } + return createNodeArray(updated, nodes.pos, nodes.end); +} +export function visitNodesArray(nodes, visitor) { + if (nodes === undefined) + return undefined; + let updated; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + const visited = visitor(node); + if (updated) { + if (visited) + updated.push(visited); + } + else if (visited !== node) { + updated = []; + for (let j = 0; j < i; j++) + updated.push(nodes[j]); + if (visited) + updated.push(visited); + } + } + return updated ?? nodes; +} +export function visitEachChild(node, visitor) { + if (node === undefined) + return undefined; + const fn = visitEachChildTable[node.kind]; + return fn ? fn(node, visitor) : node; +} +const visitEachChildTable = { + [SyntaxKind.QualifiedName]: (node, visitor) => { + const _left = visitNode(node.left, visitor, isEntityName); + const _right = visitNode(node.right, visitor, isIdentifier); + return updateQualifiedName(node, _left, _right); + }, + [SyntaxKind.ComputedPropertyName]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + return updateComputedPropertyName(node, _expression); + }, + [SyntaxKind.Decorator]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isLeftHandSideExpression); + return updateDecorator(node, _expression); + }, + [SyntaxKind.IfStatement]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + const _thenStatement = visitNode(node.thenStatement, visitor, isStatement); + const _elseStatement = visitNode(node.elseStatement, visitor, isStatement); + return updateIfStatement(node, _expression, _thenStatement, _elseStatement); + }, + [SyntaxKind.DoStatement]: (node, visitor) => { + const _statement = visitNode(node.statement, visitor, isStatement); + const _expression = visitNode(node.expression, visitor, isExpression); + return updateDoStatement(node, _statement, _expression); + }, + [SyntaxKind.WhileStatement]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + const _statement = visitNode(node.statement, visitor, isStatement); + return updateWhileStatement(node, _expression, _statement); + }, + [SyntaxKind.ForStatement]: (node, visitor) => { + const _initializer = visitNode(node.initializer, visitor, isForInitializer); + const _condition = visitNode(node.condition, visitor, isExpression); + const _incrementor = visitNode(node.incrementor, visitor, isExpression); + const _statement = visitNode(node.statement, visitor, isStatement); + return updateForStatement(node, _initializer, _condition, _incrementor, _statement); + }, + [SyntaxKind.BreakStatement]: (node, visitor) => { + const _label = visitNode(node.label, visitor, isIdentifier); + return updateBreakStatement(node, _label); + }, + [SyntaxKind.ContinueStatement]: (node, visitor) => { + const _label = visitNode(node.label, visitor, isIdentifier); + return updateContinueStatement(node, _label); + }, + [SyntaxKind.ReturnStatement]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + return updateReturnStatement(node, _expression); + }, + [SyntaxKind.WithStatement]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + const _statement = visitNode(node.statement, visitor, isStatement); + return updateWithStatement(node, _expression, _statement); + }, + [SyntaxKind.SwitchStatement]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + const _caseBlock = visitNode(node.caseBlock, visitor, isCaseBlock); + return updateSwitchStatement(node, _expression, _caseBlock); + }, + [SyntaxKind.CaseBlock]: (node, visitor) => { + const _clauses = visitNodes(node.clauses, visitor); + return updateCaseBlock(node, _clauses); + }, + [SyntaxKind.ThrowStatement]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + return updateThrowStatement(node, _expression); + }, + [SyntaxKind.TryStatement]: (node, visitor) => { + const _tryBlock = visitNode(node.tryBlock, visitor, isBlock); + const _catchClause = visitNode(node.catchClause, visitor, isCatchClause); + const _finallyBlock = visitNode(node.finallyBlock, visitor, isBlock); + return updateTryStatement(node, _tryBlock, _catchClause, _finallyBlock); + }, + [SyntaxKind.CatchClause]: (node, visitor) => { + const _variableDeclaration = visitNode(node.variableDeclaration, visitor, isVariableDeclaration); + const _block = visitNode(node.block, visitor, isBlock); + return updateCatchClause(node, _variableDeclaration, _block); + }, + [SyntaxKind.LabeledStatement]: (node, visitor) => { + const _label = visitNode(node.label, visitor, isIdentifier); + const _statement = visitNode(node.statement, visitor, isStatement); + return updateLabeledStatement(node, _label, _statement); + }, + [SyntaxKind.ExpressionStatement]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + return updateExpressionStatement(node, _expression); + }, + [SyntaxKind.Block]: (node, visitor) => { + const _statements = visitNodes(node.statements, visitor); + return updateBlock(node, _statements); + }, + [SyntaxKind.VariableStatement]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _declarationList = visitNode(node.declarationList, visitor, isVariableDeclarationList); + return updateVariableStatement(node, _modifiers, _declarationList); + }, + [SyntaxKind.VariableDeclaration]: (node, visitor) => { + const _name = visitNode(node.name, visitor, isBindingName); + const _exclamationToken = visitNode(node.exclamationToken, visitor, isExclamationToken); + const _type = visitNode(node.type, visitor, isTypeNode); + const _initializer = visitNode(node.initializer, visitor, isExpression); + return updateVariableDeclaration(node, _name, _exclamationToken, _type, _initializer); + }, + [SyntaxKind.VariableDeclarationList]: (node, visitor) => { + const _declarations = visitNodes(node.declarations, visitor); + return updateVariableDeclarationList(node, _declarations); + }, + [SyntaxKind.Parameter]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _dotDotDotToken = visitNode(node.dotDotDotToken, visitor, isDotDotDotToken); + const _name = visitNode(node.name, visitor, isBindingName); + const _questionToken = visitNode(node.questionToken, visitor, isQuestionToken); + const _type = visitNode(node.type, visitor, isTypeNode); + const _initializer = visitNode(node.initializer, visitor, isExpression); + return updateParameterDeclaration(node, _modifiers, _dotDotDotToken, _name, _questionToken, _type, _initializer); + }, + [SyntaxKind.BindingElement]: (node, visitor) => { + const _dotDotDotToken = visitNode(node.dotDotDotToken, visitor, isDotDotDotToken); + const _propertyName = visitNode(node.propertyName, visitor, isPropertyName); + const _name = visitNode(node.name, visitor, isBindingName); + const _initializer = visitNode(node.initializer, visitor, isExpression); + return updateBindingElement(node, _dotDotDotToken, _propertyName, _name, _initializer); + }, + [SyntaxKind.MissingDeclaration]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + return updateMissingDeclaration(node, _modifiers); + }, + [SyntaxKind.FunctionDeclaration]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _asteriskToken = visitNode(node.asteriskToken, visitor, isAsteriskToken); + const _name = visitNode(node.name, visitor, isIdentifier); + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _parameters = visitNodes(node.parameters, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + const _body = visitNode(node.body, visitor, isFunctionBody); + return updateFunctionDeclaration(node, _modifiers, _asteriskToken, _name, _typeParameters, _parameters, _type, _body); + }, + [SyntaxKind.ClassDeclaration]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isIdentifier); + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _heritageClauses = visitNodes(node.heritageClauses, visitor); + const _members = visitNodes(node.members, visitor); + return updateClassDeclaration(node, _modifiers, _name, _typeParameters, _heritageClauses, _members); + }, + [SyntaxKind.ClassExpression]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isIdentifier); + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _heritageClauses = visitNodes(node.heritageClauses, visitor); + const _members = visitNodes(node.members, visitor); + return updateClassExpression(node, _modifiers, _name, _typeParameters, _heritageClauses, _members); + }, + [SyntaxKind.HeritageClause]: (node, visitor) => { + const _types = visitNodes(node.types, visitor); + return updateHeritageClause(node, _types); + }, + [SyntaxKind.InterfaceDeclaration]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isIdentifier); + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _heritageClauses = visitNodes(node.heritageClauses, visitor); + const _members = visitNodes(node.members, visitor); + return updateInterfaceDeclaration(node, _modifiers, _name, _typeParameters, _heritageClauses, _members); + }, + [SyntaxKind.TypeAliasDeclaration]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isIdentifier); + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + return updateTypeAliasDeclaration(node, _modifiers, _name, _typeParameters, _type); + }, + [SyntaxKind.EnumMember]: (node, visitor) => { + const _name = visitNode(node.name, visitor, isPropertyName); + const _initializer = visitNode(node.initializer, visitor, isExpression); + return updateEnumMember(node, _name, _initializer); + }, + [SyntaxKind.EnumDeclaration]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isIdentifier); + const _members = visitNodes(node.members, visitor); + return updateEnumDeclaration(node, _modifiers, _name, _members); + }, + [SyntaxKind.ModuleBlock]: (node, visitor) => { + const _statements = visitNodes(node.statements, visitor); + return updateModuleBlock(node, _statements); + }, + [SyntaxKind.ImportDeclaration]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _importClause = visitNode(node.importClause, visitor, isImportClause); + const _moduleSpecifier = visitNode(node.moduleSpecifier, visitor, isExpression); + const _attributes = visitNode(node.attributes, visitor, isImportAttributes); + return updateImportDeclaration(node, _modifiers, _importClause, _moduleSpecifier, _attributes); + }, + [SyntaxKind.ExternalModuleReference]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + return updateExternalModuleReference(node, _expression); + }, + [SyntaxKind.NamespaceImport]: (node, visitor) => { + const _name = visitNode(node.name, visitor, isIdentifier); + return updateNamespaceImport(node, _name); + }, + [SyntaxKind.NamedImports]: (node, visitor) => { + const _elements = visitNodes(node.elements, visitor); + return updateNamedImports(node, _elements); + }, + [SyntaxKind.ExportAssignment]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + const _expression = visitNode(node.expression, visitor, isExpression); + return updateExportAssignment(node, _modifiers, _type, _expression); + }, + [SyntaxKind.NamespaceExportDeclaration]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isIdentifier); + return updateNamespaceExportDeclaration(node, _modifiers, _name); + }, + [SyntaxKind.NamespaceExport]: (node, visitor) => { + const _name = visitNode(node.name, visitor, isModuleExportName); + return updateNamespaceExport(node, _name); + }, + [SyntaxKind.NamedExports]: (node, visitor) => { + const _elements = visitNodes(node.elements, visitor); + return updateNamedExports(node, _elements); + }, + [SyntaxKind.ExportSpecifier]: (node, visitor) => { + const _propertyName = visitNode(node.propertyName, visitor, isModuleExportName); + const _name = visitNode(node.name, visitor, isModuleExportName); + return updateExportSpecifier(node, _propertyName, _name); + }, + [SyntaxKind.CallSignature]: (node, visitor) => { + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _parameters = visitNodes(node.parameters, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + return updateCallSignatureDeclaration(node, _typeParameters, _parameters, _type); + }, + [SyntaxKind.ConstructSignature]: (node, visitor) => { + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _parameters = visitNodes(node.parameters, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + return updateConstructSignatureDeclaration(node, _typeParameters, _parameters, _type); + }, + [SyntaxKind.Constructor]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _parameters = visitNodes(node.parameters, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + const _body = visitNode(node.body, visitor, isFunctionBody); + return updateConstructorDeclaration(node, _modifiers, _typeParameters, _parameters, _type, _body); + }, + [SyntaxKind.GetAccessor]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isPropertyName); + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _parameters = visitNodes(node.parameters, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + const _body = visitNode(node.body, visitor, isFunctionBody); + return updateGetAccessorDeclaration(node, _modifiers, _name, _typeParameters, _parameters, _type, _body); + }, + [SyntaxKind.SetAccessor]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isPropertyName); + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _parameters = visitNodes(node.parameters, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + const _body = visitNode(node.body, visitor, isFunctionBody); + return updateSetAccessorDeclaration(node, _modifiers, _name, _typeParameters, _parameters, _type, _body); + }, + [SyntaxKind.IndexSignature]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _parameters = visitNodes(node.parameters, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + return updateIndexSignatureDeclaration(node, _modifiers, _parameters, _type); + }, + [SyntaxKind.MethodSignature]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isPropertyName); + const _postfixToken = visitNode(node.postfixToken, visitor, isQuestionOrExclamationToken); + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _parameters = visitNodes(node.parameters, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + return updateMethodSignatureDeclaration(node, _modifiers, _name, _postfixToken, _typeParameters, _parameters, _type); + }, + [SyntaxKind.MethodDeclaration]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _asteriskToken = visitNode(node.asteriskToken, visitor, isAsteriskToken); + const _name = visitNode(node.name, visitor, isPropertyName); + const _postfixToken = visitNode(node.postfixToken, visitor, isQuestionOrExclamationToken); + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _parameters = visitNodes(node.parameters, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + const _body = visitNode(node.body, visitor, isFunctionBody); + return updateMethodDeclaration(node, _modifiers, _asteriskToken, _name, _postfixToken, _typeParameters, _parameters, _type, _body); + }, + [SyntaxKind.PropertySignature]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isPropertyName); + const _postfixToken = visitNode(node.postfixToken, visitor, isQuestionOrExclamationToken); + const _type = visitNode(node.type, visitor, isTypeNode); + const _initializer = visitNode(node.initializer, visitor, isExpression); + return updatePropertySignatureDeclaration(node, _modifiers, _name, _postfixToken, _type, _initializer); + }, + [SyntaxKind.PropertyDeclaration]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isPropertyName); + const _postfixToken = visitNode(node.postfixToken, visitor, isQuestionOrExclamationToken); + const _type = visitNode(node.type, visitor, isTypeNode); + const _initializer = visitNode(node.initializer, visitor, isExpression); + return updatePropertyDeclaration(node, _modifiers, _name, _postfixToken, _type, _initializer); + }, + [SyntaxKind.ClassStaticBlockDeclaration]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _body = visitNode(node.body, visitor, isBlock); + return updateClassStaticBlockDeclaration(node, _modifiers, _body); + }, + [SyntaxKind.BinaryExpression]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _left = visitNode(node.left, visitor, isExpression); + const _type = visitNode(node.type, visitor, isTypeNode); + const _operatorToken = visitNode(node.operatorToken, visitor, isBinaryOperatorToken); + const _right = visitNode(node.right, visitor, isExpression); + return updateBinaryExpression(node, _modifiers, _left, _type, _operatorToken, _right); + }, + [SyntaxKind.PrefixUnaryExpression]: (node, visitor) => { + const _operand = visitNode(node.operand, visitor, isExpression); + return updatePrefixUnaryExpression(node, _operand); + }, + [SyntaxKind.PostfixUnaryExpression]: (node, visitor) => { + const _operand = visitNode(node.operand, visitor, isExpression); + return updatePostfixUnaryExpression(node, _operand); + }, + [SyntaxKind.YieldExpression]: (node, visitor) => { + const _asteriskToken = visitNode(node.asteriskToken, visitor, isAsteriskToken); + const _expression = visitNode(node.expression, visitor, isExpression); + return updateYieldExpression(node, _asteriskToken, _expression); + }, + [SyntaxKind.ArrowFunction]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _parameters = visitNodes(node.parameters, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + const _equalsGreaterThanToken = visitNode(node.equalsGreaterThanToken, visitor, isEqualsGreaterThanToken); + const _body = visitNode(node.body, visitor, isConciseBody); + return updateArrowFunction(node, _modifiers, _typeParameters, _parameters, _type, _equalsGreaterThanToken, _body); + }, + [SyntaxKind.FunctionExpression]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _asteriskToken = visitNode(node.asteriskToken, visitor, isAsteriskToken); + const _name = visitNode(node.name, visitor, isIdentifier); + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _parameters = visitNodes(node.parameters, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + const _body = visitNode(node.body, visitor, isFunctionBody); + return updateFunctionExpression(node, _modifiers, _asteriskToken, _name, _typeParameters, _parameters, _type, _body); + }, + [SyntaxKind.AsExpression]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + const _type = visitNode(node.type, visitor, isTypeNode); + return updateAsExpression(node, _expression, _type); + }, + [SyntaxKind.SatisfiesExpression]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + const _type = visitNode(node.type, visitor, isTypeNode); + return updateSatisfiesExpression(node, _expression, _type); + }, + [SyntaxKind.ConditionalExpression]: (node, visitor) => { + const _condition = visitNode(node.condition, visitor, isExpression); + const _questionToken = visitNode(node.questionToken, visitor, isQuestionToken); + const _whenTrue = visitNode(node.whenTrue, visitor, isExpression); + const _colonToken = visitNode(node.colonToken, visitor, isColonToken); + const _whenFalse = visitNode(node.whenFalse, visitor, isExpression); + return updateConditionalExpression(node, _condition, _questionToken, _whenTrue, _colonToken, _whenFalse); + }, + [SyntaxKind.PropertyAccessExpression]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + const _questionDotToken = visitNode(node.questionDotToken, visitor, isQuestionDotToken); + const _name = visitNode(node.name, visitor, isMemberName); + return updatePropertyAccessExpression(node, _expression, _questionDotToken, _name); + }, + [SyntaxKind.ElementAccessExpression]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + const _questionDotToken = visitNode(node.questionDotToken, visitor, isQuestionDotToken); + const _argumentExpression = visitNode(node.argumentExpression, visitor, isExpression); + return updateElementAccessExpression(node, _expression, _questionDotToken, _argumentExpression); + }, + [SyntaxKind.CallExpression]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + const _questionDotToken = visitNode(node.questionDotToken, visitor, isQuestionDotToken); + const _typeArguments = visitNodes(node.typeArguments, visitor); + const _arguments = visitNodes(node.arguments, visitor); + return updateCallExpression(node, _expression, _questionDotToken, _typeArguments, _arguments); + }, + [SyntaxKind.NewExpression]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + const _typeArguments = visitNodes(node.typeArguments, visitor); + const _arguments = visitNodes(node.arguments, visitor); + return updateNewExpression(node, _expression, _typeArguments, _arguments); + }, + [SyntaxKind.MetaProperty]: (node, visitor) => { + const _name = visitNode(node.name, visitor, isIdentifier); + return updateMetaProperty(node, _name); + }, + [SyntaxKind.NonNullExpression]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + return updateNonNullExpression(node, _expression); + }, + [SyntaxKind.SpreadElement]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + return updateSpreadElement(node, _expression); + }, + [SyntaxKind.TemplateExpression]: (node, visitor) => { + const _head = visitNode(node.head, visitor, isTemplateHead); + const _templateSpans = visitNodes(node.templateSpans, visitor); + return updateTemplateExpression(node, _head, _templateSpans); + }, + [SyntaxKind.TemplateSpan]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + const _literal = visitNode(node.literal, visitor, isTemplateMiddleOrTail); + return updateTemplateSpan(node, _expression, _literal); + }, + [SyntaxKind.TaggedTemplateExpression]: (node, visitor) => { + const _tag = visitNode(node.tag, visitor, isExpression); + const _questionDotToken = visitNode(node.questionDotToken, visitor, isQuestionDotToken); + const _typeArguments = visitNodes(node.typeArguments, visitor); + const _template = visitNode(node.template, visitor, isTemplateLiteral); + return updateTaggedTemplateExpression(node, _tag, _questionDotToken, _typeArguments, _template); + }, + [SyntaxKind.ParenthesizedExpression]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + return updateParenthesizedExpression(node, _expression); + }, + [SyntaxKind.ArrayLiteralExpression]: (node, visitor) => { + const _elements = visitNodes(node.elements, visitor); + return updateArrayLiteralExpression(node, _elements); + }, + [SyntaxKind.ObjectLiteralExpression]: (node, visitor) => { + const _properties = visitNodes(node.properties, visitor); + return updateObjectLiteralExpression(node, _properties); + }, + [SyntaxKind.SpreadAssignment]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + return updateSpreadAssignment(node, _expression); + }, + [SyntaxKind.PropertyAssignment]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isPropertyName); + const _postfixToken = visitNode(node.postfixToken, visitor, isQuestionOrExclamationToken); + const _type = visitNode(node.type, visitor, isTypeNode); + const _initializer = visitNode(node.initializer, visitor, isExpression); + return updatePropertyAssignment(node, _modifiers, _name, _postfixToken, _type, _initializer); + }, + [SyntaxKind.ShorthandPropertyAssignment]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isPropertyName); + const _postfixToken = visitNode(node.postfixToken, visitor, isQuestionOrExclamationToken); + const _type = visitNode(node.type, visitor, isTypeNode); + const _equalsToken = visitNode(node.equalsToken, visitor, isEqualsToken); + const _objectAssignmentInitializer = visitNode(node.objectAssignmentInitializer, visitor, isExpression); + return updateShorthandPropertyAssignment(node, _modifiers, _name, _postfixToken, _type, _equalsToken, _objectAssignmentInitializer); + }, + [SyntaxKind.DeleteExpression]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + return updateDeleteExpression(node, _expression); + }, + [SyntaxKind.TypeOfExpression]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + return updateTypeOfExpression(node, _expression); + }, + [SyntaxKind.VoidExpression]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + return updateVoidExpression(node, _expression); + }, + [SyntaxKind.AwaitExpression]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + return updateAwaitExpression(node, _expression); + }, + [SyntaxKind.TypeAssertionExpression]: (node, visitor) => { + const _type = visitNode(node.type, visitor, isTypeNode); + const _expression = visitNode(node.expression, visitor, isExpression); + return updateTypeAssertion(node, _type, _expression); + }, + [SyntaxKind.UnionType]: (node, visitor) => { + const _types = visitNodes(node.types, visitor); + return updateUnionTypeNode(node, _types); + }, + [SyntaxKind.IntersectionType]: (node, visitor) => { + const _types = visitNodes(node.types, visitor); + return updateIntersectionTypeNode(node, _types); + }, + [SyntaxKind.ConditionalType]: (node, visitor) => { + const _checkType = visitNode(node.checkType, visitor, isTypeNode); + const _extendsType = visitNode(node.extendsType, visitor, isTypeNode); + const _trueType = visitNode(node.trueType, visitor, isTypeNode); + const _falseType = visitNode(node.falseType, visitor, isTypeNode); + return updateConditionalTypeNode(node, _checkType, _extendsType, _trueType, _falseType); + }, + [SyntaxKind.TypeOperator]: (node, visitor) => { + const _type = visitNode(node.type, visitor, isTypeNode); + return updateTypeOperatorNode(node, _type); + }, + [SyntaxKind.InferType]: (node, visitor) => { + const _typeParameter = visitNode(node.typeParameter, visitor, isTypeParameterDeclaration); + return updateInferTypeNode(node, _typeParameter); + }, + [SyntaxKind.ArrayType]: (node, visitor) => { + const _elementType = visitNode(node.elementType, visitor, isTypeNode); + return updateArrayTypeNode(node, _elementType); + }, + [SyntaxKind.IndexedAccessType]: (node, visitor) => { + const _objectType = visitNode(node.objectType, visitor, isTypeNode); + const _indexType = visitNode(node.indexType, visitor, isTypeNode); + return updateIndexedAccessTypeNode(node, _objectType, _indexType); + }, + [SyntaxKind.TypeReference]: (node, visitor) => { + const _typeName = visitNode(node.typeName, visitor, isEntityName); + const _typeArguments = visitNodes(node.typeArguments, visitor); + return updateTypeReferenceNode(node, _typeName, _typeArguments); + }, + [SyntaxKind.ExpressionWithTypeArguments]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + const _typeArguments = visitNodes(node.typeArguments, visitor); + return updateExpressionWithTypeArguments(node, _expression, _typeArguments); + }, + [SyntaxKind.LiteralType]: (node, visitor) => { + const _literal = visitNode(node.literal, visitor); + return updateLiteralTypeNode(node, _literal); + }, + [SyntaxKind.TypePredicate]: (node, visitor) => { + const _assertsModifier = visitNode(node.assertsModifier, visitor, isAssertsKeyword); + const _parameterName = visitNode(node.parameterName, visitor, isTypePredicateParameterName); + const _type = visitNode(node.type, visitor, isTypeNode); + return updateTypePredicateNode(node, _assertsModifier, _parameterName, _type); + }, + [SyntaxKind.ImportAttribute]: (node, visitor) => { + const _name = visitNode(node.name, visitor, isImportAttributeName); + const _value = visitNode(node.value, visitor, isExpression); + return updateImportAttribute(node, _name, _value); + }, + [SyntaxKind.ImportAttributes]: (node, visitor) => { + const _attributes = visitNodes(node.attributes, visitor); + return updateImportAttributes(node, _attributes); + }, + [SyntaxKind.TypeQuery]: (node, visitor) => { + const _exprName = visitNode(node.exprName, visitor, isEntityName); + const _typeArguments = visitNodes(node.typeArguments, visitor); + return updateTypeQueryNode(node, _exprName, _typeArguments); + }, + [SyntaxKind.MappedType]: (node, visitor) => { + const _readonlyToken = visitNode(node.readonlyToken, visitor, isReadonlyKeywordOrPlusOrMinusToken); + const _typeParameter = visitNode(node.typeParameter, visitor, isTypeParameterDeclaration); + const _nameType = visitNode(node.nameType, visitor, isTypeNode); + const _questionToken = visitNode(node.questionToken, visitor, isQuestionOrPlusOrMinusToken); + const _type = visitNode(node.type, visitor, isTypeNode); + const _members = visitNodes(node.members, visitor); + return updateMappedTypeNode(node, _readonlyToken, _typeParameter, _nameType, _questionToken, _type, _members); + }, + [SyntaxKind.TypeLiteral]: (node, visitor) => { + const _members = visitNodes(node.members, visitor); + return updateTypeLiteralNode(node, _members); + }, + [SyntaxKind.TupleType]: (node, visitor) => { + const _elements = visitNodes(node.elements, visitor); + return updateTupleTypeNode(node, _elements); + }, + [SyntaxKind.NamedTupleMember]: (node, visitor) => { + const _dotDotDotToken = visitNode(node.dotDotDotToken, visitor, isDotDotDotToken); + const _name = visitNode(node.name, visitor, isIdentifier); + const _questionToken = visitNode(node.questionToken, visitor, isQuestionToken); + const _type = visitNode(node.type, visitor, isTypeNode); + return updateNamedTupleMember(node, _dotDotDotToken, _name, _questionToken, _type); + }, + [SyntaxKind.OptionalType]: (node, visitor) => { + const _type = visitNode(node.type, visitor, isTypeNode); + return updateOptionalTypeNode(node, _type); + }, + [SyntaxKind.RestType]: (node, visitor) => { + const _type = visitNode(node.type, visitor, isTypeNode); + return updateRestTypeNode(node, _type); + }, + [SyntaxKind.ParenthesizedType]: (node, visitor) => { + const _type = visitNode(node.type, visitor, isTypeNode); + return updateParenthesizedTypeNode(node, _type); + }, + [SyntaxKind.FunctionType]: (node, visitor) => { + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _parameters = visitNodes(node.parameters, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + return updateFunctionTypeNode(node, _typeParameters, _parameters, _type); + }, + [SyntaxKind.ConstructorType]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _parameters = visitNodes(node.parameters, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + return updateConstructorTypeNode(node, _modifiers, _typeParameters, _parameters, _type); + }, + [SyntaxKind.TemplateLiteralType]: (node, visitor) => { + const _head = visitNode(node.head, visitor, isTemplateHead); + const _templateSpans = visitNodes(node.templateSpans, visitor); + return updateTemplateLiteralTypeNode(node, _head, _templateSpans); + }, + [SyntaxKind.TemplateLiteralTypeSpan]: (node, visitor) => { + const _type = visitNode(node.type, visitor, isTypeNode); + const _literal = visitNode(node.literal, visitor, isTemplateMiddleOrTail); + return updateTemplateLiteralTypeSpan(node, _type, _literal); + }, + [SyntaxKind.SyntheticExpression]: (node, visitor) => { + const _tupleNameSource = visitNode(node.tupleNameSource, visitor); + return updateSyntheticExpression(node, _tupleNameSource); + }, + [SyntaxKind.PartiallyEmittedExpression]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + return updatePartiallyEmittedExpression(node, _expression); + }, + [SyntaxKind.JsxElement]: (node, visitor) => { + const _openingElement = visitNode(node.openingElement, visitor, isJsxOpeningElement); + const _children = visitNodes(node.children, visitor); + const _closingElement = visitNode(node.closingElement, visitor, isJsxClosingElement); + return updateJsxElement(node, _openingElement, _children, _closingElement); + }, + [SyntaxKind.JsxAttributes]: (node, visitor) => { + const _properties = visitNodes(node.properties, visitor); + return updateJsxAttributes(node, _properties); + }, + [SyntaxKind.JsxNamespacedName]: (node, visitor) => { + const _namespace = visitNode(node.namespace, visitor, isIdentifier); + const _name = visitNode(node.name, visitor, isIdentifier); + return updateJsxNamespacedName(node, _namespace, _name); + }, + [SyntaxKind.JsxOpeningElement]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isJsxTagNameExpression); + const _typeArguments = visitNodes(node.typeArguments, visitor); + const _attributes = visitNode(node.attributes, visitor, isJsxAttributes); + return updateJsxOpeningElement(node, _tagName, _typeArguments, _attributes); + }, + [SyntaxKind.JsxSelfClosingElement]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isJsxTagNameExpression); + const _typeArguments = visitNodes(node.typeArguments, visitor); + const _attributes = visitNode(node.attributes, visitor, isJsxAttributes); + return updateJsxSelfClosingElement(node, _tagName, _typeArguments, _attributes); + }, + [SyntaxKind.JsxFragment]: (node, visitor) => { + const _openingFragment = visitNode(node.openingFragment, visitor, isJsxOpeningFragment); + const _children = visitNodes(node.children, visitor); + const _closingFragment = visitNode(node.closingFragment, visitor, isJsxClosingFragment); + return updateJsxFragment(node, _openingFragment, _children, _closingFragment); + }, + [SyntaxKind.JsxAttribute]: (node, visitor) => { + const _name = visitNode(node.name, visitor, isJsxAttributeName); + const _initializer = visitNode(node.initializer, visitor, isJsxAttributeValue); + return updateJsxAttribute(node, _name, _initializer); + }, + [SyntaxKind.JsxSpreadAttribute]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + return updateJsxSpreadAttribute(node, _expression); + }, + [SyntaxKind.JsxClosingElement]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isJsxTagNameExpression); + return updateJsxClosingElement(node, _tagName); + }, + [SyntaxKind.JsxExpression]: (node, visitor) => { + const _dotDotDotToken = visitNode(node.dotDotDotToken, visitor, isDotDotDotToken); + const _expression = visitNode(node.expression, visitor, isExpression); + return updateJsxExpression(node, _dotDotDotToken, _expression); + }, + [SyntaxKind.SyntaxList]: (node, visitor) => { + const _children = visitNodesArray(node.children, visitor); + return updateSyntaxList(node, _children); + }, + [SyntaxKind.JSDoc]: (node, visitor) => { + const _comment = visitNodes(node.comment, visitor); + const _tags = visitNodes(node.tags, visitor); + return updateJSDoc(node, _comment, _tags); + }, + [SyntaxKind.JSDocTypeExpression]: (node, visitor) => { + const _type = visitNode(node.type, visitor, isTypeNode); + return updateJSDocTypeExpression(node, _type); + }, + [SyntaxKind.JSDocNonNullableType]: (node, visitor) => { + const _type = visitNode(node.type, visitor, isTypeNode); + return updateJSDocNonNullableType(node, _type); + }, + [SyntaxKind.JSDocNullableType]: (node, visitor) => { + const _type = visitNode(node.type, visitor, isTypeNode); + return updateJSDocNullableType(node, _type); + }, + [SyntaxKind.JSDocVariadicType]: (node, visitor) => { + const _type = visitNode(node.type, visitor, isTypeNode); + return updateJSDocVariadicType(node, _type); + }, + [SyntaxKind.JSDocOptionalType]: (node, visitor) => { + const _type = visitNode(node.type, visitor, isTypeNode); + return updateJSDocOptionalType(node, _type); + }, + [SyntaxKind.JSDocTypeTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _typeExpression = visitNode(node.typeExpression, visitor); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocTypeTag(node, _tagName, _typeExpression, _comment); + }, + [SyntaxKind.JSDocUnknownTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocUnknownTag(node, _tagName, _comment); + }, + [SyntaxKind.JSDocTemplateTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _constraint = visitNode(node.constraint, visitor); + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocTemplateTag(node, _tagName, _constraint, _typeParameters, _comment); + }, + [SyntaxKind.JSDocReturnTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _typeExpression = visitNode(node.typeExpression, visitor, isTypeNode); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocReturnTag(node, _tagName, _typeExpression, _comment); + }, + [SyntaxKind.JSDocPublicTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocPublicTag(node, _tagName, _comment); + }, + [SyntaxKind.JSDocPrivateTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocPrivateTag(node, _tagName, _comment); + }, + [SyntaxKind.JSDocProtectedTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocProtectedTag(node, _tagName, _comment); + }, + [SyntaxKind.JSDocReadonlyTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocReadonlyTag(node, _tagName, _comment); + }, + [SyntaxKind.JSDocOverrideTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocOverrideTag(node, _tagName, _comment); + }, + [SyntaxKind.JSDocDeprecatedTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocDeprecatedTag(node, _tagName, _comment); + }, + [SyntaxKind.JSDocSeeTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _nameExpression = visitNode(node.nameExpression, visitor, isTypeNode); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocSeeTag(node, _tagName, _nameExpression, _comment); + }, + [SyntaxKind.JSDocImplementsTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _className = visitNode(node.className, visitor, isExpressionWithTypeArguments); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocImplementsTag(node, _tagName, _className, _comment); + }, + [SyntaxKind.JSDocAugmentsTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _className = visitNode(node.className, visitor, isExpressionWithTypeArguments); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocAugmentsTag(node, _tagName, _className, _comment); + }, + [SyntaxKind.JSDocSatisfiesTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _typeExpression = visitNode(node.typeExpression, visitor, isTypeNode); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocSatisfiesTag(node, _tagName, _typeExpression, _comment); + }, + [SyntaxKind.JSDocThrowsTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _typeExpression = visitNode(node.typeExpression, visitor, isTypeNode); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocThrowsTag(node, _tagName, _typeExpression, _comment); + }, + [SyntaxKind.JSDocThisTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _typeExpression = visitNode(node.typeExpression, visitor, isTypeNode); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocThisTag(node, _tagName, _typeExpression, _comment); + }, + [SyntaxKind.JSDocImportTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _importClause = visitNode(node.importClause, visitor, isImportClause); + const _moduleSpecifier = visitNode(node.moduleSpecifier, visitor, isExpression); + const _attributes = visitNode(node.attributes, visitor, isImportAttributes); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocImportTag(node, _tagName, _importClause, _moduleSpecifier, _attributes, _comment); + }, + [SyntaxKind.JSDocCallbackTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _typeExpression = visitNode(node.typeExpression, visitor, isTypeNode); + const _name = visitNode(node.name, visitor, isJSDocFullName); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocCallbackTag(node, _tagName, _typeExpression, _name, _comment); + }, + [SyntaxKind.JSDocOverloadTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _typeExpression = visitNode(node.typeExpression, visitor, isTypeNode); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocOverloadTag(node, _tagName, _typeExpression, _comment); + }, + [SyntaxKind.JSDocTypedefTag]: (node, visitor) => { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _typeExpression = visitNode(node.typeExpression, visitor); + const _name = visitNode(node.name, visitor, isJSDocFullName); + const _comment = visitNodes(node.comment, visitor); + return updateJSDocTypedefTag(node, _tagName, _typeExpression, _name, _comment); + }, + [SyntaxKind.JSDocSignature]: (node, visitor) => { + const _typeParameters = visitNodes(node.typeParameters, visitor); + const _parameters = visitNodes(node.parameters, visitor); + const _type = visitNode(node.type, visitor, isTypeNode); + return updateJSDocSignature(node, _typeParameters, _parameters, _type); + }, + [SyntaxKind.JSDocNameReference]: (node, visitor) => { + const _name = visitNode(node.name, visitor, isEntityName); + return updateJSDocNameReference(node, _name); + }, + [SyntaxKind.SourceFile]: (node, visitor) => { + const _statements = visitNodes(node.statements, visitor); + const _endOfFileToken = visitNode(node.endOfFileToken, visitor, isEndOfFile); + return updateSourceFile(node, _statements, _endOfFileToken); + }, + [SyntaxKind.ModuleDeclaration]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isModuleName); + const _body = visitNode(node.body, visitor, isModuleBody); + return updateModuleDeclaration(node, _modifiers, _name, _body); + }, + [SyntaxKind.ImportEqualsDeclaration]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isIdentifier); + const _moduleReference = visitNode(node.moduleReference, visitor, isModuleReference); + return updateImportEqualsDeclaration(node, _modifiers, _name, _moduleReference); + }, + [SyntaxKind.ExportDeclaration]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _exportClause = visitNode(node.exportClause, visitor, isNamedExportBindings); + const _moduleSpecifier = visitNode(node.moduleSpecifier, visitor, isExpression); + const _attributes = visitNode(node.attributes, visitor, isImportAttributes); + return updateExportDeclaration(node, _modifiers, _exportClause, _moduleSpecifier, _attributes); + }, + [SyntaxKind.ImportType]: (node, visitor) => { + const _argument = visitNode(node.argument, visitor, isTypeNode); + const _attributes = visitNode(node.attributes, visitor, isImportAttributes); + const _qualifier = visitNode(node.qualifier, visitor, isEntityName); + const _typeArguments = visitNodes(node.typeArguments, visitor); + return updateImportTypeNode(node, _argument, _attributes, _qualifier, _typeArguments); + }, + [SyntaxKind.ImportClause]: (node, visitor) => { + const _name = visitNode(node.name, visitor, isIdentifier); + const _namedBindings = visitNode(node.namedBindings, visitor, isNamedImportBindings); + return updateImportClause(node, _name, _namedBindings); + }, + [SyntaxKind.ImportSpecifier]: (node, visitor) => { + const _propertyName = visitNode(node.propertyName, visitor, isModuleExportName); + const _name = visitNode(node.name, visitor, isIdentifier); + return updateImportSpecifier(node, _propertyName, _name); + }, + [SyntaxKind.JSDocLink]: (node, visitor) => { + const _name = visitNode(node.name, visitor, isEntityName); + return updateJSDocLink(node, _name); + }, + [SyntaxKind.JSDocLinkPlain]: (node, visitor) => { + const _name = visitNode(node.name, visitor, isEntityName); + return updateJSDocLinkPlain(node, _name); + }, + [SyntaxKind.JSDocLinkCode]: (node, visitor) => { + const _name = visitNode(node.name, visitor, isEntityName); + return updateJSDocLinkCode(node, _name); + }, + [SyntaxKind.TypeParameter]: (node, visitor) => { + const _modifiers = visitNodes(node.modifiers, visitor); + const _name = visitNode(node.name, visitor, isIdentifier); + const _constraint = visitNode(node.constraint, visitor, isTypeNode); + const _expression = visitNode(node.expression, visitor, isExpression); + const _defaultType = visitNode(node.defaultType, visitor, isTypeNode); + return updateTypeParameterDeclaration(node, _modifiers, _name, _constraint, _expression, _defaultType); + }, + [SyntaxKind.SyntheticReferenceExpression]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + const _thisArg = visitNode(node.thisArg, visitor, isExpression); + return updateSyntheticReferenceExpression(node, _expression, _thisArg); + }, + [SyntaxKind.JSDocTypeLiteral]: (node, visitor) => { + const _jsdocPropertyTags = visitNodesArray(node.jsdocPropertyTags, visitor); + return updateJSDocTypeLiteral(node, _jsdocPropertyTags); + }, + [SyntaxKind.ForInStatement]: (node, visitor) => { + const _awaitModifier = visitNode(node.awaitModifier, visitor, isAwaitKeyword); + const _initializer = visitNode(node.initializer, visitor, isForInitializer); + const _expression = visitNode(node.expression, visitor, isExpression); + const _statement = visitNode(node.statement, visitor, isStatement); + return updateForInStatement(node, _awaitModifier, _initializer, _expression, _statement); + }, + [SyntaxKind.ForOfStatement]: (node, visitor) => { + const _awaitModifier = visitNode(node.awaitModifier, visitor, isAwaitKeyword); + const _initializer = visitNode(node.initializer, visitor, isForInitializer); + const _expression = visitNode(node.expression, visitor, isExpression); + const _statement = visitNode(node.statement, visitor, isStatement); + return updateForOfStatement(node, _awaitModifier, _initializer, _expression, _statement); + }, + [SyntaxKind.CaseClause]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + const _statements = visitNodes(node.statements, visitor); + return updateCaseClause(node, _expression, _statements); + }, + [SyntaxKind.DefaultClause]: (node, visitor) => { + const _expression = visitNode(node.expression, visitor, isExpression); + const _statements = visitNodes(node.statements, visitor); + return updateDefaultClause(node, _expression, _statements); + }, + [SyntaxKind.ObjectBindingPattern]: (node, visitor) => { + const _elements = visitNodes(node.elements, visitor); + return updateObjectBindingPattern(node, _elements); + }, + [SyntaxKind.ArrayBindingPattern]: (node, visitor) => { + const _elements = visitNodes(node.elements, visitor); + return updateArrayBindingPattern(node, _elements); + }, + [SyntaxKind.JSDocParameterTag]: visitEachChildOfJSDocParameterTag, + [SyntaxKind.JSDocPropertyTag]: visitEachChildOfJSDocPropertyTag, +}; +//# sourceMappingURL=visitor.generated.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/visitor.generated.js.map b/node_modules/typescript/dist/ast/visitor.generated.js.map new file mode 100644 index 0000000..708004b --- /dev/null +++ b/node_modules/typescript/dist/ast/visitor.generated.js.map @@ -0,0 +1 @@ +{"version":3,"file":"visitor.generated.js","sourceRoot":"","sources":["../../src/ast/visitor.generated.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAE9D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAgL/C,OAAO,EACH,eAAe,EACf,yBAAyB,EACzB,4BAA4B,EAC5B,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EACpB,8BAA8B,EAC9B,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,iCAAiC,EACjC,0BAA0B,EAC1B,2BAA2B,EAC3B,yBAAyB,EACzB,4BAA4B,EAC5B,yBAAyB,EACzB,mCAAmC,EACnC,uBAAuB,EACvB,eAAe,EACf,mBAAmB,EACnB,sBAAsB,EACtB,iBAAiB,EACjB,6BAA6B,EAC7B,qBAAqB,EACrB,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,EACzB,iCAAiC,EACjC,6BAA6B,EAC7B,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,yBAAyB,EACzB,wBAAwB,EACxB,sBAAsB,EACtB,4BAA4B,EAC5B,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EAClB,uBAAuB,EACvB,6BAA6B,EAC7B,qBAAqB,EACrB,oBAAoB,EACpB,2BAA2B,EAC3B,+BAA+B,EAC/B,mBAAmB,EACnB,0BAA0B,EAC1B,0BAA0B,EAC1B,WAAW,EACX,sBAAsB,EACtB,sBAAsB,EACtB,w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AE,SAAS,CAAC,CAAC;IACvD,CAAC;IACD,CAAC,UAAU,CAAC,mBAAmB,CAAC,EAAE,CAAC,IAAyB,EAAE,OAAgB,EAAuB,EAAE;QACnG,MAAM,SAAS,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QACrD,OAAO,yBAAyB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACtD,CAAC;IACD,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,iCAAiC;IACjE,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,gCAAgC;CAClE,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/visitor.js b/node_modules/typescript/dist/ast/visitor.js new file mode 100644 index 0000000..f1495d5 --- /dev/null +++ b/node_modules/typescript/dist/ast/visitor.js @@ -0,0 +1,47 @@ +/** + * Hand-written visitor implementations for nodes with runtime-dependent + * child ordering. Generated code in visitor.generated.ts and factory.generated.ts + * delegates to these functions. + */ +import { SyntaxKind } from "#enums/syntaxKind"; +import { updateJSDocParameterTag, updateJSDocPropertyTag, } from "./factory.generated.js"; +import { isEntityName, isIdentifier, isTypeNode, } from "./is.js"; +import { visitNode, visitNodes, } from "./visitor.generated.js"; +export { visitEachChild, visitNode, visitNodes, visitNodesArray } from "./visitor.generated.js"; +// ── forEachChild helpers (same signature as forEachChildTable entries) ── +function visitNodeForEachChild(cbNode, node) { + return node ? cbNode(node) : undefined; +} +function visitNodesForEachChild(cbNode, cbNodes, nodes) { + if (!nodes) + return undefined; + if (cbNodes) + return cbNodes(nodes); + for (const node of nodes) { + const result = cbNode(node); + if (result) + return result; + } + return undefined; +} +// ── forEachChild implementations ── +function forEachChildOfJSDocParameterOrPropertyTag(data, cbNode, cbNodes) { + return visitNodeForEachChild(cbNode, data.tagName) || + (data.isNameFirst + ? visitNodeForEachChild(cbNode, data.name) || visitNodeForEachChild(cbNode, data.typeExpression) + : visitNodeForEachChild(cbNode, data.typeExpression) || visitNodeForEachChild(cbNode, data.name)) || + visitNodesForEachChild(cbNode, cbNodes, data.comment); +} +export { forEachChildOfJSDocParameterOrPropertyTag as forEachChildOfJSDocParameterTag, forEachChildOfJSDocParameterOrPropertyTag as forEachChildOfJSDocPropertyTag }; +// ── visitEachChild implementations ── +function visitEachChildOfJSDocParameterOrPropertyTag(node, visitor) { + const _tagName = visitNode(node.tagName, visitor, isIdentifier); + const _name = visitNode(node.name, visitor, isEntityName); + const _typeExpression = visitNode(node.typeExpression, visitor, isTypeNode); + const _comment = visitNodes(node.comment, visitor); + return node.kind === SyntaxKind.JSDocParameterTag + ? updateJSDocParameterTag(node, _tagName, _name, _typeExpression, _comment) + : updateJSDocPropertyTag(node, _tagName, _name, _typeExpression, _comment); +} +export { visitEachChildOfJSDocParameterOrPropertyTag as visitEachChildOfJSDocParameterTag, visitEachChildOfJSDocParameterOrPropertyTag as visitEachChildOfJSDocPropertyTag }; +//# sourceMappingURL=visitor.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/ast/visitor.js.map b/node_modules/typescript/dist/ast/visitor.js.map new file mode 100644 index 0000000..37a7f9a --- /dev/null +++ b/node_modules/typescript/dist/ast/visitor.js.map @@ -0,0 +1 @@ +{"version":3,"file":"visitor.js","sourceRoot":"","sources":["../../src/ast/visitor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAS/C,OAAO,EACH,uBAAuB,EACvB,sBAAsB,GACzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACH,YAAY,EACZ,YAAY,EACZ,UAAU,GACb,MAAM,SAAS,CAAC;AAEjB,OAAO,EACH,SAAS,EACT,UAAU,GACb,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEhG,2EAA2E;AAE3E,SAAS,qBAAqB,CAAI,MAAyB,EAAE,IAAsB;I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AG,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;IAC1D,MAAM,eAAe,GAAG,SAAS,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;IAC5E,MAAM,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACnD,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,iBAAiB;QAC7C,CAAC,CAAC,uBAAuB,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,eAAe,EAAE,QAAQ,CAAC;QAC3E,CAAC,CAAC,sBAAsB,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,eAAe,EAAE,QAAQ,CAAC,CAAC;AACnF,CAAC;AAED,OAAO,EAAE,2CAA2C,IAAI,iCAAiC,EAAE,2CAA2C,IAAI,gCAAgC,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/characterCodes.d.ts b/node_modules/typescript/dist/enums/characterCodes.d.ts new file mode 100644 index 0000000..d6208f2 --- /dev/null +++ b/node_modules/typescript/dist/enums/characterCodes.d.ts @@ -0,0 +1,2 @@ +export declare var CharacterCodes: any; +//# sourceMappingURL=characterCodes.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/characterCodes.d.ts.map b/node_modules/typescript/dist/enums/characterCodes.d.ts.map new file mode 100644 index 0000000..9f6c5ea --- /dev/null +++ b/node_modules/typescript/dist/enums/characterCodes.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"characterCodes.d.ts","sourceRoot":"","sources":["../../src/enums/characterCodes.ts"],"names":[],"mappings":"AAAA,eAAO,IAAI,cAAc,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/characterCodes.enum.d.ts b/node_modules/typescript/dist/enums/characterCodes.enum.d.ts new file mode 100644 index 0000000..85577ef --- /dev/null +++ b/node_modules/typescript/dist/enums/characterCodes.enum.d.ts @@ -0,0 +1,129 @@ +export declare enum CharacterCodes { + EOF = -1, + nullCharacter = 0, + maxAsciiCharacter = 127, + lineFeed = 10,// \n + carriageReturn = 13,// \r + lineSeparator = 8232, + paragraphSeparator = 8233, + nextLine = 133, + space = 32,// " " + nonBreakingSpace = 160,// + enQuad = 8192, + emQuad = 8193, + enSpace = 8194, + emSpace = 8195, + threePerEmSpace = 8196, + fourPerEmSpace = 8197, + sixPerEmSpace = 8198, + figureSpace = 8199, + punctuationSpace = 8200, + thinSpace = 8201, + hairSpace = 8202, + zeroWidthSpace = 8203, + narrowNoBreakSpace = 8239, + ideographicSpace = 12288, + mathematicalSpace = 8287, + ogham = 5760, + replacementCharacter = 65533, + _ = 95, + $ = 36, + _0 = 48, + _1 = 49, + _2 = 50, + _3 = 51, + _4 = 52, + _5 = 53, + _6 = 54, + _7 = 55, + _8 = 56, + _9 = 57, + a = 97, + b = 98, + c = 99, + d = 100, + e = 101, + f = 102, + g = 103, + h = 104, + i = 105, + j = 106, + k = 107, + l = 108, + m = 109, + n = 110, + o = 111, + p = 112, + q = 113, + r = 114, + s = 115, + t = 116, + u = 117, + v = 118, + w = 119, + x = 120, + y = 121, + z = 122, + A = 65, + B = 66, + C = 67, + D = 68, + E = 69, + F = 70, + G = 71, + H = 72, + I = 73, + J = 74, + K = 75, + L = 76, + M = 77, + N = 78, + O = 79, + P = 80, + Q = 81, + R = 82, + S = 83, + T = 84, + U = 85, + V = 86, + W = 87, + X = 88, + Y = 89, + Z = 90, + ampersand = 38,// & + asterisk = 42,// * + at = 64,// @ + backslash = 92,// \ + backtick = 96,// ` + bar = 124,// | + caret = 94,// ^ + closeBrace = 125,// } + closeBracket = 93,// ] + closeParen = 41,// ) + colon = 58,// : + comma = 44,// , + dot = 46,// . + doubleQuote = 34,// " + equals = 61,// = + exclamation = 33,// ! + greaterThan = 62,// > + hash = 35,// # + lessThan = 60,// < + minus = 45,// - + openBrace = 123,// { + openBracket = 91,// [ + openParen = 40,// ( + percent = 37,// % + plus = 43,// + + question = 63,// ? + semicolon = 59,// ; + singleQuote = 39,// ' + slash = 47,// / + tilde = 126,// ~ + backspace = 8,// \b + formFeed = 12,// \f + byteOrderMark = 65279, + tab = 9,// \t + verticalTab = 11 +} +//# sourceMappingURL=characterCodes.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/characterCodes.enum.d.ts.map b/node_modules/typescript/dist/enums/characterCodes.enum.d.ts.map new file mode 100644 index 0000000..969d1ef --- /dev/null +++ b/node_modules/typescript/dist/enums/characterCodes.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"characterCodes.enum.d.ts","sourceRoot":"","sources":["../../src/enums/characterCodes.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACtB,GAAG,KAAK;IACR,aAAa,IAAI;IACjB,iBAAiB,MAAO;IAExB,QAAQ,KAAO,CAAE,KAAK;IACtB,cAAc,KAAO,CAAE,KAAK;IAC5B,aAAa,OAAS;IACtB,kBAAkB,OAAS;IAC3B,QAAQ,MAAS;IAGjB,KAAK,KAAS,CAAE,MAAM;IACtB,gBAAgB,MAAS,CAAE,EAAE;IAC7B,MAAM,OAAS;IACf,MAAM,OAAS;IACf,OAAO,OAAS;IAChB,OAAO,OAAS;IAChB,eAAe,OAAS;IACxB,cAAc,OAAS;IACvB,aAAa,OAAS;IACtB,WAAW,OAAS;IACpB,gBAAgB,OAAS;IACzB,SAAS,OAAS;IAClB,SAAS,OAAS;IAClB,cAAc,OAAS;IACvB,kBAAkB,OAAS;IAC3B,gBAAgB,QAAS;IACzB,iBAAiB,OAAS;IAC1B,KAAK,OAAS;IAGd,oBAAoB,QAAS;IAE7B,CAAC,KAAO;IACR,CAAC,KAAO;IAER,EAAE,KAAO;IACT,EAAE,KAAO;IACT,EAAE,KAAO;IACT,EAAE,KAAO;IACT,EAAE,KAAO;IACT,EAAE,KAAO;IACT,EAAE,KAAO;IACT,EAAE,KAAO;IACT,EAAE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AClB,KAAK,KAAO,CAAE,IAAI;IAClB,GAAG,KAAO,CAAE,IAAI;IAChB,WAAW,KAAO,CAAE,IAAI;IACxB,MAAM,KAAO,CAAE,IAAI;IACnB,WAAW,KAAO,CAAE,IAAI;IACxB,WAAW,KAAO,CAAE,IAAI;IACxB,IAAI,KAAO,CAAE,IAAI;IACjB,QAAQ,KAAO,CAAE,IAAI;IACrB,KAAK,KAAO,CAAE,IAAI;IAClB,SAAS,MAAO,CAAE,IAAI;IACtB,WAAW,KAAO,CAAE,IAAI;IACxB,SAAS,KAAO,CAAE,IAAI;IACtB,OAAO,KAAO,CAAE,IAAI;IACpB,IAAI,KAAO,CAAE,IAAI;IACjB,QAAQ,KAAO,CAAE,IAAI;IACrB,SAAS,KAAO,CAAE,IAAI;IACtB,WAAW,KAAO,CAAE,IAAI;IACxB,KAAK,KAAO,CAAE,IAAI;IAClB,KAAK,MAAO,CAAE,IAAI;IAElB,SAAS,IAAO,CAAE,KAAK;IACvB,QAAQ,KAAO,CAAE,KAAK;IACtB,aAAa,QAAS;IACtB,GAAG,IAAO,CAAE,KAAK;IACjB,WAAW,KAAO;CACrB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/characterCodes.enum.js b/node_modules/typescript/dist/enums/characterCodes.enum.js new file mode 100644 index 0000000..dad58f2 --- /dev/null +++ b/node_modules/typescript/dist/enums/characterCodes.enum.js @@ -0,0 +1,132 @@ +export var CharacterCodes; +(function (CharacterCodes) { + CharacterCodes[CharacterCodes["EOF"] = -1] = "EOF"; + CharacterCodes[CharacterCodes["nullCharacter"] = 0] = "nullCharacter"; + CharacterCodes[CharacterCodes["maxAsciiCharacter"] = 127] = "maxAsciiCharacter"; + CharacterCodes[CharacterCodes["lineFeed"] = 10] = "lineFeed"; + CharacterCodes[CharacterCodes["carriageReturn"] = 13] = "carriageReturn"; + CharacterCodes[CharacterCodes["lineSeparator"] = 8232] = "lineSeparator"; + CharacterCodes[CharacterCodes["paragraphSeparator"] = 8233] = "paragraphSeparator"; + CharacterCodes[CharacterCodes["nextLine"] = 133] = "nextLine"; + // Unicode 3.0 space characters + CharacterCodes[CharacterCodes["space"] = 32] = "space"; + CharacterCodes[CharacterCodes["nonBreakingSpace"] = 160] = "nonBreakingSpace"; + CharacterCodes[CharacterCodes["enQuad"] = 8192] = "enQuad"; + CharacterCodes[CharacterCodes["emQuad"] = 8193] = "emQuad"; + CharacterCodes[CharacterCodes["enSpace"] = 8194] = "enSpace"; + CharacterCodes[CharacterCodes["emSpace"] = 8195] = "emSpace"; + CharacterCodes[CharacterCodes["threePerEmSpace"] = 8196] = "threePerEmSpace"; + CharacterCodes[CharacterCodes["fourPerEmSpace"] = 8197] = "fourPerEmSpace"; + CharacterCodes[CharacterCodes["sixPerEmSpace"] = 8198] = "sixPerEmSpace"; + CharacterCodes[CharacterCodes["figureSpace"] = 8199] = "figureSpace"; + CharacterCodes[CharacterCodes["punctuationSpace"] = 8200] = "punctuationSpace"; + CharacterCodes[CharacterCodes["thinSpace"] = 8201] = "thinSpace"; + CharacterCodes[CharacterCodes["hairSpace"] = 8202] = "hairSpace"; + CharacterCodes[CharacterCodes["zeroWidthSpace"] = 8203] = "zeroWidthSpace"; + CharacterCodes[CharacterCodes["narrowNoBreakSpace"] = 8239] = "narrowNoBreakSpace"; + CharacterCodes[CharacterCodes["ideographicSpace"] = 12288] = "ideographicSpace"; + CharacterCodes[CharacterCodes["mathematicalSpace"] = 8287] = "mathematicalSpace"; + CharacterCodes[CharacterCodes["ogham"] = 5760] = "ogham"; + // Unicode replacement character produced when a byte sequence is invalid + CharacterCodes[CharacterCodes["replacementCharacter"] = 65533] = "replacementCharacter"; + CharacterCodes[CharacterCodes["_"] = 95] = "_"; + CharacterCodes[CharacterCodes["$"] = 36] = "$"; + CharacterCodes[CharacterCodes["_0"] = 48] = "_0"; + CharacterCodes[CharacterCodes["_1"] = 49] = "_1"; + CharacterCodes[CharacterCodes["_2"] = 50] = "_2"; + CharacterCodes[CharacterCodes["_3"] = 51] = "_3"; + CharacterCodes[CharacterCodes["_4"] = 52] = "_4"; + CharacterCodes[CharacterCodes["_5"] = 53] = "_5"; + CharacterCodes[CharacterCodes["_6"] = 54] = "_6"; + CharacterCodes[CharacterCodes["_7"] = 55] = "_7"; + CharacterCodes[CharacterCodes["_8"] = 56] = "_8"; + CharacterCodes[CharacterCodes["_9"] = 57] = "_9"; + CharacterCodes[CharacterCodes["a"] = 97] = "a"; + CharacterCodes[CharacterCodes["b"] = 98] = "b"; + CharacterCodes[CharacterCodes["c"] = 99] = "c"; + CharacterCodes[CharacterCodes["d"] = 100] = "d"; + CharacterCodes[CharacterCodes["e"] = 101] = "e"; + CharacterCodes[CharacterCodes["f"] = 102] = "f"; + CharacterCodes[CharacterCodes["g"] = 103] = "g"; + CharacterCodes[CharacterCodes["h"] = 104] = "h"; + CharacterCodes[CharacterCodes["i"] = 105] = "i"; + CharacterCodes[CharacterCodes["j"] = 106] = "j"; + CharacterCodes[CharacterCodes["k"] = 107] = "k"; + CharacterCodes[CharacterCodes["l"] = 108] = "l"; + CharacterCodes[CharacterCodes["m"] = 109] = "m"; + CharacterCodes[CharacterCodes["n"] = 110] = "n"; + CharacterCodes[CharacterCodes["o"] = 111] = "o"; + CharacterCodes[CharacterCodes["p"] = 112] = "p"; + CharacterCodes[CharacterCodes["q"] = 113] = "q"; + CharacterCodes[CharacterCodes["r"] = 114] = "r"; + CharacterCodes[CharacterCodes["s"] = 115] = "s"; + CharacterCodes[CharacterCodes["t"] = 116] = "t"; + CharacterCodes[CharacterCodes["u"] = 117] = "u"; + CharacterCodes[CharacterCodes["v"] = 118] = "v"; + CharacterCodes[CharacterCodes["w"] = 119] = "w"; + CharacterCodes[CharacterCodes["x"] = 120] = "x"; + CharacterCodes[CharacterCodes["y"] = 121] = "y"; + CharacterCodes[CharacterCodes["z"] = 122] = "z"; + CharacterCodes[CharacterCodes["A"] = 65] = "A"; + CharacterCodes[CharacterCodes["B"] = 66] = "B"; + CharacterCodes[CharacterCodes["C"] = 67] = "C"; + CharacterCodes[CharacterCodes["D"] = 68] = "D"; + CharacterCodes[CharacterCodes["E"] = 69] = "E"; + CharacterCodes[CharacterCodes["F"] = 70] = "F"; + CharacterCodes[CharacterCodes["G"] = 71] = "G"; + CharacterCodes[CharacterCodes["H"] = 72] = "H"; + CharacterCodes[CharacterCodes["I"] = 73] = "I"; + CharacterCodes[CharacterCodes["J"] = 74] = "J"; + CharacterCodes[CharacterCodes["K"] = 75] = "K"; + CharacterCodes[CharacterCodes["L"] = 76] = "L"; + CharacterCodes[CharacterCodes["M"] = 77] = "M"; + CharacterCodes[CharacterCodes["N"] = 78] = "N"; + CharacterCodes[CharacterCodes["O"] = 79] = "O"; + CharacterCodes[CharacterCodes["P"] = 80] = "P"; + CharacterCodes[CharacterCodes["Q"] = 81] = "Q"; + CharacterCodes[CharacterCodes["R"] = 82] = "R"; + CharacterCodes[CharacterCodes["S"] = 83] = "S"; + CharacterCodes[CharacterCodes["T"] = 84] = "T"; + CharacterCodes[CharacterCodes["U"] = 85] = "U"; + CharacterCodes[CharacterCodes["V"] = 86] = "V"; + CharacterCodes[CharacterCodes["W"] = 87] = "W"; + CharacterCodes[CharacterCodes["X"] = 88] = "X"; + CharacterCodes[CharacterCodes["Y"] = 89] = "Y"; + CharacterCodes[CharacterCodes["Z"] = 90] = "Z"; + CharacterCodes[CharacterCodes["ampersand"] = 38] = "ampersand"; + CharacterCodes[CharacterCodes["asterisk"] = 42] = "asterisk"; + CharacterCodes[CharacterCodes["at"] = 64] = "at"; + CharacterCodes[CharacterCodes["backslash"] = 92] = "backslash"; + CharacterCodes[CharacterCodes["backtick"] = 96] = "backtick"; + CharacterCodes[CharacterCodes["bar"] = 124] = "bar"; + CharacterCodes[CharacterCodes["caret"] = 94] = "caret"; + CharacterCodes[CharacterCodes["closeBrace"] = 125] = "closeBrace"; + CharacterCodes[CharacterCodes["closeBracket"] = 93] = "closeBracket"; + CharacterCodes[CharacterCodes["closeParen"] = 41] = "closeParen"; + CharacterCodes[CharacterCodes["colon"] = 58] = "colon"; + CharacterCodes[CharacterCodes["comma"] = 44] = "comma"; + CharacterCodes[CharacterCodes["dot"] = 46] = "dot"; + CharacterCodes[CharacterCodes["doubleQuote"] = 34] = "doubleQuote"; + CharacterCodes[CharacterCodes["equals"] = 61] = "equals"; + CharacterCodes[CharacterCodes["exclamation"] = 33] = "exclamation"; + CharacterCodes[CharacterCodes["greaterThan"] = 62] = "greaterThan"; + CharacterCodes[CharacterCodes["hash"] = 35] = "hash"; + CharacterCodes[CharacterCodes["lessThan"] = 60] = "lessThan"; + CharacterCodes[CharacterCodes["minus"] = 45] = "minus"; + CharacterCodes[CharacterCodes["openBrace"] = 123] = "openBrace"; + CharacterCodes[CharacterCodes["openBracket"] = 91] = "openBracket"; + CharacterCodes[CharacterCodes["openParen"] = 40] = "openParen"; + CharacterCodes[CharacterCodes["percent"] = 37] = "percent"; + CharacterCodes[CharacterCodes["plus"] = 43] = "plus"; + CharacterCodes[CharacterCodes["question"] = 63] = "question"; + CharacterCodes[CharacterCodes["semicolon"] = 59] = "semicolon"; + CharacterCodes[CharacterCodes["singleQuote"] = 39] = "singleQuote"; + CharacterCodes[CharacterCodes["slash"] = 47] = "slash"; + CharacterCodes[CharacterCodes["tilde"] = 126] = "tilde"; + CharacterCodes[CharacterCodes["backspace"] = 8] = "backspace"; + CharacterCodes[CharacterCodes["formFeed"] = 12] = "formFeed"; + CharacterCodes[CharacterCodes["byteOrderMark"] = 65279] = "byteOrderMark"; + CharacterCodes[CharacterCodes["tab"] = 9] = "tab"; + CharacterCodes[CharacterCodes["verticalTab"] = 11] = "verticalTab"; +})(CharacterCodes || (CharacterCodes = {})); +//# sourceMappingURL=characterCodes.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/characterCodes.enum.js.map b/node_modules/typescript/dist/enums/characterCodes.enum.js.map new file mode 100644 index 0000000..4801bfe --- /dev/null +++ b/node_modules/typescript/dist/enums/characterCodes.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"characterCodes.enum.js","sourceRoot":"","sources":["../../src/enums/characterCodes.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,cA0IX;AA1ID,WAAY,cAAc;IACtB,kDAAQ,CAAA;IACR,qEAAiB,CAAA;IACjB,+EAAwB,CAAA;IAExB,4DAAe,CAAA;IACf,wEAAqB,CAAA;IACrB,wEAAsB,CAAA;IACtB,kFAA2B,CAAA;IAC3B,6DAAiB,CAAA;IAEjB,+BAA+B;IAC/B,sDAAc,CAAA;IACd,6EAAyB,CAAA;IACzB,0DAAe,CAAA;IACf,0DAAe,CAAA;IACf,4DAAgB,CAAA;IAChB,4DAAgB,CAAA;IAChB,4EAAwB,CAAA;IACxB,0EAAuB,CAAA;IACvB,wEAAsB,CAAA;IACtB,oEAAoB,CAAA;IACpB,8EAAyB,CAAA;IACzB,gEAAkB,CAAA;IAClB,gEAAkB,CAAA;IAClB,0EAAuB,CAAA;IACvB,kFAA2B,CAAA;IAC3B,+EAAyB,CAAA;IACzB,gFAA0B,CAAA;IAC1B,wDAAc,CAAA;IAEd,yEAAyE;IACzE,uFAA6B,CAAA;IAE7B,8CAAQ,CAAA;IACR,8CAAQ,CAAA;IAER,gDAAS,CAAA;IACT,gDAAS,CAAA;IACT,gDAAS,CAAA;IACT,gDAAS,CAAA;IACT,gDAAS,CAAA;IACT,gDAAS,CAAA;IACT,gDAAS,CAAA;IACT,gDAAS,CAAA;IACT,gDAAS,CAAA;IACT,gDAAS,CAAA;IAET,8CAAQ,CAAA;IACR,8CAAQ,CAAA;IACR,8CAAQ,CAAA;IACR,+CAAQ,CAAA;IACR,+CAAQ,CAAA;IACR,+CAAQ,CAAA;IACR,+CAAQ,CAAA;IACR,+CAAQ,CAAA;IACR,+CAAQ,CAAA;IACR,+CAAQ,CAAA;IACR,+CAAQ,CAAA;IACR,+CAAQ,CAAA;IACR,+CAAQ,CAAA;IACR,+CAAQ,CAAA;IACR,+CAAQ,CAAA;IACR,+CAAQ,CAAA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A;IAClB,sDAAY,CAAA;IACZ,uDAAY,CAAA;IAEZ,6DAAgB,CAAA;IAChB,4DAAe,CAAA;IACf,yEAAsB,CAAA;IACtB,iDAAU,CAAA;IACV,kEAAkB,CAAA;AACtB,CAAC,EA1IW,cAAc,KAAd,cAAc,QA0IzB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/characterCodes.js b/node_modules/typescript/dist/enums/characterCodes.js new file mode 100644 index 0000000..10b2244 --- /dev/null +++ b/node_modules/typescript/dist/enums/characterCodes.js @@ -0,0 +1,130 @@ +export var CharacterCodes; +(function (CharacterCodes) { + CharacterCodes[CharacterCodes["EOF"] = -1] = "EOF"; + CharacterCodes[CharacterCodes["nullCharacter"] = 0] = "nullCharacter"; + CharacterCodes[CharacterCodes["maxAsciiCharacter"] = 127] = "maxAsciiCharacter"; + CharacterCodes[CharacterCodes["lineFeed"] = 10] = "lineFeed"; + CharacterCodes[CharacterCodes["carriageReturn"] = 13] = "carriageReturn"; + CharacterCodes[CharacterCodes["lineSeparator"] = 8232] = "lineSeparator"; + CharacterCodes[CharacterCodes["paragraphSeparator"] = 8233] = "paragraphSeparator"; + CharacterCodes[CharacterCodes["nextLine"] = 133] = "nextLine"; + CharacterCodes[CharacterCodes["space"] = 32] = "space"; + CharacterCodes[CharacterCodes["nonBreakingSpace"] = 160] = "nonBreakingSpace"; + CharacterCodes[CharacterCodes["enQuad"] = 8192] = "enQuad"; + CharacterCodes[CharacterCodes["emQuad"] = 8193] = "emQuad"; + CharacterCodes[CharacterCodes["enSpace"] = 8194] = "enSpace"; + CharacterCodes[CharacterCodes["emSpace"] = 8195] = "emSpace"; + CharacterCodes[CharacterCodes["threePerEmSpace"] = 8196] = "threePerEmSpace"; + CharacterCodes[CharacterCodes["fourPerEmSpace"] = 8197] = "fourPerEmSpace"; + CharacterCodes[CharacterCodes["sixPerEmSpace"] = 8198] = "sixPerEmSpace"; + CharacterCodes[CharacterCodes["figureSpace"] = 8199] = "figureSpace"; + CharacterCodes[CharacterCodes["punctuationSpace"] = 8200] = "punctuationSpace"; + CharacterCodes[CharacterCodes["thinSpace"] = 8201] = "thinSpace"; + CharacterCodes[CharacterCodes["hairSpace"] = 8202] = "hairSpace"; + CharacterCodes[CharacterCodes["zeroWidthSpace"] = 8203] = "zeroWidthSpace"; + CharacterCodes[CharacterCodes["narrowNoBreakSpace"] = 8239] = "narrowNoBreakSpace"; + CharacterCodes[CharacterCodes["ideographicSpace"] = 12288] = "ideographicSpace"; + CharacterCodes[CharacterCodes["mathematicalSpace"] = 8287] = "mathematicalSpace"; + CharacterCodes[CharacterCodes["ogham"] = 5765] = "ogham"; + CharacterCodes[CharacterCodes["replacementCharacter"] = 65533] = "replacementCharacter"; + CharacterCodes[CharacterCodes["_"] = 95] = "_"; + CharacterCodes[CharacterCodes["$"] = 36] = "$"; + CharacterCodes[CharacterCodes["_0"] = 48] = "_0"; + CharacterCodes[CharacterCodes["_1"] = 49] = "_1"; + CharacterCodes[CharacterCodes["_2"] = 50] = "_2"; + CharacterCodes[CharacterCodes["_3"] = 51] = "_3"; + CharacterCodes[CharacterCodes["_4"] = 52] = "_4"; + CharacterCodes[CharacterCodes["_5"] = 53] = "_5"; + CharacterCodes[CharacterCodes["_6"] = 54] = "_6"; + CharacterCodes[CharacterCodes["_7"] = 55] = "_7"; + CharacterCodes[CharacterCodes["_8"] = 56] = "_8"; + CharacterCodes[CharacterCodes["_9"] = 57] = "_9"; + CharacterCodes[CharacterCodes["a"] = 97] = "a"; + CharacterCodes[CharacterCodes["b"] = 98] = "b"; + CharacterCodes[CharacterCodes["c"] = 99] = "c"; + CharacterCodes[CharacterCodes["d"] = 100] = "d"; + CharacterCodes[CharacterCodes["e"] = 101] = "e"; + CharacterCodes[CharacterCodes["f"] = 102] = "f"; + CharacterCodes[CharacterCodes["g"] = 103] = "g"; + CharacterCodes[CharacterCodes["h"] = 104] = "h"; + CharacterCodes[CharacterCodes["i"] = 105] = "i"; + CharacterCodes[CharacterCodes["j"] = 106] = "j"; + CharacterCodes[CharacterCodes["k"] = 107] = "k"; + CharacterCodes[CharacterCodes["l"] = 108] = "l"; + CharacterCodes[CharacterCodes["m"] = 109] = "m"; + CharacterCodes[CharacterCodes["n"] = 110] = "n"; + CharacterCodes[CharacterCodes["o"] = 111] = "o"; + CharacterCodes[CharacterCodes["p"] = 112] = "p"; + CharacterCodes[CharacterCodes["q"] = 113] = "q"; + CharacterCodes[CharacterCodes["r"] = 114] = "r"; + CharacterCodes[CharacterCodes["s"] = 115] = "s"; + CharacterCodes[CharacterCodes["t"] = 116] = "t"; + CharacterCodes[CharacterCodes["u"] = 117] = "u"; + CharacterCodes[CharacterCodes["v"] = 118] = "v"; + CharacterCodes[CharacterCodes["w"] = 119] = "w"; + CharacterCodes[CharacterCodes["x"] = 120] = "x"; + CharacterCodes[CharacterCodes["y"] = 121] = "y"; + CharacterCodes[CharacterCodes["z"] = 122] = "z"; + CharacterCodes[CharacterCodes["A"] = 65] = "A"; + CharacterCodes[CharacterCodes["B"] = 66] = "B"; + CharacterCodes[CharacterCodes["C"] = 67] = "C"; + CharacterCodes[CharacterCodes["D"] = 68] = "D"; + CharacterCodes[CharacterCodes["E"] = 69] = "E"; + CharacterCodes[CharacterCodes["F"] = 70] = "F"; + CharacterCodes[CharacterCodes["G"] = 71] = "G"; + CharacterCodes[CharacterCodes["H"] = 72] = "H"; + CharacterCodes[CharacterCodes["I"] = 73] = "I"; + CharacterCodes[CharacterCodes["J"] = 74] = "J"; + CharacterCodes[CharacterCodes["K"] = 75] = "K"; + CharacterCodes[CharacterCodes["L"] = 76] = "L"; + CharacterCodes[CharacterCodes["M"] = 77] = "M"; + CharacterCodes[CharacterCodes["N"] = 78] = "N"; + CharacterCodes[CharacterCodes["O"] = 79] = "O"; + CharacterCodes[CharacterCodes["P"] = 80] = "P"; + CharacterCodes[CharacterCodes["Q"] = 81] = "Q"; + CharacterCodes[CharacterCodes["R"] = 82] = "R"; + CharacterCodes[CharacterCodes["S"] = 83] = "S"; + CharacterCodes[CharacterCodes["T"] = 84] = "T"; + CharacterCodes[CharacterCodes["U"] = 85] = "U"; + CharacterCodes[CharacterCodes["V"] = 86] = "V"; + CharacterCodes[CharacterCodes["W"] = 87] = "W"; + CharacterCodes[CharacterCodes["X"] = 88] = "X"; + CharacterCodes[CharacterCodes["Y"] = 89] = "Y"; + CharacterCodes[CharacterCodes["Z"] = 90] = "Z"; + CharacterCodes[CharacterCodes["ampersand"] = 38] = "ampersand"; + CharacterCodes[CharacterCodes["asterisk"] = 42] = "asterisk"; + CharacterCodes[CharacterCodes["at"] = 64] = "at"; + CharacterCodes[CharacterCodes["backslash"] = 92] = "backslash"; + CharacterCodes[CharacterCodes["backtick"] = 96] = "backtick"; + CharacterCodes[CharacterCodes["bar"] = 124] = "bar"; + CharacterCodes[CharacterCodes["caret"] = 94] = "caret"; + CharacterCodes[CharacterCodes["closeBrace"] = 125] = "closeBrace"; + CharacterCodes[CharacterCodes["closeBracket"] = 93] = "closeBracket"; + CharacterCodes[CharacterCodes["closeParen"] = 41] = "closeParen"; + CharacterCodes[CharacterCodes["colon"] = 58] = "colon"; + CharacterCodes[CharacterCodes["comma"] = 44] = "comma"; + CharacterCodes[CharacterCodes["dot"] = 46] = "dot"; + CharacterCodes[CharacterCodes["doubleQuote"] = 34] = "doubleQuote"; + CharacterCodes[CharacterCodes["equals"] = 61] = "equals"; + CharacterCodes[CharacterCodes["exclamation"] = 33] = "exclamation"; + CharacterCodes[CharacterCodes["greaterThan"] = 62] = "greaterThan"; + CharacterCodes[CharacterCodes["hash"] = 35] = "hash"; + CharacterCodes[CharacterCodes["lessThan"] = 60] = "lessThan"; + CharacterCodes[CharacterCodes["minus"] = 45] = "minus"; + CharacterCodes[CharacterCodes["openBrace"] = 123] = "openBrace"; + CharacterCodes[CharacterCodes["openBracket"] = 91] = "openBracket"; + CharacterCodes[CharacterCodes["openParen"] = 40] = "openParen"; + CharacterCodes[CharacterCodes["percent"] = 37] = "percent"; + CharacterCodes[CharacterCodes["plus"] = 43] = "plus"; + CharacterCodes[CharacterCodes["question"] = 63] = "question"; + CharacterCodes[CharacterCodes["semicolon"] = 59] = "semicolon"; + CharacterCodes[CharacterCodes["singleQuote"] = 39] = "singleQuote"; + CharacterCodes[CharacterCodes["slash"] = 47] = "slash"; + CharacterCodes[CharacterCodes["tilde"] = 126] = "tilde"; + CharacterCodes[CharacterCodes["backspace"] = 8] = "backspace"; + CharacterCodes[CharacterCodes["formFeed"] = 12] = "formFeed"; + CharacterCodes[CharacterCodes["byteOrderMark"] = 65279] = "byteOrderMark"; + CharacterCodes[CharacterCodes["tab"] = 9] = "tab"; + CharacterCodes[CharacterCodes["verticalTab"] = 11] = "verticalTab"; +})(CharacterCodes || (CharacterCodes = {})); +//# sourceMappingURL=characterCodes.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/characterCodes.js.map b/node_modules/typescript/dist/enums/characterCodes.js.map new file mode 100644 index 0000000..dd3a523 --- /dev/null +++ b/node_modules/typescript/dist/enums/characterCodes.js.map @@ -0,0 +1 @@ +{"version":3,"file":"characterCodes.js","sourceRoot":"","sources":["../../src/enums/characterCodes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAI,cAAmB,CAAC;AAC/B,CAAC,UAAU,cAAc;IACrB,cAAc,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;IACnD,cAAc,CAAC,cAAc,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,GAAG,eAAe,CAAC;IACtE,cAAc,CAAC,cAAc,CAAC,mBAAmB,CAAC,GAAG,GAAG,CAAC,GAAG,mBAAmB,CAAC;IAChF,cAAc,CAAC,cAAc,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,GAAG,UAAU,CAAC;IAC7D,cAAc,CAAC,cAAc,CAAC,gBAAgB,CAAC,GAAG,EAAE,CAAC,GAAG,gBAAgB,CAAC;IACzE,cAAc,CAAC,cAAc,CAAC,eAAe,CAAC,GAAG,I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AAC,GAAG,EAAE,CAAC,GAAG,SAAS,CAAC;IAC3D,cAAc,CAAC,cAAc,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,GAAG,MAAM,CAAC;IACrD,cAAc,CAAC,cAAc,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,GAAG,UAAU,CAAC;IAC7D,cAAc,CAAC,cAAc,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,GAAG,WAAW,CAAC;IAC/D,cAAc,CAAC,cAAc,CAAC,aAAa,CAAC,GAAG,EAAE,CAAC,GAAG,aAAa,CAAC;IACnE,cAAc,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC;IACvD,cAAc,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG,GAAG,CAAC,GAAG,OAAO,CAAC;IACxD,cAAc,CAAC,cAAc,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,WAAW,CAAC;IAC9D,cAAc,CAAC,cAAc,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,GAAG,UAAU,CAAC;IAC7D,cAAc,CAAC,cAAc,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC,GAAG,eAAe,CAAC;IAC1E,cAAc,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;IAClD,cAAc,CAAC,cAAc,CAAC,aAAa,CAAC,GAAG,EAAE,CAAC,GAAG,aAAa,CAAC;AACvE,CAAC,CAAC,CAAC,cAAc,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/commentDirectiveType.d.ts b/node_modules/typescript/dist/enums/commentDirectiveType.d.ts new file mode 100644 index 0000000..475efc5 --- /dev/null +++ b/node_modules/typescript/dist/enums/commentDirectiveType.d.ts @@ -0,0 +1,2 @@ +export declare var CommentDirectiveType: any; +//# sourceMappingURL=commentDirectiveType.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/commentDirectiveType.d.ts.map b/node_modules/typescript/dist/enums/commentDirectiveType.d.ts.map new file mode 100644 index 0000000..32233c5 --- /dev/null +++ b/node_modules/typescript/dist/enums/commentDirectiveType.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"commentDirectiveType.d.ts","sourceRoot":"","sources":["../../src/enums/commentDirectiveType.ts"],"names":[],"mappings":"AAAA,eAAO,IAAI,oBAAoB,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts b/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts new file mode 100644 index 0000000..7b18e5d --- /dev/null +++ b/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts @@ -0,0 +1,5 @@ +export declare enum CommentDirectiveType { + ExpectError = 0, + Ignore = 1 +} +//# sourceMappingURL=commentDirectiveType.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts.map b/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts.map new file mode 100644 index 0000000..f4af3f4 --- /dev/null +++ b/node_modules/typescript/dist/enums/commentDirectiveType.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"commentDirectiveType.enum.d.ts","sourceRoot":"","sources":["../../src/enums/commentDirectiveType.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,oBAAoB;IAC5B,WAAW,IAAI;IACf,MAAM,IAAI;CACb"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/commentDirectiveType.enum.js b/node_modules/typescript/dist/enums/commentDirectiveType.enum.js new file mode 100644 index 0000000..445c026 --- /dev/null +++ b/node_modules/typescript/dist/enums/commentDirectiveType.enum.js @@ -0,0 +1,6 @@ +export var CommentDirectiveType; +(function (CommentDirectiveType) { + CommentDirectiveType[CommentDirectiveType["ExpectError"] = 0] = "ExpectError"; + CommentDirectiveType[CommentDirectiveType["Ignore"] = 1] = "Ignore"; +})(CommentDirectiveType || (CommentDirectiveType = {})); +//# sourceMappingURL=commentDirectiveType.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/commentDirectiveType.enum.js.map b/node_modules/typescript/dist/enums/commentDirectiveType.enum.js.map new file mode 100644 index 0000000..f9a5336 --- /dev/null +++ b/node_modules/typescript/dist/enums/commentDirectiveType.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"commentDirectiveType.enum.js","sourceRoot":"","sources":["../../src/enums/commentDirectiveType.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC5B,6EAAe,CAAA;IACf,mEAAU,CAAA;AACd,CAAC,EAHW,oBAAoB,KAApB,oBAAoB,QAG/B"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/commentDirectiveType.js b/node_modules/typescript/dist/enums/commentDirectiveType.js new file mode 100644 index 0000000..1c3aa78 --- /dev/null +++ b/node_modules/typescript/dist/enums/commentDirectiveType.js @@ -0,0 +1,6 @@ +export var CommentDirectiveType; +(function (CommentDirectiveType) { + CommentDirectiveType[CommentDirectiveType["ExpectError"] = 0] = "ExpectError"; + CommentDirectiveType[CommentDirectiveType["Ignore"] = 1] = "Ignore"; +})(CommentDirectiveType || (CommentDirectiveType = {})); +//# sourceMappingURL=commentDirectiveType.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/commentDirectiveType.js.map b/node_modules/typescript/dist/enums/commentDirectiveType.js.map new file mode 100644 index 0000000..909b27c --- /dev/null +++ b/node_modules/typescript/dist/enums/commentDirectiveType.js.map @@ -0,0 +1 @@ +{"version":3,"file":"commentDirectiveType.js","sourceRoot":"","sources":["../../src/enums/commentDirectiveType.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAI,oBAAyB,CAAC;AACrC,CAAC,UAAU,oBAAoB;IAC3B,oBAAoB,CAAC,oBAAoB,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC;IAC9E,oBAAoB,CAAC,oBAAoB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;AACxE,CAAC,CAAC,CAAC,oBAAoB,IAAI,CAAC,oBAAoB,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/completionItemKind.d.ts b/node_modules/typescript/dist/enums/completionItemKind.d.ts new file mode 100644 index 0000000..5952449 --- /dev/null +++ b/node_modules/typescript/dist/enums/completionItemKind.d.ts @@ -0,0 +1,2 @@ +export declare var CompletionItemKind: any; +//# sourceMappingURL=completionItemKind.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/completionItemKind.d.ts.map b/node_modules/typescript/dist/enums/completionItemKind.d.ts.map new file mode 100644 index 0000000..6073415 --- /dev/null +++ b/node_modules/typescript/dist/enums/completionItemKind.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"completionItemKind.d.ts","sourceRoot":"","sources":["../../src/enums/completionItemKind.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,kBAAkB,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts b/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts new file mode 100644 index 0000000..ab697c6 --- /dev/null +++ b/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts @@ -0,0 +1,28 @@ +export declare enum CompletionItemKind { + Text = 1, + Method = 2, + Function = 3, + Constructor = 4, + Field = 5, + Variable = 6, + Class = 7, + Interface = 8, + Module = 9, + Property = 10, + Unit = 11, + Value = 12, + Enum = 13, + Keyword = 14, + Snippet = 15, + Color = 16, + File = 17, + Reference = 18, + Folder = 19, + EnumMember = 20, + Constant = 21, + Struct = 22, + Event = 23, + Operator = 24, + TypeParameter = 25 +} +//# sourceMappingURL=completionItemKind.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts.map b/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts.map new file mode 100644 index 0000000..e3a2fda --- /dev/null +++ b/node_modules/typescript/dist/enums/completionItemKind.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"completionItemKind.enum.d.ts","sourceRoot":"","sources":["../../src/enums/completionItemKind.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,kBAAkB;IAC1B,IAAI,IAAI;IACR,MAAM,IAAI;IACV,QAAQ,IAAI;IACZ,WAAW,IAAI;IACf,KAAK,IAAI;IACT,QAAQ,IAAI;IACZ,KAAK,IAAI;IACT,SAAS,IAAI;IACb,MAAM,IAAI;IACV,QAAQ,KAAK;IACb,IAAI,KAAK;IACT,KAAK,KAAK;IACV,IAAI,KAAK;IACT,OAAO,KAAK;IACZ,OAAO,KAAK;IACZ,KAAK,KAAK;IACV,IAAI,KAAK;IACT,SAAS,KAAK;IACd,MAAM,KAAK;IACX,UAAU,KAAK;IACf,QAAQ,KAAK;IACb,MAAM,KAAK;IACX,KAAK,KAAK;IACV,QAAQ,KAAK;IACb,aAAa,KAAK;CACrB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/completionItemKind.enum.js b/node_modules/typescript/dist/enums/completionItemKind.enum.js new file mode 100644 index 0000000..ad281d5 --- /dev/null +++ b/node_modules/typescript/dist/enums/completionItemKind.enum.js @@ -0,0 +1,30 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/lsp/lsproto/lsp_generated.go. DO NOT EDIT. +export var CompletionItemKind; +(function (CompletionItemKind) { + CompletionItemKind[CompletionItemKind["Text"] = 1] = "Text"; + CompletionItemKind[CompletionItemKind["Method"] = 2] = "Method"; + CompletionItemKind[CompletionItemKind["Function"] = 3] = "Function"; + CompletionItemKind[CompletionItemKind["Constructor"] = 4] = "Constructor"; + CompletionItemKind[CompletionItemKind["Field"] = 5] = "Field"; + CompletionItemKind[CompletionItemKind["Variable"] = 6] = "Variable"; + CompletionItemKind[CompletionItemKind["Class"] = 7] = "Class"; + CompletionItemKind[CompletionItemKind["Interface"] = 8] = "Interface"; + CompletionItemKind[CompletionItemKind["Module"] = 9] = "Module"; + CompletionItemKind[CompletionItemKind["Property"] = 10] = "Property"; + CompletionItemKind[CompletionItemKind["Unit"] = 11] = "Unit"; + CompletionItemKind[CompletionItemKind["Value"] = 12] = "Value"; + CompletionItemKind[CompletionItemKind["Enum"] = 13] = "Enum"; + CompletionItemKind[CompletionItemKind["Keyword"] = 14] = "Keyword"; + CompletionItemKind[CompletionItemKind["Snippet"] = 15] = "Snippet"; + CompletionItemKind[CompletionItemKind["Color"] = 16] = "Color"; + CompletionItemKind[CompletionItemKind["File"] = 17] = "File"; + CompletionItemKind[CompletionItemKind["Reference"] = 18] = "Reference"; + CompletionItemKind[CompletionItemKind["Folder"] = 19] = "Folder"; + CompletionItemKind[CompletionItemKind["EnumMember"] = 20] = "EnumMember"; + CompletionItemKind[CompletionItemKind["Constant"] = 21] = "Constant"; + CompletionItemKind[CompletionItemKind["Struct"] = 22] = "Struct"; + CompletionItemKind[CompletionItemKind["Event"] = 23] = "Event"; + CompletionItemKind[CompletionItemKind["Operator"] = 24] = "Operator"; + CompletionItemKind[CompletionItemKind["TypeParameter"] = 25] = "TypeParameter"; +})(CompletionItemKind || (CompletionItemKind = {})); +//# sourceMappingURL=completionItemKind.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/completionItemKind.enum.js.map b/node_modules/typescript/dist/enums/completionItemKind.enum.js.map new file mode 100644 index 0000000..3309d93 --- /dev/null +++ b/node_modules/typescript/dist/enums/completionItemKind.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"completionItemKind.enum.js","sourceRoot":"","sources":["../../src/enums/completionItemKind.enum.ts"],"names":[],"mappings":"AAAA,2GAA2G;AAE3G,MAAM,CAAN,IAAY,kBA0BX;AA1BD,WAAY,kBAAkB;IAC1B,2DAAQ,CAAA;IACR,+DAAU,CAAA;IACV,mEAAY,CAAA;IACZ,yEAAe,CAAA;IACf,6DAAS,CAAA;IACT,mEAAY,CAAA;IACZ,6DAAS,CAAA;IACT,qEAAa,CAAA;IACb,+DAAU,CAAA;IACV,oEAAa,CAAA;IACb,4DAAS,CAAA;IACT,8DAAU,CAAA;IACV,4DAAS,CAAA;IACT,kEAAY,CAAA;IACZ,kEAAY,CAAA;IACZ,8DAAU,CAAA;IACV,4DAAS,CAAA;IACT,sEAAc,CAAA;IACd,gEAAW,CAAA;IACX,wEAAe,CAAA;IACf,oEAAa,CAAA;IACb,gEAAW,CAAA;IACX,8DAAU,CAAA;IACV,oEAAa,CAAA;IACb,8EAAkB,CAAA;AACtB,CAAC,EA1BW,kBAAkB,KAAlB,kBAAkB,QA0B7B"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/completionItemKind.js b/node_modules/typescript/dist/enums/completionItemKind.js new file mode 100644 index 0000000..dc2c3c1 --- /dev/null +++ b/node_modules/typescript/dist/enums/completionItemKind.js @@ -0,0 +1,30 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/lsp/lsproto/lsp_generated.go. DO NOT EDIT. +export var CompletionItemKind; +(function (CompletionItemKind) { + CompletionItemKind[CompletionItemKind["Text"] = 1] = "Text"; + CompletionItemKind[CompletionItemKind["Method"] = 2] = "Method"; + CompletionItemKind[CompletionItemKind["Function"] = 3] = "Function"; + CompletionItemKind[CompletionItemKind["Constructor"] = 4] = "Constructor"; + CompletionItemKind[CompletionItemKind["Field"] = 5] = "Field"; + CompletionItemKind[CompletionItemKind["Variable"] = 6] = "Variable"; + CompletionItemKind[CompletionItemKind["Class"] = 7] = "Class"; + CompletionItemKind[CompletionItemKind["Interface"] = 8] = "Interface"; + CompletionItemKind[CompletionItemKind["Module"] = 9] = "Module"; + CompletionItemKind[CompletionItemKind["Property"] = 10] = "Property"; + CompletionItemKind[CompletionItemKind["Unit"] = 11] = "Unit"; + CompletionItemKind[CompletionItemKind["Value"] = 12] = "Value"; + CompletionItemKind[CompletionItemKind["Enum"] = 13] = "Enum"; + CompletionItemKind[CompletionItemKind["Keyword"] = 14] = "Keyword"; + CompletionItemKind[CompletionItemKind["Snippet"] = 15] = "Snippet"; + CompletionItemKind[CompletionItemKind["Color"] = 16] = "Color"; + CompletionItemKind[CompletionItemKind["File"] = 17] = "File"; + CompletionItemKind[CompletionItemKind["Reference"] = 18] = "Reference"; + CompletionItemKind[CompletionItemKind["Folder"] = 19] = "Folder"; + CompletionItemKind[CompletionItemKind["EnumMember"] = 20] = "EnumMember"; + CompletionItemKind[CompletionItemKind["Constant"] = 21] = "Constant"; + CompletionItemKind[CompletionItemKind["Struct"] = 22] = "Struct"; + CompletionItemKind[CompletionItemKind["Event"] = 23] = "Event"; + CompletionItemKind[CompletionItemKind["Operator"] = 24] = "Operator"; + CompletionItemKind[CompletionItemKind["TypeParameter"] = 25] = "TypeParameter"; +})(CompletionItemKind || (CompletionItemKind = {})); +//# sourceMappingURL=completionItemKind.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/completionItemKind.js.map b/node_modules/typescript/dist/enums/completionItemKind.js.map new file mode 100644 index 0000000..8c12628 --- /dev/null +++ b/node_modules/typescript/dist/enums/completionItemKind.js.map @@ -0,0 +1 @@ +{"version":3,"file":"completionItemKind.js","sourceRoot":"","sources":["../../src/enums/completionItemKind.ts"],"names":[],"mappings":"AAAA,2GAA2G;AAC3G,MAAM,CAAC,IAAI,kBAAuB,CAAC;AACnC,CAAC,UAAU,kBAAkB;IACzB,kBAAkB,CAAC,kBAAkB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC5D,kBAAkB,CAAC,kBAAkB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IAChE,kBAAkB,CAAC,kBAAkB,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IACpE,kBAAkB,CAAC,kBAAkB,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC;IAC1E,kBAAkB,CAAC,kBAAkB,CAAC,OAA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B,CAAC,kBAAkB,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,GAAG,YAAY,CAAC;IACzE,kBAAkB,CAAC,kBAAkB,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,GAAG,UAAU,CAAC;IACrE,kBAAkB,CAAC,kBAAkB,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC;IACjE,kBAAkB,CAAC,kBAAkB,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC;IAC/D,kBAAkB,CAAC,kBAAkB,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,GAAG,UAAU,CAAC;IACrE,kBAAkB,CAAC,kBAAkB,CAAC,eAAe,CAAC,GAAG,EAAE,CAAC,GAAG,eAAe,CAAC;AACnF,CAAC,CAAC,CAAC,kBAAkB,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/diagnosticCategory.d.ts b/node_modules/typescript/dist/enums/diagnosticCategory.d.ts new file mode 100644 index 0000000..aa70359 --- /dev/null +++ b/node_modules/typescript/dist/enums/diagnosticCategory.d.ts @@ -0,0 +1,2 @@ +export declare var DiagnosticCategory: any; +//# sourceMappingURL=diagnosticCategory.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/diagnosticCategory.d.ts.map b/node_modules/typescript/dist/enums/diagnosticCategory.d.ts.map new file mode 100644 index 0000000..4856f52 --- /dev/null +++ b/node_modules/typescript/dist/enums/diagnosticCategory.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"diagnosticCategory.d.ts","sourceRoot":"","sources":["../../src/enums/diagnosticCategory.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,kBAAkB,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts b/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts new file mode 100644 index 0000000..8b99b68 --- /dev/null +++ b/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts @@ -0,0 +1,7 @@ +export declare enum DiagnosticCategory { + Warning = 0, + Error = 1, + Suggestion = 2, + Message = 3 +} +//# sourceMappingURL=diagnosticCategory.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts.map b/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts.map new file mode 100644 index 0000000..c55fc24 --- /dev/null +++ b/node_modules/typescript/dist/enums/diagnosticCategory.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"diagnosticCategory.enum.d.ts","sourceRoot":"","sources":["../../src/enums/diagnosticCategory.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,kBAAkB;IAC1B,OAAO,IAAI;IACX,KAAK,IAAI;IACT,UAAU,IAAI;IACd,OAAO,IAAI;CACd"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/diagnosticCategory.enum.js b/node_modules/typescript/dist/enums/diagnosticCategory.enum.js new file mode 100644 index 0000000..91229a7 --- /dev/null +++ b/node_modules/typescript/dist/enums/diagnosticCategory.enum.js @@ -0,0 +1,9 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/diagnostics/diagnostics.go. DO NOT EDIT. +export var DiagnosticCategory; +(function (DiagnosticCategory) { + DiagnosticCategory[DiagnosticCategory["Warning"] = 0] = "Warning"; + DiagnosticCategory[DiagnosticCategory["Error"] = 1] = "Error"; + DiagnosticCategory[DiagnosticCategory["Suggestion"] = 2] = "Suggestion"; + DiagnosticCategory[DiagnosticCategory["Message"] = 3] = "Message"; +})(DiagnosticCategory || (DiagnosticCategory = {})); +//# sourceMappingURL=diagnosticCategory.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/diagnosticCategory.enum.js.map b/node_modules/typescript/dist/enums/diagnosticCategory.enum.js.map new file mode 100644 index 0000000..8a802fd --- /dev/null +++ b/node_modules/typescript/dist/enums/diagnosticCategory.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"diagnosticCategory.enum.js","sourceRoot":"","sources":["../../src/enums/diagnosticCategory.enum.ts"],"names":[],"mappings":"AAAA,yGAAyG;AAEzG,MAAM,CAAN,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC1B,iEAAW,CAAA;IACX,6DAAS,CAAA;IACT,uEAAc,CAAA;IACd,iEAAW,CAAA;AACf,CAAC,EALW,kBAAkB,KAAlB,kBAAkB,QAK7B"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/diagnosticCategory.js b/node_modules/typescript/dist/enums/diagnosticCategory.js new file mode 100644 index 0000000..2a1d761 --- /dev/null +++ b/node_modules/typescript/dist/enums/diagnosticCategory.js @@ -0,0 +1,9 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/diagnostics/diagnostics.go. DO NOT EDIT. +export var DiagnosticCategory; +(function (DiagnosticCategory) { + DiagnosticCategory[DiagnosticCategory["Warning"] = 0] = "Warning"; + DiagnosticCategory[DiagnosticCategory["Error"] = 1] = "Error"; + DiagnosticCategory[DiagnosticCategory["Suggestion"] = 2] = "Suggestion"; + DiagnosticCategory[DiagnosticCategory["Message"] = 3] = "Message"; +})(DiagnosticCategory || (DiagnosticCategory = {})); +//# sourceMappingURL=diagnosticCategory.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/diagnosticCategory.js.map b/node_modules/typescript/dist/enums/diagnosticCategory.js.map new file mode 100644 index 0000000..8ab4746 --- /dev/null +++ b/node_modules/typescript/dist/enums/diagnosticCategory.js.map @@ -0,0 +1 @@ +{"version":3,"file":"diagnosticCategory.js","sourceRoot":"","sources":["../../src/enums/diagnosticCategory.ts"],"names":[],"mappings":"AAAA,yGAAyG;AACzG,MAAM,CAAC,IAAI,kBAAuB,CAAC;AACnC,CAAC,UAAU,kBAAkB;IACzB,kBAAkB,CAAC,kBAAkB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;IAClE,kBAAkB,CAAC,kBAAkB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC;IAC9D,kBAAkB,CAAC,kBAAkB,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,YAAY,CAAC;IACxE,kBAAkB,CAAC,kBAAkB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;AACtE,CAAC,CAAC,CAAC,kBAAkB,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/elementFlags.d.ts b/node_modules/typescript/dist/enums/elementFlags.d.ts new file mode 100644 index 0000000..7412931 --- /dev/null +++ b/node_modules/typescript/dist/enums/elementFlags.d.ts @@ -0,0 +1,2 @@ +export declare var ElementFlags: any; +//# sourceMappingURL=elementFlags.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/elementFlags.d.ts.map b/node_modules/typescript/dist/enums/elementFlags.d.ts.map new file mode 100644 index 0000000..2660426 --- /dev/null +++ b/node_modules/typescript/dist/enums/elementFlags.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"elementFlags.d.ts","sourceRoot":"","sources":["../../src/enums/elementFlags.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,YAAY,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/elementFlags.enum.d.ts b/node_modules/typescript/dist/enums/elementFlags.enum.d.ts new file mode 100644 index 0000000..0f826d7 --- /dev/null +++ b/node_modules/typescript/dist/enums/elementFlags.enum.d.ts @@ -0,0 +1,12 @@ +export declare enum ElementFlags { + None = 0, + Required = 1, + Optional = 2, + Rest = 4, + Variadic = 8, + Fixed = 3, + Variable = 12, + NonRequired = 14, + NonRest = 11 +} +//# sourceMappingURL=elementFlags.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/elementFlags.enum.d.ts.map b/node_modules/typescript/dist/enums/elementFlags.enum.d.ts.map new file mode 100644 index 0000000..97c34e3 --- /dev/null +++ b/node_modules/typescript/dist/enums/elementFlags.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"elementFlags.enum.d.ts","sourceRoot":"","sources":["../../src/enums/elementFlags.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,YAAY;IACpB,IAAI,IAAI;IACR,QAAQ,IAAS;IACjB,QAAQ,IAAS;IACjB,IAAI,IAAS;IACb,QAAQ,IAAS;IACjB,KAAK,IAAsB;IAC3B,QAAQ,KAAkB;IAC1B,WAAW,KAA6B;IACxC,OAAO,KAAiC;CAC3C"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/elementFlags.enum.js b/node_modules/typescript/dist/enums/elementFlags.enum.js new file mode 100644 index 0000000..3ecab24 --- /dev/null +++ b/node_modules/typescript/dist/enums/elementFlags.enum.js @@ -0,0 +1,14 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT. +export var ElementFlags; +(function (ElementFlags) { + ElementFlags[ElementFlags["None"] = 0] = "None"; + ElementFlags[ElementFlags["Required"] = 1] = "Required"; + ElementFlags[ElementFlags["Optional"] = 2] = "Optional"; + ElementFlags[ElementFlags["Rest"] = 4] = "Rest"; + ElementFlags[ElementFlags["Variadic"] = 8] = "Variadic"; + ElementFlags[ElementFlags["Fixed"] = 3] = "Fixed"; + ElementFlags[ElementFlags["Variable"] = 12] = "Variable"; + ElementFlags[ElementFlags["NonRequired"] = 14] = "NonRequired"; + ElementFlags[ElementFlags["NonRest"] = 11] = "NonRest"; +})(ElementFlags || (ElementFlags = {})); +//# sourceMappingURL=elementFlags.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/elementFlags.enum.js.map b/node_modules/typescript/dist/enums/elementFlags.enum.js.map new file mode 100644 index 0000000..8e84d40 --- /dev/null +++ b/node_modules/typescript/dist/enums/elementFlags.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"elementFlags.enum.js","sourceRoot":"","sources":["../../src/enums/elementFlags.enum.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAE/F,MAAM,CAAN,IAAY,YAUX;AAVD,WAAY,YAAY;IACpB,+CAAQ,CAAA;IACR,uDAAiB,CAAA;IACjB,uDAAiB,CAAA;IACjB,+CAAa,CAAA;IACb,uDAAiB,CAAA;IACjB,iDAA2B,CAAA;IAC3B,wDAA0B,CAAA;IAC1B,8DAAwC,CAAA;IACxC,sDAAwC,CAAA;AAC5C,CAAC,EAVW,YAAY,KAAZ,YAAY,QAUvB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/elementFlags.js b/node_modules/typescript/dist/enums/elementFlags.js new file mode 100644 index 0000000..ecf2e91 --- /dev/null +++ b/node_modules/typescript/dist/enums/elementFlags.js @@ -0,0 +1,14 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT. +export var ElementFlags; +(function (ElementFlags) { + ElementFlags[ElementFlags["None"] = 0] = "None"; + ElementFlags[ElementFlags["Required"] = 1] = "Required"; + ElementFlags[ElementFlags["Optional"] = 2] = "Optional"; + ElementFlags[ElementFlags["Rest"] = 4] = "Rest"; + ElementFlags[ElementFlags["Variadic"] = 8] = "Variadic"; + ElementFlags[ElementFlags["Fixed"] = 3] = "Fixed"; + ElementFlags[ElementFlags["Variable"] = 12] = "Variable"; + ElementFlags[ElementFlags["NonRequired"] = 14] = "NonRequired"; + ElementFlags[ElementFlags["NonRest"] = 11] = "NonRest"; +})(ElementFlags || (ElementFlags = {})); +//# sourceMappingURL=elementFlags.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/elementFlags.js.map b/node_modules/typescript/dist/enums/elementFlags.js.map new file mode 100644 index 0000000..bc79085 --- /dev/null +++ b/node_modules/typescript/dist/enums/elementFlags.js.map @@ -0,0 +1 @@ +{"version":3,"file":"elementFlags.js","sourceRoot":"","sources":["../../src/enums/elementFlags.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,MAAM,CAAC,IAAI,YAAiB,CAAC;AAC7B,CAAC,UAAU,YAAY;IACnB,YAAY,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAChD,YAAY,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IACxD,YAAY,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IACxD,YAAY,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAChD,YAAY,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IACxD,YAAY,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC;IAClD,YAAY,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,GAAG,UAAU,CAAC;IACzD,YAAY,CAAC,YAAY,CAAC,aAAa,CAAC,GAAG,EAAE,CAAC,GAAG,aAAa,CAAC;IAC/D,YAAY,CAAC,YAAY,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,GAAG,SAAS,CAAC;AAC3D,CAAC,CAAC,CAAC,YAAY,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/internalSymbolName.d.ts b/node_modules/typescript/dist/enums/internalSymbolName.d.ts new file mode 100644 index 0000000..d943a1d --- /dev/null +++ b/node_modules/typescript/dist/enums/internalSymbolName.d.ts @@ -0,0 +1,2 @@ +export declare var InternalSymbolName: any; +//# sourceMappingURL=internalSymbolName.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/internalSymbolName.d.ts.map b/node_modules/typescript/dist/enums/internalSymbolName.d.ts.map new file mode 100644 index 0000000..6cb9e7e --- /dev/null +++ b/node_modules/typescript/dist/enums/internalSymbolName.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"internalSymbolName.d.ts","sourceRoot":"","sources":["../../src/enums/internalSymbolName.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,kBAAkB,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts b/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts new file mode 100644 index 0000000..e06ac09 --- /dev/null +++ b/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts @@ -0,0 +1,23 @@ +export declare enum InternalSymbolName { + Call = "__call", + Constructor = "__constructor", + New = "__new", + Index = "__index", + ExportStar = "__export", + Global = "__global", + Missing = "__missing", + Type = "__type", + Object = "__object", + JSXAttributes = "__jsxAttributes", + Class = "__class", + Function = "__function", + Computed = "__computed", + AssignmentDeclaration = "__assignment", + InstantiationExpression = "__instantiationExpression", + ImportAttributes = "__importAttributes", + ExportEquals = "export=", + Default = "default", + This = "this", + ModuleExports = "module.exports" +} +//# sourceMappingURL=internalSymbolName.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts.map b/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts.map new file mode 100644 index 0000000..873a94e --- /dev/null +++ b/node_modules/typescript/dist/enums/internalSymbolName.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"internalSymbolName.enum.d.ts","sourceRoot":"","sources":["../../src/enums/internalSymbolName.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,kBAAkB;IAC1B,IAAI,WAAW;IACf,WAAW,kBAAkB;IAC7B,GAAG,UAAU;IACb,KAAK,YAAY;IACjB,UAAU,aAAa;IACvB,MAAM,aAAa;IACnB,OAAO,cAAc;IACrB,IAAI,WAAW;IACf,MAAM,aAAa;IACnB,aAAa,oBAAoB;IACjC,KAAK,YAAY;IACjB,QAAQ,eAAe;IACvB,QAAQ,eAAe;IACvB,qBAAqB,iBAAiB;IACtC,uBAAuB,8BAA8B;IACrD,gBAAgB,uBAAuB;IACvC,YAAY,YAAY;IACxB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,aAAa,mBAAmB;CACnC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/internalSymbolName.enum.js b/node_modules/typescript/dist/enums/internalSymbolName.enum.js new file mode 100644 index 0000000..cc412a5 --- /dev/null +++ b/node_modules/typescript/dist/enums/internalSymbolName.enum.js @@ -0,0 +1,25 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/ast/symbol.go. DO NOT EDIT. +export var InternalSymbolName; +(function (InternalSymbolName) { + InternalSymbolName["Call"] = "__call"; + InternalSymbolName["Constructor"] = "__constructor"; + InternalSymbolName["New"] = "__new"; + InternalSymbolName["Index"] = "__index"; + InternalSymbolName["ExportStar"] = "__export"; + InternalSymbolName["Global"] = "__global"; + InternalSymbolName["Missing"] = "__missing"; + InternalSymbolName["Type"] = "__type"; + InternalSymbolName["Object"] = "__object"; + InternalSymbolName["JSXAttributes"] = "__jsxAttributes"; + InternalSymbolName["Class"] = "__class"; + InternalSymbolName["Function"] = "__function"; + InternalSymbolName["Computed"] = "__computed"; + InternalSymbolName["AssignmentDeclaration"] = "__assignment"; + InternalSymbolName["InstantiationExpression"] = "__instantiationExpression"; + InternalSymbolName["ImportAttributes"] = "__importAttributes"; + InternalSymbolName["ExportEquals"] = "export="; + InternalSymbolName["Default"] = "default"; + InternalSymbolName["This"] = "this"; + InternalSymbolName["ModuleExports"] = "module.exports"; +})(InternalSymbolName || (InternalSymbolName = {})); +//# sourceMappingURL=internalSymbolName.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/internalSymbolName.enum.js.map b/node_modules/typescript/dist/enums/internalSymbolName.enum.js.map new file mode 100644 index 0000000..75cdb19 --- /dev/null +++ b/node_modules/typescript/dist/enums/internalSymbolName.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"internalSymbolName.enum.js","sourceRoot":"","sources":["../../src/enums/internalSymbolName.enum.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAE5F,MAAM,CAAN,IAAY,kBAqBX;AArBD,WAAY,kBAAkB;IAC1B,qCAAe,CAAA;IACf,mDAA6B,CAAA;IAC7B,mCAAa,CAAA;IACb,uCAAiB,CAAA;IACjB,6CAAuB,CAAA;IACvB,yCAAmB,CAAA;IACnB,2CAAqB,CAAA;IACrB,qCAAe,CAAA;IACf,yCAAmB,CAAA;IACnB,uDAAiC,CAAA;IACjC,uCAAiB,CAAA;IACjB,6CAAuB,CAAA;IACvB,6CAAuB,CAAA;IACvB,4DAAsC,CAAA;IACtC,2EAAqD,CAAA;IACrD,6DAAuC,CAAA;IACvC,8CAAwB,CAAA;IACxB,yCAAmB,CAAA;IACnB,mCAAa,CAAA;IACb,sDAAgC,CAAA;AACpC,CAAC,EArBW,kBAAkB,KAAlB,kBAAkB,QAqB7B"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/internalSymbolName.js b/node_modules/typescript/dist/enums/internalSymbolName.js new file mode 100644 index 0000000..b4254d7 --- /dev/null +++ b/node_modules/typescript/dist/enums/internalSymbolName.js @@ -0,0 +1,25 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/ast/symbol.go. DO NOT EDIT. +export var InternalSymbolName; +(function (InternalSymbolName) { + InternalSymbolName["Call"] = "__call"; + InternalSymbolName["Constructor"] = "__constructor"; + InternalSymbolName["New"] = "__new"; + InternalSymbolName["Index"] = "__index"; + InternalSymbolName["ExportStar"] = "__export"; + InternalSymbolName["Global"] = "__global"; + InternalSymbolName["Missing"] = "__missing"; + InternalSymbolName["Type"] = "__type"; + InternalSymbolName["Object"] = "__object"; + InternalSymbolName["JSXAttributes"] = "__jsxAttributes"; + InternalSymbolName["Class"] = "__class"; + InternalSymbolName["Function"] = "__function"; + InternalSymbolName["Computed"] = "__computed"; + InternalSymbolName["AssignmentDeclaration"] = "__assignment"; + InternalSymbolName["InstantiationExpression"] = "__instantiationExpression"; + InternalSymbolName["ImportAttributes"] = "__importAttributes"; + InternalSymbolName["ExportEquals"] = "export="; + InternalSymbolName["Default"] = "default"; + InternalSymbolName["This"] = "this"; + InternalSymbolName["ModuleExports"] = "module.exports"; +})(InternalSymbolName || (InternalSymbolName = {})); +//# sourceMappingURL=internalSymbolName.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/internalSymbolName.js.map b/node_modules/typescript/dist/enums/internalSymbolName.js.map new file mode 100644 index 0000000..cdc60e0 --- /dev/null +++ b/node_modules/typescript/dist/enums/internalSymbolName.js.map @@ -0,0 +1 @@ +{"version":3,"file":"internalSymbolName.js","sourceRoot":"","sources":["../../src/enums/internalSymbolName.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,MAAM,CAAC,IAAI,kBAAuB,CAAC;AACnC,CAAC,UAAU,kBAAkB;IACzB,kBAAkB,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC;IACtC,kBAAkB,CAAC,aAAa,CAAC,GAAG,eAAe,CAAC;IACpD,kBAAkB,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC;IACpC,kBAAkB,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC;IACxC,kBAAkB,CAAC,YAAY,CAAC,GAAG,UAAU,CAAC;IAC9C,kBAAkB,CAAC,QAAQ,CAAC,GAAG,UAAU,CAAC;IAC1C,kBAAkB,CAAC,SAAS,CAAC,GAAG,WAAW,CAAC;IAC5C,kBAAkB,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC;IACtC,kBAAkB,CAAC,QAAQ,CAAC,GAAG,UAAU,CAAC;IAC1C,kBAAkB,CAAC,eAAe,CAAC,GAAG,iBAAiB,CAAC;IACxD,kBAAkB,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC;IACxC,kBAAkB,CAAC,UAAU,CAAC,GAAG,YAAY,CAAC;IAC9C,kBAAkB,CAAC,UAAU,CAAC,GAAG,YAAY,CAAC;IAC9C,kBAAkB,CAAC,uBAAuB,CAAC,GAAG,cAAc,CAAC;IAC7D,kBAAkB,CAAC,yBAAyB,CAAC,GAAG,2BAA2B,CAAC;IAC5E,kBAAkB,CAAC,kBAAkB,CAAC,GAAG,oBAAoB,CAAC;IAC9D,kBAAkB,CAAC,cAAc,CAAC,GAAG,SAAS,CAAC;IAC/C,kBAAkB,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;IAC1C,kBAAkB,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IACpC,kBAAkB,CAAC,eAAe,CAAC,GAAG,gBAAgB,CAAC;AAC3D,CAAC,CAAC,CAAC,kBAAkB,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/jsxEmit.d.ts b/node_modules/typescript/dist/enums/jsxEmit.d.ts new file mode 100644 index 0000000..30eb9f9 --- /dev/null +++ b/node_modules/typescript/dist/enums/jsxEmit.d.ts @@ -0,0 +1,2 @@ +export declare var JsxEmit: any; +//# sourceMappingURL=jsxEmit.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/jsxEmit.d.ts.map b/node_modules/typescript/dist/enums/jsxEmit.d.ts.map new file mode 100644 index 0000000..0e22a7e --- /dev/null +++ b/node_modules/typescript/dist/enums/jsxEmit.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"jsxEmit.d.ts","sourceRoot":"","sources":["../../src/enums/jsxEmit.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,OAAO,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts b/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts new file mode 100644 index 0000000..401ceba --- /dev/null +++ b/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts @@ -0,0 +1,9 @@ +export declare enum JsxEmit { + None = 0, + Preserve = 1, + ReactNative = 2, + React = 3, + ReactJSX = 4, + ReactJSXDev = 5 +} +//# sourceMappingURL=jsxEmit.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts.map b/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts.map new file mode 100644 index 0000000..27021a7 --- /dev/null +++ b/node_modules/typescript/dist/enums/jsxEmit.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"jsxEmit.enum.d.ts","sourceRoot":"","sources":["../../src/enums/jsxEmit.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,OAAO;IACf,IAAI,IAAI;IACR,QAAQ,IAAI;IACZ,WAAW,IAAI;IACf,KAAK,IAAI;IACT,QAAQ,IAAI;IACZ,WAAW,IAAI;CAClB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/jsxEmit.enum.js b/node_modules/typescript/dist/enums/jsxEmit.enum.js new file mode 100644 index 0000000..8da0e59 --- /dev/null +++ b/node_modules/typescript/dist/enums/jsxEmit.enum.js @@ -0,0 +1,11 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/core/compileroptions.go. DO NOT EDIT. +export var JsxEmit; +(function (JsxEmit) { + JsxEmit[JsxEmit["None"] = 0] = "None"; + JsxEmit[JsxEmit["Preserve"] = 1] = "Preserve"; + JsxEmit[JsxEmit["ReactNative"] = 2] = "ReactNative"; + JsxEmit[JsxEmit["React"] = 3] = "React"; + JsxEmit[JsxEmit["ReactJSX"] = 4] = "ReactJSX"; + JsxEmit[JsxEmit["ReactJSXDev"] = 5] = "ReactJSXDev"; +})(JsxEmit || (JsxEmit = {})); +//# sourceMappingURL=jsxEmit.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/jsxEmit.enum.js.map b/node_modules/typescript/dist/enums/jsxEmit.enum.js.map new file mode 100644 index 0000000..ac916cd --- /dev/null +++ b/node_modules/typescript/dist/enums/jsxEmit.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"jsxEmit.enum.js","sourceRoot":"","sources":["../../src/enums/jsxEmit.enum.ts"],"names":[],"mappings":"AAAA,sGAAsG;AAEtG,MAAM,CAAN,IAAY,OAOX;AAPD,WAAY,OAAO;IACf,qCAAQ,CAAA;IACR,6CAAY,CAAA;IACZ,mDAAe,CAAA;IACf,uCAAS,CAAA;IACT,6CAAY,CAAA;IACZ,mDAAe,CAAA;AACnB,CAAC,EAPW,OAAO,KAAP,OAAO,QAOlB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/jsxEmit.js b/node_modules/typescript/dist/enums/jsxEmit.js new file mode 100644 index 0000000..8189512 --- /dev/null +++ b/node_modules/typescript/dist/enums/jsxEmit.js @@ -0,0 +1,11 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/core/compileroptions.go. DO NOT EDIT. +export var JsxEmit; +(function (JsxEmit) { + JsxEmit[JsxEmit["None"] = 0] = "None"; + JsxEmit[JsxEmit["Preserve"] = 1] = "Preserve"; + JsxEmit[JsxEmit["ReactNative"] = 2] = "ReactNative"; + JsxEmit[JsxEmit["React"] = 3] = "React"; + JsxEmit[JsxEmit["ReactJSX"] = 4] = "ReactJSX"; + JsxEmit[JsxEmit["ReactJSXDev"] = 5] = "ReactJSXDev"; +})(JsxEmit || (JsxEmit = {})); +//# sourceMappingURL=jsxEmit.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/jsxEmit.js.map b/node_modules/typescript/dist/enums/jsxEmit.js.map new file mode 100644 index 0000000..5f0fb6c --- /dev/null +++ b/node_modules/typescript/dist/enums/jsxEmit.js.map @@ -0,0 +1 @@ +{"version":3,"file":"jsxEmit.js","sourceRoot":"","sources":["../../src/enums/jsxEmit.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,MAAM,CAAC,IAAI,OAAY,CAAC;AACxB,CAAC,UAAU,OAAO;IACd,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IACtC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IAC9C,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC;IACpD,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC;IACxC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IAC9C,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC;AACxD,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/languageVariant.d.ts b/node_modules/typescript/dist/enums/languageVariant.d.ts new file mode 100644 index 0000000..2a62711 --- /dev/null +++ b/node_modules/typescript/dist/enums/languageVariant.d.ts @@ -0,0 +1,2 @@ +export declare var LanguageVariant: any; +//# sourceMappingURL=languageVariant.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/languageVariant.d.ts.map b/node_modules/typescript/dist/enums/languageVariant.d.ts.map new file mode 100644 index 0000000..2ddc035 --- /dev/null +++ b/node_modules/typescript/dist/enums/languageVariant.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"languageVariant.d.ts","sourceRoot":"","sources":["../../src/enums/languageVariant.ts"],"names":[],"mappings":"AAAA,eAAO,IAAI,eAAe,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/languageVariant.enum.d.ts b/node_modules/typescript/dist/enums/languageVariant.enum.d.ts new file mode 100644 index 0000000..88d53a0 --- /dev/null +++ b/node_modules/typescript/dist/enums/languageVariant.enum.d.ts @@ -0,0 +1,5 @@ +export declare enum LanguageVariant { + Standard = 0, + JSX = 1 +} +//# sourceMappingURL=languageVariant.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/languageVariant.enum.d.ts.map b/node_modules/typescript/dist/enums/languageVariant.enum.d.ts.map new file mode 100644 index 0000000..371757b --- /dev/null +++ b/node_modules/typescript/dist/enums/languageVariant.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"languageVariant.enum.d.ts","sourceRoot":"","sources":["../../src/enums/languageVariant.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IACvB,QAAQ,IAAI;IACZ,GAAG,IAAI;CACV"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/languageVariant.enum.js b/node_modules/typescript/dist/enums/languageVariant.enum.js new file mode 100644 index 0000000..9c9734c --- /dev/null +++ b/node_modules/typescript/dist/enums/languageVariant.enum.js @@ -0,0 +1,6 @@ +export var LanguageVariant; +(function (LanguageVariant) { + LanguageVariant[LanguageVariant["Standard"] = 0] = "Standard"; + LanguageVariant[LanguageVariant["JSX"] = 1] = "JSX"; +})(LanguageVariant || (LanguageVariant = {})); +//# sourceMappingURL=languageVariant.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/languageVariant.enum.js.map b/node_modules/typescript/dist/enums/languageVariant.enum.js.map new file mode 100644 index 0000000..a586402 --- /dev/null +++ b/node_modules/typescript/dist/enums/languageVariant.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"languageVariant.enum.js","sourceRoot":"","sources":["../../src/enums/languageVariant.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACvB,6DAAY,CAAA;IACZ,mDAAO,CAAA;AACX,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/languageVariant.js b/node_modules/typescript/dist/enums/languageVariant.js new file mode 100644 index 0000000..76dea7a --- /dev/null +++ b/node_modules/typescript/dist/enums/languageVariant.js @@ -0,0 +1,6 @@ +export var LanguageVariant; +(function (LanguageVariant) { + LanguageVariant[LanguageVariant["Standard"] = 0] = "Standard"; + LanguageVariant[LanguageVariant["JSX"] = 1] = "JSX"; +})(LanguageVariant || (LanguageVariant = {})); +//# sourceMappingURL=languageVariant.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/languageVariant.js.map b/node_modules/typescript/dist/enums/languageVariant.js.map new file mode 100644 index 0000000..f34cfb1 --- /dev/null +++ b/node_modules/typescript/dist/enums/languageVariant.js.map @@ -0,0 +1 @@ +{"version":3,"file":"languageVariant.js","sourceRoot":"","sources":["../../src/enums/languageVariant.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAI,eAAoB,CAAC;AAChC,CAAC,UAAU,eAAe;IACtB,eAAe,CAAC,eAAe,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IAC9D,eAAe,CAAC,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;AACxD,CAAC,CAAC,CAAC,eAAe,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/modifierFlags.d.ts b/node_modules/typescript/dist/enums/modifierFlags.d.ts new file mode 100644 index 0000000..bad24d1 --- /dev/null +++ b/node_modules/typescript/dist/enums/modifierFlags.d.ts @@ -0,0 +1,2 @@ +export declare var ModifierFlags: any; +//# sourceMappingURL=modifierFlags.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/modifierFlags.d.ts.map b/node_modules/typescript/dist/enums/modifierFlags.d.ts.map new file mode 100644 index 0000000..7f508ac --- /dev/null +++ b/node_modules/typescript/dist/enums/modifierFlags.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"modifierFlags.d.ts","sourceRoot":"","sources":["../../src/enums/modifierFlags.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,aAAa,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts b/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts new file mode 100644 index 0000000..8663c7d --- /dev/null +++ b/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts @@ -0,0 +1,42 @@ +export declare enum ModifierFlags { + None = 0, + Public = 1, + Private = 2, + Protected = 4, + Readonly = 8, + Override = 16, + Export = 32, + Abstract = 64, + Ambient = 128, + Static = 256, + Accessor = 512, + Async = 1024, + Default = 2048, + Const = 4096, + In = 8192, + Out = 16384, + Decorator = 32768, + Deprecated = 65536, + JSDocPublic = 8388608, + JSDocPrivate = 16777216, + JSDocProtected = 33554432, + JSDocReadonly = 67108864, + JSDocOverride = 134217728, + HasComputedJSDocModifiers = 268435456, + HasComputedFlags = 536870912, + SyntacticOrJSDocModifiers = 31, + SyntacticOnlyModifiers = 65504, + SyntacticModifiers = 65535, + JSDocCacheOnlyModifiers = 260046848, + JSDocOnlyModifiers = 65536, + NonCacheOnlyModifiers = 131071, + AccessibilityModifier = 7, + ParameterPropertyModifier = 31, + NonPublicAccessibilityModifier = 6, + TypeScriptModifier = 28895, + ExportDefault = 2080, + All = 131071, + Modifier = 98303, + JavaScript = 3872 +} +//# sourceMappingURL=modifierFlags.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts.map b/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts.map new file mode 100644 index 0000000..be734ff --- /dev/null +++ b/node_modules/typescript/dist/enums/modifierFlags.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"modifierFlags.enum.d.ts","sourceRoot":"","sources":["../../src/enums/modifierFlags.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,aAAa;IACrB,IAAI,IAAI;IACR,MAAM,IAAS;IACf,OAAO,IAAS;IAChB,SAAS,IAAS;IAClB,QAAQ,IAAS;IACjB,QAAQ,KAAS;IACjB,MAAM,KAAS;IACf,QAAQ,KAAS;IACjB,OAAO,MAAS;IAChB,MAAM,MAAS;IACf,QAAQ,MAAS;IACjB,KAAK,OAAU;IACf,OAAO,OAAU;IACjB,KAAK,OAAU;IACf,EAAE,OAAU;IACZ,GAAG,QAAU;IACb,SAAS,QAAU;IACnB,UAAU,QAAU;IACpB,WAAW,UAAU;IACrB,YAAY,WAAU;IACtB,cAAc,WAAU;IACxB,aAAa,WAAU;IACvB,aAAa,YAAU;IACvB,yBAAyB,YAAU;IACnC,gBAAgB,YAAU;IAC1B,yBAAyB,KAAqD;IAC9E,sBAAsB,QAAmG;IACzH,kBAAkB,QAAqD;IACvE,uBAAuB,YAA8E;IACrG,kBAAkB,QAAa;IAC/B,qBAAqB,SAA0E;IAC/F,qBAAqB,IAA+B;IACpD,yBAAyB,KAA8C;IACvE,8BAA8B,IAAsB;IACpD,kBAAkB,QAA6F;IAC/G,aAAa,OAAmB;IAChC,GAAG,SAAqK;IACxK,QAAQ,QAAmB;IAC3B,UAAU,OAA+C;CAC5D"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/modifierFlags.enum.js b/node_modules/typescript/dist/enums/modifierFlags.enum.js new file mode 100644 index 0000000..9eb81ad --- /dev/null +++ b/node_modules/typescript/dist/enums/modifierFlags.enum.js @@ -0,0 +1,44 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/ast/modifierflags.go. DO NOT EDIT. +export var ModifierFlags; +(function (ModifierFlags) { + ModifierFlags[ModifierFlags["None"] = 0] = "None"; + ModifierFlags[ModifierFlags["Public"] = 1] = "Public"; + ModifierFlags[ModifierFlags["Private"] = 2] = "Private"; + ModifierFlags[ModifierFlags["Protected"] = 4] = "Protected"; + ModifierFlags[ModifierFlags["Readonly"] = 8] = "Readonly"; + ModifierFlags[ModifierFlags["Override"] = 16] = "Override"; + ModifierFlags[ModifierFlags["Export"] = 32] = "Export"; + ModifierFlags[ModifierFlags["Abstract"] = 64] = "Abstract"; + ModifierFlags[ModifierFlags["Ambient"] = 128] = "Ambient"; + ModifierFlags[ModifierFlags["Static"] = 256] = "Static"; + ModifierFlags[ModifierFlags["Accessor"] = 512] = "Accessor"; + ModifierFlags[ModifierFlags["Async"] = 1024] = "Async"; + ModifierFlags[ModifierFlags["Default"] = 2048] = "Default"; + ModifierFlags[ModifierFlags["Const"] = 4096] = "Const"; + ModifierFlags[ModifierFlags["In"] = 8192] = "In"; + ModifierFlags[ModifierFlags["Out"] = 16384] = "Out"; + ModifierFlags[ModifierFlags["Decorator"] = 32768] = "Decorator"; + ModifierFlags[ModifierFlags["Deprecated"] = 65536] = "Deprecated"; + ModifierFlags[ModifierFlags["JSDocPublic"] = 8388608] = "JSDocPublic"; + ModifierFlags[ModifierFlags["JSDocPrivate"] = 16777216] = "JSDocPrivate"; + ModifierFlags[ModifierFlags["JSDocProtected"] = 33554432] = "JSDocProtected"; + ModifierFlags[ModifierFlags["JSDocReadonly"] = 67108864] = "JSDocReadonly"; + ModifierFlags[ModifierFlags["JSDocOverride"] = 134217728] = "JSDocOverride"; + ModifierFlags[ModifierFlags["HasComputedJSDocModifiers"] = 268435456] = "HasComputedJSDocModifiers"; + ModifierFlags[ModifierFlags["HasComputedFlags"] = 536870912] = "HasComputedFlags"; + ModifierFlags[ModifierFlags["SyntacticOrJSDocModifiers"] = 31] = "SyntacticOrJSDocModifiers"; + ModifierFlags[ModifierFlags["SyntacticOnlyModifiers"] = 65504] = "SyntacticOnlyModifiers"; + ModifierFlags[ModifierFlags["SyntacticModifiers"] = 65535] = "SyntacticModifiers"; + ModifierFlags[ModifierFlags["JSDocCacheOnlyModifiers"] = 260046848] = "JSDocCacheOnlyModifiers"; + ModifierFlags[ModifierFlags["JSDocOnlyModifiers"] = 65536] = "JSDocOnlyModifiers"; + ModifierFlags[ModifierFlags["NonCacheOnlyModifiers"] = 131071] = "NonCacheOnlyModifiers"; + ModifierFlags[ModifierFlags["AccessibilityModifier"] = 7] = "AccessibilityModifier"; + ModifierFlags[ModifierFlags["ParameterPropertyModifier"] = 31] = "ParameterPropertyModifier"; + ModifierFlags[ModifierFlags["NonPublicAccessibilityModifier"] = 6] = "NonPublicAccessibilityModifier"; + ModifierFlags[ModifierFlags["TypeScriptModifier"] = 28895] = "TypeScriptModifier"; + ModifierFlags[ModifierFlags["ExportDefault"] = 2080] = "ExportDefault"; + ModifierFlags[ModifierFlags["All"] = 131071] = "All"; + ModifierFlags[ModifierFlags["Modifier"] = 98303] = "Modifier"; + ModifierFlags[ModifierFlags["JavaScript"] = 3872] = "JavaScript"; +})(ModifierFlags || (ModifierFlags = {})); +//# sourceMappingURL=modifierFlags.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/modifierFlags.enum.js.map b/node_modules/typescript/dist/enums/modifierFlags.enum.js.map new file mode 100644 index 0000000..8c2d84f --- /dev/null +++ b/node_modules/typescript/dist/enums/modifierFlags.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"modifierFlags.enum.js","sourceRoot":"","sources":["../../src/enums/modifierFlags.enum.ts"],"names":[],"mappings":"AAAA,mGAAmG;AAEnG,MAAM,CAAN,IAAY,aAwCX;AAxCD,WAAY,aAAa;IACrB,iDAAQ,CAAA;IACR,qDAAe,CAAA;IACf,uDAAgB,CAAA;IAChB,2DAAkB,CAAA;IAClB,yDAAiB,CAAA;IACjB,0DAAiB,CAAA;IACjB,sDAAe,CAAA;IACf,0DAAiB,CAAA;IACjB,yDAAgB,CAAA;IAChB,uDAAe,CAAA;IACf,2DAAiB,CAAA;IACjB,sDAAe,CAAA;IACf,0DAAiB,CAAA;IACjB,sDAAe,CAAA;IACf,gDAAY,CAAA;IACZ,mDAAa,CAAA;IACb,+DAAmB,CAAA;IACnB,iEAAoB,CAAA;IACpB,qEAAqB,CAAA;IACrB,wEAAsB,CAAA;IACtB,4EAAwB,CAAA;IACxB,0EAAuB,CAAA;IACvB,2EAAuB,CAAA;IACvB,mGAAmC,CAAA;IACnC,iFAA0B,CAAA;IAC1B,4FAA8E,CAAA;IAC9E,yFAAyH,CAAA;IACzH,iFAAuE,CAAA;IACvE,+FAAqG,CAAA;IACrG,iFAA+B,CAAA;IAC/B,wFAA+F,CAAA;IAC/F,mFAAoD,CAAA;IACpD,4FAAuE,CAAA;IACvE,qGAAoD,CAAA;IACpD,iFAA+G,CAAA;IAC/G,sEAAgC,CAAA;IAChC,oDAAwK,CAAA;IACxK,6DAA2B,CAAA;IAC3B,gEAAyD,CAAA;AAC7D,CAAC,EAxCW,aAAa,KAAb,aAAa,QAwCxB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/modifierFlags.js b/node_modules/typescript/dist/enums/modifierFlags.js new file mode 100644 index 0000000..48d8d88 --- /dev/null +++ b/node_modules/typescript/dist/enums/modifierFlags.js @@ -0,0 +1,44 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/ast/modifierflags.go. DO NOT EDIT. +export var ModifierFlags; +(function (ModifierFlags) { + ModifierFlags[ModifierFlags["None"] = 0] = "None"; + ModifierFlags[ModifierFlags["Public"] = 1] = "Public"; + ModifierFlags[ModifierFlags["Private"] = 2] = "Private"; + ModifierFlags[ModifierFlags["Protected"] = 4] = "Protected"; + ModifierFlags[ModifierFlags["Readonly"] = 8] = "Readonly"; + ModifierFlags[ModifierFlags["Override"] = 16] = "Override"; + ModifierFlags[ModifierFlags["Export"] = 32] = "Export"; + ModifierFlags[ModifierFlags["Abstract"] = 64] = "Abstract"; + ModifierFlags[ModifierFlags["Ambient"] = 128] = "Ambient"; + ModifierFlags[ModifierFlags["Static"] = 256] = "Static"; + ModifierFlags[ModifierFlags["Accessor"] = 512] = "Accessor"; + ModifierFlags[ModifierFlags["Async"] = 1024] = "Async"; + ModifierFlags[ModifierFlags["Default"] = 2048] = "Default"; + ModifierFlags[ModifierFlags["Const"] = 4096] = "Const"; + ModifierFlags[ModifierFlags["In"] = 8192] = "In"; + ModifierFlags[ModifierFlags["Out"] = 16384] = "Out"; + ModifierFlags[ModifierFlags["Decorator"] = 32768] = "Decorator"; + ModifierFlags[ModifierFlags["Deprecated"] = 65536] = "Deprecated"; + ModifierFlags[ModifierFlags["JSDocPublic"] = 8388608] = "JSDocPublic"; + ModifierFlags[ModifierFlags["JSDocPrivate"] = 16777216] = "JSDocPrivate"; + ModifierFlags[ModifierFlags["JSDocProtected"] = 33554432] = "JSDocProtected"; + ModifierFlags[ModifierFlags["JSDocReadonly"] = 67108864] = "JSDocReadonly"; + ModifierFlags[ModifierFlags["JSDocOverride"] = 134217728] = "JSDocOverride"; + ModifierFlags[ModifierFlags["HasComputedJSDocModifiers"] = 268435456] = "HasComputedJSDocModifiers"; + ModifierFlags[ModifierFlags["HasComputedFlags"] = 536870912] = "HasComputedFlags"; + ModifierFlags[ModifierFlags["SyntacticOrJSDocModifiers"] = 31] = "SyntacticOrJSDocModifiers"; + ModifierFlags[ModifierFlags["SyntacticOnlyModifiers"] = 65504] = "SyntacticOnlyModifiers"; + ModifierFlags[ModifierFlags["SyntacticModifiers"] = 65535] = "SyntacticModifiers"; + ModifierFlags[ModifierFlags["JSDocCacheOnlyModifiers"] = 260046848] = "JSDocCacheOnlyModifiers"; + ModifierFlags[ModifierFlags["JSDocOnlyModifiers"] = 65536] = "JSDocOnlyModifiers"; + ModifierFlags[ModifierFlags["NonCacheOnlyModifiers"] = 131071] = "NonCacheOnlyModifiers"; + ModifierFlags[ModifierFlags["AccessibilityModifier"] = 7] = "AccessibilityModifier"; + ModifierFlags[ModifierFlags["ParameterPropertyModifier"] = 31] = "ParameterPropertyModifier"; + ModifierFlags[ModifierFlags["NonPublicAccessibilityModifier"] = 6] = "NonPublicAccessibilityModifier"; + ModifierFlags[ModifierFlags["TypeScriptModifier"] = 28895] = "TypeScriptModifier"; + ModifierFlags[ModifierFlags["ExportDefault"] = 2080] = "ExportDefault"; + ModifierFlags[ModifierFlags["All"] = 131071] = "All"; + ModifierFlags[ModifierFlags["Modifier"] = 98303] = "Modifier"; + ModifierFlags[ModifierFlags["JavaScript"] = 3872] = "JavaScript"; +})(ModifierFlags || (ModifierFlags = {})); +//# sourceMappingURL=modifierFlags.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/modifierFlags.js.map b/node_modules/typescript/dist/enums/modifierFlags.js.map new file mode 100644 index 0000000..67371ac --- /dev/null +++ b/node_modules/typescript/dist/enums/modifierFlags.js.map @@ -0,0 +1 @@ +{"version":3,"file":"modifierFlags.js","sourceRoot":"","sources":["../../src/enums/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AoB,CAAC,GAAG,KAAK,CAAC,GAAG,oBAAoB,CAAC;IAClF,aAAa,CAAC,aAAa,CAAC,uBAAuB,CAAC,GAAG,MAAM,CAAC,GAAG,uBAAuB,CAAC;IACzF,aAAa,CAAC,aAAa,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAC,GAAG,uBAAuB,CAAC;IACpF,aAAa,CAAC,aAAa,CAAC,2BAA2B,CAAC,GAAG,EAAE,CAAC,GAAG,2BAA2B,CAAC;IAC7F,aAAa,CAAC,aAAa,CAAC,gCAAgC,CAAC,GAAG,CAAC,CAAC,GAAG,gCAAgC,CAAC;IACtG,aAAa,CAAC,aAAa,CAAC,oBAAoB,CAAC,GAAG,KAAK,CAAC,GAAG,oBAAoB,CAAC;IAClF,aAAa,CAAC,aAAa,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,GAAG,eAAe,CAAC;IACvE,aAAa,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,GAAG,KAAK,CAAC;IACrD,aAAa,CAAC,aAAa,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,GAAG,UAAU,CAAC;IAC9D,aAAa,CAAC,aAAa,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,GAAG,YAAY,CAAC;AACrE,CAAC,CAAC,CAAC,aAAa,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts b/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts new file mode 100644 index 0000000..09e2bc4 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts @@ -0,0 +1,2 @@ +export declare var ModuleDetectionKind: any; +//# sourceMappingURL=moduleDetectionKind.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts.map b/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts.map new file mode 100644 index 0000000..2e30c20 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleDetectionKind.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"moduleDetectionKind.d.ts","sourceRoot":"","sources":["../../src/enums/moduleDetectionKind.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,mBAAmB,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts b/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts new file mode 100644 index 0000000..a620bd0 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts @@ -0,0 +1,7 @@ +export declare enum ModuleDetectionKind { + None = 0, + Auto = 1, + Legacy = 2, + Force = 3 +} +//# sourceMappingURL=moduleDetectionKind.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts.map b/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts.map new file mode 100644 index 0000000..186e1f4 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleDetectionKind.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"moduleDetectionKind.enum.d.ts","sourceRoot":"","sources":["../../src/enums/moduleDetectionKind.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,mBAAmB;IAC3B,IAAI,IAAI;IACR,IAAI,IAAI;IACR,MAAM,IAAI;IACV,KAAK,IAAI;CACZ"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js b/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js new file mode 100644 index 0000000..fb09242 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js @@ -0,0 +1,9 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/core/compileroptions.go. DO NOT EDIT. +export var ModuleDetectionKind; +(function (ModuleDetectionKind) { + ModuleDetectionKind[ModuleDetectionKind["None"] = 0] = "None"; + ModuleDetectionKind[ModuleDetectionKind["Auto"] = 1] = "Auto"; + ModuleDetectionKind[ModuleDetectionKind["Legacy"] = 2] = "Legacy"; + ModuleDetectionKind[ModuleDetectionKind["Force"] = 3] = "Force"; +})(ModuleDetectionKind || (ModuleDetectionKind = {})); +//# sourceMappingURL=moduleDetectionKind.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js.map b/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js.map new file mode 100644 index 0000000..b7e10d9 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleDetectionKind.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"moduleDetectionKind.enum.js","sourceRoot":"","sources":["../../src/enums/moduleDetectionKind.enum.ts"],"names":[],"mappings":"AAAA,sGAAsG;AAEtG,MAAM,CAAN,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC3B,6DAAQ,CAAA;IACR,6DAAQ,CAAA;IACR,iEAAU,CAAA;IACV,+DAAS,CAAA;AACb,CAAC,EALW,mBAAmB,KAAnB,mBAAmB,QAK9B"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleDetectionKind.js b/node_modules/typescript/dist/enums/moduleDetectionKind.js new file mode 100644 index 0000000..61e7904 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleDetectionKind.js @@ -0,0 +1,9 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/core/compileroptions.go. DO NOT EDIT. +export var ModuleDetectionKind; +(function (ModuleDetectionKind) { + ModuleDetectionKind[ModuleDetectionKind["None"] = 0] = "None"; + ModuleDetectionKind[ModuleDetectionKind["Auto"] = 1] = "Auto"; + ModuleDetectionKind[ModuleDetectionKind["Legacy"] = 2] = "Legacy"; + ModuleDetectionKind[ModuleDetectionKind["Force"] = 3] = "Force"; +})(ModuleDetectionKind || (ModuleDetectionKind = {})); +//# sourceMappingURL=moduleDetectionKind.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleDetectionKind.js.map b/node_modules/typescript/dist/enums/moduleDetectionKind.js.map new file mode 100644 index 0000000..b29027f --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleDetectionKind.js.map @@ -0,0 +1 @@ +{"version":3,"file":"moduleDetectionKind.js","sourceRoot":"","sources":["../../src/enums/moduleDetectionKind.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,MAAM,CAAC,IAAI,mBAAwB,CAAC;AACpC,CAAC,UAAU,mBAAmB;IAC1B,mBAAmB,CAAC,mBAAmB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC9D,mBAAmB,CAAC,mBAAmB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC9D,mBAAmB,CAAC,mBAAmB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IAClE,mBAAmB,CAAC,mBAAmB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC;AACpE,CAAC,CAAC,CAAC,mBAAmB,IAAI,CAAC,mBAAmB,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleKind.d.ts b/node_modules/typescript/dist/enums/moduleKind.d.ts new file mode 100644 index 0000000..7040651 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleKind.d.ts @@ -0,0 +1,2 @@ +export declare var ModuleKind: any; +//# sourceMappingURL=moduleKind.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleKind.d.ts.map b/node_modules/typescript/dist/enums/moduleKind.d.ts.map new file mode 100644 index 0000000..4dda4c1 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleKind.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"moduleKind.d.ts","sourceRoot":"","sources":["../../src/enums/moduleKind.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,UAAU,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleKind.enum.d.ts b/node_modules/typescript/dist/enums/moduleKind.enum.d.ts new file mode 100644 index 0000000..d1af5b7 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleKind.enum.d.ts @@ -0,0 +1,17 @@ +export declare enum ModuleKind { + None = 0, + CommonJS = 1, + AMD = 2, + UMD = 3, + System = 4, + ES2015 = 5, + ES2020 = 6, + ES2022 = 7, + ESNext = 99, + Node16 = 100, + Node18 = 101, + Node20 = 102, + NodeNext = 199, + Preserve = 200 +} +//# sourceMappingURL=moduleKind.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleKind.enum.d.ts.map b/node_modules/typescript/dist/enums/moduleKind.enum.d.ts.map new file mode 100644 index 0000000..5893dc5 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleKind.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"moduleKind.enum.d.ts","sourceRoot":"","sources":["../../src/enums/moduleKind.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,UAAU;IAClB,IAAI,IAAI;IACR,QAAQ,IAAI;IACZ,GAAG,IAAI;IACP,GAAG,IAAI;IACP,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,KAAK;IACX,MAAM,MAAM;IACZ,MAAM,MAAM;IACZ,MAAM,MAAM;IACZ,QAAQ,MAAM;IACd,QAAQ,MAAM;CACjB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleKind.enum.js b/node_modules/typescript/dist/enums/moduleKind.enum.js new file mode 100644 index 0000000..d7d5346 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleKind.enum.js @@ -0,0 +1,19 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/core/compileroptions.go. DO NOT EDIT. +export var ModuleKind; +(function (ModuleKind) { + ModuleKind[ModuleKind["None"] = 0] = "None"; + ModuleKind[ModuleKind["CommonJS"] = 1] = "CommonJS"; + ModuleKind[ModuleKind["AMD"] = 2] = "AMD"; + ModuleKind[ModuleKind["UMD"] = 3] = "UMD"; + ModuleKind[ModuleKind["System"] = 4] = "System"; + ModuleKind[ModuleKind["ES2015"] = 5] = "ES2015"; + ModuleKind[ModuleKind["ES2020"] = 6] = "ES2020"; + ModuleKind[ModuleKind["ES2022"] = 7] = "ES2022"; + ModuleKind[ModuleKind["ESNext"] = 99] = "ESNext"; + ModuleKind[ModuleKind["Node16"] = 100] = "Node16"; + ModuleKind[ModuleKind["Node18"] = 101] = "Node18"; + ModuleKind[ModuleKind["Node20"] = 102] = "Node20"; + ModuleKind[ModuleKind["NodeNext"] = 199] = "NodeNext"; + ModuleKind[ModuleKind["Preserve"] = 200] = "Preserve"; +})(ModuleKind || (ModuleKind = {})); +//# sourceMappingURL=moduleKind.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleKind.enum.js.map b/node_modules/typescript/dist/enums/moduleKind.enum.js.map new file mode 100644 index 0000000..2b66cfc --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleKind.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"moduleKind.enum.js","sourceRoot":"","sources":["../../src/enums/moduleKind.enum.ts"],"names":[],"mappings":"AAAA,sGAAsG;AAEtG,MAAM,CAAN,IAAY,UAeX;AAfD,WAAY,UAAU;IAClB,2CAAQ,CAAA;IACR,mDAAY,CAAA;IACZ,yCAAO,CAAA;IACP,yCAAO,CAAA;IACP,+CAAU,CAAA;IACV,+CAAU,CAAA;IACV,+CAAU,CAAA;IACV,+CAAU,CAAA;IACV,gDAAW,CAAA;IACX,iDAAY,CAAA;IACZ,iDAAY,CAAA;IACZ,iDAAY,CAAA;IACZ,qDAAc,CAAA;IACd,qDAAc,CAAA;AAClB,CAAC,EAfW,UAAU,KAAV,UAAU,QAerB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleKind.js b/node_modules/typescript/dist/enums/moduleKind.js new file mode 100644 index 0000000..7769937 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleKind.js @@ -0,0 +1,19 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/core/compileroptions.go. DO NOT EDIT. +export var ModuleKind; +(function (ModuleKind) { + ModuleKind[ModuleKind["None"] = 0] = "None"; + ModuleKind[ModuleKind["CommonJS"] = 1] = "CommonJS"; + ModuleKind[ModuleKind["AMD"] = 2] = "AMD"; + ModuleKind[ModuleKind["UMD"] = 3] = "UMD"; + ModuleKind[ModuleKind["System"] = 4] = "System"; + ModuleKind[ModuleKind["ES2015"] = 5] = "ES2015"; + ModuleKind[ModuleKind["ES2020"] = 6] = "ES2020"; + ModuleKind[ModuleKind["ES2022"] = 7] = "ES2022"; + ModuleKind[ModuleKind["ESNext"] = 99] = "ESNext"; + ModuleKind[ModuleKind["Node16"] = 100] = "Node16"; + ModuleKind[ModuleKind["Node18"] = 101] = "Node18"; + ModuleKind[ModuleKind["Node20"] = 102] = "Node20"; + ModuleKind[ModuleKind["NodeNext"] = 199] = "NodeNext"; + ModuleKind[ModuleKind["Preserve"] = 200] = "Preserve"; +})(ModuleKind || (ModuleKind = {})); +//# sourceMappingURL=moduleKind.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleKind.js.map b/node_modules/typescript/dist/enums/moduleKind.js.map new file mode 100644 index 0000000..3020dca --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleKind.js.map @@ -0,0 +1 @@ +{"version":3,"file":"moduleKind.js","sourceRoot":"","sources":["../../src/enums/moduleKind.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,MAAM,CAAC,IAAI,UAAe,CAAC;AAC3B,CAAC,UAAU,UAAU;IACjB,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC5C,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IACpD,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;IAC1C,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;IAC1C,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IAChD,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IAChD,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IAChD,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IAChD,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC;IACjD,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC,GAAG,QAAQ,CAAC;IAClD,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC,GAAG,QAAQ,CAAC;IAClD,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC,GAAG,QAAQ,CAAC;IAClD,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,GAAG,CAAC,GAAG,UAAU,CAAC;IACtD,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,GAAG,CAAC,GAAG,UAAU,CAAC;AAC1D,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts b/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts new file mode 100644 index 0000000..d9a16e3 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts @@ -0,0 +1,2 @@ +export declare var ModuleResolutionKind: any; +//# sourceMappingURL=moduleResolutionKind.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts.map b/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts.map new file mode 100644 index 0000000..26db07b --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleResolutionKind.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"moduleResolutionKind.d.ts","sourceRoot":"","sources":["../../src/enums/moduleResolutionKind.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,oBAAoB,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts b/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts new file mode 100644 index 0000000..f3baec3 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts @@ -0,0 +1,9 @@ +export declare enum ModuleResolutionKind { + Unknown = 0, + Classic = 1, + Node10 = 2, + Node16 = 3, + NodeNext = 99, + Bundler = 100 +} +//# sourceMappingURL=moduleResolutionKind.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts.map b/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts.map new file mode 100644 index 0000000..f8f3aed --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleResolutionKind.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"moduleResolutionKind.enum.d.ts","sourceRoot":"","sources":["../../src/enums/moduleResolutionKind.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,oBAAoB;IAC5B,OAAO,IAAI;IACX,OAAO,IAAI;IACX,MAAM,IAAI;IACV,MAAM,IAAI;IACV,QAAQ,KAAK;IACb,OAAO,MAAM;CAChB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js b/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js new file mode 100644 index 0000000..1f22e9e --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js @@ -0,0 +1,11 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/core/compileroptions.go. DO NOT EDIT. +export var ModuleResolutionKind; +(function (ModuleResolutionKind) { + ModuleResolutionKind[ModuleResolutionKind["Unknown"] = 0] = "Unknown"; + ModuleResolutionKind[ModuleResolutionKind["Classic"] = 1] = "Classic"; + ModuleResolutionKind[ModuleResolutionKind["Node10"] = 2] = "Node10"; + ModuleResolutionKind[ModuleResolutionKind["Node16"] = 3] = "Node16"; + ModuleResolutionKind[ModuleResolutionKind["NodeNext"] = 99] = "NodeNext"; + ModuleResolutionKind[ModuleResolutionKind["Bundler"] = 100] = "Bundler"; +})(ModuleResolutionKind || (ModuleResolutionKind = {})); +//# sourceMappingURL=moduleResolutionKind.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js.map b/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js.map new file mode 100644 index 0000000..4f3c073 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleResolutionKind.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"moduleResolutionKind.enum.js","sourceRoot":"","sources":["../../src/enums/moduleResolutionKind.enum.ts"],"names":[],"mappings":"AAAA,sGAAsG;AAEtG,MAAM,CAAN,IAAY,oBAOX;AAPD,WAAY,oBAAoB;IAC5B,qEAAW,CAAA;IACX,qEAAW,CAAA;IACX,mEAAU,CAAA;IACV,mEAAU,CAAA;IACV,wEAAa,CAAA;IACb,uEAAa,CAAA;AACjB,CAAC,EAPW,oBAAoB,KAApB,oBAAoB,QAO/B"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleResolutionKind.js b/node_modules/typescript/dist/enums/moduleResolutionKind.js new file mode 100644 index 0000000..a24922b --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleResolutionKind.js @@ -0,0 +1,11 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/core/compileroptions.go. DO NOT EDIT. +export var ModuleResolutionKind; +(function (ModuleResolutionKind) { + ModuleResolutionKind[ModuleResolutionKind["Unknown"] = 0] = "Unknown"; + ModuleResolutionKind[ModuleResolutionKind["Classic"] = 1] = "Classic"; + ModuleResolutionKind[ModuleResolutionKind["Node10"] = 2] = "Node10"; + ModuleResolutionKind[ModuleResolutionKind["Node16"] = 3] = "Node16"; + ModuleResolutionKind[ModuleResolutionKind["NodeNext"] = 99] = "NodeNext"; + ModuleResolutionKind[ModuleResolutionKind["Bundler"] = 100] = "Bundler"; +})(ModuleResolutionKind || (ModuleResolutionKind = {})); +//# sourceMappingURL=moduleResolutionKind.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/moduleResolutionKind.js.map b/node_modules/typescript/dist/enums/moduleResolutionKind.js.map new file mode 100644 index 0000000..b4567a5 --- /dev/null +++ b/node_modules/typescript/dist/enums/moduleResolutionKind.js.map @@ -0,0 +1 @@ +{"version":3,"file":"moduleResolutionKind.js","sourceRoot":"","sources":["../../src/enums/moduleResolutionKind.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,MAAM,CAAC,IAAI,oBAAyB,CAAC;AACrC,CAAC,UAAU,oBAAoB;IAC3B,oBAAoB,CAAC,oBAAoB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;IACtE,oBAAoB,CAAC,oBAAoB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;IACtE,oBAAoB,CAAC,oBAAoB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IACpE,oBAAoB,CAAC,oBAAoB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IACpE,oBAAoB,CAAC,oBAAoB,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,GAAG,UAAU,CAAC;IACzE,oBAAoB,CAAC,oBAAoB,CAAC,SAAS,CAAC,GAAG,GAAG,CAAC,GAAG,SAAS,CAAC;AAC5E,CAAC,CAAC,CAAC,oBAAoB,IAAI,CAAC,oBAAoB,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/newLineKind.d.ts b/node_modules/typescript/dist/enums/newLineKind.d.ts new file mode 100644 index 0000000..bab13b9 --- /dev/null +++ b/node_modules/typescript/dist/enums/newLineKind.d.ts @@ -0,0 +1,2 @@ +export declare var NewLineKind: any; +//# sourceMappingURL=newLineKind.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/newLineKind.d.ts.map b/node_modules/typescript/dist/enums/newLineKind.d.ts.map new file mode 100644 index 0000000..99aed21 --- /dev/null +++ b/node_modules/typescript/dist/enums/newLineKind.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"newLineKind.d.ts","sourceRoot":"","sources":["../../src/enums/newLineKind.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,WAAW,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/newLineKind.enum.d.ts b/node_modules/typescript/dist/enums/newLineKind.enum.d.ts new file mode 100644 index 0000000..a619044 --- /dev/null +++ b/node_modules/typescript/dist/enums/newLineKind.enum.d.ts @@ -0,0 +1,6 @@ +export declare enum NewLineKind { + None = 0, + CRLF = 1, + LF = 2 +} +//# sourceMappingURL=newLineKind.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/newLineKind.enum.d.ts.map b/node_modules/typescript/dist/enums/newLineKind.enum.d.ts.map new file mode 100644 index 0000000..992d14e --- /dev/null +++ b/node_modules/typescript/dist/enums/newLineKind.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"newLineKind.enum.d.ts","sourceRoot":"","sources":["../../src/enums/newLineKind.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,WAAW;IACnB,IAAI,IAAI;IACR,IAAI,IAAI;IACR,EAAE,IAAI;CACT"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/newLineKind.enum.js b/node_modules/typescript/dist/enums/newLineKind.enum.js new file mode 100644 index 0000000..d4790e0 --- /dev/null +++ b/node_modules/typescript/dist/enums/newLineKind.enum.js @@ -0,0 +1,8 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/core/compileroptions.go. DO NOT EDIT. +export var NewLineKind; +(function (NewLineKind) { + NewLineKind[NewLineKind["None"] = 0] = "None"; + NewLineKind[NewLineKind["CRLF"] = 1] = "CRLF"; + NewLineKind[NewLineKind["LF"] = 2] = "LF"; +})(NewLineKind || (NewLineKind = {})); +//# sourceMappingURL=newLineKind.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/newLineKind.enum.js.map b/node_modules/typescript/dist/enums/newLineKind.enum.js.map new file mode 100644 index 0000000..ce760ae --- /dev/null +++ b/node_modules/typescript/dist/enums/newLineKind.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"newLineKind.enum.js","sourceRoot":"","sources":["../../src/enums/newLineKind.enum.ts"],"names":[],"mappings":"AAAA,sGAAsG;AAEtG,MAAM,CAAN,IAAY,WAIX;AAJD,WAAY,WAAW;IACnB,6CAAQ,CAAA;IACR,6CAAQ,CAAA;IACR,yCAAM,CAAA;AACV,CAAC,EAJW,WAAW,KAAX,WAAW,QAItB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/newLineKind.js b/node_modules/typescript/dist/enums/newLineKind.js new file mode 100644 index 0000000..c6679a9 --- /dev/null +++ b/node_modules/typescript/dist/enums/newLineKind.js @@ -0,0 +1,8 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/core/compileroptions.go. DO NOT EDIT. +export var NewLineKind; +(function (NewLineKind) { + NewLineKind[NewLineKind["None"] = 0] = "None"; + NewLineKind[NewLineKind["CRLF"] = 1] = "CRLF"; + NewLineKind[NewLineKind["LF"] = 2] = "LF"; +})(NewLineKind || (NewLineKind = {})); +//# sourceMappingURL=newLineKind.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/newLineKind.js.map b/node_modules/typescript/dist/enums/newLineKind.js.map new file mode 100644 index 0000000..9de7078 --- /dev/null +++ b/node_modules/typescript/dist/enums/newLineKind.js.map @@ -0,0 +1 @@ +{"version":3,"file":"newLineKind.js","sourceRoot":"","sources":["../../src/enums/newLineKind.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,MAAM,CAAC,IAAI,WAAgB,CAAC;AAC5B,CAAC,UAAU,WAAW;IAClB,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC9C,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC9C,WAAW,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC;AAC9C,CAAC,CAAC,CAAC,WAAW,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts b/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts new file mode 100644 index 0000000..26b893b --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts @@ -0,0 +1,2 @@ +export declare var NodeBuilderFlags: any; +//# sourceMappingURL=nodeBuilderFlags.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts.map b/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts.map new file mode 100644 index 0000000..5f4b839 --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeBuilderFlags.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"nodeBuilderFlags.d.ts","sourceRoot":"","sources":["../../src/enums/nodeBuilderFlags.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,gBAAgB,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts b/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts new file mode 100644 index 0000000..252840d --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts @@ -0,0 +1,36 @@ +export declare enum NodeBuilderFlags { + None = 0, + NoTruncation = 1, + WriteArrayAsGenericType = 2, + GenerateNamesForShadowedTypeParams = 4, + UseStructuralFallback = 8, + ForbidIndexedAccessSymbolReferences = 16, + WriteTypeArgumentsOfSignature = 32, + UseFullyQualifiedType = 64, + UseOnlyExternalAliasing = 128, + SuppressAnyReturnType = 256, + WriteTypeParametersInQualifiedName = 512, + MultilineObjectLiterals = 1024, + WriteClassExpressionAsTypeLiteral = 2048, + UseTypeOfFunction = 4096, + OmitParameterModifiers = 8192, + UseAliasDefinedOutsideCurrentScope = 16384, + UseSingleQuotesForStringLiteralType = 268435456, + NoTypeReduction = 536870912, + UseInstantiationExpressions = 1073741824, + OmitThisParameter = 33554432, + WriteCallStyleSignature = 134217728, + AllowThisInObjectLiteral = 32768, + AllowQualifiedNameInPlaceOfIdentifier = 65536, + AllowAnonymousIdentifier = 131072, + AllowEmptyUnionOrIntersection = 262144, + AllowEmptyTuple = 524288, + AllowUniqueESSymbolType = 1048576, + AllowEmptyIndexInfoType = 2097152, + AllowNodeModulesRelativePaths = 67108864, + IgnoreErrors = 70221824, + InObjectTypeLiteral = 4194304, + InTypeAlias = 8388608, + InInitialEntityName = 16777216 +} +//# sourceMappingURL=nodeBuilderFlags.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts.map b/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts.map new file mode 100644 index 0000000..42c03ff --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"nodeBuilderFlags.enum.d.ts","sourceRoot":"","sources":["../../src/enums/nodeBuilderFlags.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,gBAAgB;IACxB,IAAI,IAAI;IACR,YAAY,IAAS;IACrB,uBAAuB,IAAS;IAChC,kCAAkC,IAAS;IAC3C,qBAAqB,IAAS;IAC9B,mCAAmC,KAAS;IAC5C,6BAA6B,KAAS;IACtC,qBAAqB,KAAS;IAC9B,uBAAuB,MAAS;IAChC,qBAAqB,MAAS;IAC9B,kCAAkC,MAAS;IAC3C,uBAAuB,OAAU;IACjC,iCAAiC,OAAU;IAC3C,iBAAiB,OAAU;IAC3B,sBAAsB,OAAU;IAChC,kCAAkC,QAAU;IAC5C,mCAAmC,YAAU;IAC7C,eAAe,YAAU;IACzB,2BAA2B,aAAU;IACrC,iBAAiB,WAAU;IAC3B,uBAAuB,YAAU;IACjC,wBAAwB,QAAU;IAClC,qCAAqC,QAAU;IAC/C,wBAAwB,SAAU;IAClC,6BAA6B,SAAU;IACvC,eAAe,SAAU;IACzB,uBAAuB,UAAU;IACjC,uBAAuB,UAAU;IACjC,6BAA6B,WAAU;IACvC,YAAY,WAA0M;IACtN,mBAAmB,UAAU;IAC7B,WAAW,UAAU;IACrB,mBAAmB,WAAU;CAChC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js b/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js new file mode 100644 index 0000000..82092bd --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js @@ -0,0 +1,38 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/nodebuilder/types.go. DO NOT EDIT. +export var NodeBuilderFlags; +(function (NodeBuilderFlags) { + NodeBuilderFlags[NodeBuilderFlags["None"] = 0] = "None"; + NodeBuilderFlags[NodeBuilderFlags["NoTruncation"] = 1] = "NoTruncation"; + NodeBuilderFlags[NodeBuilderFlags["WriteArrayAsGenericType"] = 2] = "WriteArrayAsGenericType"; + NodeBuilderFlags[NodeBuilderFlags["GenerateNamesForShadowedTypeParams"] = 4] = "GenerateNamesForShadowedTypeParams"; + NodeBuilderFlags[NodeBuilderFlags["UseStructuralFallback"] = 8] = "UseStructuralFallback"; + NodeBuilderFlags[NodeBuilderFlags["ForbidIndexedAccessSymbolReferences"] = 16] = "ForbidIndexedAccessSymbolReferences"; + NodeBuilderFlags[NodeBuilderFlags["WriteTypeArgumentsOfSignature"] = 32] = "WriteTypeArgumentsOfSignature"; + NodeBuilderFlags[NodeBuilderFlags["UseFullyQualifiedType"] = 64] = "UseFullyQualifiedType"; + NodeBuilderFlags[NodeBuilderFlags["UseOnlyExternalAliasing"] = 128] = "UseOnlyExternalAliasing"; + NodeBuilderFlags[NodeBuilderFlags["SuppressAnyReturnType"] = 256] = "SuppressAnyReturnType"; + NodeBuilderFlags[NodeBuilderFlags["WriteTypeParametersInQualifiedName"] = 512] = "WriteTypeParametersInQualifiedName"; + NodeBuilderFlags[NodeBuilderFlags["MultilineObjectLiterals"] = 1024] = "MultilineObjectLiterals"; + NodeBuilderFlags[NodeBuilderFlags["WriteClassExpressionAsTypeLiteral"] = 2048] = "WriteClassExpressionAsTypeLiteral"; + NodeBuilderFlags[NodeBuilderFlags["UseTypeOfFunction"] = 4096] = "UseTypeOfFunction"; + NodeBuilderFlags[NodeBuilderFlags["OmitParameterModifiers"] = 8192] = "OmitParameterModifiers"; + NodeBuilderFlags[NodeBuilderFlags["UseAliasDefinedOutsideCurrentScope"] = 16384] = "UseAliasDefinedOutsideCurrentScope"; + NodeBuilderFlags[NodeBuilderFlags["UseSingleQuotesForStringLiteralType"] = 268435456] = "UseSingleQuotesForStringLiteralType"; + NodeBuilderFlags[NodeBuilderFlags["NoTypeReduction"] = 536870912] = "NoTypeReduction"; + NodeBuilderFlags[NodeBuilderFlags["UseInstantiationExpressions"] = 1073741824] = "UseInstantiationExpressions"; + NodeBuilderFlags[NodeBuilderFlags["OmitThisParameter"] = 33554432] = "OmitThisParameter"; + NodeBuilderFlags[NodeBuilderFlags["WriteCallStyleSignature"] = 134217728] = "WriteCallStyleSignature"; + NodeBuilderFlags[NodeBuilderFlags["AllowThisInObjectLiteral"] = 32768] = "AllowThisInObjectLiteral"; + NodeBuilderFlags[NodeBuilderFlags["AllowQualifiedNameInPlaceOfIdentifier"] = 65536] = "AllowQualifiedNameInPlaceOfIdentifier"; + NodeBuilderFlags[NodeBuilderFlags["AllowAnonymousIdentifier"] = 131072] = "AllowAnonymousIdentifier"; + NodeBuilderFlags[NodeBuilderFlags["AllowEmptyUnionOrIntersection"] = 262144] = "AllowEmptyUnionOrIntersection"; + NodeBuilderFlags[NodeBuilderFlags["AllowEmptyTuple"] = 524288] = "AllowEmptyTuple"; + NodeBuilderFlags[NodeBuilderFlags["AllowUniqueESSymbolType"] = 1048576] = "AllowUniqueESSymbolType"; + NodeBuilderFlags[NodeBuilderFlags["AllowEmptyIndexInfoType"] = 2097152] = "AllowEmptyIndexInfoType"; + NodeBuilderFlags[NodeBuilderFlags["AllowNodeModulesRelativePaths"] = 67108864] = "AllowNodeModulesRelativePaths"; + NodeBuilderFlags[NodeBuilderFlags["IgnoreErrors"] = 70221824] = "IgnoreErrors"; + NodeBuilderFlags[NodeBuilderFlags["InObjectTypeLiteral"] = 4194304] = "InObjectTypeLiteral"; + NodeBuilderFlags[NodeBuilderFlags["InTypeAlias"] = 8388608] = "InTypeAlias"; + NodeBuilderFlags[NodeBuilderFlags["InInitialEntityName"] = 16777216] = "InInitialEntityName"; +})(NodeBuilderFlags || (NodeBuilderFlags = {})); +//# sourceMappingURL=nodeBuilderFlags.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js.map b/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js.map new file mode 100644 index 0000000..5f2bbe3 --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeBuilderFlags.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"nodeBuilderFlags.enum.js","sourceRoot":"","sources":["../../src/enums/nodeBuilderFlags.enum.ts"],"names":[],"mappings":"AAAA,mGAAmG;AAEnG,MAAM,CAAN,IAAY,gBAkCX;AAlCD,WAAY,gBAAgB;IACxB,uDAAQ,CAAA;IACR,uEAAqB,CAAA;IACrB,6FAAgC,CAAA;IAChC,mHAA2C,CAAA;IAC3C,yFAA8B,CAAA;IAC9B,sHAA4C,CAAA;IAC5C,0GAAsC,CAAA;IACtC,0FAA8B,CAAA;IAC9B,+FAAgC,CAAA;IAChC,2FAA8B,CAAA;IAC9B,qHAA2C,CAAA;IAC3C,gGAAiC,CAAA;IACjC,oHAA2C,CAAA;IAC3C,oFAA2B,CAAA;IAC3B,8FAAgC,CAAA;IAChC,uHAA4C,CAAA;IAC5C,6HAA6C,CAAA;IAC7C,qFAAyB,CAAA;IACzB,8GAAqC,CAAA;IACrC,wFAA2B,CAAA;IAC3B,qGAAiC,CAAA;IACjC,mGAAkC,CAAA;IAClC,6HAA+C,CAAA;IAC/C,oGAAkC,CAAA;IAClC,8GAAuC,CAAA;IACvC,kFAAyB,CAAA;IACzB,mGAAiC,CAAA;IACjC,mGAAiC,CAAA;IACjC,gHAAuC,CAAA;IACvC,8EAAsN,CAAA;IACtN,2FAA6B,CAAA;IAC7B,2EAAqB,CAAA;IACrB,4FAA6B,CAAA;AACjC,CAAC,EAlCW,gBAAgB,KAAhB,gBAAgB,QAkC3B"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeBuilderFlags.js b/node_modules/typescript/dist/enums/nodeBuilderFlags.js new file mode 100644 index 0000000..9e3cbaa --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeBuilderFlags.js @@ -0,0 +1,38 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/nodebuilder/types.go. DO NOT EDIT. +export var NodeBuilderFlags; +(function (NodeBuilderFlags) { + NodeBuilderFlags[NodeBuilderFlags["None"] = 0] = "None"; + NodeBuilderFlags[NodeBuilderFlags["NoTruncation"] = 1] = "NoTruncation"; + NodeBuilderFlags[NodeBuilderFlags["WriteArrayAsGenericType"] = 2] = "WriteArrayAsGenericType"; + NodeBuilderFlags[NodeBuilderFlags["GenerateNamesForShadowedTypeParams"] = 4] = "GenerateNamesForShadowedTypeParams"; + NodeBuilderFlags[NodeBuilderFlags["UseStructuralFallback"] = 8] = "UseStructuralFallback"; + NodeBuilderFlags[NodeBuilderFlags["ForbidIndexedAccessSymbolReferences"] = 16] = "ForbidIndexedAccessSymbolReferences"; + NodeBuilderFlags[NodeBuilderFlags["WriteTypeArgumentsOfSignature"] = 32] = "WriteTypeArgumentsOfSignature"; + NodeBuilderFlags[NodeBuilderFlags["UseFullyQualifiedType"] = 64] = "UseFullyQualifiedType"; + NodeBuilderFlags[NodeBuilderFlags["UseOnlyExternalAliasing"] = 128] = "UseOnlyExternalAliasing"; + NodeBuilderFlags[NodeBuilderFlags["SuppressAnyReturnType"] = 256] = "SuppressAnyReturnType"; + NodeBuilderFlags[NodeBuilderFlags["WriteTypeParametersInQualifiedName"] = 512] = "WriteTypeParametersInQualifiedName"; + NodeBuilderFlags[NodeBuilderFlags["MultilineObjectLiterals"] = 1024] = "MultilineObjectLiterals"; + NodeBuilderFlags[NodeBuilderFlags["WriteClassExpressionAsTypeLiteral"] = 2048] = "WriteClassExpressionAsTypeLiteral"; + NodeBuilderFlags[NodeBuilderFlags["UseTypeOfFunction"] = 4096] = "UseTypeOfFunction"; + NodeBuilderFlags[NodeBuilderFlags["OmitParameterModifiers"] = 8192] = "OmitParameterModifiers"; + NodeBuilderFlags[NodeBuilderFlags["UseAliasDefinedOutsideCurrentScope"] = 16384] = "UseAliasDefinedOutsideCurrentScope"; + NodeBuilderFlags[NodeBuilderFlags["UseSingleQuotesForStringLiteralType"] = 268435456] = "UseSingleQuotesForStringLiteralType"; + NodeBuilderFlags[NodeBuilderFlags["NoTypeReduction"] = 536870912] = "NoTypeReduction"; + NodeBuilderFlags[NodeBuilderFlags["UseInstantiationExpressions"] = 1073741824] = "UseInstantiationExpressions"; + NodeBuilderFlags[NodeBuilderFlags["OmitThisParameter"] = 33554432] = "OmitThisParameter"; + NodeBuilderFlags[NodeBuilderFlags["WriteCallStyleSignature"] = 134217728] = "WriteCallStyleSignature"; + NodeBuilderFlags[NodeBuilderFlags["AllowThisInObjectLiteral"] = 32768] = "AllowThisInObjectLiteral"; + NodeBuilderFlags[NodeBuilderFlags["AllowQualifiedNameInPlaceOfIdentifier"] = 65536] = "AllowQualifiedNameInPlaceOfIdentifier"; + NodeBuilderFlags[NodeBuilderFlags["AllowAnonymousIdentifier"] = 131072] = "AllowAnonymousIdentifier"; + NodeBuilderFlags[NodeBuilderFlags["AllowEmptyUnionOrIntersection"] = 262144] = "AllowEmptyUnionOrIntersection"; + NodeBuilderFlags[NodeBuilderFlags["AllowEmptyTuple"] = 524288] = "AllowEmptyTuple"; + NodeBuilderFlags[NodeBuilderFlags["AllowUniqueESSymbolType"] = 1048576] = "AllowUniqueESSymbolType"; + NodeBuilderFlags[NodeBuilderFlags["AllowEmptyIndexInfoType"] = 2097152] = "AllowEmptyIndexInfoType"; + NodeBuilderFlags[NodeBuilderFlags["AllowNodeModulesRelativePaths"] = 67108864] = "AllowNodeModulesRelativePaths"; + NodeBuilderFlags[NodeBuilderFlags["IgnoreErrors"] = 70221824] = "IgnoreErrors"; + NodeBuilderFlags[NodeBuilderFlags["InObjectTypeLiteral"] = 4194304] = "InObjectTypeLiteral"; + NodeBuilderFlags[NodeBuilderFlags["InTypeAlias"] = 8388608] = "InTypeAlias"; + NodeBuilderFlags[NodeBuilderFlags["InInitialEntityName"] = 16777216] = "InInitialEntityName"; +})(NodeBuilderFlags || (NodeBuilderFlags = {})); +//# sourceMappingURL=nodeBuilderFlags.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeBuilderFlags.js.map b/node_modules/typescript/dist/enums/nodeBuilderFlags.js.map new file mode 100644 index 0000000..08f20a9 --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeBuilderFlags.js.map @@ -0,0 +1 @@ +{"version":3,"file":"nodeBuilderFlags.js","sourceRoot":"","sources":["../../src/enums/nodeBuilderFlags.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,MAAM,CAAC,IAAI,gBAAqB,CAAC;AACjC,CAAC,UAAU,gBAAgB;IACvB,gBAAgB,CAAC,gBAAgB,CAAC,MAAM,CAAC,GAAG,CAAC,C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,CAAC,GAAG,+BAA+B,CAAC;IACjH,gBAAgB,CAAC,gBAAgB,CAAC,cAAc,CAAC,GAAG,QAAQ,CAAC,GAAG,cAAc,CAAC;IAC/E,gBAAgB,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,GAAG,qBAAqB,CAAC;IAC5F,gBAAgB,CAAC,gBAAgB,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC,GAAG,aAAa,CAAC;IAC5E,gBAAgB,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,QAAQ,CAAC,GAAG,qBAAqB,CAAC;AACjG,CAAC,CAAC,CAAC,gBAAgB,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeFlags.d.ts b/node_modules/typescript/dist/enums/nodeFlags.d.ts new file mode 100644 index 0000000..63b27ee --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeFlags.d.ts @@ -0,0 +1,2 @@ +export declare var NodeFlags: any; +//# sourceMappingURL=nodeFlags.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeFlags.d.ts.map b/node_modules/typescript/dist/enums/nodeFlags.d.ts.map new file mode 100644 index 0000000..d18921f --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeFlags.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"nodeFlags.d.ts","sourceRoot":"","sources":["../../src/enums/nodeFlags.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,SAAS,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts b/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts new file mode 100644 index 0000000..2ce097b --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts @@ -0,0 +1,44 @@ +export declare enum NodeFlags { + None = 0, + Let = 1, + Const = 2, + Using = 4, + Reparsed = 8, + Synthesized = 16, + OptionalChain = 32, + ExportContext = 64, + ContainsThis = 128, + HasImplicitReturn = 256, + HasExplicitReturn = 512, + DisallowInContext = 1024, + YieldContext = 2048, + DecoratorContext = 4096, + AwaitContext = 8192, + DisallowConditionalTypesContext = 16384, + ThisNodeHasError = 32768, + JavaScriptFile = 65536, + ThisNodeOrAnySubNodesHasError = 131072, + HasAsyncFunctions = 262144, + PossiblyContainsDynamicImport = 524288, + PossiblyContainsImportMeta = 1048576, + HasJSDoc = 2097152, + JSDoc = 4194304, + Ambient = 8388608, + InWithStatement = 16777216, + JsonFile = 33554432, + PossiblyContainsDeprecatedTag = 67108864, + Unreachable = 134217728, + ReparserTransformedLiteral = 268435456, + BlockScoped = 7, + Constant = 6, + AwaitUsing = 6, + ReachabilityCheckFlags = 768, + ReachabilityAndEmitFlags = 262912, + ContextFlags = 25263104, + TypeExcludesFlags = 10240, + PermanentlySetIncrementalFlags = 1572864, + IdentifierHasExtendedUnicodeEscape = 128, + IdentifierIsInJSDocNamespace = 262144, + NestedNamespace = 32 +} +//# sourceMappingURL=nodeFlags.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts.map b/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts.map new file mode 100644 index 0000000..9af24d6 --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeFlags.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"nodeFlags.enum.d.ts","sourceRoot":"","sources":["../../src/enums/nodeFlags.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,SAAS;IACjB,IAAI,IAAI;IACR,GAAG,IAAS;IACZ,KAAK,IAAS;IACd,KAAK,IAAS;IACd,QAAQ,IAAS;IACjB,WAAW,KAAS;IACpB,aAAa,KAAS;IACtB,aAAa,KAAS;IACtB,YAAY,MAAS;IACrB,iBAAiB,MAAS;IAC1B,iBAAiB,MAAS;IAC1B,iBAAiB,OAAU;IAC3B,YAAY,OAAU;IACtB,gBAAgB,OAAU;IAC1B,YAAY,OAAU;IACtB,+BAA+B,QAAU;IACzC,gBAAgB,QAAU;IAC1B,cAAc,QAAU;IACxB,6BAA6B,SAAU;IACvC,iBAAiB,SAAU;IAC3B,6BAA6B,SAAU;IACvC,0BAA0B,UAAU;IACpC,QAAQ,UAAU;IAClB,KAAK,UAAU;IACf,OAAO,UAAU;IACjB,eAAe,WAAU;IACzB,QAAQ,WAAU;IAClB,6BAA6B,WAAU;IACvC,WAAW,YAAU;IACrB,0BAA0B,YAAU;IACpC,WAAW,IAAsB;IACjC,QAAQ,IAAgB;IACxB,UAAU,IAAgB;IAC1B,sBAAsB,MAAwC;IAC9D,wBAAwB,SAA6C;IACrE,YAAY,WAAoJ;IAChK,iBAAiB,QAA8B;IAC/C,8BAA8B,UAA6D;IAC3F,kCAAkC,MAAe;IACjD,4BAA4B,SAAoB;IAChD,eAAe,KAAgB;CAClC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeFlags.enum.js b/node_modules/typescript/dist/enums/nodeFlags.enum.js new file mode 100644 index 0000000..a54a2d7 --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeFlags.enum.js @@ -0,0 +1,46 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/ast/nodeflags.go. DO NOT EDIT. +export var NodeFlags; +(function (NodeFlags) { + NodeFlags[NodeFlags["None"] = 0] = "None"; + NodeFlags[NodeFlags["Let"] = 1] = "Let"; + NodeFlags[NodeFlags["Const"] = 2] = "Const"; + NodeFlags[NodeFlags["Using"] = 4] = "Using"; + NodeFlags[NodeFlags["Reparsed"] = 8] = "Reparsed"; + NodeFlags[NodeFlags["Synthesized"] = 16] = "Synthesized"; + NodeFlags[NodeFlags["OptionalChain"] = 32] = "OptionalChain"; + NodeFlags[NodeFlags["ExportContext"] = 64] = "ExportContext"; + NodeFlags[NodeFlags["ContainsThis"] = 128] = "ContainsThis"; + NodeFlags[NodeFlags["HasImplicitReturn"] = 256] = "HasImplicitReturn"; + NodeFlags[NodeFlags["HasExplicitReturn"] = 512] = "HasExplicitReturn"; + NodeFlags[NodeFlags["DisallowInContext"] = 1024] = "DisallowInContext"; + NodeFlags[NodeFlags["YieldContext"] = 2048] = "YieldContext"; + NodeFlags[NodeFlags["DecoratorContext"] = 4096] = "DecoratorContext"; + NodeFlags[NodeFlags["AwaitContext"] = 8192] = "AwaitContext"; + NodeFlags[NodeFlags["DisallowConditionalTypesContext"] = 16384] = "DisallowConditionalTypesContext"; + NodeFlags[NodeFlags["ThisNodeHasError"] = 32768] = "ThisNodeHasError"; + NodeFlags[NodeFlags["JavaScriptFile"] = 65536] = "JavaScriptFile"; + NodeFlags[NodeFlags["ThisNodeOrAnySubNodesHasError"] = 131072] = "ThisNodeOrAnySubNodesHasError"; + NodeFlags[NodeFlags["HasAsyncFunctions"] = 262144] = "HasAsyncFunctions"; + NodeFlags[NodeFlags["PossiblyContainsDynamicImport"] = 524288] = "PossiblyContainsDynamicImport"; + NodeFlags[NodeFlags["PossiblyContainsImportMeta"] = 1048576] = "PossiblyContainsImportMeta"; + NodeFlags[NodeFlags["HasJSDoc"] = 2097152] = "HasJSDoc"; + NodeFlags[NodeFlags["JSDoc"] = 4194304] = "JSDoc"; + NodeFlags[NodeFlags["Ambient"] = 8388608] = "Ambient"; + NodeFlags[NodeFlags["InWithStatement"] = 16777216] = "InWithStatement"; + NodeFlags[NodeFlags["JsonFile"] = 33554432] = "JsonFile"; + NodeFlags[NodeFlags["PossiblyContainsDeprecatedTag"] = 67108864] = "PossiblyContainsDeprecatedTag"; + NodeFlags[NodeFlags["Unreachable"] = 134217728] = "Unreachable"; + NodeFlags[NodeFlags["ReparserTransformedLiteral"] = 268435456] = "ReparserTransformedLiteral"; + NodeFlags[NodeFlags["BlockScoped"] = 7] = "BlockScoped"; + NodeFlags[NodeFlags["Constant"] = 6] = "Constant"; + NodeFlags[NodeFlags["AwaitUsing"] = 6] = "AwaitUsing"; + NodeFlags[NodeFlags["ReachabilityCheckFlags"] = 768] = "ReachabilityCheckFlags"; + NodeFlags[NodeFlags["ReachabilityAndEmitFlags"] = 262912] = "ReachabilityAndEmitFlags"; + NodeFlags[NodeFlags["ContextFlags"] = 25263104] = "ContextFlags"; + NodeFlags[NodeFlags["TypeExcludesFlags"] = 10240] = "TypeExcludesFlags"; + NodeFlags[NodeFlags["PermanentlySetIncrementalFlags"] = 1572864] = "PermanentlySetIncrementalFlags"; + NodeFlags[NodeFlags["IdentifierHasExtendedUnicodeEscape"] = 128] = "IdentifierHasExtendedUnicodeEscape"; + NodeFlags[NodeFlags["IdentifierIsInJSDocNamespace"] = 262144] = "IdentifierIsInJSDocNamespace"; + NodeFlags[NodeFlags["NestedNamespace"] = 32] = "NestedNamespace"; +})(NodeFlags || (NodeFlags = {})); +//# sourceMappingURL=nodeFlags.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeFlags.enum.js.map b/node_modules/typescript/dist/enums/nodeFlags.enum.js.map new file mode 100644 index 0000000..6516f16 --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeFlags.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"nodeFlags.enum.js","sourceRoot":"","sources":["../../src/enums/nodeFlags.enum.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAE/F,MAAM,CAAN,IAAY,SA0CX;AA1CD,WAAY,SAAS;IACjB,yCAAQ,CAAA;IACR,uCAAY,CAAA;IACZ,2CAAc,CAAA;IACd,2CAAc,CAAA;IACd,iDAAiB,CAAA;IACjB,wDAAoB,CAAA;IACpB,4DAAsB,CAAA;IACtB,4DAAsB,CAAA;IACtB,2DAAqB,CAAA;IACrB,qEAA0B,CAAA;IAC1B,qEAA0B,CAAA;IAC1B,sEAA2B,CAAA;IAC3B,4DAAsB,CAAA;IACtB,oEAA0B,CAAA;IAC1B,4DAAsB,CAAA;IACtB,mGAAyC,CAAA;IACzC,qEAA0B,CAAA;IAC1B,iEAAwB,CAAA;IACxB,gGAAuC,CAAA;IACvC,wEAA2B,CAAA;IAC3B,gGAAuC,CAAA;IACvC,2FAAoC,CAAA;IACpC,uDAAkB,CAAA;IAClB,iDAAe,CAAA;IACf,qDAAiB,CAAA;IACjB,sEAAyB,CAAA;IACzB,wDAAkB,CAAA;IAClB,kGAAuC,CAAA;IACvC,+DAAqB,CAAA;IACrB,6FAAoC,CAAA;IACpC,uDAAiC,CAAA;IACjC,iDAAwB,CAAA;IACxB,qDAA0B,CAAA;IAC1B,+EAA8D,CAAA;IAC9D,sFAAqE,CAAA;IACrE,gEAAgK,CAAA;IAChK,uEAA+C,CAAA;IAC/C,mGAA2F,CAAA;IAC3F,uGAAiD,CAAA;IACjD,8FAAgD,CAAA;IAChD,gEAA+B,CAAA;AACnC,CAAC,EA1CW,SAAS,KAAT,SAAS,QA0CpB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeFlags.js b/node_modules/typescript/dist/enums/nodeFlags.js new file mode 100644 index 0000000..06c1688 --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeFlags.js @@ -0,0 +1,46 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/ast/nodeflags.go. DO NOT EDIT. +export var NodeFlags; +(function (NodeFlags) { + NodeFlags[NodeFlags["None"] = 0] = "None"; + NodeFlags[NodeFlags["Let"] = 1] = "Let"; + NodeFlags[NodeFlags["Const"] = 2] = "Const"; + NodeFlags[NodeFlags["Using"] = 4] = "Using"; + NodeFlags[NodeFlags["Reparsed"] = 8] = "Reparsed"; + NodeFlags[NodeFlags["Synthesized"] = 16] = "Synthesized"; + NodeFlags[NodeFlags["OptionalChain"] = 32] = "OptionalChain"; + NodeFlags[NodeFlags["ExportContext"] = 64] = "ExportContext"; + NodeFlags[NodeFlags["ContainsThis"] = 128] = "ContainsThis"; + NodeFlags[NodeFlags["HasImplicitReturn"] = 256] = "HasImplicitReturn"; + NodeFlags[NodeFlags["HasExplicitReturn"] = 512] = "HasExplicitReturn"; + NodeFlags[NodeFlags["DisallowInContext"] = 1024] = "DisallowInContext"; + NodeFlags[NodeFlags["YieldContext"] = 2048] = "YieldContext"; + NodeFlags[NodeFlags["DecoratorContext"] = 4096] = "DecoratorContext"; + NodeFlags[NodeFlags["AwaitContext"] = 8192] = "AwaitContext"; + NodeFlags[NodeFlags["DisallowConditionalTypesContext"] = 16384] = "DisallowConditionalTypesContext"; + NodeFlags[NodeFlags["ThisNodeHasError"] = 32768] = "ThisNodeHasError"; + NodeFlags[NodeFlags["JavaScriptFile"] = 65536] = "JavaScriptFile"; + NodeFlags[NodeFlags["ThisNodeOrAnySubNodesHasError"] = 131072] = "ThisNodeOrAnySubNodesHasError"; + NodeFlags[NodeFlags["HasAsyncFunctions"] = 262144] = "HasAsyncFunctions"; + NodeFlags[NodeFlags["PossiblyContainsDynamicImport"] = 524288] = "PossiblyContainsDynamicImport"; + NodeFlags[NodeFlags["PossiblyContainsImportMeta"] = 1048576] = "PossiblyContainsImportMeta"; + NodeFlags[NodeFlags["HasJSDoc"] = 2097152] = "HasJSDoc"; + NodeFlags[NodeFlags["JSDoc"] = 4194304] = "JSDoc"; + NodeFlags[NodeFlags["Ambient"] = 8388608] = "Ambient"; + NodeFlags[NodeFlags["InWithStatement"] = 16777216] = "InWithStatement"; + NodeFlags[NodeFlags["JsonFile"] = 33554432] = "JsonFile"; + NodeFlags[NodeFlags["PossiblyContainsDeprecatedTag"] = 67108864] = "PossiblyContainsDeprecatedTag"; + NodeFlags[NodeFlags["Unreachable"] = 134217728] = "Unreachable"; + NodeFlags[NodeFlags["ReparserTransformedLiteral"] = 268435456] = "ReparserTransformedLiteral"; + NodeFlags[NodeFlags["BlockScoped"] = 7] = "BlockScoped"; + NodeFlags[NodeFlags["Constant"] = 6] = "Constant"; + NodeFlags[NodeFlags["AwaitUsing"] = 6] = "AwaitUsing"; + NodeFlags[NodeFlags["ReachabilityCheckFlags"] = 768] = "ReachabilityCheckFlags"; + NodeFlags[NodeFlags["ReachabilityAndEmitFlags"] = 262912] = "ReachabilityAndEmitFlags"; + NodeFlags[NodeFlags["ContextFlags"] = 25263104] = "ContextFlags"; + NodeFlags[NodeFlags["TypeExcludesFlags"] = 10240] = "TypeExcludesFlags"; + NodeFlags[NodeFlags["PermanentlySetIncrementalFlags"] = 1572864] = "PermanentlySetIncrementalFlags"; + NodeFlags[NodeFlags["IdentifierHasExtendedUnicodeEscape"] = 128] = "IdentifierHasExtendedUnicodeEscape"; + NodeFlags[NodeFlags["IdentifierIsInJSDocNamespace"] = 262144] = "IdentifierIsInJSDocNamespace"; + NodeFlags[NodeFlags["NestedNamespace"] = 32] = "NestedNamespace"; +})(NodeFlags || (NodeFlags = {})); +//# sourceMappingURL=nodeFlags.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/nodeFlags.js.map b/node_modules/typescript/dist/enums/nodeFlags.js.map new file mode 100644 index 0000000..8d2d11d --- /dev/null +++ b/node_modules/typescript/dist/enums/nodeFlags.js.map @@ -0,0 +1 @@ +{"version":3,"file":"nodeFlags.js","sourceRoot":"","sources":["../../src/enums/nodeFlags.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,MAAM,CAAC,IAAI,SAAc,CAAC;AAC1B,CAAC,UAAU,SAAS;IAChB,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC1C,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;IACxC,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC;IAC5C,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC;IAC5C,SAAS,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IAClD,SAAS,CAAC,SAAS,CAAC,aAAa,CAAC,GAAG,EAAE,CAAC,GAAG,aAAa,CAAC;IACzD,SAAS,CAAC,SAAS,CAAC,eAAe,CAAC,GAAG,EAAE,CAAC,GAAG,e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CAAC,SAAS,CAAC,gCAAgC,CAAC,GAAG,OAAO,CAAC,GAAG,gCAAgC,CAAC;IACpG,SAAS,CAAC,SAAS,CAAC,oCAAoC,CAAC,GAAG,GAAG,CAAC,GAAG,oCAAoC,CAAC;IACxG,SAAS,CAAC,SAAS,CAAC,8BAA8B,CAAC,GAAG,MAAM,CAAC,GAAG,8BAA8B,CAAC;IAC/F,SAAS,CAAC,SAAS,CAAC,iBAAiB,CAAC,GAAG,EAAE,CAAC,GAAG,iBAAiB,CAAC;AACrE,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/objectFlags.d.ts b/node_modules/typescript/dist/enums/objectFlags.d.ts new file mode 100644 index 0000000..1abaea2 --- /dev/null +++ b/node_modules/typescript/dist/enums/objectFlags.d.ts @@ -0,0 +1,2 @@ +export declare var ObjectFlags: any; +//# sourceMappingURL=objectFlags.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/objectFlags.d.ts.map b/node_modules/typescript/dist/enums/objectFlags.d.ts.map new file mode 100644 index 0000000..6958584 --- /dev/null +++ b/node_modules/typescript/dist/enums/objectFlags.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"objectFlags.d.ts","sourceRoot":"","sources":["../../src/enums/objectFlags.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,WAAW,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/objectFlags.enum.d.ts b/node_modules/typescript/dist/enums/objectFlags.enum.d.ts new file mode 100644 index 0000000..1339a6a --- /dev/null +++ b/node_modules/typescript/dist/enums/objectFlags.enum.d.ts @@ -0,0 +1,50 @@ +export declare enum ObjectFlags { + None = 0, + Class = 1, + Interface = 2, + Reference = 4, + Tuple = 8, + Anonymous = 16, + Mapped = 32, + Instantiated = 64, + ObjectLiteral = 128, + EvolvingArray = 256, + ObjectLiteralPatternWithComputedProperties = 512, + ReverseMapped = 1024, + JsxAttributes = 2048, + JSLiteral = 4096, + FreshLiteral = 8192, + ArrayLiteral = 16384, + PrimitiveUnion = 32768, + ContainsWideningType = 65536, + ContainsObjectOrArrayLiteral = 131072, + NonInferrableType = 262144, + CouldContainTypeVariablesComputed = 524288, + CouldContainTypeVariables = 1048576, + MembersResolved = 2097152, + ClassOrInterface = 3, + RequiresWidening = 196608, + PropagatingFlags = 458752, + InstantiatedMapped = 96, + InstantiationExpressionType = 16777216, + SingleSignatureType = 33554432, + ObjectTypeKindMask = 50332991, + ContainsSpread = 4194304, + ObjectRestType = 8388608, + IsClassInstanceClone = 67108864, + IdenticalBaseTypeCalculated = 134217728, + IdenticalBaseTypeExists = 268435456, + UnresolvedMembers = 536870912, + FromTypeNode = 1073741824, + IsGenericTypeComputed = 4194304, + IsGenericObjectType = 8388608, + IsGenericIndexType = 16777216, + IsGenericType = 25165824, + ContainsIntersections = 33554432, + IsUnknownLikeUnionComputed = 67108864, + IsUnknownLikeUnion = 134217728, + IsNeverIntersectionComputed = 33554432, + IsNeverIntersection = 67108864, + IsConstrainedTypeVariable = 134217728 +} +//# sourceMappingURL=objectFlags.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/objectFlags.enum.d.ts.map b/node_modules/typescript/dist/enums/objectFlags.enum.d.ts.map new file mode 100644 index 0000000..5c25831 --- /dev/null +++ b/node_modules/typescript/dist/enums/objectFlags.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"objectFlags.enum.d.ts","sourceRoot":"","sources":["../../src/enums/objectFlags.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,WAAW;IACnB,IAAI,IAAI;IACR,KAAK,IAAS;IACd,SAAS,IAAS;IAClB,SAAS,IAAS;IAClB,KAAK,IAAS;IACd,SAAS,KAAS;IAClB,MAAM,KAAS;IACf,YAAY,KAAS;IACrB,aAAa,MAAS;IACtB,aAAa,MAAS;IACtB,0CAA0C,MAAS;IACnD,aAAa,OAAU;IACvB,aAAa,OAAU;IACvB,SAAS,OAAU;IACnB,YAAY,OAAU;IACtB,YAAY,QAAU;IACtB,cAAc,QAAU;IACxB,oBAAoB,QAAU;IAC9B,4BAA4B,SAAU;IACtC,iBAAiB,SAAU;IAC3B,iCAAiC,SAAU;IAC3C,yBAAyB,UAAU;IACnC,eAAe,UAAU;IACzB,gBAAgB,IAAoB;IACpC,gBAAgB,SAAsD;IACtE,gBAAgB,SAA0E;IAC1F,kBAAkB,KAAwB;IAC1C,2BAA2B,WAAU;IACrC,mBAAmB,WAAU;IAC7B,kBAAkB,WAAgJ;IAClK,cAAc,UAAU;IACxB,cAAc,UAAU;IACxB,oBAAoB,WAAU;IAC9B,2BAA2B,YAAU;IACrC,uBAAuB,YAAU;IACjC,iBAAiB,YAAU;IAC3B,YAAY,aAAU;IACtB,qBAAqB,UAAU;IAC/B,mBAAmB,UAAU;IAC7B,kBAAkB,WAAU;IAC5B,aAAa,WAA2C;IACxD,qBAAqB,WAAU;IAC/B,0BAA0B,WAAU;IACpC,kBAAkB,YAAU;IAC5B,2BAA2B,WAAU;IACrC,mBAAmB,WAAU;IAC7B,yBAAyB,YAAU;CACtC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/objectFlags.enum.js b/node_modules/typescript/dist/enums/objectFlags.enum.js new file mode 100644 index 0000000..ee2b669 --- /dev/null +++ b/node_modules/typescript/dist/enums/objectFlags.enum.js @@ -0,0 +1,52 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT. +export var ObjectFlags; +(function (ObjectFlags) { + ObjectFlags[ObjectFlags["None"] = 0] = "None"; + ObjectFlags[ObjectFlags["Class"] = 1] = "Class"; + ObjectFlags[ObjectFlags["Interface"] = 2] = "Interface"; + ObjectFlags[ObjectFlags["Reference"] = 4] = "Reference"; + ObjectFlags[ObjectFlags["Tuple"] = 8] = "Tuple"; + ObjectFlags[ObjectFlags["Anonymous"] = 16] = "Anonymous"; + ObjectFlags[ObjectFlags["Mapped"] = 32] = "Mapped"; + ObjectFlags[ObjectFlags["Instantiated"] = 64] = "Instantiated"; + ObjectFlags[ObjectFlags["ObjectLiteral"] = 128] = "ObjectLiteral"; + ObjectFlags[ObjectFlags["EvolvingArray"] = 256] = "EvolvingArray"; + ObjectFlags[ObjectFlags["ObjectLiteralPatternWithComputedProperties"] = 512] = "ObjectLiteralPatternWithComputedProperties"; + ObjectFlags[ObjectFlags["ReverseMapped"] = 1024] = "ReverseMapped"; + ObjectFlags[ObjectFlags["JsxAttributes"] = 2048] = "JsxAttributes"; + ObjectFlags[ObjectFlags["JSLiteral"] = 4096] = "JSLiteral"; + ObjectFlags[ObjectFlags["FreshLiteral"] = 8192] = "FreshLiteral"; + ObjectFlags[ObjectFlags["ArrayLiteral"] = 16384] = "ArrayLiteral"; + ObjectFlags[ObjectFlags["PrimitiveUnion"] = 32768] = "PrimitiveUnion"; + ObjectFlags[ObjectFlags["ContainsWideningType"] = 65536] = "ContainsWideningType"; + ObjectFlags[ObjectFlags["ContainsObjectOrArrayLiteral"] = 131072] = "ContainsObjectOrArrayLiteral"; + ObjectFlags[ObjectFlags["NonInferrableType"] = 262144] = "NonInferrableType"; + ObjectFlags[ObjectFlags["CouldContainTypeVariablesComputed"] = 524288] = "CouldContainTypeVariablesComputed"; + ObjectFlags[ObjectFlags["CouldContainTypeVariables"] = 1048576] = "CouldContainTypeVariables"; + ObjectFlags[ObjectFlags["MembersResolved"] = 2097152] = "MembersResolved"; + ObjectFlags[ObjectFlags["ClassOrInterface"] = 3] = "ClassOrInterface"; + ObjectFlags[ObjectFlags["RequiresWidening"] = 196608] = "RequiresWidening"; + ObjectFlags[ObjectFlags["PropagatingFlags"] = 458752] = "PropagatingFlags"; + ObjectFlags[ObjectFlags["InstantiatedMapped"] = 96] = "InstantiatedMapped"; + ObjectFlags[ObjectFlags["InstantiationExpressionType"] = 16777216] = "InstantiationExpressionType"; + ObjectFlags[ObjectFlags["SingleSignatureType"] = 33554432] = "SingleSignatureType"; + ObjectFlags[ObjectFlags["ObjectTypeKindMask"] = 50332991] = "ObjectTypeKindMask"; + ObjectFlags[ObjectFlags["ContainsSpread"] = 4194304] = "ContainsSpread"; + ObjectFlags[ObjectFlags["ObjectRestType"] = 8388608] = "ObjectRestType"; + ObjectFlags[ObjectFlags["IsClassInstanceClone"] = 67108864] = "IsClassInstanceClone"; + ObjectFlags[ObjectFlags["IdenticalBaseTypeCalculated"] = 134217728] = "IdenticalBaseTypeCalculated"; + ObjectFlags[ObjectFlags["IdenticalBaseTypeExists"] = 268435456] = "IdenticalBaseTypeExists"; + ObjectFlags[ObjectFlags["UnresolvedMembers"] = 536870912] = "UnresolvedMembers"; + ObjectFlags[ObjectFlags["FromTypeNode"] = 1073741824] = "FromTypeNode"; + ObjectFlags[ObjectFlags["IsGenericTypeComputed"] = 4194304] = "IsGenericTypeComputed"; + ObjectFlags[ObjectFlags["IsGenericObjectType"] = 8388608] = "IsGenericObjectType"; + ObjectFlags[ObjectFlags["IsGenericIndexType"] = 16777216] = "IsGenericIndexType"; + ObjectFlags[ObjectFlags["IsGenericType"] = 25165824] = "IsGenericType"; + ObjectFlags[ObjectFlags["ContainsIntersections"] = 33554432] = "ContainsIntersections"; + ObjectFlags[ObjectFlags["IsUnknownLikeUnionComputed"] = 67108864] = "IsUnknownLikeUnionComputed"; + ObjectFlags[ObjectFlags["IsUnknownLikeUnion"] = 134217728] = "IsUnknownLikeUnion"; + ObjectFlags[ObjectFlags["IsNeverIntersectionComputed"] = 33554432] = "IsNeverIntersectionComputed"; + ObjectFlags[ObjectFlags["IsNeverIntersection"] = 67108864] = "IsNeverIntersection"; + ObjectFlags[ObjectFlags["IsConstrainedTypeVariable"] = 134217728] = "IsConstrainedTypeVariable"; +})(ObjectFlags || (ObjectFlags = {})); +//# sourceMappingURL=objectFlags.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/objectFlags.enum.js.map b/node_modules/typescript/dist/enums/objectFlags.enum.js.map new file mode 100644 index 0000000..89871aa --- /dev/null +++ b/node_modules/typescript/dist/enums/objectFlags.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"objectFlags.enum.js","sourceRoot":"","sources":["../../src/enums/objectFlags.enum.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAE/F,MAAM,CAAN,IAAY,WAgDX;AAhDD,WAAY,WAAW;IACnB,6CAAQ,CAAA;IACR,+CAAc,CAAA;IACd,uDAAkB,CAAA;IAClB,uDAAkB,CAAA;IAClB,+CAAc,CAAA;IACd,wDAAkB,CAAA;IAClB,kDAAe,CAAA;IACf,8DAAqB,CAAA;IACrB,iEAAsB,CAAA;IACtB,iEAAsB,CAAA;IACtB,2HAAmD,CAAA;IACnD,kEAAuB,CAAA;IACvB,kEAAuB,CAAA;IACvB,0DAAmB,CAAA;IACnB,gEAAsB,CAAA;IACtB,iEAAsB,CAAA;IACtB,qEAAwB,CAAA;IACxB,iFAA8B,CAAA;IAC9B,kGAAsC,CAAA;IACtC,4EAA2B,CAAA;IAC3B,4GAA2C,CAAA;IAC3C,6FAAmC,CAAA;IACnC,yEAAyB,CAAA;IACzB,qEAAoC,CAAA;IACpC,0EAAsE,CAAA;IACtE,0EAA0F,CAAA;IAC1F,0EAA0C,CAAA;IAC1C,kGAAqC,CAAA;IACrC,kFAA6B,CAAA;IAC7B,gFAAkK,CAAA;IAClK,uEAAwB,CAAA;IACxB,uEAAwB,CAAA;IACxB,oFAA8B,CAAA;IAC9B,mGAAqC,CAAA;IACrC,2FAAiC,CAAA;IACjC,+EAA2B,CAAA;IAC3B,sEAAsB,CAAA;IACtB,qFAA+B,CAAA;IAC/B,iFAA6B,CAAA;IAC7B,gFAA4B,CAAA;IAC5B,sEAAwD,CAAA;IACxD,sFAA+B,CAAA;IAC/B,gGAAoC,CAAA;IACpC,iFAA4B,CAAA;IAC5B,kGAAqC,CAAA;IACrC,kFAA6B,CAAA;IAC7B,+FAAmC,CAAA;AACvC,CAAC,EAhDW,WAAW,KAAX,WAAW,QAgDtB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/objectFlags.js b/node_modules/typescript/dist/enums/objectFlags.js new file mode 100644 index 0000000..09df289 --- /dev/null +++ b/node_modules/typescript/dist/enums/objectFlags.js @@ -0,0 +1,52 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT. +export var ObjectFlags; +(function (ObjectFlags) { + ObjectFlags[ObjectFlags["None"] = 0] = "None"; + ObjectFlags[ObjectFlags["Class"] = 1] = "Class"; + ObjectFlags[ObjectFlags["Interface"] = 2] = "Interface"; + ObjectFlags[ObjectFlags["Reference"] = 4] = "Reference"; + ObjectFlags[ObjectFlags["Tuple"] = 8] = "Tuple"; + ObjectFlags[ObjectFlags["Anonymous"] = 16] = "Anonymous"; + ObjectFlags[ObjectFlags["Mapped"] = 32] = "Mapped"; + ObjectFlags[ObjectFlags["Instantiated"] = 64] = "Instantiated"; + ObjectFlags[ObjectFlags["ObjectLiteral"] = 128] = "ObjectLiteral"; + ObjectFlags[ObjectFlags["EvolvingArray"] = 256] = "EvolvingArray"; + ObjectFlags[ObjectFlags["ObjectLiteralPatternWithComputedProperties"] = 512] = "ObjectLiteralPatternWithComputedProperties"; + ObjectFlags[ObjectFlags["ReverseMapped"] = 1024] = "ReverseMapped"; + ObjectFlags[ObjectFlags["JsxAttributes"] = 2048] = "JsxAttributes"; + ObjectFlags[ObjectFlags["JSLiteral"] = 4096] = "JSLiteral"; + ObjectFlags[ObjectFlags["FreshLiteral"] = 8192] = "FreshLiteral"; + ObjectFlags[ObjectFlags["ArrayLiteral"] = 16384] = "ArrayLiteral"; + ObjectFlags[ObjectFlags["PrimitiveUnion"] = 32768] = "PrimitiveUnion"; + ObjectFlags[ObjectFlags["ContainsWideningType"] = 65536] = "ContainsWideningType"; + ObjectFlags[ObjectFlags["ContainsObjectOrArrayLiteral"] = 131072] = "ContainsObjectOrArrayLiteral"; + ObjectFlags[ObjectFlags["NonInferrableType"] = 262144] = "NonInferrableType"; + ObjectFlags[ObjectFlags["CouldContainTypeVariablesComputed"] = 524288] = "CouldContainTypeVariablesComputed"; + ObjectFlags[ObjectFlags["CouldContainTypeVariables"] = 1048576] = "CouldContainTypeVariables"; + ObjectFlags[ObjectFlags["MembersResolved"] = 2097152] = "MembersResolved"; + ObjectFlags[ObjectFlags["ClassOrInterface"] = 3] = "ClassOrInterface"; + ObjectFlags[ObjectFlags["RequiresWidening"] = 196608] = "RequiresWidening"; + ObjectFlags[ObjectFlags["PropagatingFlags"] = 458752] = "PropagatingFlags"; + ObjectFlags[ObjectFlags["InstantiatedMapped"] = 96] = "InstantiatedMapped"; + ObjectFlags[ObjectFlags["InstantiationExpressionType"] = 16777216] = "InstantiationExpressionType"; + ObjectFlags[ObjectFlags["SingleSignatureType"] = 33554432] = "SingleSignatureType"; + ObjectFlags[ObjectFlags["ObjectTypeKindMask"] = 50332991] = "ObjectTypeKindMask"; + ObjectFlags[ObjectFlags["ContainsSpread"] = 4194304] = "ContainsSpread"; + ObjectFlags[ObjectFlags["ObjectRestType"] = 8388608] = "ObjectRestType"; + ObjectFlags[ObjectFlags["IsClassInstanceClone"] = 67108864] = "IsClassInstanceClone"; + ObjectFlags[ObjectFlags["IdenticalBaseTypeCalculated"] = 134217728] = "IdenticalBaseTypeCalculated"; + ObjectFlags[ObjectFlags["IdenticalBaseTypeExists"] = 268435456] = "IdenticalBaseTypeExists"; + ObjectFlags[ObjectFlags["UnresolvedMembers"] = 536870912] = "UnresolvedMembers"; + ObjectFlags[ObjectFlags["FromTypeNode"] = 1073741824] = "FromTypeNode"; + ObjectFlags[ObjectFlags["IsGenericTypeComputed"] = 4194304] = "IsGenericTypeComputed"; + ObjectFlags[ObjectFlags["IsGenericObjectType"] = 8388608] = "IsGenericObjectType"; + ObjectFlags[ObjectFlags["IsGenericIndexType"] = 16777216] = "IsGenericIndexType"; + ObjectFlags[ObjectFlags["IsGenericType"] = 25165824] = "IsGenericType"; + ObjectFlags[ObjectFlags["ContainsIntersections"] = 33554432] = "ContainsIntersections"; + ObjectFlags[ObjectFlags["IsUnknownLikeUnionComputed"] = 67108864] = "IsUnknownLikeUnionComputed"; + ObjectFlags[ObjectFlags["IsUnknownLikeUnion"] = 134217728] = "IsUnknownLikeUnion"; + ObjectFlags[ObjectFlags["IsNeverIntersectionComputed"] = 33554432] = "IsNeverIntersectionComputed"; + ObjectFlags[ObjectFlags["IsNeverIntersection"] = 67108864] = "IsNeverIntersection"; + ObjectFlags[ObjectFlags["IsConstrainedTypeVariable"] = 134217728] = "IsConstrainedTypeVariable"; +})(ObjectFlags || (ObjectFlags = {})); +//# sourceMappingURL=objectFlags.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/objectFlags.js.map b/node_modules/typescript/dist/enums/objectFlags.js.map new file mode 100644 index 0000000..0dceb41 --- /dev/null +++ b/node_modules/typescript/dist/enums/objectFlags.js.map @@ -0,0 +1 @@ +{"version":3,"file":"objectFlags.js","sourceRoot":"","sources":["../../src/enums/objectFlags.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,MAAM,CAAC,IAAI,WAAgB,CAAC;AAC5B,CAAC,UAAU,WAAW;IAClB,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC9C,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC;IAChD,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,WAAW,CAAC;IACxD,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,WAAW,CAAC;IACxD,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC;IAChD,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,GAAG,WAAW,CAAC;IACzD,WAAW,CAAC,WAAW,CAAC,QAAQ,CAAC,GAAG,EAAE,CAA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AAC,GAAG,cAAc,CAAC;IACvE,WAAW,CAAC,WAAW,CAAC,uBAAuB,CAAC,GAAG,OAAO,CAAC,GAAG,uBAAuB,CAAC;IACtF,WAAW,CAAC,WAAW,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,GAAG,qBAAqB,CAAC;IAClF,WAAW,CAAC,WAAW,CAAC,oBAAoB,CAAC,GAAG,QAAQ,CAAC,GAAG,oBAAoB,CAAC;IACjF,WAAW,CAAC,WAAW,CAAC,eAAe,CAAC,GAAG,QAAQ,CAAC,GAAG,eAAe,CAAC;IACvE,WAAW,CAAC,WAAW,CAAC,uBAAuB,CAAC,GAAG,QAAQ,CAAC,GAAG,uBAAuB,CAAC;IACvF,WAAW,CAAC,WAAW,CAAC,4BAA4B,CAAC,GAAG,QAAQ,CAAC,GAAG,4BAA4B,CAAC;IACjG,WAAW,CAAC,WAAW,CAAC,oBAAoB,CAAC,GAAG,SAAS,CAAC,GAAG,oBAAoB,CAAC;IAClF,WAAW,CAAC,WAAW,CAAC,6BAA6B,CAAC,GAAG,QAAQ,CAAC,GAAG,6BAA6B,CAAC;IACnG,WAAW,CAAC,WAAW,CAAC,qBAAqB,CAAC,GAAG,QAAQ,CAAC,GAAG,qBAAqB,CAAC;IACnF,WAAW,CAAC,WAAW,CAAC,2BAA2B,CAAC,GAAG,SAAS,CAAC,GAAG,2BAA2B,CAAC;AACpG,CAAC,CAAC,CAAC,WAAW,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts b/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts new file mode 100644 index 0000000..40792ee --- /dev/null +++ b/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts @@ -0,0 +1,2 @@ +export declare var OuterExpressionKinds: any; +//# sourceMappingURL=outerExpressionKinds.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts.map b/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts.map new file mode 100644 index 0000000..e37ad24 --- /dev/null +++ b/node_modules/typescript/dist/enums/outerExpressionKinds.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"outerExpressionKinds.d.ts","sourceRoot":"","sources":["../../src/enums/outerExpressionKinds.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,oBAAoB,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts b/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts new file mode 100644 index 0000000..744b8df --- /dev/null +++ b/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts @@ -0,0 +1,16 @@ +export declare enum OuterExpressionKinds { + Parentheses = 1, + TypeAssertions = 2, + NonNullAssertions = 4, + PartiallyEmittedExpressions = 8, + ExpressionsWithTypeArguments = 16, + Satisfies = 32, + ExcludeJSDocTypeAssertion = 64, + Assignments = 128, + Comma = 256, + Assertions = 38, + All = 63, + AllExceptAssertionsOrExpressionsWithTypeArguments = 9, + ExpressionTypePassthrough = 385 +} +//# sourceMappingURL=outerExpressionKinds.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts.map b/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts.map new file mode 100644 index 0000000..e384e35 --- /dev/null +++ b/node_modules/typescript/dist/enums/outerExpressionKinds.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"outerExpressionKinds.enum.d.ts","sourceRoot":"","sources":["../../src/enums/outerExpressionKinds.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,oBAAoB;IAC5B,WAAW,IAAS;IACpB,cAAc,IAAS;IACvB,iBAAiB,IAAS;IAC1B,2BAA2B,IAAS;IACpC,4BAA4B,KAAS;IACrC,SAAS,KAAS;IAClB,yBAAyB,KAAS;IAClC,WAAW,MAAS;IACpB,KAAK,MAAS;IACd,UAAU,KAAiD;IAC3D,GAAG,KAAwF;IAC3F,iDAAiD,IAAoD;IACrG,yBAAyB,MAAoC;CAChE"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js b/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js new file mode 100644 index 0000000..38ee9af --- /dev/null +++ b/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js @@ -0,0 +1,18 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/ast/utilities.go. DO NOT EDIT. +export var OuterExpressionKinds; +(function (OuterExpressionKinds) { + OuterExpressionKinds[OuterExpressionKinds["Parentheses"] = 1] = "Parentheses"; + OuterExpressionKinds[OuterExpressionKinds["TypeAssertions"] = 2] = "TypeAssertions"; + OuterExpressionKinds[OuterExpressionKinds["NonNullAssertions"] = 4] = "NonNullAssertions"; + OuterExpressionKinds[OuterExpressionKinds["PartiallyEmittedExpressions"] = 8] = "PartiallyEmittedExpressions"; + OuterExpressionKinds[OuterExpressionKinds["ExpressionsWithTypeArguments"] = 16] = "ExpressionsWithTypeArguments"; + OuterExpressionKinds[OuterExpressionKinds["Satisfies"] = 32] = "Satisfies"; + OuterExpressionKinds[OuterExpressionKinds["ExcludeJSDocTypeAssertion"] = 64] = "ExcludeJSDocTypeAssertion"; + OuterExpressionKinds[OuterExpressionKinds["Assignments"] = 128] = "Assignments"; + OuterExpressionKinds[OuterExpressionKinds["Comma"] = 256] = "Comma"; + OuterExpressionKinds[OuterExpressionKinds["Assertions"] = 38] = "Assertions"; + OuterExpressionKinds[OuterExpressionKinds["All"] = 63] = "All"; + OuterExpressionKinds[OuterExpressionKinds["AllExceptAssertionsOrExpressionsWithTypeArguments"] = 9] = "AllExceptAssertionsOrExpressionsWithTypeArguments"; + OuterExpressionKinds[OuterExpressionKinds["ExpressionTypePassthrough"] = 385] = "ExpressionTypePassthrough"; +})(OuterExpressionKinds || (OuterExpressionKinds = {})); +//# sourceMappingURL=outerExpressionKinds.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js.map b/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js.map new file mode 100644 index 0000000..5a22619 --- /dev/null +++ b/node_modules/typescript/dist/enums/outerExpressionKinds.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"outerExpressionKinds.enum.js","sourceRoot":"","sources":["../../src/enums/outerExpressionKinds.enum.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAE/F,MAAM,CAAN,IAAY,oBAcX;AAdD,WAAY,oBAAoB;IAC5B,6EAAoB,CAAA;IACpB,mFAAuB,CAAA;IACvB,yFAA0B,CAAA;IAC1B,6GAAoC,CAAA;IACpC,gHAAqC,CAAA;IACrC,0EAAkB,CAAA;IAClB,0GAAkC,CAAA;IAClC,+EAAoB,CAAA;IACpB,mEAAc,CAAA;IACd,4EAA2D,CAAA;IAC3D,8DAA2F,CAAA;IAC3F,yJAAqG,CAAA;IACrG,2GAA6D,CAAA;AACjE,CAAC,EAdW,oBAAoB,KAApB,oBAAoB,QAc/B"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/outerExpressionKinds.js b/node_modules/typescript/dist/enums/outerExpressionKinds.js new file mode 100644 index 0000000..ee02d82 --- /dev/null +++ b/node_modules/typescript/dist/enums/outerExpressionKinds.js @@ -0,0 +1,18 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/ast/utilities.go. DO NOT EDIT. +export var OuterExpressionKinds; +(function (OuterExpressionKinds) { + OuterExpressionKinds[OuterExpressionKinds["Parentheses"] = 1] = "Parentheses"; + OuterExpressionKinds[OuterExpressionKinds["TypeAssertions"] = 2] = "TypeAssertions"; + OuterExpressionKinds[OuterExpressionKinds["NonNullAssertions"] = 4] = "NonNullAssertions"; + OuterExpressionKinds[OuterExpressionKinds["PartiallyEmittedExpressions"] = 8] = "PartiallyEmittedExpressions"; + OuterExpressionKinds[OuterExpressionKinds["ExpressionsWithTypeArguments"] = 16] = "ExpressionsWithTypeArguments"; + OuterExpressionKinds[OuterExpressionKinds["Satisfies"] = 32] = "Satisfies"; + OuterExpressionKinds[OuterExpressionKinds["ExcludeJSDocTypeAssertion"] = 64] = "ExcludeJSDocTypeAssertion"; + OuterExpressionKinds[OuterExpressionKinds["Assignments"] = 128] = "Assignments"; + OuterExpressionKinds[OuterExpressionKinds["Comma"] = 256] = "Comma"; + OuterExpressionKinds[OuterExpressionKinds["Assertions"] = 38] = "Assertions"; + OuterExpressionKinds[OuterExpressionKinds["All"] = 63] = "All"; + OuterExpressionKinds[OuterExpressionKinds["AllExceptAssertionsOrExpressionsWithTypeArguments"] = 9] = "AllExceptAssertionsOrExpressionsWithTypeArguments"; + OuterExpressionKinds[OuterExpressionKinds["ExpressionTypePassthrough"] = 385] = "ExpressionTypePassthrough"; +})(OuterExpressionKinds || (OuterExpressionKinds = {})); +//# sourceMappingURL=outerExpressionKinds.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/outerExpressionKinds.js.map b/node_modules/typescript/dist/enums/outerExpressionKinds.js.map new file mode 100644 index 0000000..79a9e89 --- /dev/null +++ b/node_modules/typescript/dist/enums/outerExpressionKinds.js.map @@ -0,0 +1 @@ +{"version":3,"file":"outerExpressionKinds.js","sourceRoot":"","sources":["../../src/enums/outerExpressionKinds.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,MAAM,CAAC,IAAI,oBAAyB,CAAC;AACrC,CAAC,UAAU,oBAAoB;IAC3B,oBAAoB,CAAC,oBAAoB,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC;IAC9E,oBAAoB,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,GAAG,gBAAgB,CAAC;IACpF,oBAAoB,CAAC,oBAAoB,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,GAAG,mBAAmB,CAAC;IAC1F,oBAAoB,CAAC,oBAAoB,CAAC,6BAA6B,CAAC,GAAG,CAAC,CAAC,GAAG,6BAA6B,CAAC;IAC9G,oBAAoB,CAAC,oBAAoB,CAAC,8BAA8B,CAAC,GAAG,EAAE,CAAC,GAAG,8BAA8B,CAAC;IACjH,oBAAoB,CAAC,oBAAoB,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,GAAG,WAAW,CAAC;IAC3E,oBAAoB,CAAC,oBAAoB,CAAC,2BAA2B,CAAC,GAAG,EAAE,CAAC,GAAG,2BAA2B,CAAC;IAC3G,oBAAoB,CAAC,oBAAoB,CAAC,aAAa,CAAC,GAAG,GAAG,CAAC,GAAG,aAAa,CAAC;IAChF,oBAAoB,CAAC,oBAAoB,CAAC,OAAO,CAAC,GAAG,GAAG,CAAC,GAAG,OAAO,CAAC;IACpE,oBAAoB,CAAC,oBAAoB,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,GAAG,YAAY,CAAC;IAC7E,oBAAoB,CAAC,oBAAoB,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,GAAG,KAAK,CAAC;IAC/D,oBAAoB,CAAC,oBAAoB,CAAC,mDAAmD,CAAC,GAAG,CAAC,CAAC,GAAG,mDAAmD,CAAC;IAC1J,oBAAoB,CAAC,oBAAoB,CAAC,2BAA2B,CAAC,GAAG,GAAG,CAAC,GAAG,2BAA2B,CAAC;AAChH,CAAC,CAAC,CAAC,oBAAoB,IAAI,CAAC,oBAAoB,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts b/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts new file mode 100644 index 0000000..bd90aa0 --- /dev/null +++ b/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts @@ -0,0 +1,2 @@ +export declare var RegularExpressionFlags: any; +//# sourceMappingURL=regularExpressionFlags.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts.map b/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts.map new file mode 100644 index 0000000..cd0e2e8 --- /dev/null +++ b/node_modules/typescript/dist/enums/regularExpressionFlags.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"regularExpressionFlags.d.ts","sourceRoot":"","sources":["../../src/enums/regularExpressionFlags.ts"],"names":[],"mappings":"AAAA,eAAO,IAAI,sBAAsB,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts b/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts new file mode 100644 index 0000000..2245516 --- /dev/null +++ b/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts @@ -0,0 +1,13 @@ +export declare enum RegularExpressionFlags { + None = 0, + HasIndices = 1, + Global = 2, + IgnoreCase = 4, + Multiline = 8, + DotAll = 16, + Unicode = 32, + UnicodeSets = 64, + Sticky = 128, + AnyUnicodeMode = 96 +} +//# sourceMappingURL=regularExpressionFlags.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts.map b/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts.map new file mode 100644 index 0000000..78e5f52 --- /dev/null +++ b/node_modules/typescript/dist/enums/regularExpressionFlags.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"regularExpressionFlags.enum.d.ts","sourceRoot":"","sources":["../../src/enums/regularExpressionFlags.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,sBAAsB;IAC9B,IAAI,IAAI;IACR,UAAU,IAAS;IACnB,MAAM,IAAS;IACf,UAAU,IAAS;IACnB,SAAS,IAAS;IAClB,MAAM,KAAS;IACf,OAAO,KAAS;IAChB,WAAW,KAAS;IACpB,MAAM,MAAS;IACf,cAAc,KAAwB;CACzC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js b/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js new file mode 100644 index 0000000..f0e40c6 --- /dev/null +++ b/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js @@ -0,0 +1,14 @@ +export var RegularExpressionFlags; +(function (RegularExpressionFlags) { + RegularExpressionFlags[RegularExpressionFlags["None"] = 0] = "None"; + RegularExpressionFlags[RegularExpressionFlags["HasIndices"] = 1] = "HasIndices"; + RegularExpressionFlags[RegularExpressionFlags["Global"] = 2] = "Global"; + RegularExpressionFlags[RegularExpressionFlags["IgnoreCase"] = 4] = "IgnoreCase"; + RegularExpressionFlags[RegularExpressionFlags["Multiline"] = 8] = "Multiline"; + RegularExpressionFlags[RegularExpressionFlags["DotAll"] = 16] = "DotAll"; + RegularExpressionFlags[RegularExpressionFlags["Unicode"] = 32] = "Unicode"; + RegularExpressionFlags[RegularExpressionFlags["UnicodeSets"] = 64] = "UnicodeSets"; + RegularExpressionFlags[RegularExpressionFlags["Sticky"] = 128] = "Sticky"; + RegularExpressionFlags[RegularExpressionFlags["AnyUnicodeMode"] = 96] = "AnyUnicodeMode"; +})(RegularExpressionFlags || (RegularExpressionFlags = {})); +//# sourceMappingURL=regularExpressionFlags.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js.map b/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js.map new file mode 100644 index 0000000..e8cbb91 --- /dev/null +++ b/node_modules/typescript/dist/enums/regularExpressionFlags.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"regularExpressionFlags.enum.js","sourceRoot":"","sources":["../../src/enums/regularExpressionFlags.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,sBAWX;AAXD,WAAY,sBAAsB;IAC9B,mEAAQ,CAAA;IACR,+EAAmB,CAAA;IACnB,uEAAe,CAAA;IACf,+EAAmB,CAAA;IACnB,6EAAkB,CAAA;IAClB,wEAAe,CAAA;IACf,0EAAgB,CAAA;IAChB,kFAAoB,CAAA;IACpB,yEAAe,CAAA;IACf,wFAAsC,CAAA;AAC1C,CAAC,EAXW,sBAAsB,KAAtB,sBAAsB,QAWjC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/regularExpressionFlags.js b/node_modules/typescript/dist/enums/regularExpressionFlags.js new file mode 100644 index 0000000..0a42b37 --- /dev/null +++ b/node_modules/typescript/dist/enums/regularExpressionFlags.js @@ -0,0 +1,14 @@ +export var RegularExpressionFlags; +(function (RegularExpressionFlags) { + RegularExpressionFlags[RegularExpressionFlags["None"] = 0] = "None"; + RegularExpressionFlags[RegularExpressionFlags["HasIndices"] = 1] = "HasIndices"; + RegularExpressionFlags[RegularExpressionFlags["Global"] = 2] = "Global"; + RegularExpressionFlags[RegularExpressionFlags["IgnoreCase"] = 4] = "IgnoreCase"; + RegularExpressionFlags[RegularExpressionFlags["Multiline"] = 8] = "Multiline"; + RegularExpressionFlags[RegularExpressionFlags["DotAll"] = 16] = "DotAll"; + RegularExpressionFlags[RegularExpressionFlags["Unicode"] = 32] = "Unicode"; + RegularExpressionFlags[RegularExpressionFlags["UnicodeSets"] = 64] = "UnicodeSets"; + RegularExpressionFlags[RegularExpressionFlags["Sticky"] = 128] = "Sticky"; + RegularExpressionFlags[RegularExpressionFlags["AnyUnicodeMode"] = 96] = "AnyUnicodeMode"; +})(RegularExpressionFlags || (RegularExpressionFlags = {})); +//# sourceMappingURL=regularExpressionFlags.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/regularExpressionFlags.js.map b/node_modules/typescript/dist/enums/regularExpressionFlags.js.map new file mode 100644 index 0000000..2e0abc3 --- /dev/null +++ b/node_modules/typescript/dist/enums/regularExpressionFlags.js.map @@ -0,0 +1 @@ +{"version":3,"file":"regularExpressionFlags.js","sourceRoot":"","sources":["../../src/enums/regularExpressionFlags.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAI,sBAA2B,CAAC;AACvC,CAAC,UAAU,sBAAsB;IAC7B,sBAAsB,CAAC,sBAAsB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IACpE,sBAAsB,CAAC,sBAAsB,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,YAAY,CAAC;IAChF,sBAAsB,CAAC,sBAAsB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IACxE,sBAAsB,CAAC,sBAAsB,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,YAAY,CAAC;IAChF,sBAAsB,CAAC,sBAAsB,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,WAAW,CAAC;IAC9E,sBAAsB,CAAC,sBAAsB,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC;IACzE,sBAAsB,CAAC,sBAAsB,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,GAAG,SAAS,CAAC;IAC3E,sBAAsB,CAAC,sBAAsB,CAAC,aAAa,CAAC,GAAG,EAAE,CAAC,GAAG,aAAa,CAAC;IACnF,sBAAsB,CAAC,sBAAsB,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC,GAAG,QAAQ,CAAC;IAC1E,sBAAsB,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,GAAG,EAAE,CAAC,GAAG,gBAAgB,CAAC;AAC7F,CAAC,CAAC,CAAC,sBAAsB,IAAI,CAAC,sBAAsB,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptKind.d.ts b/node_modules/typescript/dist/enums/scriptKind.d.ts new file mode 100644 index 0000000..d6e8066 --- /dev/null +++ b/node_modules/typescript/dist/enums/scriptKind.d.ts @@ -0,0 +1,2 @@ +export declare var ScriptKind: any; +//# sourceMappingURL=scriptKind.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptKind.d.ts.map b/node_modules/typescript/dist/enums/scriptKind.d.ts.map new file mode 100644 index 0000000..96a351d --- /dev/null +++ b/node_modules/typescript/dist/enums/scriptKind.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"scriptKind.d.ts","sourceRoot":"","sources":["../../src/enums/scriptKind.ts"],"names":[],"mappings":"AAAA,eAAO,IAAI,UAAU,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptKind.enum.d.ts b/node_modules/typescript/dist/enums/scriptKind.enum.d.ts new file mode 100644 index 0000000..1619aa8 --- /dev/null +++ b/node_modules/typescript/dist/enums/scriptKind.enum.d.ts @@ -0,0 +1,11 @@ +export declare enum ScriptKind { + Unknown = 0, + JS = 1, + JSX = 2, + TS = 3, + TSX = 4, + External = 5, + JSON = 6, + Deferred = 7 +} +//# sourceMappingURL=scriptKind.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptKind.enum.d.ts.map b/node_modules/typescript/dist/enums/scriptKind.enum.d.ts.map new file mode 100644 index 0000000..f866236 --- /dev/null +++ b/node_modules/typescript/dist/enums/scriptKind.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"scriptKind.enum.d.ts","sourceRoot":"","sources":["../../src/enums/scriptKind.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IAClB,OAAO,IAAI;IACX,EAAE,IAAI;IACN,GAAG,IAAI;IACP,EAAE,IAAI;IACN,GAAG,IAAI;IACP,QAAQ,IAAI;IACZ,IAAI,IAAI;IACR,QAAQ,IAAI;CACf"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptKind.enum.js b/node_modules/typescript/dist/enums/scriptKind.enum.js new file mode 100644 index 0000000..508c364 --- /dev/null +++ b/node_modules/typescript/dist/enums/scriptKind.enum.js @@ -0,0 +1,12 @@ +export var ScriptKind; +(function (ScriptKind) { + ScriptKind[ScriptKind["Unknown"] = 0] = "Unknown"; + ScriptKind[ScriptKind["JS"] = 1] = "JS"; + ScriptKind[ScriptKind["JSX"] = 2] = "JSX"; + ScriptKind[ScriptKind["TS"] = 3] = "TS"; + ScriptKind[ScriptKind["TSX"] = 4] = "TSX"; + ScriptKind[ScriptKind["External"] = 5] = "External"; + ScriptKind[ScriptKind["JSON"] = 6] = "JSON"; + ScriptKind[ScriptKind["Deferred"] = 7] = "Deferred"; +})(ScriptKind || (ScriptKind = {})); +//# sourceMappingURL=scriptKind.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptKind.enum.js.map b/node_modules/typescript/dist/enums/scriptKind.enum.js.map new file mode 100644 index 0000000..d46698b --- /dev/null +++ b/node_modules/typescript/dist/enums/scriptKind.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scriptKind.enum.js","sourceRoot":"","sources":["../../src/enums/scriptKind.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,UASX;AATD,WAAY,UAAU;IAClB,iDAAW,CAAA;IACX,uCAAM,CAAA;IACN,yCAAO,CAAA;IACP,uCAAM,CAAA;IACN,yCAAO,CAAA;IACP,mDAAY,CAAA;IACZ,2CAAQ,CAAA;IACR,mDAAY,CAAA;AAChB,CAAC,EATW,UAAU,KAAV,UAAU,QASrB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptKind.js b/node_modules/typescript/dist/enums/scriptKind.js new file mode 100644 index 0000000..0ea80e1 --- /dev/null +++ b/node_modules/typescript/dist/enums/scriptKind.js @@ -0,0 +1,12 @@ +export var ScriptKind; +(function (ScriptKind) { + ScriptKind[ScriptKind["Unknown"] = 0] = "Unknown"; + ScriptKind[ScriptKind["JS"] = 1] = "JS"; + ScriptKind[ScriptKind["JSX"] = 2] = "JSX"; + ScriptKind[ScriptKind["TS"] = 3] = "TS"; + ScriptKind[ScriptKind["TSX"] = 4] = "TSX"; + ScriptKind[ScriptKind["External"] = 5] = "External"; + ScriptKind[ScriptKind["JSON"] = 6] = "JSON"; + ScriptKind[ScriptKind["Deferred"] = 7] = "Deferred"; +})(ScriptKind || (ScriptKind = {})); +//# sourceMappingURL=scriptKind.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptKind.js.map b/node_modules/typescript/dist/enums/scriptKind.js.map new file mode 100644 index 0000000..4b281cf --- /dev/null +++ b/node_modules/typescript/dist/enums/scriptKind.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scriptKind.js","sourceRoot":"","sources":["../../src/enums/scriptKind.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAI,UAAe,CAAC;AAC3B,CAAC,UAAU,UAAU;IACjB,UAAU,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;IAClD,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC;IACxC,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;IAC1C,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC;IACxC,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;IAC1C,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IACpD,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC5C,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;AACxD,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptTarget.d.ts b/node_modules/typescript/dist/enums/scriptTarget.d.ts new file mode 100644 index 0000000..79b7100 --- /dev/null +++ b/node_modules/typescript/dist/enums/scriptTarget.d.ts @@ -0,0 +1,2 @@ +export declare var ScriptTarget: any; +//# sourceMappingURL=scriptTarget.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptTarget.d.ts.map b/node_modules/typescript/dist/enums/scriptTarget.d.ts.map new file mode 100644 index 0000000..354fb54 --- /dev/null +++ b/node_modules/typescript/dist/enums/scriptTarget.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"scriptTarget.d.ts","sourceRoot":"","sources":["../../src/enums/scriptTarget.ts"],"names":[],"mappings":"AAAA,eAAO,IAAI,YAAY,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts b/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts new file mode 100644 index 0000000..6f2620c --- /dev/null +++ b/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts @@ -0,0 +1,17 @@ +export declare enum ScriptTarget { + ES2015 = 2, + ES2016 = 3, + ES2017 = 4, + ES2018 = 5, + ES2019 = 6, + ES2020 = 7, + ES2021 = 8, + ES2022 = 9, + ES2023 = 10, + ES2024 = 11, + ES2025 = 12, + ESNext = 99, + JSON = 100, + Latest = 99 +} +//# sourceMappingURL=scriptTarget.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts.map b/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts.map new file mode 100644 index 0000000..20ad986 --- /dev/null +++ b/node_modules/typescript/dist/enums/scriptTarget.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"scriptTarget.enum.d.ts","sourceRoot":"","sources":["../../src/enums/scriptTarget.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACpB,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,KAAK;IACX,MAAM,KAAK;IACX,MAAM,KAAK;IACX,MAAM,KAAK;IACX,IAAI,MAAM;IACV,MAAM,KAAS;CAClB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptTarget.enum.js b/node_modules/typescript/dist/enums/scriptTarget.enum.js new file mode 100644 index 0000000..314ca02 --- /dev/null +++ b/node_modules/typescript/dist/enums/scriptTarget.enum.js @@ -0,0 +1,18 @@ +export var ScriptTarget; +(function (ScriptTarget) { + ScriptTarget[ScriptTarget["ES2015"] = 2] = "ES2015"; + ScriptTarget[ScriptTarget["ES2016"] = 3] = "ES2016"; + ScriptTarget[ScriptTarget["ES2017"] = 4] = "ES2017"; + ScriptTarget[ScriptTarget["ES2018"] = 5] = "ES2018"; + ScriptTarget[ScriptTarget["ES2019"] = 6] = "ES2019"; + ScriptTarget[ScriptTarget["ES2020"] = 7] = "ES2020"; + ScriptTarget[ScriptTarget["ES2021"] = 8] = "ES2021"; + ScriptTarget[ScriptTarget["ES2022"] = 9] = "ES2022"; + ScriptTarget[ScriptTarget["ES2023"] = 10] = "ES2023"; + ScriptTarget[ScriptTarget["ES2024"] = 11] = "ES2024"; + ScriptTarget[ScriptTarget["ES2025"] = 12] = "ES2025"; + ScriptTarget[ScriptTarget["ESNext"] = 99] = "ESNext"; + ScriptTarget[ScriptTarget["JSON"] = 100] = "JSON"; + ScriptTarget[ScriptTarget["Latest"] = 99] = "Latest"; +})(ScriptTarget || (ScriptTarget = {})); +//# sourceMappingURL=scriptTarget.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptTarget.enum.js.map b/node_modules/typescript/dist/enums/scriptTarget.enum.js.map new file mode 100644 index 0000000..a164740 --- /dev/null +++ b/node_modules/typescript/dist/enums/scriptTarget.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scriptTarget.enum.js","sourceRoot":"","sources":["../../src/enums/scriptTarget.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,YAeX;AAfD,WAAY,YAAY;IACpB,mDAAU,CAAA;IACV,mDAAU,CAAA;IACV,mDAAU,CAAA;IACV,mDAAU,CAAA;IACV,mDAAU,CAAA;IACV,mDAAU,CAAA;IACV,mDAAU,CAAA;IACV,mDAAU,CAAA;IACV,oDAAW,CAAA;IACX,oDAAW,CAAA;IACX,oDAAW,CAAA;IACX,oDAAW,CAAA;IACX,iDAAU,CAAA;IACV,oDAAe,CAAA;AACnB,CAAC,EAfW,YAAY,KAAZ,YAAY,QAevB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptTarget.js b/node_modules/typescript/dist/enums/scriptTarget.js new file mode 100644 index 0000000..8212a1d --- /dev/null +++ b/node_modules/typescript/dist/enums/scriptTarget.js @@ -0,0 +1,18 @@ +export var ScriptTarget; +(function (ScriptTarget) { + ScriptTarget[ScriptTarget["ES2015"] = 2] = "ES2015"; + ScriptTarget[ScriptTarget["ES2016"] = 3] = "ES2016"; + ScriptTarget[ScriptTarget["ES2017"] = 4] = "ES2017"; + ScriptTarget[ScriptTarget["ES2018"] = 5] = "ES2018"; + ScriptTarget[ScriptTarget["ES2019"] = 6] = "ES2019"; + ScriptTarget[ScriptTarget["ES2020"] = 7] = "ES2020"; + ScriptTarget[ScriptTarget["ES2021"] = 8] = "ES2021"; + ScriptTarget[ScriptTarget["ES2022"] = 9] = "ES2022"; + ScriptTarget[ScriptTarget["ES2023"] = 10] = "ES2023"; + ScriptTarget[ScriptTarget["ES2024"] = 11] = "ES2024"; + ScriptTarget[ScriptTarget["ES2025"] = 12] = "ES2025"; + ScriptTarget[ScriptTarget["ESNext"] = 99] = "ESNext"; + ScriptTarget[ScriptTarget["JSON"] = 100] = "JSON"; + ScriptTarget[ScriptTarget["Latest"] = 99] = "Latest"; +})(ScriptTarget || (ScriptTarget = {})); +//# sourceMappingURL=scriptTarget.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/scriptTarget.js.map b/node_modules/typescript/dist/enums/scriptTarget.js.map new file mode 100644 index 0000000..3ae3f5a --- /dev/null +++ b/node_modules/typescript/dist/enums/scriptTarget.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scriptTarget.js","sourceRoot":"","sources":["../../src/enums/scriptTarget.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAI,YAAiB,CAAC;AAC7B,CAAC,UAAU,YAAY;IACnB,YAAY,CAAC,YAAY,CAAC,QA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escript/dist/enums/signatureFlags.d.ts new file mode 100644 index 0000000..79a98f1 --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureFlags.d.ts @@ -0,0 +1,2 @@ +export declare var SignatureFlags: any; +//# sourceMappingURL=signatureFlags.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/signatureFlags.d.ts.map b/node_modules/typescript/dist/enums/signatureFlags.d.ts.map new file mode 100644 index 0000000..467ac94 --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureFlags.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"signatureFlags.d.ts","sourceRoot":"","sources":["../../src/enums/signatureFlags.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,cAAc,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts b/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts new file mode 100644 index 0000000..def530a --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts @@ -0,0 +1,15 @@ +export declare enum SignatureFlags { + None = 0, + HasRestParameter = 1, + HasLiteralTypes = 2, + Construct = 4, + Abstract = 8, + IsInnerCallChain = 16, + IsOuterCallChain = 32, + IsUntypedSignatureInJSFile = 64, + IsNonInferrable = 128, + IsSignatureCandidateForOverloadFailure = 256, + PropagatingFlags = 335, + CallChainFlags = 48 +} +//# sourceMappingURL=signatureFlags.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts.map b/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts.map new file mode 100644 index 0000000..8e2c092 --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureFlags.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"signatureFlags.enum.d.ts","sourceRoot":"","sources":["../../src/enums/signatureFlags.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,cAAc;IACtB,IAAI,IAAI;IACR,gBAAgB,IAAS;IACzB,eAAe,IAAS;IACxB,SAAS,IAAS;IAClB,QAAQ,IAAS;IACjB,gBAAgB,KAAS;IACzB,gBAAgB,KAAS;IACzB,0BAA0B,KAAS;IACnC,eAAe,MAAS;IACxB,sCAAsC,MAAS;IAC/C,gBAAgB,MAAkI;IAClJ,cAAc,KAAsC;CACvD"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/signatureFlags.enum.js b/node_modules/typescript/dist/enums/signatureFlags.enum.js new file mode 100644 index 0000000..83305ea --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureFlags.enum.js @@ -0,0 +1,17 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT. +export var SignatureFlags; +(function (SignatureFlags) { + SignatureFlags[SignatureFlags["None"] = 0] = "None"; + SignatureFlags[SignatureFlags["HasRestParameter"] = 1] = "HasRestParameter"; + SignatureFlags[SignatureFlags["HasLiteralTypes"] = 2] = "HasLiteralTypes"; + SignatureFlags[SignatureFlags["Construct"] = 4] = "Construct"; + SignatureFlags[SignatureFlags["Abstract"] = 8] = "Abstract"; + SignatureFlags[SignatureFlags["IsInnerCallChain"] = 16] = "IsInnerCallChain"; + SignatureFlags[SignatureFlags["IsOuterCallChain"] = 32] = "IsOuterCallChain"; + SignatureFlags[SignatureFlags["IsUntypedSignatureInJSFile"] = 64] = "IsUntypedSignatureInJSFile"; + SignatureFlags[SignatureFlags["IsNonInferrable"] = 128] = "IsNonInferrable"; + SignatureFlags[SignatureFlags["IsSignatureCandidateForOverloadFailure"] = 256] = "IsSignatureCandidateForOverloadFailure"; + SignatureFlags[SignatureFlags["PropagatingFlags"] = 335] = "PropagatingFlags"; + SignatureFlags[SignatureFlags["CallChainFlags"] = 48] = "CallChainFlags"; +})(SignatureFlags || (SignatureFlags = {})); +//# sourceMappingURL=signatureFlags.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/signatureFlags.enum.js.map b/node_modules/typescript/dist/enums/signatureFlags.enum.js.map new file mode 100644 index 0000000..20ff280 --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureFlags.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"signatureFlags.enum.js","sourceRoot":"","sources":["../../src/enums/signatureFlags.enum.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAE/F,MAAM,CAAN,IAAY,cAaX;AAbD,WAAY,cAAc;IACtB,mDAAQ,CAAA;IACR,2EAAyB,CAAA;IACzB,yEAAwB,CAAA;IACxB,6DAAkB,CAAA;IAClB,2DAAiB,CAAA;IACjB,4EAAyB,CAAA;IACzB,4EAAyB,CAAA;IACzB,gGAAmC,CAAA;IACnC,2EAAwB,CAAA;IACxB,yHAA+C,CAAA;IAC/C,6EAAkJ,CAAA;IAClJ,wEAAoD,CAAA;AACxD,CAAC,EAbW,cAAc,KAAd,cAAc,QAazB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/signatureFlags.js b/node_modules/typescript/dist/enums/signatureFlags.js new file mode 100644 index 0000000..5cb7bc5 --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureFlags.js @@ -0,0 +1,17 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT. +export var SignatureFlags; +(function (SignatureFlags) { + SignatureFlags[SignatureFlags["None"] = 0] = "None"; + SignatureFlags[SignatureFlags["HasRestParameter"] = 1] = "HasRestParameter"; + SignatureFlags[SignatureFlags["HasLiteralTypes"] = 2] = "HasLiteralTypes"; + SignatureFlags[SignatureFlags["Construct"] = 4] = "Construct"; + SignatureFlags[SignatureFlags["Abstract"] = 8] = "Abstract"; + SignatureFlags[SignatureFlags["IsInnerCallChain"] = 16] = "IsInnerCallChain"; + SignatureFlags[SignatureFlags["IsOuterCallChain"] = 32] = "IsOuterCallChain"; + SignatureFlags[SignatureFlags["IsUntypedSignatureInJSFile"] = 64] = "IsUntypedSignatureInJSFile"; + SignatureFlags[SignatureFlags["IsNonInferrable"] = 128] = "IsNonInferrable"; + SignatureFlags[SignatureFlags["IsSignatureCandidateForOverloadFailure"] = 256] = "IsSignatureCandidateForOverloadFailure"; + SignatureFlags[SignatureFlags["PropagatingFlags"] = 335] = "PropagatingFlags"; + SignatureFlags[SignatureFlags["CallChainFlags"] = 48] = "CallChainFlags"; +})(SignatureFlags || (SignatureFlags = {})); +//# sourceMappingURL=signatureFlags.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/signatureFlags.js.map b/node_modules/typescript/dist/enums/signatureFlags.js.map new file mode 100644 index 0000000..f9be5e5 --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureFlags.js.map @@ -0,0 +1 @@ +{"version":3,"file":"signatureFlags.js","sourceRoot":"","sources":["../../src/enums/signatureFlags.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,MAAM,CAAC,IAAI,cAAmB,CAAC;AAC/B,CAAC,UAAU,cAAc;IACrB,cAAc,CAAC,cAAc,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IACpD,cAAc,CAAC,cAAc,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,GAAG,kBAAkB,CAAC;IAC5E,cAAc,CAAC,cAAc,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,GAAG,iBAAiB,CAAC;IAC1E,cAAc,CAAC,cAAc,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,WAAW,CAAC;IAC9D,cAAc,CAAC,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IAC5D,cAAc,CAAC,cAAc,CAAC,kBAAkB,CAAC,GAAG,EAAE,CAAC,GAAG,kBAAkB,CAAC;IAC7E,cAAc,CAAC,cAAc,CAAC,kBAAkB,CAAC,GAAG,EAAE,CAAC,GAAG,kBAAkB,CAAC;IAC7E,cAAc,CAAC,cAAc,CAAC,4BAA4B,CAAC,GAAG,EAAE,CAAC,GAAG,4BAA4B,CAAC;IACjG,cAAc,CAAC,cAAc,CAAC,iBAAiB,CAAC,GAAG,GAAG,CAAC,GAAG,iBAAiB,CAAC;IAC5E,cAAc,CAAC,cAAc,CAAC,wCAAwC,CAAC,GAAG,GAAG,CAAC,GAAG,wCAAwC,CAAC;IAC1H,cAAc,CAAC,cAAc,CAAC,kBAAkB,CAAC,GAAG,GAAG,CAAC,GAAG,kBAAkB,CAAC;IAC9E,cAAc,CAAC,cAAc,CAAC,gBAAgB,CAAC,GAAG,EAAE,CAAC,GAAG,gBAAgB,CAAC;AAC7E,CAAC,CAAC,CAAC,cAAc,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/signatureKind.d.ts b/node_modules/typescript/dist/enums/signatureKind.d.ts new file mode 100644 index 0000000..9c0bded --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureKind.d.ts @@ -0,0 +1,2 @@ +export declare var SignatureKind: any; +//# sourceMappingURL=signatureKind.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/signatureKind.d.ts.map b/node_modules/typescript/dist/enums/signatureKind.d.ts.map new file mode 100644 index 0000000..88e5112 --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureKind.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"signatureKind.d.ts","sourceRoot":"","sources":["../../src/enums/signatureKind.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,aAAa,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/signatureKind.enum.d.ts b/node_modules/typescript/dist/enums/signatureKind.enum.d.ts new file mode 100644 index 0000000..e5ba5a5 --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureKind.enum.d.ts @@ -0,0 +1,5 @@ +export declare enum SignatureKind { + Call = 0, + Construct = 1 +} +//# sourceMappingURL=signatureKind.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/signatureKind.enum.d.ts.map b/node_modules/typescript/dist/enums/signatureKind.enum.d.ts.map new file mode 100644 index 0000000..2acb860 --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureKind.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"signatureKind.enum.d.ts","sourceRoot":"","sources":["../../src/enums/signatureKind.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,aAAa;IACrB,IAAI,IAAI;IACR,SAAS,IAAI;CAChB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/signatureKind.enum.js b/node_modules/typescript/dist/enums/signatureKind.enum.js new file mode 100644 index 0000000..f99b0dd --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureKind.enum.js @@ -0,0 +1,7 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT. +export var SignatureKind; +(function (SignatureKind) { + SignatureKind[SignatureKind["Call"] = 0] = "Call"; + SignatureKind[SignatureKind["Construct"] = 1] = "Construct"; +})(SignatureKind || (SignatureKind = {})); +//# sourceMappingURL=signatureKind.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/signatureKind.enum.js.map b/node_modules/typescript/dist/enums/signatureKind.enum.js.map new file mode 100644 index 0000000..9b28a34 --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureKind.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"signatureKind.enum.js","sourceRoot":"","sources":["../../src/enums/signatureKind.enum.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAE/F,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,iDAAQ,CAAA;IACR,2DAAa,CAAA;AACjB,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/signatureKind.js b/node_modules/typescript/dist/enums/signatureKind.js new file mode 100644 index 0000000..c54dfb2 --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureKind.js @@ -0,0 +1,7 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT. +export var SignatureKind; +(function (SignatureKind) { + SignatureKind[SignatureKind["Call"] = 0] = "Call"; + SignatureKind[SignatureKind["Construct"] = 1] = "Construct"; +})(SignatureKind || (SignatureKind = {})); +//# sourceMappingURL=signatureKind.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/signatureKind.js.map b/node_modules/typescript/dist/enums/signatureKind.js.map new file mode 100644 index 0000000..77af56a --- /dev/null +++ b/node_modules/typescript/dist/enums/signatureKind.js.map @@ -0,0 +1 @@ +{"version":3,"file":"signatureKind.js","sourceRoot":"","sources":["../../src/enums/signatureKind.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,MAAM,CAAC,IAAI,aAAkB,CAAC;AAC9B,CAAC,UAAU,aAAa;IACpB,aAAa,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAClD,aAAa,CAAC,aAAa,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,WAAW,CAAC;AAChE,CAAC,CAAC,CAAC,aAAa,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/symbolFlags.d.ts b/node_modules/typescript/dist/enums/symbolFlags.d.ts new file mode 100644 index 0000000..4f828b7 --- /dev/null +++ b/node_modules/typescript/dist/enums/symbolFlags.d.ts @@ -0,0 +1,2 @@ +export declare var SymbolFlags: any; +//# sourceMappingURL=symbolFlags.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/symbolFlags.d.ts.map b/node_modules/typescript/dist/enums/symbolFlags.d.ts.map new file mode 100644 index 0000000..1f12be9 --- /dev/null +++ b/node_modules/typescript/dist/enums/symbolFlags.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"symbolFlags.d.ts","sourceRoot":"","sources":["../../src/enums/symbolFlags.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,WAAW,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts b/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts new file mode 100644 index 0000000..275b5bc --- /dev/null +++ b/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts @@ -0,0 +1,71 @@ +export declare enum SymbolFlags { + None = 0, + FunctionScopedVariable = 1, + BlockScopedVariable = 2, + Property = 4, + EnumMember = 8, + Function = 16, + Class = 32, + Interface = 64, + ConstEnum = 128, + RegularEnum = 256, + ValueModule = 512, + NamespaceModule = 1024, + TypeLiteral = 2048, + ObjectLiteral = 4096, + Method = 8192, + Constructor = 16384, + GetAccessor = 32768, + SetAccessor = 65536, + Signature = 131072, + TypeParameter = 262144, + TypeAlias = 524288, + ExportValue = 1048576, + Alias = 2097152, + Prototype = 4194304, + ExportStar = 8388608, + Optional = 16777216, + Transient = 33554432, + Assignment = 67108864, + ModuleExports = 134217728, + ConstEnumOnlyModule = 268435456, + ReplaceableByMethod = 536870912, + GlobalLookup = 1073741824, + All = 536870912, + Enum = 384, + Variable = 3, + Value = 111551, + Type = 788968, + Namespace = 1920, + Module = 1536, + Accessor = 98304, + FunctionScopedVariableExcludes = 111550, + BlockScopedVariableExcludes = 111551, + ParameterExcludes = 111551, + PropertyExcludes = 13243, + EnumMemberExcludes = 900095, + FunctionExcludes = 110991, + ClassExcludes = 899503, + InterfaceExcludes = 788872, + RegularEnumExcludes = 899327, + ConstEnumExcludes = 899967, + ValueModuleExcludes = 110735, + NamespaceModuleExcludes = 0, + MethodExcludes = 103359, + GetAccessorExcludes = 46011, + SetAccessorExcludes = 78779, + AccessorExcludes = 111547, + TypeParameterExcludes = 526824, + TypeAliasExcludes = 788968, + AliasExcludes = 2097152, + ModuleMember = 2623475, + ExportHasLocal = 944, + BlockScoped = 418, + PropertyOrAccessor = 98308, + ClassMember = 106500, + ExportSupportsDefaultModifier = 112, + ExportDoesNotSupportDefaultModifier = -113, + Classifiable = 2885600, + LateBindingContainer = 6256 +} +//# sourceMappingURL=symbolFlags.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts.map b/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts.map new file mode 100644 index 0000000..e21da46 --- /dev/null +++ b/node_modules/typescript/dist/enums/symbolFlags.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"symbolFlags.enum.d.ts","sourceRoot":"","sources":["../../src/enums/symbolFlags.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,WAAW;IACnB,IAAI,IAAI;IACR,sBAAsB,IAAS;IAC/B,mBAAmB,IAAS;IAC5B,QAAQ,IAAS;IACjB,UAAU,IAAS;IACnB,QAAQ,KAAS;IACjB,KAAK,KAAS;IACd,SAAS,KAAS;IAClB,SAAS,MAAS;IAClB,WAAW,MAAS;IACpB,WAAW,MAAS;IACpB,eAAe,OAAU;IACzB,WAAW,OAAU;IACrB,aAAa,OAAU;IACvB,MAAM,OAAU;IAChB,WAAW,QAAU;IACrB,WAAW,QAAU;IACrB,WAAW,QAAU;IACrB,SAAS,SAAU;IACnB,aAAa,SAAU;IACvB,SAAS,SAAU;IACnB,WAAW,UAAU;IACrB,KAAK,UAAU;IACf,SAAS,UAAU;IACnB,UAAU,UAAU;IACpB,QAAQ,WAAU;IAClB,SAAS,WAAU;IACnB,UAAU,WAAU;IACpB,aAAa,YAAU;IACvB,mBAAmB,YAAU;IAC7B,mBAAmB,YAAU;IAC7B,YAAY,aAAU;IACtB,GAAG,YAAc;IACjB,IAAI,MAA0B;IAC9B,QAAQ,IAA+C;IACvD,KAAK,SAAgI;IACrI,IAAI,SAAkF;IACtF,SAAS,OAAuC;IAChD,MAAM,OAAgC;IACtC,QAAQ,QAA4B;IACpC,8BAA8B,SAAkC;IAChE,2BAA2B,SAAQ;IACnC,iBAAiB,SAAQ;IACzB,gBAAgB,QAAiC;IACjD,kBAAkB,SAAe;IACjC,gBAAgB,SAA4C;IAC5D,aAAa,SAAyD;IACtE,iBAAiB,SAA8B;IAC/C,mBAAmB,SAAgD;IACnE,iBAAiB,SAA8B;IAC/C,mBAAmB,SAA0D;IAC7E,uBAAuB,IAAO;IAC9B,cAAc,SAAkB;IAChC,mBAAmB,QAAoC;IACvD,mBAAmB,QAAoC;IACvD,gBAAgB,SAAoB;IACpC,qBAAqB,SAAwB;IAC7C,iBAAiB,SAAO;IACxB,aAAa,UAAQ;IACrB,YAAY,UAA8E;IAC1F,cAAc,MAAwC;IACtD,WAAW,MAAqC;IAChD,kBAAkB,QAAsB;IACxC,WAAW,SAA+B;IAC1C,6BAA6B,MAA+B;IAC5D,mCAAmC,OAAiC;IACpE,YAAY,UAAwE;IACpF,oBAAoB,OAA6D;CACpF"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/symbolFlags.enum.js b/node_modules/typescript/dist/enums/symbolFlags.enum.js new file mode 100644 index 0000000..12d2192 --- /dev/null +++ b/node_modules/typescript/dist/enums/symbolFlags.enum.js @@ -0,0 +1,73 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/ast/symbolflags.go. DO NOT EDIT. +export var SymbolFlags; +(function (SymbolFlags) { + SymbolFlags[SymbolFlags["None"] = 0] = "None"; + SymbolFlags[SymbolFlags["FunctionScopedVariable"] = 1] = "FunctionScopedVariable"; + SymbolFlags[SymbolFlags["BlockScopedVariable"] = 2] = "BlockScopedVariable"; + SymbolFlags[SymbolFlags["Property"] = 4] = "Property"; + SymbolFlags[SymbolFlags["EnumMember"] = 8] = "EnumMember"; + SymbolFlags[SymbolFlags["Function"] = 16] = "Function"; + SymbolFlags[SymbolFlags["Class"] = 32] = "Class"; + SymbolFlags[SymbolFlags["Interface"] = 64] = "Interface"; + SymbolFlags[SymbolFlags["ConstEnum"] = 128] = "ConstEnum"; + SymbolFlags[SymbolFlags["RegularEnum"] = 256] = "RegularEnum"; + SymbolFlags[SymbolFlags["ValueModule"] = 512] = "ValueModule"; + SymbolFlags[SymbolFlags["NamespaceModule"] = 1024] = "NamespaceModule"; + SymbolFlags[SymbolFlags["TypeLiteral"] = 2048] = "TypeLiteral"; + SymbolFlags[SymbolFlags["ObjectLiteral"] = 4096] = "ObjectLiteral"; + SymbolFlags[SymbolFlags["Method"] = 8192] = "Method"; + SymbolFlags[SymbolFlags["Constructor"] = 16384] = "Constructor"; + SymbolFlags[SymbolFlags["GetAccessor"] = 32768] = "GetAccessor"; + SymbolFlags[SymbolFlags["SetAccessor"] = 65536] = "SetAccessor"; + SymbolFlags[SymbolFlags["Signature"] = 131072] = "Signature"; + SymbolFlags[SymbolFlags["TypeParameter"] = 262144] = "TypeParameter"; + SymbolFlags[SymbolFlags["TypeAlias"] = 524288] = "TypeAlias"; + SymbolFlags[SymbolFlags["ExportValue"] = 1048576] = "ExportValue"; + SymbolFlags[SymbolFlags["Alias"] = 2097152] = "Alias"; + SymbolFlags[SymbolFlags["Prototype"] = 4194304] = "Prototype"; + SymbolFlags[SymbolFlags["ExportStar"] = 8388608] = "ExportStar"; + SymbolFlags[SymbolFlags["Optional"] = 16777216] = "Optional"; + SymbolFlags[SymbolFlags["Transient"] = 33554432] = "Transient"; + SymbolFlags[SymbolFlags["Assignment"] = 67108864] = "Assignment"; + SymbolFlags[SymbolFlags["ModuleExports"] = 134217728] = "ModuleExports"; + SymbolFlags[SymbolFlags["ConstEnumOnlyModule"] = 268435456] = "ConstEnumOnlyModule"; + SymbolFlags[SymbolFlags["ReplaceableByMethod"] = 536870912] = "ReplaceableByMethod"; + SymbolFlags[SymbolFlags["GlobalLookup"] = 1073741824] = "GlobalLookup"; + SymbolFlags[SymbolFlags["All"] = 536870912] = "All"; + SymbolFlags[SymbolFlags["Enum"] = 384] = "Enum"; + SymbolFlags[SymbolFlags["Variable"] = 3] = "Variable"; + SymbolFlags[SymbolFlags["Value"] = 111551] = "Value"; + SymbolFlags[SymbolFlags["Type"] = 788968] = "Type"; + SymbolFlags[SymbolFlags["Namespace"] = 1920] = "Namespace"; + SymbolFlags[SymbolFlags["Module"] = 1536] = "Module"; + SymbolFlags[SymbolFlags["Accessor"] = 98304] = "Accessor"; + SymbolFlags[SymbolFlags["FunctionScopedVariableExcludes"] = 111550] = "FunctionScopedVariableExcludes"; + SymbolFlags[SymbolFlags["BlockScopedVariableExcludes"] = 111551] = "BlockScopedVariableExcludes"; + SymbolFlags[SymbolFlags["ParameterExcludes"] = 111551] = "ParameterExcludes"; + SymbolFlags[SymbolFlags["PropertyExcludes"] = 13243] = "PropertyExcludes"; + SymbolFlags[SymbolFlags["EnumMemberExcludes"] = 900095] = "EnumMemberExcludes"; + SymbolFlags[SymbolFlags["FunctionExcludes"] = 110991] = "FunctionExcludes"; + SymbolFlags[SymbolFlags["ClassExcludes"] = 899503] = "ClassExcludes"; + SymbolFlags[SymbolFlags["InterfaceExcludes"] = 788872] = "InterfaceExcludes"; + SymbolFlags[SymbolFlags["RegularEnumExcludes"] = 899327] = "RegularEnumExcludes"; + SymbolFlags[SymbolFlags["ConstEnumExcludes"] = 899967] = "ConstEnumExcludes"; + SymbolFlags[SymbolFlags["ValueModuleExcludes"] = 110735] = "ValueModuleExcludes"; + SymbolFlags[SymbolFlags["NamespaceModuleExcludes"] = 0] = "NamespaceModuleExcludes"; + SymbolFlags[SymbolFlags["MethodExcludes"] = 103359] = "MethodExcludes"; + SymbolFlags[SymbolFlags["GetAccessorExcludes"] = 46011] = "GetAccessorExcludes"; + SymbolFlags[SymbolFlags["SetAccessorExcludes"] = 78779] = "SetAccessorExcludes"; + SymbolFlags[SymbolFlags["AccessorExcludes"] = 111547] = "AccessorExcludes"; + SymbolFlags[SymbolFlags["TypeParameterExcludes"] = 526824] = "TypeParameterExcludes"; + SymbolFlags[SymbolFlags["TypeAliasExcludes"] = 788968] = "TypeAliasExcludes"; + SymbolFlags[SymbolFlags["AliasExcludes"] = 2097152] = "AliasExcludes"; + SymbolFlags[SymbolFlags["ModuleMember"] = 2623475] = "ModuleMember"; + SymbolFlags[SymbolFlags["ExportHasLocal"] = 944] = "ExportHasLocal"; + SymbolFlags[SymbolFlags["BlockScoped"] = 418] = "BlockScoped"; + SymbolFlags[SymbolFlags["PropertyOrAccessor"] = 98308] = "PropertyOrAccessor"; + SymbolFlags[SymbolFlags["ClassMember"] = 106500] = "ClassMember"; + SymbolFlags[SymbolFlags["ExportSupportsDefaultModifier"] = 112] = "ExportSupportsDefaultModifier"; + SymbolFlags[SymbolFlags["ExportDoesNotSupportDefaultModifier"] = -113] = "ExportDoesNotSupportDefaultModifier"; + SymbolFlags[SymbolFlags["Classifiable"] = 2885600] = "Classifiable"; + SymbolFlags[SymbolFlags["LateBindingContainer"] = 6256] = "LateBindingContainer"; +})(SymbolFlags || (SymbolFlags = {})); +//# sourceMappingURL=symbolFlags.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/symbolFlags.enum.js.map b/node_modules/typescript/dist/enums/symbolFlags.enum.js.map new file mode 100644 index 0000000..999ccc7 --- /dev/null +++ b/node_modules/typescript/dist/enums/symbolFlags.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"symbolFlags.enum.js","sourceRoot":"","sources":["../../src/enums/symbolFlags.enum.ts"],"names":[],"mappings":"AAAA,iGAAiG;AAEjG,MAAM,CAAN,IAAY,WAqEX;AArED,WAAY,WAAW;IACnB,6CAAQ,CAAA;IACR,iFAA+B,CAAA;IAC/B,2EAA4B,CAAA;IAC5B,qDAAiB,CAAA;IACjB,yDAAmB,CAAA;IACnB,sDAAiB,CAAA;IACjB,gDAAc,CAAA;IACd,wDAAkB,CAAA;IAClB,yDAAkB,CAAA;IAClB,6DAAoB,CAAA;IACpB,6DAAoB,CAAA;IACpB,sEAAyB,CAAA;IACzB,8DAAqB,CAAA;IACrB,kEAAuB,CAAA;IACvB,oDAAgB,CAAA;IAChB,+DAAqB,CAAA;IACrB,+DAAqB,CAAA;IACrB,+DAAqB,CAAA;IACrB,4DAAmB,CAAA;IACnB,oEAAuB,CAAA;IACvB,4DAAmB,CAAA;IACnB,iEAAqB,CAAA;IACrB,qDAAe,CAAA;IACf,6DAAmB,CAAA;IACnB,+DAAoB,CAAA;IACpB,4DAAkB,CAAA;IAClB,8DAAmB,CAAA;IACnB,gEAAoB,CAAA;IACpB,uEAAuB,CAAA;IACvB,mFAA6B,CAAA;IAC7B,mFAA6B,CAAA;IAC7B,sEAAsB,CAAA;IACtB,mDAAiB,CAAA;IACjB,+CAA8B,CAAA;IAC9B,qDAAuD,CAAA;IACvD,oDAAqI,CAAA;IACrI,kDAAsF,CAAA;IACtF,0DAAgD,CAAA;IAChD,oDAAsC,CAAA;IACtC,yDAAoC,CAAA;IACpC,sGAAgE,CAAA;IAChE,gGAAmC,CAAA;IACnC,4EAAyB,CAAA;IACzB,yEAAiD,CAAA;IACjD,8EAAiC,CAAA;IACjC,0EAA4D,CAAA;IAC5D,oEAAsE,CAAA;IACtE,4EAA+C,CAAA;IAC/C,gFAAmE,CAAA;IACnE,4EAA+C,CAAA;IAC/C,gFAA6E,CAAA;IAC7E,mFAA8B,CAAA;IAC9B,sEAAgC,CAAA;IAChC,+EAAuD,CAAA;IACvD,+EAAuD,CAAA;IACvD,0EAAoC,CAAA;IACpC,oFAA6C,CAAA;IAC7C,4EAAwB,CAAA;IACxB,qEAAqB,CAAA;IACrB,mEAA0F,CAAA;IAC1F,mEAAsD,CAAA;IACtD,6DAAgD,CAAA;IAChD,6EAAwC,CAAA;IACxC,gEAA0C,CAAA;IAC1C,iGAA4D,CAAA;IAC5D,8GAAoE,CAAA;IACpE,mEAAoF,CAAA;IACpF,gFAAiF,CAAA;AACrF,CAAC,EArEW,WAAW,KAAX,WAAW,QAqEtB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/symbolFlags.js b/node_modules/typescript/dist/enums/symbolFlags.js new file mode 100644 index 0000000..ce1996d --- /dev/null +++ b/node_modules/typescript/dist/enums/symbolFlags.js @@ -0,0 +1,73 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/ast/symbolflags.go. DO NOT EDIT. +export var SymbolFlags; +(function (SymbolFlags) { + SymbolFlags[SymbolFlags["None"] = 0] = "None"; + SymbolFlags[SymbolFlags["FunctionScopedVariable"] = 1] = "FunctionScopedVariable"; + SymbolFlags[SymbolFlags["BlockScopedVariable"] = 2] = "BlockScopedVariable"; + SymbolFlags[SymbolFlags["Property"] = 4] = "Property"; + SymbolFlags[SymbolFlags["EnumMember"] = 8] = "EnumMember"; + SymbolFlags[SymbolFlags["Function"] = 16] = "Function"; + SymbolFlags[SymbolFlags["Class"] = 32] = "Class"; + SymbolFlags[SymbolFlags["Interface"] = 64] = "Interface"; + SymbolFlags[SymbolFlags["ConstEnum"] = 128] = "ConstEnum"; + SymbolFlags[SymbolFlags["RegularEnum"] = 256] = "RegularEnum"; + SymbolFlags[SymbolFlags["ValueModule"] = 512] = "ValueModule"; + SymbolFlags[SymbolFlags["NamespaceModule"] = 1024] = "NamespaceModule"; + SymbolFlags[SymbolFlags["TypeLiteral"] = 2048] = "TypeLiteral"; + SymbolFlags[SymbolFlags["ObjectLiteral"] = 4096] = "ObjectLiteral"; + SymbolFlags[SymbolFlags["Method"] = 8192] = "Method"; + SymbolFlags[SymbolFlags["Constructor"] = 16384] = "Constructor"; + SymbolFlags[SymbolFlags["GetAccessor"] = 32768] = "GetAccessor"; + SymbolFlags[SymbolFlags["SetAccessor"] = 65536] = "SetAccessor"; + SymbolFlags[SymbolFlags["Signature"] = 131072] = "Signature"; + SymbolFlags[SymbolFlags["TypeParameter"] = 262144] = "TypeParameter"; + SymbolFlags[SymbolFlags["TypeAlias"] = 524288] = "TypeAlias"; + SymbolFlags[SymbolFlags["ExportValue"] = 1048576] = "ExportValue"; + SymbolFlags[SymbolFlags["Alias"] = 2097152] = "Alias"; + SymbolFlags[SymbolFlags["Prototype"] = 4194304] = "Prototype"; + SymbolFlags[SymbolFlags["ExportStar"] = 8388608] = "ExportStar"; + SymbolFlags[SymbolFlags["Optional"] = 16777216] = "Optional"; + SymbolFlags[SymbolFlags["Transient"] = 33554432] = "Transient"; + SymbolFlags[SymbolFlags["Assignment"] = 67108864] = "Assignment"; + SymbolFlags[SymbolFlags["ModuleExports"] = 134217728] = "ModuleExports"; + SymbolFlags[SymbolFlags["ConstEnumOnlyModule"] = 268435456] = "ConstEnumOnlyModule"; + SymbolFlags[SymbolFlags["ReplaceableByMethod"] = 536870912] = "ReplaceableByMethod"; + SymbolFlags[SymbolFlags["GlobalLookup"] = 1073741824] = "GlobalLookup"; + SymbolFlags[SymbolFlags["All"] = 536870912] = "All"; + SymbolFlags[SymbolFlags["Enum"] = 384] = "Enum"; + SymbolFlags[SymbolFlags["Variable"] = 3] = "Variable"; + SymbolFlags[SymbolFlags["Value"] = 111551] = "Value"; + SymbolFlags[SymbolFlags["Type"] = 788968] = "Type"; + SymbolFlags[SymbolFlags["Namespace"] = 1920] = "Namespace"; + SymbolFlags[SymbolFlags["Module"] = 1536] = "Module"; + SymbolFlags[SymbolFlags["Accessor"] = 98304] = "Accessor"; + SymbolFlags[SymbolFlags["FunctionScopedVariableExcludes"] = 111550] = "FunctionScopedVariableExcludes"; + SymbolFlags[SymbolFlags["BlockScopedVariableExcludes"] = 111551] = "BlockScopedVariableExcludes"; + SymbolFlags[SymbolFlags["ParameterExcludes"] = 111551] = "ParameterExcludes"; + SymbolFlags[SymbolFlags["PropertyExcludes"] = 13243] = "PropertyExcludes"; + SymbolFlags[SymbolFlags["EnumMemberExcludes"] = 900095] = "EnumMemberExcludes"; + SymbolFlags[SymbolFlags["FunctionExcludes"] = 110991] = "FunctionExcludes"; + SymbolFlags[SymbolFlags["ClassExcludes"] = 899503] = "ClassExcludes"; + SymbolFlags[SymbolFlags["InterfaceExcludes"] = 788872] = "InterfaceExcludes"; + SymbolFlags[SymbolFlags["RegularEnumExcludes"] = 899327] = "RegularEnumExcludes"; + SymbolFlags[SymbolFlags["ConstEnumExcludes"] = 899967] = "ConstEnumExcludes"; + SymbolFlags[SymbolFlags["ValueModuleExcludes"] = 110735] = "ValueModuleExcludes"; + SymbolFlags[SymbolFlags["NamespaceModuleExcludes"] = 0] = "NamespaceModuleExcludes"; + SymbolFlags[SymbolFlags["MethodExcludes"] = 103359] = "MethodExcludes"; + SymbolFlags[SymbolFlags["GetAccessorExcludes"] = 46011] = "GetAccessorExcludes"; + SymbolFlags[SymbolFlags["SetAccessorExcludes"] = 78779] = "SetAccessorExcludes"; + SymbolFlags[SymbolFlags["AccessorExcludes"] = 111547] = "AccessorExcludes"; + SymbolFlags[SymbolFlags["TypeParameterExcludes"] = 526824] = "TypeParameterExcludes"; + SymbolFlags[SymbolFlags["TypeAliasExcludes"] = 788968] = "TypeAliasExcludes"; + SymbolFlags[SymbolFlags["AliasExcludes"] = 2097152] = "AliasExcludes"; + SymbolFlags[SymbolFlags["ModuleMember"] = 2623475] = "ModuleMember"; + SymbolFlags[SymbolFlags["ExportHasLocal"] = 944] = "ExportHasLocal"; + SymbolFlags[SymbolFlags["BlockScoped"] = 418] = "BlockScoped"; + SymbolFlags[SymbolFlags["PropertyOrAccessor"] = 98308] = "PropertyOrAccessor"; + SymbolFlags[SymbolFlags["ClassMember"] = 106500] = "ClassMember"; + SymbolFlags[SymbolFlags["ExportSupportsDefaultModifier"] = 112] = "ExportSupportsDefaultModifier"; + SymbolFlags[SymbolFlags["ExportDoesNotSupportDefaultModifier"] = -113] = "ExportDoesNotSupportDefaultModifier"; + SymbolFlags[SymbolFlags["Classifiable"] = 2885600] = "Classifiable"; + SymbolFlags[SymbolFlags["LateBindingContainer"] = 6256] = "LateBindingContainer"; +})(SymbolFlags || (SymbolFlags = {})); +//# sourceMappingURL=symbolFlags.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/symbolFlags.js.map b/node_modules/typescript/dist/enums/symbolFlags.js.map new file mode 100644 index 0000000..1cff9dc --- /dev/null +++ b/node_modules/typescript/dist/enums/symbolFlags.js.map @@ -0,0 +1 @@ +{"version":3,"file":"symbolFlags.js","sourceRoot":"","sources":["../../src/enums/symbolFlags.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,MAAM,CAAC,IAAI,WAAgB,CAAC;AAC5B,CAAC,UAAU,WAAW;IAClB,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC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,CAAC,GAAG,aAAa,CAAC;IAC9D,WAAW,CAAC,WAAW,CAAC,oBAAoB,CAAC,GAAG,KAAK,CAAC,GAAG,oBAAoB,CAAC;IAC9E,WAAW,CAAC,WAAW,CAAC,aAAa,CAAC,GAAG,MAAM,CAAC,GAAG,aAAa,CAAC;IACjE,WAAW,CAAC,WAAW,CAAC,+BAA+B,CAAC,GAAG,GAAG,CAAC,GAAG,+BAA+B,CAAC;IAClG,WAAW,CAAC,WAAW,CAAC,qCAAqC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,qCAAqC,CAAC;IAC/G,WAAW,CAAC,WAAW,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,GAAG,cAAc,CAAC;IACpE,WAAW,CAAC,WAAW,CAAC,sBAAsB,CAAC,GAAG,IAAI,CAAC,GAAG,sBAAsB,CAAC;AACrF,CAAC,CAAC,CAAC,WAAW,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/syntaxKind.d.ts b/node_modules/typescript/dist/enums/syntaxKind.d.ts new file mode 100644 index 0000000..26fedb9 --- /dev/null +++ b/node_modules/typescript/dist/enums/syntaxKind.d.ts @@ -0,0 +1,2 @@ +export declare var SyntaxKind: any; +//# sourceMappingURL=syntaxKind.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/syntaxKind.d.ts.map b/node_modules/typescript/dist/enums/syntaxKind.d.ts.map new file mode 100644 index 0000000..fd18cc4 --- /dev/null +++ b/node_modules/typescript/dist/enums/syntaxKind.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"syntaxKind.d.ts","sourceRoot":"","sources":["../../src/enums/syntaxKind.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,UAAU,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts b/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts new file mode 100644 index 0000000..8756759 --- /dev/null +++ b/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts @@ -0,0 +1,389 @@ +export declare enum SyntaxKind { + Unknown = 0, + EndOfFile = 1, + SingleLineCommentTrivia = 2, + MultiLineCommentTrivia = 3, + NewLineTrivia = 4, + WhitespaceTrivia = 5, + ConflictMarkerTrivia = 6, + NonTextFileMarkerTrivia = 7, + NumericLiteral = 8, + BigIntLiteral = 9, + StringLiteral = 10, + JsxText = 11, + JsxTextAllWhiteSpaces = 12, + RegularExpressionLiteral = 13, + NoSubstitutionTemplateLiteral = 14, + TemplateHead = 15, + TemplateMiddle = 16, + TemplateTail = 17, + OpenBraceToken = 18, + CloseBraceToken = 19, + OpenParenToken = 20, + CloseParenToken = 21, + OpenBracketToken = 22, + CloseBracketToken = 23, + DotToken = 24, + DotDotDotToken = 25, + SemicolonToken = 26, + CommaToken = 27, + QuestionDotToken = 28, + LessThanToken = 29, + LessThanSlashToken = 30, + GreaterThanToken = 31, + LessThanEqualsToken = 32, + GreaterThanEqualsToken = 33, + EqualsEqualsToken = 34, + ExclamationEqualsToken = 35, + EqualsEqualsEqualsToken = 36, + ExclamationEqualsEqualsToken = 37, + EqualsGreaterThanToken = 38, + PlusToken = 39, + MinusToken = 40, + AsteriskToken = 41, + AsteriskAsteriskToken = 42, + SlashToken = 43, + PercentToken = 44, + PlusPlusToken = 45, + MinusMinusToken = 46, + LessThanLessThanToken = 47, + GreaterThanGreaterThanToken = 48, + GreaterThanGreaterThanGreaterThanToken = 49, + AmpersandToken = 50, + BarToken = 51, + CaretToken = 52, + ExclamationToken = 53, + TildeToken = 54, + AmpersandAmpersandToken = 55, + BarBarToken = 56, + QuestionToken = 57, + ColonToken = 58, + AtToken = 59, + QuestionQuestionToken = 60, + BacktickToken = 61, + HashToken = 62, + EqualsToken = 63, + PlusEqualsToken = 64, + MinusEqualsToken = 65, + AsteriskEqualsToken = 66, + AsteriskAsteriskEqualsToken = 67, + SlashEqualsToken = 68, + PercentEqualsToken = 69, + LessThanLessThanEqualsToken = 70, + GreaterThanGreaterThanEqualsToken = 71, + GreaterThanGreaterThanGreaterThanEqualsToken = 72, + AmpersandEqualsToken = 73, + BarEqualsToken = 74, + BarBarEqualsToken = 75, + AmpersandAmpersandEqualsToken = 76, + QuestionQuestionEqualsToken = 77, + CaretEqualsToken = 78, + Identifier = 79, + PrivateIdentifier = 80, + JSDocCommentTextToken = 81, + BreakKeyword = 82, + CaseKeyword = 83, + CatchKeyword = 84, + ClassKeyword = 85, + ConstKeyword = 86, + ContinueKeyword = 87, + DebuggerKeyword = 88, + DefaultKeyword = 89, + DeleteKeyword = 90, + DoKeyword = 91, + ElseKeyword = 92, + EnumKeyword = 93, + ExportKeyword = 94, + ExtendsKeyword = 95, + FalseKeyword = 96, + FinallyKeyword = 97, + ForKeyword = 98, + FunctionKeyword = 99, + IfKeyword = 100, + ImportKeyword = 101, + InKeyword = 102, + InstanceOfKeyword = 103, + NewKeyword = 104, + NullKeyword = 105, + ReturnKeyword = 106, + SuperKeyword = 107, + SwitchKeyword = 108, + ThisKeyword = 109, + ThrowKeyword = 110, + TrueKeyword = 111, + TryKeyword = 112, + TypeOfKeyword = 113, + VarKeyword = 114, + VoidKeyword = 115, + WhileKeyword = 116, + WithKeyword = 117, + ImplementsKeyword = 118, + InterfaceKeyword = 119, + LetKeyword = 120, + PackageKeyword = 121, + PrivateKeyword = 122, + ProtectedKeyword = 123, + PublicKeyword = 124, + StaticKeyword = 125, + YieldKeyword = 126, + AbstractKeyword = 127, + AccessorKeyword = 128, + AsKeyword = 129, + AssertsKeyword = 130, + AssertKeyword = 131, + AnyKeyword = 132, + AsyncKeyword = 133, + AwaitKeyword = 134, + BooleanKeyword = 135, + ConstructorKeyword = 136, + DeclareKeyword = 137, + GetKeyword = 138, + ImmediateKeyword = 139, + InferKeyword = 140, + IntrinsicKeyword = 141, + IsKeyword = 142, + KeyOfKeyword = 143, + ModuleKeyword = 144, + NamespaceKeyword = 145, + NeverKeyword = 146, + OutKeyword = 147, + ReadonlyKeyword = 148, + RequireKeyword = 149, + NumberKeyword = 150, + ObjectKeyword = 151, + SatisfiesKeyword = 152, + SetKeyword = 153, + StringKeyword = 154, + SymbolKeyword = 155, + TypeKeyword = 156, + UndefinedKeyword = 157, + UniqueKeyword = 158, + UnknownKeyword = 159, + UsingKeyword = 160, + FromKeyword = 161, + GlobalKeyword = 162, + BigIntKeyword = 163, + OverrideKeyword = 164, + OfKeyword = 165, + DeferKeyword = 166, + QualifiedName = 167, + ComputedPropertyName = 168, + TypeParameter = 169, + Parameter = 170, + Decorator = 171, + PropertySignature = 172, + PropertyDeclaration = 173, + MethodSignature = 174, + MethodDeclaration = 175, + ClassStaticBlockDeclaration = 176, + Constructor = 177, + GetAccessor = 178, + SetAccessor = 179, + CallSignature = 180, + ConstructSignature = 181, + IndexSignature = 182, + TypePredicate = 183, + TypeReference = 184, + FunctionType = 185, + ConstructorType = 186, + TypeQuery = 187, + TypeLiteral = 188, + ArrayType = 189, + TupleType = 190, + OptionalType = 191, + RestType = 192, + UnionType = 193, + IntersectionType = 194, + ConditionalType = 195, + InferType = 196, + ParenthesizedType = 197, + ThisType = 198, + TypeOperator = 199, + IndexedAccessType = 200, + MappedType = 201, + LiteralType = 202, + NamedTupleMember = 203, + TemplateLiteralType = 204, + TemplateLiteralTypeSpan = 205, + ImportType = 206, + ObjectBindingPattern = 207, + ArrayBindingPattern = 208, + BindingElement = 209, + ArrayLiteralExpression = 210, + ObjectLiteralExpression = 211, + PropertyAccessExpression = 212, + ElementAccessExpression = 213, + CallExpression = 214, + NewExpression = 215, + TaggedTemplateExpression = 216, + TypeAssertionExpression = 217, + ParenthesizedExpression = 218, + FunctionExpression = 219, + ArrowFunction = 220, + DeleteExpression = 221, + TypeOfExpression = 222, + VoidExpression = 223, + AwaitExpression = 224, + PrefixUnaryExpression = 225, + PostfixUnaryExpression = 226, + BinaryExpression = 227, + ConditionalExpression = 228, + TemplateExpression = 229, + YieldExpression = 230, + SpreadElement = 231, + ClassExpression = 232, + OmittedExpression = 233, + ExpressionWithTypeArguments = 234, + AsExpression = 235, + NonNullExpression = 236, + MetaProperty = 237, + SyntheticExpression = 238, + SatisfiesExpression = 239, + TemplateSpan = 240, + SemicolonClassElement = 241, + Block = 242, + EmptyStatement = 243, + VariableStatement = 244, + ExpressionStatement = 245, + IfStatement = 246, + DoStatement = 247, + WhileStatement = 248, + ForStatement = 249, + ForInStatement = 250, + ForOfStatement = 251, + ContinueStatement = 252, + BreakStatement = 253, + ReturnStatement = 254, + WithStatement = 255, + SwitchStatement = 256, + LabeledStatement = 257, + ThrowStatement = 258, + TryStatement = 259, + DebuggerStatement = 260, + VariableDeclaration = 261, + VariableDeclarationList = 262, + FunctionDeclaration = 263, + ClassDeclaration = 264, + InterfaceDeclaration = 265, + TypeAliasDeclaration = 266, + EnumDeclaration = 267, + ModuleDeclaration = 268, + ModuleBlock = 269, + CaseBlock = 270, + NamespaceExportDeclaration = 271, + ImportEqualsDeclaration = 272, + ImportDeclaration = 273, + ImportClause = 274, + NamespaceImport = 275, + NamedImports = 276, + ImportSpecifier = 277, + ExportAssignment = 278, + ExportDeclaration = 279, + NamedExports = 280, + NamespaceExport = 281, + ExportSpecifier = 282, + MissingDeclaration = 283, + ExternalModuleReference = 284, + JsxElement = 285, + JsxSelfClosingElement = 286, + JsxOpeningElement = 287, + JsxClosingElement = 288, + JsxFragment = 289, + JsxOpeningFragment = 290, + JsxClosingFragment = 291, + JsxAttribute = 292, + JsxAttributes = 293, + JsxSpreadAttribute = 294, + JsxExpression = 295, + JsxNamespacedName = 296, + CaseClause = 297, + DefaultClause = 298, + HeritageClause = 299, + CatchClause = 300, + ImportAttributes = 301, + ImportAttribute = 302, + PropertyAssignment = 303, + ShorthandPropertyAssignment = 304, + SpreadAssignment = 305, + EnumMember = 306, + SourceFile = 307, + JSDocTypeExpression = 308, + JSDocNameReference = 309, + JSDocAllType = 310, + JSDocNullableType = 311, + JSDocNonNullableType = 312, + JSDocOptionalType = 313, + JSDocVariadicType = 314, + JSDoc = 315, + JSDocText = 316, + JSDocTypeLiteral = 317, + JSDocSignature = 318, + JSDocLink = 319, + JSDocLinkCode = 320, + JSDocLinkPlain = 321, + JSDocUnknownTag = 322, + JSDocAugmentsTag = 323, + JSDocImplementsTag = 324, + JSDocDeprecatedTag = 325, + JSDocPublicTag = 326, + JSDocPrivateTag = 327, + JSDocProtectedTag = 328, + JSDocReadonlyTag = 329, + JSDocOverrideTag = 330, + JSDocCallbackTag = 331, + JSDocOverloadTag = 332, + JSDocParameterTag = 333, + JSDocReturnTag = 334, + JSDocThisTag = 335, + JSDocTypeTag = 336, + JSDocTemplateTag = 337, + JSDocTypedefTag = 338, + JSDocSeeTag = 339, + JSDocPropertyTag = 340, + JSDocThrowsTag = 341, + JSDocSatisfiesTag = 342, + JSDocImportTag = 343, + SyntaxList = 344, + JSTypeAliasDeclaration = 345, + JSImportDeclaration = 346, + NotEmittedStatement = 347, + PartiallyEmittedExpression = 348, + SyntheticReferenceExpression = 349, + NotEmittedTypeElement = 350, + Count = 351, + FirstAssignment = 63, + LastAssignment = 78, + FirstCompoundAssignment = 64, + LastCompoundAssignment = 78, + FirstReservedWord = 82, + LastReservedWord = 117, + FirstKeyword = 82, + LastKeyword = 166, + FirstFutureReservedWord = 118, + LastFutureReservedWord = 126, + FirstTypeNode = 183, + LastTypeNode = 206, + FirstPunctuation = 18, + LastPunctuation = 78, + FirstToken = 0, + LastToken = 166, + FirstLiteralToken = 8, + LastLiteralToken = 14, + FirstTemplateToken = 14, + LastTemplateToken = 17, + FirstBinaryOperator = 29, + LastBinaryOperator = 78, + FirstStatement = 244, + LastStatement = 260, + FirstNode = 167, + FirstJSDocNode = 308, + LastJSDocNode = 343, + FirstJSDocTagNode = 322, + LastJSDocTagNode = 343, + FirstContextualKeyword = 127, + LastContextualKeyword = 166, + LastUnaryOperator = 54, + FirstTriviaToken = 2, + LastTriviaToken = 6 +} +//# sourceMappingURL=syntaxKind.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts.map b/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts.map new file mode 100644 index 0000000..8252773 --- /dev/null +++ b/node_modules/typescript/dist/enums/syntaxKind.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"syntaxKind.enum.d.ts","sourceRoot":"","sources":["../../src/enums/syntaxKind.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,UAAU;IAClB,OAAO,IAAI;IACX,SAAS,IAAI;IACb,uBAAuB,IAAI;IAC3B,sBAAsB,IAAI;IAC1B,aAAa,IAAI;IACjB,gBAAgB,IAAI;IACpB,oBAAoB,IAAI;IACxB,uBAAuB,IAAI;IAC3B,cAAc,IAAI;IAClB,aAAa,IAAI;IACjB,aAAa,KAAK;IAClB,OAAO,KAAK;IACZ,qBAAqB,KAAK;IAC1B,wBAAwB,KAAK;IAC7B,6BAA6B,KAAK;IAClC,YAAY,KAAK;IACjB,cAAc,KAAK;IACnB,YAAY,KAAK;IACjB,cAAc,KAAK;IACnB,eAAe,KAAK;IACpB,cAAc,KAAK;IACnB,eAAe,KAAK;IACpB,gBAAgB,KAAK;IACrB,iBAAiB,KAAK;IACtB,QAAQ,KAAK;IACb,cAAc,KAAK;IACnB,cAAc,KAAK;IACnB,UAAU,KAAK;IACf,gBAAgB,KAAK;IACrB,aAAa,KAAK;IAClB,kBAAkB,KAAK;IACvB,gBAAgB,KAAK;IACrB,mBAAmB,KAAK;IACxB,sBAAsB,KAAK;IAC3B,iBAAiB,KAAK;IACtB,sBAAsB,KAAK;IAC3B,uBAAuB,KAAK;IAC5B,4BAA4B,KAAK;IACjC,sBAAsB,KAAK;IAC3B,SAAS,KAAK;IACd,UAAU,KAAK;IACf,aAAa,KAAK;IAClB,qBAAqB,KAAK;IAC1B,UAAU,KAAK;IACf,YAAY,KAAK;IACjB,aAAa,KAAK;IAClB,eAAe,KAAK;IACpB,qBAAqB,KAAK;IAC1B,2BAA2B,KAAK;IAChC,sCAAsC,KA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,KAAgB;IACnC,kBAAkB,KAAmB;IACrC,cAAc,MAAoB;IAClC,aAAa,MAAoB;IACjC,SAAS,MAAgB;IACzB,cAAc,MAAsB;IACpC,aAAa,MAAiB;IAC9B,iBAAiB,MAAkB;IACnC,gBAAgB,MAAiB;IACjC,sBAAsB,MAAkB;IACxC,qBAAqB,MAAe;IACpC,iBAAiB,KAAa;IAC9B,gBAAgB,IAA0B;IAC1C,eAAe,IAAuB;CACzC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/syntaxKind.enum.js b/node_modules/typescript/dist/enums/syntaxKind.enum.js new file mode 100644 index 0000000..cbde1c8 --- /dev/null +++ b/node_modules/typescript/dist/enums/syntaxKind.enum.js @@ -0,0 +1,391 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/ast/kind_generated.go. DO NOT EDIT. +export var SyntaxKind; +(function (SyntaxKind) { + SyntaxKind[SyntaxKind["Unknown"] = 0] = "Unknown"; + SyntaxKind[SyntaxKind["EndOfFile"] = 1] = "EndOfFile"; + SyntaxKind[SyntaxKind["SingleLineCommentTrivia"] = 2] = "SingleLineCommentTrivia"; + SyntaxKind[SyntaxKind["MultiLineCommentTrivia"] = 3] = "MultiLineCommentTrivia"; + SyntaxKind[SyntaxKind["NewLineTrivia"] = 4] = "NewLineTrivia"; + SyntaxKind[SyntaxKind["WhitespaceTrivia"] = 5] = "WhitespaceTrivia"; + SyntaxKind[SyntaxKind["ConflictMarkerTrivia"] = 6] = "ConflictMarkerTrivia"; + SyntaxKind[SyntaxKind["NonTextFileMarkerTrivia"] = 7] = "NonTextFileMarkerTrivia"; + SyntaxKind[SyntaxKind["NumericLiteral"] = 8] = "NumericLiteral"; + SyntaxKind[SyntaxKind["BigIntLiteral"] = 9] = "BigIntLiteral"; + SyntaxKind[SyntaxKind["StringLiteral"] = 10] = "StringLiteral"; + SyntaxKind[SyntaxKind["JsxText"] = 11] = "JsxText"; + SyntaxKind[SyntaxKind["JsxTextAllWhiteSpaces"] = 12] = "JsxTextAllWhiteSpaces"; + SyntaxKind[SyntaxKind["RegularExpressionLiteral"] = 13] = "RegularExpressionLiteral"; + SyntaxKind[SyntaxKind["NoSubstitutionTemplateLiteral"] = 14] = "NoSubstitutionTemplateLiteral"; + SyntaxKind[SyntaxKind["TemplateHead"] = 15] = "TemplateHead"; + SyntaxKind[SyntaxKind["TemplateMiddle"] = 16] = "TemplateMiddle"; + SyntaxKind[SyntaxKind["TemplateTail"] = 17] = "TemplateTail"; + SyntaxKind[SyntaxKind["OpenBraceToken"] = 18] = "OpenBraceToken"; + SyntaxKind[SyntaxKind["CloseBraceToken"] = 19] = "CloseBraceToken"; + SyntaxKind[SyntaxKind["OpenParenToken"] = 20] = "OpenParenToken"; + SyntaxKind[SyntaxKind["CloseParenToken"] = 21] = "CloseParenToken"; + SyntaxKind[SyntaxKind["OpenBracketToken"] = 22] = "OpenBracketToken"; + SyntaxKind[SyntaxKind["CloseBracketToken"] = 23] = "CloseBracketToken"; + SyntaxKind[SyntaxKind["DotToken"] = 24] = "DotToken"; + SyntaxKind[SyntaxKind["DotDotDotToken"] = 25] = "DotDotDotToken"; + SyntaxKind[SyntaxKind["SemicolonToken"] = 26] = "SemicolonToken"; + SyntaxKind[SyntaxKind["CommaToken"] = 27] = "CommaToken"; + SyntaxKind[SyntaxKind["QuestionDotToken"] = 28] = "QuestionDotToken"; + SyntaxKind[SyntaxKind["LessThanToken"] = 29] = "LessThanToken"; + SyntaxKind[SyntaxKind["LessThanSlashToken"] = 30] = "LessThanSlashToken"; + SyntaxKind[SyntaxKind["GreaterThanToken"] = 31] = "GreaterThanToken"; + SyntaxKind[SyntaxKind["LessThanEqualsToken"] = 32] = "LessThanEqualsToken"; + SyntaxKind[SyntaxKind["GreaterThanEqualsToken"] = 33] = "GreaterThanEqualsToken"; + SyntaxKind[SyntaxKind["EqualsEqualsToken"] = 34] = "EqualsEqualsToken"; + SyntaxKind[SyntaxKind["ExclamationEqualsToken"] = 35] = "ExclamationEqualsToken"; + SyntaxKind[SyntaxKind["EqualsEqualsEqualsToken"] = 36] = "EqualsEqualsEqualsToken"; + SyntaxKind[SyntaxKind["ExclamationEqualsEqualsToken"] = 37] = "ExclamationEqualsEqualsToken"; + SyntaxKind[SyntaxKind["EqualsGreaterThanToken"] = 38] = "EqualsGreaterThanToken"; + SyntaxKind[SyntaxKind["PlusToken"] = 39] = "PlusToken"; + SyntaxKind[SyntaxKind["MinusToken"] = 40] = "MinusToken"; + SyntaxKind[SyntaxKind["AsteriskToken"] = 41] = "AsteriskToken"; + SyntaxKind[SyntaxKind["AsteriskAsteriskToken"] = 42] = "AsteriskAsteriskToken"; + SyntaxKind[SyntaxKind["SlashToken"] = 43] = "SlashToken"; + SyntaxKind[SyntaxKind["PercentToken"] = 44] = "PercentToken"; + SyntaxKind[SyntaxKind["PlusPlusToken"] = 45] = "PlusPlusToken"; + SyntaxKind[SyntaxKind["MinusMinusToken"] = 46] = "MinusMinusToken"; + SyntaxKind[SyntaxKind["LessThanLessThanToken"] = 47] = "LessThanLessThanToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanToken"] = 48] = "GreaterThanGreaterThanToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanToken"] = 49] = "GreaterThanGreaterThanGreaterThanToken"; + SyntaxKind[SyntaxKind["AmpersandToken"] = 50] = "AmpersandToken"; + SyntaxKind[SyntaxKind["BarToken"] = 51] = "BarToken"; + SyntaxKind[SyntaxKind["CaretToken"] = 52] = "CaretToken"; + SyntaxKind[SyntaxKind["ExclamationToken"] = 53] = "ExclamationToken"; + SyntaxKind[SyntaxKind["TildeToken"] = 54] = "TildeToken"; + SyntaxKind[SyntaxKind["AmpersandAmpersandToken"] = 55] = "AmpersandAmpersandToken"; + SyntaxKind[SyntaxKind["BarBarToken"] = 56] = "BarBarToken"; + SyntaxKind[SyntaxKind["QuestionToken"] = 57] = "QuestionToken"; + SyntaxKind[SyntaxKind["ColonToken"] = 58] = "ColonToken"; + SyntaxKind[SyntaxKind["AtToken"] = 59] = "AtToken"; + SyntaxKind[SyntaxKind["QuestionQuestionToken"] = 60] = "QuestionQuestionToken"; + SyntaxKind[SyntaxKind["BacktickToken"] = 61] = "BacktickToken"; + SyntaxKind[SyntaxKind["HashToken"] = 62] = "HashToken"; + SyntaxKind[SyntaxKind["EqualsToken"] = 63] = "EqualsToken"; + SyntaxKind[SyntaxKind["PlusEqualsToken"] = 64] = "PlusEqualsToken"; + SyntaxKind[SyntaxKind["MinusEqualsToken"] = 65] = "MinusEqualsToken"; + SyntaxKind[SyntaxKind["AsteriskEqualsToken"] = 66] = "AsteriskEqualsToken"; + SyntaxKind[SyntaxKind["AsteriskAsteriskEqualsToken"] = 67] = "AsteriskAsteriskEqualsToken"; + SyntaxKind[SyntaxKind["SlashEqualsToken"] = 68] = "SlashEqualsToken"; + SyntaxKind[SyntaxKind["PercentEqualsToken"] = 69] = "PercentEqualsToken"; + SyntaxKind[SyntaxKind["LessThanLessThanEqualsToken"] = 70] = "LessThanLessThanEqualsToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanEqualsToken"] = 71] = "GreaterThanGreaterThanEqualsToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanEqualsToken"] = 72] = "GreaterThanGreaterThanGreaterThanEqualsToken"; + SyntaxKind[SyntaxKind["AmpersandEqualsToken"] = 73] = "AmpersandEqualsToken"; + SyntaxKind[SyntaxKind["BarEqualsToken"] = 74] = "BarEqualsToken"; + SyntaxKind[SyntaxKind["BarBarEqualsToken"] = 75] = "BarBarEqualsToken"; + SyntaxKind[SyntaxKind["AmpersandAmpersandEqualsToken"] = 76] = "AmpersandAmpersandEqualsToken"; + SyntaxKind[SyntaxKind["QuestionQuestionEqualsToken"] = 77] = "QuestionQuestionEqualsToken"; + SyntaxKind[SyntaxKind["CaretEqualsToken"] = 78] = "CaretEqualsToken"; + SyntaxKind[SyntaxKind["Identifier"] = 79] = "Identifier"; + SyntaxKind[SyntaxKind["PrivateIdentifier"] = 80] = "PrivateIdentifier"; + SyntaxKind[SyntaxKind["JSDocCommentTextToken"] = 81] = "JSDocCommentTextToken"; + SyntaxKind[SyntaxKind["BreakKeyword"] = 82] = "BreakKeyword"; + SyntaxKind[SyntaxKind["CaseKeyword"] = 83] = "CaseKeyword"; + SyntaxKind[SyntaxKind["CatchKeyword"] = 84] = "CatchKeyword"; + SyntaxKind[SyntaxKind["ClassKeyword"] = 85] = "ClassKeyword"; + SyntaxKind[SyntaxKind["ConstKeyword"] = 86] = "ConstKeyword"; + SyntaxKind[SyntaxKind["ContinueKeyword"] = 87] = "ContinueKeyword"; + SyntaxKind[SyntaxKind["DebuggerKeyword"] = 88] = "DebuggerKeyword"; + SyntaxKind[SyntaxKind["DefaultKeyword"] = 89] = "DefaultKeyword"; + SyntaxKind[SyntaxKind["DeleteKeyword"] = 90] = "DeleteKeyword"; + SyntaxKind[SyntaxKind["DoKeyword"] = 91] = "DoKeyword"; + SyntaxKind[SyntaxKind["ElseKeyword"] = 92] = "ElseKeyword"; + SyntaxKind[SyntaxKind["EnumKeyword"] = 93] = "EnumKeyword"; + SyntaxKind[SyntaxKind["ExportKeyword"] = 94] = "ExportKeyword"; + SyntaxKind[SyntaxKind["ExtendsKeyword"] = 95] = "ExtendsKeyword"; + SyntaxKind[SyntaxKind["FalseKeyword"] = 96] = "FalseKeyword"; + SyntaxKind[SyntaxKind["FinallyKeyword"] = 97] = "FinallyKeyword"; + SyntaxKind[SyntaxKind["ForKeyword"] = 98] = "ForKeyword"; + SyntaxKind[SyntaxKind["FunctionKeyword"] = 99] = "FunctionKeyword"; + SyntaxKind[SyntaxKind["IfKeyword"] = 100] = "IfKeyword"; + SyntaxKind[SyntaxKind["ImportKeyword"] = 101] = "ImportKeyword"; + SyntaxKind[SyntaxKind["InKeyword"] = 102] = "InKeyword"; + SyntaxKind[SyntaxKind["InstanceOfKeyword"] = 103] = "InstanceOfKeyword"; + SyntaxKind[SyntaxKind["NewKeyword"] = 104] = "NewKeyword"; + SyntaxKind[SyntaxKind["NullKeyword"] = 105] = "NullKeyword"; + SyntaxKind[SyntaxKind["ReturnKeyword"] = 106] = "ReturnKeyword"; + SyntaxKind[SyntaxKind["SuperKeyword"] = 107] = "SuperKeyword"; + SyntaxKind[SyntaxKind["SwitchKeyword"] = 108] = "SwitchKeyword"; + SyntaxKind[SyntaxKind["ThisKeyword"] = 109] = "ThisKeyword"; + SyntaxKind[SyntaxKind["ThrowKeyword"] = 110] = "ThrowKeyword"; + SyntaxKind[SyntaxKind["TrueKeyword"] = 111] = "TrueKeyword"; + SyntaxKind[SyntaxKind["TryKeyword"] = 112] = "TryKeyword"; + SyntaxKind[SyntaxKind["TypeOfKeyword"] = 113] = "TypeOfKeyword"; + SyntaxKind[SyntaxKind["VarKeyword"] = 114] = "VarKeyword"; + SyntaxKind[SyntaxKind["VoidKeyword"] = 115] = "VoidKeyword"; + SyntaxKind[SyntaxKind["WhileKeyword"] = 116] = "WhileKeyword"; + SyntaxKind[SyntaxKind["WithKeyword"] = 117] = "WithKeyword"; + SyntaxKind[SyntaxKind["ImplementsKeyword"] = 118] = "ImplementsKeyword"; + SyntaxKind[SyntaxKind["InterfaceKeyword"] = 119] = "InterfaceKeyword"; + SyntaxKind[SyntaxKind["LetKeyword"] = 120] = "LetKeyword"; + SyntaxKind[SyntaxKind["PackageKeyword"] = 121] = "PackageKeyword"; + SyntaxKind[SyntaxKind["PrivateKeyword"] = 122] = "PrivateKeyword"; + SyntaxKind[SyntaxKind["ProtectedKeyword"] = 123] = "ProtectedKeyword"; + SyntaxKind[SyntaxKind["PublicKeyword"] = 124] = "PublicKeyword"; + SyntaxKind[SyntaxKind["StaticKeyword"] = 125] = "StaticKeyword"; + SyntaxKind[SyntaxKind["YieldKeyword"] = 126] = "YieldKeyword"; + SyntaxKind[SyntaxKind["AbstractKeyword"] = 127] = "AbstractKeyword"; + SyntaxKind[SyntaxKind["AccessorKeyword"] = 128] = "AccessorKeyword"; + SyntaxKind[SyntaxKind["AsKeyword"] = 129] = "AsKeyword"; + SyntaxKind[SyntaxKind["AssertsKeyword"] = 130] = "AssertsKeyword"; + SyntaxKind[SyntaxKind["AssertKeyword"] = 131] = "AssertKeyword"; + SyntaxKind[SyntaxKind["AnyKeyword"] = 132] = "AnyKeyword"; + SyntaxKind[SyntaxKind["AsyncKeyword"] = 133] = "AsyncKeyword"; + SyntaxKind[SyntaxKind["AwaitKeyword"] = 134] = "AwaitKeyword"; + SyntaxKind[SyntaxKind["BooleanKeyword"] = 135] = "BooleanKeyword"; + SyntaxKind[SyntaxKind["ConstructorKeyword"] = 136] = "ConstructorKeyword"; + SyntaxKind[SyntaxKind["DeclareKeyword"] = 137] = "DeclareKeyword"; + SyntaxKind[SyntaxKind["GetKeyword"] = 138] = "GetKeyword"; + SyntaxKind[SyntaxKind["ImmediateKeyword"] = 139] = "ImmediateKeyword"; + SyntaxKind[SyntaxKind["InferKeyword"] = 140] = "InferKeyword"; + SyntaxKind[SyntaxKind["IntrinsicKeyword"] = 141] = "IntrinsicKeyword"; + SyntaxKind[SyntaxKind["IsKeyword"] = 142] = "IsKeyword"; + SyntaxKind[SyntaxKind["KeyOfKeyword"] = 143] = "KeyOfKeyword"; + SyntaxKind[SyntaxKind["ModuleKeyword"] = 144] = "ModuleKeyword"; + SyntaxKind[SyntaxKind["NamespaceKeyword"] = 145] = "NamespaceKeyword"; + SyntaxKind[SyntaxKind["NeverKeyword"] = 146] = "NeverKeyword"; + SyntaxKind[SyntaxKind["OutKeyword"] = 147] = "OutKeyword"; + SyntaxKind[SyntaxKind["ReadonlyKeyword"] = 148] = "ReadonlyKeyword"; + SyntaxKind[SyntaxKind["RequireKeyword"] = 149] = "RequireKeyword"; + SyntaxKind[SyntaxKind["NumberKeyword"] = 150] = "NumberKeyword"; + SyntaxKind[SyntaxKind["ObjectKeyword"] = 151] = "ObjectKeyword"; + SyntaxKind[SyntaxKind["SatisfiesKeyword"] = 152] = "SatisfiesKeyword"; + SyntaxKind[SyntaxKind["SetKeyword"] = 153] = "SetKeyword"; + SyntaxKind[SyntaxKind["StringKeyword"] = 154] = "StringKeyword"; + SyntaxKind[SyntaxKind["SymbolKeyword"] = 155] = "SymbolKeyword"; + SyntaxKind[SyntaxKind["TypeKeyword"] = 156] = "TypeKeyword"; + SyntaxKind[SyntaxKind["UndefinedKeyword"] = 157] = "UndefinedKeyword"; + SyntaxKind[SyntaxKind["UniqueKeyword"] = 158] = "UniqueKeyword"; + SyntaxKind[SyntaxKind["UnknownKeyword"] = 159] = "UnknownKeyword"; + SyntaxKind[SyntaxKind["UsingKeyword"] = 160] = "UsingKeyword"; + SyntaxKind[SyntaxKind["FromKeyword"] = 161] = "FromKeyword"; + SyntaxKind[SyntaxKind["GlobalKeyword"] = 162] = "GlobalKeyword"; + SyntaxKind[SyntaxKind["BigIntKeyword"] = 163] = "BigIntKeyword"; + SyntaxKind[SyntaxKind["OverrideKeyword"] = 164] = "OverrideKeyword"; + SyntaxKind[SyntaxKind["OfKeyword"] = 165] = "OfKeyword"; + SyntaxKind[SyntaxKind["DeferKeyword"] = 166] = "DeferKeyword"; + SyntaxKind[SyntaxKind["QualifiedName"] = 167] = "QualifiedName"; + SyntaxKind[SyntaxKind["ComputedPropertyName"] = 168] = "ComputedPropertyName"; + SyntaxKind[SyntaxKind["TypeParameter"] = 169] = "TypeParameter"; + SyntaxKind[SyntaxKind["Parameter"] = 170] = "Parameter"; + SyntaxKind[SyntaxKind["Decorator"] = 171] = "Decorator"; + SyntaxKind[SyntaxKind["PropertySignature"] = 172] = "PropertySignature"; + SyntaxKind[SyntaxKind["PropertyDeclaration"] = 173] = "PropertyDeclaration"; + SyntaxKind[SyntaxKind["MethodSignature"] = 174] = "MethodSignature"; + SyntaxKind[SyntaxKind["MethodDeclaration"] = 175] = "MethodDeclaration"; + SyntaxKind[SyntaxKind["ClassStaticBlockDeclaration"] = 176] = "ClassStaticBlockDeclaration"; + SyntaxKind[SyntaxKind["Constructor"] = 177] = "Constructor"; + SyntaxKind[SyntaxKind["GetAccessor"] = 178] = "GetAccessor"; + SyntaxKind[SyntaxKind["SetAccessor"] = 179] = "SetAccessor"; + SyntaxKind[SyntaxKind["CallSignature"] = 180] = "CallSignature"; + SyntaxKind[SyntaxKind["ConstructSignature"] = 181] = "ConstructSignature"; + SyntaxKind[SyntaxKind["IndexSignature"] = 182] = "IndexSignature"; + SyntaxKind[SyntaxKind["TypePredicate"] = 183] = "TypePredicate"; + SyntaxKind[SyntaxKind["TypeReference"] = 184] = "TypeReference"; + SyntaxKind[SyntaxKind["FunctionType"] = 185] = "FunctionType"; + SyntaxKind[SyntaxKind["ConstructorType"] = 186] = "ConstructorType"; + SyntaxKind[SyntaxKind["TypeQuery"] = 187] = "TypeQuery"; + SyntaxKind[SyntaxKind["TypeLiteral"] = 188] = "TypeLiteral"; + SyntaxKind[SyntaxKind["ArrayType"] = 189] = "ArrayType"; + SyntaxKind[SyntaxKind["TupleType"] = 190] = "TupleType"; + SyntaxKind[SyntaxKind["OptionalType"] = 191] = "OptionalType"; + SyntaxKind[SyntaxKind["RestType"] = 192] = "RestType"; + SyntaxKind[SyntaxKind["UnionType"] = 193] = "UnionType"; + SyntaxKind[SyntaxKind["IntersectionType"] = 194] = "IntersectionType"; + SyntaxKind[SyntaxKind["ConditionalType"] = 195] = "ConditionalType"; + SyntaxKind[SyntaxKind["InferType"] = 196] = "InferType"; + SyntaxKind[SyntaxKind["ParenthesizedType"] = 197] = "ParenthesizedType"; + SyntaxKind[SyntaxKind["ThisType"] = 198] = "ThisType"; + SyntaxKind[SyntaxKind["TypeOperator"] = 199] = "TypeOperator"; + SyntaxKind[SyntaxKind["IndexedAccessType"] = 200] = "IndexedAccessType"; + SyntaxKind[SyntaxKind["MappedType"] = 201] = "MappedType"; + SyntaxKind[SyntaxKind["LiteralType"] = 202] = "LiteralType"; + SyntaxKind[SyntaxKind["NamedTupleMember"] = 203] = "NamedTupleMember"; + SyntaxKind[SyntaxKind["TemplateLiteralType"] = 204] = "TemplateLiteralType"; + SyntaxKind[SyntaxKind["TemplateLiteralTypeSpan"] = 205] = "TemplateLiteralTypeSpan"; + SyntaxKind[SyntaxKind["ImportType"] = 206] = "ImportType"; + SyntaxKind[SyntaxKind["ObjectBindingPattern"] = 207] = "ObjectBindingPattern"; + SyntaxKind[SyntaxKind["ArrayBindingPattern"] = 208] = "ArrayBindingPattern"; + SyntaxKind[SyntaxKind["BindingElement"] = 209] = "BindingElement"; + SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 210] = "ArrayLiteralExpression"; + SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 211] = "ObjectLiteralExpression"; + SyntaxKind[SyntaxKind["PropertyAccessExpression"] = 212] = "PropertyAccessExpression"; + SyntaxKind[SyntaxKind["ElementAccessExpression"] = 213] = "ElementAccessExpression"; + SyntaxKind[SyntaxKind["CallExpression"] = 214] = "CallExpression"; + SyntaxKind[SyntaxKind["NewExpression"] = 215] = "NewExpression"; + SyntaxKind[SyntaxKind["TaggedTemplateExpression"] = 216] = "TaggedTemplateExpression"; + SyntaxKind[SyntaxKind["TypeAssertionExpression"] = 217] = "TypeAssertionExpression"; + SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 218] = "ParenthesizedExpression"; + SyntaxKind[SyntaxKind["FunctionExpression"] = 219] = "FunctionExpression"; + SyntaxKind[SyntaxKind["ArrowFunction"] = 220] = "ArrowFunction"; + SyntaxKind[SyntaxKind["DeleteExpression"] = 221] = "DeleteExpression"; + SyntaxKind[SyntaxKind["TypeOfExpression"] = 222] = "TypeOfExpression"; + SyntaxKind[SyntaxKind["VoidExpression"] = 223] = "VoidExpression"; + SyntaxKind[SyntaxKind["AwaitExpression"] = 224] = "AwaitExpression"; + SyntaxKind[SyntaxKind["PrefixUnaryExpression"] = 225] = "PrefixUnaryExpression"; + SyntaxKind[SyntaxKind["PostfixUnaryExpression"] = 226] = "PostfixUnaryExpression"; + SyntaxKind[SyntaxKind["BinaryExpression"] = 227] = "BinaryExpression"; + SyntaxKind[SyntaxKind["ConditionalExpression"] = 228] = "ConditionalExpression"; + SyntaxKind[SyntaxKind["TemplateExpression"] = 229] = "TemplateExpression"; + SyntaxKind[SyntaxKind["YieldExpression"] = 230] = "YieldExpression"; + SyntaxKind[SyntaxKind["SpreadElement"] = 231] = "SpreadElement"; + SyntaxKind[SyntaxKind["ClassExpression"] = 232] = "ClassExpression"; + SyntaxKind[SyntaxKind["OmittedExpression"] = 233] = "OmittedExpression"; + SyntaxKind[SyntaxKind["ExpressionWithTypeArguments"] = 234] = "ExpressionWithTypeArguments"; + SyntaxKind[SyntaxKind["AsExpression"] = 235] = "AsExpression"; + SyntaxKind[SyntaxKind["NonNullExpression"] = 236] = "NonNullExpression"; + SyntaxKind[SyntaxKind["MetaProperty"] = 237] = "MetaProperty"; + SyntaxKind[SyntaxKind["SyntheticExpression"] = 238] = "SyntheticExpression"; + SyntaxKind[SyntaxKind["SatisfiesExpression"] = 239] = "SatisfiesExpression"; + SyntaxKind[SyntaxKind["TemplateSpan"] = 240] = "TemplateSpan"; + SyntaxKind[SyntaxKind["SemicolonClassElement"] = 241] = "SemicolonClassElement"; + SyntaxKind[SyntaxKind["Block"] = 242] = "Block"; + SyntaxKind[SyntaxKind["EmptyStatement"] = 243] = "EmptyStatement"; + SyntaxKind[SyntaxKind["VariableStatement"] = 244] = "VariableStatement"; + SyntaxKind[SyntaxKind["ExpressionStatement"] = 245] = "ExpressionStatement"; + SyntaxKind[SyntaxKind["IfStatement"] = 246] = "IfStatement"; + SyntaxKind[SyntaxKind["DoStatement"] = 247] = "DoStatement"; + SyntaxKind[SyntaxKind["WhileStatement"] = 248] = "WhileStatement"; + SyntaxKind[SyntaxKind["ForStatement"] = 249] = "ForStatement"; + SyntaxKind[SyntaxKind["ForInStatement"] = 250] = "ForInStatement"; + SyntaxKind[SyntaxKind["ForOfStatement"] = 251] = "ForOfStatement"; + SyntaxKind[SyntaxKind["ContinueStatement"] = 252] = "ContinueStatement"; + SyntaxKind[SyntaxKind["BreakStatement"] = 253] = "BreakStatement"; + SyntaxKind[SyntaxKind["ReturnStatement"] = 254] = "ReturnStatement"; + SyntaxKind[SyntaxKind["WithStatement"] = 255] = "WithStatement"; + SyntaxKind[SyntaxKind["SwitchStatement"] = 256] = "SwitchStatement"; + SyntaxKind[SyntaxKind["LabeledStatement"] = 257] = "LabeledStatement"; + SyntaxKind[SyntaxKind["ThrowStatement"] = 258] = "ThrowStatement"; + SyntaxKind[SyntaxKind["TryStatement"] = 259] = "TryStatement"; + SyntaxKind[SyntaxKind["DebuggerStatement"] = 260] = "DebuggerStatement"; + SyntaxKind[SyntaxKind["VariableDeclaration"] = 261] = "VariableDeclaration"; + SyntaxKind[SyntaxKind["VariableDeclarationList"] = 262] = "VariableDeclarationList"; + SyntaxKind[SyntaxKind["FunctionDeclaration"] = 263] = "FunctionDeclaration"; + SyntaxKind[SyntaxKind["ClassDeclaration"] = 264] = "ClassDeclaration"; + SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 265] = "InterfaceDeclaration"; + SyntaxKind[SyntaxKind["TypeAliasDeclaration"] = 266] = "TypeAliasDeclaration"; + SyntaxKind[SyntaxKind["EnumDeclaration"] = 267] = "EnumDeclaration"; + SyntaxKind[SyntaxKind["ModuleDeclaration"] = 268] = "ModuleDeclaration"; + SyntaxKind[SyntaxKind["ModuleBlock"] = 269] = "ModuleBlock"; + SyntaxKind[SyntaxKind["CaseBlock"] = 270] = "CaseBlock"; + SyntaxKind[SyntaxKind["NamespaceExportDeclaration"] = 271] = "NamespaceExportDeclaration"; + SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 272] = "ImportEqualsDeclaration"; + SyntaxKind[SyntaxKind["ImportDeclaration"] = 273] = "ImportDeclaration"; + SyntaxKind[SyntaxKind["ImportClause"] = 274] = "ImportClause"; + SyntaxKind[SyntaxKind["NamespaceImport"] = 275] = "NamespaceImport"; + SyntaxKind[SyntaxKind["NamedImports"] = 276] = "NamedImports"; + SyntaxKind[SyntaxKind["ImportSpecifier"] = 277] = "ImportSpecifier"; + SyntaxKind[SyntaxKind["ExportAssignment"] = 278] = "ExportAssignment"; + SyntaxKind[SyntaxKind["ExportDeclaration"] = 279] = "ExportDeclaration"; + SyntaxKind[SyntaxKind["NamedExports"] = 280] = "NamedExports"; + SyntaxKind[SyntaxKind["NamespaceExport"] = 281] = "NamespaceExport"; + SyntaxKind[SyntaxKind["ExportSpecifier"] = 282] = "ExportSpecifier"; + SyntaxKind[SyntaxKind["MissingDeclaration"] = 283] = "MissingDeclaration"; + SyntaxKind[SyntaxKind["ExternalModuleReference"] = 284] = "ExternalModuleReference"; + SyntaxKind[SyntaxKind["JsxElement"] = 285] = "JsxElement"; + SyntaxKind[SyntaxKind["JsxSelfClosingElement"] = 286] = "JsxSelfClosingElement"; + SyntaxKind[SyntaxKind["JsxOpeningElement"] = 287] = "JsxOpeningElement"; + SyntaxKind[SyntaxKind["JsxClosingElement"] = 288] = "JsxClosingElement"; + SyntaxKind[SyntaxKind["JsxFragment"] = 289] = "JsxFragment"; + SyntaxKind[SyntaxKind["JsxOpeningFragment"] = 290] = "JsxOpeningFragment"; + SyntaxKind[SyntaxKind["JsxClosingFragment"] = 291] = "JsxClosingFragment"; + SyntaxKind[SyntaxKind["JsxAttribute"] = 292] = "JsxAttribute"; + SyntaxKind[SyntaxKind["JsxAttributes"] = 293] = "JsxAttributes"; + SyntaxKind[SyntaxKind["JsxSpreadAttribute"] = 294] = "JsxSpreadAttribute"; + SyntaxKind[SyntaxKind["JsxExpression"] = 295] = "JsxExpression"; + SyntaxKind[SyntaxKind["JsxNamespacedName"] = 296] = "JsxNamespacedName"; + SyntaxKind[SyntaxKind["CaseClause"] = 297] = "CaseClause"; + SyntaxKind[SyntaxKind["DefaultClause"] = 298] = "DefaultClause"; + SyntaxKind[SyntaxKind["HeritageClause"] = 299] = "HeritageClause"; + SyntaxKind[SyntaxKind["CatchClause"] = 300] = "CatchClause"; + SyntaxKind[SyntaxKind["ImportAttributes"] = 301] = "ImportAttributes"; + SyntaxKind[SyntaxKind["ImportAttribute"] = 302] = "ImportAttribute"; + SyntaxKind[SyntaxKind["PropertyAssignment"] = 303] = "PropertyAssignment"; + SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 304] = "ShorthandPropertyAssignment"; + SyntaxKind[SyntaxKind["SpreadAssignment"] = 305] = "SpreadAssignment"; + SyntaxKind[SyntaxKind["EnumMember"] = 306] = "EnumMember"; + SyntaxKind[SyntaxKind["SourceFile"] = 307] = "SourceFile"; + SyntaxKind[SyntaxKind["JSDocTypeExpression"] = 308] = "JSDocTypeExpression"; + SyntaxKind[SyntaxKind["JSDocNameReference"] = 309] = "JSDocNameReference"; + SyntaxKind[SyntaxKind["JSDocAllType"] = 310] = "JSDocAllType"; + SyntaxKind[SyntaxKind["JSDocNullableType"] = 311] = "JSDocNullableType"; + SyntaxKind[SyntaxKind["JSDocNonNullableType"] = 312] = "JSDocNonNullableType"; + SyntaxKind[SyntaxKind["JSDocOptionalType"] = 313] = "JSDocOptionalType"; + SyntaxKind[SyntaxKind["JSDocVariadicType"] = 314] = "JSDocVariadicType"; + SyntaxKind[SyntaxKind["JSDoc"] = 315] = "JSDoc"; + SyntaxKind[SyntaxKind["JSDocText"] = 316] = "JSDocText"; + SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 317] = "JSDocTypeLiteral"; + SyntaxKind[SyntaxKind["JSDocSignature"] = 318] = "JSDocSignature"; + SyntaxKind[SyntaxKind["JSDocLink"] = 319] = "JSDocLink"; + SyntaxKind[SyntaxKind["JSDocLinkCode"] = 320] = "JSDocLinkCode"; + SyntaxKind[SyntaxKind["JSDocLinkPlain"] = 321] = "JSDocLinkPlain"; + SyntaxKind[SyntaxKind["JSDocUnknownTag"] = 322] = "JSDocUnknownTag"; + SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 323] = "JSDocAugmentsTag"; + SyntaxKind[SyntaxKind["JSDocImplementsTag"] = 324] = "JSDocImplementsTag"; + SyntaxKind[SyntaxKind["JSDocDeprecatedTag"] = 325] = "JSDocDeprecatedTag"; + SyntaxKind[SyntaxKind["JSDocPublicTag"] = 326] = "JSDocPublicTag"; + SyntaxKind[SyntaxKind["JSDocPrivateTag"] = 327] = "JSDocPrivateTag"; + SyntaxKind[SyntaxKind["JSDocProtectedTag"] = 328] = "JSDocProtectedTag"; + SyntaxKind[SyntaxKind["JSDocReadonlyTag"] = 329] = "JSDocReadonlyTag"; + SyntaxKind[SyntaxKind["JSDocOverrideTag"] = 330] = "JSDocOverrideTag"; + SyntaxKind[SyntaxKind["JSDocCallbackTag"] = 331] = "JSDocCallbackTag"; + SyntaxKind[SyntaxKind["JSDocOverloadTag"] = 332] = "JSDocOverloadTag"; + SyntaxKind[SyntaxKind["JSDocParameterTag"] = 333] = "JSDocParameterTag"; + SyntaxKind[SyntaxKind["JSDocReturnTag"] = 334] = "JSDocReturnTag"; + SyntaxKind[SyntaxKind["JSDocThisTag"] = 335] = "JSDocThisTag"; + SyntaxKind[SyntaxKind["JSDocTypeTag"] = 336] = "JSDocTypeTag"; + SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 337] = "JSDocTemplateTag"; + SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 338] = "JSDocTypedefTag"; + SyntaxKind[SyntaxKind["JSDocSeeTag"] = 339] = "JSDocSeeTag"; + SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 340] = "JSDocPropertyTag"; + SyntaxKind[SyntaxKind["JSDocThrowsTag"] = 341] = "JSDocThrowsTag"; + SyntaxKind[SyntaxKind["JSDocSatisfiesTag"] = 342] = "JSDocSatisfiesTag"; + SyntaxKind[SyntaxKind["JSDocImportTag"] = 343] = "JSDocImportTag"; + SyntaxKind[SyntaxKind["SyntaxList"] = 344] = "SyntaxList"; + SyntaxKind[SyntaxKind["JSTypeAliasDeclaration"] = 345] = "JSTypeAliasDeclaration"; + SyntaxKind[SyntaxKind["JSImportDeclaration"] = 346] = "JSImportDeclaration"; + SyntaxKind[SyntaxKind["NotEmittedStatement"] = 347] = "NotEmittedStatement"; + SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 348] = "PartiallyEmittedExpression"; + SyntaxKind[SyntaxKind["SyntheticReferenceExpression"] = 349] = "SyntheticReferenceExpression"; + SyntaxKind[SyntaxKind["NotEmittedTypeElement"] = 350] = "NotEmittedTypeElement"; + SyntaxKind[SyntaxKind["Count"] = 351] = "Count"; + SyntaxKind[SyntaxKind["FirstAssignment"] = 63] = "FirstAssignment"; + SyntaxKind[SyntaxKind["LastAssignment"] = 78] = "LastAssignment"; + SyntaxKind[SyntaxKind["FirstCompoundAssignment"] = 64] = "FirstCompoundAssignment"; + SyntaxKind[SyntaxKind["LastCompoundAssignment"] = 78] = "LastCompoundAssignment"; + SyntaxKind[SyntaxKind["FirstReservedWord"] = 82] = "FirstReservedWord"; + SyntaxKind[SyntaxKind["LastReservedWord"] = 117] = "LastReservedWord"; + SyntaxKind[SyntaxKind["FirstKeyword"] = 82] = "FirstKeyword"; + SyntaxKind[SyntaxKind["LastKeyword"] = 166] = "LastKeyword"; + SyntaxKind[SyntaxKind["FirstFutureReservedWord"] = 118] = "FirstFutureReservedWord"; + SyntaxKind[SyntaxKind["LastFutureReservedWord"] = 126] = "LastFutureReservedWord"; + SyntaxKind[SyntaxKind["FirstTypeNode"] = 183] = "FirstTypeNode"; + SyntaxKind[SyntaxKind["LastTypeNode"] = 206] = "LastTypeNode"; + SyntaxKind[SyntaxKind["FirstPunctuation"] = 18] = "FirstPunctuation"; + SyntaxKind[SyntaxKind["LastPunctuation"] = 78] = "LastPunctuation"; + SyntaxKind[SyntaxKind["FirstToken"] = 0] = "FirstToken"; + SyntaxKind[SyntaxKind["LastToken"] = 166] = "LastToken"; + SyntaxKind[SyntaxKind["FirstLiteralToken"] = 8] = "FirstLiteralToken"; + SyntaxKind[SyntaxKind["LastLiteralToken"] = 14] = "LastLiteralToken"; + SyntaxKind[SyntaxKind["FirstTemplateToken"] = 14] = "FirstTemplateToken"; + SyntaxKind[SyntaxKind["LastTemplateToken"] = 17] = "LastTemplateToken"; + SyntaxKind[SyntaxKind["FirstBinaryOperator"] = 29] = "FirstBinaryOperator"; + SyntaxKind[SyntaxKind["LastBinaryOperator"] = 78] = "LastBinaryOperator"; + SyntaxKind[SyntaxKind["FirstStatement"] = 244] = "FirstStatement"; + SyntaxKind[SyntaxKind["LastStatement"] = 260] = "LastStatement"; + SyntaxKind[SyntaxKind["FirstNode"] = 167] = "FirstNode"; + SyntaxKind[SyntaxKind["FirstJSDocNode"] = 308] = "FirstJSDocNode"; + SyntaxKind[SyntaxKind["LastJSDocNode"] = 343] = "LastJSDocNode"; + SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 322] = "FirstJSDocTagNode"; + SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 343] = "LastJSDocTagNode"; + SyntaxKind[SyntaxKind["FirstContextualKeyword"] = 127] = "FirstContextualKeyword"; + SyntaxKind[SyntaxKind["LastContextualKeyword"] = 166] = "LastContextualKeyword"; + SyntaxKind[SyntaxKind["LastUnaryOperator"] = 54] = "LastUnaryOperator"; + SyntaxKind[SyntaxKind["FirstTriviaToken"] = 2] = "FirstTriviaToken"; + SyntaxKind[SyntaxKind["LastTriviaToken"] = 6] = "LastTriviaToken"; +})(SyntaxKind || (SyntaxKind = {})); +//# sourceMappingURL=syntaxKind.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/syntaxKind.enum.js.map b/node_modules/typescript/dist/enums/syntaxKind.enum.js.map new file mode 100644 index 0000000..90ebb10 --- /dev/null +++ b/node_modules/typescript/dist/enums/syntaxKind.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"syntaxKind.enum.js","sourceRoot":"","sources":["../../src/enums/syntaxKind.enum.ts"],"names":[],"mappings":"AAAA,oGAAoG;AAEpG,MAAM,CAAN,IAAY,UAmYX;AAnYD,WAAY,UAAU;IAClB,iDAAW,CAAA;IACX,qDAAa,CAAA;IACb,iFAA2B,CAAA;IAC3B,+EAA0B,CAAA;IAC1B,6DAA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AuB,CAAA;IACvB,qEAAkC,CAAA;IAClC,oEAAgD,CAAA;IAChD,wEAAkD,CAAA;IAClD,sEAAgC,CAAA;IAChC,0EAAmC,CAAA;IACnC,wEAAqC,CAAA;IACrC,iEAAkC,CAAA;IAClC,+DAAiC,CAAA;IACjC,uDAAyB,CAAA;IACzB,iEAAoC,CAAA;IACpC,+DAA8B,CAAA;IAC9B,uEAAmC,CAAA;IACnC,qEAAiC,CAAA;IACjC,iFAAwC,CAAA;IACxC,+EAAoC,CAAA;IACpC,sEAA8B,CAAA;IAC9B,mEAA0C,CAAA;IAC1C,iEAAsC,CAAA;AAC1C,CAAC,EAnYW,UAAU,KAAV,UAAU,QAmYrB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/syntaxKind.js b/node_modules/typescript/dist/enums/syntaxKind.js new file mode 100644 index 0000000..1326dc0 --- /dev/null +++ b/node_modules/typescript/dist/enums/syntaxKind.js @@ -0,0 +1,391 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/ast/kind_generated.go. DO NOT EDIT. +export var SyntaxKind; +(function (SyntaxKind) { + SyntaxKind[SyntaxKind["Unknown"] = 0] = "Unknown"; + SyntaxKind[SyntaxKind["EndOfFile"] = 1] = "EndOfFile"; + SyntaxKind[SyntaxKind["SingleLineCommentTrivia"] = 2] = "SingleLineCommentTrivia"; + SyntaxKind[SyntaxKind["MultiLineCommentTrivia"] = 3] = "MultiLineCommentTrivia"; + SyntaxKind[SyntaxKind["NewLineTrivia"] = 4] = "NewLineTrivia"; + SyntaxKind[SyntaxKind["WhitespaceTrivia"] = 5] = "WhitespaceTrivia"; + SyntaxKind[SyntaxKind["ConflictMarkerTrivia"] = 6] = "ConflictMarkerTrivia"; + SyntaxKind[SyntaxKind["NonTextFileMarkerTrivia"] = 7] = "NonTextFileMarkerTrivia"; + SyntaxKind[SyntaxKind["NumericLiteral"] = 8] = "NumericLiteral"; + SyntaxKind[SyntaxKind["BigIntLiteral"] = 9] = "BigIntLiteral"; + SyntaxKind[SyntaxKind["StringLiteral"] = 10] = "StringLiteral"; + SyntaxKind[SyntaxKind["JsxText"] = 11] = "JsxText"; + SyntaxKind[SyntaxKind["JsxTextAllWhiteSpaces"] = 12] = "JsxTextAllWhiteSpaces"; + SyntaxKind[SyntaxKind["RegularExpressionLiteral"] = 13] = "RegularExpressionLiteral"; + SyntaxKind[SyntaxKind["NoSubstitutionTemplateLiteral"] = 14] = "NoSubstitutionTemplateLiteral"; + SyntaxKind[SyntaxKind["TemplateHead"] = 15] = "TemplateHead"; + SyntaxKind[SyntaxKind["TemplateMiddle"] = 16] = "TemplateMiddle"; + SyntaxKind[SyntaxKind["TemplateTail"] = 17] = "TemplateTail"; + SyntaxKind[SyntaxKind["OpenBraceToken"] = 18] = "OpenBraceToken"; + SyntaxKind[SyntaxKind["CloseBraceToken"] = 19] = "CloseBraceToken"; + SyntaxKind[SyntaxKind["OpenParenToken"] = 20] = "OpenParenToken"; + SyntaxKind[SyntaxKind["CloseParenToken"] = 21] = "CloseParenToken"; + SyntaxKind[SyntaxKind["OpenBracketToken"] = 22] = "OpenBracketToken"; + SyntaxKind[SyntaxKind["CloseBracketToken"] = 23] = "CloseBracketToken"; + SyntaxKind[SyntaxKind["DotToken"] = 24] = "DotToken"; + SyntaxKind[SyntaxKind["DotDotDotToken"] = 25] = "DotDotDotToken"; + SyntaxKind[SyntaxKind["SemicolonToken"] = 26] = "SemicolonToken"; + SyntaxKind[SyntaxKind["CommaToken"] = 27] = "CommaToken"; + SyntaxKind[SyntaxKind["QuestionDotToken"] = 28] = "QuestionDotToken"; + SyntaxKind[SyntaxKind["LessThanToken"] = 29] = "LessThanToken"; + SyntaxKind[SyntaxKind["LessThanSlashToken"] = 30] = "LessThanSlashToken"; + SyntaxKind[SyntaxKind["GreaterThanToken"] = 31] = "GreaterThanToken"; + SyntaxKind[SyntaxKind["LessThanEqualsToken"] = 32] = "LessThanEqualsToken"; + SyntaxKind[SyntaxKind["GreaterThanEqualsToken"] = 33] = "GreaterThanEqualsToken"; + SyntaxKind[SyntaxKind["EqualsEqualsToken"] = 34] = "EqualsEqualsToken"; + SyntaxKind[SyntaxKind["ExclamationEqualsToken"] = 35] = "ExclamationEqualsToken"; + SyntaxKind[SyntaxKind["EqualsEqualsEqualsToken"] = 36] = "EqualsEqualsEqualsToken"; + SyntaxKind[SyntaxKind["ExclamationEqualsEqualsToken"] = 37] = "ExclamationEqualsEqualsToken"; + SyntaxKind[SyntaxKind["EqualsGreaterThanToken"] = 38] = "EqualsGreaterThanToken"; + SyntaxKind[SyntaxKind["PlusToken"] = 39] = "PlusToken"; + SyntaxKind[SyntaxKind["MinusToken"] = 40] = "MinusToken"; + SyntaxKind[SyntaxKind["AsteriskToken"] = 41] = "AsteriskToken"; + SyntaxKind[SyntaxKind["AsteriskAsteriskToken"] = 42] = "AsteriskAsteriskToken"; + SyntaxKind[SyntaxKind["SlashToken"] = 43] = "SlashToken"; + SyntaxKind[SyntaxKind["PercentToken"] = 44] = "PercentToken"; + SyntaxKind[SyntaxKind["PlusPlusToken"] = 45] = "PlusPlusToken"; + SyntaxKind[SyntaxKind["MinusMinusToken"] = 46] = "MinusMinusToken"; + SyntaxKind[SyntaxKind["LessThanLessThanToken"] = 47] = "LessThanLessThanToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanToken"] = 48] = "GreaterThanGreaterThanToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanToken"] = 49] = "GreaterThanGreaterThanGreaterThanToken"; + SyntaxKind[SyntaxKind["AmpersandToken"] = 50] = "AmpersandToken"; + SyntaxKind[SyntaxKind["BarToken"] = 51] = "BarToken"; + SyntaxKind[SyntaxKind["CaretToken"] = 52] = "CaretToken"; + SyntaxKind[SyntaxKind["ExclamationToken"] = 53] = "ExclamationToken"; + SyntaxKind[SyntaxKind["TildeToken"] = 54] = "TildeToken"; + SyntaxKind[SyntaxKind["AmpersandAmpersandToken"] = 55] = "AmpersandAmpersandToken"; + SyntaxKind[SyntaxKind["BarBarToken"] = 56] = "BarBarToken"; + SyntaxKind[SyntaxKind["QuestionToken"] = 57] = "QuestionToken"; + SyntaxKind[SyntaxKind["ColonToken"] = 58] = "ColonToken"; + SyntaxKind[SyntaxKind["AtToken"] = 59] = "AtToken"; + SyntaxKind[SyntaxKind["QuestionQuestionToken"] = 60] = "QuestionQuestionToken"; + SyntaxKind[SyntaxKind["BacktickToken"] = 61] = "BacktickToken"; + SyntaxKind[SyntaxKind["HashToken"] = 62] = "HashToken"; + SyntaxKind[SyntaxKind["EqualsToken"] = 63] = "EqualsToken"; + SyntaxKind[SyntaxKind["PlusEqualsToken"] = 64] = "PlusEqualsToken"; + SyntaxKind[SyntaxKind["MinusEqualsToken"] = 65] = "MinusEqualsToken"; + SyntaxKind[SyntaxKind["AsteriskEqualsToken"] = 66] = "AsteriskEqualsToken"; + SyntaxKind[SyntaxKind["AsteriskAsteriskEqualsToken"] = 67] = "AsteriskAsteriskEqualsToken"; + SyntaxKind[SyntaxKind["SlashEqualsToken"] = 68] = "SlashEqualsToken"; + SyntaxKind[SyntaxKind["PercentEqualsToken"] = 69] = "PercentEqualsToken"; + SyntaxKind[SyntaxKind["LessThanLessThanEqualsToken"] = 70] = "LessThanLessThanEqualsToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanEqualsToken"] = 71] = "GreaterThanGreaterThanEqualsToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanEqualsToken"] = 72] = "GreaterThanGreaterThanGreaterThanEqualsToken"; + SyntaxKind[SyntaxKind["AmpersandEqualsToken"] = 73] = "AmpersandEqualsToken"; + SyntaxKind[SyntaxKind["BarEqualsToken"] = 74] = "BarEqualsToken"; + SyntaxKind[SyntaxKind["BarBarEqualsToken"] = 75] = "BarBarEqualsToken"; + SyntaxKind[SyntaxKind["AmpersandAmpersandEqualsToken"] = 76] = "AmpersandAmpersandEqualsToken"; + SyntaxKind[SyntaxKind["QuestionQuestionEqualsToken"] = 77] = "QuestionQuestionEqualsToken"; + SyntaxKind[SyntaxKind["CaretEqualsToken"] = 78] = "CaretEqualsToken"; + SyntaxKind[SyntaxKind["Identifier"] = 79] = "Identifier"; + SyntaxKind[SyntaxKind["PrivateIdentifier"] = 80] = "PrivateIdentifier"; + SyntaxKind[SyntaxKind["JSDocCommentTextToken"] = 81] = "JSDocCommentTextToken"; + SyntaxKind[SyntaxKind["BreakKeyword"] = 82] = "BreakKeyword"; + SyntaxKind[SyntaxKind["CaseKeyword"] = 83] = "CaseKeyword"; + SyntaxKind[SyntaxKind["CatchKeyword"] = 84] = "CatchKeyword"; + SyntaxKind[SyntaxKind["ClassKeyword"] = 85] = "ClassKeyword"; + SyntaxKind[SyntaxKind["ConstKeyword"] = 86] = "ConstKeyword"; + SyntaxKind[SyntaxKind["ContinueKeyword"] = 87] = "ContinueKeyword"; + SyntaxKind[SyntaxKind["DebuggerKeyword"] = 88] = "DebuggerKeyword"; + SyntaxKind[SyntaxKind["DefaultKeyword"] = 89] = "DefaultKeyword"; + SyntaxKind[SyntaxKind["DeleteKeyword"] = 90] = "DeleteKeyword"; + SyntaxKind[SyntaxKind["DoKeyword"] = 91] = "DoKeyword"; + SyntaxKind[SyntaxKind["ElseKeyword"] = 92] = "ElseKeyword"; + SyntaxKind[SyntaxKind["EnumKeyword"] = 93] = "EnumKeyword"; + SyntaxKind[SyntaxKind["ExportKeyword"] = 94] = "ExportKeyword"; + SyntaxKind[SyntaxKind["ExtendsKeyword"] = 95] = "ExtendsKeyword"; + SyntaxKind[SyntaxKind["FalseKeyword"] = 96] = "FalseKeyword"; + SyntaxKind[SyntaxKind["FinallyKeyword"] = 97] = "FinallyKeyword"; + SyntaxKind[SyntaxKind["ForKeyword"] = 98] = "ForKeyword"; + SyntaxKind[SyntaxKind["FunctionKeyword"] = 99] = "FunctionKeyword"; + SyntaxKind[SyntaxKind["IfKeyword"] = 100] = "IfKeyword"; + SyntaxKind[SyntaxKind["ImportKeyword"] = 101] = "ImportKeyword"; + SyntaxKind[SyntaxKind["InKeyword"] = 102] = "InKeyword"; + SyntaxKind[SyntaxKind["InstanceOfKeyword"] = 103] = "InstanceOfKeyword"; + SyntaxKind[SyntaxKind["NewKeyword"] = 104] = "NewKeyword"; + SyntaxKind[SyntaxKind["NullKeyword"] = 105] = "NullKeyword"; + SyntaxKind[SyntaxKind["ReturnKeyword"] = 106] = "ReturnKeyword"; + SyntaxKind[SyntaxKind["SuperKeyword"] = 107] = "SuperKeyword"; + SyntaxKind[SyntaxKind["SwitchKeyword"] = 108] = "SwitchKeyword"; + SyntaxKind[SyntaxKind["ThisKeyword"] = 109] = "ThisKeyword"; + SyntaxKind[SyntaxKind["ThrowKeyword"] = 110] = "ThrowKeyword"; + SyntaxKind[SyntaxKind["TrueKeyword"] = 111] = "TrueKeyword"; + SyntaxKind[SyntaxKind["TryKeyword"] = 112] = "TryKeyword"; + SyntaxKind[SyntaxKind["TypeOfKeyword"] = 113] = "TypeOfKeyword"; + SyntaxKind[SyntaxKind["VarKeyword"] = 114] = "VarKeyword"; + SyntaxKind[SyntaxKind["VoidKeyword"] = 115] = "VoidKeyword"; + SyntaxKind[SyntaxKind["WhileKeyword"] = 116] = "WhileKeyword"; + SyntaxKind[SyntaxKind["WithKeyword"] = 117] = "WithKeyword"; + SyntaxKind[SyntaxKind["ImplementsKeyword"] = 118] = "ImplementsKeyword"; + SyntaxKind[SyntaxKind["InterfaceKeyword"] = 119] = "InterfaceKeyword"; + SyntaxKind[SyntaxKind["LetKeyword"] = 120] = "LetKeyword"; + SyntaxKind[SyntaxKind["PackageKeyword"] = 121] = "PackageKeyword"; + SyntaxKind[SyntaxKind["PrivateKeyword"] = 122] = "PrivateKeyword"; + SyntaxKind[SyntaxKind["ProtectedKeyword"] = 123] = "ProtectedKeyword"; + SyntaxKind[SyntaxKind["PublicKeyword"] = 124] = "PublicKeyword"; + SyntaxKind[SyntaxKind["StaticKeyword"] = 125] = "StaticKeyword"; + SyntaxKind[SyntaxKind["YieldKeyword"] = 126] = "YieldKeyword"; + SyntaxKind[SyntaxKind["AbstractKeyword"] = 127] = "AbstractKeyword"; + SyntaxKind[SyntaxKind["AccessorKeyword"] = 128] = "AccessorKeyword"; + SyntaxKind[SyntaxKind["AsKeyword"] = 129] = "AsKeyword"; + SyntaxKind[SyntaxKind["AssertsKeyword"] = 130] = "AssertsKeyword"; + SyntaxKind[SyntaxKind["AssertKeyword"] = 131] = "AssertKeyword"; + SyntaxKind[SyntaxKind["AnyKeyword"] = 132] = "AnyKeyword"; + SyntaxKind[SyntaxKind["AsyncKeyword"] = 133] = "AsyncKeyword"; + SyntaxKind[SyntaxKind["AwaitKeyword"] = 134] = "AwaitKeyword"; + SyntaxKind[SyntaxKind["BooleanKeyword"] = 135] = "BooleanKeyword"; + SyntaxKind[SyntaxKind["ConstructorKeyword"] = 136] = "ConstructorKeyword"; + SyntaxKind[SyntaxKind["DeclareKeyword"] = 137] = "DeclareKeyword"; + SyntaxKind[SyntaxKind["GetKeyword"] = 138] = "GetKeyword"; + SyntaxKind[SyntaxKind["ImmediateKeyword"] = 139] = "ImmediateKeyword"; + SyntaxKind[SyntaxKind["InferKeyword"] = 140] = "InferKeyword"; + SyntaxKind[SyntaxKind["IntrinsicKeyword"] = 141] = "IntrinsicKeyword"; + SyntaxKind[SyntaxKind["IsKeyword"] = 142] = "IsKeyword"; + SyntaxKind[SyntaxKind["KeyOfKeyword"] = 143] = "KeyOfKeyword"; + SyntaxKind[SyntaxKind["ModuleKeyword"] = 144] = "ModuleKeyword"; + SyntaxKind[SyntaxKind["NamespaceKeyword"] = 145] = "NamespaceKeyword"; + SyntaxKind[SyntaxKind["NeverKeyword"] = 146] = "NeverKeyword"; + SyntaxKind[SyntaxKind["OutKeyword"] = 147] = "OutKeyword"; + SyntaxKind[SyntaxKind["ReadonlyKeyword"] = 148] = "ReadonlyKeyword"; + SyntaxKind[SyntaxKind["RequireKeyword"] = 149] = "RequireKeyword"; + SyntaxKind[SyntaxKind["NumberKeyword"] = 150] = "NumberKeyword"; + SyntaxKind[SyntaxKind["ObjectKeyword"] = 151] = "ObjectKeyword"; + SyntaxKind[SyntaxKind["SatisfiesKeyword"] = 152] = "SatisfiesKeyword"; + SyntaxKind[SyntaxKind["SetKeyword"] = 153] = "SetKeyword"; + SyntaxKind[SyntaxKind["StringKeyword"] = 154] = "StringKeyword"; + SyntaxKind[SyntaxKind["SymbolKeyword"] = 155] = "SymbolKeyword"; + SyntaxKind[SyntaxKind["TypeKeyword"] = 156] = "TypeKeyword"; + SyntaxKind[SyntaxKind["UndefinedKeyword"] = 157] = "UndefinedKeyword"; + SyntaxKind[SyntaxKind["UniqueKeyword"] = 158] = "UniqueKeyword"; + SyntaxKind[SyntaxKind["UnknownKeyword"] = 159] = "UnknownKeyword"; + SyntaxKind[SyntaxKind["UsingKeyword"] = 160] = "UsingKeyword"; + SyntaxKind[SyntaxKind["FromKeyword"] = 161] = "FromKeyword"; + SyntaxKind[SyntaxKind["GlobalKeyword"] = 162] = "GlobalKeyword"; + SyntaxKind[SyntaxKind["BigIntKeyword"] = 163] = "BigIntKeyword"; + SyntaxKind[SyntaxKind["OverrideKeyword"] = 164] = "OverrideKeyword"; + SyntaxKind[SyntaxKind["OfKeyword"] = 165] = "OfKeyword"; + SyntaxKind[SyntaxKind["DeferKeyword"] = 166] = "DeferKeyword"; + SyntaxKind[SyntaxKind["QualifiedName"] = 167] = "QualifiedName"; + SyntaxKind[SyntaxKind["ComputedPropertyName"] = 168] = "ComputedPropertyName"; + SyntaxKind[SyntaxKind["TypeParameter"] = 169] = "TypeParameter"; + SyntaxKind[SyntaxKind["Parameter"] = 170] = "Parameter"; + SyntaxKind[SyntaxKind["Decorator"] = 171] = "Decorator"; + SyntaxKind[SyntaxKind["PropertySignature"] = 172] = "PropertySignature"; + SyntaxKind[SyntaxKind["PropertyDeclaration"] = 173] = "PropertyDeclaration"; + SyntaxKind[SyntaxKind["MethodSignature"] = 174] = "MethodSignature"; + SyntaxKind[SyntaxKind["MethodDeclaration"] = 175] = "MethodDeclaration"; + SyntaxKind[SyntaxKind["ClassStaticBlockDeclaration"] = 176] = "ClassStaticBlockDeclaration"; + SyntaxKind[SyntaxKind["Constructor"] = 177] = "Constructor"; + SyntaxKind[SyntaxKind["GetAccessor"] = 178] = "GetAccessor"; + SyntaxKind[SyntaxKind["SetAccessor"] = 179] = "SetAccessor"; + SyntaxKind[SyntaxKind["CallSignature"] = 180] = "CallSignature"; + SyntaxKind[SyntaxKind["ConstructSignature"] = 181] = "ConstructSignature"; + SyntaxKind[SyntaxKind["IndexSignature"] = 182] = "IndexSignature"; + SyntaxKind[SyntaxKind["TypePredicate"] = 183] = "TypePredicate"; + SyntaxKind[SyntaxKind["TypeReference"] = 184] = "TypeReference"; + SyntaxKind[SyntaxKind["FunctionType"] = 185] = "FunctionType"; + SyntaxKind[SyntaxKind["ConstructorType"] = 186] = "ConstructorType"; + SyntaxKind[SyntaxKind["TypeQuery"] = 187] = "TypeQuery"; + SyntaxKind[SyntaxKind["TypeLiteral"] = 188] = "TypeLiteral"; + SyntaxKind[SyntaxKind["ArrayType"] = 189] = "ArrayType"; + SyntaxKind[SyntaxKind["TupleType"] = 190] = "TupleType"; + SyntaxKind[SyntaxKind["OptionalType"] = 191] = "OptionalType"; + SyntaxKind[SyntaxKind["RestType"] = 192] = "RestType"; + SyntaxKind[SyntaxKind["UnionType"] = 193] = "UnionType"; + SyntaxKind[SyntaxKind["IntersectionType"] = 194] = "IntersectionType"; + SyntaxKind[SyntaxKind["ConditionalType"] = 195] = "ConditionalType"; + SyntaxKind[SyntaxKind["InferType"] = 196] = "InferType"; + SyntaxKind[SyntaxKind["ParenthesizedType"] = 197] = "ParenthesizedType"; + SyntaxKind[SyntaxKind["ThisType"] = 198] = "ThisType"; + SyntaxKind[SyntaxKind["TypeOperator"] = 199] = "TypeOperator"; + SyntaxKind[SyntaxKind["IndexedAccessType"] = 200] = "IndexedAccessType"; + SyntaxKind[SyntaxKind["MappedType"] = 201] = "MappedType"; + SyntaxKind[SyntaxKind["LiteralType"] = 202] = "LiteralType"; + SyntaxKind[SyntaxKind["NamedTupleMember"] = 203] = "NamedTupleMember"; + SyntaxKind[SyntaxKind["TemplateLiteralType"] = 204] = "TemplateLiteralType"; + SyntaxKind[SyntaxKind["TemplateLiteralTypeSpan"] = 205] = "TemplateLiteralTypeSpan"; + SyntaxKind[SyntaxKind["ImportType"] = 206] = "ImportType"; + SyntaxKind[SyntaxKind["ObjectBindingPattern"] = 207] = "ObjectBindingPattern"; + SyntaxKind[SyntaxKind["ArrayBindingPattern"] = 208] = "ArrayBindingPattern"; + SyntaxKind[SyntaxKind["BindingElement"] = 209] = "BindingElement"; + SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 210] = "ArrayLiteralExpression"; + SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 211] = "ObjectLiteralExpression"; + SyntaxKind[SyntaxKind["PropertyAccessExpression"] = 212] = "PropertyAccessExpression"; + SyntaxKind[SyntaxKind["ElementAccessExpression"] = 213] = "ElementAccessExpression"; + SyntaxKind[SyntaxKind["CallExpression"] = 214] = "CallExpression"; + SyntaxKind[SyntaxKind["NewExpression"] = 215] = "NewExpression"; + SyntaxKind[SyntaxKind["TaggedTemplateExpression"] = 216] = "TaggedTemplateExpression"; + SyntaxKind[SyntaxKind["TypeAssertionExpression"] = 217] = "TypeAssertionExpression"; + SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 218] = "ParenthesizedExpression"; + SyntaxKind[SyntaxKind["FunctionExpression"] = 219] = "FunctionExpression"; + SyntaxKind[SyntaxKind["ArrowFunction"] = 220] = "ArrowFunction"; + SyntaxKind[SyntaxKind["DeleteExpression"] = 221] = "DeleteExpression"; + SyntaxKind[SyntaxKind["TypeOfExpression"] = 222] = "TypeOfExpression"; + SyntaxKind[SyntaxKind["VoidExpression"] = 223] = "VoidExpression"; + SyntaxKind[SyntaxKind["AwaitExpression"] = 224] = "AwaitExpression"; + SyntaxKind[SyntaxKind["PrefixUnaryExpression"] = 225] = "PrefixUnaryExpression"; + SyntaxKind[SyntaxKind["PostfixUnaryExpression"] = 226] = "PostfixUnaryExpression"; + SyntaxKind[SyntaxKind["BinaryExpression"] = 227] = "BinaryExpression"; + SyntaxKind[SyntaxKind["ConditionalExpression"] = 228] = "ConditionalExpression"; + SyntaxKind[SyntaxKind["TemplateExpression"] = 229] = "TemplateExpression"; + SyntaxKind[SyntaxKind["YieldExpression"] = 230] = "YieldExpression"; + SyntaxKind[SyntaxKind["SpreadElement"] = 231] = "SpreadElement"; + SyntaxKind[SyntaxKind["ClassExpression"] = 232] = "ClassExpression"; + SyntaxKind[SyntaxKind["OmittedExpression"] = 233] = "OmittedExpression"; + SyntaxKind[SyntaxKind["ExpressionWithTypeArguments"] = 234] = "ExpressionWithTypeArguments"; + SyntaxKind[SyntaxKind["AsExpression"] = 235] = "AsExpression"; + SyntaxKind[SyntaxKind["NonNullExpression"] = 236] = "NonNullExpression"; + SyntaxKind[SyntaxKind["MetaProperty"] = 237] = "MetaProperty"; + SyntaxKind[SyntaxKind["SyntheticExpression"] = 238] = "SyntheticExpression"; + SyntaxKind[SyntaxKind["SatisfiesExpression"] = 239] = "SatisfiesExpression"; + SyntaxKind[SyntaxKind["TemplateSpan"] = 240] = "TemplateSpan"; + SyntaxKind[SyntaxKind["SemicolonClassElement"] = 241] = "SemicolonClassElement"; + SyntaxKind[SyntaxKind["Block"] = 242] = "Block"; + SyntaxKind[SyntaxKind["EmptyStatement"] = 243] = "EmptyStatement"; + SyntaxKind[SyntaxKind["VariableStatement"] = 244] = "VariableStatement"; + SyntaxKind[SyntaxKind["ExpressionStatement"] = 245] = "ExpressionStatement"; + SyntaxKind[SyntaxKind["IfStatement"] = 246] = "IfStatement"; + SyntaxKind[SyntaxKind["DoStatement"] = 247] = "DoStatement"; + SyntaxKind[SyntaxKind["WhileStatement"] = 248] = "WhileStatement"; + SyntaxKind[SyntaxKind["ForStatement"] = 249] = "ForStatement"; + SyntaxKind[SyntaxKind["ForInStatement"] = 250] = "ForInStatement"; + SyntaxKind[SyntaxKind["ForOfStatement"] = 251] = "ForOfStatement"; + SyntaxKind[SyntaxKind["ContinueStatement"] = 252] = "ContinueStatement"; + SyntaxKind[SyntaxKind["BreakStatement"] = 253] = "BreakStatement"; + SyntaxKind[SyntaxKind["ReturnStatement"] = 254] = "ReturnStatement"; + SyntaxKind[SyntaxKind["WithStatement"] = 255] = "WithStatement"; + SyntaxKind[SyntaxKind["SwitchStatement"] = 256] = "SwitchStatement"; + SyntaxKind[SyntaxKind["LabeledStatement"] = 257] = "LabeledStatement"; + SyntaxKind[SyntaxKind["ThrowStatement"] = 258] = "ThrowStatement"; + SyntaxKind[SyntaxKind["TryStatement"] = 259] = "TryStatement"; + SyntaxKind[SyntaxKind["DebuggerStatement"] = 260] = "DebuggerStatement"; + SyntaxKind[SyntaxKind["VariableDeclaration"] = 261] = "VariableDeclaration"; + SyntaxKind[SyntaxKind["VariableDeclarationList"] = 262] = "VariableDeclarationList"; + SyntaxKind[SyntaxKind["FunctionDeclaration"] = 263] = "FunctionDeclaration"; + SyntaxKind[SyntaxKind["ClassDeclaration"] = 264] = "ClassDeclaration"; + SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 265] = "InterfaceDeclaration"; + SyntaxKind[SyntaxKind["TypeAliasDeclaration"] = 266] = "TypeAliasDeclaration"; + SyntaxKind[SyntaxKind["EnumDeclaration"] = 267] = "EnumDeclaration"; + SyntaxKind[SyntaxKind["ModuleDeclaration"] = 268] = "ModuleDeclaration"; + SyntaxKind[SyntaxKind["ModuleBlock"] = 269] = "ModuleBlock"; + SyntaxKind[SyntaxKind["CaseBlock"] = 270] = "CaseBlock"; + SyntaxKind[SyntaxKind["NamespaceExportDeclaration"] = 271] = "NamespaceExportDeclaration"; + SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 272] = "ImportEqualsDeclaration"; + SyntaxKind[SyntaxKind["ImportDeclaration"] = 273] = "ImportDeclaration"; + SyntaxKind[SyntaxKind["ImportClause"] = 274] = "ImportClause"; + SyntaxKind[SyntaxKind["NamespaceImport"] = 275] = "NamespaceImport"; + SyntaxKind[SyntaxKind["NamedImports"] = 276] = "NamedImports"; + SyntaxKind[SyntaxKind["ImportSpecifier"] = 277] = "ImportSpecifier"; + SyntaxKind[SyntaxKind["ExportAssignment"] = 278] = "ExportAssignment"; + SyntaxKind[SyntaxKind["ExportDeclaration"] = 279] = "ExportDeclaration"; + SyntaxKind[SyntaxKind["NamedExports"] = 280] = "NamedExports"; + SyntaxKind[SyntaxKind["NamespaceExport"] = 281] = "NamespaceExport"; + SyntaxKind[SyntaxKind["ExportSpecifier"] = 282] = "ExportSpecifier"; + SyntaxKind[SyntaxKind["MissingDeclaration"] = 283] = "MissingDeclaration"; + SyntaxKind[SyntaxKind["ExternalModuleReference"] = 284] = "ExternalModuleReference"; + SyntaxKind[SyntaxKind["JsxElement"] = 285] = "JsxElement"; + SyntaxKind[SyntaxKind["JsxSelfClosingElement"] = 286] = "JsxSelfClosingElement"; + SyntaxKind[SyntaxKind["JsxOpeningElement"] = 287] = "JsxOpeningElement"; + SyntaxKind[SyntaxKind["JsxClosingElement"] = 288] = "JsxClosingElement"; + SyntaxKind[SyntaxKind["JsxFragment"] = 289] = "JsxFragment"; + SyntaxKind[SyntaxKind["JsxOpeningFragment"] = 290] = "JsxOpeningFragment"; + SyntaxKind[SyntaxKind["JsxClosingFragment"] = 291] = "JsxClosingFragment"; + SyntaxKind[SyntaxKind["JsxAttribute"] = 292] = "JsxAttribute"; + SyntaxKind[SyntaxKind["JsxAttributes"] = 293] = "JsxAttributes"; + SyntaxKind[SyntaxKind["JsxSpreadAttribute"] = 294] = "JsxSpreadAttribute"; + SyntaxKind[SyntaxKind["JsxExpression"] = 295] = "JsxExpression"; + SyntaxKind[SyntaxKind["JsxNamespacedName"] = 296] = "JsxNamespacedName"; + SyntaxKind[SyntaxKind["CaseClause"] = 297] = "CaseClause"; + SyntaxKind[SyntaxKind["DefaultClause"] = 298] = "DefaultClause"; + SyntaxKind[SyntaxKind["HeritageClause"] = 299] = "HeritageClause"; + SyntaxKind[SyntaxKind["CatchClause"] = 300] = "CatchClause"; + SyntaxKind[SyntaxKind["ImportAttributes"] = 301] = "ImportAttributes"; + SyntaxKind[SyntaxKind["ImportAttribute"] = 302] = "ImportAttribute"; + SyntaxKind[SyntaxKind["PropertyAssignment"] = 303] = "PropertyAssignment"; + SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 304] = "ShorthandPropertyAssignment"; + SyntaxKind[SyntaxKind["SpreadAssignment"] = 305] = "SpreadAssignment"; + SyntaxKind[SyntaxKind["EnumMember"] = 306] = "EnumMember"; + SyntaxKind[SyntaxKind["SourceFile"] = 307] = "SourceFile"; + SyntaxKind[SyntaxKind["JSDocTypeExpression"] = 308] = "JSDocTypeExpression"; + SyntaxKind[SyntaxKind["JSDocNameReference"] = 309] = "JSDocNameReference"; + SyntaxKind[SyntaxKind["JSDocAllType"] = 310] = "JSDocAllType"; + SyntaxKind[SyntaxKind["JSDocNullableType"] = 311] = "JSDocNullableType"; + SyntaxKind[SyntaxKind["JSDocNonNullableType"] = 312] = "JSDocNonNullableType"; + SyntaxKind[SyntaxKind["JSDocOptionalType"] = 313] = "JSDocOptionalType"; + SyntaxKind[SyntaxKind["JSDocVariadicType"] = 314] = "JSDocVariadicType"; + SyntaxKind[SyntaxKind["JSDoc"] = 315] = "JSDoc"; + SyntaxKind[SyntaxKind["JSDocText"] = 316] = "JSDocText"; + SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 317] = "JSDocTypeLiteral"; + SyntaxKind[SyntaxKind["JSDocSignature"] = 318] = "JSDocSignature"; + SyntaxKind[SyntaxKind["JSDocLink"] = 319] = "JSDocLink"; + SyntaxKind[SyntaxKind["JSDocLinkCode"] = 320] = "JSDocLinkCode"; + SyntaxKind[SyntaxKind["JSDocLinkPlain"] = 321] = "JSDocLinkPlain"; + SyntaxKind[SyntaxKind["JSDocUnknownTag"] = 322] = "JSDocUnknownTag"; + SyntaxKind[SyntaxKind["JSDocAugmentsTag"] = 323] = "JSDocAugmentsTag"; + SyntaxKind[SyntaxKind["JSDocImplementsTag"] = 324] = "JSDocImplementsTag"; + SyntaxKind[SyntaxKind["JSDocDeprecatedTag"] = 325] = "JSDocDeprecatedTag"; + SyntaxKind[SyntaxKind["JSDocPublicTag"] = 326] = "JSDocPublicTag"; + SyntaxKind[SyntaxKind["JSDocPrivateTag"] = 327] = "JSDocPrivateTag"; + SyntaxKind[SyntaxKind["JSDocProtectedTag"] = 328] = "JSDocProtectedTag"; + SyntaxKind[SyntaxKind["JSDocReadonlyTag"] = 329] = "JSDocReadonlyTag"; + SyntaxKind[SyntaxKind["JSDocOverrideTag"] = 330] = "JSDocOverrideTag"; + SyntaxKind[SyntaxKind["JSDocCallbackTag"] = 331] = "JSDocCallbackTag"; + SyntaxKind[SyntaxKind["JSDocOverloadTag"] = 332] = "JSDocOverloadTag"; + SyntaxKind[SyntaxKind["JSDocParameterTag"] = 333] = "JSDocParameterTag"; + SyntaxKind[SyntaxKind["JSDocReturnTag"] = 334] = "JSDocReturnTag"; + SyntaxKind[SyntaxKind["JSDocThisTag"] = 335] = "JSDocThisTag"; + SyntaxKind[SyntaxKind["JSDocTypeTag"] = 336] = "JSDocTypeTag"; + SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 337] = "JSDocTemplateTag"; + SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 338] = "JSDocTypedefTag"; + SyntaxKind[SyntaxKind["JSDocSeeTag"] = 339] = "JSDocSeeTag"; + SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 340] = "JSDocPropertyTag"; + SyntaxKind[SyntaxKind["JSDocThrowsTag"] = 341] = "JSDocThrowsTag"; + SyntaxKind[SyntaxKind["JSDocSatisfiesTag"] = 342] = "JSDocSatisfiesTag"; + SyntaxKind[SyntaxKind["JSDocImportTag"] = 343] = "JSDocImportTag"; + SyntaxKind[SyntaxKind["SyntaxList"] = 344] = "SyntaxList"; + SyntaxKind[SyntaxKind["JSTypeAliasDeclaration"] = 345] = "JSTypeAliasDeclaration"; + SyntaxKind[SyntaxKind["JSImportDeclaration"] = 346] = "JSImportDeclaration"; + SyntaxKind[SyntaxKind["NotEmittedStatement"] = 347] = "NotEmittedStatement"; + SyntaxKind[SyntaxKind["PartiallyEmittedExpression"] = 348] = "PartiallyEmittedExpression"; + SyntaxKind[SyntaxKind["SyntheticReferenceExpression"] = 349] = "SyntheticReferenceExpression"; + SyntaxKind[SyntaxKind["NotEmittedTypeElement"] = 350] = "NotEmittedTypeElement"; + SyntaxKind[SyntaxKind["Count"] = 351] = "Count"; + SyntaxKind[SyntaxKind["FirstAssignment"] = 63] = "FirstAssignment"; + SyntaxKind[SyntaxKind["LastAssignment"] = 78] = "LastAssignment"; + SyntaxKind[SyntaxKind["FirstCompoundAssignment"] = 64] = "FirstCompoundAssignment"; + SyntaxKind[SyntaxKind["LastCompoundAssignment"] = 78] = "LastCompoundAssignment"; + SyntaxKind[SyntaxKind["FirstReservedWord"] = 82] = "FirstReservedWord"; + SyntaxKind[SyntaxKind["LastReservedWord"] = 117] = "LastReservedWord"; + SyntaxKind[SyntaxKind["FirstKeyword"] = 82] = "FirstKeyword"; + SyntaxKind[SyntaxKind["LastKeyword"] = 166] = "LastKeyword"; + SyntaxKind[SyntaxKind["FirstFutureReservedWord"] = 118] = "FirstFutureReservedWord"; + SyntaxKind[SyntaxKind["LastFutureReservedWord"] = 126] = "LastFutureReservedWord"; + SyntaxKind[SyntaxKind["FirstTypeNode"] = 183] = "FirstTypeNode"; + SyntaxKind[SyntaxKind["LastTypeNode"] = 206] = "LastTypeNode"; + SyntaxKind[SyntaxKind["FirstPunctuation"] = 18] = "FirstPunctuation"; + SyntaxKind[SyntaxKind["LastPunctuation"] = 78] = "LastPunctuation"; + SyntaxKind[SyntaxKind["FirstToken"] = 0] = "FirstToken"; + SyntaxKind[SyntaxKind["LastToken"] = 166] = "LastToken"; + SyntaxKind[SyntaxKind["FirstLiteralToken"] = 8] = "FirstLiteralToken"; + SyntaxKind[SyntaxKind["LastLiteralToken"] = 14] = "LastLiteralToken"; + SyntaxKind[SyntaxKind["FirstTemplateToken"] = 14] = "FirstTemplateToken"; + SyntaxKind[SyntaxKind["LastTemplateToken"] = 17] = "LastTemplateToken"; + SyntaxKind[SyntaxKind["FirstBinaryOperator"] = 29] = "FirstBinaryOperator"; + SyntaxKind[SyntaxKind["LastBinaryOperator"] = 78] = "LastBinaryOperator"; + SyntaxKind[SyntaxKind["FirstStatement"] = 244] = "FirstStatement"; + SyntaxKind[SyntaxKind["LastStatement"] = 260] = "LastStatement"; + SyntaxKind[SyntaxKind["FirstNode"] = 167] = "FirstNode"; + SyntaxKind[SyntaxKind["FirstJSDocNode"] = 308] = "FirstJSDocNode"; + SyntaxKind[SyntaxKind["LastJSDocNode"] = 343] = "LastJSDocNode"; + SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 322] = "FirstJSDocTagNode"; + SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 343] = "LastJSDocTagNode"; + SyntaxKind[SyntaxKind["FirstContextualKeyword"] = 127] = "FirstContextualKeyword"; + SyntaxKind[SyntaxKind["LastContextualKeyword"] = 166] = "LastContextualKeyword"; + SyntaxKind[SyntaxKind["LastUnaryOperator"] = 54] = "LastUnaryOperator"; + SyntaxKind[SyntaxKind["FirstTriviaToken"] = 2] = "FirstTriviaToken"; + SyntaxKind[SyntaxKind["LastTriviaToken"] = 6] = "LastTriviaToken"; +})(SyntaxKind || (SyntaxKind = {})); +//# sourceMappingURL=syntaxKind.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/syntaxKind.js.map b/node_modules/typescript/dist/enums/syntaxKind.js.map new file mode 100644 index 0000000..2494251 --- /dev/null +++ b/node_modules/typescript/dist/enums/syntaxKind.js.map @@ -0,0 +1 @@ +{"version":3,"file":"syntaxKind.js","sourceRoot":"","sources":["../../src/enums/syntaxKind.ts"],"names":[],"mappings":"AAAA,oGAAoG;AACpG,MAAM,CAAC,IAAI,UAAe,C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G,CAAC,GAAG,gBAAgB,CAAC;IAClE,UAAU,CAAC,UAAU,CAAC,eAAe,CAAC,GAAG,GAAG,CAAC,GAAG,eAAe,CAAC;IAChE,UAAU,CAAC,UAAU,CAAC,mBAAmB,CAAC,GAAG,GAAG,CAAC,GAAG,mBAAmB,CAAC;IACxE,UAAU,CAAC,UAAU,CAAC,kBAAkB,CAAC,GAAG,GAAG,CAAC,GAAG,kBAAkB,CAAC;IACtE,UAAU,CAAC,UAAU,CAAC,wBAAwB,CAAC,GAAG,GAAG,CAAC,GAAG,wBAAwB,CAAC;IAClF,UAAU,CAAC,UAAU,CAAC,uBAAuB,CAAC,GAAG,GAAG,CAAC,GAAG,uBAAuB,CAAC;IAChF,UAAU,CAAC,UAAU,CAAC,mBAAmB,CAAC,GAAG,EAAE,CAAC,GAAG,mBAAmB,CAAC;IACvE,UAAU,CAAC,UAAU,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,GAAG,kBAAkB,CAAC;IACpE,UAAU,CAAC,UAAU,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,GAAG,iBAAiB,CAAC;AACtE,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/tokenFlags.d.ts b/node_modules/typescript/dist/enums/tokenFlags.d.ts new file mode 100644 index 0000000..30e711b --- /dev/null +++ b/node_modules/typescript/dist/enums/tokenFlags.d.ts @@ -0,0 +1,2 @@ +export declare var TokenFlags: any; +//# sourceMappingURL=tokenFlags.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/tokenFlags.d.ts.map b/node_modules/typescript/dist/enums/tokenFlags.d.ts.map new file mode 100644 index 0000000..ca891ad --- /dev/null +++ b/node_modules/typescript/dist/enums/tokenFlags.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"tokenFlags.d.ts","sourceRoot":"","sources":["../../src/enums/tokenFlags.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,UAAU,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts b/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts new file mode 100644 index 0000000..66c1950 --- /dev/null +++ b/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts @@ -0,0 +1,30 @@ +export declare enum TokenFlags { + None = 0, + PrecedingLineBreak = 1, + PrecedingJSDocComment = 2, + Unterminated = 4, + ExtendedUnicodeEscape = 8, + Scientific = 16, + Octal = 32, + HexSpecifier = 64, + BinarySpecifier = 128, + OctalSpecifier = 256, + ContainsSeparator = 512, + UnicodeEscape = 1024, + ContainsInvalidEscape = 2048, + HexEscape = 4096, + ContainsLeadingZero = 8192, + ContainsInvalidSeparator = 16384, + PrecedingJSDocLeadingAsterisks = 32768, + SingleQuote = 65536, + PrecedingJSDocWithDeprecated = 131072, + PrecedingJSDocWithSeeOrLink = 262144, + BinaryOrOctalSpecifier = 384, + WithSpecifier = 448, + StringLiteralFlags = 72716, + NumericLiteralFlags = 25584, + TemplateLiteralLikeFlags = 7180, + RegularExpressionLiteralFlags = 4, + IsInvalid = 26656 +} +//# sourceMappingURL=tokenFlags.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts.map b/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts.map new file mode 100644 index 0000000..9a4fed2 --- /dev/null +++ b/node_modules/typescript/dist/enums/tokenFlags.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"tokenFlags.enum.d.ts","sourceRoot":"","sources":["../../src/enums/tokenFlags.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,UAAU;IAClB,IAAI,IAAI;IACR,kBAAkB,IAAS;IAC3B,qBAAqB,IAAS;IAC9B,YAAY,IAAS;IACrB,qBAAqB,IAAS;IAC9B,UAAU,KAAS;IACnB,KAAK,KAAS;IACd,YAAY,KAAS;IACrB,eAAe,MAAS;IACxB,cAAc,MAAS;IACvB,iBAAiB,MAAS;IAC1B,aAAa,OAAU;IACvB,qBAAqB,OAAU;IAC/B,SAAS,OAAU;IACnB,mBAAmB,OAAU;IAC7B,wBAAwB,QAAU;IAClC,8BAA8B,QAAU;IACxC,WAAW,QAAU;IACrB,4BAA4B,SAAU;IACtC,2BAA2B,SAAU;IACrC,sBAAsB,MAAmC;IACzD,aAAa,MAAwC;IACrD,kBAAkB,QAAyG;IAC3H,mBAAmB,QAA0G;IAC7H,wBAAwB,OAA2F;IACnH,6BAA6B,IAAe;IAC5C,SAAS,QAAiF;CAC7F"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/tokenFlags.enum.js b/node_modules/typescript/dist/enums/tokenFlags.enum.js new file mode 100644 index 0000000..21874cf --- /dev/null +++ b/node_modules/typescript/dist/enums/tokenFlags.enum.js @@ -0,0 +1,32 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/ast/tokenflags.go. DO NOT EDIT. +export var TokenFlags; +(function (TokenFlags) { + TokenFlags[TokenFlags["None"] = 0] = "None"; + TokenFlags[TokenFlags["PrecedingLineBreak"] = 1] = "PrecedingLineBreak"; + TokenFlags[TokenFlags["PrecedingJSDocComment"] = 2] = "PrecedingJSDocComment"; + TokenFlags[TokenFlags["Unterminated"] = 4] = "Unterminated"; + TokenFlags[TokenFlags["ExtendedUnicodeEscape"] = 8] = "ExtendedUnicodeEscape"; + TokenFlags[TokenFlags["Scientific"] = 16] = "Scientific"; + TokenFlags[TokenFlags["Octal"] = 32] = "Octal"; + TokenFlags[TokenFlags["HexSpecifier"] = 64] = "HexSpecifier"; + TokenFlags[TokenFlags["BinarySpecifier"] = 128] = "BinarySpecifier"; + TokenFlags[TokenFlags["OctalSpecifier"] = 256] = "OctalSpecifier"; + TokenFlags[TokenFlags["ContainsSeparator"] = 512] = "ContainsSeparator"; + TokenFlags[TokenFlags["UnicodeEscape"] = 1024] = "UnicodeEscape"; + TokenFlags[TokenFlags["ContainsInvalidEscape"] = 2048] = "ContainsInvalidEscape"; + TokenFlags[TokenFlags["HexEscape"] = 4096] = "HexEscape"; + TokenFlags[TokenFlags["ContainsLeadingZero"] = 8192] = "ContainsLeadingZero"; + TokenFlags[TokenFlags["ContainsInvalidSeparator"] = 16384] = "ContainsInvalidSeparator"; + TokenFlags[TokenFlags["PrecedingJSDocLeadingAsterisks"] = 32768] = "PrecedingJSDocLeadingAsterisks"; + TokenFlags[TokenFlags["SingleQuote"] = 65536] = "SingleQuote"; + TokenFlags[TokenFlags["PrecedingJSDocWithDeprecated"] = 131072] = "PrecedingJSDocWithDeprecated"; + TokenFlags[TokenFlags["PrecedingJSDocWithSeeOrLink"] = 262144] = "PrecedingJSDocWithSeeOrLink"; + TokenFlags[TokenFlags["BinaryOrOctalSpecifier"] = 384] = "BinaryOrOctalSpecifier"; + TokenFlags[TokenFlags["WithSpecifier"] = 448] = "WithSpecifier"; + TokenFlags[TokenFlags["StringLiteralFlags"] = 72716] = "StringLiteralFlags"; + TokenFlags[TokenFlags["NumericLiteralFlags"] = 25584] = "NumericLiteralFlags"; + TokenFlags[TokenFlags["TemplateLiteralLikeFlags"] = 7180] = "TemplateLiteralLikeFlags"; + TokenFlags[TokenFlags["RegularExpressionLiteralFlags"] = 4] = "RegularExpressionLiteralFlags"; + TokenFlags[TokenFlags["IsInvalid"] = 26656] = "IsInvalid"; +})(TokenFlags || (TokenFlags = {})); +//# sourceMappingURL=tokenFlags.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/tokenFlags.enum.js.map b/node_modules/typescript/dist/enums/tokenFlags.enum.js.map new file mode 100644 index 0000000..782e208 --- /dev/null +++ b/node_modules/typescript/dist/enums/tokenFlags.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tokenFlags.enum.js","sourceRoot":"","sources":["../../src/enums/tokenFlags.enum.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAEhG,MAAM,CAAN,IAAY,UA4BX;AA5BD,WAAY,UAAU;IAClB,2CAAQ,CAAA;IACR,uEAA2B,CAAA;IAC3B,6EAA8B,CAAA;IAC9B,2DAAqB,CAAA;IACrB,6EAA8B,CAAA;IAC9B,wDAAmB,CAAA;IACnB,8CAAc,CAAA;IACd,4DAAqB,CAAA;IACrB,mEAAwB,CAAA;IACxB,iEAAuB,CAAA;IACvB,uEAA0B,CAAA;IAC1B,gEAAuB,CAAA;IACvB,gFAA+B,CAAA;IAC/B,wDAAmB,CAAA;IACnB,4EAA6B,CAAA;IAC7B,uFAAkC,CAAA;IAClC,mGAAwC,CAAA;IACxC,6DAAqB,CAAA;IACrB,gGAAsC,CAAA;IACtC,8FAAqC,CAAA;IACrC,iFAAyD,CAAA;IACzD,+DAAqD,CAAA;IACrD,2EAA2H,CAAA;IAC3H,6EAA6H,CAAA;IAC7H,sFAAmH,CAAA;IACnH,6FAA4C,CAAA;IAC5C,yDAA0F,CAAA;AAC9F,CAAC,EA5BW,UAAU,KAAV,UAAU,QA4BrB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/tokenFlags.js b/node_modules/typescript/dist/enums/tokenFlags.js new file mode 100644 index 0000000..1cbe9ff --- /dev/null +++ b/node_modules/typescript/dist/enums/tokenFlags.js @@ -0,0 +1,32 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/ast/tokenflags.go. DO NOT EDIT. +export var TokenFlags; +(function (TokenFlags) { + TokenFlags[TokenFlags["None"] = 0] = "None"; + TokenFlags[TokenFlags["PrecedingLineBreak"] = 1] = "PrecedingLineBreak"; + TokenFlags[TokenFlags["PrecedingJSDocComment"] = 2] = "PrecedingJSDocComment"; + TokenFlags[TokenFlags["Unterminated"] = 4] = "Unterminated"; + TokenFlags[TokenFlags["ExtendedUnicodeEscape"] = 8] = "ExtendedUnicodeEscape"; + TokenFlags[TokenFlags["Scientific"] = 16] = "Scientific"; + TokenFlags[TokenFlags["Octal"] = 32] = "Octal"; + TokenFlags[TokenFlags["HexSpecifier"] = 64] = "HexSpecifier"; + TokenFlags[TokenFlags["BinarySpecifier"] = 128] = "BinarySpecifier"; + TokenFlags[TokenFlags["OctalSpecifier"] = 256] = "OctalSpecifier"; + TokenFlags[TokenFlags["ContainsSeparator"] = 512] = "ContainsSeparator"; + TokenFlags[TokenFlags["UnicodeEscape"] = 1024] = "UnicodeEscape"; + TokenFlags[TokenFlags["ContainsInvalidEscape"] = 2048] = "ContainsInvalidEscape"; + TokenFlags[TokenFlags["HexEscape"] = 4096] = "HexEscape"; + TokenFlags[TokenFlags["ContainsLeadingZero"] = 8192] = "ContainsLeadingZero"; + TokenFlags[TokenFlags["ContainsInvalidSeparator"] = 16384] = "ContainsInvalidSeparator"; + TokenFlags[TokenFlags["PrecedingJSDocLeadingAsterisks"] = 32768] = "PrecedingJSDocLeadingAsterisks"; + TokenFlags[TokenFlags["SingleQuote"] = 65536] = "SingleQuote"; + TokenFlags[TokenFlags["PrecedingJSDocWithDeprecated"] = 131072] = "PrecedingJSDocWithDeprecated"; + TokenFlags[TokenFlags["PrecedingJSDocWithSeeOrLink"] = 262144] = "PrecedingJSDocWithSeeOrLink"; + TokenFlags[TokenFlags["BinaryOrOctalSpecifier"] = 384] = "BinaryOrOctalSpecifier"; + TokenFlags[TokenFlags["WithSpecifier"] = 448] = "WithSpecifier"; + TokenFlags[TokenFlags["StringLiteralFlags"] = 72716] = "StringLiteralFlags"; + TokenFlags[TokenFlags["NumericLiteralFlags"] = 25584] = "NumericLiteralFlags"; + TokenFlags[TokenFlags["TemplateLiteralLikeFlags"] = 7180] = "TemplateLiteralLikeFlags"; + TokenFlags[TokenFlags["RegularExpressionLiteralFlags"] = 4] = "RegularExpressionLiteralFlags"; + TokenFlags[TokenFlags["IsInvalid"] = 26656] = "IsInvalid"; +})(TokenFlags || (TokenFlags = {})); +//# sourceMappingURL=tokenFlags.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/tokenFlags.js.map b/node_modules/typescript/dist/enums/tokenFlags.js.map new file mode 100644 index 0000000..7647565 --- /dev/null +++ b/node_modules/typescript/d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C,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typeFlags.d.ts b/node_modules/typescript/dist/enums/typeFlags.d.ts new file mode 100644 index 0000000..c1d6075 --- /dev/null +++ b/node_modules/typescript/dist/enums/typeFlags.d.ts @@ -0,0 +1,2 @@ +export declare var TypeFlags: any; +//# sourceMappingURL=typeFlags.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typeFlags.d.ts.map b/node_modules/typescript/dist/enums/typeFlags.d.ts.map new file mode 100644 index 0000000..670f31d --- /dev/null +++ b/node_modules/typescript/dist/enums/typeFlags.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"typeFlags.d.ts","sourceRoot":"","sources":["../../src/enums/typeFlags.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,SAAS,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typeFlags.enum.d.ts b/node_modules/typescript/dist/enums/typeFlags.enum.d.ts new file mode 100644 index 0000000..79cbd06 --- /dev/null +++ b/node_modules/typescript/dist/enums/typeFlags.enum.d.ts @@ -0,0 +1,76 @@ +export declare enum TypeFlags { + None = 0, + Any = 1, + Unknown = 2, + Undefined = 4, + Null = 8, + Void = 16, + String = 32, + Number = 64, + BigInt = 128, + Boolean = 256, + ESSymbol = 512, + StringLiteral = 1024, + NumberLiteral = 2048, + BigIntLiteral = 4096, + BooleanLiteral = 8192, + UniqueESSymbol = 16384, + EnumLiteral = 32768, + Enum = 65536, + NonPrimitive = 131072, + Never = 262144, + TypeParameter = 524288, + Object = 1048576, + Index = 2097152, + TemplateLiteral = 4194304, + StringMapping = 8388608, + Substitution = 16777216, + IndexedAccess = 33554432, + Conditional = 67108864, + Union = 134217728, + Intersection = 268435456, + Reserved1 = 536870912, + Reserved2 = 1073741824, + Reserved3 = -2147483648, + AnyOrUnknown = 3, + Nullable = 12, + Literal = 15360, + Unit = 97292, + Freshable = 80896, + StringOrNumberLiteral = 3072, + StringOrNumberLiteralOrUnique = 19456, + DefinitelyFalsy = 15388, + PossiblyFalsy = 15868, + Intrinsic = 393983, + StringLike = 12583968, + NumberLike = 67648, + BigIntLike = 4224, + BooleanLike = 8448, + EnumLike = 98304, + ESSymbolLike = 16896, + VoidLike = 20, + Primitive = 12713980, + DefinitelyNonNullable = 13893600, + DisjointDomains = 12812284, + UnionOrIntersection = 402653184, + StructuredType = 403701760, + TypeVariable = 34078720, + InstantiableNonPrimitive = 117964800, + InstantiablePrimitive = 14680064, + Instantiable = 132644864, + StructuredOrInstantiable = 536346624, + ObjectFlagsType = 403963917, + Simplifiable = 102760448, + Singleton = 394239, + Narrowable = 536575971, + IncludesMask = 416808959, + IncludesMissingType = 524288, + IncludesNonWideningType = 2097152, + IncludesWildcard = 33554432, + IncludesEmptyObject = 67108864, + IncludesInstantiable = 16777216, + IncludesConstrainedTypeVariable = 536870912, + IncludesError = 1073741824, + NotPrimitiveUnion = 286523411 +} +//# sourceMappingURL=typeFlags.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typeFlags.enum.d.ts.map b/node_modules/typescript/dist/enums/typeFlags.enum.d.ts.map new file mode 100644 index 0000000..7f4aae6 --- /dev/null +++ b/node_modules/typescript/dist/enums/typeFlags.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"typeFlags.enum.d.ts","sourceRoot":"","sources":["../../src/enums/typeFlags.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,SAAS;IACjB,IAAI,IAAI;IACR,GAAG,IAAS;IACZ,OAAO,IAAS;IAChB,SAAS,IAAS;IAClB,IAAI,IAAS;IACb,IAAI,KAAS;IACb,MAAM,KAAS;IACf,MAAM,KAAS;IACf,MAAM,MAAS;IACf,OAAO,MAAS;IAChB,QAAQ,MAAS;IACjB,aAAa,OAAU;IACvB,aAAa,OAAU;IACvB,aAAa,OAAU;IACvB,cAAc,OAAU;IACxB,cAAc,QAAU;IACxB,WAAW,QAAU;IACrB,IAAI,QAAU;IACd,YAAY,SAAU;IACtB,KAAK,SAAU;IACf,aAAa,SAAU;IACvB,MAAM,UAAU;IAChB,KAAK,UAAU;IACf,eAAe,UAAU;IACzB,aAAa,UAAU;IACvB,YAAY,WAAU;IACtB,aAAa,WAAU;IACvB,WAAW,WAAU;IACrB,KAAK,YAAU;IACf,YAAY,YAAU;IACtB,SAAS,YAAU;IACnB,SAAS,aAAU;IACnB,SAAS,cAAU;IACnB,YAAY,IAAgB;IAC5B,QAAQ,KAAmB;IAC3B,OAAO,QAAiE;IACxE,IAAI,QAA6C;IACjD,SAAS,QAAiB;IAC1B,qBAAqB,OAAgC;IACrD,6BAA6B,QAAiD;IAC9E,eAAe,QAA2F;IAC1G,aAAa,QAAuD;IACpE,SAAS,SAAuG;IAChH,UAAU,WAA2D;IACrE,UAAU,QAAgC;IAC1C,UAAU,OAAyB;IACnC,WAAW,OAA2B;IACtC,QAAQ,QAAqB;IAC7B,YAAY,QAA4B;IACxC,QAAQ,KAAmB;IAC3B,SAAS,WAAiG;IAC1G,qBAAqB,WAAuG;IAC5H,eAAe,WAAqG;IACpH,mBAAmB,YAAuB;IAC1C,cAAc,YAAgC;IAC9C,YAAY,WAAgC;IAC5C,wBAAwB,YAA4C;IACpE,qBAAqB,WAA0C;IAC/D,YAAY,YAAmD;IAC/D,wBAAwB,YAAgC;IACxD,eAAe,YAAyD;IACxE,YAAY,YAAsC;IAClD,SAAS,SAAiH;IAC1H,UAAU,YAA2I;IACrJ,YAAY,YAAqH;IACjI,mBAAmB,SAAgB;IACnC,uBAAuB,UAAQ;IAC/B,gBAAgB,WAAgB;IAChC,mBAAmB,WAAc;IACjC,oBAAoB,WAAe;IACnC,+BAA+B,YAAY;IAC3C,aAAa,aAAY;IACzB,iBAAiB,YAA8E;CAClG"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typeFlags.enum.js b/node_modules/typescript/dist/enums/typeFlags.enum.js new file mode 100644 index 0000000..d6de1e0 --- /dev/null +++ b/node_modules/typescript/dist/enums/typeFlags.enum.js @@ -0,0 +1,78 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT. +export var TypeFlags; +(function (TypeFlags) { + TypeFlags[TypeFlags["None"] = 0] = "None"; + TypeFlags[TypeFlags["Any"] = 1] = "Any"; + TypeFlags[TypeFlags["Unknown"] = 2] = "Unknown"; + TypeFlags[TypeFlags["Undefined"] = 4] = "Undefined"; + TypeFlags[TypeFlags["Null"] = 8] = "Null"; + TypeFlags[TypeFlags["Void"] = 16] = "Void"; + TypeFlags[TypeFlags["String"] = 32] = "String"; + TypeFlags[TypeFlags["Number"] = 64] = "Number"; + TypeFlags[TypeFlags["BigInt"] = 128] = "BigInt"; + TypeFlags[TypeFlags["Boolean"] = 256] = "Boolean"; + TypeFlags[TypeFlags["ESSymbol"] = 512] = "ESSymbol"; + TypeFlags[TypeFlags["StringLiteral"] = 1024] = "StringLiteral"; + TypeFlags[TypeFlags["NumberLiteral"] = 2048] = "NumberLiteral"; + TypeFlags[TypeFlags["BigIntLiteral"] = 4096] = "BigIntLiteral"; + TypeFlags[TypeFlags["BooleanLiteral"] = 8192] = "BooleanLiteral"; + TypeFlags[TypeFlags["UniqueESSymbol"] = 16384] = "UniqueESSymbol"; + TypeFlags[TypeFlags["EnumLiteral"] = 32768] = "EnumLiteral"; + TypeFlags[TypeFlags["Enum"] = 65536] = "Enum"; + TypeFlags[TypeFlags["NonPrimitive"] = 131072] = "NonPrimitive"; + TypeFlags[TypeFlags["Never"] = 262144] = "Never"; + TypeFlags[TypeFlags["TypeParameter"] = 524288] = "TypeParameter"; + TypeFlags[TypeFlags["Object"] = 1048576] = "Object"; + TypeFlags[TypeFlags["Index"] = 2097152] = "Index"; + TypeFlags[TypeFlags["TemplateLiteral"] = 4194304] = "TemplateLiteral"; + TypeFlags[TypeFlags["StringMapping"] = 8388608] = "StringMapping"; + TypeFlags[TypeFlags["Substitution"] = 16777216] = "Substitution"; + TypeFlags[TypeFlags["IndexedAccess"] = 33554432] = "IndexedAccess"; + TypeFlags[TypeFlags["Conditional"] = 67108864] = "Conditional"; + TypeFlags[TypeFlags["Union"] = 134217728] = "Union"; + TypeFlags[TypeFlags["Intersection"] = 268435456] = "Intersection"; + TypeFlags[TypeFlags["Reserved1"] = 536870912] = "Reserved1"; + TypeFlags[TypeFlags["Reserved2"] = 1073741824] = "Reserved2"; + TypeFlags[TypeFlags["Reserved3"] = -2147483648] = "Reserved3"; + TypeFlags[TypeFlags["AnyOrUnknown"] = 3] = "AnyOrUnknown"; + TypeFlags[TypeFlags["Nullable"] = 12] = "Nullable"; + TypeFlags[TypeFlags["Literal"] = 15360] = "Literal"; + TypeFlags[TypeFlags["Unit"] = 97292] = "Unit"; + TypeFlags[TypeFlags["Freshable"] = 80896] = "Freshable"; + TypeFlags[TypeFlags["StringOrNumberLiteral"] = 3072] = "StringOrNumberLiteral"; + TypeFlags[TypeFlags["StringOrNumberLiteralOrUnique"] = 19456] = "StringOrNumberLiteralOrUnique"; + TypeFlags[TypeFlags["DefinitelyFalsy"] = 15388] = "DefinitelyFalsy"; + TypeFlags[TypeFlags["PossiblyFalsy"] = 15868] = "PossiblyFalsy"; + TypeFlags[TypeFlags["Intrinsic"] = 393983] = "Intrinsic"; + TypeFlags[TypeFlags["StringLike"] = 12583968] = "StringLike"; + TypeFlags[TypeFlags["NumberLike"] = 67648] = "NumberLike"; + TypeFlags[TypeFlags["BigIntLike"] = 4224] = "BigIntLike"; + TypeFlags[TypeFlags["BooleanLike"] = 8448] = "BooleanLike"; + TypeFlags[TypeFlags["EnumLike"] = 98304] = "EnumLike"; + TypeFlags[TypeFlags["ESSymbolLike"] = 16896] = "ESSymbolLike"; + TypeFlags[TypeFlags["VoidLike"] = 20] = "VoidLike"; + TypeFlags[TypeFlags["Primitive"] = 12713980] = "Primitive"; + TypeFlags[TypeFlags["DefinitelyNonNullable"] = 13893600] = "DefinitelyNonNullable"; + TypeFlags[TypeFlags["DisjointDomains"] = 12812284] = "DisjointDomains"; + TypeFlags[TypeFlags["UnionOrIntersection"] = 402653184] = "UnionOrIntersection"; + TypeFlags[TypeFlags["StructuredType"] = 403701760] = "StructuredType"; + TypeFlags[TypeFlags["TypeVariable"] = 34078720] = "TypeVariable"; + TypeFlags[TypeFlags["InstantiableNonPrimitive"] = 117964800] = "InstantiableNonPrimitive"; + TypeFlags[TypeFlags["InstantiablePrimitive"] = 14680064] = "InstantiablePrimitive"; + TypeFlags[TypeFlags["Instantiable"] = 132644864] = "Instantiable"; + TypeFlags[TypeFlags["StructuredOrInstantiable"] = 536346624] = "StructuredOrInstantiable"; + TypeFlags[TypeFlags["ObjectFlagsType"] = 403963917] = "ObjectFlagsType"; + TypeFlags[TypeFlags["Simplifiable"] = 102760448] = "Simplifiable"; + TypeFlags[TypeFlags["Singleton"] = 394239] = "Singleton"; + TypeFlags[TypeFlags["Narrowable"] = 536575971] = "Narrowable"; + TypeFlags[TypeFlags["IncludesMask"] = 416808959] = "IncludesMask"; + TypeFlags[TypeFlags["IncludesMissingType"] = 524288] = "IncludesMissingType"; + TypeFlags[TypeFlags["IncludesNonWideningType"] = 2097152] = "IncludesNonWideningType"; + TypeFlags[TypeFlags["IncludesWildcard"] = 33554432] = "IncludesWildcard"; + TypeFlags[TypeFlags["IncludesEmptyObject"] = 67108864] = "IncludesEmptyObject"; + TypeFlags[TypeFlags["IncludesInstantiable"] = 16777216] = "IncludesInstantiable"; + TypeFlags[TypeFlags["IncludesConstrainedTypeVariable"] = 536870912] = "IncludesConstrainedTypeVariable"; + TypeFlags[TypeFlags["IncludesError"] = 1073741824] = "IncludesError"; + TypeFlags[TypeFlags["NotPrimitiveUnion"] = 286523411] = "NotPrimitiveUnion"; +})(TypeFlags || (TypeFlags = {})); +//# sourceMappingURL=typeFlags.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typeFlags.enum.js.map b/node_modules/typescript/dist/enums/typeFlags.enum.js.map new file mode 100644 index 0000000..3fbec3a --- /dev/null +++ b/node_modules/typescript/dist/enums/typeFlags.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"typeFlags.enum.js","sourceRoot":"","sources":["../../src/enums/typeFlags.enum.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAE/F,MAAM,CAAN,IAAY,SA0EX;AA1ED,WAAY,SAAS;IACjB,yCAAQ,CAAA;IACR,uCAAY,CAAA;IACZ,+CAAgB,CAAA;IAChB,mDAAkB,CAAA;IAClB,yCAAa,CAAA;IACb,0CAAa,CAAA;IACb,8CAAe,CAAA;IACf,8CAAe,CAAA;IACf,+CAAe,CAAA;IACf,iDAAgB,CAAA;IAChB,mDAAiB,CAAA;IACjB,8DAAuB,CAAA;IACvB,8DAAuB,CAAA;IACvB,8DAAuB,CAAA;IACvB,gEAAwB,CAAA;IACxB,iEAAwB,CAAA;IACxB,2DAAqB,CAAA;IACrB,6CAAc,CAAA;IACd,8DAAsB,CAAA;IACtB,gDAAe,CAAA;IACf,gEAAuB,CAAA;IACvB,mDAAgB,CAAA;IAChB,iDAAe,CAAA;IACf,qEAAyB,CAAA;IACzB,iEAAuB,CAAA;IACvB,gEAAsB,CAAA;IACtB,kEAAuB,CAAA;IACvB,8DAAqB,CAAA;IACrB,mDAAe,CAAA;IACf,iEAAsB,CAAA;IACtB,2DAAmB,CAAA;IACnB,4DAAmB,CAAA;IACnB,6DAAmB,CAAA;IACnB,yDAA4B,CAAA;IAC5B,kDAA2B,CAAA;IAC3B,mDAAwE,CAAA;IACxE,6CAAiD,CAAA;IACjD,uDAA0B,CAAA;IAC1B,8EAAqD,CAAA;IACrD,+FAA8E,CAAA;IAC9E,mEAA0G,CAAA;IAC1G,+DAAoE,CAAA;IACpE,wDAAgH,CAAA;IAChH,4DAAqE,CAAA;IACrE,yDAA0C,CAAA;IAC1C,wDAAmC,CAAA;IACnC,0DAAsC,CAAA;IACtC,qDAA6B,CAAA;IAC7B,6DAAwC,CAAA;IACxC,kDAA2B,CAAA;IAC3B,0DAA0G,CAAA;IAC1G,kFAA4H,CAAA;IAC5H,sEAAoH,CAAA;IACpH,+EAA0C,CAAA;IAC1C,qEAA8C,CAAA;IAC9C,gEAA4C,CAAA;IAC5C,yFAAoE,CAAA;IACpE,kFAA+D,CAAA;IAC/D,iEAA+D,CAAA;IAC/D,yFAAwD,CAAA;IACxD,uEAAwE,CAAA;IACxE,iEAAkD,CAAA;IAClD,wDAA0H,CAAA;IAC1H,6DAAqJ,CAAA;IACrJ,iEAAiI,CAAA;IACjI,4EAAmC,CAAA;IACnC,qFAA+B,CAAA;IAC/B,wEAAgC,CAAA;IAChC,8EAAiC,CAAA;IACjC,gFAAmC,CAAA;IACnC,uGAA2C,CAAA;IAC3C,oEAAyB,CAAA;IACzB,2EAA+F,CAAA;AACnG,CAAC,EA1EW,SAAS,KAAT,SAAS,QA0EpB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typeFlags.js b/node_modules/typescript/dist/enums/typeFlags.js new file mode 100644 index 0000000..c032a1a --- /dev/null +++ b/node_modules/typescript/dist/enums/typeFlags.js @@ -0,0 +1,78 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT. +export var TypeFlags; +(function (TypeFlags) { + TypeFlags[TypeFlags["None"] = 0] = "None"; + TypeFlags[TypeFlags["Any"] = 1] = "Any"; + TypeFlags[TypeFlags["Unknown"] = 2] = "Unknown"; + TypeFlags[TypeFlags["Undefined"] = 4] = "Undefined"; + TypeFlags[TypeFlags["Null"] = 8] = "Null"; + TypeFlags[TypeFlags["Void"] = 16] = "Void"; + TypeFlags[TypeFlags["String"] = 32] = "String"; + TypeFlags[TypeFlags["Number"] = 64] = "Number"; + TypeFlags[TypeFlags["BigInt"] = 128] = "BigInt"; + TypeFlags[TypeFlags["Boolean"] = 256] = "Boolean"; + TypeFlags[TypeFlags["ESSymbol"] = 512] = "ESSymbol"; + TypeFlags[TypeFlags["StringLiteral"] = 1024] = "StringLiteral"; + TypeFlags[TypeFlags["NumberLiteral"] = 2048] = "NumberLiteral"; + TypeFlags[TypeFlags["BigIntLiteral"] = 4096] = "BigIntLiteral"; + TypeFlags[TypeFlags["BooleanLiteral"] = 8192] = "BooleanLiteral"; + TypeFlags[TypeFlags["UniqueESSymbol"] = 16384] = "UniqueESSymbol"; + TypeFlags[TypeFlags["EnumLiteral"] = 32768] = "EnumLiteral"; + TypeFlags[TypeFlags["Enum"] = 65536] = "Enum"; + TypeFlags[TypeFlags["NonPrimitive"] = 131072] = "NonPrimitive"; + TypeFlags[TypeFlags["Never"] = 262144] = "Never"; + TypeFlags[TypeFlags["TypeParameter"] = 524288] = "TypeParameter"; + TypeFlags[TypeFlags["Object"] = 1048576] = "Object"; + TypeFlags[TypeFlags["Index"] = 2097152] = "Index"; + TypeFlags[TypeFlags["TemplateLiteral"] = 4194304] = "TemplateLiteral"; + TypeFlags[TypeFlags["StringMapping"] = 8388608] = "StringMapping"; + TypeFlags[TypeFlags["Substitution"] = 16777216] = "Substitution"; + TypeFlags[TypeFlags["IndexedAccess"] = 33554432] = "IndexedAccess"; + TypeFlags[TypeFlags["Conditional"] = 67108864] = "Conditional"; + TypeFlags[TypeFlags["Union"] = 134217728] = "Union"; + TypeFlags[TypeFlags["Intersection"] = 268435456] = "Intersection"; + TypeFlags[TypeFlags["Reserved1"] = 536870912] = "Reserved1"; + TypeFlags[TypeFlags["Reserved2"] = 1073741824] = "Reserved2"; + TypeFlags[TypeFlags["Reserved3"] = -2147483648] = "Reserved3"; + TypeFlags[TypeFlags["AnyOrUnknown"] = 3] = "AnyOrUnknown"; + TypeFlags[TypeFlags["Nullable"] = 12] = "Nullable"; + TypeFlags[TypeFlags["Literal"] = 15360] = "Literal"; + TypeFlags[TypeFlags["Unit"] = 97292] = "Unit"; + TypeFlags[TypeFlags["Freshable"] = 80896] = "Freshable"; + TypeFlags[TypeFlags["StringOrNumberLiteral"] = 3072] = "StringOrNumberLiteral"; + TypeFlags[TypeFlags["StringOrNumberLiteralOrUnique"] = 19456] = "StringOrNumberLiteralOrUnique"; + TypeFlags[TypeFlags["DefinitelyFalsy"] = 15388] = "DefinitelyFalsy"; + TypeFlags[TypeFlags["PossiblyFalsy"] = 15868] = "PossiblyFalsy"; + TypeFlags[TypeFlags["Intrinsic"] = 393983] = "Intrinsic"; + TypeFlags[TypeFlags["StringLike"] = 12583968] = "StringLike"; + TypeFlags[TypeFlags["NumberLike"] = 67648] = "NumberLike"; + TypeFlags[TypeFlags["BigIntLike"] = 4224] = "BigIntLike"; + TypeFlags[TypeFlags["BooleanLike"] = 8448] = "BooleanLike"; + TypeFlags[TypeFlags["EnumLike"] = 98304] = "EnumLike"; + TypeFlags[TypeFlags["ESSymbolLike"] = 16896] = "ESSymbolLike"; + TypeFlags[TypeFlags["VoidLike"] = 20] = "VoidLike"; + TypeFlags[TypeFlags["Primitive"] = 12713980] = "Primitive"; + TypeFlags[TypeFlags["DefinitelyNonNullable"] = 13893600] = "DefinitelyNonNullable"; + TypeFlags[TypeFlags["DisjointDomains"] = 12812284] = "DisjointDomains"; + TypeFlags[TypeFlags["UnionOrIntersection"] = 402653184] = "UnionOrIntersection"; + TypeFlags[TypeFlags["StructuredType"] = 403701760] = "StructuredType"; + TypeFlags[TypeFlags["TypeVariable"] = 34078720] = "TypeVariable"; + TypeFlags[TypeFlags["InstantiableNonPrimitive"] = 117964800] = "InstantiableNonPrimitive"; + TypeFlags[TypeFlags["InstantiablePrimitive"] = 14680064] = "InstantiablePrimitive"; + TypeFlags[TypeFlags["Instantiable"] = 132644864] = "Instantiable"; + TypeFlags[TypeFlags["StructuredOrInstantiable"] = 536346624] = "StructuredOrInstantiable"; + TypeFlags[TypeFlags["ObjectFlagsType"] = 403963917] = "ObjectFlagsType"; + TypeFlags[TypeFlags["Simplifiable"] = 102760448] = "Simplifiable"; + TypeFlags[TypeFlags["Singleton"] = 394239] = "Singleton"; + TypeFlags[TypeFlags["Narrowable"] = 536575971] = "Narrowable"; + TypeFlags[TypeFlags["IncludesMask"] = 416808959] = "IncludesMask"; + TypeFlags[TypeFlags["IncludesMissingType"] = 524288] = "IncludesMissingType"; + TypeFlags[TypeFlags["IncludesNonWideningType"] = 2097152] = "IncludesNonWideningType"; + TypeFlags[TypeFlags["IncludesWildcard"] = 33554432] = "IncludesWildcard"; + TypeFlags[TypeFlags["IncludesEmptyObject"] = 67108864] = "IncludesEmptyObject"; + TypeFlags[TypeFlags["IncludesInstantiable"] = 16777216] = "IncludesInstantiable"; + TypeFlags[TypeFlags["IncludesConstrainedTypeVariable"] = 536870912] = "IncludesConstrainedTypeVariable"; + TypeFlags[TypeFlags["IncludesError"] = 1073741824] = "IncludesError"; + TypeFlags[TypeFlags["NotPrimitiveUnion"] = 286523411] = "NotPrimitiveUnion"; +})(TypeFlags || (TypeFlags = {})); +//# sourceMappingURL=typeFlags.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typeFlags.js.map b/node_modules/typescript/dist/enums/typeFlags.js.map new file mode 100644 index 0000000..b88dd45 --- /dev/null +++ b/node_modules/typescript/dist/enums/typeFlags.js.map @@ -0,0 +1 @@ +{"version":3,"file":"typeFlags.js","sourceRoot":"","sources":["../../src/enums/typeFlags.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,MAAM,CAAC,IAAI,SAAc,CAAC;AAC1B,CAAC,UAAU,SAAS;IAChB,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC1C,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;IACxC,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;IAChD,SAAS,CAAC,SAAS,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,WAAW,CAAC;IACpD,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC1C,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,GAAG,MAAM,CAAC;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CAAC,kBAAkB,CAAC,GAAG,QAAQ,CAAC,GAAG,kBAAkB,CAAC;IACzE,SAAS,CAAC,SAAS,CAAC,qBAAqB,CAAC,GAAG,QAAQ,CAAC,GAAG,qBAAqB,CAAC;IAC/E,SAAS,CAAC,SAAS,CAAC,sBAAsB,CAAC,GAAG,QAAQ,CAAC,GAAG,sBAAsB,CAAC;IACjF,SAAS,CAAC,SAAS,CAAC,iCAAiC,CAAC,GAAG,SAAS,CAAC,GAAG,iCAAiC,CAAC;IACxG,SAAS,CAAC,SAAS,CAAC,eAAe,CAAC,GAAG,UAAU,CAAC,GAAG,eAAe,CAAC;IACrE,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAAC,GAAG,SAAS,CAAC,GAAG,mBAAmB,CAAC;AAChF,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typePredicateKind.d.ts b/node_modules/typescript/dist/enums/typePredicateKind.d.ts new file mode 100644 index 0000000..89e80ae --- /dev/null +++ b/node_modules/typescript/dist/enums/typePredicateKind.d.ts @@ -0,0 +1,2 @@ +export declare var TypePredicateKind: any; +//# sourceMappingURL=typePredicateKind.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typePredicateKind.d.ts.map b/node_modules/typescript/dist/enums/typePredicateKind.d.ts.map new file mode 100644 index 0000000..b1be557 --- /dev/null +++ b/node_modules/typescript/dist/enums/typePredicateKind.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"typePredicateKind.d.ts","sourceRoot":"","sources":["../../src/enums/typePredicateKind.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,iBAAiB,EAAE,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts b/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts new file mode 100644 index 0000000..8948d4a --- /dev/null +++ b/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts @@ -0,0 +1,7 @@ +export declare enum TypePredicateKind { + This = 0, + Identifier = 1, + AssertsThis = 2, + AssertsIdentifier = 3 +} +//# sourceMappingURL=typePredicateKind.enum.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts.map b/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts.map new file mode 100644 index 0000000..201098d --- /dev/null +++ b/node_modules/typescript/dist/enums/typePredicateKind.enum.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"typePredicateKind.enum.d.ts","sourceRoot":"","sources":["../../src/enums/typePredicateKind.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,iBAAiB;IACzB,IAAI,IAAI;IACR,UAAU,IAAI;IACd,WAAW,IAAI;IACf,iBAAiB,IAAI;CACxB"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typePredicateKind.enum.js b/node_modules/typescript/dist/enums/typePredicateKind.enum.js new file mode 100644 index 0000000..3043831 --- /dev/null +++ b/node_modules/typescript/dist/enums/typePredicateKind.enum.js @@ -0,0 +1,9 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT. +export var TypePredicateKind; +(function (TypePredicateKind) { + TypePredicateKind[TypePredicateKind["This"] = 0] = "This"; + TypePredicateKind[TypePredicateKind["Identifier"] = 1] = "Identifier"; + TypePredicateKind[TypePredicateKind["AssertsThis"] = 2] = "AssertsThis"; + TypePredicateKind[TypePredicateKind["AssertsIdentifier"] = 3] = "AssertsIdentifier"; +})(TypePredicateKind || (TypePredicateKind = {})); +//# sourceMappingURL=typePredicateKind.enum.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typePredicateKind.enum.js.map b/node_modules/typescript/dist/enums/typePredicateKind.enum.js.map new file mode 100644 index 0000000..55f4b23 --- /dev/null +++ b/node_modules/typescript/dist/enums/typePredicateKind.enum.js.map @@ -0,0 +1 @@ +{"version":3,"file":"typePredicateKind.enum.js","sourceRoot":"","sources":["../../src/enums/typePredicateKind.enum.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAE/F,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IACzB,yDAAQ,CAAA;IACR,qEAAc,CAAA;IACd,uEAAe,CAAA;IACf,mFAAqB,CAAA;AACzB,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B"} \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typePredicateKind.js b/node_modules/typescript/dist/enums/typePredicateKind.js new file mode 100644 index 0000000..c4012c7 --- /dev/null +++ b/node_modules/typescript/dist/enums/typePredicateKind.js @@ -0,0 +1,9 @@ +// Code generated by Herebyfile.mjs generate:enums from internal/checker/types.go. DO NOT EDIT. +export var TypePredicateKind; +(function (TypePredicateKind) { + TypePredicateKind[TypePredicateKind["This"] = 0] = "This"; + TypePredicateKind[TypePredicateKind["Identifier"] = 1] = "Identifier"; + TypePredicateKind[TypePredicateKind["AssertsThis"] = 2] = "AssertsThis"; + TypePredicateKind[TypePredicateKind["AssertsIdentifier"] = 3] = "AssertsIdentifier"; +})(TypePredicateKind || (TypePredicateKind = {})); +//# sourceMappingURL=typePredicateKind.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/enums/typePredicateKind.js.map b/node_modules/typescript/dist/enums/typePredicateKind.js.map new file mode 100644 index 0000000..d87dfc8 --- /dev/null +++ b/node_modules/typescript/dist/enums/typePredicateKind.js.map @@ -0,0 +1 @@ +{"version":3,"file":"typePredicateKind.js","sourceRoot":"","sources":["../../src/enums/typePredicateKind.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,MAAM,CAAC,IAAI,iBAAsB,CAAC;AAClC,CAAC,UAAU,iBAAiB;IACxB,iBAAiB,CAAC,iBAAiB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IAC1D,iBAAiB,CAAC,iBAAiB,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,YAAY,CAAC;IACtE,iBAAiB,CAAC,iBAAiB,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC;IACxE,iBAAiB,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,GAAG,mBAAmB,CAAC;AACxF,CAAC,CAAC,CAAC,iBAAiB,IAAI,CAAC,iBAAiB,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/dist/internal/utils.d.ts b/node_modules/typescript/dist/internal/utils.d.ts new file mode 100644 index 0000000..fbaf755 --- /dev/null +++ b/node_modules/typescript/dist/internal/utils.d.ts @@ -0,0 +1,23 @@ +/** + * Safer version of `Function` which should not be called. + * Every function should be assignable to this, but this should not be assignable to every function. + */ +export type AnyFunction = (...args: never[]) => void; +/** + * Type of objects whose values are all of the same type. + * The `in` and `for-in` operators can *not* be safely used, + * since `Object.prototype` may be modified by outside code. + */ +export interface MapLike { + [index: string]: T; +} +/** + * Indicates whether a map-like contains an own property with the specified key. + * + * @param map A map-like. + * @param key A property key. + */ +export declare function hasProperty(map: MapLike, key: string): boolean; +export declare function assertNever(member: never, message?: string, stackCrawlMark?: AnyFunction): never; +export declare function fail(message?: string, stackCrawlMark?: AnyFunction): never; +//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/node_modules/typescript/dist/internal/utils.d.ts.map b/node_modules/typescript/dist/internal/utils.d.ts.map new file mode 100644 index 0000000..e52d6d4 --- /dev/null +++ b/node_modules/typescript/dist/internal/utils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/internal/utils.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,IAAI,CAAC;AAErD;;;;GAIG;AACH,MAAM,WAAW,OAAO,CAAC,CAAC;IACtB,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,CAAC;CACtB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAEnE;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,SAAmB,EAAE,cAAc,CAAC,EAAE,WAAW,GAAG,KAAK,CAG1G;AAED,wBAAgB,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,WAAW,GAAG,KAAK,CAQ1E"} \ No newline at end of file diff --git a/node_modules/typescript/dist/internal/utils.js b/node_modules/typescript/dist/internal/utils.js new file mode 100644 index 0000000..00899c5 --- /dev/null +++ b/node_modules/typescript/dist/internal/utils.js @@ -0,0 +1,25 @@ +import { formatSyntaxKind } from "../ast/utils.js"; +const hasOwnProperty = Object.prototype.hasOwnProperty; +/** + * Indicates whether a map-like contains an own property with the specified key. + * + * @param map A map-like. + * @param key A property key. + */ +export function hasProperty(map, key) { + return hasOwnProperty.call(map, key); +} +export function assertNever(member, message = "Illegal value:", stackCrawlMark) { + const detail = typeof member === "object" && hasProperty(member, "kind") && hasProperty(member, "pos") ? "SyntaxKind: " + formatSyntaxKind(member.kind) : JSON.stringify(member); + return fail(`${message} ${detail}`, stackCrawlMark || assertNever); +} +export function fail(message, stackCrawlMark) { + // eslint-disable-next-line no-debugger + debugger; + const e = new Error(message ? `Debug Failure. ${message}` : "Debug Failure."); + if (Error.captureStackTrace) { + Error.captureStackTrace(e, stackCrawlMark || fail); + } + throw e; +} +//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/node_modules/typescript/dist/internal/utils.js.map b/node_modules/typescript/dist/internal/utils.js.map new file mode 100644 index 0000000..b896aa3 --- /dev/null +++ b/node_modules/typescript/dist/internal/utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/internal/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,MAAM,cAAc,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AAiBvD;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,GAAiB,EAAE,GAAW;IACtD,OAAO,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,MAAa,EAAE,OAAO,GAAG,gBAAgB,EAAE,cAA4B;IAC/F,MAAM,MAAM,GAAG,OAAO,MAAM,KAAK,QAAQ,IAAI,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,cAAc,GAAG,gBAAgB,CAAE,MAAe,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAC3L,OAAO,IAAI,CAAC,GAAG,OAAO,IAAI,MAAM,EAAE,EAAE,cAAc,IAAI,WAAW,CAAC,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,OAAgB,EAAE,cAA4B;IAC/D,uCAAuC;IACvC,QAAQ,CAAC;IACT,MAAM,CAAC,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,kBAAkB,OAAO,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC;IAC9E,IAAK,KAAa,CAAC,iBAAiB,EAAE,CAAC;QAClC,KAAa,CAAC,iBAAiB,CAAC,CAAC,EAAE,cAAc,IAAI,IAAI,CAAC,CAAC;IAChE,CAAC;IACD,MAAM,CAAC,CAAC;AACZ,CAAC"} \ No newline at end of file diff --git a/node_modules/typescript/lib/getExePath.d.ts b/node_modules/typescript/lib/getExePath.d.ts new file mode 100644 index 0000000..bf33fb7 --- /dev/null +++ b/node_modules/typescript/lib/getExePath.d.ts @@ -0,0 +1,2 @@ +declare function getExePath(): string; +export default getExePath; diff --git a/node_modules/typescript/lib/getExePath.js b/node_modules/typescript/lib/getExePath.js new file mode 100644 index 0000000..ade3d7b --- /dev/null +++ b/node_modules/typescript/lib/getExePath.js @@ -0,0 +1,70 @@ +import fs from "node:fs"; +import module from "node:module"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; + +// NOTE: Keep VS Code extension's resolveTsdkPathToExe in sync with this function. +export default function getExePath() { + const __dirname = path.dirname(fileURLToPath(import.meta.url)); + const normalizedDirname = __dirname.replace(/\\/g, "/"); + + const pkg = JSON.parse(fs.readFileSync(path.join(__dirname, "..", "package.json"), "utf8")); + const pkgName = pkg.name; + const baseName = pkgName.startsWith("@") ? pkgName.split("/")[1] : pkgName; + const expectedBinName = baseName === "typescript" ? "tsc" : "tsgo"; + const binNames = pkg.bin && typeof pkg.bin === "object" ? Object.keys(pkg.bin) : []; + if (binNames.length !== 1 || binNames[0] !== expectedBinName) { + throw new Error(`Expected ${pkgName} to declare exactly one bin entry named ${expectedBinName}.`); + } + let binName = expectedBinName; + let exeDir; + + const expectedPackage = baseName + "-" + process.platform + "-" + process.arch; + + if (normalizedDirname.endsWith("/_packages/" + baseName + "/lib")) { + // We're running directly from source in the repo. + // The local repo build (`hereby build`) always produces `tsgo`, regardless + // of the published `bin` name, so don't use binName here. + exeDir = path.resolve(__dirname, "..", "..", "..", "built", "local"); + binName = "tsgo"; + } + else if (normalizedDirname.endsWith("/built/npm/" + baseName + "/lib")) { + // We're running from the built output. + exeDir = path.resolve(__dirname, "..", "..", expectedPackage, "lib"); + } + else { + // We're actually running from an installed package. + const platformPackageName = "@typescript/" + expectedPackage; + try { + if (typeof import.meta.resolve === "undefined") { + // v16.20.1 + const require = module.createRequire(import.meta.url); + const packageJson = require.resolve(platformPackageName + "/package.json"); + exeDir = path.join(path.dirname(packageJson), "lib"); + } + else { + // v20.6.0, v18.19.0 + const packageJson = import.meta.resolve(platformPackageName + "/package.json"); + const packageJsonPath = fileURLToPath(packageJson); + exeDir = path.join(path.dirname(packageJsonPath), "lib"); + } + } + catch (e) { + throw new Error("Unable to resolve " + platformPackageName + ". Either your platform is unsupported, or you are missing the package on disk."); + } + } + + let exe = path.join(exeDir, binName); + if (process.platform === "win32") { + exe += ".exe"; + if (exe.length >= 248) { + exe = "\\\\?\\" + exe; + } + } + + if (!fs.existsSync(exe)) { + throw new Error("Executable not found: " + exe); + } + + return exe; +} diff --git a/node_modules/typescript/lib/tsc.js b/node_modules/typescript/lib/tsc.js new file mode 100644 index 0000000..eb869b7 --- /dev/null +++ b/node_modules/typescript/lib/tsc.js @@ -0,0 +1,28 @@ +#!/usr/bin/env node + +import getExePath from "#getExePath"; +import { execFileSync } from "node:child_process"; + +const exe = getExePath(); + +if (process.platform !== "win32" && typeof process.execve === "function") { + // > v22.15.0 + try { + process.execve(exe, [exe, ...process.argv.slice(2)]); + } + catch { + // may not be available, ignore the error and fallback + } +} + +try { + execFileSync(exe, process.argv.slice(2), { stdio: "inherit" }); +} +catch (e) { + if (e.status) { + process.exitCode = e.status; + } + else { + throw e; + } +} diff --git a/node_modules/typescript/lib/version.cjs b/node_modules/typescript/lib/version.cjs new file mode 100644 index 0000000..5a2e8c8 --- /dev/null +++ b/node_modules/typescript/lib/version.cjs @@ -0,0 +1,3 @@ +const { version } = require("../package.json"); +exports.version = version; +exports.versionMajorMinor = "7.0"; diff --git a/node_modules/typescript/lib/version.d.cts b/node_modules/typescript/lib/version.d.cts new file mode 100644 index 0000000..b434811 --- /dev/null +++ b/node_modules/typescript/lib/version.d.cts @@ -0,0 +1,2 @@ +export declare const version: string; +export declare const versionMajorMinor = "7.0"; diff --git a/node_modules/typescript/package.json b/node_modules/typescript/package.json new file mode 100644 index 0000000..f4242a6 --- /dev/null +++ b/node_modules/typescript/package.json @@ -0,0 +1,87 @@ +{ + "name": "typescript", + "version": "7.0.2", + "license": "Apache-2.0", + "author": "Microsoft Corp.", + "homepage": "https://www.typescriptlang.org/", + "description": "TypeScript is a language for application scale JavaScript development", + "keywords": [ + "TypeScript", + "Microsoft", + "compiler", + "language", + "javascript" + ], + "bugs": { + "url": "https://github.com/microsoft/TypeScript/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/microsoft/TypeScript.git" + }, + "type": "module", + "preferUnplugged": true, + "engines": { + "node": ">=16.20.0" + }, + "files": [ + "bin", + "lib", + "dist", + "vendor", + "NOTICE.txt" + ], + "bin": { + "tsc": "./bin/tsc" + }, + "exports": { + "./package.json": "./package.json", + ".": "./lib/version.cjs", + "./unstable/sync": "./dist/api/sync/api.js", + "./unstable/async": "./dist/api/async/api.js", + "./unstable/fs": "./dist/api/fs.js", + "./unstable/proto": "./dist/api/proto.js", + "./unstable/ast": "./dist/ast/index.js", + "./unstable/ast/is": "./dist/ast/is.js", + "./unstable/ast/factory": "./dist/ast/factory.generated.js", + "./unstable/ast/utils": "./dist/ast/utils.js", + "./unstable/ast/scanner": "./dist/ast/scanner.js", + "./unstable/ast/visitor": "./dist/ast/visitor.js", + "./unstable/ast/clone": "./dist/ast/clone.js" + }, + "imports": { + "#getExePath": "./lib/getExePath.js", + "#enums/*": { + "types": "./dist/enums/*.enum.d.ts", + "default": "./dist/enums/*.js" + }, + "#vscode-jsonrpc/node": "./vendor/vscode-jsonrpc/lib/node/main.js" + }, + "gitHead": "2bd066d87f5bafd315be9f40889d0a60b9e58e0b", + "publishConfig": { + "access": "public", + "tag": "latest" + }, + "optionalDependencies": { + "@typescript/typescript-win32-x64": "7.0.2", + "@typescript/typescript-win32-arm64": "7.0.2", + "@typescript/typescript-linux-x64": "7.0.2", + "@typescript/typescript-linux-arm": "7.0.2", + "@typescript/typescript-linux-arm64": "7.0.2", + "@typescript/typescript-darwin-x64": "7.0.2", + "@typescript/typescript-darwin-arm64": "7.0.2", + "@typescript/typescript-aix-ppc64": "7.0.2", + "@typescript/typescript-freebsd-arm64": "7.0.2", + "@typescript/typescript-freebsd-x64": "7.0.2", + "@typescript/typescript-linux-loong64": "7.0.2", + "@typescript/typescript-linux-mips64el": "7.0.2", + "@typescript/typescript-linux-ppc64": "7.0.2", + "@typescript/typescript-linux-riscv64": "7.0.2", + "@typescript/typescript-linux-s390x": "7.0.2", + "@typescript/typescript-netbsd-arm64": "7.0.2", + "@typescript/typescript-netbsd-x64": "7.0.2", + "@typescript/typescript-openbsd-arm64": "7.0.2", + "@typescript/typescript-openbsd-x64": "7.0.2", + "@typescript/typescript-sunos-x64": "7.0.2" + } +} \ No newline at end of file diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/License.txt b/node_modules/typescript/vendor/vscode-jsonrpc/License.txt new file mode 100644 index 0000000..a07e3ae --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/License.txt @@ -0,0 +1,11 @@ +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/README.md b/node_modules/typescript/vendor/vscode-jsonrpc/README.md new file mode 100644 index 0000000..a3ddd91 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/README.md @@ -0,0 +1,54 @@ +# VSCode JSON RPC + +[![NPM Version](https://img.shields.io/npm/v/vscode-jsonrpc.svg)](https://npmjs.org/package/vscode-jsonrpc) +[![NPM Downloads](https://img.shields.io/npm/dm/vscode-jsonrpc.svg)](https://npmjs.org/package/vscode-jsonrpc) +[![Build Status](https://dev.azure.com/vscode/vscode-languageserver-node/_apis/build/status%2Fvscode-languageserver-node?branchName=main)](https://dev.azure.com/vscode/vscode-languageserver-node/_build/latest?definitionId=52&branchName=main) + +This npm module implements the base messaging protocol spoken between a VSCode language server and a VSCode language client. + +The npm module can also be used standalone to establish a [JSON-RPC](http://www.jsonrpc.org/) channel between +a client and a server. Below an example how to setup a JSON-RPC connection. First the client side. + +```ts +import * as cp from 'child_process'; +import * as rpc from 'vscode-jsonrpc/node'; + +let childProcess = cp.spawn(...); + +// Use stdin and stdout for communication: +let connection = rpc.createMessageConnection( + new rpc.StreamMessageReader(childProcess.stdout), + new rpc.StreamMessageWriter(childProcess.stdin)); + +let notification = new rpc.NotificationType('testNotification'); + +connection.listen(); + +connection.sendNotification(notification, 'Hello World'); +``` + +The server side looks very symmetrical: + +```ts +import * as rpc from 'vscode-jsonrpc/node'; + + +let connection = rpc.createMessageConnection( + new rpc.StreamMessageReader(process.stdin), + new rpc.StreamMessageWriter(process.stdout)); + +let notification = new rpc.NotificationType('testNotification'); +connection.onNotification(notification, (param: string) => { + console.log(param); // This prints Hello World +}); + +connection.listen(); +``` + +# History + +For the history please see the [main repository](https://github.com/Microsoft/vscode-languageserver-node/blob/master/README.md) + + +## License +[MIT](https://github.com/Microsoft/vscode-languageserver-node/blob/master/License.txt) diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.d.ts new file mode 100644 index 0000000..05d994f --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.d.ts @@ -0,0 +1,17 @@ +import { AbstractMessageReader, DataCallback, AbstractMessageWriter, Message, Disposable, ConnectionStrategy, ConnectionOptions, MessageReader, MessageWriter, Logger, MessageConnection } from '../common/api'; +export * from '../common/api'; +export declare class BrowserMessageReader extends AbstractMessageReader implements MessageReader { + private _onData; + private _messageListener; + constructor(port: MessagePort | Worker | DedicatedWorkerGlobalScope); + listen(callback: DataCallback): Disposable; +} +export declare class BrowserMessageWriter extends AbstractMessageWriter implements MessageWriter { + private port; + private errorCount; + constructor(port: MessagePort | Worker | DedicatedWorkerGlobalScope); + write(msg: Message): Promise; + private handleError; + end(): void; +} +export declare function createMessageConnection(reader: MessageReader, writer: MessageWriter, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): MessageConnection; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.js new file mode 100644 index 0000000..11e51f8 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/main.js @@ -0,0 +1,83 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.BrowserMessageWriter = exports.BrowserMessageReader = void 0; +exports.createMessageConnection = createMessageConnection; +const ril_1 = __importDefault(require("./ril")); +// Install the browser runtime abstract. +ril_1.default.install(); +const api_1 = require("../common/api"); +__exportStar(require("../common/api"), exports); +class BrowserMessageReader extends api_1.AbstractMessageReader { + _onData; + _messageListener; + constructor(port) { + super(); + this._onData = new api_1.Emitter(); + this._messageListener = (event) => { + this._onData.fire(event.data); + }; + port.addEventListener('error', (event) => this.fireError(event)); + port.onmessage = this._messageListener; + } + listen(callback) { + return this._onData.event(callback); + } +} +exports.BrowserMessageReader = BrowserMessageReader; +class BrowserMessageWriter extends api_1.AbstractMessageWriter { + port; + errorCount; + constructor(port) { + super(); + this.port = port; + this.errorCount = 0; + port.addEventListener('error', (event) => this.fireError(event)); + } + write(msg) { + try { + this.port.postMessage(msg); + return Promise.resolve(); + } + catch (error) { + this.handleError(error, msg); + return Promise.reject(error); + } + } + handleError(error, msg) { + this.errorCount++; + this.fireError(error, msg, this.errorCount); + } + end() { + } +} +exports.BrowserMessageWriter = BrowserMessageWriter; +function createMessageConnection(reader, writer, logger, options) { + if (logger === undefined) { + logger = api_1.NullLogger; + } + if (api_1.ConnectionStrategy.is(options)) { + options = { connectionStrategy: options }; + } + return (0, api_1.createMessageConnection)(reader, writer, logger, options); +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.d.ts new file mode 100644 index 0000000..78d42d8 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.d.ts @@ -0,0 +1,22 @@ +import { RAL, Disposable } from '../common/api'; +interface RIL extends RAL { + readonly stream: { + readonly asReadableStream: (stream: WebSocket) => RAL.ReadableStream; + readonly asWritableStream: (stream: WebSocket) => RAL.WritableStream; + }; +} +export declare class QueueMicrotaskImpl implements Disposable { + private isDisposed; + constructor(callback: (...args: any[]) => void, ...args: any[]); + dispose(): void; +} +export declare class PromiseImpl implements Disposable { + private isDisposed; + constructor(callback: (...args: any[]) => void, ...args: any[]); + dispose(): void; +} +declare function RIL(): RIL; +declare namespace RIL { + function install(): void; +} +export default RIL; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.js new file mode 100644 index 0000000..04969b2 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/browser/ril.js @@ -0,0 +1,210 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PromiseImpl = exports.QueueMicrotaskImpl = void 0; +const api_1 = require("../common/api"); +class MessageBuffer extends api_1.AbstractMessageBuffer { + static emptyBuffer = new Uint8Array(0); + asciiDecoder; + constructor(encoding = 'utf-8') { + super(encoding); + this.asciiDecoder = new TextDecoder('ascii'); + } + emptyBuffer() { + return MessageBuffer.emptyBuffer; + } + fromString(value, _encoding) { + return (new TextEncoder()).encode(value); + } + toString(value, encoding) { + if (encoding === 'ascii') { + return this.asciiDecoder.decode(value); + } + else { + return (new TextDecoder(encoding)).decode(value); + } + } + asNative(buffer, length) { + if (length === undefined) { + return buffer; + } + else { + return buffer.slice(0, length); + } + } + allocNative(length) { + return new Uint8Array(length); + } +} +class ReadableStreamWrapper { + socket; + _onData; + _messageListener; + constructor(socket) { + this.socket = socket; + this._onData = new api_1.Emitter(); + this._messageListener = (event) => { + const blob = event.data; + blob.arrayBuffer().then((buffer) => { + this._onData.fire(new Uint8Array(buffer)); + }, () => { + (0, api_1.RAL)().console.error(`Converting blob to array buffer failed.`); + }); + }; + this.socket.addEventListener('message', this._messageListener); + } + onClose(listener) { + this.socket.addEventListener('close', listener); + return api_1.Disposable.create(() => this.socket.removeEventListener('close', listener)); + } + onError(listener) { + this.socket.addEventListener('error', listener); + return api_1.Disposable.create(() => this.socket.removeEventListener('error', listener)); + } + onEnd(listener) { + this.socket.addEventListener('end', listener); + return api_1.Disposable.create(() => this.socket.removeEventListener('end', listener)); + } + onData(listener) { + return this._onData.event(listener); + } +} +class WritableStreamWrapper { + socket; + constructor(socket) { + this.socket = socket; + } + onClose(listener) { + this.socket.addEventListener('close', listener); + return api_1.Disposable.create(() => this.socket.removeEventListener('close', listener)); + } + onError(listener) { + this.socket.addEventListener('error', listener); + return api_1.Disposable.create(() => this.socket.removeEventListener('error', listener)); + } + onEnd(listener) { + this.socket.addEventListener('end', listener); + return api_1.Disposable.create(() => this.socket.removeEventListener('end', listener)); + } + write(data, encoding) { + if (typeof data === 'string') { + if (encoding !== undefined && encoding !== 'utf-8') { + throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${encoding}`); + } + this.socket.send(data); + } + else { + if (data.buffer instanceof ArrayBuffer) { + this.socket.send(data.buffer); + } + else { + // We can't send a shared array buffer directly, so we need to + // create a copy of it. + this.socket.send(new Uint8Array(data.buffer).slice().buffer); + } + } + return Promise.resolve(); + } + end() { + this.socket.close(); + } +} +class QueueMicrotaskImpl { + isDisposed; + constructor(callback, ...args) { + this.isDisposed = false; + queueMicrotask(() => { + if (!this.isDisposed) { + callback(...args); + } + }); + } + dispose() { + this.isDisposed = true; + } +} +exports.QueueMicrotaskImpl = QueueMicrotaskImpl; +class PromiseImpl { + isDisposed; + constructor(callback, ...args) { + this.isDisposed = false; + Promise.resolve().then(() => { + if (!this.isDisposed) { + callback(...args); + } + }, () => { + }); + } + dispose() { + this.isDisposed = true; + } +} +exports.PromiseImpl = PromiseImpl; +const _textEncoder = new TextEncoder(); +const _ril = Object.freeze({ + messageBuffer: Object.freeze({ + create: (encoding) => new MessageBuffer(encoding) + }), + applicationJson: Object.freeze({ + encoder: Object.freeze({ + name: 'application/json', + encode: (msg, options) => { + if (options.charset !== 'utf-8') { + throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${options.charset}`); + } + return Promise.resolve(_textEncoder.encode(JSON.stringify(msg, undefined, 0))); + } + }), + decoder: Object.freeze({ + name: 'application/json', + decode: (buffer, options) => { + if (!(buffer instanceof Uint8Array)) { + throw new Error(`In a Browser environments only Uint8Arrays are supported.`); + } + return Promise.resolve(JSON.parse(new TextDecoder(options.charset).decode(buffer))); + } + }) + }), + stream: Object.freeze({ + asReadableStream: (socket) => new ReadableStreamWrapper(socket), + asWritableStream: (socket) => new WritableStreamWrapper(socket) + }), + console: console, + timer: Object.freeze({ + setTimeout(callback, ms, ...args) { + const handle = setTimeout(callback, ms, ...args); + return { dispose: () => clearTimeout(handle) }; + }, + setImmediate(callback, ...args) { + // Browser don't have setImmediate and setTimeout with 0 delay of 0 can cause problems + // in webviews and similar environments due to throttling. + if (typeof globalThis.queueMicrotask === 'function') { + return new QueueMicrotaskImpl(callback, ...args); + } + else if (Promise !== undefined) { + return new PromiseImpl(callback, ...args); + } + else { + const handle = setTimeout(callback, 0, ...args); + return { dispose: () => clearTimeout(handle) }; + } + }, + setInterval(callback, ms, ...args) { + const handle = setInterval(callback, ms, ...args); + return { dispose: () => clearInterval(handle) }; + }, + }) +}); +function RIL() { + return _ril; +} +(function (RIL) { + function install() { + api_1.RAL.install(_ril); + } + RIL.install = install; +})(RIL || (RIL = {})); +exports.default = RIL; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.d.ts new file mode 100644 index 0000000..8250d53 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.d.ts @@ -0,0 +1,14 @@ +/// +import { Message, MessageSignature, RequestMessage, RequestType, RequestType0, RequestType1, RequestType2, RequestType3, RequestType4, RequestType5, RequestType6, RequestType7, RequestType8, RequestType9, ResponseError, ErrorCodes, NotificationMessage, NotificationType, NotificationType0, NotificationType1, NotificationType2, NotificationType3, NotificationType4, NotificationType5, NotificationType6, NotificationType7, NotificationType8, NotificationType9, ResponseMessage, ParameterStructures, _EM } from './messages'; +import { LinkedMap, LRUCache, Touch } from './linkedMap'; +import { Disposable } from './disposable'; +import { Event, Emitter } from './events'; +import { AbstractCancellationTokenSource, CancellationTokenSource, CancellationToken } from './cancellation'; +import { SharedArraySenderStrategy, SharedArrayReceiverStrategy } from './sharedArrayCancellation'; +import { MessageReader, AbstractMessageReader, ReadableStreamMessageReader, DataCallback, MessageReaderOptions, PartialMessageInfo } from './messageReader'; +import { MessageWriter, AbstractMessageWriter, WriteableStreamMessageWriter, MessageWriterOptions } from './messageWriter'; +import { AbstractMessageBuffer } from './messageBuffer'; +import { ContentTypeEncoderOptions, ContentEncoder, ContentTypeEncoder, ContentTypeDecoderOptions, ContentDecoder, ContentTypeDecoder } from './encoding'; +import { Logger, ConnectionStrategy, ConnectionOptions, MessageConnection, NullLogger, createMessageConnection, ProgressToken, ProgressType, RequestParam, HandlerResult, StarRequestHandler, GenericRequestHandler, RequestHandler0, RequestHandler, RequestHandler1, RequestHandler2, RequestHandler3, RequestHandler4, RequestHandler5, RequestHandler6, RequestHandler7, RequestHandler8, RequestHandler9, StarNotificationHandler, GenericNotificationHandler, NotificationHandler0, NotificationHandler, NotificationHandler1, NotificationHandler2, NotificationHandler3, NotificationHandler4, NotificationHandler5, NotificationHandler6, NotificationHandler7, NotificationHandler8, NotificationHandler9, Trace, TraceValue, TraceFormat, TraceOptions, SetTraceParams, SetTraceNotification, LogTraceParams, LogTraceNotification, Tracer, ConnectionErrors, ConnectionError, CancellationId, CancellationReceiverStrategy, IdCancellationReceiverStrategy, RequestCancellationReceiverStrategy, CancellationSenderStrategy, CancellationStrategy, MessageStrategy, TraceValues } from './connection'; +import RAL from './ral'; +export { RAL, Message, MessageSignature, RequestMessage, RequestType, RequestType0, RequestType1, RequestType2, RequestType3, RequestType4, RequestType5, RequestType6, RequestType7, RequestType8, RequestType9, ResponseError, ErrorCodes, NotificationMessage, NotificationType, NotificationType0, NotificationType1, NotificationType2, NotificationType3, NotificationType4, NotificationType5, NotificationType6, NotificationType7, NotificationType8, NotificationType9, ResponseMessage, ParameterStructures, _EM, LinkedMap, Touch, LRUCache, Disposable, Event, Emitter, AbstractCancellationTokenSource, CancellationTokenSource, CancellationToken, SharedArraySenderStrategy, SharedArrayReceiverStrategy, MessageReader, AbstractMessageReader, ReadableStreamMessageReader, DataCallback, MessageReaderOptions, PartialMessageInfo, MessageWriter, AbstractMessageWriter, WriteableStreamMessageWriter, MessageWriterOptions, AbstractMessageBuffer, ContentTypeEncoderOptions, ContentEncoder, ContentTypeEncoder, ContentTypeDecoderOptions, ContentDecoder, ContentTypeDecoder, Logger, ConnectionStrategy, ConnectionOptions, MessageConnection, NullLogger, createMessageConnection, ProgressToken, ProgressType, RequestParam, HandlerResult, StarRequestHandler, GenericRequestHandler, RequestHandler0, RequestHandler, RequestHandler1, RequestHandler2, RequestHandler3, RequestHandler4, RequestHandler5, RequestHandler6, RequestHandler7, RequestHandler8, RequestHandler9, StarNotificationHandler, GenericNotificationHandler, NotificationHandler0, NotificationHandler, NotificationHandler1, NotificationHandler2, NotificationHandler3, NotificationHandler4, NotificationHandler5, NotificationHandler6, NotificationHandler7, NotificationHandler8, NotificationHandler9, Trace, TraceValue, TraceValues, TraceFormat, TraceOptions, SetTraceParams, SetTraceNotification, LogTraceParams, LogTraceNotification, Tracer, ConnectionErrors, ConnectionError, CancellationId, CancellationReceiverStrategy, IdCancellationReceiverStrategy, RequestCancellationReceiverStrategy, CancellationSenderStrategy, CancellationStrategy, MessageStrategy }; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.js new file mode 100644 index 0000000..ab7abd5 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/api.js @@ -0,0 +1,87 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +/// +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ProgressType = exports.ProgressToken = exports.createMessageConnection = exports.NullLogger = exports.ConnectionOptions = exports.ConnectionStrategy = exports.AbstractMessageBuffer = exports.WriteableStreamMessageWriter = exports.AbstractMessageWriter = exports.MessageWriter = exports.ReadableStreamMessageReader = exports.AbstractMessageReader = exports.MessageReader = exports.SharedArrayReceiverStrategy = exports.SharedArraySenderStrategy = exports.CancellationToken = exports.CancellationTokenSource = exports.Emitter = exports.Event = exports.Disposable = exports.LRUCache = exports.Touch = exports.LinkedMap = exports.ParameterStructures = exports.NotificationType9 = exports.NotificationType8 = exports.NotificationType7 = exports.NotificationType6 = exports.NotificationType5 = exports.NotificationType4 = exports.NotificationType3 = exports.NotificationType2 = exports.NotificationType1 = exports.NotificationType0 = exports.NotificationType = exports.ErrorCodes = exports.ResponseError = exports.RequestType9 = exports.RequestType8 = exports.RequestType7 = exports.RequestType6 = exports.RequestType5 = exports.RequestType4 = exports.RequestType3 = exports.RequestType2 = exports.RequestType1 = exports.RequestType0 = exports.RequestType = exports.Message = exports.RAL = void 0; +exports.MessageStrategy = exports.CancellationStrategy = exports.CancellationSenderStrategy = exports.RequestCancellationReceiverStrategy = exports.IdCancellationReceiverStrategy = exports.CancellationReceiverStrategy = exports.ConnectionError = exports.ConnectionErrors = exports.LogTraceNotification = exports.SetTraceNotification = exports.TraceFormat = exports.TraceValues = exports.TraceValue = exports.Trace = void 0; +const messages_1 = require("./messages"); +Object.defineProperty(exports, "Message", { enumerable: true, get: function () { return messages_1.Message; } }); +Object.defineProperty(exports, "RequestType", { enumerable: true, get: function () { return messages_1.RequestType; } }); +Object.defineProperty(exports, "RequestType0", { enumerable: true, get: function () { return messages_1.RequestType0; } }); +Object.defineProperty(exports, "RequestType1", { enumerable: true, get: function () { return messages_1.RequestType1; } }); +Object.defineProperty(exports, "RequestType2", { enumerable: true, get: function () { return messages_1.RequestType2; } }); +Object.defineProperty(exports, "RequestType3", { enumerable: true, get: function () { return messages_1.RequestType3; } }); +Object.defineProperty(exports, "RequestType4", { enumerable: true, get: function () { return messages_1.RequestType4; } }); +Object.defineProperty(exports, "RequestType5", { enumerable: true, get: function () { return messages_1.RequestType5; } }); +Object.defineProperty(exports, "RequestType6", { enumerable: true, get: function () { return messages_1.RequestType6; } }); +Object.defineProperty(exports, "RequestType7", { enumerable: true, get: function () { return messages_1.RequestType7; } }); +Object.defineProperty(exports, "RequestType8", { enumerable: true, get: function () { return messages_1.RequestType8; } }); +Object.defineProperty(exports, "RequestType9", { enumerable: true, get: function () { return messages_1.RequestType9; } }); +Object.defineProperty(exports, "ResponseError", { enumerable: true, get: function () { return messages_1.ResponseError; } }); +Object.defineProperty(exports, "ErrorCodes", { enumerable: true, get: function () { return messages_1.ErrorCodes; } }); +Object.defineProperty(exports, "NotificationType", { enumerable: true, get: function () { return messages_1.NotificationType; } }); +Object.defineProperty(exports, "NotificationType0", { enumerable: true, get: function () { return messages_1.NotificationType0; } }); +Object.defineProperty(exports, "NotificationType1", { enumerable: true, get: function () { return messages_1.NotificationType1; } }); +Object.defineProperty(exports, "NotificationType2", { enumerable: true, get: function () { return messages_1.NotificationType2; } }); +Object.defineProperty(exports, "NotificationType3", { enumerable: true, get: function () { return messages_1.NotificationType3; } }); +Object.defineProperty(exports, "NotificationType4", { enumerable: true, get: function () { return messages_1.NotificationType4; } }); +Object.defineProperty(exports, "NotificationType5", { enumerable: true, get: function () { return messages_1.NotificationType5; } }); +Object.defineProperty(exports, "NotificationType6", { enumerable: true, get: function () { return messages_1.NotificationType6; } }); +Object.defineProperty(exports, "NotificationType7", { enumerable: true, get: function () { return messages_1.NotificationType7; } }); +Object.defineProperty(exports, "NotificationType8", { enumerable: true, get: function () { return messages_1.NotificationType8; } }); +Object.defineProperty(exports, "NotificationType9", { enumerable: true, get: function () { return messages_1.NotificationType9; } }); +Object.defineProperty(exports, "ParameterStructures", { enumerable: true, get: function () { return messages_1.ParameterStructures; } }); +const linkedMap_1 = require("./linkedMap"); +Object.defineProperty(exports, "LinkedMap", { enumerable: true, get: function () { return linkedMap_1.LinkedMap; } }); +Object.defineProperty(exports, "LRUCache", { enumerable: true, get: function () { return linkedMap_1.LRUCache; } }); +Object.defineProperty(exports, "Touch", { enumerable: true, get: function () { return linkedMap_1.Touch; } }); +const disposable_1 = require("./disposable"); +Object.defineProperty(exports, "Disposable", { enumerable: true, get: function () { return disposable_1.Disposable; } }); +const events_1 = require("./events"); +Object.defineProperty(exports, "Event", { enumerable: true, get: function () { return events_1.Event; } }); +Object.defineProperty(exports, "Emitter", { enumerable: true, get: function () { return events_1.Emitter; } }); +const cancellation_1 = require("./cancellation"); +Object.defineProperty(exports, "CancellationTokenSource", { enumerable: true, get: function () { return cancellation_1.CancellationTokenSource; } }); +Object.defineProperty(exports, "CancellationToken", { enumerable: true, get: function () { return cancellation_1.CancellationToken; } }); +const sharedArrayCancellation_1 = require("./sharedArrayCancellation"); +Object.defineProperty(exports, "SharedArraySenderStrategy", { enumerable: true, get: function () { return sharedArrayCancellation_1.SharedArraySenderStrategy; } }); +Object.defineProperty(exports, "SharedArrayReceiverStrategy", { enumerable: true, get: function () { return sharedArrayCancellation_1.SharedArrayReceiverStrategy; } }); +const messageReader_1 = require("./messageReader"); +Object.defineProperty(exports, "MessageReader", { enumerable: true, get: function () { return messageReader_1.MessageReader; } }); +Object.defineProperty(exports, "AbstractMessageReader", { enumerable: true, get: function () { return messageReader_1.AbstractMessageReader; } }); +Object.defineProperty(exports, "ReadableStreamMessageReader", { enumerable: true, get: function () { return messageReader_1.ReadableStreamMessageReader; } }); +const messageWriter_1 = require("./messageWriter"); +Object.defineProperty(exports, "MessageWriter", { enumerable: true, get: function () { return messageWriter_1.MessageWriter; } }); +Object.defineProperty(exports, "AbstractMessageWriter", { enumerable: true, get: function () { return messageWriter_1.AbstractMessageWriter; } }); +Object.defineProperty(exports, "WriteableStreamMessageWriter", { enumerable: true, get: function () { return messageWriter_1.WriteableStreamMessageWriter; } }); +const messageBuffer_1 = require("./messageBuffer"); +Object.defineProperty(exports, "AbstractMessageBuffer", { enumerable: true, get: function () { return messageBuffer_1.AbstractMessageBuffer; } }); +const connection_1 = require("./connection"); +Object.defineProperty(exports, "ConnectionStrategy", { enumerable: true, get: function () { return connection_1.ConnectionStrategy; } }); +Object.defineProperty(exports, "ConnectionOptions", { enumerable: true, get: function () { return connection_1.ConnectionOptions; } }); +Object.defineProperty(exports, "NullLogger", { enumerable: true, get: function () { return connection_1.NullLogger; } }); +Object.defineProperty(exports, "createMessageConnection", { enumerable: true, get: function () { return connection_1.createMessageConnection; } }); +Object.defineProperty(exports, "ProgressToken", { enumerable: true, get: function () { return connection_1.ProgressToken; } }); +Object.defineProperty(exports, "ProgressType", { enumerable: true, get: function () { return connection_1.ProgressType; } }); +Object.defineProperty(exports, "Trace", { enumerable: true, get: function () { return connection_1.Trace; } }); +Object.defineProperty(exports, "TraceValue", { enumerable: true, get: function () { return connection_1.TraceValue; } }); +Object.defineProperty(exports, "TraceFormat", { enumerable: true, get: function () { return connection_1.TraceFormat; } }); +Object.defineProperty(exports, "SetTraceNotification", { enumerable: true, get: function () { return connection_1.SetTraceNotification; } }); +Object.defineProperty(exports, "LogTraceNotification", { enumerable: true, get: function () { return connection_1.LogTraceNotification; } }); +Object.defineProperty(exports, "ConnectionErrors", { enumerable: true, get: function () { return connection_1.ConnectionErrors; } }); +Object.defineProperty(exports, "ConnectionError", { enumerable: true, get: function () { return connection_1.ConnectionError; } }); +Object.defineProperty(exports, "CancellationReceiverStrategy", { enumerable: true, get: function () { return connection_1.CancellationReceiverStrategy; } }); +Object.defineProperty(exports, "IdCancellationReceiverStrategy", { enumerable: true, get: function () { return connection_1.IdCancellationReceiverStrategy; } }); +Object.defineProperty(exports, "RequestCancellationReceiverStrategy", { enumerable: true, get: function () { return connection_1.RequestCancellationReceiverStrategy; } }); +Object.defineProperty(exports, "CancellationSenderStrategy", { enumerable: true, get: function () { return connection_1.CancellationSenderStrategy; } }); +Object.defineProperty(exports, "CancellationStrategy", { enumerable: true, get: function () { return connection_1.CancellationStrategy; } }); +Object.defineProperty(exports, "MessageStrategy", { enumerable: true, get: function () { return connection_1.MessageStrategy; } }); +Object.defineProperty(exports, "TraceValues", { enumerable: true, get: function () { return connection_1.TraceValues; } }); +const ral_1 = __importDefault(require("./ral")); +exports.RAL = ral_1.default; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.d.ts new file mode 100644 index 0000000..4028512 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.d.ts @@ -0,0 +1,32 @@ +import { Event } from './events'; +import { Disposable } from './disposable'; +/** + * Defines a CancellationToken. This interface is not + * intended to be implemented. A CancellationToken must + * be created via a CancellationTokenSource. + */ +export interface CancellationToken { + /** + * Is `true` when the token has been cancelled, `false` otherwise. + */ + readonly isCancellationRequested: boolean; + /** + * An {@link Event event} which fires upon cancellation. + */ + readonly onCancellationRequested: Event; +} +export declare namespace CancellationToken { + const None: CancellationToken; + const Cancelled: CancellationToken; + function is(value: any): value is CancellationToken; +} +export interface AbstractCancellationTokenSource extends Disposable { + token: CancellationToken; + cancel(): void; +} +export declare class CancellationTokenSource implements AbstractCancellationTokenSource { + private _token; + get token(): CancellationToken; + cancel(): void; + dispose(): void; +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.js new file mode 100644 index 0000000..ec04640 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/cancellation.js @@ -0,0 +1,132 @@ +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CancellationTokenSource = exports.CancellationToken = void 0; +const ral_1 = __importDefault(require("./ral")); +const Is = __importStar(require("./is")); +const events_1 = require("./events"); +var CancellationToken; +(function (CancellationToken) { + CancellationToken.None = Object.freeze({ + isCancellationRequested: false, + onCancellationRequested: events_1.Event.None + }); + CancellationToken.Cancelled = Object.freeze({ + isCancellationRequested: true, + onCancellationRequested: events_1.Event.None + }); + function is(value) { + const candidate = value; + return candidate && (candidate === CancellationToken.None + || candidate === CancellationToken.Cancelled + || (Is.boolean(candidate.isCancellationRequested) && !!candidate.onCancellationRequested)); + } + CancellationToken.is = is; +})(CancellationToken || (exports.CancellationToken = CancellationToken = {})); +const shortcutEvent = Object.freeze(function (callback, context) { + const handle = (0, ral_1.default)().timer.setTimeout(callback.bind(context), 0); + return { dispose() { handle.dispose(); } }; +}); +class MutableToken { + _isCancelled = false; + _emitter; + cancel() { + if (!this._isCancelled) { + this._isCancelled = true; + if (this._emitter) { + this._emitter.fire(undefined); + this.dispose(); + } + } + } + get isCancellationRequested() { + return this._isCancelled; + } + get onCancellationRequested() { + if (this._isCancelled) { + return shortcutEvent; + } + if (!this._emitter) { + this._emitter = new events_1.Emitter(); + } + return this._emitter.event; + } + dispose() { + if (this._emitter) { + this._emitter.dispose(); + this._emitter = undefined; + } + } +} +class CancellationTokenSource { + _token; + get token() { + if (!this._token) { + // be lazy and create the token only when + // actually needed + this._token = new MutableToken(); + } + return this._token; + } + cancel() { + if (!this._token) { + // save an object by returning the default + // cancelled token when cancellation happens + // before someone asks for the token + this._token = CancellationToken.Cancelled; + } + else { + this._token.cancel(); + } + } + dispose() { + if (!this._token) { + // ensure to initialize with an empty token if we had none + this._token = CancellationToken.None; + } + else if (this._token instanceof MutableToken) { + // actually dispose + this._token.dispose(); + } + } +} +exports.CancellationTokenSource = CancellationTokenSource; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.d.ts new file mode 100644 index 0000000..b658ac1 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.d.ts @@ -0,0 +1,367 @@ +/// +import { Message, RequestMessage, RequestType, RequestType0, RequestType1, RequestType2, RequestType3, RequestType4, RequestType5, RequestType6, RequestType7, RequestType8, RequestType9, ResponseMessage, ResponseError, NotificationMessage, NotificationType, NotificationType0, NotificationType1, NotificationType2, NotificationType3, NotificationType4, NotificationType5, NotificationType6, NotificationType7, NotificationType8, NotificationType9, _EM, ParameterStructures } from './messages'; +import type { Disposable } from './disposable'; +import { Event } from './events'; +import { CancellationToken, AbstractCancellationTokenSource } from './cancellation'; +import { MessageReader } from './messageReader'; +import { MessageWriter } from './messageWriter'; +export type ProgressToken = number | string; +export declare namespace ProgressToken { + function is(value: any): value is number | string; +} +interface ProgressParams { + /** + * The progress token provided by the client or server. + */ + token: ProgressToken; + /** + * The progress data. + */ + value: T; +} +export declare class ProgressType { + /** + * Clients must not use these properties. They are here to ensure correct typing. + * in TypeScript + */ + readonly __: [PR, _EM] | undefined; + readonly _pr: PR | undefined; + constructor(); +} +export type RequestParam

= P extends null ? P | undefined : P; +export type HandlerResult = _R | ResponseError | Thenable<_R> | Thenable> | Thenable<_R | ResponseError>; +export interface StarRequestHandler { + (method: string, params: any[] | object | undefined, token: CancellationToken): HandlerResult; +} +export interface GenericRequestHandler { + (...params: any[]): HandlerResult; +} +export interface RequestHandler0 { + (token: CancellationToken): HandlerResult; +} +export interface RequestHandler { + (params: P, token: CancellationToken): HandlerResult; +} +export interface RequestHandler1 { + (p1: P1, token: CancellationToken): HandlerResult; +} +export interface RequestHandler2 { + (p1: P1, p2: P2, token: CancellationToken): HandlerResult; +} +export interface RequestHandler3 { + (p1: P1, p2: P2, p3: P3, token: CancellationToken): HandlerResult; +} +export interface RequestHandler4 { + (p1: P1, p2: P2, p3: P3, p4: P4, token: CancellationToken): HandlerResult; +} +export interface RequestHandler5 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, token: CancellationToken): HandlerResult; +} +export interface RequestHandler6 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, token: CancellationToken): HandlerResult; +} +export interface RequestHandler7 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, token: CancellationToken): HandlerResult; +} +export interface RequestHandler8 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, token: CancellationToken): HandlerResult; +} +export interface RequestHandler9 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, token: CancellationToken): HandlerResult; +} +export type NotificationResult = void | Promise; +export interface StarNotificationHandler { + (method: string, params: any[] | object | undefined): NotificationResult; +} +export interface GenericNotificationHandler { + (...params: any[]): NotificationResult; +} +export interface NotificationHandler0 { + (): NotificationResult; +} +export interface NotificationHandler

{ + (params: P): NotificationResult; +} +export interface NotificationHandler1 { + (p1: P1): NotificationResult; +} +export interface NotificationHandler2 { + (p1: P1, p2: P2): NotificationResult; +} +export interface NotificationHandler3 { + (p1: P1, p2: P2, p3: P3): NotificationResult; +} +export interface NotificationHandler4 { + (p1: P1, p2: P2, p3: P3, p4: P4): NotificationResult; +} +export interface NotificationHandler5 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5): NotificationResult; +} +export interface NotificationHandler6 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6): NotificationResult; +} +export interface NotificationHandler7 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7): NotificationResult; +} +export interface NotificationHandler8 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8): NotificationResult; +} +export interface NotificationHandler9 { + (p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9): NotificationResult; +} +export interface Logger { + error(message: string): void; + warn(message: string): void; + info(message: string): void; + log(message: string): void; +} +export declare const NullLogger: Logger; +export declare enum Trace { + Off = 0, + Messages = 1, + Compact = 2, + Verbose = 3 +} +export declare namespace TraceValue { + /** + * Turn tracing off. + */ + const Off: 'off'; + /** + * Trace messages only. + */ + const Messages: 'messages'; + /** + * Compact message tracing. + */ + const Compact: 'compact'; + /** + * Verbose message tracing. + */ + const Verbose: 'verbose'; +} +export type TraceValue = 'off' | 'messages' | 'compact' | 'verbose'; +/** + * @deprecated Use TraceValue instead + */ +export declare const TraceValues: typeof TraceValue; +export type TraceValues = TraceValue; +export declare namespace Trace { + function fromString(value: string): Trace; + function toString(value: Trace): TraceValue; +} +export declare enum TraceFormat { + Text = "text", + JSON = "json" +} +export declare namespace TraceFormat { + function fromString(value: string): TraceFormat; +} +export interface TraceOptions { + sendNotification?: boolean; + traceFormat?: TraceFormat; +} +export interface SetTraceParams { + value: TraceValue; +} +export declare namespace SetTraceNotification { + const type: NotificationType; +} +export interface LogTraceParams { + message: string; + verbose?: string; +} +export declare namespace LogTraceNotification { + const type: NotificationType; +} +export interface Tracer { + log(dataObject: any): void; + log(message: string, data?: string): void; +} +export declare enum ConnectionErrors { + /** + * The connection is closed. + */ + Closed = 1, + /** + * The connection got disposed. + */ + Disposed = 2, + /** + * The connection is already in listening mode. + */ + AlreadyListening = 3 +} +export declare class ConnectionError extends Error { + readonly code: ConnectionErrors; + constructor(code: ConnectionErrors, message: string); +} +export type ConnectionStrategy = { + cancelUndispatched?: (message: Message, next: (message: Message) => ResponseMessage | undefined) => ResponseMessage | undefined; +}; +export declare namespace ConnectionStrategy { + function is(value: any): value is ConnectionStrategy; +} +export type CancellationId = number | string; +export interface IdCancellationReceiverStrategy { + kind?: 'id'; + /** + * Creates a CancellationTokenSource from a cancellation id. + * + * @param id The cancellation id. + */ + createCancellationTokenSource(id: CancellationId): AbstractCancellationTokenSource; + /** + * An optional method to dispose the strategy. + */ + dispose?(): void; +} +export declare namespace IdCancellationReceiverStrategy { + function is(value: any): value is IdCancellationReceiverStrategy; +} +export interface RequestCancellationReceiverStrategy { + kind: 'request'; + /** + * Create a cancellation token source from a given request message. + * + * @param requestMessage The request message. + */ + createCancellationTokenSource(requestMessage: RequestMessage): AbstractCancellationTokenSource; + /** + * An optional method to dispose the strategy. + */ + dispose?(): void; +} +export declare namespace RequestCancellationReceiverStrategy { + function is(value: any): value is RequestCancellationReceiverStrategy; +} +export type CancellationReceiverStrategy = IdCancellationReceiverStrategy | RequestCancellationReceiverStrategy; +export declare namespace CancellationReceiverStrategy { + const Message: CancellationReceiverStrategy; + function is(value: any): value is CancellationReceiverStrategy; +} +export interface CancellationSenderStrategy { + /** + * Hook to enable cancellation for the given request. + * + * @param request The request to enable cancellation for. + */ + enableCancellation?(request: RequestMessage): void; + /** + * Send cancellation for the given cancellation id + * + * @param conn The connection used. + * @param id The cancellation id. + */ + sendCancellation(conn: MessageConnection, id: CancellationId): Promise; + /** + * Cleanup any cancellation state for the given cancellation id. After this + * method has been call no cancellation will be sent anymore for the given id. + * + * @param id The cancellation id. + */ + cleanup(id: CancellationId): void; + /** + * An optional method to dispose the strategy. + */ + dispose?(): void; +} +export declare namespace CancellationSenderStrategy { + const Message: CancellationSenderStrategy; + function is(value: any): value is CancellationSenderStrategy; +} +export interface CancellationStrategy { + receiver: CancellationReceiverStrategy | RequestCancellationReceiverStrategy; + sender: CancellationSenderStrategy; +} +export declare namespace CancellationStrategy { + const Message: CancellationStrategy; + function is(value: any): value is CancellationStrategy; +} +export interface MessageStrategy { + handleMessage(message: Message, next: (message: Message) => NotificationResult): NotificationResult; +} +export declare namespace MessageStrategy { + function is(value: any): value is MessageStrategy; +} +/** + * Connection options. A valid connection option must have at least a + * `CancellationStrategy` or a `MessageStrategy` or a `ConnectionStrategy`. + */ +export interface ConnectionOptions { + cancellationStrategy?: CancellationStrategy; + connectionStrategy?: ConnectionStrategy; + messageStrategy?: MessageStrategy; + maxParallelism?: number; +} +export declare namespace ConnectionOptions { + function is(value: any): value is ConnectionOptions; +} +export interface MessageConnection { + sendRequest(type: RequestType0, token?: CancellationToken): Promise; + sendRequest(type: RequestType, params: NoInfer>, token?: CancellationToken): Promise; + sendRequest(type: RequestType1, p1: NoInfer>, token?: CancellationToken): Promise; + sendRequest(type: RequestType2, p1: NoInfer>, p2: NoInfer>, token?: CancellationToken): Promise; + sendRequest(type: RequestType3, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, token?: CancellationToken): Promise; + sendRequest(type: RequestType4, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, token?: CancellationToken): Promise; + sendRequest(type: RequestType5, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, p5: NoInfer>, token?: CancellationToken): Promise; + sendRequest(type: RequestType6, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, p5: NoInfer>, p6: NoInfer>, token?: CancellationToken): Promise; + sendRequest(type: RequestType7, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, p5: NoInfer>, p6: NoInfer>, p7: NoInfer>, token?: CancellationToken): Promise; + sendRequest(type: RequestType8, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, p5: NoInfer>, p6: NoInfer>, p7: NoInfer>, p8: NoInfer>, token?: CancellationToken): Promise; + sendRequest(type: RequestType9, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, p5: NoInfer>, p6: NoInfer>, p7: NoInfer>, p8: NoInfer>, p9: NoInfer>, token?: CancellationToken): Promise; + sendRequest(method: string, r0?: ParameterStructures | any, ...rest: any[]): Promise; + onRequest(type: RequestType0, handler: NoInfer>): Disposable; + onRequest(type: RequestType, handler: NoInfer>): Disposable; + onRequest(type: RequestType1, handler: NoInfer>): Disposable; + onRequest(type: RequestType2, handler: NoInfer>): Disposable; + onRequest(type: RequestType3, handler: NoInfer>): Disposable; + onRequest(type: RequestType4, handler: NoInfer>): Disposable; + onRequest(type: RequestType5, handler: NoInfer>): Disposable; + onRequest(type: RequestType6, handler: NoInfer>): Disposable; + onRequest(type: RequestType7, handler: NoInfer>): Disposable; + onRequest(type: RequestType8, handler: NoInfer>): Disposable; + onRequest(type: RequestType9, handler: NoInfer>): Disposable; + onRequest(method: string, handler: GenericRequestHandler): Disposable; + onRequest(handler: StarRequestHandler): Disposable; + hasPendingResponse(): boolean; + sendNotification(type: NotificationType0): Promise; + sendNotification

(type: NotificationType

, params?: NoInfer>): Promise; + sendNotification(type: NotificationType1, p1: NoInfer>): Promise; + sendNotification(type: NotificationType2, p1: NoInfer>, p2: NoInfer>): Promise; + sendNotification(type: NotificationType3, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>): Promise; + sendNotification(type: NotificationType4, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>): Promise; + sendNotification(type: NotificationType5, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, p5: NoInfer>): Promise; + sendNotification(type: NotificationType6, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, p5: NoInfer>, p6: NoInfer>): Promise; + sendNotification(type: NotificationType7, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, p5: NoInfer>, p6: NoInfer>, p7: NoInfer>): Promise; + sendNotification(type: NotificationType8, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, p5: NoInfer>, p6: NoInfer>, p7: NoInfer>, p8: NoInfer>): Promise; + sendNotification(type: NotificationType9, p1: NoInfer>, p2: NoInfer>, p3: NoInfer>, p4: NoInfer>, p5: NoInfer>, p6: NoInfer>, p7: NoInfer>, p8: NoInfer>, p9: NoInfer>): Promise; + sendNotification(method: string, r0?: ParameterStructures | any, ...rest: any[]): Promise; + onNotification(type: NotificationType0, handler: NotificationHandler0): Disposable; + onNotification

(type: NotificationType

, handler: NoInfer>): Disposable; + onNotification(type: NotificationType1, handler: NoInfer>): Disposable; + onNotification(type: NotificationType2, handler: NoInfer>): Disposable; + onNotification(type: NotificationType3, handler: NoInfer>): Disposable; + onNotification(type: NotificationType4, handler: NoInfer>): Disposable; + onNotification(type: NotificationType5, handler: NoInfer>): Disposable; + onNotification(type: NotificationType6, handler: NoInfer>): Disposable; + onNotification(type: NotificationType7, handler: NoInfer>): Disposable; + onNotification(type: NotificationType8, handler: NoInfer>): Disposable; + onNotification(type: NotificationType9, handler: NoInfer>): Disposable; + onNotification(method: string, handler: GenericNotificationHandler): Disposable; + onNotification(handler: StarNotificationHandler): Disposable; + onUnhandledNotification: Event; + onProgress

(type: ProgressType

, token: string | number, handler: NoInfer>): Disposable; + sendProgress

(type: ProgressType

, token: string | number, value: NoInfer>): Promise; + onUnhandledProgress: Event>; + trace(value: Trace, tracer: Tracer, sendNotification?: boolean): Promise; + trace(value: Trace, tracer: Tracer, traceOptions?: TraceOptions): Promise; + onError: Event<[Error, Message | undefined, number | undefined]>; + onClose: Event; + listen(): void; + end(): void; + onDispose: Event; + dispose(): void; + inspect(): void; +} +export declare function createMessageConnection(messageReader: MessageReader, messageWriter: MessageWriter, _logger?: Logger, options?: ConnectionOptions): MessageConnection; +export {}; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.js new file mode 100644 index 0000000..7ea47c6 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/connection.js @@ -0,0 +1,1271 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +/// +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ConnectionOptions = exports.MessageStrategy = exports.CancellationStrategy = exports.CancellationSenderStrategy = exports.CancellationReceiverStrategy = exports.RequestCancellationReceiverStrategy = exports.IdCancellationReceiverStrategy = exports.ConnectionStrategy = exports.ConnectionError = exports.ConnectionErrors = exports.LogTraceNotification = exports.SetTraceNotification = exports.TraceFormat = exports.TraceValues = exports.TraceValue = exports.Trace = exports.NullLogger = exports.ProgressType = exports.ProgressToken = void 0; +exports.createMessageConnection = createMessageConnection; +const ral_1 = __importDefault(require("./ral")); +const Is = __importStar(require("./is")); +const messages_1 = require("./messages"); +const linkedMap_1 = require("./linkedMap"); +const events_1 = require("./events"); +const cancellation_1 = require("./cancellation"); +var CancelNotification; +(function (CancelNotification) { + CancelNotification.type = new messages_1.NotificationType('$/cancelRequest'); +})(CancelNotification || (CancelNotification = {})); +var ProgressToken; +(function (ProgressToken) { + function is(value) { + return typeof value === 'string' || typeof value === 'number'; + } + ProgressToken.is = is; +})(ProgressToken || (exports.ProgressToken = ProgressToken = {})); +var ProgressNotification; +(function (ProgressNotification) { + ProgressNotification.type = new messages_1.NotificationType('$/progress'); +})(ProgressNotification || (ProgressNotification = {})); +class ProgressType { + /** + * Clients must not use these properties. They are here to ensure correct typing. + * in TypeScript + */ + __; + _pr; + constructor() { + } +} +exports.ProgressType = ProgressType; +var StarRequestHandler; +(function (StarRequestHandler) { + function is(value) { + return Is.func(value); + } + StarRequestHandler.is = is; +})(StarRequestHandler || (StarRequestHandler = {})); +exports.NullLogger = Object.freeze({ + error: () => { }, + warn: () => { }, + info: () => { }, + log: () => { } +}); +var Trace; +(function (Trace) { + Trace[Trace["Off"] = 0] = "Off"; + Trace[Trace["Messages"] = 1] = "Messages"; + Trace[Trace["Compact"] = 2] = "Compact"; + Trace[Trace["Verbose"] = 3] = "Verbose"; +})(Trace || (exports.Trace = Trace = {})); +var TraceValue; +(function (TraceValue) { + /** + * Turn tracing off. + */ + TraceValue.Off = 'off'; + /** + * Trace messages only. + */ + TraceValue.Messages = 'messages'; + /** + * Compact message tracing. + */ + TraceValue.Compact = 'compact'; + /** + * Verbose message tracing. + */ + TraceValue.Verbose = 'verbose'; +})(TraceValue || (exports.TraceValue = TraceValue = {})); +/** + * @deprecated Use TraceValue instead + */ +exports.TraceValues = TraceValue; +(function (Trace) { + function fromString(value) { + if (!Is.string(value)) { + return Trace.Off; + } + value = value.toLowerCase(); + switch (value) { + case 'off': + return Trace.Off; + case 'messages': + return Trace.Messages; + case 'compact': + return Trace.Compact; + case 'verbose': + return Trace.Verbose; + default: + return Trace.Off; + } + } + Trace.fromString = fromString; + function toString(value) { + switch (value) { + case Trace.Off: + return 'off'; + case Trace.Messages: + return 'messages'; + case Trace.Compact: + return 'compact'; + case Trace.Verbose: + return 'verbose'; + default: + return 'off'; + } + } + Trace.toString = toString; +})(Trace || (exports.Trace = Trace = {})); +var TraceFormat; +(function (TraceFormat) { + TraceFormat["Text"] = "text"; + TraceFormat["JSON"] = "json"; +})(TraceFormat || (exports.TraceFormat = TraceFormat = {})); +(function (TraceFormat) { + function fromString(value) { + if (!Is.string(value)) { + return TraceFormat.Text; + } + value = value.toLowerCase(); + if (value === 'json') { + return TraceFormat.JSON; + } + else { + return TraceFormat.Text; + } + } + TraceFormat.fromString = fromString; +})(TraceFormat || (exports.TraceFormat = TraceFormat = {})); +var SetTraceNotification; +(function (SetTraceNotification) { + SetTraceNotification.type = new messages_1.NotificationType('$/setTrace'); +})(SetTraceNotification || (exports.SetTraceNotification = SetTraceNotification = {})); +var LogTraceNotification; +(function (LogTraceNotification) { + LogTraceNotification.type = new messages_1.NotificationType('$/logTrace'); +})(LogTraceNotification || (exports.LogTraceNotification = LogTraceNotification = {})); +var ConnectionErrors; +(function (ConnectionErrors) { + /** + * The connection is closed. + */ + ConnectionErrors[ConnectionErrors["Closed"] = 1] = "Closed"; + /** + * The connection got disposed. + */ + ConnectionErrors[ConnectionErrors["Disposed"] = 2] = "Disposed"; + /** + * The connection is already in listening mode. + */ + ConnectionErrors[ConnectionErrors["AlreadyListening"] = 3] = "AlreadyListening"; +})(ConnectionErrors || (exports.ConnectionErrors = ConnectionErrors = {})); +class ConnectionError extends Error { + code; + constructor(code, message) { + super(message); + this.code = code; + Object.setPrototypeOf(this, ConnectionError.prototype); + } +} +exports.ConnectionError = ConnectionError; +var ConnectionStrategy; +(function (ConnectionStrategy) { + function is(value) { + const candidate = value; + return candidate && Is.func(candidate.cancelUndispatched); + } + ConnectionStrategy.is = is; +})(ConnectionStrategy || (exports.ConnectionStrategy = ConnectionStrategy = {})); +var IdCancellationReceiverStrategy; +(function (IdCancellationReceiverStrategy) { + function is(value) { + const candidate = value; + return candidate && (candidate.kind === undefined || candidate.kind === 'id') && Is.func(candidate.createCancellationTokenSource) && (candidate.dispose === undefined || Is.func(candidate.dispose)); + } + IdCancellationReceiverStrategy.is = is; +})(IdCancellationReceiverStrategy || (exports.IdCancellationReceiverStrategy = IdCancellationReceiverStrategy = {})); +var RequestCancellationReceiverStrategy; +(function (RequestCancellationReceiverStrategy) { + function is(value) { + const candidate = value; + return candidate && candidate.kind === 'request' && Is.func(candidate.createCancellationTokenSource) && (candidate.dispose === undefined || Is.func(candidate.dispose)); + } + RequestCancellationReceiverStrategy.is = is; +})(RequestCancellationReceiverStrategy || (exports.RequestCancellationReceiverStrategy = RequestCancellationReceiverStrategy = {})); +var CancellationReceiverStrategy; +(function (CancellationReceiverStrategy) { + CancellationReceiverStrategy.Message = Object.freeze({ + createCancellationTokenSource(_) { + return new cancellation_1.CancellationTokenSource(); + } + }); + function is(value) { + return IdCancellationReceiverStrategy.is(value) || RequestCancellationReceiverStrategy.is(value); + } + CancellationReceiverStrategy.is = is; +})(CancellationReceiverStrategy || (exports.CancellationReceiverStrategy = CancellationReceiverStrategy = {})); +var CancellationSenderStrategy; +(function (CancellationSenderStrategy) { + CancellationSenderStrategy.Message = Object.freeze({ + sendCancellation(conn, id) { + return conn.sendNotification(CancelNotification.type, { id }); + }, + cleanup(_) { } + }); + function is(value) { + const candidate = value; + return candidate && Is.func(candidate.sendCancellation) && Is.func(candidate.cleanup); + } + CancellationSenderStrategy.is = is; +})(CancellationSenderStrategy || (exports.CancellationSenderStrategy = CancellationSenderStrategy = {})); +var CancellationStrategy; +(function (CancellationStrategy) { + CancellationStrategy.Message = Object.freeze({ + receiver: CancellationReceiverStrategy.Message, + sender: CancellationSenderStrategy.Message + }); + function is(value) { + const candidate = value; + return candidate && CancellationReceiverStrategy.is(candidate.receiver) && CancellationSenderStrategy.is(candidate.sender); + } + CancellationStrategy.is = is; +})(CancellationStrategy || (exports.CancellationStrategy = CancellationStrategy = {})); +var MessageStrategy; +(function (MessageStrategy) { + function is(value) { + const candidate = value; + return candidate && Is.func(candidate.handleMessage); + } + MessageStrategy.is = is; +})(MessageStrategy || (exports.MessageStrategy = MessageStrategy = {})); +var ConnectionOptions; +(function (ConnectionOptions) { + function is(value) { + const candidate = value; + return candidate + && (CancellationStrategy.is(candidate.cancellationStrategy) || ConnectionStrategy.is(candidate.connectionStrategy) || MessageStrategy.is(candidate.messageStrategy) || Is.number(candidate.maxParallelism)); + } + ConnectionOptions.is = is; +})(ConnectionOptions || (exports.ConnectionOptions = ConnectionOptions = {})); +var ConnectionState; +(function (ConnectionState) { + ConnectionState[ConnectionState["New"] = 1] = "New"; + ConnectionState[ConnectionState["Listening"] = 2] = "Listening"; + ConnectionState[ConnectionState["Closed"] = 3] = "Closed"; + ConnectionState[ConnectionState["Disposed"] = 4] = "Disposed"; +})(ConnectionState || (ConnectionState = {})); +function createMessageConnection(messageReader, messageWriter, _logger, options) { + const logger = _logger !== undefined ? _logger : exports.NullLogger; + let sequenceNumber = 0; + let notificationSequenceNumber = 0; + let unknownResponseSequenceNumber = 0; + const version = '2.0'; + const maxParallelism = options?.maxParallelism ?? -1; + let inFlight = 0; + let starRequestHandler = undefined; + const requestHandlers = new Map(); + let starNotificationHandler = undefined; + const notificationHandlers = new Map(); + const progressHandlers = new Map(); + let timer; + let messageQueue = new linkedMap_1.LinkedMap(); + let responsePromises = new Map(); + let knownCanceledRequests = new Set(); + let requestTokens = new Map(); + let trace = Trace.Off; + let traceFormat = TraceFormat.Text; + let tracer; + let state = ConnectionState.New; + const errorEmitter = new events_1.Emitter(); + const closeEmitter = new events_1.Emitter(); + const unhandledNotificationEmitter = new events_1.Emitter(); + const unhandledProgressEmitter = new events_1.Emitter(); + const disposeEmitter = new events_1.Emitter(); + const cancellationStrategy = (options && options.cancellationStrategy) ? options.cancellationStrategy : CancellationStrategy.Message; + function cancelUndispatched(_message) { + return undefined; + } + function isListening() { + return state === ConnectionState.Listening; + } + function isClosed() { + return state === ConnectionState.Closed; + } + function isDisposed() { + return state === ConnectionState.Disposed; + } + function closeHandler() { + if (state === ConnectionState.New || state === ConnectionState.Listening) { + state = ConnectionState.Closed; + closeEmitter.fire(undefined); + } + // If the connection is disposed don't sent close events. + } + function readErrorHandler(error) { + errorEmitter.fire([error, undefined, undefined]); + } + function writeErrorHandler(data) { + errorEmitter.fire(data); + } + messageReader.onClose(closeHandler); + messageReader.onError(readErrorHandler); + messageWriter.onClose(closeHandler); + messageWriter.onError(writeErrorHandler); + function createRequestQueueKey(id) { + if (id === null) { + throw new Error(`Can't send requests with id null since the response can't be correlated.`); + } + return 'req-' + id.toString(); + } + function createResponseQueueKey(id) { + if (id === null) { + return 'res-unknown-' + (++unknownResponseSequenceNumber).toString(); + } + else { + return 'res-' + id.toString(); + } + } + function createNotificationQueueKey() { + return 'not-' + (++notificationSequenceNumber).toString(); + } + function addMessageToQueue(queue, message) { + if (messages_1.Message.isRequest(message)) { + queue.set(createRequestQueueKey(message.id), message); + } + else if (messages_1.Message.isResponse(message)) { + // If we have unlimited parallelism we queue the response to keep + // the previous semantics. + if (maxParallelism === -1) { + queue.set(createResponseQueueKey(message.id), message); + } + else { + // If we have limited parallelism we resolve responses to avoid + // dead locks. + handleResponse(message); + } + } + else { + queue.set(createNotificationQueueKey(), message); + } + } + function triggerMessageQueue() { + if (timer || messageQueue.size === 0) { + return; + } + if (maxParallelism !== -1 && inFlight >= maxParallelism) { + return; + } + timer = (0, ral_1.default)().timer.setImmediate(async () => { + timer = undefined; + if (messageQueue.size === 0) { + return; + } + if (maxParallelism !== -1 && inFlight >= maxParallelism) { + return; + } + const message = messageQueue.shift(); + let result; + try { + inFlight++; + const messageStrategy = options?.messageStrategy; + if (MessageStrategy.is(messageStrategy)) { + result = messageStrategy.handleMessage(message, handleMessage); + } + else { + result = handleMessage(message); + } + } + catch (error) { + logger.error(`Processing message queue failed: ${error.toString()}`); + } + finally { + if (result instanceof Promise) { + result.then(() => { + inFlight--; + triggerMessageQueue(); + }).catch((error) => { + logger.error(`Processing message queue failed: ${error.toString()}`); + }); + } + else { + inFlight--; + } + triggerMessageQueue(); + } + }); + } + async function handleMessage(message) { + if (messages_1.Message.isRequest(message)) { + return handleRequest(message); + } + else if (messages_1.Message.isNotification(message)) { + return handleNotification(message); + } + else if (messages_1.Message.isResponse(message)) { + return handleResponse(message); + } + else { + return handleInvalidMessage(message); + } + } + const callback = (message) => { + try { + // We have received a cancellation message. Check if the message is still in the queue + // and cancel it if allowed to do so. + if (messages_1.Message.isNotification(message) && message.method === CancelNotification.type.method) { + const cancelId = message.params.id; + const key = createRequestQueueKey(cancelId); + const toCancel = messageQueue.get(key); + if (messages_1.Message.isRequest(toCancel)) { + const strategy = options?.connectionStrategy; + const response = (strategy && strategy.cancelUndispatched) ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : cancelUndispatched(toCancel); + if (response && (response.error !== undefined || response.result !== undefined)) { + messageQueue.delete(key); + requestTokens.delete(cancelId); + response.id = toCancel.id; + traceSendingResponse(response, message.method, Date.now()); + messageWriter.write(response).catch(() => logger.error(`Sending response for canceled message failed.`)); + return; + } + } + const cancellationToken = requestTokens.get(cancelId); + // The request is already running. Cancel the token + if (cancellationToken !== undefined) { + cancellationToken.cancel(); + traceReceivedNotification(message); + return; + } + else { + // Remember the cancel but still queue the message to + // clean up state in process message. + knownCanceledRequests.add(cancelId); + } + } + addMessageToQueue(messageQueue, message); + } + finally { + triggerMessageQueue(); + } + }; + async function handleRequest(requestMessage) { + if (isDisposed()) { + // we return here silently since we fired an event when the + // connection got disposed. + return Promise.resolve(); + } + function reply(resultOrError, method, startTime) { + const message = { + jsonrpc: version, + id: requestMessage.id + }; + if (resultOrError instanceof messages_1.ResponseError) { + message.error = resultOrError.toJson(); + } + else { + message.result = resultOrError === undefined ? null : resultOrError; + } + traceSendingResponse(message, method, startTime); + return messageWriter.write(message); + } + function replyError(error, method, startTime) { + const message = { + jsonrpc: version, + id: requestMessage.id, + error: error.toJson() + }; + traceSendingResponse(message, method, startTime); + return messageWriter.write(message); + } + traceReceivedRequest(requestMessage); + const element = requestHandlers.get(requestMessage.method); + let type; + let requestHandler; + if (element) { + type = element.type; + requestHandler = element.handler; + } + const startTime = Date.now(); + if (requestHandler || starRequestHandler) { + const tokenKey = requestMessage.id ?? String(Date.now()); // + const cancellationSource = IdCancellationReceiverStrategy.is(cancellationStrategy.receiver) + ? cancellationStrategy.receiver.createCancellationTokenSource(tokenKey) + : cancellationStrategy.receiver.createCancellationTokenSource(requestMessage); + if (requestMessage.id !== null && knownCanceledRequests.has(requestMessage.id)) { + cancellationSource.cancel(); + } + if (requestMessage.id !== null) { + requestTokens.set(tokenKey, cancellationSource); + } + try { + let handlerResult; + if (requestHandler) { + if (requestMessage.params === undefined) { + if (type !== undefined && type.numberOfParams !== 0) { + return replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines ${type.numberOfParams} params but received none.`), requestMessage.method, startTime); + } + handlerResult = requestHandler(cancellationSource.token); + } + else if (Array.isArray(requestMessage.params)) { + if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byName) { + return replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines parameters by name but received parameters by position`), requestMessage.method, startTime); + } + handlerResult = requestHandler(...requestMessage.params, cancellationSource.token); + } + else { + if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byPosition) { + return replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines parameters by position but received parameters by name`), requestMessage.method, startTime); + } + handlerResult = requestHandler(requestMessage.params, cancellationSource.token); + } + } + else if (starRequestHandler) { + handlerResult = starRequestHandler(requestMessage.method, requestMessage.params, cancellationSource.token); + } + const resultOrError = await handlerResult; + await reply(resultOrError, requestMessage.method, startTime); + } + catch (error) { + if (error instanceof messages_1.ResponseError) { + await reply(error, requestMessage.method, startTime); + } + else if (error && Is.string(error.message)) { + await replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime); + } + else { + await replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime); + } + } + finally { + requestTokens.delete(tokenKey); + } + } + else { + await replyError(new messages_1.ResponseError(messages_1.ErrorCodes.MethodNotFound, `Unhandled method ${requestMessage.method}`), requestMessage.method, startTime); + } + } + function handleResponse(responseMessage) { + if (isDisposed()) { + // See handle request. + return; + } + if (responseMessage.id === null) { + if (responseMessage.error) { + logger.error(`Received response message without id: Error is: \n${JSON.stringify(responseMessage.error, undefined, 4)}`); + } + else { + logger.error(`Received response message without id. No further error information provided.`); + } + } + else { + const key = responseMessage.id; + const responsePromise = responsePromises.get(key); + traceReceivedResponse(responseMessage, responsePromise); + if (responsePromise !== undefined) { + responsePromises.delete(key); + try { + if (responseMessage.error) { + const error = responseMessage.error; + responsePromise.reject(new messages_1.ResponseError(error.code, error.message, error.data)); + } + else if (responseMessage.result !== undefined) { + responsePromise.resolve(responseMessage.result); + } + else { + throw new Error('Should never happen.'); + } + } + catch (error) { + if (error.message) { + logger.error(`Response handler '${responsePromise.method}' failed with message: ${error.message}`); + } + else { + logger.error(`Response handler '${responsePromise.method}' failed unexpectedly.`); + } + } + } + } + } + async function handleNotification(message) { + if (isDisposed()) { + // See handle request. + return; + } + let type = undefined; + let notificationHandler; + if (message.method === CancelNotification.type.method) { + const cancelId = message.params.id; + knownCanceledRequests.delete(cancelId); + traceReceivedNotification(message); + return; + } + else { + const element = notificationHandlers.get(message.method); + if (element) { + notificationHandler = element.handler; + type = element.type; + } + } + if (notificationHandler || starNotificationHandler) { + try { + traceReceivedNotification(message); + if (notificationHandler) { + if (message.params === undefined) { + if (type !== undefined) { + if (type.numberOfParams !== 0 && type.parameterStructures !== messages_1.ParameterStructures.byName) { + logger.error(`Notification ${message.method} defines ${type.numberOfParams} params but received none.`); + } + } + await notificationHandler(); + } + else if (Array.isArray(message.params)) { + // There are JSON-RPC libraries that send progress message as positional params although + // specified as named. So convert them if this is the case. + const params = message.params; + if (message.method === ProgressNotification.type.method && params.length === 2 && ProgressToken.is(params[0])) { + await notificationHandler({ token: params[0], value: params[1] }); + } + else { + if (type !== undefined) { + if (type.parameterStructures === messages_1.ParameterStructures.byName) { + logger.error(`Notification ${message.method} defines parameters by name but received parameters by position`); + } + if (type.numberOfParams !== message.params.length) { + logger.error(`Notification ${message.method} defines ${type.numberOfParams} params but received ${params.length} arguments`); + } + } + await notificationHandler(...params); + } + } + else { + if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byPosition) { + logger.error(`Notification ${message.method} defines parameters by position but received parameters by name`); + } + await notificationHandler(message.params); + } + } + else if (starNotificationHandler) { + await starNotificationHandler(message.method, message.params); + } + } + catch (error) { + if (error.message) { + logger.error(`Notification handler '${message.method}' failed with message: ${error.message}`); + } + else { + logger.error(`Notification handler '${message.method}' failed unexpectedly.`); + } + } + } + else { + unhandledNotificationEmitter.fire(message); + } + } + function handleInvalidMessage(message) { + if (!message) { + logger.error('Received empty message.'); + return; + } + logger.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(message, null, 4)}`); + // Test whether we find an id to reject the promise + const responseMessage = message; + if (Is.string(responseMessage.id) || Is.number(responseMessage.id)) { + const key = responseMessage.id; + const responseHandler = responsePromises.get(key); + if (responseHandler) { + responseHandler.reject(new Error('The received response has neither a result nor an error property.')); + } + } + } + function stringifyTrace(params) { + if (params === undefined || params === null) { + return undefined; + } + switch (trace) { + case Trace.Verbose: + return JSON.stringify(params, null, 4); + case Trace.Compact: + return JSON.stringify(params); + default: + return undefined; + } + } + function traceSendingRequest(message) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if ((trace === Trace.Verbose || trace === Trace.Compact) && message.params) { + data = `Params: ${stringifyTrace(message.params)}`; + } + tracer.log(`Sending request '${message.method} - (${message.id})'.`, data); + } + else { + logLSPMessage('send-request', message); + } + } + function traceSendingNotification(message) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if (trace === Trace.Verbose || trace === Trace.Compact) { + if (message.params) { + data = `Params: ${stringifyTrace(message.params)}`; + } + else { + data = 'No parameters provided.'; + } + } + tracer.log(`Sending notification '${message.method}'.`, data); + } + else { + logLSPMessage('send-notification', message); + } + } + function traceSendingResponse(message, method, startTime) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if (trace === Trace.Verbose || trace === Trace.Compact) { + if (message.error && message.error.data) { + data = `Error data: ${stringifyTrace(message.error.data)}`; + } + else { + if (message.result) { + data = `Result: ${stringifyTrace(message.result)}`; + } + else if (message.error === undefined) { + data = 'No result returned.'; + } + } + } + tracer.log(`Sending response '${method} - (${message.id})'. Processing request took ${Date.now() - startTime}ms`, data); + } + else { + logLSPMessage('send-response', message); + } + } + function traceReceivedRequest(message) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if ((trace === Trace.Verbose || trace === Trace.Compact) && message.params) { + data = `Params: ${stringifyTrace(message.params)}`; + } + tracer.log(`Received request '${message.method} - (${message.id})'.`, data); + } + else { + logLSPMessage('receive-request', message); + } + } + function traceReceivedNotification(message) { + if (trace === Trace.Off || !tracer || message.method === LogTraceNotification.type.method) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if (trace === Trace.Verbose || trace === Trace.Compact) { + if (message.params) { + data = `Params: ${stringifyTrace(message.params)}`; + } + else { + data = 'No parameters provided.'; + } + } + tracer.log(`Received notification '${message.method}'.`, data); + } + else { + logLSPMessage('receive-notification', message); + } + } + function traceReceivedResponse(message, responsePromise) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if (trace === Trace.Verbose || trace === Trace.Compact) { + if (message.error && message.error.data) { + data = `Error data: ${stringifyTrace(message.error.data)}`; + } + else { + if (message.result) { + data = `Result: ${stringifyTrace(message.result)}`; + } + else if (message.error === undefined) { + data = 'No result returned.'; + } + } + } + if (responsePromise) { + const error = message.error ? ` Request failed: ${message.error.message} (${message.error.code}).` : ''; + tracer.log(`Received response '${responsePromise.method} - (${message.id})' in ${Date.now() - responsePromise.timerStart}ms.${error}`, data); + } + else { + tracer.log(`Received response ${message.id} without active response promise.`, data); + } + } + else { + logLSPMessage('receive-response', message); + } + } + function logLSPMessage(type, message) { + if (!tracer || trace === Trace.Off) { + return; + } + const lspMessage = { + isLSPMessage: true, + type, + message, + timestamp: Date.now() + }; + tracer.log(lspMessage); + } + function throwIfClosedOrDisposed() { + if (isClosed()) { + throw new ConnectionError(ConnectionErrors.Closed, 'Connection is closed.'); + } + if (isDisposed()) { + throw new ConnectionError(ConnectionErrors.Disposed, 'Connection is disposed.'); + } + } + function throwIfListening() { + if (isListening()) { + throw new ConnectionError(ConnectionErrors.AlreadyListening, 'Connection is already listening'); + } + } + function throwIfNotListening() { + if (!isListening()) { + throw new Error('Call listen() first.'); + } + } + function undefinedToNull(param) { + if (param === undefined) { + return null; + } + else { + return param; + } + } + function nullToUndefined(param) { + if (param === null) { + return undefined; + } + else { + return param; + } + } + function isNamedParam(param) { + return param !== undefined && param !== null && !Array.isArray(param) && typeof param === 'object'; + } + function computeSingleParam(parameterStructures, param) { + switch (parameterStructures) { + case messages_1.ParameterStructures.auto: + if (isNamedParam(param)) { + return nullToUndefined(param); + } + else { + return [undefinedToNull(param)]; + } + case messages_1.ParameterStructures.byName: + if (!isNamedParam(param)) { + throw new Error(`Received parameters by name but param is not an object literal.`); + } + return nullToUndefined(param); + case messages_1.ParameterStructures.byPosition: + return [undefinedToNull(param)]; + default: + throw new Error(`Unknown parameter structure ${parameterStructures.toString()}`); + } + } + function computeMessageParams(type, params) { + let result; + const numberOfParams = type.numberOfParams; + switch (numberOfParams) { + case 0: + result = undefined; + break; + case 1: + result = computeSingleParam(type.parameterStructures, params[0]); + break; + default: + result = []; + for (let i = 0; i < params.length && i < numberOfParams; i++) { + result.push(undefinedToNull(params[i])); + } + if (params.length < numberOfParams) { + for (let i = params.length; i < numberOfParams; i++) { + result.push(null); + } + } + break; + } + return result; + } + const connection = { + sendNotification: (type, ...args) => { + throwIfClosedOrDisposed(); + let method; + let messageParams; + if (Is.string(type)) { + method = type; + const first = args[0]; + let paramStart = 0; + let parameterStructures = messages_1.ParameterStructures.auto; + if (messages_1.ParameterStructures.is(first)) { + paramStart = 1; + parameterStructures = first; + } + const paramEnd = args.length; + const numberOfParams = paramEnd - paramStart; + switch (numberOfParams) { + case 0: + messageParams = undefined; + break; + case 1: + messageParams = computeSingleParam(parameterStructures, args[paramStart]); + break; + default: + if (parameterStructures === messages_1.ParameterStructures.byName) { + throw new Error(`Received ${numberOfParams} parameters for 'by Name' notification parameter structure.`); + } + messageParams = args.slice(paramStart, paramEnd).map(value => undefinedToNull(value)); + break; + } + } + else { + const params = args; + method = type.method; + messageParams = computeMessageParams(type, params); + } + const notificationMessage = { + jsonrpc: version, + method: method, + params: messageParams + }; + traceSendingNotification(notificationMessage); + return messageWriter.write(notificationMessage).catch((error) => { + logger.error(`Sending notification failed.`); + throw error; + }); + }, + onNotification: (type, handler) => { + throwIfClosedOrDisposed(); + let method; + if (Is.func(type)) { + starNotificationHandler = type; + } + else if (handler) { + if (Is.string(type)) { + method = type; + notificationHandlers.set(type, { type: undefined, handler }); + } + else { + method = type.method; + notificationHandlers.set(type.method, { type, handler }); + } + } + return { + dispose: () => { + if (method !== undefined) { + if (notificationHandlers.get(method)?.handler === handler) { + notificationHandlers.delete(method); + } + } + else if (starNotificationHandler === type) { + starNotificationHandler = undefined; + } + } + }; + }, + onProgress: (_type, token, handler) => { + if (progressHandlers.has(token)) { + throw new Error(`Progress handler for token ${token} already registered`); + } + progressHandlers.set(token, handler); + return { + dispose: () => { + if (progressHandlers.get(token) === handler) { + progressHandlers.delete(token); + } + } + }; + }, + sendProgress: (_type, token, value) => { + // This should not await but simple return to ensure that we don't have another + // async scheduling. Otherwise one send could overtake another send. + return connection.sendNotification(ProgressNotification.type, { token, value }); + }, + onUnhandledProgress: unhandledProgressEmitter.event, + sendRequest: (type, ...args) => { + throwIfClosedOrDisposed(); + throwIfNotListening(); + function sendCancellation(connection, id) { + const p = cancellationStrategy.sender.sendCancellation(connection, id); + if (p === undefined) { + logger.log(`Received no promise from cancellation strategy when cancelling id ${id}`); + } + else { + p.catch(() => { + logger.log(`Sending cancellation messages for id ${id} failed.`); + }); + } + } + let method; + let messageParams; + let token = undefined; + if (Is.string(type)) { + method = type; + const first = args[0]; + const last = args[args.length - 1]; + let paramStart = 0; + let parameterStructures = messages_1.ParameterStructures.auto; + if (messages_1.ParameterStructures.is(first)) { + paramStart = 1; + parameterStructures = first; + } + let paramEnd = args.length; + if (cancellation_1.CancellationToken.is(last)) { + paramEnd = paramEnd - 1; + token = last; + } + const numberOfParams = paramEnd - paramStart; + switch (numberOfParams) { + case 0: + messageParams = undefined; + break; + case 1: + messageParams = computeSingleParam(parameterStructures, args[paramStart]); + break; + default: + if (parameterStructures === messages_1.ParameterStructures.byName) { + throw new Error(`Received ${numberOfParams} parameters for 'by Name' request parameter structure.`); + } + messageParams = args.slice(paramStart, paramEnd).map(value => undefinedToNull(value)); + break; + } + } + else { + const params = args; + method = type.method; + messageParams = computeMessageParams(type, params); + const numberOfParams = type.numberOfParams; + token = cancellation_1.CancellationToken.is(params[numberOfParams]) ? params[numberOfParams] : undefined; + } + const id = sequenceNumber++; + let disposable; + let tokenWasCancelled = false; + if (token !== undefined) { + if (token.isCancellationRequested) { + tokenWasCancelled = true; + } + else { + disposable = token.onCancellationRequested(() => { + sendCancellation(connection, id); + }); + } + } + const requestMessage = { + jsonrpc: version, + id: id, + method: method, + params: messageParams + }; + traceSendingRequest(requestMessage); + if (typeof cancellationStrategy.sender.enableCancellation === 'function') { + cancellationStrategy.sender.enableCancellation(requestMessage); + } + // eslint-disable-next-line no-async-promise-executor + return new Promise(async (resolve, reject) => { + const resolveWithCleanup = (r) => { + resolve(r); + cancellationStrategy.sender.cleanup(id); + disposable?.dispose(); + }; + const rejectWithCleanup = (r) => { + reject(r); + cancellationStrategy.sender.cleanup(id); + disposable?.dispose(); + }; + const responsePromise = { method: method, timerStart: Date.now(), resolve: resolveWithCleanup, reject: rejectWithCleanup }; + try { + responsePromises.set(id, responsePromise); + await messageWriter.write(requestMessage); + if (tokenWasCancelled) { + sendCancellation(connection, id); + } + } + catch (error) { + // Writing the message failed. So we need to delete it from the response promises and + // reject it. + responsePromises.delete(id); + responsePromise.reject(new messages_1.ResponseError(messages_1.ErrorCodes.MessageWriteError, error.message ? error.message : 'Unknown reason')); + logger.error(`Sending request failed.`); + throw error; + } + }); + }, + onRequest: (type, handler) => { + throwIfClosedOrDisposed(); + let method = null; + if (StarRequestHandler.is(type)) { + method = undefined; + starRequestHandler = type; + } + else if (Is.string(type)) { + method = null; + if (handler !== undefined) { + method = type; + requestHandlers.set(type, { handler: handler, type: undefined }); + } + } + else { + if (handler !== undefined) { + method = type.method; + requestHandlers.set(type.method, { type, handler }); + } + } + return { + dispose: () => { + if (method === null) { + return; + } + if (method !== undefined) { + if (requestHandlers.get(method)?.handler === handler) { + requestHandlers.delete(method); + } + } + else if (starRequestHandler === type) { + starRequestHandler = undefined; + } + } + }; + }, + hasPendingResponse: () => { + return responsePromises.size > 0; + }, + trace: async (_value, _tracer, sendNotificationOrTraceOptions) => { + let _sendNotification = false; + let _traceFormat = TraceFormat.Text; + if (sendNotificationOrTraceOptions !== undefined) { + if (Is.boolean(sendNotificationOrTraceOptions)) { + _sendNotification = sendNotificationOrTraceOptions; + } + else { + _sendNotification = sendNotificationOrTraceOptions.sendNotification || false; + _traceFormat = sendNotificationOrTraceOptions.traceFormat || TraceFormat.Text; + } + } + trace = _value; + traceFormat = _traceFormat; + if (trace === Trace.Off) { + tracer = undefined; + } + else { + tracer = _tracer; + } + if (_sendNotification && !isClosed() && !isDisposed()) { + await connection.sendNotification(SetTraceNotification.type, { value: Trace.toString(_value) }); + } + }, + onError: errorEmitter.event, + onClose: closeEmitter.event, + onUnhandledNotification: unhandledNotificationEmitter.event, + onDispose: disposeEmitter.event, + end: () => { + messageWriter.end(); + }, + dispose: () => { + if (isDisposed()) { + return; + } + state = ConnectionState.Disposed; + disposeEmitter.fire(undefined); + const error = new messages_1.ResponseError(messages_1.ErrorCodes.PendingResponseRejected, 'Pending response rejected since connection got disposed'); + for (const promise of responsePromises.values()) { + promise.reject(error); + } + responsePromises = new Map(); + requestTokens = new Map(); + knownCanceledRequests = new Set(); + messageQueue = new linkedMap_1.LinkedMap(); + // Test for backwards compatibility + if (Is.func(messageWriter.dispose)) { + messageWriter.dispose(); + } + if (Is.func(messageReader.dispose)) { + messageReader.dispose(); + } + }, + listen: () => { + throwIfClosedOrDisposed(); + throwIfListening(); + state = ConnectionState.Listening; + messageReader.listen(callback); + }, + inspect: () => { + (0, ral_1.default)().console.log('inspect'); + } + }; + connection.onNotification(LogTraceNotification.type, (params) => { + if (trace === Trace.Off || !tracer) { + return; + } + const verbose = trace === Trace.Verbose || trace === Trace.Compact; + tracer.log(params.message, verbose ? params.verbose : undefined); + }); + connection.onNotification(ProgressNotification.type, async (params) => { + const handler = progressHandlers.get(params.token); + if (handler) { + await handler(params.value); + } + else { + unhandledProgressEmitter.fire(params); + } + }); + return connection; +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.d.ts new file mode 100644 index 0000000..99878bb --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.d.ts @@ -0,0 +1,9 @@ +export interface Disposable { + /** + * Dispose this object. + */ + dispose(): void; +} +export declare namespace Disposable { + function create(func: () => void): Disposable; +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.js new file mode 100644 index 0000000..b2800ad --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/disposable.js @@ -0,0 +1,16 @@ +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Disposable = void 0; +var Disposable; +(function (Disposable) { + function create(func) { + return { + dispose: func + }; + } + Disposable.create = create; +})(Disposable || (exports.Disposable = Disposable = {})); diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.d.ts new file mode 100644 index 0000000..9bc7136 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.d.ts @@ -0,0 +1,52 @@ +import type RAL from './ral'; +import { Message } from './messages'; +export interface FunctionContentEncoder { + name: string; + encode(input: Uint8Array): Promise; +} +export interface StreamContentEncoder { + name: string; + create(): RAL.WritableStream; +} +export type ContentEncoder = FunctionContentEncoder | (FunctionContentEncoder & StreamContentEncoder); +export interface FunctionContentDecoder { + name: string; + decode(buffer: Uint8Array): Promise; +} +export interface StreamContentDecoder { + name: string; + create(): RAL.WritableStream; +} +export type ContentDecoder = FunctionContentDecoder | (FunctionContentDecoder & StreamContentDecoder); +export interface ContentTypeEncoderOptions { + charset: RAL.MessageBufferEncoding; +} +export interface FunctionContentTypeEncoder { + name: string; + encode(msg: Message, options: ContentTypeEncoderOptions): Promise; +} +export interface StreamContentTypeEncoder { + name: string; + create(options: ContentTypeEncoderOptions): RAL.WritableStream; +} +export type ContentTypeEncoder = FunctionContentTypeEncoder | (FunctionContentTypeEncoder & StreamContentTypeEncoder); +export interface ContentTypeDecoderOptions { + charset: RAL.MessageBufferEncoding; +} +export interface FunctionContentTypeDecoder { + name: string; + decode(buffer: Uint8Array, options: ContentTypeDecoderOptions): Promise; +} +export interface StreamContentTypeDecoder { + name: string; + create(options: ContentTypeDecoderOptions): RAL.WritableStream; +} +export type ContentTypeDecoder = FunctionContentTypeDecoder | (FunctionContentTypeDecoder & StreamContentTypeDecoder); +interface Named { + name: string; +} +export declare namespace Encodings { + function getEncodingHeaderValue(encodings: Named[]): string | undefined; + function parseEncodingHeaderValue(value: string): string[]; +} +export {}; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.js new file mode 100644 index 0000000..914ce0a --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/encoding.js @@ -0,0 +1,70 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Encodings = void 0; +var Encodings; +(function (Encodings) { + function getEncodingHeaderValue(encodings) { + if (encodings.length === 1) { + return encodings[0].name; + } + const distribute = encodings.length - 1; + if (distribute > 1000) { + throw new Error(`Quality value can only have three decimal digits but trying to distribute ${encodings.length} elements.`); + } + const digits = Math.ceil(Math.log10(distribute)); + const factor = Math.pow(10, digits); + const diff = Math.floor((1 / distribute) * factor) / factor; + const result = []; + let q = 1; + for (const encoding of encodings) { + result.push(`${encoding.name};q=${q === 1 || q === 0 ? q.toFixed(0) : q.toFixed(digits)}`); + q = q - diff; + } + return result.join(', '); + } + Encodings.getEncodingHeaderValue = getEncodingHeaderValue; + function parseEncodingHeaderValue(value) { + const map = new Map(); + const encodings = value.split(/\s*,\s*/); + for (const value of encodings) { + const [encoding, q] = parseEncoding(value); + if (encoding === '*') { + continue; + } + let values = map.get(q); + if (values === undefined) { + values = []; + map.set(q, values); + } + values.push(encoding); + } + const keys = Array.from(map.keys()); + keys.sort((a, b) => b - a); + const result = []; + for (const key of keys) { + result.push(...map.get(key)); + } + return result; + } + Encodings.parseEncodingHeaderValue = parseEncodingHeaderValue; + function parseEncoding(value) { + let q = 1; + let encoding; + const index = value.indexOf(';q='); + if (index !== -1) { + const parsed = parseFloat(value.substr(index)); + if (!Number.isNaN(parsed)) { + q = parsed; + } + encoding = value.substr(0, index); + } + else { + encoding = value; + } + return [encoding, q]; + } +})(Encodings || (exports.Encodings = Encodings = {})); diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.d.ts new file mode 100644 index 0000000..fe8f407 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.d.ts @@ -0,0 +1,39 @@ +import { Disposable } from './disposable'; +/** + * Represents a typed event. + */ +export interface Event { + /** + * + * @param listener The listener function will be called when the event happens. + * @param thisArgs The 'this' which will be used when calling the event listener. + * @param disposables An array to which a {{IDisposable}} will be added. + * @return + */ + (listener: (e: T) => any, thisArgs?: any, disposables?: Disposable[]): Disposable; +} +export declare namespace Event { + const None: Event; +} +export interface EmitterOptions { + onFirstListenerAdd?: Function; + onLastListenerRemove?: Function; +} +export declare class Emitter { + private _options?; + private static _noop; + private _event; + private _callbacks; + constructor(_options?: EmitterOptions | undefined); + /** + * For the public to allow to subscribe + * to events from this Emitter + */ + get event(): Event; + /** + * To be kept private to fire an event to + * subscribers + */ + fire(event: T): any; + dispose(): void; +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.js new file mode 100644 index 0000000..fbf8d46 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/events.js @@ -0,0 +1,135 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Emitter = exports.Event = void 0; +const ral_1 = __importDefault(require("./ral")); +var Event; +(function (Event) { + const _disposable = { dispose() { } }; + Event.None = function () { return _disposable; }; +})(Event || (exports.Event = Event = {})); +class CallbackList { + _callbacks; + _contexts; + add(callback, context = null, bucket) { + if (!this._callbacks) { + this._callbacks = []; + this._contexts = []; + } + this._callbacks.push(callback); + this._contexts.push(context); + if (Array.isArray(bucket)) { + bucket.push({ dispose: () => this.remove(callback, context) }); + } + } + remove(callback, context = null) { + if (!this._callbacks) { + return; + } + let foundCallbackWithDifferentContext = false; + for (let i = 0, len = this._callbacks.length; i < len; i++) { + if (this._callbacks[i] === callback) { + if (this._contexts[i] === context) { + // callback & context match => remove it + this._callbacks.splice(i, 1); + this._contexts.splice(i, 1); + return; + } + else { + foundCallbackWithDifferentContext = true; + } + } + } + if (foundCallbackWithDifferentContext) { + throw new Error('When adding a listener with a context, you should remove it with the same context'); + } + } + invoke(...args) { + if (!this._callbacks) { + return []; + } + const ret = [], callbacks = this._callbacks.slice(0), contexts = this._contexts.slice(0); + for (let i = 0, len = callbacks.length; i < len; i++) { + try { + ret.push(callbacks[i].apply(contexts[i], args)); + } + catch (e) { + (0, ral_1.default)().console.error(e); + } + } + return ret; + } + isEmpty() { + return !this._callbacks || this._callbacks.length === 0; + } + dispose() { + this._callbacks = undefined; + this._contexts = undefined; + } +} +class Emitter { + _options; + static _noop = function () { }; + _event; + _callbacks; + constructor(_options) { + this._options = _options; + } + /** + * For the public to allow to subscribe + * to events from this Emitter + */ + get event() { + if (!this._event) { + this._event = (listener, thisArgs, disposables) => { + if (!this._callbacks) { + this._callbacks = new CallbackList(); + } + if (this._options && this._options.onFirstListenerAdd && this._callbacks.isEmpty()) { + this._options.onFirstListenerAdd(this); + } + this._callbacks.add(listener, thisArgs); + const result = { + dispose: () => { + if (!this._callbacks) { + // disposable is disposed after emitter is disposed. + return; + } + this._callbacks.remove(listener, thisArgs); + result.dispose = Emitter._noop; + if (this._options && this._options.onLastListenerRemove && this._callbacks.isEmpty()) { + this._options.onLastListenerRemove(this); + } + } + }; + if (Array.isArray(disposables)) { + disposables.push(result); + } + return result; + }; + } + return this._event; + } + /** + * To be kept private to fire an event to + * subscribers + */ + fire(event) { + if (this._callbacks) { + this._callbacks.invoke.call(this._callbacks, event); + } + } + dispose() { + if (this._callbacks) { + this._callbacks.dispose(); + this._callbacks = undefined; + } + } +} +exports.Emitter = Emitter; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.d.ts new file mode 100644 index 0000000..9261a26 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.d.ts @@ -0,0 +1,7 @@ +export declare function boolean(value: any): value is boolean; +export declare function string(value: any): value is string; +export declare function number(value: any): value is number; +export declare function error(value: any): value is Error; +export declare function func(value: any): value is Function; +export declare function array(value: any): value is T[]; +export declare function stringArray(value: any): value is string[]; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.js new file mode 100644 index 0000000..7506053 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/is.js @@ -0,0 +1,34 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.boolean = boolean; +exports.string = string; +exports.number = number; +exports.error = error; +exports.func = func; +exports.array = array; +exports.stringArray = stringArray; +function boolean(value) { + return value === true || value === false; +} +function string(value) { + return typeof value === 'string' || value instanceof String; +} +function number(value) { + return typeof value === 'number' || value instanceof Number; +} +function error(value) { + return value instanceof Error; +} +function func(value) { + return typeof value === 'function'; +} +function array(value) { + return Array.isArray(value); +} +function stringArray(value) { + return array(value) && value.every(elem => string(elem)); +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.d.ts new file mode 100644 index 0000000..9ee2d1f --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.d.ts @@ -0,0 +1,55 @@ +export declare namespace Touch { + const None: 0; + const First: 1; + const AsOld: 1; + const Last: 2; + const AsNew: 2; +} +export type Touch = 0 | 1 | 2; +export declare class LinkedMap { + readonly [Symbol.toStringTag] = "LinkedMap"; + private _map; + private _head; + private _tail; + private _size; + private _state; + constructor(); + clear(): void; + isEmpty(): boolean; + get size(): number; + get first(): V | undefined; + get last(): V | undefined; + before(key: K): V | undefined; + after(key: K): V | undefined; + has(key: K): boolean; + get(key: K, touch?: Touch): V | undefined; + set(key: K, value: V, touch?: Touch): this; + delete(key: K): boolean; + remove(key: K): V | undefined; + shift(): V | undefined; + forEach(callbackfn: (value: V, key: K, map: LinkedMap) => void, thisArg?: any): void; + keys(): IterableIterator; + values(): IterableIterator; + entries(): IterableIterator<[K, V]>; + [Symbol.iterator](): IterableIterator<[K, V]>; + protected trimOld(newSize: number): void; + private addItemFirst; + private addItemLast; + private removeItem; + private touch; + toJSON(): [K, V][]; + fromJSON(data: [K, V][]): void; +} +export declare class LRUCache extends LinkedMap { + private _limit; + private _ratio; + constructor(limit: number, ratio?: number); + get limit(): number; + set limit(limit: number); + get ratio(): number; + set ratio(ratio: number); + get(key: K, touch?: Touch): V | undefined; + peek(key: K): V | undefined; + set(key: K, value: V): this; + private checkTrim; +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.js new file mode 100644 index 0000000..521079a --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/linkedMap.js @@ -0,0 +1,412 @@ +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LRUCache = exports.LinkedMap = exports.Touch = void 0; +var Touch; +(function (Touch) { + Touch.None = 0; + Touch.First = 1; + Touch.AsOld = Touch.First; + Touch.Last = 2; + Touch.AsNew = Touch.Last; +})(Touch || (exports.Touch = Touch = {})); +class LinkedMap { + [Symbol.toStringTag] = 'LinkedMap'; + _map; + _head; + _tail; + _size; + _state; + constructor() { + this._map = new Map(); + this._head = undefined; + this._tail = undefined; + this._size = 0; + this._state = 0; + } + clear() { + this._map.clear(); + this._head = undefined; + this._tail = undefined; + this._size = 0; + this._state++; + } + isEmpty() { + return !this._head && !this._tail; + } + get size() { + return this._size; + } + get first() { + return this._head?.value; + } + get last() { + return this._tail?.value; + } + before(key) { + const item = this._map.get(key); + return item ? item.previous?.value : undefined; + } + after(key) { + const item = this._map.get(key); + return item ? item.next?.value : undefined; + } + has(key) { + return this._map.has(key); + } + get(key, touch = Touch.None) { + const item = this._map.get(key); + if (!item) { + return undefined; + } + if (touch !== Touch.None) { + this.touch(item, touch); + } + return item.value; + } + set(key, value, touch = Touch.None) { + let item = this._map.get(key); + if (item) { + item.value = value; + if (touch !== Touch.None) { + this.touch(item, touch); + } + } + else { + item = { key, value, next: undefined, previous: undefined }; + switch (touch) { + case Touch.None: + this.addItemLast(item); + break; + case Touch.First: + this.addItemFirst(item); + break; + case Touch.Last: + this.addItemLast(item); + break; + default: + this.addItemLast(item); + break; + } + this._map.set(key, item); + this._size++; + } + return this; + } + delete(key) { + return !!this.remove(key); + } + remove(key) { + const item = this._map.get(key); + if (!item) { + return undefined; + } + this._map.delete(key); + this.removeItem(item); + this._size--; + return item.value; + } + shift() { + if (!this._head && !this._tail) { + return undefined; + } + if (!this._head || !this._tail) { + throw new Error('Invalid list'); + } + const item = this._head; + this._map.delete(item.key); + this.removeItem(item); + this._size--; + return item.value; + } + forEach(callbackfn, thisArg) { + const state = this._state; + let current = this._head; + while (current) { + if (thisArg) { + callbackfn.bind(thisArg)(current.value, current.key, this); + } + else { + callbackfn(current.value, current.key, this); + } + if (this._state !== state) { + throw new Error(`LinkedMap got modified during iteration.`); + } + current = current.next; + } + } + keys() { + const state = this._state; + let current = this._head; + const iterator = { + [Symbol.iterator]: () => { + return iterator; + }, + next: () => { + if (this._state !== state) { + throw new Error(`LinkedMap got modified during iteration.`); + } + if (current) { + const result = { value: current.key, done: false }; + current = current.next; + return result; + } + else { + return { value: undefined, done: true }; + } + } + }; + return iterator; + } + values() { + const state = this._state; + let current = this._head; + const iterator = { + [Symbol.iterator]: () => { + return iterator; + }, + next: () => { + if (this._state !== state) { + throw new Error(`LinkedMap got modified during iteration.`); + } + if (current) { + const result = { value: current.value, done: false }; + current = current.next; + return result; + } + else { + return { value: undefined, done: true }; + } + } + }; + return iterator; + } + entries() { + const state = this._state; + let current = this._head; + const iterator = { + [Symbol.iterator]: () => { + return iterator; + }, + next: () => { + if (this._state !== state) { + throw new Error(`LinkedMap got modified during iteration.`); + } + if (current) { + const result = { value: [current.key, current.value], done: false }; + current = current.next; + return result; + } + else { + return { value: undefined, done: true }; + } + } + }; + return iterator; + } + [Symbol.iterator]() { + return this.entries(); + } + trimOld(newSize) { + if (newSize >= this.size) { + return; + } + if (newSize === 0) { + this.clear(); + return; + } + let current = this._head; + let currentSize = this.size; + while (current && currentSize > newSize) { + this._map.delete(current.key); + current = current.next; + currentSize--; + } + this._head = current; + this._size = currentSize; + if (current) { + current.previous = undefined; + } + this._state++; + } + addItemFirst(item) { + // First time Insert + if (!this._head && !this._tail) { + this._tail = item; + } + else if (!this._head) { + throw new Error('Invalid list'); + } + else { + item.next = this._head; + this._head.previous = item; + } + this._head = item; + this._state++; + } + addItemLast(item) { + // First time Insert + if (!this._head && !this._tail) { + this._head = item; + } + else if (!this._tail) { + throw new Error('Invalid list'); + } + else { + item.previous = this._tail; + this._tail.next = item; + } + this._tail = item; + this._state++; + } + removeItem(item) { + if (item === this._head && item === this._tail) { + this._head = undefined; + this._tail = undefined; + } + else if (item === this._head) { + // This can only happened if size === 1 which is handle + // by the case above. + if (!item.next) { + throw new Error('Invalid list'); + } + item.next.previous = undefined; + this._head = item.next; + } + else if (item === this._tail) { + // This can only happened if size === 1 which is handle + // by the case above. + if (!item.previous) { + throw new Error('Invalid list'); + } + item.previous.next = undefined; + this._tail = item.previous; + } + else { + const next = item.next; + const previous = item.previous; + if (!next || !previous) { + throw new Error('Invalid list'); + } + next.previous = previous; + previous.next = next; + } + item.next = undefined; + item.previous = undefined; + this._state++; + } + touch(item, touch) { + if (!this._head || !this._tail) { + throw new Error('Invalid list'); + } + if ((touch !== Touch.First && touch !== Touch.Last)) { + return; + } + if (touch === Touch.First) { + if (item === this._head) { + return; + } + const next = item.next; + const previous = item.previous; + // Unlink the item + if (item === this._tail) { + // previous must be defined since item was not head but is tail + // So there are more than on item in the map + previous.next = undefined; + this._tail = previous; + } + else { + // Both next and previous are not undefined since item was neither head nor tail. + next.previous = previous; + previous.next = next; + } + // Insert the node at head + item.previous = undefined; + item.next = this._head; + this._head.previous = item; + this._head = item; + this._state++; + } + else if (touch === Touch.Last) { + if (item === this._tail) { + return; + } + const next = item.next; + const previous = item.previous; + // Unlink the item. + if (item === this._head) { + // next must be defined since item was not tail but is head + // So there are more than on item in the map + next.previous = undefined; + this._head = next; + } + else { + // Both next and previous are not undefined since item was neither head nor tail. + next.previous = previous; + previous.next = next; + } + item.next = undefined; + item.previous = this._tail; + this._tail.next = item; + this._tail = item; + this._state++; + } + } + toJSON() { + const data = []; + this.forEach((value, key) => { + data.push([key, value]); + }); + return data; + } + fromJSON(data) { + this.clear(); + for (const [key, value] of data) { + this.set(key, value); + } + } +} +exports.LinkedMap = LinkedMap; +class LRUCache extends LinkedMap { + _limit; + _ratio; + constructor(limit, ratio = 1) { + super(); + this._limit = limit; + this._ratio = Math.min(Math.max(0, ratio), 1); + } + get limit() { + return this._limit; + } + set limit(limit) { + this._limit = limit; + this.checkTrim(); + } + get ratio() { + return this._ratio; + } + set ratio(ratio) { + this._ratio = Math.min(Math.max(0, ratio), 1); + this.checkTrim(); + } + get(key, touch = Touch.AsNew) { + return super.get(key, touch); + } + peek(key) { + return super.get(key, Touch.None); + } + set(key, value) { + super.set(key, value, Touch.Last); + this.checkTrim(); + return this; + } + checkTrim() { + if (this.size > this._limit) { + this.trimOld(Math.round(this._limit * this._ratio)); + } + } +} +exports.LRUCache = LRUCache; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.d.ts new file mode 100644 index 0000000..354df8d --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.d.ts @@ -0,0 +1,18 @@ +import RAL from './ral'; +export declare abstract class AbstractMessageBuffer implements RAL.MessageBuffer { + private _encoding; + private _chunks; + private _totalLength; + constructor(encoding?: RAL.MessageBufferEncoding); + protected abstract emptyBuffer(): Uint8Array; + protected abstract fromString(value: string, encoding: RAL.MessageBufferEncoding): Uint8Array; + protected abstract toString(value: Uint8Array, encoding: RAL.MessageBufferEncoding): string; + protected abstract asNative(buffer: Uint8Array, length?: number): Uint8Array; + protected abstract allocNative(length: number): Uint8Array; + get encoding(): RAL.MessageBufferEncoding; + append(chunk: Uint8Array | string): void; + tryReadHeaders(lowerCaseKeys?: boolean): Map | undefined; + tryReadBody(length: number): Uint8Array | undefined; + get numberOfBytes(): number; + private _read; +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.js new file mode 100644 index 0000000..7875b0e --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageBuffer.js @@ -0,0 +1,155 @@ +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AbstractMessageBuffer = void 0; +const CR = 13; +const LF = 10; +const CRLF = '\r\n'; +class AbstractMessageBuffer { + _encoding; + _chunks; + _totalLength; + constructor(encoding = 'utf-8') { + this._encoding = encoding; + this._chunks = []; + this._totalLength = 0; + } + get encoding() { + return this._encoding; + } + append(chunk) { + const toAppend = typeof chunk === 'string' ? this.fromString(chunk, this._encoding) : chunk; + this._chunks.push(toAppend); + this._totalLength += toAppend.byteLength; + } + tryReadHeaders(lowerCaseKeys = false) { + if (this._chunks.length === 0) { + return undefined; + } + let state = 0; + let chunkIndex = 0; + let offset = 0; + let chunkBytesRead = 0; + row: while (chunkIndex < this._chunks.length) { + const chunk = this._chunks[chunkIndex]; + offset = 0; + while (offset < chunk.length) { + const value = chunk[offset]; + switch (value) { + case CR: + switch (state) { + case 0: + state = 1; + break; + case 2: + state = 3; + break; + default: + state = 0; + } + break; + case LF: + switch (state) { + case 1: + state = 2; + break; + case 3: + state = 4; + offset++; + break row; + default: + state = 0; + } + break; + default: + state = 0; + } + offset++; + } + chunkBytesRead += chunk.byteLength; + chunkIndex++; + } + if (state !== 4) { + return undefined; + } + // The buffer contains the two CRLF at the end. So we will + // have two empty lines after the split at the end as well. + const buffer = this._read(chunkBytesRead + offset); + const result = new Map(); + const headers = this.toString(buffer, 'ascii').split(CRLF); + if (headers.length < 2) { + return result; + } + for (let i = 0; i < headers.length - 2; i++) { + const header = headers[i]; + const index = header.indexOf(':'); + if (index === -1) { + throw new Error(`Message header must separate key and value using ':'\n${header}`); + } + const key = header.substr(0, index); + const value = header.substr(index + 1).trim(); + result.set(lowerCaseKeys ? key.toLowerCase() : key, value); + } + return result; + } + tryReadBody(length) { + if (this._totalLength < length) { + return undefined; + } + return this._read(length); + } + get numberOfBytes() { + return this._totalLength; + } + _read(byteCount) { + if (byteCount === 0) { + return this.emptyBuffer(); + } + if (byteCount > this._totalLength) { + throw new Error(`Cannot read so many bytes!`); + } + if (this._chunks[0].byteLength === byteCount) { + // super fast path, precisely first chunk must be returned + const chunk = this._chunks[0]; + this._chunks.shift(); + this._totalLength -= byteCount; + return this.asNative(chunk); + } + if (this._chunks[0].byteLength > byteCount) { + // fast path, the reading is entirely within the first chunk + const chunk = this._chunks[0]; + const result = this.asNative(chunk, byteCount); + this._chunks[0] = chunk.slice(byteCount); + this._totalLength -= byteCount; + return result; + } + const result = this.allocNative(byteCount); + let resultOffset = 0; + const chunkIndex = 0; + while (byteCount > 0) { + const chunk = this._chunks[chunkIndex]; + if (chunk.byteLength > byteCount) { + // this chunk will survive + const chunkPart = chunk.slice(0, byteCount); + result.set(chunkPart, resultOffset); + resultOffset += byteCount; + this._chunks[chunkIndex] = chunk.slice(byteCount); + this._totalLength -= byteCount; + byteCount -= byteCount; + } + else { + // this chunk will be entirely read + result.set(chunk, resultOffset); + resultOffset += chunk.byteLength; + this._chunks.shift(); + this._totalLength -= chunk.byteLength; + byteCount -= chunk.byteLength; + } + } + return result; + } +} +exports.AbstractMessageBuffer = AbstractMessageBuffer; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.d.ts new file mode 100644 index 0000000..d447d07 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.d.ts @@ -0,0 +1,77 @@ +import RAL from './ral'; +import { Event } from './events'; +import { Message } from './messages'; +import { ContentDecoder, ContentTypeDecoder } from './encoding'; +import { Disposable } from './api'; +/** + * A callback that receives each incoming JSON-RPC message. + */ +export interface DataCallback { + (data: Message): void; +} +export interface PartialMessageInfo { + readonly messageToken: number; + readonly waitingTime: number; +} +/** Reads JSON-RPC messages from some underlying transport. */ +export interface MessageReader { + /** Raised whenever an error occurs while reading a message. */ + readonly onError: Event; + /** An event raised when the end of the underlying transport has been reached. */ + readonly onClose: Event; + /** + * An event that *may* be raised to inform the owner that only part of a message has been received. + * A MessageReader implementation may choose to raise this event after a timeout elapses while waiting for more of a partially received message to be received. + */ + readonly onPartialMessage: Event; + /** + * Begins listening for incoming messages. To be called at most once. + * @param callback A callback for receiving decoded messages. + */ + listen(callback: DataCallback): Disposable; + /** Releases resources incurred from reading or raising events. Does NOT close the underlying transport, if any. */ + dispose(): void; +} +export declare namespace MessageReader { + function is(value: any): value is MessageReader; +} +export declare abstract class AbstractMessageReader implements MessageReader { + private errorEmitter; + private closeEmitter; + private partialMessageEmitter; + constructor(); + dispose(): void; + get onError(): Event; + protected fireError(error: any): void; + get onClose(): Event; + protected fireClose(): void; + get onPartialMessage(): Event; + protected firePartialMessage(info: PartialMessageInfo): void; + private asError; + abstract listen(callback: DataCallback): Disposable; +} +export interface MessageReaderOptions { + charset?: RAL.MessageBufferEncoding; + contentDecoder?: ContentDecoder; + contentDecoders?: ContentDecoder[]; + contentTypeDecoder?: ContentTypeDecoder; + contentTypeDecoders?: ContentTypeDecoder[]; +} +export declare class ReadableStreamMessageReader extends AbstractMessageReader { + private readable; + private options; + private callback; + private nextMessageLength; + private messageToken; + private buffer; + private partialMessageTimer; + private _partialMessageTimeout; + private readSemaphore; + constructor(readable: RAL.ReadableStream, options?: RAL.MessageBufferEncoding | MessageReaderOptions); + set partialMessageTimeout(timeout: number); + get partialMessageTimeout(): number; + listen(callback: DataCallback): Disposable; + private onData; + private clearPartialMessageTimer; + private setPartialMessageTimer; +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.js new file mode 100644 index 0000000..59c6ca6 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageReader.js @@ -0,0 +1,246 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ReadableStreamMessageReader = exports.AbstractMessageReader = exports.MessageReader = void 0; +const ral_1 = __importDefault(require("./ral")); +const Is = __importStar(require("./is")); +const events_1 = require("./events"); +const semaphore_1 = require("./semaphore"); +var MessageReader; +(function (MessageReader) { + function is(value) { + const candidate = value; + return candidate && Is.func(candidate.listen) && Is.func(candidate.dispose) && + Is.func(candidate.onError) && Is.func(candidate.onClose) && Is.func(candidate.onPartialMessage); + } + MessageReader.is = is; +})(MessageReader || (exports.MessageReader = MessageReader = {})); +class AbstractMessageReader { + errorEmitter; + closeEmitter; + partialMessageEmitter; + constructor() { + this.errorEmitter = new events_1.Emitter(); + this.closeEmitter = new events_1.Emitter(); + this.partialMessageEmitter = new events_1.Emitter(); + } + dispose() { + this.errorEmitter.dispose(); + this.closeEmitter.dispose(); + this.partialMessageEmitter.dispose(); + } + get onError() { + return this.errorEmitter.event; + } + fireError(error) { + this.errorEmitter.fire(this.asError(error)); + } + get onClose() { + return this.closeEmitter.event; + } + fireClose() { + this.closeEmitter.fire(undefined); + } + get onPartialMessage() { + return this.partialMessageEmitter.event; + } + firePartialMessage(info) { + this.partialMessageEmitter.fire(info); + } + asError(error) { + if (error instanceof Error) { + return error; + } + else { + return new Error(`Reader received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`); + } + } +} +exports.AbstractMessageReader = AbstractMessageReader; +var ResolvedMessageReaderOptions; +(function (ResolvedMessageReaderOptions) { + function fromOptions(options) { + let charset; + let result; + let contentDecoder; + const contentDecoders = new Map(); + let contentTypeDecoder; + const contentTypeDecoders = new Map(); + if (options === undefined || typeof options === 'string') { + charset = options ?? 'utf-8'; + } + else { + charset = options.charset ?? 'utf-8'; + if (options.contentDecoder !== undefined) { + contentDecoder = options.contentDecoder; + contentDecoders.set(contentDecoder.name, contentDecoder); + } + if (options.contentDecoders !== undefined) { + for (const decoder of options.contentDecoders) { + contentDecoders.set(decoder.name, decoder); + } + } + if (options.contentTypeDecoder !== undefined) { + contentTypeDecoder = options.contentTypeDecoder; + contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder); + } + if (options.contentTypeDecoders !== undefined) { + for (const decoder of options.contentTypeDecoders) { + contentTypeDecoders.set(decoder.name, decoder); + } + } + } + if (contentTypeDecoder === undefined) { + contentTypeDecoder = (0, ral_1.default)().applicationJson.decoder; + contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder); + } + return { charset, contentDecoder, contentDecoders, contentTypeDecoder, contentTypeDecoders }; + } + ResolvedMessageReaderOptions.fromOptions = fromOptions; +})(ResolvedMessageReaderOptions || (ResolvedMessageReaderOptions = {})); +class ReadableStreamMessageReader extends AbstractMessageReader { + readable; + options; + callback; + nextMessageLength; + messageToken; + buffer; + partialMessageTimer; + _partialMessageTimeout; + readSemaphore; + constructor(readable, options) { + super(); + this.readable = readable; + this.options = ResolvedMessageReaderOptions.fromOptions(options); + this.buffer = (0, ral_1.default)().messageBuffer.create(this.options.charset); + this._partialMessageTimeout = 10000; + this.nextMessageLength = -1; + this.messageToken = 0; + this.readSemaphore = new semaphore_1.Semaphore(1); + } + set partialMessageTimeout(timeout) { + this._partialMessageTimeout = timeout; + } + get partialMessageTimeout() { + return this._partialMessageTimeout; + } + listen(callback) { + this.nextMessageLength = -1; + this.messageToken = 0; + this.partialMessageTimer = undefined; + this.callback = callback; + const result = this.readable.onData((data) => { + this.onData(data); + }); + this.readable.onError((error) => this.fireError(error)); + this.readable.onClose(() => this.fireClose()); + return result; + } + onData(data) { + try { + this.buffer.append(data); + while (true) { + if (this.nextMessageLength === -1) { + const headers = this.buffer.tryReadHeaders(true); + if (!headers) { + return; + } + const contentLength = headers.get('content-length'); + if (!contentLength) { + this.fireError(new Error(`Header must provide a Content-Length property.\n${JSON.stringify(Object.fromEntries(headers))}`)); + return; + } + const length = parseInt(contentLength); + if (isNaN(length)) { + this.fireError(new Error(`Content-Length value must be a number. Got ${contentLength}`)); + return; + } + this.nextMessageLength = length; + } + const body = this.buffer.tryReadBody(this.nextMessageLength); + if (body === undefined) { + /** We haven't received the full message yet. */ + this.setPartialMessageTimer(); + return; + } + this.clearPartialMessageTimer(); + this.nextMessageLength = -1; + // Make sure that we convert one received message after the + // other. Otherwise it could happen that a decoding of a second + // smaller message finished before the decoding of a first larger + // message and then we would deliver the second message first. + this.readSemaphore.lock(async () => { + const bytes = this.options.contentDecoder !== undefined + ? await this.options.contentDecoder.decode(body) + : body; + const message = await this.options.contentTypeDecoder.decode(bytes, this.options); + this.callback(message); + }).catch((error) => { + this.fireError(error); + }); + } + } + catch (error) { + this.fireError(error); + } + } + clearPartialMessageTimer() { + if (this.partialMessageTimer) { + this.partialMessageTimer.dispose(); + this.partialMessageTimer = undefined; + } + } + setPartialMessageTimer() { + this.clearPartialMessageTimer(); + if (this._partialMessageTimeout <= 0) { + return; + } + this.partialMessageTimer = (0, ral_1.default)().timer.setTimeout((token, timeout) => { + this.partialMessageTimer = undefined; + if (token === this.messageToken) { + this.firePartialMessage({ messageToken: token, waitingTime: timeout }); + this.setPartialMessageTimer(); + } + }, this._partialMessageTimeout, this.messageToken, this._partialMessageTimeout); + } +} +exports.ReadableStreamMessageReader = ReadableStreamMessageReader; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.d.ts new file mode 100644 index 0000000..fd86488 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.d.ts @@ -0,0 +1,60 @@ +import RAL from './ral'; +import { Message } from './messages'; +import { Event } from './events'; +import { ContentEncoder, ContentTypeEncoder } from './encoding'; +/** + * Writes JSON-RPC messages to an underlying transport. + */ +export interface MessageWriter { + /** + * Raised whenever an error occurs while writing a message. + */ + readonly onError: Event<[Error, Message | undefined, number | undefined]>; + /** + * An event raised when the underlying transport has closed and writing is no longer possible. + */ + readonly onClose: Event; + /** + * Sends a JSON-RPC message. + * @param msg The JSON-RPC message to be sent. + * @description Implementations should guarantee messages are transmitted in the same order that they are received by this method. + */ + write(msg: Message): Promise; + /** + * Call when the connection using this message writer ends + * (e.g. MessageConnection.end() is called) + */ + end(): void; + /** Releases resources incurred from writing or raising events. Does NOT close the underlying transport, if any. */ + dispose(): void; +} +export declare namespace MessageWriter { + function is(value: any): value is MessageWriter; +} +export declare abstract class AbstractMessageWriter { + private errorEmitter; + private closeEmitter; + constructor(); + dispose(): void; + get onError(): Event<[Error, Message | undefined, number | undefined]>; + protected fireError(error: any, message?: Message, count?: number): void; + get onClose(): Event; + protected fireClose(): void; + private asError; +} +export interface MessageWriterOptions { + charset?: RAL.MessageBufferEncoding; + contentEncoder?: ContentEncoder; + contentTypeEncoder?: ContentTypeEncoder; +} +export declare class WriteableStreamMessageWriter extends AbstractMessageWriter implements MessageWriter { + private writable; + private options; + private errorCount; + private writeSemaphore; + constructor(writable: RAL.WritableStream, options?: RAL.MessageBufferEncoding | MessageWriterOptions); + write(msg: Message): Promise; + private doWrite; + private handleError; + end(): void; +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.js new file mode 100644 index 0000000..9db0e13 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messageWriter.js @@ -0,0 +1,157 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WriteableStreamMessageWriter = exports.AbstractMessageWriter = exports.MessageWriter = void 0; +const ral_1 = __importDefault(require("./ral")); +const Is = __importStar(require("./is")); +const semaphore_1 = require("./semaphore"); +const events_1 = require("./events"); +const ContentLength = 'Content-Length: '; +const CRLF = '\r\n'; +var MessageWriter; +(function (MessageWriter) { + function is(value) { + const candidate = value; + return candidate && Is.func(candidate.dispose) && Is.func(candidate.onClose) && + Is.func(candidate.onError) && Is.func(candidate.write); + } + MessageWriter.is = is; +})(MessageWriter || (exports.MessageWriter = MessageWriter = {})); +class AbstractMessageWriter { + errorEmitter; + closeEmitter; + constructor() { + this.errorEmitter = new events_1.Emitter(); + this.closeEmitter = new events_1.Emitter(); + } + dispose() { + this.errorEmitter.dispose(); + this.closeEmitter.dispose(); + } + get onError() { + return this.errorEmitter.event; + } + fireError(error, message, count) { + this.errorEmitter.fire([this.asError(error), message, count]); + } + get onClose() { + return this.closeEmitter.event; + } + fireClose() { + this.closeEmitter.fire(undefined); + } + asError(error) { + if (error instanceof Error) { + return error; + } + else { + return new Error(`Writer received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`); + } + } +} +exports.AbstractMessageWriter = AbstractMessageWriter; +var ResolvedMessageWriterOptions; +(function (ResolvedMessageWriterOptions) { + function fromOptions(options) { + if (options === undefined || typeof options === 'string') { + return { charset: options ?? 'utf-8', contentTypeEncoder: (0, ral_1.default)().applicationJson.encoder }; + } + else { + return { charset: options.charset ?? 'utf-8', contentEncoder: options.contentEncoder, contentTypeEncoder: options.contentTypeEncoder ?? (0, ral_1.default)().applicationJson.encoder }; + } + } + ResolvedMessageWriterOptions.fromOptions = fromOptions; +})(ResolvedMessageWriterOptions || (ResolvedMessageWriterOptions = {})); +class WriteableStreamMessageWriter extends AbstractMessageWriter { + writable; + options; + errorCount; + writeSemaphore; + constructor(writable, options) { + super(); + this.writable = writable; + this.options = ResolvedMessageWriterOptions.fromOptions(options); + this.errorCount = 0; + this.writeSemaphore = new semaphore_1.Semaphore(1); + this.writable.onError((error) => this.fireError(error)); + this.writable.onClose(() => this.fireClose()); + } + async write(msg) { + return this.writeSemaphore.lock(async () => { + const payload = this.options.contentTypeEncoder.encode(msg, this.options).then((buffer) => { + if (this.options.contentEncoder !== undefined) { + return this.options.contentEncoder.encode(buffer); + } + else { + return buffer; + } + }); + return payload.then((buffer) => { + const headers = []; + headers.push(ContentLength, buffer.byteLength.toString(), CRLF); + headers.push(CRLF); + return this.doWrite(msg, headers, buffer); + }, (error) => { + this.fireError(error); + throw error; + }); + }); + } + async doWrite(msg, headers, data) { + try { + await this.writable.write(headers.join(''), 'ascii'); + return this.writable.write(data); + } + catch (error) { + this.handleError(error, msg); + return Promise.reject(error); + } + } + handleError(error, msg) { + this.errorCount++; + this.fireError(error, msg, this.errorCount); + } + end() { + this.writable.end(); + } +} +exports.WriteableStreamMessageWriter = WriteableStreamMessageWriter; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.d.ts new file mode 100644 index 0000000..4d9ab2b --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.d.ts @@ -0,0 +1,369 @@ +/** + * A language server message + */ +export interface Message { + jsonrpc: string; +} +/** + * Request message + */ +export interface RequestMessage extends Message { + /** + * The request id. + */ + id: number | string | null; + /** + * The method to be invoked. + */ + method: string; + /** + * The method's params. + */ + params?: any[] | object; +} +/** + * Predefined error codes. + */ +export declare namespace ErrorCodes { + const ParseError: -32700; + const InvalidRequest: -32600; + const MethodNotFound: -32601; + const InvalidParams: -32602; + const InternalError: -32603; + /** + * This is the start range of JSON RPC reserved error codes. + * It doesn't denote a real error code. No application error codes should + * be defined between the start and end range. For backwards + * compatibility the `ServerNotInitialized` and the `UnknownErrorCode` + * are left in the range. + * + * @since 3.16.0 + */ + const jsonrpcReservedErrorRangeStart: -32099; + /** @deprecated use jsonrpcReservedErrorRangeStart */ + const serverErrorStart: -32099; + /** + * An error occurred when write a message to the transport layer. + */ + const MessageWriteError: -32099; + /** + * An error occurred when reading a message from the transport layer. + */ + const MessageReadError: -32098; + /** + * The connection got disposed or lost and all pending responses got + * rejected. + */ + const PendingResponseRejected: -32097; + /** + * The connection is inactive and a use of it failed. + */ + const ConnectionInactive: -32096; + /** + * Error code indicating that a server received a notification or + * request before the server has received the `initialize` request. + */ + const ServerNotInitialized: -32002; + const UnknownErrorCode: -32001; + /** + * This is the end range of JSON RPC reserved error codes. + * It doesn't denote a real error code. + * + * @since 3.16.0 + */ + const jsonrpcReservedErrorRangeEnd: -32000; + /** @deprecated use jsonrpcReservedErrorRangeEnd */ + const serverErrorEnd: -32000; +} +type integer = number; +export type ErrorCodes = integer; +export interface ResponseErrorLiteral { + /** + * A number indicating the error type that occurred. + */ + code: number; + /** + * A string providing a short description of the error. + */ + message: string; + /** + * A Primitive or Structured value that contains additional + * information about the error. Can be omitted. + */ + data?: D; +} +/** + * An error object return in a response in case a request + * has failed. + */ +export declare class ResponseError extends Error { + readonly code: number; + readonly data: D | undefined; + constructor(code: number, message: string, data?: D); + toJson(): ResponseErrorLiteral; +} +/** + * A response message. + */ +export interface ResponseMessage extends Message { + /** + * The request id. + */ + id: number | string | null; + /** + * The result of a request. This member is REQUIRED on success. + * This member MUST NOT exist if there was an error invoking the method. + */ + result?: string | number | boolean | object | any[] | null; + /** + * The error object in case a request fails. + */ + error?: ResponseErrorLiteral; +} +/** + * A LSP Log Entry. + */ +export type LSPMessageType = 'send-request' | 'receive-request' | 'send-response' | 'receive-response' | 'send-notification' | 'receive-notification'; +export interface LSPLogMessage { + type: LSPMessageType; + message: RequestMessage | ResponseMessage | NotificationMessage; + timestamp: number; +} +export declare class ParameterStructures { + private readonly kind; + /** + * The parameter structure is automatically inferred on the number of parameters + * and the parameter type in case of a single param. + */ + static readonly auto: ParameterStructures; + /** + * Forces `byPosition` parameter structure. This is useful if you have a single + * parameter which has a literal type. + */ + static readonly byPosition: ParameterStructures; + /** + * Forces `byName` parameter structure. This is only useful when having a single + * parameter. The library will report errors if used with a different number of + * parameters. + */ + static readonly byName: ParameterStructures; + private constructor(); + static is(value: any): value is ParameterStructures; + toString(): string; +} +/** + * An interface to type messages. + */ +export interface MessageSignature { + readonly method: string; + readonly numberOfParams: number; + readonly parameterStructures: ParameterStructures; +} +/** + * An abstract implementation of a MessageType. + */ +export declare abstract class AbstractMessageSignature implements MessageSignature { + readonly method: string; + readonly numberOfParams: number; + constructor(method: string, numberOfParams: number); + get parameterStructures(): ParameterStructures; +} +/** + * End marker interface for request and notification types. + */ +export interface _EM { + _$endMarker$_: number; +} +/** + * Classes to type request response pairs + */ +export declare class RequestType0 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType extends AbstractMessageSignature { + private _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P, R, E, _EM] | undefined; + constructor(method: string, _parameterStructures?: ParameterStructures); + get parameterStructures(): ParameterStructures; +} +export declare class RequestType1 extends AbstractMessageSignature { + private _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, R, E, _EM] | undefined; + constructor(method: string, _parameterStructures?: ParameterStructures); + get parameterStructures(): ParameterStructures; +} +export declare class RequestType2 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType3 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType4 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType5 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType6 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType7 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType8 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, P8, R, E, _EM] | undefined; + constructor(method: string); +} +export declare class RequestType9 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, P8, P9, R, E, _EM] | undefined; + constructor(method: string); +} +/** + * Notification Message + */ +export interface NotificationMessage extends Message { + /** + * The method to be invoked. + */ + method: string; + /** + * The notification's params. + */ + params?: any[] | object; +} +export declare class NotificationType

extends AbstractMessageSignature { + private _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P, _EM] | undefined; + constructor(method: string, _parameterStructures?: ParameterStructures); + get parameterStructures(): ParameterStructures; +} +export declare class NotificationType0 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [_EM] | undefined; + constructor(method: string); +} +export declare class NotificationType1 extends AbstractMessageSignature { + private _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, _EM] | undefined; + constructor(method: string, _parameterStructures?: ParameterStructures); + get parameterStructures(): ParameterStructures; +} +export declare class NotificationType2 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType3 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType4 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType5 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType6 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType7 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType8 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, P8, _EM] | undefined; + constructor(method: string); +} +export declare class NotificationType9 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + readonly _: [P1, P2, P3, P4, P5, P6, P7, P8, P9, _EM] | undefined; + constructor(method: string); +} +export declare namespace Message { + /** + * Tests if the given message is a request message + */ + function isRequest(message: Message | undefined): message is RequestMessage; + /** + * Tests if the given message is a notification message + */ + function isNotification(message: Message | undefined): message is NotificationMessage; + /** + * Tests if the given message is a response message + */ + function isResponse(message: Message | undefined): message is ResponseMessage; +} +export {}; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.js new file mode 100644 index 0000000..5e4a720 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/messages.js @@ -0,0 +1,436 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Message = exports.NotificationType9 = exports.NotificationType8 = exports.NotificationType7 = exports.NotificationType6 = exports.NotificationType5 = exports.NotificationType4 = exports.NotificationType3 = exports.NotificationType2 = exports.NotificationType1 = exports.NotificationType0 = exports.NotificationType = exports.RequestType9 = exports.RequestType8 = exports.RequestType7 = exports.RequestType6 = exports.RequestType5 = exports.RequestType4 = exports.RequestType3 = exports.RequestType2 = exports.RequestType1 = exports.RequestType = exports.RequestType0 = exports.AbstractMessageSignature = exports.ParameterStructures = exports.ResponseError = exports.ErrorCodes = void 0; +const is = __importStar(require("./is")); +/** + * Predefined error codes. + */ +var ErrorCodes; +(function (ErrorCodes) { + // Defined by JSON RPC + ErrorCodes.ParseError = -32700; + ErrorCodes.InvalidRequest = -32600; + ErrorCodes.MethodNotFound = -32601; + ErrorCodes.InvalidParams = -32602; + ErrorCodes.InternalError = -32603; + /** + * This is the start range of JSON RPC reserved error codes. + * It doesn't denote a real error code. No application error codes should + * be defined between the start and end range. For backwards + * compatibility the `ServerNotInitialized` and the `UnknownErrorCode` + * are left in the range. + * + * @since 3.16.0 + */ + ErrorCodes.jsonrpcReservedErrorRangeStart = -32099; + /** @deprecated use jsonrpcReservedErrorRangeStart */ + ErrorCodes.serverErrorStart = -32099; + /** + * An error occurred when write a message to the transport layer. + */ + ErrorCodes.MessageWriteError = -32099; + /** + * An error occurred when reading a message from the transport layer. + */ + ErrorCodes.MessageReadError = -32098; + /** + * The connection got disposed or lost and all pending responses got + * rejected. + */ + ErrorCodes.PendingResponseRejected = -32097; + /** + * The connection is inactive and a use of it failed. + */ + ErrorCodes.ConnectionInactive = -32096; + /** + * Error code indicating that a server received a notification or + * request before the server has received the `initialize` request. + */ + ErrorCodes.ServerNotInitialized = -32002; + ErrorCodes.UnknownErrorCode = -32001; + /** + * This is the end range of JSON RPC reserved error codes. + * It doesn't denote a real error code. + * + * @since 3.16.0 + */ + ErrorCodes.jsonrpcReservedErrorRangeEnd = -32000; + /** @deprecated use jsonrpcReservedErrorRangeEnd */ + ErrorCodes.serverErrorEnd = -32000; +})(ErrorCodes || (exports.ErrorCodes = ErrorCodes = {})); +/** + * An error object return in a response in case a request + * has failed. + */ +class ResponseError extends Error { + code; + data; + constructor(code, message, data) { + super(message); + this.code = is.number(code) ? code : ErrorCodes.UnknownErrorCode; + this.data = data; + Object.setPrototypeOf(this, ResponseError.prototype); + } + toJson() { + const result = { + code: this.code, + message: this.message + }; + if (this.data !== undefined) { + result.data = this.data; + } + return result; + } +} +exports.ResponseError = ResponseError; +class ParameterStructures { + kind; + /** + * The parameter structure is automatically inferred on the number of parameters + * and the parameter type in case of a single param. + */ + static auto = new ParameterStructures('auto'); + /** + * Forces `byPosition` parameter structure. This is useful if you have a single + * parameter which has a literal type. + */ + static byPosition = new ParameterStructures('byPosition'); + /** + * Forces `byName` parameter structure. This is only useful when having a single + * parameter. The library will report errors if used with a different number of + * parameters. + */ + static byName = new ParameterStructures('byName'); + constructor(kind) { + this.kind = kind; + } + static is(value) { + return value === ParameterStructures.auto || value === ParameterStructures.byName || value === ParameterStructures.byPosition; + } + toString() { + return this.kind; + } +} +exports.ParameterStructures = ParameterStructures; +/** + * An abstract implementation of a MessageType. + */ +class AbstractMessageSignature { + method; + numberOfParams; + constructor(method, numberOfParams) { + this.method = method; + this.numberOfParams = numberOfParams; + } + get parameterStructures() { + return ParameterStructures.auto; + } +} +exports.AbstractMessageSignature = AbstractMessageSignature; +/** + * Classes to type request response pairs + */ +class RequestType0 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 0); + } +} +exports.RequestType0 = RequestType0; +class RequestType extends AbstractMessageSignature { + _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method, _parameterStructures = ParameterStructures.auto) { + super(method, 1); + this._parameterStructures = _parameterStructures; + } + get parameterStructures() { + return this._parameterStructures; + } +} +exports.RequestType = RequestType; +class RequestType1 extends AbstractMessageSignature { + _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method, _parameterStructures = ParameterStructures.auto) { + super(method, 1); + this._parameterStructures = _parameterStructures; + } + get parameterStructures() { + return this._parameterStructures; + } +} +exports.RequestType1 = RequestType1; +class RequestType2 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 2); + } +} +exports.RequestType2 = RequestType2; +class RequestType3 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 3); + } +} +exports.RequestType3 = RequestType3; +class RequestType4 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 4); + } +} +exports.RequestType4 = RequestType4; +class RequestType5 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 5); + } +} +exports.RequestType5 = RequestType5; +class RequestType6 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 6); + } +} +exports.RequestType6 = RequestType6; +class RequestType7 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 7); + } +} +exports.RequestType7 = RequestType7; +class RequestType8 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 8); + } +} +exports.RequestType8 = RequestType8; +class RequestType9 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 9); + } +} +exports.RequestType9 = RequestType9; +class NotificationType extends AbstractMessageSignature { + _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method, _parameterStructures = ParameterStructures.auto) { + super(method, 1); + this._parameterStructures = _parameterStructures; + } + get parameterStructures() { + return this._parameterStructures; + } +} +exports.NotificationType = NotificationType; +class NotificationType0 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 0); + } +} +exports.NotificationType0 = NotificationType0; +class NotificationType1 extends AbstractMessageSignature { + _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method, _parameterStructures = ParameterStructures.auto) { + super(method, 1); + this._parameterStructures = _parameterStructures; + } + get parameterStructures() { + return this._parameterStructures; + } +} +exports.NotificationType1 = NotificationType1; +class NotificationType2 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 2); + } +} +exports.NotificationType2 = NotificationType2; +class NotificationType3 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 3); + } +} +exports.NotificationType3 = NotificationType3; +class NotificationType4 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 4); + } +} +exports.NotificationType4 = NotificationType4; +class NotificationType5 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 5); + } +} +exports.NotificationType5 = NotificationType5; +class NotificationType6 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 6); + } +} +exports.NotificationType6 = NotificationType6; +class NotificationType7 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 7); + } +} +exports.NotificationType7 = NotificationType7; +class NotificationType8 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 8); + } +} +exports.NotificationType8 = NotificationType8; +class NotificationType9 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 9); + } +} +exports.NotificationType9 = NotificationType9; +var Message; +(function (Message) { + /** + * Tests if the given message is a request message + */ + function isRequest(message) { + const candidate = message; + return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id)); + } + Message.isRequest = isRequest; + /** + * Tests if the given message is a notification message + */ + function isNotification(message) { + const candidate = message; + return candidate && is.string(candidate.method) && message.id === void 0; + } + Message.isNotification = isNotification; + /** + * Tests if the given message is a response message + */ + function isResponse(message) { + const candidate = message; + return candidate && (candidate.result !== void 0 || !!candidate.error) && (is.string(candidate.id) || is.number(candidate.id) || candidate.id === null); + } + Message.isResponse = isResponse; +})(Message || (exports.Message = Message = {})); diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.d.ts new file mode 100644 index 0000000..e14ec4a --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.d.ts @@ -0,0 +1,74 @@ +import type { Disposable } from './disposable'; +import type { ContentTypeEncoder, ContentTypeDecoder } from './encoding'; +interface _MessageBuffer { + readonly encoding: RAL.MessageBufferEncoding; + /** + * Append data to the message buffer. + * + * @param chunk the data to append. + */ + append(chunk: Uint8Array | string): void; + /** + * Tries to read the headers from the buffer + * + * @param lowerCaseKeys Whether the keys should be stored lower case. Doing + * so is recommended since HTTP headers are case insensitive. + * + * @returns the header properties or undefined in not enough data can be read. + */ + tryReadHeaders(lowerCaseKeys?: boolean): Map | undefined; + /** + * Tries to read the body of the given length. + * + * @param length the amount of bytes to read. + * @returns the data or undefined int less data is available. + */ + tryReadBody(length: number): Uint8Array | undefined; +} +type _MessageBufferEncoding = 'ascii' | 'utf-8'; +interface _ReadableStream { + onData(listener: (data: Uint8Array) => void): Disposable; + onClose(listener: () => void): Disposable; + onError(listener: (error: any) => void): Disposable; + onEnd(listener: () => void): Disposable; +} +interface _WritableStream { + onClose(listener: () => void): Disposable; + onError(listener: (error: any) => void): Disposable; + onEnd(listener: () => void): Disposable; + write(data: Uint8Array): Promise; + write(data: string, encoding: _MessageBufferEncoding): Promise; + end(): void; +} +interface _DuplexStream extends _ReadableStream, _WritableStream { +} +interface RAL { + readonly applicationJson: { + readonly encoder: ContentTypeEncoder; + readonly decoder: ContentTypeDecoder; + }; + readonly messageBuffer: { + create(encoding: RAL.MessageBufferEncoding): RAL.MessageBuffer; + }; + readonly console: { + info(message?: any, ...optionalParams: any[]): void; + log(message?: any, ...optionalParams: any[]): void; + warn(message?: any, ...optionalParams: any[]): void; + error(message?: any, ...optionalParams: any[]): void; + }; + readonly timer: { + setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): Disposable; + setImmediate(callback: (...args: any[]) => void, ...args: any[]): Disposable; + setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): Disposable; + }; +} +declare function RAL(): RAL; +declare namespace RAL { + type MessageBuffer = _MessageBuffer; + type MessageBufferEncoding = _MessageBufferEncoding; + type ReadableStream = _ReadableStream; + type WritableStream = _WritableStream; + type DuplexStream = _DuplexStream; + function install(ral: RAL): void; +} +export default RAL; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.js new file mode 100644 index 0000000..ae335df --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/ral.js @@ -0,0 +1,23 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +let _ral; +function RAL() { + if (_ral === undefined) { + throw new Error(`No runtime abstraction layer installed`); + } + return _ral; +} +(function (RAL) { + function install(ral) { + if (ral === undefined) { + throw new Error(`No runtime abstraction layer provided`); + } + _ral = ral; + } + RAL.install = install; +})(RAL || (RAL = {})); +exports.default = RAL; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.d.ts new file mode 100644 index 0000000..1261daa --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.d.ts @@ -0,0 +1,10 @@ +export declare class Semaphore { + private _capacity; + private _active; + private _waiting; + constructor(capacity?: number); + lock(thunk: () => T | PromiseLike): Promise; + get active(): number; + private runNext; + private doRunNext; +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.js new file mode 100644 index 0000000..e1705cc --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/semaphore.js @@ -0,0 +1,74 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Semaphore = void 0; +const ral_1 = __importDefault(require("./ral")); +class Semaphore { + _capacity; + _active; + _waiting; + constructor(capacity = 1) { + if (capacity <= 0) { + throw new Error('Capacity must be greater than 0'); + } + this._capacity = capacity; + this._active = 0; + this._waiting = []; + } + lock(thunk) { + return new Promise((resolve, reject) => { + this._waiting.push({ thunk, resolve, reject }); + this.runNext(); + }); + } + get active() { + return this._active; + } + runNext() { + if (this._waiting.length === 0 || this._active === this._capacity) { + return; + } + (0, ral_1.default)().timer.setImmediate(() => this.doRunNext()); + } + doRunNext() { + if (this._waiting.length === 0 || this._active === this._capacity) { + return; + } + const next = this._waiting.shift(); + this._active++; + if (this._active > this._capacity) { + throw new Error(`Too many thunks active`); + } + try { + const result = next.thunk(); + if (result instanceof Promise) { + result.then((value) => { + this._active--; + next.resolve(value); + this.runNext(); + }, (err) => { + this._active--; + next.reject(err); + this.runNext(); + }); + } + else { + this._active--; + next.resolve(result); + this.runNext(); + } + } + catch (err) { + this._active--; + next.reject(err); + this.runNext(); + } + } +} +exports.Semaphore = Semaphore; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts new file mode 100644 index 0000000..c6e8d08 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts @@ -0,0 +1,15 @@ +import { RequestMessage } from './messages'; +import { AbstractCancellationTokenSource } from './cancellation'; +import { CancellationId, RequestCancellationReceiverStrategy, CancellationSenderStrategy, MessageConnection } from './connection'; +export declare class SharedArraySenderStrategy implements CancellationSenderStrategy { + private readonly buffers; + constructor(); + enableCancellation(request: RequestMessage): void; + sendCancellation(_conn: MessageConnection, id: CancellationId): Promise; + cleanup(id: CancellationId): void; + dispose(): void; +} +export declare class SharedArrayReceiverStrategy implements RequestCancellationReceiverStrategy { + readonly kind: "request"; + createCancellationTokenSource(request: RequestMessage): AbstractCancellationTokenSource; +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.js new file mode 100644 index 0000000..a931822 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.js @@ -0,0 +1,77 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SharedArrayReceiverStrategy = exports.SharedArraySenderStrategy = void 0; +const cancellation_1 = require("./cancellation"); +var CancellationState; +(function (CancellationState) { + CancellationState.Continue = 0; + CancellationState.Cancelled = 1; +})(CancellationState || (CancellationState = {})); +class SharedArraySenderStrategy { + buffers; + constructor() { + this.buffers = new Map(); + } + enableCancellation(request) { + if (request.id === null) { + return; + } + const buffer = new SharedArrayBuffer(4); + const data = new Int32Array(buffer, 0, 1); + data[0] = CancellationState.Continue; + this.buffers.set(request.id, buffer); + request.$cancellationData = buffer; + } + async sendCancellation(_conn, id) { + const buffer = this.buffers.get(id); + if (buffer === undefined) { + return; + } + const data = new Int32Array(buffer, 0, 1); + Atomics.store(data, 0, CancellationState.Cancelled); + } + cleanup(id) { + this.buffers.delete(id); + } + dispose() { + this.buffers.clear(); + } +} +exports.SharedArraySenderStrategy = SharedArraySenderStrategy; +class SharedArrayBufferCancellationToken { + data; + constructor(buffer) { + this.data = new Int32Array(buffer, 0, 1); + } + get isCancellationRequested() { + return Atomics.load(this.data, 0) === CancellationState.Cancelled; + } + get onCancellationRequested() { + throw new Error(`Cancellation over SharedArrayBuffer doesn't support cancellation events`); + } +} +class SharedArrayBufferCancellationTokenSource { + token; + constructor(buffer) { + this.token = new SharedArrayBufferCancellationToken(buffer); + } + cancel() { + } + dispose() { + } +} +class SharedArrayReceiverStrategy { + kind = 'request'; + createCancellationTokenSource(request) { + const buffer = request.$cancellationData; + if (buffer === undefined) { + return new cancellation_1.CancellationTokenSource(); + } + return new SharedArrayBufferCancellationTokenSource(buffer); + } +} +exports.SharedArrayReceiverStrategy = SharedArrayReceiverStrategy; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.d.ts new file mode 100644 index 0000000..926a954 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.d.ts @@ -0,0 +1,58 @@ +import { ChildProcess } from 'child_process'; +import { Socket } from 'net'; +import { MessagePort, Worker } from 'worker_threads'; +import { RAL, AbstractMessageReader, DataCallback, AbstractMessageWriter, Message, ReadableStreamMessageReader, WriteableStreamMessageWriter, MessageWriterOptions, MessageReaderOptions, MessageReader, MessageWriter, ConnectionStrategy, ConnectionOptions, MessageConnection, Logger, Disposable } from '../common/api'; +export * from '../common/api'; +export declare class IPCMessageReader extends AbstractMessageReader { + private process; + constructor(process: NodeJS.Process | ChildProcess); + listen(callback: DataCallback): Disposable; +} +export declare class IPCMessageWriter extends AbstractMessageWriter implements MessageWriter { + private readonly process; + private errorCount; + constructor(process: NodeJS.Process | ChildProcess); + write(msg: Message): Promise; + private handleError; + end(): void; +} +export declare class PortMessageReader extends AbstractMessageReader implements MessageReader { + private onData; + constructor(port: MessagePort | Worker); + listen(callback: DataCallback): Disposable; +} +export declare class PortMessageWriter extends AbstractMessageWriter implements MessageWriter { + private readonly port; + private errorCount; + constructor(port: MessagePort | Worker); + write(msg: Message): Promise; + private handleError; + end(): void; +} +export declare class SocketMessageReader extends ReadableStreamMessageReader { + constructor(socket: Socket, encoding?: RAL.MessageBufferEncoding); +} +export declare class SocketMessageWriter extends WriteableStreamMessageWriter { + private socket; + constructor(socket: Socket, options?: RAL.MessageBufferEncoding | MessageWriterOptions); + dispose(): void; +} +export declare class StreamMessageReader extends ReadableStreamMessageReader { + constructor(readable: NodeJS.ReadableStream, encoding?: RAL.MessageBufferEncoding | MessageReaderOptions); +} +export declare class StreamMessageWriter extends WriteableStreamMessageWriter { + constructor(writable: NodeJS.WritableStream, options?: RAL.MessageBufferEncoding | MessageWriterOptions); +} +export declare function generateRandomPipeName(): string; +export interface PipeTransport { + onConnected(): Promise<[MessageReader, MessageWriter]>; +} +export declare function createClientPipeTransport(pipeName: string, encoding?: RAL.MessageBufferEncoding): Promise; +export declare function createServerPipeTransport(pipeName: string, encoding?: RAL.MessageBufferEncoding): [MessageReader, MessageWriter]; +export interface SocketTransport { + onConnected(): Promise<[MessageReader, MessageWriter]>; +} +export declare function createClientSocketTransport(port: number, encoding?: RAL.MessageBufferEncoding): Promise; +export declare function createServerSocketTransport(port: number, encoding?: RAL.MessageBufferEncoding): [MessageReader, MessageWriter]; +export declare function createMessageConnection(reader: MessageReader, writer: MessageWriter, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): MessageConnection; +export declare function createMessageConnection(inputStream: NodeJS.ReadableStream, outputStream: NodeJS.WritableStream, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): MessageConnection; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.js new file mode 100644 index 0000000..7166046 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/main.js @@ -0,0 +1,289 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.StreamMessageWriter = exports.StreamMessageReader = exports.SocketMessageWriter = exports.SocketMessageReader = exports.PortMessageWriter = exports.PortMessageReader = exports.IPCMessageWriter = exports.IPCMessageReader = void 0; +exports.generateRandomPipeName = generateRandomPipeName; +exports.createClientPipeTransport = createClientPipeTransport; +exports.createServerPipeTransport = createServerPipeTransport; +exports.createClientSocketTransport = createClientSocketTransport; +exports.createServerSocketTransport = createServerSocketTransport; +exports.createMessageConnection = createMessageConnection; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ +const ril_1 = __importDefault(require("./ril")); +// Install the node runtime abstract. +ril_1.default.install(); +const path = __importStar(require("path")); +const os = __importStar(require("os")); +const fs = __importStar(require("fs")); +const crypto_1 = require("crypto"); +const net_1 = require("net"); +const api_1 = require("../common/api"); +__exportStar(require("../common/api"), exports); +class IPCMessageReader extends api_1.AbstractMessageReader { + process; + constructor(process) { + super(); + this.process = process; + const eventEmitter = this.process; + eventEmitter.on('error', (error) => this.fireError(error)); + eventEmitter.on('close', () => this.fireClose()); + } + listen(callback) { + this.process.on('message', callback); + return api_1.Disposable.create(() => this.process.off('message', callback)); + } +} +exports.IPCMessageReader = IPCMessageReader; +class IPCMessageWriter extends api_1.AbstractMessageWriter { + process; + errorCount; + constructor(process) { + super(); + this.process = process; + this.errorCount = 0; + const eventEmitter = this.process; + eventEmitter.on('error', (error) => this.fireError(error)); + eventEmitter.on('close', () => this.fireClose); + } + write(msg) { + try { + if (typeof this.process.send === 'function') { + this.process.send(msg, undefined, undefined, (error) => { + if (error) { + this.errorCount++; + this.handleError(error, msg); + } + else { + this.errorCount = 0; + } + }); + } + return Promise.resolve(); + } + catch (error) { + this.handleError(error, msg); + return Promise.reject(error); + } + } + handleError(error, msg) { + this.errorCount++; + this.fireError(error, msg, this.errorCount); + } + end() { + } +} +exports.IPCMessageWriter = IPCMessageWriter; +class PortMessageReader extends api_1.AbstractMessageReader { + onData; + constructor(port) { + super(); + this.onData = new api_1.Emitter; + port.on('close', () => this.fireClose); + port.on('error', (error) => this.fireError(error)); + port.on('message', (message) => { + this.onData.fire(message); + }); + } + listen(callback) { + return this.onData.event(callback); + } +} +exports.PortMessageReader = PortMessageReader; +class PortMessageWriter extends api_1.AbstractMessageWriter { + port; + errorCount; + constructor(port) { + super(); + this.port = port; + this.errorCount = 0; + port.on('close', () => this.fireClose()); + port.on('error', (error) => this.fireError(error)); + } + write(msg) { + try { + this.port.postMessage(msg); + return Promise.resolve(); + } + catch (error) { + this.handleError(error, msg); + return Promise.reject(error); + } + } + handleError(error, msg) { + this.errorCount++; + this.fireError(error, msg, this.errorCount); + } + end() { + } +} +exports.PortMessageWriter = PortMessageWriter; +class SocketMessageReader extends api_1.ReadableStreamMessageReader { + constructor(socket, encoding = 'utf-8') { + super((0, ril_1.default)().stream.asReadableStream(socket), encoding); + } +} +exports.SocketMessageReader = SocketMessageReader; +class SocketMessageWriter extends api_1.WriteableStreamMessageWriter { + socket; + constructor(socket, options) { + super((0, ril_1.default)().stream.asWritableStream(socket), options); + this.socket = socket; + } + dispose() { + super.dispose(); + this.socket.destroy(); + } +} +exports.SocketMessageWriter = SocketMessageWriter; +class StreamMessageReader extends api_1.ReadableStreamMessageReader { + constructor(readable, encoding) { + super((0, ril_1.default)().stream.asReadableStream(readable), encoding); + } +} +exports.StreamMessageReader = StreamMessageReader; +class StreamMessageWriter extends api_1.WriteableStreamMessageWriter { + constructor(writable, options) { + super((0, ril_1.default)().stream.asWritableStream(writable), options); + } +} +exports.StreamMessageWriter = StreamMessageWriter; +const XDG_RUNTIME_DIR = process.env['XDG_RUNTIME_DIR']; +const safeIpcPathLengths = new Map([ + ['linux', 107], + ['darwin', 103] +]); +function generateRandomPipeName() { + if (process.platform === 'win32') { + return `\\\\.\\pipe\\lsp-${(0, crypto_1.randomBytes)(16).toString('hex')}-sock`; + } + let randomLength = 32; + const fixedLength = '/lsp-.sock'.length; + const tmpDir = fs.realpathSync(XDG_RUNTIME_DIR ?? os.tmpdir()); + const limit = safeIpcPathLengths.get(process.platform); + if (limit !== undefined) { + randomLength = Math.min(limit - tmpDir.length - fixedLength, randomLength); + } + if (randomLength < 16) { + throw new Error(`Unable to generate a random pipe name with ${randomLength} characters.`); + } + const randomSuffix = (0, crypto_1.randomBytes)(Math.floor(randomLength / 2)).toString('hex'); + return path.join(tmpDir, `lsp-${randomSuffix}.sock`); +} +function createClientPipeTransport(pipeName, encoding = 'utf-8') { + let connectResolve; + const connected = new Promise((resolve, _reject) => { + connectResolve = resolve; + }); + return new Promise((resolve, reject) => { + const server = (0, net_1.createServer)((socket) => { + server.close(); + connectResolve([ + new SocketMessageReader(socket, encoding), + new SocketMessageWriter(socket, encoding) + ]); + }); + server.on('error', reject); + server.listen(pipeName, () => { + server.removeListener('error', reject); + resolve({ + onConnected: () => { return connected; } + }); + }); + }); +} +function createServerPipeTransport(pipeName, encoding = 'utf-8') { + const socket = (0, net_1.createConnection)(pipeName); + return [ + new SocketMessageReader(socket, encoding), + new SocketMessageWriter(socket, encoding) + ]; +} +function createClientSocketTransport(port, encoding = 'utf-8') { + let connectResolve; + const connected = new Promise((resolve, _reject) => { + connectResolve = resolve; + }); + return new Promise((resolve, reject) => { + const server = (0, net_1.createServer)((socket) => { + server.close(); + connectResolve([ + new SocketMessageReader(socket, encoding), + new SocketMessageWriter(socket, encoding) + ]); + }); + server.on('error', reject); + server.listen(port, '127.0.0.1', () => { + server.removeListener('error', reject); + resolve({ + onConnected: () => { return connected; } + }); + }); + }); +} +function createServerSocketTransport(port, encoding = 'utf-8') { + const socket = (0, net_1.createConnection)(port, '127.0.0.1'); + return [ + new SocketMessageReader(socket, encoding), + new SocketMessageWriter(socket, encoding) + ]; +} +function isReadableStream(value) { + const candidate = value; + return candidate.read !== undefined && candidate.addListener !== undefined; +} +function isWritableStream(value) { + const candidate = value; + return candidate.write !== undefined && candidate.addListener !== undefined; +} +function createMessageConnection(input, output, logger, options) { + if (!logger) { + logger = api_1.NullLogger; + } + const reader = isReadableStream(input) ? new StreamMessageReader(input) : input; + const writer = isWritableStream(output) ? new StreamMessageWriter(output) : output; + if (api_1.ConnectionStrategy.is(options)) { + options = { connectionStrategy: options }; + } + return (0, api_1.createMessageConnection)(reader, writer, logger, options); +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.d.ts new file mode 100644 index 0000000..02202e0 --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.d.ts @@ -0,0 +1,12 @@ +import { RAL } from '../common/api'; +interface RIL extends RAL { + readonly stream: { + readonly asReadableStream: (stream: NodeJS.ReadableStream) => RAL.ReadableStream; + readonly asWritableStream: (stream: NodeJS.WritableStream) => RAL.WritableStream; + }; +} +declare function RIL(): RIL; +declare namespace RIL { + function install(): void; +} +export default RIL; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.js b/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.js new file mode 100644 index 0000000..10bcc0a --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/lib/node/ril.js @@ -0,0 +1,163 @@ +"use strict"; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", { value: true }); +const util_1 = require("util"); +const api_1 = require("../common/api"); +class MessageBuffer extends api_1.AbstractMessageBuffer { + static emptyBuffer = Buffer.allocUnsafe(0); + constructor(encoding = 'utf-8') { + super(encoding); + } + emptyBuffer() { + return MessageBuffer.emptyBuffer; + } + fromString(value, encoding) { + return Buffer.from(value, encoding); + } + toString(value, encoding) { + if (value instanceof Buffer) { + return value.toString(encoding); + } + else { + return new util_1.TextDecoder(encoding).decode(value); + } + } + asNative(buffer, length) { + if (length === undefined) { + return buffer instanceof Buffer ? buffer : Buffer.from(buffer); + } + else { + return buffer instanceof Buffer ? buffer.slice(0, length) : Buffer.from(buffer, 0, length); + } + } + allocNative(length) { + return Buffer.allocUnsafe(length); + } +} +class ReadableStreamWrapper { + stream; + constructor(stream) { + this.stream = stream; + } + onClose(listener) { + this.stream.on('close', listener); + return api_1.Disposable.create(() => this.stream.off('close', listener)); + } + onError(listener) { + this.stream.on('error', listener); + return api_1.Disposable.create(() => this.stream.off('error', listener)); + } + onEnd(listener) { + this.stream.on('end', listener); + return api_1.Disposable.create(() => this.stream.off('end', listener)); + } + onData(listener) { + this.stream.on('data', listener); + return api_1.Disposable.create(() => this.stream.off('data', listener)); + } +} +class WritableStreamWrapper { + stream; + constructor(stream) { + this.stream = stream; + } + onClose(listener) { + this.stream.on('close', listener); + return api_1.Disposable.create(() => this.stream.off('close', listener)); + } + onError(listener) { + this.stream.on('error', listener); + return api_1.Disposable.create(() => this.stream.off('error', listener)); + } + onEnd(listener) { + this.stream.on('end', listener); + return api_1.Disposable.create(() => this.stream.off('end', listener)); + } + write(data, encoding) { + return new Promise((resolve, reject) => { + const callback = (error) => { + if (error === undefined || error === null) { + resolve(); + } + else { + reject(error); + } + }; + if (typeof data === 'string') { + this.stream.write(data, encoding, callback); + } + else { + this.stream.write(data, callback); + } + }); + } + end() { + this.stream.end(); + } +} +const _ril = Object.freeze({ + messageBuffer: Object.freeze({ + create: (encoding) => new MessageBuffer(encoding) + }), + applicationJson: Object.freeze({ + encoder: Object.freeze({ + name: 'application/json', + encode: (msg, options) => { + try { + return Promise.resolve(Buffer.from(JSON.stringify(msg, undefined, 0), options.charset)); + } + catch (err) { + return Promise.reject(err); + } + } + }), + decoder: Object.freeze({ + name: 'application/json', + decode: (buffer, options) => { + try { + if (buffer instanceof Buffer) { + return Promise.resolve(JSON.parse(buffer.toString(options.charset))); + } + else { + return Promise.resolve(JSON.parse(new util_1.TextDecoder(options.charset).decode(buffer))); + } + } + catch (err) { + return Promise.reject(err); + } + } + }) + }), + stream: Object.freeze({ + asReadableStream: (stream) => new ReadableStreamWrapper(stream), + asWritableStream: (stream) => new WritableStreamWrapper(stream) + }), + console: console, + timer: Object.freeze({ + setTimeout(callback, ms, ...args) { + const handle = setTimeout(callback, ms, ...args); + return { dispose: () => clearTimeout(handle) }; + }, + setImmediate(callback, ...args) { + const handle = setImmediate(callback, ...args); + return { dispose: () => clearImmediate(handle) }; + }, + setInterval(callback, ms, ...args) { + const handle = setInterval(callback, ms, ...args); + return { dispose: () => clearInterval(handle) }; + } + }) +}); +function RIL() { + return _ril; +} +(function (RIL) { + function install() { + api_1.RAL.install(_ril); + } + RIL.install = install; +})(RIL || (RIL = {})); +exports.default = RIL; diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/package.json b/node_modules/typescript/vendor/vscode-jsonrpc/package.json new file mode 100644 index 0000000..457b7ca --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/package.json @@ -0,0 +1,54 @@ +{ + "name": "vscode-jsonrpc", + "description": "A json rpc implementation over streams", + "version": "9.0.0", + "author": "Microsoft Corporation", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/Microsoft/vscode-languageserver-node.git", + "directory": "jsonrpc" + }, + "bugs": { + "url": "https://github.com/Microsoft/vscode-languageserver-node/issues" + }, + "engines": { + "node": ">=14.0.0" + }, + "exports": { + ".": { + "types": "./lib/common/api.d.ts", + "default": "./lib/common/api.js" + }, + "./node": { + "types": "./lib/node/main.d.ts", + "node": "./lib/node/main.js" + }, + "./browser": { + "types": "./lib/browser/main.d.ts", + "browser": "./lib/browser/main.js" + } + }, + "devDependencies": { + "@types/msgpack-lite": "^0.1.12", + "msgpack-lite": "^0.1.26" + }, + "scripts": { + "prepublishOnly": "echo \"⛔ Can only publish from a secure pipeline ⛔\" && node ../build/npm/fail", + "prepack": "npm run all:publish", + "preversion": "npm test", + "compile": "tsc -b ./tsconfig.json", + "watch": "tsc -b ./tsconfig.watch.json -w", + "clean": "rimraf lib && rimraf dist", + "lint": "eslint src", + "test": "npm run test:node && npm run test:browser", + "test:node": "node ../node_modules/mocha/bin/_mocha", + "test:browser": "npm run webpack:test:silent && node ../build/bin/runBrowserTests.js http://127.0.0.1:8080/jsonrpc/src/browser/test/", + "webpack": "node ../build/bin/webpack --mode none --config ./webpack.config.js", + "webpack:test": "node ../build/bin/webpack --mode none --config ./src/browser/test/webpack.config.js", + "webpack:test:silent": "node ../build/bin/webpack --no-stats --mode none --config ./src/browser/test/webpack.config.js", + "all": "npm run clean && npm run compile && npm run lint && npm run test", + "compile:publish": "tsc -b ./tsconfig.publish.json", + "all:publish": "git clean -xfd . && npm install && npm run compile:publish && npm run lint && npm run test" + } +} diff --git a/node_modules/typescript/vendor/vscode-jsonrpc/typings/thenable.d.ts b/node_modules/typescript/vendor/vscode-jsonrpc/typings/thenable.d.ts new file mode 100644 index 0000000..8c4d2ee --- /dev/null +++ b/node_modules/typescript/vendor/vscode-jsonrpc/typings/thenable.d.ts @@ -0,0 +1,5 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +interface Thenable extends PromiseLike { } \ No newline at end of file diff --git a/node_modules/undici-types/LICENSE b/node_modules/undici-types/LICENSE new file mode 100644 index 0000000..e7323bb --- /dev/null +++ b/node_modules/undici-types/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Matteo Collina and Undici contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/undici-types/README.md b/node_modules/undici-types/README.md new file mode 100644 index 0000000..20a721c --- /dev/null +++ b/node_modules/undici-types/README.md @@ -0,0 +1,6 @@ +# undici-types + +This package is a dual-publish of the [undici](https://www.npmjs.com/package/undici) library types. The `undici` package **still contains types**. This package is for users who _only_ need undici types (such as for `@types/node`). It is published alongside every release of `undici`, so you can always use the same version. + +- [GitHub nodejs/undici](https://github.com/nodejs/undici) +- [Undici Documentation](https://undici.nodejs.org/#/) diff --git a/node_modules/undici-types/agent.d.ts b/node_modules/undici-types/agent.d.ts new file mode 100644 index 0000000..3d41105 --- /dev/null +++ b/node_modules/undici-types/agent.d.ts @@ -0,0 +1,30 @@ +import { URL } from 'node:url' +import Pool from './pool' +import Dispatcher from './dispatcher' +import TClientStats from './client-stats' +import TPoolStats from './pool-stats' + +export default Agent + +declare class Agent extends Dispatcher { + constructor (opts?: Agent.Options) + /** `true` after `dispatcher.close()` has been called. */ + closed: boolean + /** `true` after `dispatcher.destroyed()` has been called or `dispatcher.close()` has been called and the dispatcher shutdown has completed. */ + destroyed: boolean + /** Dispatches a request. */ + dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean + /** Aggregate stats for a Agent by origin. */ + readonly stats: Record +} + +declare namespace Agent { + export interface Options extends Pool.Options { + /** Default: `(origin, opts) => new Pool(origin, opts)`. */ + factory?(origin: string | URL, opts: Object): Dispatcher; + maxOrigins?: number + } + + export interface DispatchOptions extends Dispatcher.DispatchOptions { + } +} diff --git a/node_modules/undici-types/api.d.ts b/node_modules/undici-types/api.d.ts new file mode 100644 index 0000000..b362b14 --- /dev/null +++ b/node_modules/undici-types/api.d.ts @@ -0,0 +1,43 @@ +import { URL, UrlObject } from 'node:url' +import { Duplex } from 'node:stream' +import Dispatcher from './dispatcher' + +/** Performs an HTTP request. */ +declare function request ( + url: string | URL | UrlObject, + options?: { dispatcher?: Dispatcher } & Omit, 'origin' | 'path' | 'method'> & Partial>, +): Promise> + +/** A faster version of `request`. */ +declare function stream ( + url: string | URL | UrlObject, + options: { dispatcher?: Dispatcher } & Omit, 'origin' | 'path'>, + factory: Dispatcher.StreamFactory +): Promise> + +/** For easy use with `stream.pipeline`. */ +declare function pipeline ( + url: string | URL | UrlObject, + options: { dispatcher?: Dispatcher } & Omit, 'origin' | 'path'>, + handler: Dispatcher.PipelineHandler +): Duplex + +/** Starts two-way communications with the requested resource. */ +declare function connect ( + url: string | URL | UrlObject, + options?: { dispatcher?: Dispatcher } & Omit, 'origin' | 'path'> +): Promise> + +/** Upgrade to a different protocol. */ +declare function upgrade ( + url: string | URL | UrlObject, + options?: { dispatcher?: Dispatcher } & Omit +): Promise + +export { + request, + stream, + pipeline, + connect, + upgrade +} diff --git a/node_modules/undici-types/balanced-pool.d.ts b/node_modules/undici-types/balanced-pool.d.ts new file mode 100644 index 0000000..1813e0c --- /dev/null +++ b/node_modules/undici-types/balanced-pool.d.ts @@ -0,0 +1,30 @@ +import Pool from './pool' +import Dispatcher from './dispatcher' +import { URL } from 'node:url' + +export default BalancedPool + +type BalancedPoolConnectOptions = Omit + +declare class BalancedPool extends Dispatcher { + constructor (url: string | string[] | URL | URL[], options?: Pool.Options) + + addUpstream (upstream: string | URL): BalancedPool + removeUpstream (upstream: string | URL): BalancedPool + getUpstream (upstream: string | URL): Pool | undefined + upstreams: Array + + /** `true` after `pool.close()` has been called. */ + closed: boolean + /** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */ + destroyed: boolean + + // Override dispatcher APIs. + override connect ( + options: BalancedPoolConnectOptions + ): Promise + override connect ( + options: BalancedPoolConnectOptions, + callback: (err: Error | null, data: Dispatcher.ConnectData) => void + ): void +} diff --git a/node_modules/undici-types/cache-interceptor.d.ts b/node_modules/undici-types/cache-interceptor.d.ts new file mode 100644 index 0000000..8588ccd --- /dev/null +++ b/node_modules/undici-types/cache-interceptor.d.ts @@ -0,0 +1,179 @@ +import { Readable, Writable } from 'node:stream' + +export default CacheHandler + +declare namespace CacheHandler { + export type CacheMethods = 'GET' | 'HEAD' | 'OPTIONS' | 'TRACE' + + export interface CacheHandlerOptions { + store: CacheStore + + cacheByDefault?: number + + type?: CacheOptions['type'] + } + + export interface CacheOptions { + store?: CacheStore + + /** + * The methods to cache + * Note we can only cache safe methods. Unsafe methods (i.e. PUT, POST) + * invalidate the cache for a origin. + * @see https://www.rfc-editor.org/rfc/rfc9111.html#name-invalidating-stored-respons + * @see https://www.rfc-editor.org/rfc/rfc9110#section-9.2.1 + */ + methods?: CacheMethods[] + + /** + * RFC9111 allows for caching responses that we aren't explicitly told to + * cache or to not cache. + * @see https://www.rfc-editor.org/rfc/rfc9111.html#section-3-5 + * @default undefined + */ + cacheByDefault?: number + + /** + * TODO docs + * @default 'shared' + */ + type?: 'shared' | 'private' + + /** + * Array of origins to cache. Only requests to these origins will be cached. + * Supports strings (case insensitive) and RegExp patterns. + * @default undefined (cache all origins) + */ + origins?: (string | RegExp)[] + } + + export interface CacheControlDirectives { + 'max-stale'?: number; + 'min-fresh'?: number; + 'max-age'?: number; + 's-maxage'?: number; + 'stale-while-revalidate'?: number; + 'stale-if-error'?: number; + public?: true; + private?: true | string[]; + 'no-store'?: true; + 'no-cache'?: true | string[]; + 'must-revalidate'?: true; + 'proxy-revalidate'?: true; + immutable?: true; + 'no-transform'?: true; + 'must-understand'?: true; + 'only-if-cached'?: true; + } + + export interface CacheKey { + origin: string + method: string + path: string + headers?: Record + } + + export interface CacheValue { + statusCode: number + statusMessage: string + headers: Record + vary?: Record + etag?: string + cacheControlDirectives?: CacheControlDirectives + cachedAt: number + staleAt: number + deleteAt: number + } + + export interface DeleteByUri { + origin: string + method: string + path: string + } + + type GetResult = { + statusCode: number + statusMessage: string + headers: Record + vary?: Record + etag?: string + body?: Readable | Iterable | AsyncIterable | Buffer | Iterable | AsyncIterable | string + cacheControlDirectives: CacheControlDirectives, + cachedAt: number + staleAt: number + deleteAt: number + } + + /** + * Underlying storage provider for cached responses + */ + export interface CacheStore { + get(key: CacheKey): GetResult | Promise | undefined + + createWriteStream(key: CacheKey, val: CacheValue): Writable | undefined + + delete(key: CacheKey): void | Promise + } + + export interface MemoryCacheStoreOpts { + /** + * @default Infinity + */ + maxCount?: number + + /** + * @default Infinity + */ + maxSize?: number + + /** + * @default Infinity + */ + maxEntrySize?: number + + errorCallback?: (err: Error) => void + } + + export class MemoryCacheStore implements CacheStore { + constructor (opts?: MemoryCacheStoreOpts) + + get (key: CacheKey): GetResult | Promise | undefined + + createWriteStream (key: CacheKey, value: CacheValue): Writable | undefined + + delete (key: CacheKey): void | Promise + } + + export interface SqliteCacheStoreOpts { + /** + * Location of the database + * @default ':memory:' + */ + location?: string + + /** + * @default Infinity + */ + maxCount?: number + + /** + * @default Infinity + */ + maxEntrySize?: number + } + + export class SqliteCacheStore implements CacheStore { + constructor (opts?: SqliteCacheStoreOpts) + + /** + * Closes the connection to the database + */ + close (): void + + get (key: CacheKey): GetResult | Promise | undefined + + createWriteStream (key: CacheKey, value: CacheValue): Writable | undefined + + delete (key: CacheKey): void | Promise + } +} diff --git a/node_modules/undici-types/cache.d.ts b/node_modules/undici-types/cache.d.ts new file mode 100644 index 0000000..4c33335 --- /dev/null +++ b/node_modules/undici-types/cache.d.ts @@ -0,0 +1,36 @@ +import type { RequestInfo, Response, Request } from './fetch' + +export interface CacheStorage { + match (request: RequestInfo, options?: MultiCacheQueryOptions): Promise, + has (cacheName: string): Promise, + open (cacheName: string): Promise, + delete (cacheName: string): Promise, + keys (): Promise +} + +declare const CacheStorage: { + prototype: CacheStorage + new(): CacheStorage +} + +export interface Cache { + match (request: RequestInfo, options?: CacheQueryOptions): Promise, + matchAll (request?: RequestInfo, options?: CacheQueryOptions): Promise, + add (request: RequestInfo): Promise, + addAll (requests: RequestInfo[]): Promise, + put (request: RequestInfo, response: Response): Promise, + delete (request: RequestInfo, options?: CacheQueryOptions): Promise, + keys (request?: RequestInfo, options?: CacheQueryOptions): Promise +} + +export interface CacheQueryOptions { + ignoreSearch?: boolean, + ignoreMethod?: boolean, + ignoreVary?: boolean +} + +export interface MultiCacheQueryOptions extends CacheQueryOptions { + cacheName?: string +} + +export declare const caches: CacheStorage diff --git a/node_modules/undici-types/client-stats.d.ts b/node_modules/undici-types/client-stats.d.ts new file mode 100644 index 0000000..ad9bd84 --- /dev/null +++ b/node_modules/undici-types/client-stats.d.ts @@ -0,0 +1,15 @@ +import Client from './client' + +export default ClientStats + +declare class ClientStats { + constructor (pool: Client) + /** If socket has open connection. */ + connected: boolean + /** Number of open socket connections in this client that do not have an active request. */ + pending: number + /** Number of currently active requests of this client. */ + running: number + /** Number of active, pending, or queued requests of this client. */ + size: number +} diff --git a/node_modules/undici-types/client.d.ts b/node_modules/undici-types/client.d.ts new file mode 100644 index 0000000..e3b1219 --- /dev/null +++ b/node_modules/undici-types/client.d.ts @@ -0,0 +1,134 @@ +import { URL } from 'node:url' +import Dispatcher from './dispatcher' +import buildConnector from './connector' +import TClientStats from './client-stats' + +type ClientConnectOptions = Omit, 'origin'> + +/** + * A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default. + */ +export class Client extends Dispatcher { + constructor (url: string | URL, options?: Client.Options) + /** Property to get and set the pipelining factor. */ + pipelining: number + /** `true` after `client.close()` has been called. */ + closed: boolean + /** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */ + destroyed: boolean + /** Aggregate stats for a Client. */ + readonly stats: TClientStats + + // Override dispatcher APIs. + override connect ( + options: ClientConnectOptions + ): Promise> + override connect ( + options: ClientConnectOptions, + callback: (err: Error | null, data: Dispatcher.ConnectData) => void + ): void +} + +export declare namespace Client { + export interface Options { + /** The maximum length of request headers in bytes. Default: Node.js' `--max-http-header-size` or `16384` (16KiB). */ + maxHeaderSize?: number; + /** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). HTTP/1.1 parser timeouts are not guaranteed to fire with exact millisecond precision: delays up to 1000ms use native timers, while larger delays use lower-overhead fast timers with a target resolution around 500ms. */ + headersTimeout?: number; + /** @deprecated unsupported socketTimeout, use headersTimeout & bodyTimeout instead */ + socketTimeout?: never; + /** @deprecated unsupported requestTimeout, use headersTimeout & bodyTimeout instead */ + requestTimeout?: never; + /** The timeout for establishing a socket connection, in milliseconds. Use `0` to disable it entirely. Default: `10e3` milliseconds (10s). */ + connectTimeout?: number; + /** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). HTTP/1.1 parser timeouts are not guaranteed to fire with exact millisecond precision: delays up to 1000ms use native timers, while larger delays use lower-overhead fast timers with a target resolution around 500ms. */ + bodyTimeout?: number; + /** @deprecated unsupported idleTimeout, use keepAliveTimeout instead */ + idleTimeout?: never; + /** @deprecated unsupported keepAlive, use pipelining=0 instead */ + keepAlive?: never; + /** the timeout, in milliseconds, after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. Default: `4e3` milliseconds (4s). */ + keepAliveTimeout?: number; + /** @deprecated unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead */ + maxKeepAliveTimeout?: never; + /** the maximum allowed `idleTimeout`, in milliseconds, when overridden by *keep-alive* hints from the server. Default: `600e3` milliseconds (10min). */ + keepAliveMaxTimeout?: number; + /** A number of milliseconds subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */ + keepAliveTimeoutThreshold?: number; + /** An IPC endpoint, either a Unix domain socket or Windows named pipe. Default: `null`. */ + socketPath?: string; + /** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Only enable values greater than `1` when the remote server is trusted. Default: `1`. */ + pipelining?: number; + /** @deprecated use the connect option instead */ + tls?: never; + /** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */ + strictContentLength?: boolean; + /** Maximum number of TLS cached sessions used by the built-in connector. Use `0` to disable TLS session caching. Default: `100`. */ + maxCachedSessions?: number; + /** Connector options passed to `buildConnector`, or a custom connector function. Default: `null`. */ + connect?: Partial | buildConnector.connector; + /** The maximum number of requests to send over a single connection before it is reset. Use `0` to disable this limit. Default: `null`. */ + maxRequestsPerClient?: number; + /** Local IP address the socket should connect from. */ + localAddress?: string; + /** Max response body size in bytes, -1 is disabled */ + maxResponseSize?: number; + /** WebSocket-specific options */ + webSocket?: Client.WebSocketOptions; + /** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */ + autoSelectFamily?: boolean; + /** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */ + autoSelectFamilyAttemptTimeout?: number; + /** + * @description Enables support for H2 if the server has assigned bigger priority to it through ALPN negotiation. + * @default true + */ + allowH2?: boolean; + /** + * @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame. + * @default 100 + */ + maxConcurrentStreams?: number; + /** + * @description Sets the HTTP/2 stream-level flow-control window size (SETTINGS_INITIAL_WINDOW_SIZE). + * @default 262144 + */ + initialWindowSize?: number; + /** + * @description Sets the HTTP/2 connection-level flow-control window size (ClientHttp2Session.setLocalWindowSize). + * @default 524288 + */ + connectionWindowSize?: number; + /** + * @description Time interval between PING frames dispatch + * @default 60000 + */ + pingInterval?: number; + } + export interface SocketInfo { + localAddress?: string + localPort?: number + remoteAddress?: string + remotePort?: number + remoteFamily?: string + timeout?: number + bytesWritten?: number + bytesRead?: number + } + export interface WebSocketOptions { + /** + * Maximum number of fragments in a message. Set to 0 to disable the limit. + * @default 131072 + */ + maxFragments?: number; + /** + * Maximum allowed payload size in bytes for WebSocket messages. + * Applied to uncompressed messages, compressed frame payloads, and decompressed (permessage-deflate) messages. + * Set to 0 to disable the limit. + * @default 134217728 (128 MB) + */ + maxPayloadSize?: number; + } +} + +export default Client diff --git a/node_modules/undici-types/connector.d.ts b/node_modules/undici-types/connector.d.ts new file mode 100644 index 0000000..b089942 --- /dev/null +++ b/node_modules/undici-types/connector.d.ts @@ -0,0 +1,37 @@ +import { TLSSocket, ConnectionOptions } from 'node:tls' +import { IpcNetConnectOpts, Socket, TcpNetConnectOpts } from 'node:net' + +export default buildConnector +declare function buildConnector (options?: buildConnector.BuildOptions): buildConnector.connector + +declare namespace buildConnector { + export type BuildOptions = (ConnectionOptions | TcpNetConnectOpts | IpcNetConnectOpts) & { + allowH2?: boolean; + preferH2?: boolean; + maxCachedSessions?: number | null; + socketPath?: string | null; + timeout?: number | null; + port?: number; + keepAlive?: boolean | null; + keepAliveInitialDelay?: number | null; + typeOfService?: number | null; + } + + export interface Options { + hostname: string + host?: string + protocol: string + port: string + servername?: string + localAddress?: string | null + socketPath?: string | null + httpSocket?: Socket + } + + export type Callback = (...args: CallbackArgs) => void + type CallbackArgs = [null, Socket | TLSSocket] | [Error, null] + + export interface connector { + (options: buildConnector.Options, callback: buildConnector.Callback): void + } +} diff --git a/node_modules/undici-types/content-type.d.ts b/node_modules/undici-types/content-type.d.ts new file mode 100644 index 0000000..f2a87f1 --- /dev/null +++ b/node_modules/undici-types/content-type.d.ts @@ -0,0 +1,21 @@ +/// + +interface MIMEType { + type: string + subtype: string + parameters: Map + essence: string +} + +/** + * Parse a string to a {@link MIMEType} object. Returns `failure` if the string + * couldn't be parsed. + * @see https://mimesniff.spec.whatwg.org/#parse-a-mime-type + */ +export function parseMIMEType (input: string): 'failure' | MIMEType + +/** + * Convert a MIMEType object to a string. + * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type + */ +export function serializeAMimeType (mimeType: MIMEType): string diff --git a/node_modules/undici-types/cookies.d.ts b/node_modules/undici-types/cookies.d.ts new file mode 100644 index 0000000..d8dc1f6 --- /dev/null +++ b/node_modules/undici-types/cookies.d.ts @@ -0,0 +1,30 @@ +/// + +import type { Headers } from './fetch' + +export interface Cookie { + name: string + value: string + expires?: Date | number + maxAge?: number + domain?: string + path?: string + secure?: boolean + httpOnly?: boolean + sameSite?: 'Strict' | 'Lax' | 'None' + unparsed?: string[] +} + +export function deleteCookie ( + headers: Headers, + name: string, + attributes?: { path?: string, domain?: string } +): void + +export function getCookies (headers: Headers): Record + +export function getSetCookies (headers: Headers): Cookie[] + +export function setCookie (headers: Headers, cookie: Cookie): void + +export function parseCookie (cookie: string): Cookie | null diff --git a/node_modules/undici-types/diagnostics-channel.d.ts b/node_modules/undici-types/diagnostics-channel.d.ts new file mode 100644 index 0000000..3c6a529 --- /dev/null +++ b/node_modules/undici-types/diagnostics-channel.d.ts @@ -0,0 +1,74 @@ +import { Socket } from 'node:net' +import { URL } from 'node:url' +import buildConnector from './connector' +import Dispatcher from './dispatcher' + +declare namespace DiagnosticsChannel { + interface Request { + origin?: string | URL; + completed: boolean; + method?: Dispatcher.HttpMethod; + path: string; + headers: any; + } + interface Response { + statusCode: number; + statusText: string; + headers: Array; + } + interface ConnectParams { + host: URL['host']; + hostname: URL['hostname']; + protocol: URL['protocol']; + port: URL['port']; + servername: string | null; + } + type Connector = buildConnector.connector + export interface RequestCreateMessage { + request: Request; + } + export interface RequestBodySentMessage { + request: Request; + } + + export interface RequestBodyChunkSentMessage { + request: Request; + chunk: Uint8Array | string; + } + export interface RequestBodyChunkReceivedMessage { + request: Request; + chunk: Buffer; + } + export interface RequestHeadersMessage { + request: Request; + response: Response; + } + export interface RequestTrailersMessage { + request: Request; + trailers: Array; + } + export interface RequestErrorMessage { + request: Request; + error: Error; + } + export interface ClientSendHeadersMessage { + request: Request; + headers: string; + socket: Socket; + } + export interface ClientBeforeConnectMessage { + connectParams: ConnectParams; + connector: Connector; + } + export interface ClientConnectedMessage { + socket: Socket; + connectParams: ConnectParams; + connector: Connector; + } + export interface ClientConnectErrorMessage { + error: Error; + socket: Socket; + connectParams: ConnectParams; + connector: Connector; + } +} diff --git a/node_modules/undici-types/dispatcher.d.ts b/node_modules/undici-types/dispatcher.d.ts new file mode 100644 index 0000000..1c2e335 --- /dev/null +++ b/node_modules/undici-types/dispatcher.d.ts @@ -0,0 +1,253 @@ +import { URL } from 'node:url' +import { Duplex, Readable, Writable } from 'node:stream' +import { EventEmitter } from 'node:events' +import { Blob } from 'node:buffer' +import { IncomingHttpHeaders, OutgoingHttpHeaders } from './header' +import BodyReadable from './readable' +import { FormData } from './formdata' +import Errors from './errors' +import { Autocomplete } from './utility' + +export default Dispatcher + +export type UndiciHeaders = OutgoingHttpHeaders | string[] | Iterable<[string, string | string[] | undefined]> | null + +/** Dispatcher is the core API used to dispatch requests. */ +declare class Dispatcher extends EventEmitter { + /** Dispatches a request. This API is expected to evolve through semver-major versions and is less stable than the preceding higher level APIs. It is primarily intended for library developers who implement higher level APIs on top of this. */ + dispatch (options: Dispatcher.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean + /** Starts two-way communications with the requested resource. */ + connect(options: Dispatcher.ConnectOptions, callback: (err: Error | null, data: Dispatcher.ConnectData) => void): void + connect(options: Dispatcher.ConnectOptions): Promise> + /** Compose a chain of dispatchers */ + compose (dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher + compose (...dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher + /** Performs an HTTP request. */ + request(options: Dispatcher.RequestOptions, callback: (err: Error | null, data: Dispatcher.ResponseData) => void): void + request(options: Dispatcher.RequestOptions): Promise> + /** For easy use with `stream.pipeline`. */ + pipeline(options: Dispatcher.PipelineOptions, handler: Dispatcher.PipelineHandler): Duplex + /** A faster version of `Dispatcher.request`. */ + stream(options: Dispatcher.RequestOptions, factory: Dispatcher.StreamFactory, callback: (err: Error | null, data: Dispatcher.StreamData) => void): void + stream(options: Dispatcher.RequestOptions, factory: Dispatcher.StreamFactory): Promise> + /** Upgrade to a different protocol. */ + upgrade (options: Dispatcher.UpgradeOptions, callback: (err: Error | null, data: Dispatcher.UpgradeData) => void): void + upgrade (options: Dispatcher.UpgradeOptions): Promise + /** Closes the client and gracefully waits for enqueued requests to complete before invoking the callback (or returning a promise if no callback is provided). */ + close (callback: () => void): void + close (): Promise + /** Destroy the client abruptly with the given err. All the pending and running requests will be asynchronously aborted and error. Waits until socket is closed before invoking the callback (or returning a promise if no callback is provided). Since this operation is asynchronously dispatched there might still be some progress on dispatched requests. */ + destroy (err: Error | null, callback: () => void): void + destroy (callback: () => void): void + destroy (err: Error | null): Promise + destroy (): Promise + + on (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this + on (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + on (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + on (eventName: 'drain', callback: (origin: URL) => void): this + + once (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this + once (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + once (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + once (eventName: 'drain', callback: (origin: URL) => void): this + + off (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this + off (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + off (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + off (eventName: 'drain', callback: (origin: URL) => void): this + + addListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this + addListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + addListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + addListener (eventName: 'drain', callback: (origin: URL) => void): this + + removeListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this + removeListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + removeListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + removeListener (eventName: 'drain', callback: (origin: URL) => void): this + + prependListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this + prependListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + prependListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + prependListener (eventName: 'drain', callback: (origin: URL) => void): this + + prependOnceListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this + prependOnceListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + prependOnceListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this + prependOnceListener (eventName: 'drain', callback: (origin: URL) => void): this + + listeners (eventName: 'connect'): ((origin: URL, targets: readonly Dispatcher[]) => void)[] + listeners (eventName: 'disconnect'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[] + listeners (eventName: 'connectionError'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[] + listeners (eventName: 'drain'): ((origin: URL) => void)[] + + rawListeners (eventName: 'connect'): ((origin: URL, targets: readonly Dispatcher[]) => void)[] + rawListeners (eventName: 'disconnect'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[] + rawListeners (eventName: 'connectionError'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[] + rawListeners (eventName: 'drain'): ((origin: URL) => void)[] + + emit (eventName: 'connect', origin: URL, targets: readonly Dispatcher[]): boolean + emit (eventName: 'disconnect', origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean + emit (eventName: 'connectionError', origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean + emit (eventName: 'drain', origin: URL): boolean +} + +declare namespace Dispatcher { + export interface ComposedDispatcher extends Dispatcher { } + export type Dispatch = Dispatcher['dispatch'] + export type DispatcherComposeInterceptor = (dispatch: Dispatch) => Dispatch + export interface DispatchOptions { + origin?: string | URL; + path: string; + method: HttpMethod; + /** Default: `null` */ + body?: string | Buffer | Uint8Array | Readable | null | FormData; + /** Default: `null` */ + headers?: UndiciHeaders; + /** Query string params to be embedded in the request URL. Default: `null` */ + query?: Record; + /** Whether the requests can be safely retried or not. If `false` the request won't be sent until all preceding requests in the pipeline have completed. Default: `true` if `method` is `HEAD` or `GET`. */ + idempotent?: boolean; + /** Whether the response is expected to take a long time and would end up blocking the pipeline. When this is set to `true` further pipelining will be avoided on the same connection until headers have been received. Defaults to `method !== 'HEAD'`. */ + blocking?: boolean; + /** The IP Type of Service (ToS) value for the request socket. Must be an integer between 0 and 255. */ + typeOfService?: number | null; + /** Upgrade the request. Should be used to specify the kind of upgrade i.e. `'Websocket'`. Default: `method === 'CONNECT' || null`. */ + upgrade?: boolean | string | null; + /** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers. Defaults to 300 seconds. HTTP/1.1 parser timeouts are not guaranteed to fire with exact millisecond precision: delays up to 1000ms use native timers, while larger delays use lower-overhead fast timers with a target resolution around 500ms. */ + headersTimeout?: number | null; + /** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use 0 to disable it entirely. Defaults to 300 seconds. HTTP/1.1 parser timeouts are not guaranteed to fire with exact millisecond precision: delays up to 1000ms use native timers, while larger delays use lower-overhead fast timers with a target resolution around 500ms. */ + bodyTimeout?: number | null; + /** Whether the request should stablish a keep-alive or not. Default `false` */ + reset?: boolean; + /** For H2, it appends the expect: 100-continue header, and halts the request body until a 100-continue is received from the remote server */ + expectContinue?: boolean; + } + export interface ConnectOptions { + origin: string | URL; + path: string; + /** Default: `null` */ + headers?: UndiciHeaders; + /** Default: `null` */ + signal?: AbortSignal | EventEmitter | null; + /** This argument parameter is passed through to `ConnectData` */ + opaque?: TOpaque; + /** Default: `null` */ + responseHeaders?: 'raw' | null; + } + export interface RequestOptions extends DispatchOptions { + /** Default: `null` */ + opaque?: TOpaque; + /** Default: `null` */ + signal?: AbortSignal | EventEmitter | null; + /** Default: `null` */ + onInfo?: (info: { statusCode: number, headers: Record }) => void; + /** Default: `null` */ + responseHeaders?: 'raw' | null; + /** Default: `64 KiB` */ + highWaterMark?: number; + } + export interface PipelineOptions extends RequestOptions { + /** `true` if the `handler` will return an object stream. Default: `false` */ + objectMode?: boolean; + } + export interface UpgradeOptions { + path: string; + /** Default: `'GET'` */ + method?: string; + /** Default: `null` */ + headers?: UndiciHeaders; + /** A string of comma separated protocols, in descending preference order. Default: `'Websocket'` */ + protocol?: string; + /** Default: `null` */ + signal?: AbortSignal | EventEmitter | null; + /** Default: `null` */ + responseHeaders?: 'raw' | null; + } + export interface ConnectData { + statusCode: number; + headers: IncomingHttpHeaders; + socket: Duplex; + opaque: TOpaque; + } + export interface ResponseData { + statusCode: number; + statusText: string; + headers: IncomingHttpHeaders; + body: BodyReadable & BodyMixin; + trailers: Record; + opaque: TOpaque; + context: object; + } + export interface PipelineHandlerData { + statusCode: number; + headers: IncomingHttpHeaders; + opaque: TOpaque; + body: BodyReadable; + context: object; + } + export interface StreamData { + opaque: TOpaque; + trailers: Record; + } + export interface UpgradeData { + headers: IncomingHttpHeaders; + socket: Duplex; + opaque: TOpaque; + } + export interface StreamFactoryData { + statusCode: number; + headers: IncomingHttpHeaders; + opaque: TOpaque; + context: object; + } + export type StreamFactory = (data: StreamFactoryData) => Writable + + export interface DispatchController { + get aborted(): boolean + get paused(): boolean + get reason(): Error | null + rawHeaders?: Buffer[] | string[] | IncomingHttpHeaders | null + rawTrailers?: Buffer[] | string[] | IncomingHttpHeaders | null + abort(reason: Error): void + pause(): void + resume(): void + } + + export interface DispatchHandler { + onRequestStart?(controller: DispatchController, context: any): void; + onRequestUpgrade?(controller: DispatchController, statusCode: number, headers: IncomingHttpHeaders, socket: Duplex): void; + onResponseStart?(controller: DispatchController, statusCode: number, headers: IncomingHttpHeaders, statusMessage?: string): void; + onResponseData?(controller: DispatchController, chunk: Buffer): void; + onResponseEnd?(controller: DispatchController, trailers: IncomingHttpHeaders): void; + onResponseError?(controller: DispatchController, error: Error): void; + + /** Invoked when response is received, before headers have been read. **/ + onResponseStarted?(): void; + /** Invoked when a body chunk is sent to the server. May be invoked multiple times for chunked requests */ + onBodySent?(chunk: Buffer): void; + /** Invoked after the request body is fully sent. */ + onRequestSent?(): void; + } + export type PipelineHandler = (data: PipelineHandlerData) => Readable + export type HttpMethod = Autocomplete<'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH'> + + /** + * @link https://fetch.spec.whatwg.org/#body-mixin + */ + interface BodyMixin { + readonly body?: never; + readonly bodyUsed: boolean; + arrayBuffer(): Promise; + blob(): Promise; + bytes(): Promise; + formData(): Promise; + json(): Promise; + text(): Promise; + } + + export interface DispatchInterceptor { + (dispatch: Dispatch): Dispatch + } +} diff --git a/node_modules/undici-types/dispatcher1-wrapper.d.ts b/node_modules/undici-types/dispatcher1-wrapper.d.ts new file mode 100644 index 0000000..f8a7d5e --- /dev/null +++ b/node_modules/undici-types/dispatcher1-wrapper.d.ts @@ -0,0 +1,7 @@ +import Dispatcher from './dispatcher' + +export default Dispatcher1Wrapper + +declare class Dispatcher1Wrapper extends Dispatcher { + constructor (dispatcher: Dispatcher) +} diff --git a/node_modules/undici-types/env-http-proxy-agent.d.ts b/node_modules/undici-types/env-http-proxy-agent.d.ts new file mode 100644 index 0000000..1733d7f --- /dev/null +++ b/node_modules/undici-types/env-http-proxy-agent.d.ts @@ -0,0 +1,22 @@ +import Agent from './agent' +import ProxyAgent from './proxy-agent' +import Dispatcher from './dispatcher' + +export default EnvHttpProxyAgent + +declare class EnvHttpProxyAgent extends Dispatcher { + constructor (opts?: EnvHttpProxyAgent.Options) + + dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean +} + +declare namespace EnvHttpProxyAgent { + export interface Options extends Omit { + /** Overrides the value of the HTTP_PROXY environment variable */ + httpProxy?: string; + /** Overrides the value of the HTTPS_PROXY environment variable */ + httpsProxy?: string; + /** Overrides the value of the NO_PROXY environment variable */ + noProxy?: string; + } +} diff --git a/node_modules/undici-types/errors.d.ts b/node_modules/undici-types/errors.d.ts new file mode 100644 index 0000000..7155b9c --- /dev/null +++ b/node_modules/undici-types/errors.d.ts @@ -0,0 +1,187 @@ +import { IncomingHttpHeaders } from './header' +import Client from './client' + +export default Errors + +declare namespace Errors { + export class UndiciError extends Error { + name: string + code: string + } + + /** Connect timeout error. */ + export class ConnectTimeoutError extends UndiciError { + name: 'ConnectTimeoutError' + code: 'UND_ERR_CONNECT_TIMEOUT' + } + + /** A header exceeds the `headersTimeout` option. */ + export class HeadersTimeoutError extends UndiciError { + name: 'HeadersTimeoutError' + code: 'UND_ERR_HEADERS_TIMEOUT' + } + + /** Headers overflow error. */ + export class HeadersOverflowError extends UndiciError { + name: 'HeadersOverflowError' + code: 'UND_ERR_HEADERS_OVERFLOW' + } + + /** A body exceeds the `bodyTimeout` option. */ + export class BodyTimeoutError extends UndiciError { + name: 'BodyTimeoutError' + code: 'UND_ERR_BODY_TIMEOUT' + } + + export class ResponseError extends UndiciError { + constructor ( + message: string, + code: number, + options: { + headers?: IncomingHttpHeaders | string[] | null, + body?: null | Record | string + } + ) + name: 'ResponseError' + code: 'UND_ERR_RESPONSE' + statusCode: number + body: null | Record | string + headers: IncomingHttpHeaders | string[] | null + } + + /** Passed an invalid argument. */ + export class InvalidArgumentError extends UndiciError { + name: 'InvalidArgumentError' + code: 'UND_ERR_INVALID_ARG' + } + + /** Returned an invalid value. */ + export class InvalidReturnValueError extends UndiciError { + name: 'InvalidReturnValueError' + code: 'UND_ERR_INVALID_RETURN_VALUE' + } + + /** The request has been aborted by the user. */ + export class RequestAbortedError extends UndiciError { + name: 'AbortError' + code: 'UND_ERR_ABORTED' + } + + /** Expected error with reason. */ + export class InformationalError extends UndiciError { + name: 'InformationalError' + code: 'UND_ERR_INFO' + } + + /** Request body length does not match content-length header. */ + export class RequestContentLengthMismatchError extends UndiciError { + name: 'RequestContentLengthMismatchError' + code: 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH' + } + + /** Response body length does not match content-length header. */ + export class ResponseContentLengthMismatchError extends UndiciError { + name: 'ResponseContentLengthMismatchError' + code: 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH' + } + + /** Trying to use a destroyed client. */ + export class ClientDestroyedError extends UndiciError { + name: 'ClientDestroyedError' + code: 'UND_ERR_DESTROYED' + } + + /** Trying to use a closed client. */ + export class ClientClosedError extends UndiciError { + name: 'ClientClosedError' + code: 'UND_ERR_CLOSED' + } + + /** There is an error with the socket. */ + export class SocketError extends UndiciError { + name: 'SocketError' + code: 'UND_ERR_SOCKET' + socket: Client.SocketInfo | null + } + + /** Encountered unsupported functionality. */ + export class NotSupportedError extends UndiciError { + name: 'NotSupportedError' + code: 'UND_ERR_NOT_SUPPORTED' + } + + /** No upstream has been added to the BalancedPool. */ + export class BalancedPoolMissingUpstreamError extends UndiciError { + name: 'MissingUpstreamError' + code: 'UND_ERR_BPL_MISSING_UPSTREAM' + } + + export class HTTPParserError extends UndiciError { + name: 'HTTPParserError' + code: string + } + + /** The response exceed the length allowed. */ + export class ResponseExceededMaxSizeError extends UndiciError { + name: 'ResponseExceededMaxSizeError' + code: 'UND_ERR_RES_EXCEEDED_MAX_SIZE' + } + + export class RequestRetryError extends UndiciError { + constructor ( + message: string, + statusCode: number, + headers?: IncomingHttpHeaders | string[] | null, + body?: null | Record | string + ) + name: 'RequestRetryError' + code: 'UND_ERR_REQ_RETRY' + statusCode: number + data: { + count: number; + } + + headers: Record + } + + export class SecureProxyConnectionError extends UndiciError { + constructor ( + cause?: Error, + message?: string, + options?: Record + ) + name: 'SecureProxyConnectionError' + code: 'UND_ERR_PRX_TLS' + } + + export class ProxyConnectionError extends UndiciError { + constructor ( + cause?: Error, + message?: string, + options?: Record + ) + name: 'ProxyConnectionError' + code: 'UND_ERR_PRX_CONN' + } + + export class MaxOriginsReachedError extends UndiciError { + name: 'MaxOriginsReachedError' + code: 'UND_ERR_MAX_ORIGINS_REACHED' + } + + /** SOCKS5 proxy related error. */ + export class Socks5ProxyError extends UndiciError { + constructor ( + message?: string, + code?: string + ) + name: 'Socks5ProxyError' + code: string + } + + /** WebSocket decompressed message exceeded maximum size. */ + export class MessageSizeExceededError extends UndiciError { + name: 'MessageSizeExceededError' + code: 'UND_ERR_WS_MESSAGE_SIZE_EXCEEDED' + } +} diff --git a/node_modules/undici-types/eventsource.d.ts b/node_modules/undici-types/eventsource.d.ts new file mode 100644 index 0000000..081ca09 --- /dev/null +++ b/node_modules/undici-types/eventsource.d.ts @@ -0,0 +1,66 @@ +import { MessageEvent, ErrorEvent } from './websocket' +import Dispatcher from './dispatcher' + +import { + EventListenerOptions, + AddEventListenerOptions, + EventListenerOrEventListenerObject +} from './patch' + +interface EventSourceEventMap { + error: ErrorEvent + message: MessageEvent + open: Event +} + +interface EventSource extends EventTarget { + close(): void + readonly CLOSED: 2 + readonly CONNECTING: 0 + readonly OPEN: 1 + onerror: ((this: EventSource, ev: ErrorEvent) => any) | null + onmessage: ((this: EventSource, ev: MessageEvent) => any) | null + onopen: ((this: EventSource, ev: Event) => any) | null + readonly readyState: 0 | 1 | 2 + readonly url: string + readonly withCredentials: boolean + + addEventListener( + type: K, + listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, + options?: boolean | AddEventListenerOptions + ): void + addEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | AddEventListenerOptions + ): void + removeEventListener( + type: K, + listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, + options?: boolean | EventListenerOptions + ): void + removeEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | EventListenerOptions + ): void +} + +export declare const EventSource: { + prototype: EventSource + new (url: string | URL, init?: EventSourceInit): EventSource + readonly CLOSED: 2 + readonly CONNECTING: 0 + readonly OPEN: 1 +} + +interface EventSourceInit { + withCredentials?: boolean + // @deprecated use `node.dispatcher` instead + dispatcher?: Dispatcher + node?: { + dispatcher?: Dispatcher + reconnectionTime?: number + } +} diff --git a/node_modules/undici-types/fetch.d.ts b/node_modules/undici-types/fetch.d.ts new file mode 100644 index 0000000..df9218a --- /dev/null +++ b/node_modules/undici-types/fetch.d.ts @@ -0,0 +1,235 @@ +// based on https://github.com/Ethan-Arrowood/undici-fetch/blob/249269714db874351589d2d364a0645d5160ae71/index.d.ts (MIT license) +// and https://github.com/node-fetch/node-fetch/blob/914ce6be5ec67a8bab63d68510aabf07cb818b6d/index.d.ts (MIT license) +/// + +import { Blob } from 'node:buffer' +import { URL, URLSearchParams } from 'node:url' +import { ReadableStream } from 'node:stream/web' +import { FormData } from './formdata' +import { HeaderRecord } from './header' +import Dispatcher from './dispatcher' + +export type RequestInfo = string | URL | Request + +export declare function fetch ( + input: RequestInfo, + init?: RequestInit +): Promise + +export type BodyInit = + | ArrayBuffer + | AsyncIterable + | Blob + | FormData + | Iterable + | NodeJS.ArrayBufferView + | URLSearchParams + | null + | string + +export class BodyMixin { + readonly body: ReadableStream | null + readonly bodyUsed: boolean + + readonly arrayBuffer: () => Promise + readonly blob: () => Promise + readonly bytes: () => Promise + /** + * @deprecated This method is not recommended for parsing multipart/form-data bodies in server environments. + * Calling body.formData() buffers and parses the entire body. Since this is dictated by the spec, + * this method must only be called on responses from trusted servers. + * For responses from untrusted or user-controlled servers, use a dedicated streaming parser such as + * [@fastify/busboy](https://www.npmjs.com/package/@fastify/busboy) and apply application-specific limits as follows: + * + * @example + * ```js + * import { Busboy } from '@fastify/busboy' + * import { Readable } from 'node:stream' + * + * const response = await fetch('...') + * const busboy = new Busboy({ headers: { 'content-type': response.headers.get('content-type') } }) + * + * // handle events emitted from `busboy` + * + * Readable.fromWeb(response.body).pipe(busboy) + * ``` + */ + readonly formData: () => Promise + readonly json: () => Promise + readonly text: () => Promise + readonly textStream: () => ReadableStream +} + +export interface SpecIterator { + next(...args: [] | [TNext]): IteratorResult; +} + +export interface SpecIteratorObject extends SpecIterator { + [Symbol.iterator](): SpecIteratorObject; + map(callbackfn: (value: T, index: number) => U): SpecIteratorObject; + filter(predicate: (value: T, index: number) => value is S): SpecIteratorObject; + filter(predicate: (value: T, index: number) => unknown): SpecIteratorObject; + take(limit: number): SpecIteratorObject; + drop(count: number): SpecIteratorObject; + flatMap(callbackfn: (value: T, index: number) => Iterator | Iterable): SpecIteratorObject; + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T): T; + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T, initialValue: T): T; + reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number) => U, initialValue: U): U; + toArray(): T[]; + forEach(callbackfn: (value: T, index: number) => void): void; + some(predicate: (value: T, index: number) => unknown): boolean; + every(predicate: (value: T, index: number) => unknown): boolean; + find(predicate: (value: T, index: number) => value is S): S | undefined; + find(predicate: (value: T, index: number) => unknown): T | undefined; + readonly [Symbol.toStringTag]: string; +} + +export interface SpecIterableIterator extends SpecIteratorObject { + [Symbol.iterator](): SpecIterableIterator; +} + +export interface SpecIterable { + [Symbol.iterator](): SpecIterableIterator; +} + +export type HeadersInit = [string, string][] | HeaderRecord | Headers + +export declare class Headers implements SpecIterable<[string, string]> { + constructor (init?: HeadersInit) + readonly append: (name: string, value: string) => void + readonly delete: (name: string) => void + readonly get: (name: string) => string | null + readonly has: (name: string) => boolean + readonly set: (name: string, value: string) => void + readonly getSetCookie: () => string[] + readonly forEach: ( + callbackfn: (value: string, key: string, iterable: Headers) => void, + thisArg?: unknown + ) => void + + readonly keys: () => SpecIterableIterator + readonly values: () => SpecIterableIterator + readonly entries: () => SpecIterableIterator<[string, string]> + readonly [Symbol.iterator]: () => SpecIterableIterator<[string, string]> +} + +export type RequestCache = + | 'default' + | 'force-cache' + | 'no-cache' + | 'no-store' + | 'only-if-cached' + | 'reload' + +export type RequestCredentials = 'omit' | 'include' | 'same-origin' + +type RequestDestination = + | '' + | 'audio' + | 'audioworklet' + | 'document' + | 'embed' + | 'font' + | 'image' + | 'manifest' + | 'object' + | 'paintworklet' + | 'report' + | 'script' + | 'sharedworker' + | 'style' + | 'track' + | 'video' + | 'worker' + | 'xslt' + +export interface RequestInit { + body?: BodyInit | null + cache?: RequestCache + credentials?: RequestCredentials + dispatcher?: Dispatcher + duplex?: RequestDuplex + headers?: HeadersInit + integrity?: string + keepalive?: boolean + method?: string + mode?: RequestMode + redirect?: RequestRedirect + referrer?: string + referrerPolicy?: ReferrerPolicy + signal?: AbortSignal | null + window?: null +} + +export type ReferrerPolicy = + | '' + | 'no-referrer' + | 'no-referrer-when-downgrade' + | 'origin' + | 'origin-when-cross-origin' + | 'same-origin' + | 'strict-origin' + | 'strict-origin-when-cross-origin' + | 'unsafe-url' + +export type RequestMode = 'cors' | 'navigate' | 'no-cors' | 'same-origin' + +export type RequestRedirect = 'error' | 'follow' | 'manual' + +export type RequestDuplex = 'half' + +export declare class Request extends BodyMixin { + constructor (input: RequestInfo, init?: RequestInit) + + readonly cache: RequestCache + readonly credentials: RequestCredentials + readonly destination: RequestDestination + readonly headers: Headers + readonly integrity: string + readonly method: string + readonly mode: RequestMode + readonly redirect: RequestRedirect + readonly referrer: string + readonly referrerPolicy: ReferrerPolicy + readonly url: string + + readonly keepalive: boolean + readonly signal: AbortSignal + readonly duplex: RequestDuplex + + public clone (): Request +} + +export interface ResponseInit { + readonly status?: number + readonly statusText?: string + readonly headers?: HeadersInit +} + +export type ResponseType = + | 'basic' + | 'cors' + | 'default' + | 'error' + | 'opaque' + | 'opaqueredirect' + +export type ResponseRedirectStatus = 301 | 302 | 303 | 307 | 308 + +export declare class Response extends BodyMixin { + constructor (body?: BodyInit, init?: ResponseInit) + + readonly headers: Headers + readonly ok: boolean + readonly status: number + readonly statusText: string + readonly type: ResponseType + readonly url: string + readonly redirected: boolean + + public clone (): Response + + static error (): Response + static json (data: any, init?: ResponseInit): Response + static redirect (url: string | URL, status?: ResponseRedirectStatus): Response +} diff --git a/node_modules/undici-types/formdata.d.ts b/node_modules/undici-types/formdata.d.ts new file mode 100644 index 0000000..b9819a7 --- /dev/null +++ b/node_modules/undici-types/formdata.d.ts @@ -0,0 +1,108 @@ +// Based on https://github.com/octet-stream/form-data/blob/2d0f0dc371517444ce1f22cdde13f51995d0953a/lib/FormData.ts (MIT) +/// + +import { File } from 'node:buffer' +import { SpecIterableIterator } from './fetch' + +/** + * A `string` or `File` that represents a single value from a set of `FormData` key-value pairs. + */ +declare type FormDataEntryValue = string | File + +/** + * Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using fetch(). + */ +export declare class FormData { + /** + * Appends a new value onto an existing key inside a FormData object, + * or adds the key if it does not already exist. + * + * The difference between `set()` and `append()` is that if the specified key already exists, `set()` will overwrite all existing values with the new one, whereas `append()` will append the new value onto the end of the existing set of values. + * + * @param name The name of the field whose data is contained in `value`. + * @param value The field's value. This can be [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) + or [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). If none of these are specified the value is converted to a string. + * @param fileName The filename reported to the server, when a Blob or File is passed as the second parameter. The default filename for Blob objects is "blob". The default filename for File objects is the file's filename. + */ + append (name: string, value: unknown, fileName?: string): void + + /** + * Set a new value for an existing key inside FormData, + * or add the new field if it does not already exist. + * + * @param name The name of the field whose data is contained in `value`. + * @param value The field's value. This can be [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) + or [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). If none of these are specified the value is converted to a string. + * @param fileName The filename reported to the server, when a Blob or File is passed as the second parameter. The default filename for Blob objects is "blob". The default filename for File objects is the file's filename. + * + */ + set (name: string, value: unknown, fileName?: string): void + + /** + * Returns the first value associated with a given key from within a `FormData` object. + * If you expect multiple values and want all of them, use the `getAll()` method instead. + * + * @param {string} name A name of the value you want to retrieve. + * + * @returns A `FormDataEntryValue` containing the value. If the key doesn't exist, the method returns null. + */ + get (name: string): FormDataEntryValue | null + + /** + * Returns all the values associated with a given key from within a `FormData` object. + * + * @param {string} name A name of the value you want to retrieve. + * + * @returns An array of `FormDataEntryValue` whose key matches the value passed in the `name` parameter. If the key doesn't exist, the method returns an empty list. + */ + getAll (name: string): FormDataEntryValue[] + + /** + * Returns a boolean stating whether a `FormData` object contains a certain key. + * + * @param name A string representing the name of the key you want to test for. + * + * @return A boolean value. + */ + has (name: string): boolean + + /** + * Deletes a key and its value(s) from a `FormData` object. + * + * @param name The name of the key you want to delete. + */ + delete (name: string): void + + /** + * Executes given callback function for each field of the FormData instance + */ + forEach: ( + callbackfn: (value: FormDataEntryValue, key: string, iterable: FormData) => void, + thisArg?: unknown + ) => void + + /** + * Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through all keys contained in this `FormData` object. + * Each key is a `string`. + */ + keys: () => SpecIterableIterator + + /** + * Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through all values contained in this object `FormData` object. + * Each value is a [`FormDataValue`](https://developer.mozilla.org/en-US/docs/Web/API/FormDataEntryValue). + */ + values: () => SpecIterableIterator + + /** + * Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through the `FormData` key/value pairs. + * The key of each pair is a string; the value is a [`FormDataValue`](https://developer.mozilla.org/en-US/docs/Web/API/FormDataEntryValue). + */ + entries: () => SpecIterableIterator<[string, FormDataEntryValue]> + + /** + * An alias for FormData#entries() + */ + [Symbol.iterator]: () => SpecIterableIterator<[string, FormDataEntryValue]> + + readonly [Symbol.toStringTag]: string +} diff --git a/node_modules/undici-types/global-dispatcher.d.ts b/node_modules/undici-types/global-dispatcher.d.ts new file mode 100644 index 0000000..2760e13 --- /dev/null +++ b/node_modules/undici-types/global-dispatcher.d.ts @@ -0,0 +1,9 @@ +import Dispatcher from './dispatcher' + +declare function setGlobalDispatcher (dispatcher: DispatcherImplementation): void +declare function getGlobalDispatcher (): Dispatcher + +export { + getGlobalDispatcher, + setGlobalDispatcher +} diff --git a/node_modules/undici-types/global-origin.d.ts b/node_modules/undici-types/global-origin.d.ts new file mode 100644 index 0000000..265769b --- /dev/null +++ b/node_modules/undici-types/global-origin.d.ts @@ -0,0 +1,7 @@ +declare function setGlobalOrigin (origin: string | URL | undefined): void +declare function getGlobalOrigin (): URL | undefined + +export { + setGlobalOrigin, + getGlobalOrigin +} diff --git a/node_modules/undici-types/h2c-client.d.ts b/node_modules/undici-types/h2c-client.d.ts new file mode 100644 index 0000000..b921a34 --- /dev/null +++ b/node_modules/undici-types/h2c-client.d.ts @@ -0,0 +1,73 @@ +import { URL } from 'node:url' +import Dispatcher from './dispatcher' +import buildConnector from './connector' + +type H2ClientOptions = Omit + +/** + * A basic H2C client, mapped on top a single TCP connection. Pipelining is disabled by default. + */ +export class H2CClient extends Dispatcher { + constructor (url: string | URL, options?: H2CClient.Options) + /** Property to get and set the pipelining factor. */ + pipelining: number + /** `true` after `client.close()` has been called. */ + closed: boolean + /** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */ + destroyed: boolean + + // Override dispatcher APIs. + override connect ( + options: H2ClientOptions + ): Promise + override connect ( + options: H2ClientOptions, + callback: (err: Error | null, data: Dispatcher.ConnectData) => void + ): void +} + +export declare namespace H2CClient { + export interface Options { + /** The maximum length of request headers in bytes. Default: Node.js' `--max-http-header-size` or `16384` (16KiB). */ + maxHeaderSize?: number; + /** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). */ + headersTimeout?: number; + /** The timeout for establishing a socket connection, in milliseconds. Use `0` to disable it entirely. Default: `10e3` milliseconds (10s). */ + connectTimeout?: number; + /** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). */ + bodyTimeout?: number; + /** the timeout, in milliseconds, after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. Default: `4e3` milliseconds (4s). */ + keepAliveTimeout?: number; + /** the maximum allowed `idleTimeout`, in milliseconds, when overridden by *keep-alive* hints from the server. Default: `600e3` milliseconds (10min). */ + keepAliveMaxTimeout?: number; + /** A number of milliseconds subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */ + keepAliveTimeoutThreshold?: number; + /** An IPC endpoint, either a Unix domain socket or Windows named pipe. Default: `null`. */ + socketPath?: string; + /** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Default: `1`. */ + pipelining?: number; + /** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */ + strictContentLength?: boolean; + /** Maximum number of TLS cached sessions used by the built-in connector. Use `0` to disable TLS session caching. Default: `100`. */ + maxCachedSessions?: number; + /** Connector options passed to `buildConnector`, or a custom connector function. Default: `null`. */ + connect?: Omit, 'allowH2'> | buildConnector.connector; + /** The maximum number of requests to send over a single connection before it is reset. Use `0` to disable this limit. Default: `null`. */ + maxRequestsPerClient?: number; + /** Local IP address the socket should connect from. */ + localAddress?: string; + /** Max response body size in bytes, -1 is disabled */ + maxResponseSize?: number; + /** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */ + autoSelectFamily?: boolean; + /** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */ + autoSelectFamilyAttemptTimeout?: number; + /** + * @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame. + * @default 100 + */ + maxConcurrentStreams?: number + } +} + +export default H2CClient diff --git a/node_modules/undici-types/handlers.d.ts b/node_modules/undici-types/handlers.d.ts new file mode 100644 index 0000000..343526b --- /dev/null +++ b/node_modules/undici-types/handlers.d.ts @@ -0,0 +1,16 @@ +import Dispatcher from './dispatcher' + +export declare class RedirectHandler implements Dispatcher.DispatchHandler { + static buildDispatch (dispatcher: Dispatcher, maxRedirections: number): Dispatcher.Dispatch + + constructor ( + dispatch: Dispatcher.Dispatch, + maxRedirections: number, + opts: Dispatcher.DispatchOptions, + handler: Dispatcher.DispatchHandler + ) +} + +export declare class DecoratorHandler implements Dispatcher.DispatchHandler { + constructor (handler: Dispatcher.DispatchHandler) +} diff --git a/node_modules/undici-types/header.d.ts b/node_modules/undici-types/header.d.ts new file mode 100644 index 0000000..17e7252 --- /dev/null +++ b/node_modules/undici-types/header.d.ts @@ -0,0 +1,165 @@ +import { Autocomplete } from './utility' + +/** + * The header type declaration of `undici`. + */ +export type IncomingHttpHeaders = Record + +/** + * The header type declaration of `undici` for outgoing requests. + */ +export type OutgoingHttpHeaders = Record + +type HeaderNames = Autocomplete< + | 'Accept' + | 'Accept-CH' + | 'Accept-Charset' + | 'Accept-Encoding' + | 'Accept-Language' + | 'Accept-Patch' + | 'Accept-Post' + | 'Accept-Ranges' + | 'Access-Control-Allow-Credentials' + | 'Access-Control-Allow-Headers' + | 'Access-Control-Allow-Methods' + | 'Access-Control-Allow-Origin' + | 'Access-Control-Expose-Headers' + | 'Access-Control-Max-Age' + | 'Access-Control-Request-Headers' + | 'Access-Control-Request-Method' + | 'Age' + | 'Allow' + | 'Alt-Svc' + | 'Alt-Used' + | 'Authorization' + | 'Cache-Control' + | 'Clear-Site-Data' + | 'Connection' + | 'Content-Disposition' + | 'Content-Encoding' + | 'Content-Language' + | 'Content-Length' + | 'Content-Location' + | 'Content-Range' + | 'Content-Security-Policy' + | 'Content-Security-Policy-Report-Only' + | 'Content-Type' + | 'Cookie' + | 'Cross-Origin-Embedder-Policy' + | 'Cross-Origin-Opener-Policy' + | 'Cross-Origin-Resource-Policy' + | 'Date' + | 'Device-Memory' + | 'ETag' + | 'Expect' + | 'Expect-CT' + | 'Expires' + | 'Forwarded' + | 'From' + | 'Host' + | 'If-Match' + | 'If-Modified-Since' + | 'If-None-Match' + | 'If-Range' + | 'If-Unmodified-Since' + | 'Keep-Alive' + | 'Last-Modified' + | 'Link' + | 'Location' + | 'Max-Forwards' + | 'Origin' + | 'Permissions-Policy' + | 'Priority' + | 'Proxy-Authenticate' + | 'Proxy-Authorization' + | 'Range' + | 'Referer' + | 'Referrer-Policy' + | 'Retry-After' + | 'Sec-Fetch-Dest' + | 'Sec-Fetch-Mode' + | 'Sec-Fetch-Site' + | 'Sec-Fetch-User' + | 'Sec-Purpose' + | 'Sec-WebSocket-Accept' + | 'Server' + | 'Server-Timing' + | 'Service-Worker-Navigation-Preload' + | 'Set-Cookie' + | 'SourceMap' + | 'Strict-Transport-Security' + | 'TE' + | 'Timing-Allow-Origin' + | 'Trailer' + | 'Transfer-Encoding' + | 'Upgrade' + | 'Upgrade-Insecure-Requests' + | 'User-Agent' + | 'Vary' + | 'Via' + | 'WWW-Authenticate' + | 'X-Content-Type-Options' + | 'X-Frame-Options' +> + +type IANARegisteredMimeType = Autocomplete< + | 'audio/aac' + | 'video/x-msvideo' + | 'image/avif' + | 'video/av1' + | 'application/octet-stream' + | 'image/bmp' + | 'text/css' + | 'text/csv' + | 'application/vnd.ms-fontobject' + | 'application/epub+zip' + | 'image/gif' + | 'application/gzip' + | 'text/html' + | 'image/x-icon' + | 'text/calendar' + | 'image/jpeg' + | 'text/javascript' + | 'application/json' + | 'application/ld+json' + | 'audio/x-midi' + | 'audio/mpeg' + | 'video/mp4' + | 'video/mpeg' + | 'audio/ogg' + | 'video/ogg' + | 'application/ogg' + | 'audio/opus' + | 'font/otf' + | 'application/pdf' + | 'image/png' + | 'application/rtf' + | 'image/svg+xml' + | 'image/tiff' + | 'video/mp2t' + | 'font/ttf' + | 'text/plain' + | 'application/wasm' + | 'video/webm' + | 'audio/webm' + | 'image/webp' + | 'font/woff' + | 'font/woff2' + | 'application/xhtml+xml' + | 'application/xml' + | 'application/zip' + | 'video/3gpp' + | 'video/3gpp2' + | 'model/gltf+json' + | 'model/gltf-binary' +> + +type KnownHeaderValues = { + 'content-type': IANARegisteredMimeType +} + +export type HeaderRecord = { + [K in HeaderNames | Lowercase]?: Lowercase extends keyof KnownHeaderValues + ? KnownHeaderValues[Lowercase] + : string +} diff --git a/node_modules/undici-types/index.d.ts b/node_modules/undici-types/index.d.ts new file mode 100644 index 0000000..891358f --- /dev/null +++ b/node_modules/undici-types/index.d.ts @@ -0,0 +1,93 @@ +import Dispatcher from './dispatcher' +import { setGlobalDispatcher, getGlobalDispatcher } from './global-dispatcher' +import { setGlobalOrigin, getGlobalOrigin } from './global-origin' +import Pool from './pool' +import { RedirectHandler, DecoratorHandler } from './handlers' + +import BalancedPool from './balanced-pool' +import RoundRobinPool from './round-robin-pool' +import Client from './client' +import H2CClient from './h2c-client' +import buildConnector from './connector' +import errors from './errors' +import Agent from './agent' +import Dispatcher1Wrapper from './dispatcher1-wrapper' +import MockClient from './mock-client' +import MockPool from './mock-pool' +import MockAgent from './mock-agent' +import { SnapshotAgent } from './snapshot-agent' +import { MockCallHistory, MockCallHistoryLog } from './mock-call-history' +import mockErrors from './mock-errors' +import ProxyAgent from './proxy-agent' +import Socks5ProxyAgent from './socks5-proxy-agent' +import EnvHttpProxyAgent from './env-http-proxy-agent' +import RetryHandler from './retry-handler' +import RetryAgent from './retry-agent' +import { request, pipeline, stream, connect, upgrade } from './api' +import interceptors from './interceptors' + +import CacheInterceptor from './cache-interceptor' +declare const cacheStores: { + MemoryCacheStore: typeof CacheInterceptor.MemoryCacheStore; + SqliteCacheStore: typeof CacheInterceptor.SqliteCacheStore; +} + +export * from './util' +export * from './cookies' +export * from './eventsource' +export * from './fetch' +export * from './formdata' +export * from './diagnostics-channel' +export * from './websocket' +export * from './content-type' +export * from './cache' +export { Interceptable } from './mock-interceptor' + +declare function globalThisInstall (): void + +export { Dispatcher, BalancedPool, RoundRobinPool, Pool, Client, buildConnector, errors, Agent, Dispatcher1Wrapper, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, interceptors, cacheStores, MockClient, MockPool, MockAgent, SnapshotAgent, MockCallHistory, MockCallHistoryLog, mockErrors, ProxyAgent, Socks5ProxyAgent, EnvHttpProxyAgent, RedirectHandler, DecoratorHandler, RetryHandler, RetryAgent, H2CClient, globalThisInstall as install } +export default Undici + +declare namespace Undici { + const Dispatcher: typeof import('./dispatcher').default + const Pool: typeof import('./pool').default + const RedirectHandler: typeof import ('./handlers').RedirectHandler + const DecoratorHandler: typeof import ('./handlers').DecoratorHandler + const RetryHandler: typeof import ('./retry-handler').default + const BalancedPool: typeof import('./balanced-pool').default + const RoundRobinPool: typeof import('./round-robin-pool').default + const Client: typeof import('./client').default + const H2CClient: typeof import('./h2c-client').default + const buildConnector: typeof import('./connector').default + const errors: typeof import('./errors').default + const Agent: typeof import('./agent').default + const Dispatcher1Wrapper: typeof import('./dispatcher1-wrapper').default + const setGlobalDispatcher: typeof import('./global-dispatcher').setGlobalDispatcher + const getGlobalDispatcher: typeof import('./global-dispatcher').getGlobalDispatcher + const request: typeof import('./api').request + const stream: typeof import('./api').stream + const pipeline: typeof import('./api').pipeline + const connect: typeof import('./api').connect + const upgrade: typeof import('./api').upgrade + const MockClient: typeof import('./mock-client').default + const MockPool: typeof import('./mock-pool').default + const MockAgent: typeof import('./mock-agent').default + const SnapshotAgent: typeof import('./snapshot-agent').SnapshotAgent + const MockCallHistory: typeof import('./mock-call-history').MockCallHistory + const MockCallHistoryLog: typeof import('./mock-call-history').MockCallHistoryLog + const mockErrors: typeof import('./mock-errors').default + const ProxyAgent: typeof import('./proxy-agent').default + const Socks5ProxyAgent: typeof import('./socks5-proxy-agent').default + const fetch: typeof import('./fetch').fetch + const Headers: typeof import('./fetch').Headers + const Response: typeof import('./fetch').Response + const Request: typeof import('./fetch').Request + const FormData: typeof import('./formdata').FormData + const caches: typeof import('./cache').caches + const interceptors: typeof import('./interceptors').default + const cacheStores: { + MemoryCacheStore: typeof import('./cache-interceptor').default.MemoryCacheStore, + SqliteCacheStore: typeof import('./cache-interceptor').default.SqliteCacheStore + } + const install: typeof globalThisInstall +} diff --git a/node_modules/undici-types/interceptors.d.ts b/node_modules/undici-types/interceptors.d.ts new file mode 100644 index 0000000..d21d717 --- /dev/null +++ b/node_modules/undici-types/interceptors.d.ts @@ -0,0 +1,80 @@ +import CacheHandler from './cache-interceptor' +import Dispatcher from './dispatcher' +import RetryHandler from './retry-handler' +import { LookupOptions } from 'node:dns' + +export default Interceptors + +declare namespace Interceptors { + export type DumpInterceptorOpts = { maxSize?: number } + export type RetryInterceptorOpts = RetryHandler.RetryOptions + export type RedirectInterceptorOpts = { maxRedirections?: number, throwOnMaxRedirect?: boolean, stripHeadersOnRedirect?: string[], stripHeadersOnCrossOriginRedirect?: string[] } + export type DecompressInterceptorOpts = { + skipErrorResponses?: boolean + skipStatusCodes?: number[] + } + + export type ResponseErrorInterceptorOpts = { throwOnError: boolean } + export type CacheInterceptorOpts = CacheHandler.CacheOptions + + // DNS interceptor + export type DNSInterceptorRecord = { address: string, ttl: number, family: 4 | 6 } + export type DNSInterceptorOriginRecords = { records: { 4: { ips: DNSInterceptorRecord[] } | null, 6: { ips: DNSInterceptorRecord[] } | null } } + export type DNSStorage = { + size: number + get(origin: string): DNSInterceptorOriginRecords | null + set(origin: string, records: DNSInterceptorOriginRecords | null, options: { ttl: number }): void + delete(origin: string): void + full(): boolean + } + export type DNSInterceptorOpts = { + maxTTL?: number + maxItems?: number + lookup?: (origin: URL, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, addresses: DNSInterceptorRecord[]) => void) => void + pick?: (origin: URL, records: DNSInterceptorOriginRecords, affinity: 4 | 6) => DNSInterceptorRecord + dualStack?: boolean + affinity?: 4 | 6 + storage?: DNSStorage + } + + // Deduplicate interceptor + export type DeduplicateMethods = 'GET' | 'HEAD' | 'OPTIONS' | 'TRACE' + export type DeduplicateInterceptorOpts = { + /** + * The HTTP methods to deduplicate. + * Note: Only safe HTTP methods can be deduplicated. + * @default ['GET'] + */ + methods?: DeduplicateMethods[] + /** + * Header names that, if present in a request, will cause the request to skip deduplication. + * Header name matching is case-insensitive. + * @default [] + */ + skipHeaderNames?: string[] + /** + * Header names to exclude from the deduplication key. + * Requests with different values for these headers will still be deduplicated together. + * Useful for headers like `x-request-id` that vary per request but shouldn't affect deduplication. + * Header name matching is case-insensitive. + * @default [] + */ + excludeHeaderNames?: string[] + /** + * Maximum bytes buffered per paused waiting deduplicated handler. + * If a waiting handler remains paused and exceeds this threshold, + * it is failed with an abort error to prevent unbounded memory growth. + * @default 5 * 1024 * 1024 + */ + maxBufferSize?: number + } + + export function dump (opts?: DumpInterceptorOpts): Dispatcher.DispatcherComposeInterceptor + export function retry (opts?: RetryInterceptorOpts): Dispatcher.DispatcherComposeInterceptor + export function redirect (opts?: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor + export function decompress (opts?: DecompressInterceptorOpts): Dispatcher.DispatcherComposeInterceptor + export function responseError (opts?: ResponseErrorInterceptorOpts): Dispatcher.DispatcherComposeInterceptor + export function dns (opts?: DNSInterceptorOpts): Dispatcher.DispatcherComposeInterceptor + export function cache (opts?: CacheInterceptorOpts): Dispatcher.DispatcherComposeInterceptor + export function deduplicate (opts?: DeduplicateInterceptorOpts): Dispatcher.DispatcherComposeInterceptor +} diff --git a/node_modules/undici-types/mock-agent.d.ts b/node_modules/undici-types/mock-agent.d.ts new file mode 100644 index 0000000..330926b --- /dev/null +++ b/node_modules/undici-types/mock-agent.d.ts @@ -0,0 +1,68 @@ +import Agent from './agent' +import Dispatcher from './dispatcher' +import { Interceptable, MockInterceptor } from './mock-interceptor' +import MockDispatch = MockInterceptor.MockDispatch +import { MockCallHistory } from './mock-call-history' + +export default MockAgent + +interface PendingInterceptor extends MockDispatch { + origin: string; +} + +/** A mocked Agent class that implements the Agent API. It allows one to intercept HTTP requests made through undici and return mocked responses instead. */ +declare class MockAgent extends Dispatcher { + constructor (options?: TMockAgentOptions) + /** Creates and retrieves mock Dispatcher instances which can then be used to intercept HTTP requests. If the number of connections on the mock agent is set to 1, a MockClient instance is returned. Otherwise a MockPool instance is returned. */ + get(origin: string): TInterceptable + get(origin: RegExp): TInterceptable + get(origin: ((origin: string) => boolean)): TInterceptable + /** Dispatches a mocked request. */ + dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean + /** Closes the mock agent and waits for registered mock pools and clients to also close before resolving. */ + close (): Promise + /** Disables mocking in MockAgent. */ + deactivate (): void + /** Enables mocking in a MockAgent instance. When instantiated, a MockAgent is automatically activated. Therefore, this method is only effective after `MockAgent.deactivate` has been called. */ + activate (): void + /** Define host matchers so only matching requests that aren't intercepted by the mock dispatchers will be attempted. */ + enableNetConnect (): void + enableNetConnect (host: string): void + enableNetConnect (host: RegExp): void + enableNetConnect (host: ((host: string) => boolean)): void + /** Causes all requests to throw when requests are not matched in a MockAgent intercept. */ + disableNetConnect (): void + /** get call history. returns the MockAgent call history or undefined if the option is not enabled. */ + getCallHistory (): MockCallHistory | undefined + /** clear every call history. Any MockCallHistoryLog will be deleted on the MockCallHistory instance */ + clearCallHistory (): void + /** Enable call history. Any subsequence calls will then be registered. */ + enableCallHistory (): this + /** Disable call history. Any subsequence calls will then not be registered. */ + disableCallHistory (): this + pendingInterceptors (): PendingInterceptor[] + assertNoPendingInterceptors (options?: { + pendingInterceptorsFormatter?: PendingInterceptorsFormatter; + }): void +} + +interface PendingInterceptorsFormatter { + format(pendingInterceptors: readonly PendingInterceptor[]): string; +} + +declare namespace MockAgent { + /** MockAgent options. */ + export interface Options extends Agent.Options { + /** A custom agent to be encapsulated by the MockAgent. */ + agent?: Dispatcher; + + /** Ignore trailing slashes in the path */ + ignoreTrailingSlash?: boolean; + + /** Accept URLs with search parameters using non standard syntaxes. default false */ + acceptNonStandardSearchParameters?: boolean; + + /** Enable call history. you can either call MockAgent.enableCallHistory(). default false */ + enableCallHistory?: boolean + } +} diff --git a/node_modules/undici-types/mock-call-history.d.ts b/node_modules/undici-types/mock-call-history.d.ts new file mode 100644 index 0000000..df07fa0 --- /dev/null +++ b/node_modules/undici-types/mock-call-history.d.ts @@ -0,0 +1,111 @@ +import Dispatcher from './dispatcher' + +declare namespace MockCallHistoryLog { + /** request's configuration properties */ + export type MockCallHistoryLogProperties = 'protocol' | 'host' | 'port' | 'origin' | 'path' | 'hash' | 'fullUrl' | 'method' | 'searchParams' | 'body' | 'headers' +} + +/** a log reflecting request configuration */ +declare class MockCallHistoryLog { + constructor (requestInit: Dispatcher.DispatchOptions) + /** protocol used. ie. 'https:' or 'http:' etc... */ + protocol: string + /** request's host. */ + host: string + /** request's port. */ + port: string + /** request's origin. ie. https://localhost:3000. */ + origin: string + /** path. never contains searchParams. */ + path: string + /** request's hash. */ + hash: string + /** the full url requested. */ + fullUrl: string + /** request's method. */ + method: string + /** search params. */ + searchParams: Record + /** request's body */ + body: string | null | undefined + /** request's headers */ + headers: Record | null | undefined + + /** returns an Map of property / value pair */ + toMap (): Map | null | undefined> + + /** returns a string computed with all key value pair */ + toString (): string +} + +declare namespace MockCallHistory { + export type FilterCallsOperator = 'AND' | 'OR' + + /** modify the filtering behavior */ + export interface FilterCallsOptions { + /** the operator to apply when filtering. 'OR' will adds any MockCallHistoryLog matching any criteria given. 'AND' will adds only MockCallHistoryLog matching every criteria given. (default 'OR') */ + operator?: FilterCallsOperator | Lowercase + } + /** a function to be executed for filtering MockCallHistoryLog */ + export type FilterCallsFunctionCriteria = (log: MockCallHistoryLog) => boolean + + /** parameter to filter MockCallHistoryLog */ + export type FilterCallsParameter = string | RegExp | undefined | null + + /** an object to execute multiple filtering at once */ + export interface FilterCallsObjectCriteria extends Record { + /** filter by request protocol. ie https: */ + protocol?: FilterCallsParameter; + /** filter by request host. */ + host?: FilterCallsParameter; + /** filter by request port. */ + port?: FilterCallsParameter; + /** filter by request origin. */ + origin?: FilterCallsParameter; + /** filter by request path. */ + path?: FilterCallsParameter; + /** filter by request hash. */ + hash?: FilterCallsParameter; + /** filter by request fullUrl. */ + fullUrl?: FilterCallsParameter; + /** filter by request method. */ + method?: FilterCallsParameter; + } +} + +/** a call history to track requests configuration */ +declare class MockCallHistory { + constructor (name: string) + /** returns an array of MockCallHistoryLog. */ + calls (): Array + /** returns the first MockCallHistoryLog */ + firstCall (): MockCallHistoryLog | undefined + /** returns the last MockCallHistoryLog. */ + lastCall (): MockCallHistoryLog | undefined + /** returns the nth MockCallHistoryLog. */ + nthCall (position: number): MockCallHistoryLog | undefined + /** return all MockCallHistoryLog matching any of criteria given. if an object is used with multiple properties, you can change the operator to apply during filtering on options */ + filterCalls (criteria: MockCallHistory.FilterCallsFunctionCriteria | MockCallHistory.FilterCallsObjectCriteria | RegExp, options?: MockCallHistory.FilterCallsOptions): Array + /** return all MockCallHistoryLog matching the given protocol. if a string is given, it is matched with includes */ + filterCallsByProtocol (protocol: MockCallHistory.FilterCallsParameter): Array + /** return all MockCallHistoryLog matching the given host. if a string is given, it is matched with includes */ + filterCallsByHost (host: MockCallHistory.FilterCallsParameter): Array + /** return all MockCallHistoryLog matching the given port. if a string is given, it is matched with includes */ + filterCallsByPort (port: MockCallHistory.FilterCallsParameter): Array + /** return all MockCallHistoryLog matching the given origin. if a string is given, it is matched with includes */ + filterCallsByOrigin (origin: MockCallHistory.FilterCallsParameter): Array + /** return all MockCallHistoryLog matching the given path. if a string is given, it is matched with includes */ + filterCallsByPath (path: MockCallHistory.FilterCallsParameter): Array + /** return all MockCallHistoryLog matching the given hash. if a string is given, it is matched with includes */ + filterCallsByHash (hash: MockCallHistory.FilterCallsParameter): Array + /** return all MockCallHistoryLog matching the given fullUrl. if a string is given, it is matched with includes */ + filterCallsByFullUrl (fullUrl: MockCallHistory.FilterCallsParameter): Array + /** return all MockCallHistoryLog matching the given method. if a string is given, it is matched with includes */ + filterCallsByMethod (method: MockCallHistory.FilterCallsParameter): Array + /** clear all MockCallHistoryLog on this MockCallHistory. */ + clear (): void + /** use it with for..of loop or spread operator */ + [Symbol.iterator]: () => Generator +} + +export { MockCallHistoryLog, MockCallHistory } diff --git a/node_modules/undici-types/mock-client.d.ts b/node_modules/undici-types/mock-client.d.ts new file mode 100644 index 0000000..702e824 --- /dev/null +++ b/node_modules/undici-types/mock-client.d.ts @@ -0,0 +1,27 @@ +import Client from './client' +import Dispatcher from './dispatcher' +import MockAgent from './mock-agent' +import { MockInterceptor, Interceptable } from './mock-interceptor' + +export default MockClient + +/** MockClient extends the Client API and allows one to mock requests. */ +declare class MockClient extends Client implements Interceptable { + constructor (origin: string, options: MockClient.Options) + /** Intercepts any matching requests that use the same origin as this mock client. */ + intercept (options: MockInterceptor.Options): MockInterceptor + /** Dispatches a mocked request. */ + dispatch (options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandler): boolean + /** Closes the mock client and gracefully waits for enqueued requests to complete. */ + close (): Promise + /** Clean up all the prepared mocks. */ + cleanMocks (): void +} + +declare namespace MockClient { + /** MockClient options. */ + export interface Options extends Client.Options { + /** The agent to associate this MockClient with. */ + agent: MockAgent; + } +} diff --git a/node_modules/undici-types/mock-errors.d.ts b/node_modules/undici-types/mock-errors.d.ts new file mode 100644 index 0000000..eefeecd --- /dev/null +++ b/node_modules/undici-types/mock-errors.d.ts @@ -0,0 +1,12 @@ +import Errors from './errors' + +export default MockErrors + +declare namespace MockErrors { + /** The request does not match any registered mock dispatches. */ + export class MockNotMatchedError extends Errors.UndiciError { + constructor (message?: string) + name: 'MockNotMatchedError' + code: 'UND_MOCK_ERR_MOCK_NOT_MATCHED' + } +} diff --git a/node_modules/undici-types/mock-interceptor.d.ts b/node_modules/undici-types/mock-interceptor.d.ts new file mode 100644 index 0000000..5904976 --- /dev/null +++ b/node_modules/undici-types/mock-interceptor.d.ts @@ -0,0 +1,98 @@ +import { IncomingHttpHeaders } from './header' +import Dispatcher from './dispatcher' +import { BodyInit, Headers } from './fetch' + +/** The scope associated with a mock dispatch. */ +declare class MockScope { + constructor (mockDispatch: MockInterceptor.MockDispatch) + /** Delay a reply by a set amount of time in ms. */ + delay (waitInMs: number): MockScope + /** Persist the defined mock data for the associated reply. It will return the defined mock data indefinitely. */ + persist (): MockScope + /** Define a reply for a set amount of matching requests. */ + times (repeatTimes: number): MockScope +} + +/** The interceptor for a Mock. */ +declare class MockInterceptor { + constructor (options: MockInterceptor.Options, mockDispatches: MockInterceptor.MockDispatch[]) + /** Mock an undici request with the defined reply. */ + reply(replyOptionsCallback: MockInterceptor.MockReplyOptionsCallback): MockScope + reply( + statusCode: number, + data?: TData | Buffer | string | MockInterceptor.MockResponseDataHandler, + responseOptions?: MockInterceptor.MockResponseOptions + ): MockScope + /** Mock an undici request by throwing the defined reply error. */ + replyWithError(error: TError): MockScope + /** Set default reply headers on the interceptor for subsequent mocked replies. */ + defaultReplyHeaders (headers: IncomingHttpHeaders): MockInterceptor + /** Set default reply trailers on the interceptor for subsequent mocked replies. */ + defaultReplyTrailers (trailers: Record): MockInterceptor + /** Set automatically calculated content-length header on subsequent mocked replies. */ + replyContentLength (): MockInterceptor +} + +declare namespace MockInterceptor { + /** MockInterceptor options. */ + export interface Options { + /** Path to intercept on. */ + path: string | RegExp | ((path: string) => boolean); + /** Method to intercept on. Defaults to GET. */ + method?: string | RegExp | ((method: string) => boolean); + /** Body to intercept on. */ + body?: string | RegExp | ((body: string) => boolean); + /** Headers to intercept on. */ + headers?: Record boolean)> | ((headers: Record) => boolean); + /** Query params to intercept on */ + query?: Record; + } + export interface MockDispatch extends Options { + times: number | null; + persist: boolean; + consumed: boolean; + data: MockDispatchData; + } + export interface MockDispatchData extends MockResponseOptions { + error: TError | null; + statusCode?: number; + data?: TData | string; + } + export interface MockResponseOptions { + headers?: IncomingHttpHeaders; + trailers?: Record; + } + + export interface MockResponseCallbackOptions { + path: string; + method: string; + headers?: Headers | Record; + origin?: string; + body?: BodyInit | Dispatcher.DispatchOptions['body'] | null; + } + + export type MockResponseDataHandler = ( + opts: MockResponseCallbackOptions + ) => TData | Buffer | string + + export type MockReplyOptions = { + statusCode: number, data?: TData | Buffer | string, responseOptions?: MockResponseOptions + } + + export type MockReplyOptionsCallback = ( + opts: MockResponseCallbackOptions + ) => MockReplyOptions | Promise> +} + +interface Interceptable extends Dispatcher { + /** Intercepts any matching requests that use the same origin as this mock client. */ + intercept(options: MockInterceptor.Options): MockInterceptor; + /** Clean up all the prepared mocks. */ + cleanMocks (): void +} + +export { + Interceptable, + MockInterceptor, + MockScope +} diff --git a/node_modules/undici-types/mock-pool.d.ts b/node_modules/undici-types/mock-pool.d.ts new file mode 100644 index 0000000..f35f357 --- /dev/null +++ b/node_modules/undici-types/mock-pool.d.ts @@ -0,0 +1,27 @@ +import Pool from './pool' +import MockAgent from './mock-agent' +import { Interceptable, MockInterceptor } from './mock-interceptor' +import Dispatcher from './dispatcher' + +export default MockPool + +/** MockPool extends the Pool API and allows one to mock requests. */ +declare class MockPool extends Pool implements Interceptable { + constructor (origin: string, options: MockPool.Options) + /** Intercepts any matching requests that use the same origin as this mock pool. */ + intercept (options: MockInterceptor.Options): MockInterceptor + /** Dispatches a mocked request. */ + dispatch (options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandler): boolean + /** Closes the mock pool and gracefully waits for enqueued requests to complete. */ + close (): Promise + /** Clean up all the prepared mocks. */ + cleanMocks (): void +} + +declare namespace MockPool { + /** MockPool options. */ + export interface Options extends Pool.Options { + /** The agent to associate this MockPool with. */ + agent: MockAgent; + } +} diff --git a/node_modules/undici-types/package.json b/node_modules/undici-types/package.json new file mode 100644 index 0000000..aba7c7c --- /dev/null +++ b/node_modules/undici-types/package.json @@ -0,0 +1,55 @@ +{ + "name": "undici-types", + "version": "8.9.0", + "description": "A stand-alone types package for Undici", + "homepage": "https://undici.nodejs.org", + "bugs": { + "url": "https://github.com/nodejs/undici/issues" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/nodejs/undici.git" + }, + "license": "MIT", + "types": "index.d.ts", + "files": [ + "*.d.ts" + ], + "contributors": [ + { + "name": "Daniele Belardi", + "url": "https://github.com/dnlup", + "author": true + }, + { + "name": "Ethan Arrowood", + "url": "https://github.com/ethan-arrowood", + "author": true + }, + { + "name": "Matteo Collina", + "url": "https://github.com/mcollina", + "author": true + }, + { + "name": "Matthew Aitken", + "url": "https://github.com/KhafraDev", + "author": true + }, + { + "name": "Robert Nagy", + "url": "https://github.com/ronag", + "author": true + }, + { + "name": "Szymon Marczak", + "url": "https://github.com/szmarczak", + "author": true + }, + { + "name": "Tomas Della Vedova", + "url": "https://github.com/delvedor", + "author": true + } + ] +} \ No newline at end of file diff --git a/node_modules/undici-types/patch.d.ts b/node_modules/undici-types/patch.d.ts new file mode 100644 index 0000000..8f7acbb --- /dev/null +++ b/node_modules/undici-types/patch.d.ts @@ -0,0 +1,29 @@ +/// + +// See https://github.com/nodejs/undici/issues/1740 + +export interface EventInit { + bubbles?: boolean + cancelable?: boolean + composed?: boolean +} + +export interface EventListenerOptions { + capture?: boolean +} + +export interface AddEventListenerOptions extends EventListenerOptions { + once?: boolean + passive?: boolean + signal?: AbortSignal +} + +export type EventListenerOrEventListenerObject = EventListener | EventListenerObject + +export interface EventListenerObject { + handleEvent (object: Event): void +} + +export interface EventListener { + (evt: Event): void +} diff --git a/node_modules/undici-types/pool-stats.d.ts b/node_modules/undici-types/pool-stats.d.ts new file mode 100644 index 0000000..f76a5f6 --- /dev/null +++ b/node_modules/undici-types/pool-stats.d.ts @@ -0,0 +1,19 @@ +import Pool from './pool' + +export default PoolStats + +declare class PoolStats { + constructor (pool: Pool) + /** Number of open socket connections in this pool. */ + connected: number + /** Number of open socket connections in this pool that do not have an active request. */ + free: number + /** Number of pending requests across all clients in this pool. */ + pending: number + /** Number of queued requests across all clients in this pool. */ + queued: number + /** Number of currently active requests across all clients in this pool. */ + running: number + /** Number of active, pending, or queued requests across all clients in this pool. */ + size: number +} diff --git a/node_modules/undici-types/pool.d.ts b/node_modules/undici-types/pool.d.ts new file mode 100644 index 0000000..d1e1bcd --- /dev/null +++ b/node_modules/undici-types/pool.d.ts @@ -0,0 +1,39 @@ +import Client from './client' +import TPoolStats from './pool-stats' +import { URL } from 'node:url' +import Dispatcher from './dispatcher' + +export default Pool + +type PoolConnectOptions = Omit + +declare class Pool extends Dispatcher { + constructor (url: string | URL, options?: Pool.Options) + /** `true` after `pool.close()` has been called. */ + closed: boolean + /** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */ + destroyed: boolean + /** Aggregate stats for a Pool. */ + readonly stats: TPoolStats + + // Override dispatcher APIs. + override connect ( + options: PoolConnectOptions + ): Promise + override connect ( + options: PoolConnectOptions, + callback: (err: Error | null, data: Dispatcher.ConnectData) => void + ): void +} + +declare namespace Pool { + export type PoolStats = TPoolStats + export interface Options extends Client.Options { + /** Default: `(origin, opts) => new Client(origin, opts)`. */ + factory?(origin: URL, opts: object): Dispatcher; + /** The max number of clients to create. `null` if no limit. Default `null`. */ + connections?: number | null; + /** The amount of time before a client is removed from the pool and closed. `null` if no time limit. Default `null` */ + clientTtl?: number | null; + } +} diff --git a/node_modules/undici-types/proxy-agent.d.ts b/node_modules/undici-types/proxy-agent.d.ts new file mode 100644 index 0000000..e6672f7 --- /dev/null +++ b/node_modules/undici-types/proxy-agent.d.ts @@ -0,0 +1,36 @@ +import Agent from './agent' +import buildConnector from './connector' +import Dispatcher from './dispatcher' +import { OutgoingHttpHeaders } from './header' + +export default ProxyAgent + +declare class ProxyAgent extends Dispatcher { + constructor (options: ProxyAgent.Options | string) + + dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean + close (): Promise +} + +declare namespace ProxyAgent { + export interface Options extends Agent.Options { + uri: string; + /** + * @deprecated use opts.token + */ + auth?: string; + token?: string; + headers?: OutgoingHttpHeaders; + requestTls?: buildConnector.BuildOptions; + proxyTls?: buildConnector.BuildOptions; + clientFactory?(origin: URL, opts: object): Dispatcher; + /** + * Undici tunnels via CONNECT when the target endpoint uses HTTPS, and + * forwards (HTTP/1.1 absolute-form request-target, per RFC 9112 §3.2.2) + * otherwise, regardless of whether the proxy URL is HTTP or HTTPS. The + * non-tunneled forwarding path does not negotiate HTTP/2 with the proxy. + * Set to true to force tunneling for plain HTTP requests as well. + */ + proxyTunnel?: boolean; + } +} diff --git a/node_modules/undici-types/readable.d.ts b/node_modules/undici-types/readable.d.ts new file mode 100644 index 0000000..723ed1f --- /dev/null +++ b/node_modules/undici-types/readable.d.ts @@ -0,0 +1,68 @@ +import { Readable } from 'node:stream' +import { Blob } from 'node:buffer' + +export default BodyReadable + +declare class BodyReadable extends Readable { + constructor (opts: { + resume: (this: Readable, size: number) => void | null; + abort: () => void | null; + contentType?: string; + contentLength?: number; + highWaterMark?: number; + }) + + /** Consumes and returns the body as a string + * https://fetch.spec.whatwg.org/#dom-body-text + */ + text (): Promise + + /** Consumes and returns the body as a JavaScript Object + * https://fetch.spec.whatwg.org/#dom-body-json + */ + json (): Promise + + /** Consumes and returns the body as a Blob + * https://fetch.spec.whatwg.org/#dom-body-blob + */ + blob (): Promise + + /** Consumes and returns the body as an Uint8Array + * https://fetch.spec.whatwg.org/#dom-body-bytes + */ + bytes (): Promise + + /** Consumes and returns the body as an ArrayBuffer + * https://fetch.spec.whatwg.org/#dom-body-arraybuffer + */ + arrayBuffer (): Promise + + /** Not implemented + * + * https://fetch.spec.whatwg.org/#dom-body-formdata + */ + formData (): Promise + + /** Returns true if the body is not null and the body has been consumed + * + * Otherwise, returns false + * + * https://fetch.spec.whatwg.org/#dom-body-bodyused + */ + readonly bodyUsed: boolean + + /** + * If body is null, it should return null as the body + * + * If body is not null, should return the body as a ReadableStream + * + * https://fetch.spec.whatwg.org/#dom-body-body + */ + readonly body: never | undefined + + /** Dumps the response body by reading `limit` number of bytes. + * @param opts.limit Number of bytes to read (optional) - Default: 131072 + * @param opts.signal AbortSignal to cancel the operation (optional) + */ + dump (opts?: { limit: number; signal?: AbortSignal }): Promise +} diff --git a/node_modules/undici-types/retry-agent.d.ts b/node_modules/undici-types/retry-agent.d.ts new file mode 100644 index 0000000..82268c3 --- /dev/null +++ b/node_modules/undici-types/retry-agent.d.ts @@ -0,0 +1,8 @@ +import Dispatcher from './dispatcher' +import RetryHandler from './retry-handler' + +export default RetryAgent + +declare class RetryAgent extends Dispatcher { + constructor (dispatcher: Dispatcher, options?: RetryHandler.RetryOptions) +} diff --git a/node_modules/undici-types/retry-handler.d.ts b/node_modules/undici-types/retry-handler.d.ts new file mode 100644 index 0000000..3bc484b --- /dev/null +++ b/node_modules/undici-types/retry-handler.d.ts @@ -0,0 +1,125 @@ +import Dispatcher from './dispatcher' + +export default RetryHandler + +declare class RetryHandler implements Dispatcher.DispatchHandler { + constructor ( + options: Dispatcher.DispatchOptions & { + retryOptions?: RetryHandler.RetryOptions; + }, + retryHandlers: RetryHandler.RetryHandlers + ) +} + +declare namespace RetryHandler { + export type RetryState = { counter: number; } + + export type RetryContext = { + state: RetryState; + opts: Dispatcher.DispatchOptions & { + retryOptions?: RetryHandler.RetryOptions; + }; + } + + export type OnRetryCallback = (result?: Error | null) => void + + export type RetryCallback = ( + err: Error, + context: { + state: RetryState; + opts: Dispatcher.DispatchOptions & { + retryOptions?: RetryHandler.RetryOptions; + }; + }, + callback: OnRetryCallback + ) => void + + export interface RetryOptions { + /** + * If true, the retry handler will throw an error if the request fails, + * this will prevent the folling handlers from being called, and will destroy the socket. + * + * @type {boolean} + * @memberof RetryOptions + * @default true + */ + throwOnError?: boolean; + /** + * Callback to be invoked on every retry iteration. + * It receives the error, current state of the retry object and the options object + * passed when instantiating the retry handler. + * + * @type {RetryCallback} + * @memberof RetryOptions + */ + retry?: RetryCallback; + /** + * Maximum number of retries to allow. + * + * @type {number} + * @memberof RetryOptions + * @default 5 + */ + maxRetries?: number; + /** + * Max number of milliseconds allow between retries + * + * @type {number} + * @memberof RetryOptions + * @default 30000 + */ + maxTimeout?: number; + /** + * Initial number of milliseconds to wait before retrying for the first time. + * + * @type {number} + * @memberof RetryOptions + * @default 500 + */ + minTimeout?: number; + /** + * Factior to multiply the timeout factor between retries. + * + * @type {number} + * @memberof RetryOptions + * @default 2 + */ + timeoutFactor?: number; + /** + * It enables to automatically infer timeout between retries based on the `Retry-After` header. + * + * @type {boolean} + * @memberof RetryOptions + * @default true + */ + retryAfter?: boolean; + /** + * HTTP methods to retry. + * + * @type {Dispatcher.HttpMethod[]} + * @memberof RetryOptions + * @default ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'], + */ + methods?: Dispatcher.HttpMethod[]; + /** + * Error codes to be retried. e.g. `ECONNRESET`, `ENOTFOUND`, `ETIMEDOUT`, `ECONNREFUSED`, etc. + * + * @type {string[]} + * @default ['ECONNRESET','ECONNREFUSED','ENOTFOUND','ENETDOWN','ENETUNREACH','EHOSTDOWN','EHOSTUNREACH','EPIPE'] + */ + errorCodes?: string[]; + /** + * HTTP status codes to be retried. + * + * @type {number[]} + * @memberof RetryOptions + * @default [500, 502, 503, 504, 429], + */ + statusCodes?: number[]; + } + + export interface RetryHandlers { + dispatch: Dispatcher['dispatch']; + handler: Dispatcher.DispatchHandler; + } +} diff --git a/node_modules/undici-types/round-robin-pool.d.ts b/node_modules/undici-types/round-robin-pool.d.ts new file mode 100644 index 0000000..5129d86 --- /dev/null +++ b/node_modules/undici-types/round-robin-pool.d.ts @@ -0,0 +1,39 @@ +import Client from './client' +import TPoolStats from './pool-stats' +import { URL } from 'node:url' +import Dispatcher from './dispatcher' + +export default RoundRobinPool + +type RoundRobinPoolConnectOptions = Omit + +declare class RoundRobinPool extends Dispatcher { + constructor (url: string | URL, options?: RoundRobinPool.Options) + /** `true` after `pool.close()` has been called. */ + closed: boolean + /** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */ + destroyed: boolean + /** Aggregate stats for a RoundRobinPool. */ + readonly stats: TPoolStats + + // Override dispatcher APIs. + override connect ( + options: RoundRobinPoolConnectOptions + ): Promise + override connect ( + options: RoundRobinPoolConnectOptions, + callback: (err: Error | null, data: Dispatcher.ConnectData) => void + ): void +} + +declare namespace RoundRobinPool { + export type RoundRobinPoolStats = TPoolStats + export interface Options extends Client.Options { + /** Default: `(origin, opts) => new Client(origin, opts)`. */ + factory?(origin: URL, opts: object): Dispatcher; + /** The max number of clients to create. `null` if no limit. Default `null`. */ + connections?: number | null; + /** The amount of time before a client is removed from the pool and closed. `null` if no time limit. Default `null` */ + clientTtl?: number | null; + } +} diff --git a/node_modules/undici-types/snapshot-agent.d.ts b/node_modules/undici-types/snapshot-agent.d.ts new file mode 100644 index 0000000..9696b60 --- /dev/null +++ b/node_modules/undici-types/snapshot-agent.d.ts @@ -0,0 +1,113 @@ +import MockAgent from './mock-agent' + +declare class SnapshotRecorder { + constructor (options?: SnapshotRecorder.Options) + + record (requestOpts: any, response: any): Promise + findSnapshot (requestOpts: any): SnapshotRecorder.Snapshot | undefined + loadSnapshots (filePath?: string): Promise + saveSnapshots (filePath?: string): Promise + clear (): void + getSnapshots (): SnapshotRecorder.Snapshot[] + size (): number + resetCallCounts (): void + deleteSnapshot (requestOpts: any): boolean + getSnapshotInfo (requestOpts: any): SnapshotRecorder.SnapshotInfo | null + replaceSnapshots (snapshotData: SnapshotRecorder.SnapshotData[]): void + destroy (): void +} + +declare namespace SnapshotRecorder { + type SnapshotRecorderMode = 'record' | 'playback' | 'update' + + export interface Options { + snapshotPath?: string + mode?: SnapshotRecorderMode + maxSnapshots?: number + autoFlush?: boolean + flushInterval?: number + matchHeaders?: string[] + ignoreHeaders?: string[] + excludeHeaders?: string[] + matchBody?: boolean + normalizeBody?: (body: string | Buffer | null | undefined) => string + matchQuery?: boolean + normalizeQuery?: (query: URLSearchParams) => string + caseSensitive?: boolean + shouldRecord?: (requestOpts: any) => boolean + shouldPlayback?: (requestOpts: any) => boolean + excludeUrls?: (string | RegExp)[] + } + + export interface Snapshot { + request: { + method: string + url: string + headers: Record + body?: string + } + responses: { + statusCode: number + headers: Record + body: string + trailers: Record + }[] + callCount: number + timestamp: string + } + + export interface SnapshotInfo { + hash: string + request: { + method: string + url: string + headers: Record + body?: string + } + responseCount: number + callCount: number + timestamp: string + } + + export interface SnapshotData { + hash: string + snapshot: Snapshot + } +} + +declare class SnapshotAgent extends MockAgent { + constructor (options?: SnapshotAgent.Options) + + saveSnapshots (filePath?: string): Promise + loadSnapshots (filePath?: string): Promise + getRecorder (): SnapshotRecorder + getMode (): SnapshotRecorder.SnapshotRecorderMode + clearSnapshots (): void + resetCallCounts (): void + deleteSnapshot (requestOpts: any): boolean + getSnapshotInfo (requestOpts: any): SnapshotRecorder.SnapshotInfo | null + replaceSnapshots (snapshotData: SnapshotRecorder.SnapshotData[]): void +} + +declare namespace SnapshotAgent { + export interface Options extends MockAgent.Options { + mode?: SnapshotRecorder.SnapshotRecorderMode + snapshotPath?: string + maxSnapshots?: number + autoFlush?: boolean + flushInterval?: number + matchHeaders?: string[] + ignoreHeaders?: string[] + excludeHeaders?: string[] + matchBody?: boolean + normalizeBody?: (body: string | Buffer | null | undefined) => string + matchQuery?: boolean + normalizeQuery?: (query: URLSearchParams) => string + caseSensitive?: boolean + shouldRecord?: (requestOpts: any) => boolean + shouldPlayback?: (requestOpts: any) => boolean + excludeUrls?: (string | RegExp)[] + } +} + +export { SnapshotAgent, SnapshotRecorder } diff --git a/node_modules/undici-types/socks5-proxy-agent.d.ts b/node_modules/undici-types/socks5-proxy-agent.d.ts new file mode 100644 index 0000000..05e4331 --- /dev/null +++ b/node_modules/undici-types/socks5-proxy-agent.d.ts @@ -0,0 +1,25 @@ +import Dispatcher from './dispatcher' +import buildConnector from './connector' +import { OutgoingHttpHeaders } from './header' +import Pool from './pool' + +export default Socks5ProxyAgent + +declare class Socks5ProxyAgent extends Dispatcher { + constructor (proxyUrl: string | URL, options?: Socks5ProxyAgent.Options) +} + +declare namespace Socks5ProxyAgent { + export interface Options extends Pool.Options { + /** Additional headers to send with the proxy connection */ + headers?: OutgoingHttpHeaders; + /** SOCKS5 proxy username for authentication */ + username?: string; + /** SOCKS5 proxy password for authentication */ + password?: string; + /** Custom connector function for proxy connection */ + connect?: buildConnector.connector; + /** TLS options for the proxy connection (for SOCKS5 over TLS) */ + proxyTls?: buildConnector.BuildOptions; + } +} diff --git a/node_modules/undici-types/util.d.ts b/node_modules/undici-types/util.d.ts new file mode 100644 index 0000000..8fc50cc --- /dev/null +++ b/node_modules/undici-types/util.d.ts @@ -0,0 +1,18 @@ +export namespace util { + /** + * Retrieves a header name and returns its lowercase value. + * @param value Header name + */ + export function headerNameToString (value: string | Buffer): string + + /** + * Receives a header object and returns the parsed value. + * @param headers Header object + * @param obj Object to specify a proxy object. Used to assign parsed values. + * @returns If `obj` is specified, it is equivalent to `obj`. + */ + export function parseHeaders ( + headers: (Buffer | string | (Buffer | string)[])[], + obj?: Record + ): Record +} diff --git a/node_modules/undici-types/utility.d.ts b/node_modules/undici-types/utility.d.ts new file mode 100644 index 0000000..bfb3ca7 --- /dev/null +++ b/node_modules/undici-types/utility.d.ts @@ -0,0 +1,7 @@ +type AutocompletePrimitiveBaseType = + T extends string ? string : + T extends number ? number : + T extends boolean ? boolean : + never + +export type Autocomplete = T | (AutocompletePrimitiveBaseType & Record) diff --git a/node_modules/undici-types/webidl.d.ts b/node_modules/undici-types/webidl.d.ts new file mode 100644 index 0000000..b1873b9 --- /dev/null +++ b/node_modules/undici-types/webidl.d.ts @@ -0,0 +1,346 @@ +// These types are not exported, and are only used internally +import { BufferSource } from 'node:stream/web' +import * as undici from './index' + +/** + * Take in an unknown value and return one that is of type T + */ +type Converter = (object: unknown) => T + +type SequenceConverter = (object: unknown, iterable?: IterableIterator) => T[] + +type RecordConverter = (object: unknown) => Record + +interface WebidlErrors { + /** + * @description Instantiate an error + */ + exception (opts: { header: string, message: string }): TypeError + /** + * @description Instantiate an error when conversion from one type to another has failed + */ + conversionFailed (opts: { + prefix: string + argument: string + types: string[] + }): TypeError + /** + * @description Throw an error when an invalid argument is provided + */ + invalidArgument (opts: { + prefix: string + value: string + type: string + }): TypeError +} + +interface WebIDLTypes { + UNDEFINED: 1, + BOOLEAN: 2, + STRING: 3, + SYMBOL: 4, + NUMBER: 5, + BIGINT: 6, + NULL: 7 + OBJECT: 8 +} + +interface WebidlUtil { + /** + * @see https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values + */ + Type (object: unknown): WebIDLTypes[keyof WebIDLTypes] + + TypeValueToString (o: unknown): + | 'Undefined' + | 'Boolean' + | 'String' + | 'Symbol' + | 'Number' + | 'BigInt' + | 'Null' + | 'Object' + + Types: WebIDLTypes + + /** + * @see https://webidl.spec.whatwg.org/#abstract-opdef-converttoint + */ + ConvertToInt ( + V: unknown, + bitLength: number, + signedness: 'signed' | 'unsigned', + flags?: number + ): number + + /** + * @see https://webidl.spec.whatwg.org/#abstract-opdef-integerpart + */ + IntegerPart (N: number): number + + /** + * Stringifies {@param V} + */ + Stringify (V: any): string + + MakeTypeAssertion (I: I): (arg: any) => arg is I + + /** + * Mark a value as uncloneable for Node.js. + */ + markAsUncloneable (V: any): void + + IsResizableArrayBuffer (V: ArrayBufferLike): boolean + + HasFlag (flag: number, attributes: number): boolean + + /** + * @see https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy + */ + getCopyOfBytesHeldByBufferSource (bufferSource: BufferSource): Uint8Array +} + +interface WebidlConverters { + /** + * @see https://webidl.spec.whatwg.org/#es-DOMString + */ + DOMString (V: unknown, prefix: string, argument: string, flags?: number): string + + /** + * @see https://webidl.spec.whatwg.org/#es-ByteString + */ + ByteString (V: unknown, prefix: string, argument: string): string + + /** + * @see https://webidl.spec.whatwg.org/#es-USVString + */ + USVString (V: unknown): string + + /** + * @see https://webidl.spec.whatwg.org/#es-boolean + */ + boolean (V: unknown): boolean + + /** + * @see https://webidl.spec.whatwg.org/#es-any + */ + any (V: Value): Value + + /** + * @see https://webidl.spec.whatwg.org/#es-long-long + */ + ['long long'] (V: unknown): number + + /** + * @see https://webidl.spec.whatwg.org/#es-unsigned-long-long + */ + ['unsigned long long'] (V: unknown): number + + /** + * @see https://webidl.spec.whatwg.org/#es-unsigned-long + */ + ['unsigned long'] (V: unknown): number + + /** + * @see https://webidl.spec.whatwg.org/#es-unsigned-short + */ + ['unsigned short'] (V: unknown, flags?: number): number + + /** + * @see https://webidl.spec.whatwg.org/#idl-ArrayBuffer + */ + ArrayBuffer ( + V: unknown, + prefix: string, + argument: string, + options?: { allowResizable: boolean } + ): ArrayBuffer + + /** + * @see https://webidl.spec.whatwg.org/#idl-SharedArrayBuffer + */ + SharedArrayBuffer ( + V: unknown, + prefix: string, + argument: string, + options?: { allowResizable: boolean } + ): SharedArrayBuffer + + /** + * @see https://webidl.spec.whatwg.org/#es-buffer-source-types + */ + TypedArray ( + V: unknown, + T: new () => NodeJS.TypedArray, + prefix: string, + argument: string, + flags?: number + ): NodeJS.TypedArray + + /** + * @see https://webidl.spec.whatwg.org/#es-buffer-source-types + */ + DataView ( + V: unknown, + prefix: string, + argument: string, + flags?: number + ): DataView + + /** + * @see https://webidl.spec.whatwg.org/#es-buffer-source-types + */ + ArrayBufferView ( + V: unknown, + prefix: string, + argument: string, + flags?: number + ): NodeJS.ArrayBufferView + + /** + * @see https://webidl.spec.whatwg.org/#BufferSource + */ + BufferSource ( + V: unknown, + prefix: string, + argument: string, + flags?: number + ): ArrayBuffer | NodeJS.ArrayBufferView + + /** + * @see https://webidl.spec.whatwg.org/#AllowSharedBufferSource + */ + AllowSharedBufferSource ( + V: unknown, + prefix: string, + argument: string, + flags?: number + ): ArrayBuffer | SharedArrayBuffer | NodeJS.ArrayBufferView + + ['sequence']: SequenceConverter + + ['sequence>']: SequenceConverter + + ['record']: RecordConverter + + /** + * @see https://fetch.spec.whatwg.org/#requestinfo + */ + RequestInfo (V: unknown): undici.Request | string + + /** + * @see https://fetch.spec.whatwg.org/#requestinit + */ + RequestInit (V: unknown): undici.RequestInit + + /** + * @see https://html.spec.whatwg.org/multipage/webappapis.html#eventhandlernonnull + */ + EventHandlerNonNull (V: unknown): Function | null + + WebSocketStreamWrite (V: unknown): ArrayBuffer | NodeJS.TypedArray | string + + [Key: string]: (...args: any[]) => unknown +} + +type WebidlIsFunction = (arg: any) => arg is T + +interface WebidlIs { + Request: WebidlIsFunction + Response: WebidlIsFunction + ReadableStream: WebidlIsFunction + Blob: WebidlIsFunction + URLSearchParams: WebidlIsFunction + File: WebidlIsFunction + FormData: WebidlIsFunction + URL: WebidlIsFunction + WebSocketError: WebidlIsFunction + AbortSignal: WebidlIsFunction + MessagePort: WebidlIsFunction + USVString: WebidlIsFunction + /** + * @see https://webidl.spec.whatwg.org/#BufferSource + */ + BufferSource: WebidlIsFunction +} + +export interface Webidl { + errors: WebidlErrors + util: WebidlUtil + converters: WebidlConverters + is: WebidlIs + attributes: WebIDLExtendedAttributes + + /** + * @description Performs a brand-check on {@param V} to ensure it is a + * {@param cls} object. + */ + brandCheck unknown>(V: unknown, cls: Interface): asserts V is Interface + + brandCheckMultiple unknown)[]> (list: Interfaces): (V: any) => asserts V is Interfaces[number] + + /** + * @see https://webidl.spec.whatwg.org/#es-sequence + * @description Convert a value, V, to a WebIDL sequence type. + */ + sequenceConverter (C: Converter): SequenceConverter + + illegalConstructor (): never + + /** + * @see https://webidl.spec.whatwg.org/#es-to-record + * @description Convert a value, V, to a WebIDL record type. + */ + recordConverter ( + keyConverter: Converter, + valueConverter: Converter + ): RecordConverter + + /** + * Similar to {@link Webidl.brandCheck} but allows skipping the check if third party + * interfaces are allowed. + */ + interfaceConverter (typeCheck: WebidlIsFunction, name: string): ( + V: unknown, + prefix: string, + argument: string + ) => asserts V is Interface + + // TODO(@KhafraDev): a type could likely be implemented that can infer the return type + // from the converters given? + /** + * Converts a value, V, to a WebIDL dictionary types. Allows limiting which keys are + * allowed, values allowed, optional and required keys. Auto converts the value to + * a type given a converter. + */ + dictionaryConverter (converters: { + key: string, + defaultValue?: () => unknown, + required?: boolean, + converter: (...args: unknown[]) => unknown, + allowedValues?: unknown[] + }[]): (V: unknown) => Record + + /** + * @see https://webidl.spec.whatwg.org/#idl-nullable-type + * @description allows a type, V, to be null + */ + nullableConverter ( + converter: Converter + ): (V: unknown) => ReturnType | null + + argumentLengthCheck (args: { length: number }, min: number, context: string): void +} + +interface WebIDLExtendedAttributes { + /** https://webidl.spec.whatwg.org/#Clamp */ + Clamp: number + /** https://webidl.spec.whatwg.org/#EnforceRange */ + EnforceRange: number + /** https://webidl.spec.whatwg.org/#AllowShared */ + AllowShared: number + /** https://webidl.spec.whatwg.org/#AllowResizable */ + AllowResizable: number + /** https://webidl.spec.whatwg.org/#LegacyNullToEmptyString */ + LegacyNullToEmptyString: number +} diff --git a/node_modules/undici-types/websocket.d.ts b/node_modules/undici-types/websocket.d.ts new file mode 100644 index 0000000..d48b9da --- /dev/null +++ b/node_modules/undici-types/websocket.d.ts @@ -0,0 +1,188 @@ +/// + +import type { Blob } from 'node:buffer' +import type { ReadableStream, WritableStream } from 'node:stream/web' +import type { MessagePort } from 'node:worker_threads' +import { + EventInit, + EventListenerOptions, + AddEventListenerOptions, + EventListenerOrEventListenerObject +} from './patch' +import Dispatcher from './dispatcher' +import { HeadersInit } from './fetch' + +export type BinaryType = 'blob' | 'arraybuffer' + +interface WebSocketEventMap { + close: CloseEvent + error: ErrorEvent + message: MessageEvent + open: Event +} + +interface WebSocket extends EventTarget { + binaryType: BinaryType + + readonly bufferedAmount: number + readonly extensions: string + + onclose: ((this: WebSocket, ev: WebSocketEventMap['close']) => any) | null + onerror: ((this: WebSocket, ev: WebSocketEventMap['error']) => any) | null + onmessage: ((this: WebSocket, ev: WebSocketEventMap['message']) => any) | null + onopen: ((this: WebSocket, ev: WebSocketEventMap['open']) => any) | null + + readonly protocol: string + readonly readyState: number + readonly url: string + + close(code?: number, reason?: string): void + send(data: string | ArrayBufferLike | Blob | ArrayBufferView): void + + readonly CLOSED: number + readonly CLOSING: number + readonly CONNECTING: number + readonly OPEN: number + + addEventListener( + type: K, + listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, + options?: boolean | AddEventListenerOptions + ): void + addEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | AddEventListenerOptions + ): void + removeEventListener( + type: K, + listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, + options?: boolean | EventListenerOptions + ): void + removeEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | EventListenerOptions + ): void +} + +export declare const WebSocket: { + prototype: WebSocket + new (url: string | URL, protocols?: string | string[] | WebSocketInit): WebSocket + readonly CLOSED: number + readonly CLOSING: number + readonly CONNECTING: number + readonly OPEN: number +} + +interface CloseEventInit extends EventInit { + code?: number + reason?: string + wasClean?: boolean +} + +interface CloseEvent extends Event { + readonly code: number + readonly reason: string + readonly wasClean: boolean +} + +export declare const CloseEvent: { + prototype: CloseEvent + new (type: string, eventInitDict?: CloseEventInit): CloseEvent +} + +interface MessageEventInit extends EventInit { + data?: T + lastEventId?: string + origin?: string + ports?: MessagePort[] + source?: MessagePort | null +} + +interface MessageEvent extends Event { + readonly data: T + readonly lastEventId: string + readonly origin: string + readonly ports: readonly MessagePort[] + readonly source: MessagePort | null + initMessageEvent( + type: string, + bubbles?: boolean, + cancelable?: boolean, + data?: any, + origin?: string, + lastEventId?: string, + source?: MessagePort | null, + ports?: MessagePort[] + ): void; +} + +export declare const MessageEvent: { + prototype: MessageEvent + new(type: string, eventInitDict?: MessageEventInit): MessageEvent +} + +interface ErrorEventInit extends EventInit { + message?: string + filename?: string + lineno?: number + colno?: number + error?: any +} + +interface ErrorEvent extends Event { + readonly message: string + readonly filename: string + readonly lineno: number + readonly colno: number + readonly error: Error +} + +export declare const ErrorEvent: { + prototype: ErrorEvent + new (type: string, eventInitDict?: ErrorEventInit): ErrorEvent +} + +interface WebSocketInit { + protocols?: string | string[], + dispatcher?: Dispatcher, + headers?: HeadersInit +} + +interface WebSocketStreamOptions { + protocols?: string | string[] + signal?: AbortSignal +} + +interface WebSocketCloseInfo { + closeCode: number + reason: string +} + +interface WebSocketStream { + closed: Promise + opened: Promise<{ + extensions: string + protocol: string + readable: ReadableStream + writable: WritableStream + }> + url: string + + close(options?: Partial): void +} + +export declare const WebSocketStream: { + prototype: WebSocketStream + new (url: string | URL, options?: WebSocketStreamOptions): WebSocketStream +} + +interface WebSocketError extends Event, WebSocketCloseInfo {} + +export declare const WebSocketError: { + prototype: WebSocketError + new (type: string, init?: WebSocketCloseInfo): WebSocketError +} + +export declare const ping: (ws: WebSocket, body?: Buffer) => void diff --git a/node_modules/v8-compile-cache-lib/CHANGELOG.md b/node_modules/v8-compile-cache-lib/CHANGELOG.md new file mode 100644 index 0000000..d4da256 --- /dev/null +++ b/node_modules/v8-compile-cache-lib/CHANGELOG.md @@ -0,0 +1,53 @@ +# `v8-module-cache` Changelog + +## 2021-03-05, Version 2.3.0 + +* Fix use require.main instead of module.parent [#34](https://github.com/zertosh/v8-compile-cache/pull/34). + +## 2020-10-28, Version 2.2.0 + +* Added `V8_COMPILE_CACHE_CACHE_DIR` option [#23](https://github.com/zertosh/v8-compile-cache/pull/23). + +## 2020-05-30, Version 2.1.1 + +* Stop using process.umask() [#28](https://github.com/zertosh/v8-compile-cache/pull/28). + +## 2019-08-04, Version 2.1.0 + +* Fix Electron by calling the module wrapper with `Buffer` [#10](https://github.com/zertosh/v8-compile-cache/pull/10). + +## 2019-05-10, Version 2.0.3 + +* Add `LICENSE` file [#19](https://github.com/zertosh/v8-compile-cache/pull/19). +* Add "repository" to `package.json` (see [eea336e](https://github.com/zertosh/v8-compile-cache/commit/eea336eaa8360f9ded9342b8aa928e56ac6a7529)). +* Support `require.resolve.paths` (added in Node v8.9.0) [#20](https://github.com/zertosh/v8-compile-cache/pull/20)/[#22](https://github.com/zertosh/v8-compile-cache/pull/22). + +## 2018-08-06, Version 2.0.2 + +* Re-publish. + +## 2018-08-06, Version 2.0.1 + +* Support `require.resolve` options (added in Node v8.9.0). + +## 2018-04-30, Version 2.0.0 + +* Use `Buffer.alloc` instead of `new Buffer()`. +* Drop support for Node 5.x. + +## 2018-01-23, Version 1.1.2 + +* Instead of checking for `process.versions.v8`, check that `script.cachedDataProduced` is `true` (rather than `null`/`undefined`) for support to be considered existent. + +## 2018-01-23, Version 1.1.1 + +* Check for the existence of `process.versions.v8` before attaching hook (see [f8b0388](https://github.com/zertosh/v8-compile-cache/commit/f8b038848be94bc2c905880dd50447c73393f364)). + +## 2017-03-27, Version 1.1.0 + +* Safer cache directory creation (see [bcb3b12](https://github.com/zertosh/v8-compile-cache/commit/bcb3b12c819ab0927ec4408e70f612a6d50a9617)). + - The cache is now suffixed with the user's uid on POSIX systems (i.e. `/path/to/tmp/v8-compile-cache-1234`). + +## 2017-02-21, Version 1.0.0 + +* Initial release. diff --git a/node_modules/v8-compile-cache-lib/LICENSE b/node_modules/v8-compile-cache-lib/LICENSE new file mode 100644 index 0000000..b72b670 --- /dev/null +++ b/node_modules/v8-compile-cache-lib/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 Andres Suarez + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/v8-compile-cache-lib/README.md b/node_modules/v8-compile-cache-lib/README.md new file mode 100644 index 0000000..0593feb --- /dev/null +++ b/node_modules/v8-compile-cache-lib/README.md @@ -0,0 +1,60 @@ +# v8-compile-cache-lib + +> Fork of [`v8-compile-cache`](https://www.npmjs.com/package/v8-compile-cache) exposed as an API for programmatic usage in other libraries and tools. + +--- + +[![Build status](https://img.shields.io/github/workflow/status/cspotcode/v8-compile-cache-lib/Continuous%20Integration)](https://github.com/cspotcode/v8-compile-cache-lib/actions?query=workflow%3A%22Continuous+Integration%22) + +`v8-compile-cache-lib` attaches a `require` hook to use [V8's code cache](https://v8project.blogspot.com/2015/07/code-caching.html) to speed up instantiation time. The "code cache" is the work of parsing and compiling done by V8. + +The ability to tap into V8 to produce/consume this cache was introduced in [Node v5.7.0](https://nodejs.org/en/blog/release/v5.7.0/). + +## Usage + +1. Add the dependency: + + ```sh + $ npm install --save v8-compile-cache-lib + ``` + +2. Then, in your entry module add: + + ```js + require('v8-compile-cache-lib').install(); + ``` + +**`.install()` in Node <5.7.0 is a noop – but you need at least Node 4.0.0 to support the ES2015 syntax used by `v8-compile-cache-lib`.** + +## Options + +Set the environment variable `DISABLE_V8_COMPILE_CACHE=1` to disable the cache. + +Cache directory is defined by environment variable `V8_COMPILE_CACHE_CACHE_DIR` or defaults to `/v8-compile-cache-`. + +## Internals + +Cache files are suffixed `.BLOB` and `.MAP` corresponding to the entry module that required `v8-compile-cache-lib`. The cache is _entry module specific_ because it is faster to load the entire code cache into memory at once, than it is to read it from disk on a file-by-file basis. + +## Benchmarks + +See https://github.com/cspotcode/v8-compile-cache-lib/tree/master/bench. + +**Load Times:** + +| Module | Without Cache | With Cache | +| ---------------- | -------------:| ----------:| +| `babel-core` | `218ms` | `185ms` | +| `yarn` | `153ms` | `113ms` | +| `yarn` (bundled) | `228ms` | `105ms` | + +_^ Includes the overhead of loading the cache itself._ + +## Acknowledgements + +* The original [`v8-compile-cache`](https://github.com/zertosh/v8-compile-cache) from which this library is forked. +* `FileSystemBlobStore` and `NativeCompileCache` are based on Atom's implementation of their v8 compile cache: + - https://github.com/atom/atom/blob/b0d7a8a/src/file-system-blob-store.js + - https://github.com/atom/atom/blob/b0d7a8a/src/native-compile-cache.js +* `mkdirpSync` is based on: + - https://github.com/substack/node-mkdirp/blob/f2003bb/index.js#L55-L98 diff --git a/node_modules/v8-compile-cache-lib/package.json b/node_modules/v8-compile-cache-lib/package.json new file mode 100644 index 0000000..e905b10 --- /dev/null +++ b/node_modules/v8-compile-cache-lib/package.json @@ -0,0 +1,35 @@ +{ + "name": "v8-compile-cache-lib", + "version": "3.0.1", + "description": "Require hook for automatic V8 compile cache persistence", + "main": "v8-compile-cache.js", + "scripts": { + "bench": "bench/run.sh", + "eslint": "eslint --max-warnings=0 .", + "tap": "tap test/*-test.js", + "test": "npm run tap", + "posttest": "npm run eslint" + }, + "author": "Andrew Bradley ", + "repository": { + "type": "git", + "url": "https://github.com/cspotcode/v8-compile-cache-lib.git" + }, + "files": [ + "v8-compile-cache.d.ts", + "v8-compile-cache.js" + ], + "license": "MIT", + "dependencies": {}, + "devDependencies": { + "babel-core": "6.26.3", + "eslint": "^7.12.1", + "flow-parser": "0.136.0", + "rimraf": "^2.5.4", + "rxjs": "6.6.3", + "semver": "^5.3.0", + "tap": "^9.0.0", + "temp": "^0.8.3", + "yarn": "1.22.10" + } +} diff --git a/node_modules/v8-compile-cache-lib/v8-compile-cache.d.ts b/node_modules/v8-compile-cache-lib/v8-compile-cache.d.ts new file mode 100644 index 0000000..fb80c2c --- /dev/null +++ b/node_modules/v8-compile-cache-lib/v8-compile-cache.d.ts @@ -0,0 +1,7 @@ +export function install(opts?: { + cacheDir?: string; + prefix?: string; +}): { + uninstall(): void; +} | undefined; +x \ No newline at end of file diff --git a/node_modules/v8-compile-cache-lib/v8-compile-cache.js b/node_modules/v8-compile-cache-lib/v8-compile-cache.js new file mode 100644 index 0000000..baedb36 --- /dev/null +++ b/node_modules/v8-compile-cache-lib/v8-compile-cache.js @@ -0,0 +1,391 @@ +'use strict'; + +const Module = require('module'); +const crypto = require('crypto'); +const fs = require('fs'); +const path = require('path'); +const vm = require('vm'); +const os = require('os'); + +const hasOwnProperty = Object.prototype.hasOwnProperty; + +//------------------------------------------------------------------------------ +// FileSystemBlobStore +//------------------------------------------------------------------------------ + +class FileSystemBlobStore { + constructor(directory, prefix) { + const name = prefix ? slashEscape(prefix + '.') : ''; + this._blobFilename = path.join(directory, name + 'BLOB'); + this._mapFilename = path.join(directory, name + 'MAP'); + this._lockFilename = path.join(directory, name + 'LOCK'); + this._directory = directory; + this._load(); + } + + has(key, invalidationKey) { + if (hasOwnProperty.call(this._memoryBlobs, key)) { + return this._invalidationKeys[key] === invalidationKey; + } else if (hasOwnProperty.call(this._storedMap, key)) { + return this._storedMap[key][0] === invalidationKey; + } + return false; + } + + get(key, invalidationKey) { + if (hasOwnProperty.call(this._memoryBlobs, key)) { + if (this._invalidationKeys[key] === invalidationKey) { + return this._memoryBlobs[key]; + } + } else if (hasOwnProperty.call(this._storedMap, key)) { + const mapping = this._storedMap[key]; + if (mapping[0] === invalidationKey) { + return this._storedBlob.slice(mapping[1], mapping[2]); + } + } + } + + set(key, invalidationKey, buffer) { + this._invalidationKeys[key] = invalidationKey; + this._memoryBlobs[key] = buffer; + this._dirty = true; + } + + delete(key) { + if (hasOwnProperty.call(this._memoryBlobs, key)) { + this._dirty = true; + delete this._memoryBlobs[key]; + } + if (hasOwnProperty.call(this._invalidationKeys, key)) { + this._dirty = true; + delete this._invalidationKeys[key]; + } + if (hasOwnProperty.call(this._storedMap, key)) { + this._dirty = true; + delete this._storedMap[key]; + } + } + + isDirty() { + return this._dirty; + } + + save() { + const dump = this._getDump(); + const blobToStore = Buffer.concat(dump[0]); + const mapToStore = JSON.stringify(dump[1]); + + try { + mkdirpSync(this._directory); + fs.writeFileSync(this._lockFilename, 'LOCK', {flag: 'wx'}); + } catch (error) { + // Swallow the exception if we fail to acquire the lock. + return false; + } + + try { + fs.writeFileSync(this._blobFilename, blobToStore); + fs.writeFileSync(this._mapFilename, mapToStore); + } finally { + fs.unlinkSync(this._lockFilename); + } + + return true; + } + + _load() { + try { + this._storedBlob = fs.readFileSync(this._blobFilename); + this._storedMap = JSON.parse(fs.readFileSync(this._mapFilename)); + } catch (e) { + this._storedBlob = Buffer.alloc(0); + this._storedMap = {}; + } + this._dirty = false; + this._memoryBlobs = {}; + this._invalidationKeys = {}; + } + + _getDump() { + const buffers = []; + const newMap = {}; + let offset = 0; + + function push(key, invalidationKey, buffer) { + buffers.push(buffer); + newMap[key] = [invalidationKey, offset, offset + buffer.length]; + offset += buffer.length; + } + + for (const key of Object.keys(this._memoryBlobs)) { + const buffer = this._memoryBlobs[key]; + const invalidationKey = this._invalidationKeys[key]; + push(key, invalidationKey, buffer); + } + + for (const key of Object.keys(this._storedMap)) { + if (hasOwnProperty.call(newMap, key)) continue; + const mapping = this._storedMap[key]; + const buffer = this._storedBlob.slice(mapping[1], mapping[2]); + push(key, mapping[0], buffer); + } + + return [buffers, newMap]; + } +} + +//------------------------------------------------------------------------------ +// NativeCompileCache +//------------------------------------------------------------------------------ + +class NativeCompileCache { + constructor() { + this._cacheStore = null; + this._previousModuleCompile = null; + } + + setCacheStore(cacheStore) { + this._cacheStore = cacheStore; + } + + install() { + const self = this; + const hasRequireResolvePaths = typeof require.resolve.paths === 'function'; + this._previousModuleCompile = Module.prototype._compile; + Module.prototype._compile = this._ownModuleCompile = _ownModuleCompile; + self.enabled = true; + function _ownModuleCompile(content, filename) { + if(!self.enabled) return this._previousModuleCompile.apply(this, arguments); + const mod = this; + + function require(id) { + return mod.require(id); + } + + // https://github.com/nodejs/node/blob/v10.15.3/lib/internal/modules/cjs/helpers.js#L28 + function resolve(request, options) { + return Module._resolveFilename(request, mod, false, options); + } + require.resolve = resolve; + + // https://github.com/nodejs/node/blob/v10.15.3/lib/internal/modules/cjs/helpers.js#L37 + // resolve.resolve.paths was added in v8.9.0 + if (hasRequireResolvePaths) { + resolve.paths = function paths(request) { + return Module._resolveLookupPaths(request, mod, true); + }; + } + + require.main = process.mainModule; + + // Enable support to add extra extension types + require.extensions = Module._extensions; + require.cache = Module._cache; + + const dirname = path.dirname(filename); + + const compiledWrapper = self._moduleCompile(filename, content); + + // We skip the debugger setup because by the time we run, node has already + // done that itself. + + // `Buffer` is included for Electron. + // See https://github.com/zertosh/v8-compile-cache/pull/10#issuecomment-518042543 + const args = [mod.exports, require, mod, filename, dirname, process, global, Buffer]; + return compiledWrapper.apply(mod.exports, args); + } + } + + uninstall() { + this.enabled = false; + // If something else has since been installed on top of us, we cannot overwrite it. + if(Module.prototype._compile === this._ownModuleCompile) { + Module.prototype._compile = this._previousModuleCompile; + } + } + + _moduleCompile(filename, content) { + // https://github.com/nodejs/node/blob/v7.5.0/lib/module.js#L511 + + // Remove shebang + var contLen = content.length; + if (contLen >= 2) { + if (content.charCodeAt(0) === 35/*#*/ && + content.charCodeAt(1) === 33/*!*/) { + if (contLen === 2) { + // Exact match + content = ''; + } else { + // Find end of shebang line and slice it off + var i = 2; + for (; i < contLen; ++i) { + var code = content.charCodeAt(i); + if (code === 10/*\n*/ || code === 13/*\r*/) break; + } + if (i === contLen) { + content = ''; + } else { + // Note that this actually includes the newline character(s) in the + // new output. This duplicates the behavior of the regular + // expression that was previously used to replace the shebang line + content = content.slice(i); + } + } + } + } + + // create wrapper function + var wrapper = Module.wrap(content); + + var invalidationKey = crypto + .createHash('sha1') + .update(content, 'utf8') + .digest('hex'); + + var buffer = this._cacheStore.get(filename, invalidationKey); + + var script = new vm.Script(wrapper, { + filename: filename, + lineOffset: 0, + displayErrors: true, + cachedData: buffer, + produceCachedData: true, + }); + + if (script.cachedDataProduced) { + this._cacheStore.set(filename, invalidationKey, script.cachedData); + } else if (script.cachedDataRejected) { + this._cacheStore.delete(filename); + } + + var compiledWrapper = script.runInThisContext({ + filename: filename, + lineOffset: 0, + columnOffset: 0, + displayErrors: true, + }); + + return compiledWrapper; + } +} + +//------------------------------------------------------------------------------ +// utilities +// +// https://github.com/substack/node-mkdirp/blob/f2003bb/index.js#L55-L98 +// https://github.com/zertosh/slash-escape/blob/e7ebb99/slash-escape.js +//------------------------------------------------------------------------------ + +function mkdirpSync(p_) { + _mkdirpSync(path.resolve(p_), 0o777); +} + +function _mkdirpSync(p, mode) { + try { + fs.mkdirSync(p, mode); + } catch (err0) { + if (err0.code === 'ENOENT') { + _mkdirpSync(path.dirname(p)); + _mkdirpSync(p); + } else { + try { + const stat = fs.statSync(p); + if (!stat.isDirectory()) { throw err0; } + } catch (err1) { + throw err0; + } + } + } +} + +function slashEscape(str) { + const ESCAPE_LOOKUP = { + '\\': 'zB', + ':': 'zC', + '/': 'zS', + '\x00': 'z0', + 'z': 'zZ', + }; + const ESCAPE_REGEX = /[\\:/\x00z]/g; // eslint-disable-line no-control-regex + return str.replace(ESCAPE_REGEX, match => ESCAPE_LOOKUP[match]); +} + +function supportsCachedData() { + const script = new vm.Script('""', {produceCachedData: true}); + // chakracore, as of v1.7.1.0, returns `false`. + return script.cachedDataProduced === true; +} + +function getCacheDir() { + const v8_compile_cache_cache_dir = process.env.V8_COMPILE_CACHE_CACHE_DIR; + if (v8_compile_cache_cache_dir) { + return v8_compile_cache_cache_dir; + } + + // Avoid cache ownership issues on POSIX systems. + const dirname = typeof process.getuid === 'function' + ? 'v8-compile-cache-' + process.getuid() + : 'v8-compile-cache'; + const version = typeof process.versions.v8 === 'string' + ? process.versions.v8 + : typeof process.versions.chakracore === 'string' + ? 'chakracore-' + process.versions.chakracore + : 'node-' + process.version; + const cacheDir = path.join(os.tmpdir(), dirname, version); + return cacheDir; +} + +function getMainName() { + // `require.main.filename` is undefined or null when: + // * node -e 'require("v8-compile-cache")' + // * node -r 'v8-compile-cache' + // * Or, requiring from the REPL. + const mainName = require.main && typeof require.main.filename === 'string' + ? require.main.filename + : process.cwd(); + return mainName; +} + +function install(opts) { + if (!process.env.DISABLE_V8_COMPILE_CACHE && supportsCachedData()) { + if(typeof opts === 'undefined') opts = {} + let cacheDir = opts.cacheDir + if(typeof cacheDir === 'undefined') cacheDir = getCacheDir(); + let prefix = opts.prefix + if(typeof prefix === 'undefined') prefix = getMainName(); + const blobStore = new FileSystemBlobStore(cacheDir, prefix); + + const nativeCompileCache = new NativeCompileCache(); + nativeCompileCache.setCacheStore(blobStore); + nativeCompileCache.install(); + + let uninstalled = false; + const uninstall = () => { + if(uninstalled) return; + uninstalled = true; + process.removeListener('exit', uninstall); + if (blobStore.isDirty()) { + blobStore.save(); + } + nativeCompileCache.uninstall(); + } + process.once('exit', uninstall); + return {uninstall}; + } +} + +//------------------------------------------------------------------------------ +// main +//------------------------------------------------------------------------------ + +module.exports.install = install; + +module.exports.__TEST__ = { + FileSystemBlobStore, + NativeCompileCache, + mkdirpSync, + slashEscape, + supportsCachedData, + getCacheDir, + getMainName, +}; diff --git a/node_modules/yn/index.d.ts b/node_modules/yn/index.d.ts new file mode 100644 index 0000000..c72a414 --- /dev/null +++ b/node_modules/yn/index.d.ts @@ -0,0 +1,65 @@ +declare namespace yn { + interface Options { + /** + Use a key distance-based score to leniently accept typos of `yes` and `no`. + + @default false + */ + readonly lenient?: boolean; + + /** + Default value if no match was found. + + @default null + */ + readonly default?: boolean | null; + } + + interface OptionsWithDefault extends Options { + default: boolean; + } +} + +declare const yn: { + /** + Parse yes/no like values. + + The following case-insensitive values are recognized: `'y', 'yes', 'true', true, '1', 1, 'n', 'no', 'false', false, '0', 0` + + @param input - Value that should be converted. + @returns The parsed input if it can be parsed or the default value defined in the `default` option. + + @example + ``` + import yn = require('yn'); + + yn('y'); + //=> true + + yn('NO'); + //=> false + + yn(true); + //=> true + + yn('abomasum'); + //=> null + + yn('abomasum', {default: false}); + //=> false + + yn('mo', {lenient: true}); + //=> false + ``` + */ + (input: unknown, options: yn.OptionsWithDefault): boolean; + (input: unknown, options?: yn.Options): boolean | null; + + // TODO: Remove this for the next major release, refactor the whole definition to: + // declare function yn(input: unknown, options: yn.OptionsWithDefault): boolean; + // declare function yn(input: unknown, options?: yn.Options): boolean | null; + // export = yn; + default: typeof yn; +}; + +export = yn; diff --git a/node_modules/yn/index.js b/node_modules/yn/index.js new file mode 100644 index 0000000..a5a24c1 --- /dev/null +++ b/node_modules/yn/index.js @@ -0,0 +1,33 @@ +'use strict'; +const lenient = require('./lenient'); + +const yn = (input, options) => { + input = String(input).trim(); + + options = Object.assign({ + lenient: false, + default: null + }, options); + + if (options.default !== null && typeof options.default !== 'boolean') { + throw new TypeError(`Expected the \`default\` option to be of type \`boolean\`, got \`${typeof options.default}\``); + } + + if (/^(?:y|yes|true|1)$/i.test(input)) { + return true; + } + + if (/^(?:n|no|false|0)$/i.test(input)) { + return false; + } + + if (options.lenient === true) { + return lenient(input, options); + } + + return options.default; +}; + +module.exports = yn; +// TODO: Remove this for the next major release +module.exports.default = yn; diff --git a/node_modules/yn/lenient.js b/node_modules/yn/lenient.js new file mode 100644 index 0000000..51cd836 --- /dev/null +++ b/node_modules/yn/lenient.js @@ -0,0 +1,105 @@ +'use strict'; + +const YES_MATCH_SCORE_THRESHOLD = 2; +const NO_MATCH_SCORE_THRESHOLD = 1.25; + +const yMatch = new Map([ + [5, 0.25], + [6, 0.25], + [7, 0.25], + ['t', 0.75], + ['y', 1], + ['u', 0.75], + ['g', 0.25], + ['h', 0.25], + ['j', 0.25] +]); + +const eMatch = new Map([ + [2, 0.25], + [3, 0.25], + [4, 0.25], + ['w', 0.75], + ['e', 1], + ['r', 0.75], + ['s', 0.25], + ['d', 0.25], + ['f', 0.25] +]); + +const sMatch = new Map([ + ['q', 0.25], + ['w', 0.25], + ['e', 0.25], + ['a', 0.75], + ['s', 1], + ['d', 0.75], + ['z', 0.25], + ['x', 0.25], + ['c', 0.25] +]); + +const nMatch = new Map([ + ['h', 0.25], + ['j', 0.25], + ['k', 0.25], + ['b', 0.75], + ['n', 1], + ['m', 0.75] +]); + +const oMatch = new Map([ + [9, 0.25], + [0, 0.25], + ['i', 0.75], + ['o', 1], + ['p', 0.75], + ['k', 0.25], + ['l', 0.25] +]); + +function getYesMatchScore(value) { + const [y, e, s] = value; + let score = 0; + + if (yMatch.has(y)) { + score += yMatch.get(y); + } + + if (eMatch.has(e)) { + score += eMatch.get(e); + } + + if (sMatch.has(s)) { + score += sMatch.get(s); + } + + return score; +} + +function getNoMatchScore(value) { + const [n, o] = value; + let score = 0; + + if (nMatch.has(n)) { + score += nMatch.get(n); + } + + if (oMatch.has(o)) { + score += oMatch.get(o); + } + + return score; +} + +module.exports = (input, options) => { + if (getYesMatchScore(input) >= YES_MATCH_SCORE_THRESHOLD) { + return true; + } + + if (getNoMatchScore(input) >= NO_MATCH_SCORE_THRESHOLD) { + return false; + } + + return options.default; +}; diff --git a/node_modules/yn/license b/node_modules/yn/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/yn/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/yn/package.json b/node_modules/yn/package.json new file mode 100644 index 0000000..47d86f2 --- /dev/null +++ b/node_modules/yn/package.json @@ -0,0 +1,42 @@ +{ + "name": "yn", + "version": "3.1.1", + "description": "Parse yes/no like values", + "license": "MIT", + "repository": "sindresorhus/yn", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "lenient.js", + "index.d.ts" + ], + "keywords": [ + "yn", + "yes", + "no", + "cli", + "prompt", + "validate", + "input", + "answer", + "true", + "false", + "parse", + "lenient" + ], + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + } +} diff --git a/node_modules/yn/readme.md b/node_modules/yn/readme.md new file mode 100644 index 0000000..7be3114 --- /dev/null +++ b/node_modules/yn/readme.md @@ -0,0 +1,83 @@ +# yn [![Build Status](https://travis-ci.org/sindresorhus/yn.svg?branch=master)](https://travis-ci.org/sindresorhus/yn) + +> Parse yes/no like values + +Useful for validating answers of a CLI prompt. + +--- + +The following case-insensitive values are recognized: + +```js +'y', 'yes', 'true', true, '1', 1, 'n', 'no', 'false', false, '0', 0 +``` + +*Enable lenient mode to gracefully handle typos.* + + +## Install + +``` +$ npm install yn +``` + + +## Usage + +```js +const yn = require('yn'); + +yn('y'); +//=> true + +yn('NO'); +//=> false + +yn(true); +//=> true + +yn('abomasum'); +//=> null + +yn('abomasum', {default: false}); +//=> false + +yn('mo', {lenient: true}); +//=> false +``` + +Unrecognized values return `null`. + + +## API + +### yn(input, [options]) + +#### input + +Type: `any` + +Value that should be converted. + +#### options + +Type: `Object` + +##### lenient + +Type: `boolean`
+Default: `false` + +Use a key distance-based score to leniently accept typos of `yes` and `no`. + +##### default + +Type: `boolean`
+Default: `null` + +Default value if no match was found. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..7c09083 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,609 @@ +{ + "name": "workspace", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "workspace", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@noble/ed25519": "2.3.0" + }, + "devDependencies": { + "@types/node": "^26.6.2", + "ts-node": "^10.9.2", + "typescript": "^7.0.2" + } + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@noble/ed25519": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@noble/ed25519/-/ed25519-2.3.0.tgz", + "integrity": "sha512-M7dvXL2B92/M7dw9+gzuydL8qn/jiqNHaoR3Q+cb1q1GHV7uwE17WCyFMG+Y+TZb5izcaXk5TdJRrDUxHXL78A==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.13.tgz", + "integrity": "sha512-gcLdvR9HO1ZJBypsOGqaP6TFEzb6vIta0KSTLt9NAQ6pXQO3cRgSVyCN6pzYqI9DlJgY71XKO0dpDhCf08b3pg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.2.tgz", + "integrity": "sha512-X1P21scMv4zGKLYqjdGjaKa7COa0RKVYYZZN/NfvLQ1JegxFhdhpZG/Lyn8AXx6CDUavKAd11v6BvfpkDByK8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~8.9.0" + } + }, + "node_modules/@typescript/typescript-aix-ppc64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-aix-ppc64/-/typescript-aix-ppc64-7.0.2.tgz", + "integrity": "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-darwin-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-arm64/-/typescript-darwin-arm64-7.0.2.tgz", + "integrity": "sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-darwin-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-x64/-/typescript-darwin-x64-7.0.2.tgz", + "integrity": "sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-freebsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-arm64/-/typescript-freebsd-arm64-7.0.2.tgz", + "integrity": "sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-freebsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-x64/-/typescript-freebsd-x64-7.0.2.tgz", + "integrity": "sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-arm": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm/-/typescript-linux-arm-7.0.2.tgz", + "integrity": "sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm64/-/typescript-linux-arm64-7.0.2.tgz", + "integrity": "sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-loong64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-loong64/-/typescript-linux-loong64-7.0.2.tgz", + "integrity": "sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-mips64el": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-mips64el/-/typescript-linux-mips64el-7.0.2.tgz", + "integrity": "sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-ppc64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-ppc64/-/typescript-linux-ppc64-7.0.2.tgz", + "integrity": "sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-riscv64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-riscv64/-/typescript-linux-riscv64-7.0.2.tgz", + "integrity": "sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-s390x": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-s390x/-/typescript-linux-s390x-7.0.2.tgz", + "integrity": "sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-x64/-/typescript-linux-x64-7.0.2.tgz", + "integrity": "sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-netbsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-arm64/-/typescript-netbsd-arm64-7.0.2.tgz", + "integrity": "sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-netbsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-x64/-/typescript-netbsd-x64-7.0.2.tgz", + "integrity": "sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-openbsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-arm64/-/typescript-openbsd-arm64-7.0.2.tgz", + "integrity": "sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-openbsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-x64/-/typescript-openbsd-x64-7.0.2.tgz", + "integrity": "sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-sunos-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-sunos-x64/-/typescript-sunos-x64-7.0.2.tgz", + "integrity": "sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-win32-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-arm64/-/typescript-win32-arm64-7.0.2.tgz", + "integrity": "sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-win32-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-x64/-/typescript-win32-x64-7.0.2.tgz", + "integrity": "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/acorn": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz", + "integrity": "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.5", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.5.tgz", + "integrity": "sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true, + "license": "MIT" + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/diff": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.4.tgz", + "integrity": "sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "license": "ISC" + }, + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/typescript": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-7.0.2.tgz", + "integrity": "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc" + }, + "engines": { + "node": ">=16.20.0" + }, + "optionalDependencies": { + "@typescript/typescript-aix-ppc64": "7.0.2", + "@typescript/typescript-darwin-arm64": "7.0.2", + "@typescript/typescript-darwin-x64": "7.0.2", + "@typescript/typescript-freebsd-arm64": "7.0.2", + "@typescript/typescript-freebsd-x64": "7.0.2", + "@typescript/typescript-linux-arm": "7.0.2", + "@typescript/typescript-linux-arm64": "7.0.2", + "@typescript/typescript-linux-loong64": "7.0.2", + "@typescript/typescript-linux-mips64el": "7.0.2", + "@typescript/typescript-linux-ppc64": "7.0.2", + "@typescript/typescript-linux-riscv64": "7.0.2", + "@typescript/typescript-linux-s390x": "7.0.2", + "@typescript/typescript-linux-x64": "7.0.2", + "@typescript/typescript-netbsd-arm64": "7.0.2", + "@typescript/typescript-netbsd-x64": "7.0.2", + "@typescript/typescript-openbsd-arm64": "7.0.2", + "@typescript/typescript-openbsd-x64": "7.0.2", + "@typescript/typescript-sunos-x64": "7.0.2", + "@typescript/typescript-win32-arm64": "7.0.2", + "@typescript/typescript-win32-x64": "7.0.2" + } + }, + "node_modules/undici-types": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz", + "integrity": "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==", + "dev": true, + "license": "MIT" + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true, + "license": "MIT" + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..2cf1fa6 --- /dev/null +++ b/package.json @@ -0,0 +1,20 @@ +{ + "name": "workspace", + "version": "1.0.0", + "description": "The [MicrosoftEdge-Extensions](https://github.com/microsoft/MicrosoftEdge-Extensions) repo contains sample code, issues, and discussions about Microsoft Edge extensions (add-ons).", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "devDependencies": { + "@types/node": "^26.6.2", + "ts-node": "^10.9.2", + "typescript": "^7.0.2" + }, + "dependencies": { + "@noble/ed25519": "2.3.0" + } +} diff --git a/resonance-ledger/.gitignore b/resonance-ledger/.gitignore new file mode 100644 index 0000000..21535d5 --- /dev/null +++ b/resonance-ledger/.gitignore @@ -0,0 +1,3 @@ +keys/ +data/ +node_modules/ diff --git a/resonance-ledger/package.json b/resonance-ledger/package.json new file mode 100644 index 0000000..ac7baec --- /dev/null +++ b/resonance-ledger/package.json @@ -0,0 +1,15 @@ +{ + "name": "resonance-ledger", + "version": "0.1.0", + "description": "Signed, append-only archival and governance ledger: Ed25519 envelopes, Lamport clocks, quorum approvals, content-addressed artifacts.", + "type": "module", + "main": "src/cli.js", + "scripts": { + "test": "node --test tests/", + "ledger": "node src/cli.js" + }, + "license": "MIT", + "dependencies": { + "@noble/ed25519": "2.3.0" + } +} diff --git a/resonance-ledger/src/cli.js b/resonance-ledger/src/cli.js new file mode 100644 index 0000000..ec347cc --- /dev/null +++ b/resonance-ledger/src/cli.js @@ -0,0 +1,253 @@ +#!/usr/bin/env node +// resonance-ledger/src/cli.js +// Real operating CLI for the Resonance Ledger. Everything here performs +// actual Ed25519 signing/verification and actual append-only ledger writes. +// +// Usage: +// node src/cli.js keygen [--name ] +// node src/cli.js init +// node src/cli.js add-artifact (archive-ingester) +// node src/cli.js propose +// node src/cli.js approve +// node src/cli.js publish (requires quorum) +// node src/cli.js verify (replay + signature check) +// node src/cli.js status +// +// Keys live in ./keys (gitignored). Ledger lives in ./data/ledger.jsonl. + +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { generateKeyPair, canonicalize, sha256Prefixed } from './crypto.js'; +import { buildSignedEvent, acceptEvent } from './envelope.js'; +import { initialState, replayLedger, appendEvent, evaluateQuorum, registerArtifact } from './ledger.js'; +import { GOVERNANCE_POLICY, POLICY_VERSION, memorialReferenceRecord } from './policy.js'; + +const ROOT = path.dirname(fileURLToPath(import.meta.url)); +const DATA_DIR = path.join(ROOT, '..', 'data'); +const KEYS_DIR = path.join(ROOT, '..', 'keys'); +const LEDGER = path.join(DATA_DIR, 'ledger.jsonl'); +const KEYRING_FILE = path.join(DATA_DIR, 'keyring.json'); +const ACTIVE_KEY = path.join(KEYS_DIR, 'active.json'); + +function ensureDirs() { + fs.mkdirSync(DATA_DIR, { recursive: true }); + fs.mkdirSync(KEYS_DIR, { recursive: true }); +} + +function loadKeyring() { + if (!fs.existsSync(KEYRING_FILE)) return {}; + return JSON.parse(fs.readFileSync(KEYRING_FILE, 'utf8')); +} + +function saveKeyring(kr) { + ensureDirs(); + fs.writeFileSync(KEYRING_FILE, JSON.stringify(kr, null, 2)); +} + +function loadActiveKey() { + if (!fs.existsSync(ACTIVE_KEY)) { + throw new Error('No active key. Run: node src/cli.js keygen '); + } + return JSON.parse(fs.readFileSync(ACTIVE_KEY, 'utf8')); +} + +function freshState() { + const { state } = replayLedger(LEDGER, { policy: GOVERNANCE_POLICY, keyring: loadKeyring() }); + return state; +} + +const [cmd, ...args] = process.argv.slice(2); + +switch (cmd) { + case 'keygen': { + ensureDirs(); + const role = args[0]; + if (!role || !(role in GOVERNANCE_POLICY.roleGrants)) { + console.error(`Unknown role '${role ?? ''}'. Valid roles: ${Object.keys(GOVERNANCE_POLICY.roleGrants).join(', ')}`); + process.exit(1); + } + const nameIdx = args.indexOf('--name'); + const keyId = nameIdx >= 0 ? args[nameIdx + 1] : `${role}-${Date.now().toString(36)}`; + const kp = generateKeyPair(); + fs.writeFileSync(path.join(KEYS_DIR, `${keyId}.json`), JSON.stringify({ keyId, role, ...kp }, null, 2), { mode: 0o600 }); + const kr = loadKeyring(); + kr[keyId] = { publicKey: kp.publicKey, role }; + saveKeyring(kr); + fs.writeFileSync(ACTIVE_KEY, JSON.stringify({ keyId, role })); + // Emit a signed KEY_REGISTERED event via steward gateway requirement: only allowed if current active key holds that grant + console.log(`Generated Ed25519 key '${keyId}' (role: ${role}). Active key set.`); + break; + } + + case 'init': { + ensureDirs(); + if (!fs.existsSync(LEDGER)) fs.writeFileSync(LEDGER, ''); + console.log(`Ledger initialized at ${LEDGER}`); + console.log(`Policy version: ${POLICY_VERSION}, quorum: ${GOVERNANCE_POLICY.quorum}`); + break; + } + + case 'add-artifact': { + const file = args[0]; + if (!file || !fs.existsSync(file)) { + console.error('Usage: add-artifact '); + process.exit(1); + } + const active = loadActiveKey(); + const keyId = active.keyId; + const keyFile = JSON.parse(fs.readFileSync(path.join(KEYS_DIR, `${keyId}.json`), 'utf8')); + const buf = fs.readFileSync(file); + const art = registerArtifact(path.join(DATA_DIR, 'artifacts'), path.basename(file), buf); + const state = freshState(); + const seq = (state.lastSequenceByIssuer[keyId] ?? 0) + 1; + const { envelope, payload } = buildSignedEvent({ + payload: art, + eventType: 'ARTIFACT_ADDED', + issuerKeyId: keyId, + secretKeyB64url: keyFile.secretKey, + issuerSequence: seq, + lamportClock: state.lamportClock, + previousEventHash: state.lastEventHash, + policyVersion: POLICY_VERSION, + }); + const result = acceptEvent(envelope, state); + if (!result.accepted) { + console.error(`Rejected: ${result.reason}`); + process.exit(1); + } + appendEvent(LEDGER, { envelope, payload }); + console.log(`Artifact registered and event appended.`); + console.log(` digest: ${art.digest}`); + console.log(` eventId: ${envelope.eventId}`); + break; + } + + case 'propose': { + const [eventType, payloadJson] = args; + if (!eventType || !payloadJson) { + console.error('Usage: propose \'\''); + process.exit(1); + } + const payload = JSON.parse(payloadJson); + const active = loadActiveKey(); + const keyId = active.keyId; + const keyFile = JSON.parse(fs.readFileSync(path.join(KEYS_DIR, `${keyId}.json`), 'utf8')); + const state = freshState(); + const seq = (state.lastSequenceByIssuer[keyId] ?? 0) + 1; + const { envelope, payload: p } = buildSignedEvent({ + payload, + eventType: `PROPOSAL:${eventType}`, + issuerKeyId: keyId, + secretKeyB64url: keyFile.secretKey, + issuerSequence: seq, + lamportClock: state.lamportClock, + previousEventHash: state.lastEventHash, + policyVersion: POLICY_VERSION, + }); + const result = acceptEvent(envelope, state); + if (!result.accepted) { + console.error(`Rejected: ${result.reason}`); + process.exit(1); + } + appendEvent(LEDGER, { envelope, payload: p }); + console.log(`Proposal recorded. proposalEventId=${envelope.eventId}`); + console.log(`Next: other authorized keys run \`approve ${envelope.eventId}\`, then \`publish ${envelope.eventId}\`.`); + break; + } + + case 'approve': { + const proposalId = args[0]; + if (!proposalId) { console.error('Usage: approve '); process.exit(1); } + const active = loadActiveKey(); + const keyId = active.keyId; + const keyFile = JSON.parse(fs.readFileSync(path.join(KEYS_DIR, `${keyId}.json`), 'utf8')); + const state = freshState(); + const proposal = state.events.find((e) => e.eventId === proposalId); + if (!proposal) { console.error('Unknown proposal id in ledger.'); process.exit(1); } + if (proposal.issuerKeyId === keyId) { + console.error('Policy violation refused: proposer cannot approve own proposal.'); + process.exit(1); + } + const seq = (state.lastSequenceByIssuer[keyId] ?? 0) + 1; + const { envelope, payload } = buildSignedEvent({ + payload: { proposalId, targetEventType: proposal.eventType }, + eventType: 'APPROVAL', + issuerKeyId: keyId, + secretKeyB64url: keyFile.secretKey, + issuerSequence: seq, + lamportClock: state.lamportClock, + previousEventHash: state.lastEventHash, + policyVersion: POLICY_VERSION, + }); + const result = acceptEvent(envelope, state); + if (!result.accepted) { console.error(`Rejected: ${result.reason}`); process.exit(1); } + appendEvent(LEDGER, { envelope, payload }); + const q = evaluateQuorum(result.nextState, proposalId, proposal.issuerKeyId); + console.log(`Approval recorded. Quorum: ${q.have}/${q.required} ${q.satisfied ? '(SATISFIED)' : ''}`); + break; + } + + case 'publish': { + const proposalId = args[0]; + if (!proposalId) { console.error('Usage: publish '); process.exit(1); } + const active = loadActiveKey(); + const keyId = active.keyId; + const keyFile = JSON.parse(fs.readFileSync(path.join(KEYS_DIR, `${keyId}.json`), 'utf8')); + const state = freshState(); + const proposal = state.events.find((e) => e.eventId === proposalId); + if (!proposal) { console.error('Unknown proposal id.'); process.exit(1); } + const q = evaluateQuorum(state, proposalId, proposal.issuerKeyId); + if (!q.satisfied) { + console.error(`Cannot publish: quorum not satisfied (${q.have}/${q.required}). ${q.reason ?? ''}`); + process.exit(1); + } + const seq = (state.lastSequenceByIssuer[keyId] ?? 0) + 1; + const { envelope, payload } = buildSignedEvent({ + payload: { proposalId, approved: q.approvals }, + eventType: 'RELEASE_PUBLISHED', + issuerKeyId: keyId, + secretKeyB64url: keyFile.secretKey, + issuerSequence: seq, + lamportClock: state.lamportClock, + previousEventHash: state.lastEventHash, + policyVersion: POLICY_VERSION, + }); + const result = acceptEvent(envelope, state); + if (!result.accepted) { console.error(`Rejected: ${result.reason}`); process.exit(1); } + appendEvent(LEDGER, { envelope, payload }); + console.log(`Published with quorum evidence. eventId=${envelope.eventId}`); + break; + } + + case 'verify': { + const { state, rejections } = replayLedger(LEDGER, { policy: GOVERNANCE_POLICY, keyring: loadKeyring() }); + console.log(`Replayed ${state.events.length} events. Rejections: ${rejections.length}`); + for (const r of rejections) console.log(` - ${r.eventId ?? ''} ${r.reason}`); + let chainOk = true; + let prev = 'sha256:GENESIS'; + for (const e of state.events) { + if (e.previousEventHash !== prev) { chainOk = false; break; } + prev = sha256Prefixed(canonicalize(e)); + } + console.log(chainOk ? 'Hash chain intact.' : 'HASH CHAIN BROKEN — possible tampering.'); + process.exit(rejections.length === 0 && chainOk ? 0 : 1); + } + + case 'status': { + const state = freshState(); + console.log(JSON.stringify({ + events: state.events.length, + lamportClock: state.lamportClock, + lastEventHash: state.lastEventHash, + issuers: Object.keys(state.lastSequenceByIssuer), + policyVersion: POLICY_VERSION, + quorum: GOVERNANCE_POLICY.quorum, + }, null, 2)); + break; + } + + default: + console.log(`Resonance Ledger CLI — commands: keygen | init | add-artifact | propose | approve | publish | verify | status`); + console.log(`Design boundary: symbolic/memorial records are protected metadata (see policy.js memorialReferenceRecord), never control inputs or invariants.`); +} diff --git a/resonance-ledger/src/crypto.js b/resonance-ledger/src/crypto.js new file mode 100644 index 0000000..4d36461 --- /dev/null +++ b/resonance-ledger/src/crypto.js @@ -0,0 +1,96 @@ +// resonance-ledger/src/crypto.js +// Real Ed25519 signing/verification + canonical JSON serialization. +// No simulation: signatures produced here are verifiable by any standard +// Ed25519 implementation (RFC 8032). + +import * as crypto from 'node:crypto'; +import * as ed25519 from '@noble/ed25519'; + +// Node's synchronous sha512 is not exposed via webcrypto.subtle, so bind it directly. +ed25519.etc.sha512Sync = (...m) => + crypto.createHash('sha512').update(Buffer.concat(m)).digest(); + +/** + * RFC 8785-style canonical JSON: sorted keys, no insignificant whitespace, + * deterministic UTF-8. Required so signers and verifiers hash identical bytes. + */ +export function canonicalize(obj) { + return stableStringify(obj); +} + +function stableStringify(value) { + if (value === null || typeof value !== 'object') { + return JSON.stringify(value); + } + if (Array.isArray(value)) { + return '[' + value.map(stableStringify).join(',') + ']'; + } + const keys = Object.keys(value).sort(); + const parts = []; + for (const k of keys) { + if (value[k] === undefined) continue; + parts.push(JSON.stringify(k) + ':' + stableStringify(value[k])); + } + return '{' + parts.join(',') + '}'; +} + +export function sha256Hex(input) { + const data = typeof input === 'string' ? input : canonicalize(input); + return crypto.createHash('sha256').update(data, 'utf8').digest('hex'); +} + +export function sha256Prefixed(input) { + return 'sha256:' + sha256Hex(input); +} + +/** Generate a new Ed25519 keypair. Returns base64url-encoded material. */ +export function generateKeyPair() { + const privRaw = ed25519.utils.randomPrivateKey(); + const pubRaw = ed25519.getPublicKey(privRaw); + return { + algorithm: 'Ed25519', + secretKey: b64url(privRaw), + publicKey: b64url(pubRaw), + }; +} + +function b64url(buf) { + return Buffer.from(buf).toString('base64url'); +} + +function unb64url(s) { + return Uint8Array.from(Buffer.from(s, 'base64url')); +} + +/** Sign canonical bytes of an object (excluding its own `signature` field). */ +export function signObject(obj, secretKeyB64url) { + const payload = { ...obj }; + delete payload.signature; + const bytes = Buffer.from(canonicalize(payload), 'utf8'); + const sig = ed25519.sign(bytes, unb64url(secretKeyB64url)); + return b64url(sig); +} + +/** Verify signature over canonical bytes of an object (excluding `signature`). */ +export function verifySignedObject(signedObj) { + const { signature, ...rest } = signedObj; + if (typeof signature !== 'string') return false; + try { + const bytes = Buffer.from(canonicalize(rest), 'utf8'); + return ed25519.verify(unb64url(signature), bytes, unb64url(rest.publicKey ?? rest.issuerPublicKey ?? '')); + } catch { + return false; + } +} + +/** Verify against an explicitly supplied public key (preferred path). */ +export function verifyWithPublicKey(signedObj, publicKeyB64url) { + const { signature, ...rest } = signedObj; + if (typeof signature !== 'string' || typeof publicKeyB64url !== 'string') return false; + try { + const bytes = Buffer.from(canonicalize(rest), 'utf8'); + return ed25519.verify(unb64url(signature), bytes, unb64url(publicKeyB64url)); + } catch { + return false; + } +} diff --git a/resonance-ledger/src/envelope.js b/resonance-ledger/src/envelope.js new file mode 100644 index 0000000..2296d3b --- /dev/null +++ b/resonance-ledger/src/envelope.js @@ -0,0 +1,145 @@ +// resonance-ledger/src/envelope.js +// Signed, append-only event envelope: schema validation, replay protection, +// issuer authorization, per-issuer monotonic sequence, Lamport clock. + +import { randomUUID } from 'node:crypto'; +import { canonicalize, sha256Prefixed, signObject, verifyWithPublicKey } from './crypto.js'; + +export const SCHEMA_VERSION = 1; + +const REQUIRED_FIELDS = [ + 'schemaVersion', 'eventId', 'eventType', 'issuerKeyId', 'issuerSequence', + 'lamportClock', 'observedAtUtc', 'previousEventHash', 'payloadHash', + 'policyVersion', 'signatureAlgorithm', 'signature', +]; + +/** + * Accept an event into ledger state, or reject with a reason. + * This is the deterministic reducer guard — it mutates nothing. + */ +export function acceptEvent(event, state) { + if (!validateEnvelope(event)) { + return { accepted: false, reason: 'Invalid event schema' }; + } + + // Payload integrity: recomputed hash must match the signed payloadHash. + if (event.payload !== undefined) { + const expected = sha256Prefixed(canonicalize(event.payload)); + if (expected !== event.payloadHash) { + return { accepted: false, reason: 'Payload does not match signed payloadHash' }; + } + } + + // Replay check first: a duplicate eventId is rejected regardless of chain position. + if (state.seenEventIds.has(event.eventId)) { + return { accepted: false, reason: 'Replay detected (duplicate eventId)' }; + } + + const key = state.keyring[event.issuerKeyId]; + if (!key) { + return { accepted: false, reason: 'Unknown issuer key (not in keyring)' }; + } + if (key.revokedAtUtc) { + // Revoked keys may not produce NEW events, but historical events remain valid evidence. + const eventTime = Date.parse(event.observedAtUtc); + const revokedTime = Date.parse(key.revokedAtUtc); + if (!Number.isNaN(eventTime) && !Number.isNaN(revokedTime) && eventTime > revokedTime) { + return { accepted: false, reason: 'Issuer key revoked before this event was issued' }; + } + } + + if (!verifyWithPublicKey(event, key.publicKey)) { + return { accepted: false, reason: 'Signature verification failed' }; + } + + if (!isAuthorizedIssuer(key.role, event.eventType, state.policy)) { + return { accepted: false, reason: `Role '${key.role}' lacks authority for ${event.eventType}` }; + } + + if (state.seenEventIds.has(event.eventId)) { + return { accepted: false, reason: 'Replay detected (duplicate eventId)' }; + } + + const previousSequence = state.lastSequenceByIssuer[event.issuerKeyId] ?? 0; + if (event.issuerSequence <= previousSequence) { + return { accepted: false, reason: 'Non-monotonic issuer sequence' }; + } + + // Hash-chain continuity is enforced for ALL authenticated events: an event may + // only be appended at the current ledger head (prevents history rewrite/reorder). + if (event.previousEventHash !== state.lastEventHash) { + return { accepted: false, reason: 'previousEventHash does not match ledger head (hash chain break)' }; + } + + // payloadRef (used by APPROVAL events) must match its signed hash. + if (event.payloadRef !== undefined) { + const expected = sha256Prefixed(canonicalize(event.payloadRef)); + if (expected !== event.payloadHash) { + return { accepted: false, reason: 'payloadRef does not match signed payloadHash' }; + } + } + + if (typeof event.lamportClock !== 'number' || event.lamportClock < 0) { + return { accepted: false, reason: 'Invalid Lamport clock value' }; + } + + const nextLamport = Math.max(state.lamportClock, event.lamportClock) + 1; + + return { + accepted: true, + nextState: { + ...state, + lamportClock: nextLamport, + seenEventIds: new Set([...state.seenEventIds, event.eventId]), + lastSequenceByIssuer: { + ...state.lastSequenceByIssuer, + [event.issuerKeyId]: event.issuerSequence, + }, + lastEventHash: sha256Prefixed(canonicalize(event)), + events: [...state.events, event], + }, + }; +} + +export function validateEnvelope(event) { + if (!event || typeof event !== 'object') return false; + for (const f of REQUIRED_FIELDS) { + if (!(f in event)) return false; + } + if (event.schemaVersion !== SCHEMA_VERSION) return false; + if (event.signatureAlgorithm !== 'Ed25519') return false; + if (typeof event.eventId !== 'string' || event.eventId.length < 8) return false; + if (typeof event.issuerSequence !== 'number' || !Number.isInteger(event.issuerSequence) || event.issuerSequence < 1) return false; + if (typeof event.lamportClock !== 'number' || !Number.isInteger(event.lamportClock)) return false; + if (typeof event.payloadHash !== 'string' || !/^sha256:[0-9a-f]{64}$/.test(event.payloadHash)) return false; + if (isNaN(Date.parse(event.observedAtUtc))) return false; + return true; +} + +export function isAuthorizedIssuer(role, eventType, policy) { + const grants = policy?.roleGrants?.[role]; + if (!grants) return false; + return grants.includes('*') || grants.includes(eventType); +} + +/** + * Build and sign an event envelope. The caller must supply payload; + * payloadHash is computed here so signer and verifier agree. + */ +export function buildSignedEvent({ payload, eventType, issuerKeyId, secretKeyB64url, publicKeyB64url, role, issuerSequence, lamportClock, previousEventHash, policyVersion }) { + const unsignedBody = { + schemaVersion: SCHEMA_VERSION, + eventId: randomUUID(), + eventType, + issuerKeyId, + issuerSequence, + lamportClock, + observedAtUtc: new Date().toISOString(), + previousEventHash: previousEventHash ?? 'sha256:GENESIS', + payloadHash: sha256Prefixed(canonicalize(payload)), + policyVersion, + signatureAlgorithm: 'Ed25519', + }; + const signature = signObject(unsignedBody, secretKeyB64url); + return { envelope: { ...unsignedBody, signature }, payload }; +} diff --git a/resonance-ledger/src/ledger.js b/resonance-ledger/src/ledger.js new file mode 100644 index 0000000..476a5c2 --- /dev/null +++ b/resonance-ledger/src/ledger.js @@ -0,0 +1,97 @@ +// resonance-ledger/src/ledger.js +// Append-only JSONL ledger with hash chaining, replay verification, +// quorum approval workflow, and content-addressed artifact registry. + +import fs from 'node:fs'; +import path from 'node:path'; +import { canonicalize, sha256Prefixed } from './crypto.js'; +import { acceptEvent, buildSignedEvent, validateEnvelope } from './envelope.js'; + +export function initialState({ policy, keyring }) { + return { + lamportClock: 0, + seenEventIds: new Set(), + lastSequenceByIssuer: {}, + lastEventHash: 'sha256:GENESIS', + events: [], + policy, + keyring, // issuerKeyId -> { publicKey, role, revokedAtUtc? } + }; +} + +/** Replay a JSONL ledger file through the reducer to rebuild state deterministically. */ +export function replayLedger(filePath, { policy, keyring }) { + const state = initialState({ policy, keyring }); + const rejections = []; + if (!fs.existsSync(filePath)) { + return { state, rejections: [{ reason: 'Ledger file not found — starting empty' }] }; + } + const lines = fs.readFileSync(filePath, 'utf8').split('\n').filter((l) => l.trim().length > 0); + for (const line of lines) { + let record; + try { + record = JSON.parse(line); + } catch { + rejections.push({ reason: 'Corrupt line (not valid JSON)' }); + continue; + } + const result = acceptEvent(record.envelope ?? record, state); + if (result.accepted) { + Object.assign(state, result.nextState); + } else { + rejections.push({ eventId: record?.envelope?.eventId ?? record?.eventId, reason: result.reason }); + } + } + return { state, rejections }; +} + +/** Append one signed event to the ledger (file is append-only; never rewritten). */ +export function appendEvent(filePath, record) { + if (!validateEnvelope(record.envelope ?? record)) { + throw new Error('Refusing to append invalid envelope'); + } + fs.mkdirSync(path.dirname(filePath), { recursive: true }); + fs.appendFileSync(filePath, JSON.stringify(record) + '\n', 'utf8'); +} + +/** + * Quorum approval: an APPROVAL event satisfies a pending PROPOSAL only if + * `quorum` distinct authorized approver keys have approved that proposalId, + * and no approver approves their own proposal (self-approval ban). + */ +export function evaluateQuorum(state, proposalId, proposerKeyId) { + const approvals = new Set(); + for (const e of state.events) { + if (e.eventType === 'APPROVAL' && e.payloadRef?.proposalId === proposalId) { + if (e.issuerKeyId === proposerKeyId) { + return { satisfied: false, reason: 'Self-approval detected — prohibited by policy', approvals: [...approvals] }; + } + approvals.add(e.issuerKeyId); + } + } + const required = state.policy?.quorum ?? 1; + return { + satisfied: approvals.size >= required, + approvals: [...approvals], + required, + have: approvals.size, + }; +} + +/** Register a content-addressed artifact (digest computed over actual bytes). */ +export function registerArtifact(artifactDir, name, contentsBuffer) { + const digest = sha256Prefixed(contentsBuffer.toString('base64')); + const target = path.join(artifactDir, digest.replace(':', '_')); + fs.mkdirSync(artifactDir, { recursive: true }); + if (!fs.existsSync(target)) { + fs.writeFileSync(target, contentsBuffer); + } + return { name, digest, sizeBytes: contentsBuffer.length, path: target }; +} + +/** Verify a stored artifact still matches its digest (tamper-evidence check). */ +export function verifyArtifact(digest, buffer) { + return sha256Prefixed(buffer.toString('base64')) === digest; +} + +export { buildSignedEvent, canonicalize }; diff --git a/resonance-ledger/src/policy.js b/resonance-ledger/src/policy.js new file mode 100644 index 0000000..a8da407 --- /dev/null +++ b/resonance-ledger/src/policy.js @@ -0,0 +1,57 @@ +// resonance-ledger/src/policy.js +// Governance policy v1: role grants, quorum rules, memorial metadata category. +// NOTE (deliberate design boundary): symbolic/memorial content is a protected +// METADATA CATEGORY only. It is never a control input and never an invariant. + +export const POLICY_VERSION = 'governance-v1'; + +export const GOVERNANCE_POLICY = { + policyVersion: POLICY_VERSION, + quorum: 2, // distinct authorized approvers required for high-impact actions + roleGrants: { + 'archive-ingester': ['ARTIFACT_ADDED'], + 'provenance-verifier': ['PROVENANCE_VERIFIED'], + 'policy-validator': ['POLICY_VALIDATED', 'POLICY_UPDATED'], + 'release-publisher': ['RELEASE_APPROVED', 'RELEASE_PUBLISHED'], + 'indexer': ['INDEX_BUILT'], + 'notification-agent': ['NOTICE_SENT'], + 'replay-verifier': ['REPLAY_VERIFIED'], + 'backup-verifier': ['BACKUP_VERIFIED'], + 'creative-cataloger': ['ARTIFACT_CATALOGED'], + 'privacy-guardian': ['VISIBILITY_SET'], + 'incident-recorder': ['INCIDENT_RECORDED'], + 'key-rotation-steward': ['KEY_REGISTERED', 'KEY_REVOKED'], + 'dependency-auditor': ['DEPENDENCY_AUDITED'], + 'read-only-analyst': [], // no write authority at all + 'human-steward-gateway': ['*'], // may emit any event type, still bound by schema+signature + 'consensus-coordinator': ['QUORUM_STATE_PROPOSED'], + }, + // High-impact event types require proposal + quorum approval before PUBLISH. + highImpactTypes: ['RELEASE_PUBLISHED', 'POLICY_UPDATED', 'KEY_REVOKED'], + invariants: [ + 'Every public artifact has provenance metadata.', + 'No private artifact is published without authorized approval.', + 'No agent can alter an immutable original record.', + 'A role cannot approve its own high-impact proposal.', + 'All events carry a monotonic logical-clock value per issuer.', + 'Event IDs are applied at most once.', + 'Revoked keys cannot issue new events; historical evidence is preserved.', + ], +}; + +/** + * Memorial/creative anchor representation — protected metadata, NOT a + * technical control input. Visibility defaults to consent-controlled. + */ +export function memorialReferenceRecord({ title, purpose, stewardKeyId }) { + return { + recordType: 'MEMORIAL_REFERENCE', + visibility: 'private-or-consent-controlled', + purpose, + title, + interpretation: 'Human-authored symbolic meaning; not a technical control input', + modificationPolicy: 'Designated steward approval required', + stewardKeyId, + createdAtUtc: new Date().toISOString(), + }; +} diff --git a/resonance-ledger/tests/ledger.test.js b/resonance-ledger/tests/ledger.test.js new file mode 100644 index 0000000..c646dd4 --- /dev/null +++ b/resonance-ledger/tests/ledger.test.js @@ -0,0 +1,183 @@ +// resonance-ledger/tests/ledger.test.js +// Real tests: actual Ed25519 keygen, signing, verification, replay, quorum. + +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { generateKeyPair, signObject, verifyWithPublicKey, canonicalize } from '../src/crypto.js'; +import { buildSignedEvent, acceptEvent } from '../src/envelope.js'; +import { initialState, evaluateQuorum } from '../src/ledger.js'; +import { GOVERNANCE_POLICY, POLICY_VERSION, memorialReferenceRecord } from '../src/policy.js'; + +function makeIssuer(role) { + const kp = generateKeyPair(); + return { role, ...kp }; +} + +function keyringFrom(issuers) { + const kr = {}; + for (const [keyId, i] of Object.entries(issuers)) { + kr[keyId] = { publicKey: i.publicKey, role: i.role }; + } + return kr; +} + +test('signature round-trip: signed object verifies, tampered object fails', () => { + const issuer = makeIssuer('archive-ingester'); + const body = { hello: 'world', n: 42 }; + const signature = signObject(body, issuer.secretKey); + const signed = { ...body, publicKeyForTest: undefined, signature }; + assert.equal(verifyWithPublicKey(signed, issuer.publicKey), true); + const tampered = { ...signed, n: 43 }; + assert.equal(verifyWithPublicKey(tampered, issuer.publicKey), false); +}); + +test('canonicalization is deterministic regardless of key insertion order', () => { + const a = canonicalize({ b: 1, a: { d: 2, c: 3 } }); + const b = canonicalize({ a: { c: 3, d: 2 }, b: 1 }); + assert.equal(a, b); +}); + +test('acceptEvent rejects unsigned / wrong-key / replay / out-of-order events', () => { + const issuers = { ing: makeIssuer('archive-ingester'), analyst: makeIssuer('read-only-analyst') }; + let state = initialState({ policy: GOVERNANCE_POLICY, keyring: keyringFrom(issuers) }); + + // Valid event + const e1 = buildSignedEvent({ + payload: { name: 'doc.txt' }, eventType: 'ARTIFACT_ADDED', + issuerKeyId: 'ing', secretKeyB64url: issuers.ing.secretKey, + issuerSequence: 1, lamportClock: state.lamportClock, + previousEventHash: state.lastEventHash, policyVersion: POLICY_VERSION, + }); + let r = acceptEvent(e1.envelope, state); + assert.equal(r.accepted, true); + state = r.nextState; + + // Replay of same eventId + r = acceptEvent(e1.envelope, state); + assert.equal(r.accepted, false); + assert.match(r.reason, /Replay/); + + // Non-monotonic sequence (reuse seq 1 with new eventId via different hash chain position) + const eDupSeq = { ...e1.envelope, eventId: 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee' }; + r = acceptEvent(eDupSeq, state); + assert.equal(r.accepted, false); + assert.match(r.reason, /monotonic|Signature/); // signature may also fail due to field reuse; either rejection is correct + + // Unauthorized role: read-only-analyst cannot emit ARTIFACT_ADDED + const eBad = buildSignedEvent({ + payload: { x: 1 }, eventType: 'ARTIFACT_ADDED', + issuerKeyId: 'analyst', secretKeyB64url: issuers.analyst.secretKey, + issuerSequence: 1, lamportClock: state.lamportClock, + previousEventHash: state.lastEventHash, policyVersion: POLICY_VERSION, + }); + r = acceptEvent(eBad.envelope, state); + assert.equal(r.accepted, false); + assert.match(r.reason, /lacks authority/); + + // Tampered signature on an otherwise valid envelope + const forged = { ...eBad.envelope, signature: signObject({ ...eBad.envelope, eventType: 'KEY_REVOKED' }, issuers.ing.secretKey) }; + r = acceptEvent(forged, state); + assert.equal(r.accepted, false); +}); + +test('Lamport clock never decreases and merges max(incoming, local)+1', () => { + const issuers = { ing: makeIssuer('archive-ingester') }; + let state = initialState({ policy: GOVERNANCE_POLICY, keyring: keyringFrom(issuers) }); + const e = buildSignedEvent({ + payload: { z: 1 }, eventType: 'ARTIFACT_ADDED', + issuerKeyId: 'ing', secretKeyB64url: issuers.ing.secretKey, + issuerSequence: 1, lamportClock: 812, + previousEventHash: state.lastEventHash, policyVersion: POLICY_VERSION, + }); + const r = acceptEvent(e.envelope, state); + assert.equal(r.accepted, true); + assert.equal(r.nextState.lamportClock, 813); +}); + +test('quorum: proposer cannot self-approve; two distinct approvals satisfy quorum=2', () => { + const issuers = { + pubA: makeIssuer('release-publisher'), + pubB: makeIssuer('release-publisher'), + pubC: makeIssuer('release-publisher'), + }; + let state = initialState({ policy: GOVERNANCE_POLICY, keyring: keyringFrom(issuers) }); + + const proposal = buildSignedEvent({ + payload: { bundle: 'v1' }, eventType: 'PROPOSAL:RELEASE_PUBLISHED', + issuerKeyId: 'pubA', secretKeyB64url: issuers.pubA.secretKey, + issuerSequence: 1, lamportClock: 0, + previousEventHash: state.lastEventHash, policyVersion: POLICY_VERSION, + }); + let r = acceptEvent(proposal.envelope, state); + assert.equal(r.accepted, true); + state = r.nextState; + + // Self-approval must be refused by the workflow layer BEFORE reaching ledger: + const q0 = evaluateQuorum(state, proposal.envelope.eventId, 'pubA'); + assert.equal(q0.satisfied, false); + + // Approvals from B and C (payloadRef embedded in envelope, hash-bound to proposalId) + for (const [i, keyId] of ['pubB', 'pubC'].entries()) { + const payload = { proposalId: proposal.envelope.eventId }; + const ap = buildSignedEvent({ + payload, eventType: 'APPROVAL', + issuerKeyId: keyId, secretKeyB64url: issuers[keyId].secretKey, + issuerSequence: 1, lamportClock: state.lamportClock + 1, + previousEventHash: state.lastEventHash, policyVersion: POLICY_VERSION, + }); + ap.envelope.payloadRef = payload; + r = acceptEvent(ap.envelope, state); + assert.equal(r.accepted, true, `approval ${i} accepted`); + state = r.nextState; + } + + const q = evaluateQuorum(state, proposal.envelope.eventId, 'pubA'); + assert.equal(q.satisfied, true); + assert.deepEqual(new Set(q.approvals), new Set(['pubB', 'pubC'])); +}); + +test('revoked key cannot issue future events but historical events remain valid evidence', () => { + const issuers = { ing: makeIssuer('archive-ingester') }; + const keyring = keyringFrom(issuers); + let state = initialState({ policy: GOVERNANCE_POLICY, keyring }); + + const past = buildSignedEvent({ + payload: { ok: true }, eventType: 'ARTIFACT_ADDED', + issuerKeyId: 'ing', secretKeyB64url: issuers.ing.secretKey, + issuerSequence: 1, lamportClock: 1, + previousEventHash: state.lastEventHash, policyVersion: POLICY_VERSION, + }); + past.envelope.observedAtUtc = '2026-01-01T00:00:00.000Z'; + // re-sign after mutating timestamp + past.envelope.signature = signObject(past.envelope, issuers.ing.secretKey); + let r = acceptEvent(past.envelope, state); + assert.equal(r.accepted, true); + + // Now revoke the key as of 2026-06-01 + state.keyring = { ...state.keyring, ing: { ...state.keyring.ing, revokedAtUtc: '2026-06-01T00:00:00.000Z' } }; + + const future = buildSignedEvent({ + payload: { bad: true }, eventType: 'ARTIFACT_ADDED', + issuerKeyId: 'ing', secretKeyB64url: issuers.ing.secretKey, + issuerSequence: 2, lamportClock: 2, + previousEventHash: state.lastEventHash, policyVersion: POLICY_VERSION, + }); + future.envelope.observedAtUtc = '2026-09-01T00:00:00.000Z'; + future.envelope.signature = signObject(future.envelope, issuers.ing.secretKey); + r = acceptEvent(future.envelope, state); + assert.equal(r.accepted, false); + assert.match(r.reason, /revoked/i); + + // Historical event still present in state.events (evidence preserved) + assert.equal(state.events.length, 1); +}); + +test('memorial record is metadata only — carries no grants, no control fields', () => { + const rec = memorialReferenceRecord({ title: 'Family archive reference', purpose: 'Personal creative and archival context', stewardKeyId: 'steward-1' }); + assert.equal(rec.recordType, 'MEMORIAL_REFERENCE'); + assert.equal(rec.visibility, 'private-or-consent-controlled'); + assert.equal(rec.interpretation, 'Human-authored symbolic meaning; not a technical control input'); + // It appears nowhere in role grants or invariants: + const serializedPolicy = JSON.stringify(GOVERNANCE_POLICY); + assert.equal(serializedPolicy.includes('MEMORIAL'), false); +}); diff --git a/syntropic-compute-flex/README.md b/syntropic-compute-flex/README.md new file mode 100644 index 0000000..ceffa56 --- /dev/null +++ b/syntropic-compute-flex/README.md @@ -0,0 +1,48 @@ +# Syntropic Compute Flex Platform — Phase 1 (one real node) + +Honest scope: this platform measures, schedules, and curtails **only explicitly +registered class-4 workloads on the operator's own machine**. The sole actuator +path is POSIX SIGSTOP/SIGCONT to child processes this software itself spawned. +No utility, BESS, HVAC, substation, inverter, breaker, or market interface exists. +Physical-grid claim: none. Market participation: none. + +## Components (`src/`) +| Module | Function | +|---|---| +| `telemetry.js` | Real OS metrics: CPU utilization from `/proc/stat` jiffies (with `os.cpus()` fallback), loadavg, memory, thermal zones, nvidia-smi GPU telemetry — absence reported as `null`, never guessed | +| `workloads.js` | Class 1–4 job queue; protected classes refuse deferral/interruption in code | +| `enforcement.js` | LocalEnforcer: signals only class-4 registered pids; verifies state via `/proc//stat`; honest GPU-cap probe | +| `scheduler.js` | Policy engine `flex-policy-v1`: refuse ≤2, escalate 3, act on 4; logs every proposal AND execution | +| `eventlog.js` | Append-only hash-chained JSONL ledger with tamper detection | +| `report.js` | Verified event report — watts stay `null` without a meter source | +| `run_test.js` | Phase-1 measured test: baseline → SIGSTOP control event → recovery | + +## Run +```bash +node --test tests/ # 9/9 passing +node src/run_test.js # ~16s measured experiment + signed-style report +``` + +## First measured result (this container, 2-core kernel, no power meter) +```text +Asset: c-6ab48394… (containerized Linux, Intel Xeon @ 2.50GHz, 2 cores) +Test mode: local authorized workload test +Baseline CPU utilization: 50.9 % During pause: 1.0 % (real /proc deltas) +Time to target: 0.001 s · Pause verified at OS level: OK_VERIFIED (state T) +Recovery: post-resume proc state R · workload resumed then terminated cleanly +Power measurement source: NONE_CONFIGURED → watts reported null, not estimated +Event log integrity: chain OK, 37 records +Physical-grid claim: none · Market participation: none +``` + +## Known measurement caveats (documented, not hidden) +- This kernel exposes coarse `os.cpus()` ticks; `/proc/stat` is used instead. +- No thermal sensors or IPMI/rPDU exposed in this container → those fields are absent/null. +- Recovery rebound window (4 s) is too short to show full ramp in loadavg; visible in per-sample utilization. + +## Next steps toward Phase 2 (each requires a real prerequisite) +1. **Meter integration** — plug-in wattmeter / smart PDU / UPS telemetry you own; add an authenticated meter reader feeding `powerW` samples. Only then do kW-reduction claims exist. +2. **GPU node** — run on NVIDIA hardware; `gpuTelemetry()` and the capped-power path activate automatically (probe already honest). +3. **Fleet** — sign telemetry events with Ed25519 keys (reuse `../resonance-ledger` envelope: issuer keys, sequence numbers, Lamport clocks) into the read-only collector. +4. **Facility** — requires owner authorization + approved interval meter; measure P_facility = P_compute + P_cooling + P_other rather than assuming it. +5. **DR pilot** — only via utility/aggregator contract, qualification test, approved baseline; failure mode: declare unavailable. diff --git a/syntropic-compute-flex/data/last-report.json b/syntropic-compute-flex/data/last-report.json new file mode 100644 index 0000000..07e47db --- /dev/null +++ b/syntropic-compute-flex/data/last-report.json @@ -0,0 +1,23 @@ +{ + "asset": "c-6ab48394-01ed1602-f4df96d7e213", + "testMode": "local authorized workload test", + "powerMeasurementSource": "NONE_CONFIGURED", + "baselinePowerW": null, + "powerAfterPolicyW": null, + "reductionW": null, + "timeToTargetS": 0.001, + "durationMin": 0.1, + "cpuUtilBaselinePct": 50.9, + "cpuUtilDuringControlPct": 1, + "workloadOutcome": "resumed then terminated cleanly", + "physicalGridClaim": "none", + "marketParticipation": "none", + "note": "Watts not reported: no authenticated meter source configured. CPU utilization deltas are real measurements; do not convert them into power claims.", + "pauseVerification": "OK_VERIFIED", + "postResumeProcState": "R", + "eventLog": "test-run-1790220846837.jsonl", + "eventLogIntegrity": { + "ok": true, + "records": 37 + } +} \ No newline at end of file diff --git a/syntropic-compute-flex/data/test-run-1790220563296.jsonl b/syntropic-compute-flex/data/test-run-1790220563296.jsonl new file mode 100644 index 0000000..7bf8c5d --- /dev/null +++ b/syntropic-compute-flex/data/test-run-1790220563296.jsonl @@ -0,0 +1 @@ +{"seq":1,"atUtc":"2026-09-24T03:29:23.296Z","prevHash":"GENESIS","type":"TEST_START","asset":"c-6ab48394-01ed1602-f4df96d7e213","mode":"local authorized workload test","controlAction":"SIGSTOP/SIGCONT on explicitly spawned class-4 child process","powerMeter":"NONE_CONFIGURED — watts will be reported as null, not estimated","hash":"d1db369e475305467ed6aef5d4ad14439f095284f5372369102fc3e153ed2f09"} diff --git a/syntropic-compute-flex/data/test-run-1790220846837.jsonl b/syntropic-compute-flex/data/test-run-1790220846837.jsonl new file mode 100644 index 0000000..278fd13 --- /dev/null +++ b/syntropic-compute-flex/data/test-run-1790220846837.jsonl @@ -0,0 +1,37 @@ +{"seq":1,"atUtc":"2026-09-24T03:34:06.837Z","prevHash":"GENESIS","type":"TEST_START","asset":"c-6ab48394-01ed1602-f4df96d7e213","mode":"local authorized workload test","controlAction":"SIGSTOP/SIGCONT on explicitly spawned class-4 child process","powerMeter":"NONE_CONFIGURED — watts will be reported as null, not estimated","hash":"95f5190da8e4b85bbdda7289556fc958b2991eceabfa9487e1e6335f173d1c45"} +{"seq":2,"atUtc":"2026-09-24T03:34:06.841Z","prevHash":"95f5190da8e4b85bbdda7289556fc958b2991eceabfa9487e1e6335f173d1c45","type":"JOB_BOUND","jobId":"job-1","pid":3411,"class":4,"note":"explicitly registered by this operator-owned test script","hash":"682d4077376d2c1f6e0559af500f94996977119eca94eaef82714f896dfe42db"} +{"seq":3,"atUtc":"2026-09-24T03:34:07.348Z","prevHash":"682d4077376d2c1f6e0559af500f94996977119eca94eaef82714f896dfe42db","type":"TELEMETRY_SAMPLE","phase":"baseline","tS":0.5,"cpuUtilizationPct":null,"loadAvg1m":0.03,"memoryUsedBytes":422260736,"thermalZones":0,"gpuPresent":false,"powerW":null,"hash":"2e15a3f6a0c21877cc2c8c33cc9caeef166368e6ebc0eb6fd22bbd64342abfde"} +{"seq":4,"atUtc":"2026-09-24T03:34:07.851Z","prevHash":"2e15a3f6a0c21877cc2c8c33cc9caeef166368e6ebc0eb6fd22bbd64342abfde","type":"TELEMETRY_SAMPLE","phase":"baseline","tS":1.01,"cpuUtilizationPct":51,"loadAvg1m":0.03,"memoryUsedBytes":422260736,"thermalZones":0,"gpuPresent":false,"powerW":null,"hash":"d53b4419cebc82121359064d7d946e29f4f64c1a9ddb0599654db939af1a2b66"} +{"seq":5,"atUtc":"2026-09-24T03:34:08.354Z","prevHash":"d53b4419cebc82121359064d7d946e29f4f64c1a9ddb0599654db939af1a2b66","type":"TELEMETRY_SAMPLE","phase":"baseline","tS":1.51,"cpuUtilizationPct":50.5,"loadAvg1m":0.03,"memoryUsedBytes":423034880,"thermalZones":0,"gpuPresent":false,"powerW":null,"hash":"69ecbdcd7bbdc03f3c01bc0ddbe6c5d20e26fef007560830fa811cf8519ba919"} +{"seq":6,"atUtc":"2026-09-24T03:34:08.857Z","prevHash":"69ecbdcd7bbdc03f3c01bc0ddbe6c5d20e26fef007560830fa811cf8519ba919","type":"TELEMETRY_SAMPLE","phase":"baseline","tS":2.01,"cpuUtilizationPct":51,"loadAvg1m":0.03,"memoryUsedBytes":423292928,"thermalZones":0,"gpuPresent":false,"powerW":null,"hash":"4cec515f4175a325f454539489394cd3709b7c8a5039c9859fdef9e498f57f40"} +{"seq":7,"atUtc":"2026-09-24T03:34:09.360Z","prevHash":"4cec515f4175a325f454539489394cd3709b7c8a5039c9859fdef9e498f57f40","type":"TELEMETRY_SAMPLE","phase":"baseline","tS":2.52,"cpuUtilizationPct":50.5,"loadAvg1m":0.03,"memoryUsedBytes":423292928,"thermalZones":0,"gpuPresent":false,"powerW":null,"hash":"460626a5d734967a40b49c5678ccee6c90a2f4f6a3d7fb8f688aeac25b304737"} +{"seq":8,"atUtc":"2026-09-24T03:34:09.862Z","prevHash":"460626a5d734967a40b49c5678ccee6c90a2f4f6a3d7fb8f688aeac25b304737","type":"TELEMETRY_SAMPLE","phase":"baseline","tS":3.02,"cpuUtilizationPct":51.49,"loadAvg1m":0.03,"memoryUsedBytes":423559168,"thermalZones":0,"gpuPresent":false,"powerW":null,"hash":"49b75f330324f0e7b776583573c9cd9c0471b939ba8713741b1bae884b20f7c4"} +{"seq":9,"atUtc":"2026-09-24T03:34:10.365Z","prevHash":"49b75f330324f0e7b776583573c9cd9c0471b939ba8713741b1bae884b20f7c4","type":"TELEMETRY_SAMPLE","phase":"baseline","tS":3.52,"cpuUtilizationPct":50.5,"loadAvg1m":0.03,"memoryUsedBytes":423550976,"thermalZones":0,"gpuPresent":false,"powerW":null,"hash":"968ca893727d4831f3e99b7b24521309e5a8c577220eed4b5d109592bdcf5822"} +{"seq":10,"atUtc":"2026-09-24T03:34:10.867Z","prevHash":"968ca893727d4831f3e99b7b24521309e5a8c577220eed4b5d109592bdcf5822","type":"TELEMETRY_SAMPLE","phase":"baseline","tS":4.02,"cpuUtilizationPct":51,"loadAvg1m":0.03,"memoryUsedBytes":423550976,"thermalZones":0,"gpuPresent":false,"powerW":null,"hash":"1c728f6341934670187a6b7d9aff4bbf7c2924c6dadc03a453a69764f2fb61e2"} +{"seq":11,"atUtc":"2026-09-24T03:34:11.370Z","prevHash":"1c728f6341934670187a6b7d9aff4bbf7c2924c6dadc03a453a69764f2fb61e2","type":"TELEMETRY_SAMPLE","phase":"baseline","tS":4.53,"cpuUtilizationPct":51,"loadAvg1m":0.03,"memoryUsedBytes":424067072,"thermalZones":0,"gpuPresent":false,"powerW":null,"hash":"ef19d7a94b4f1fd20ced46fc5e45a0c78496fd8b31ceb44be995d596287e18e4"} +{"seq":12,"atUtc":"2026-09-24T03:34:11.873Z","prevHash":"ef19d7a94b4f1fd20ced46fc5e45a0c78496fd8b31ceb44be995d596287e18e4","type":"TELEMETRY_SAMPLE","phase":"baseline","tS":5.03,"cpuUtilizationPct":50.98,"loadAvg1m":0.11,"memoryUsedBytes":424067072,"thermalZones":0,"gpuPresent":false,"powerW":null,"hash":"d3810fc9dbc79ab6546e656e8e0d705ed9103cae69ac98e4e138ae03be7a3450"} +{"seq":13,"atUtc":"2026-09-24T03:34:12.383Z","prevHash":"d3810fc9dbc79ab6546e656e8e0d705ed9103cae69ac98e4e138ae03be7a3450","type":"TELEMETRY_SAMPLE","phase":"baseline","tS":5.54,"cpuUtilizationPct":50.51,"loadAvg1m":0.11,"memoryUsedBytes":424067072,"thermalZones":0,"gpuPresent":false,"powerW":null,"hash":"4dfad90ff680b54366c9221c26bdb180790a0f70cedd4f7e9058138f8a621186"} +{"seq":14,"atUtc":"2026-09-24T03:34:12.886Z","prevHash":"4dfad90ff680b54366c9221c26bdb180790a0f70cedd4f7e9058138f8a621186","type":"TELEMETRY_SAMPLE","phase":"baseline","tS":6.04,"cpuUtilizationPct":51.46,"loadAvg1m":0.11,"memoryUsedBytes":424062976,"thermalZones":0,"gpuPresent":false,"powerW":null,"hash":"e4d30496d07f405962293279523a6a00a18ed532fdd2298b7c4c3be8dfbefca9"} +{"seq":15,"atUtc":"2026-09-24T03:34:12.886Z","prevHash":"e4d30496d07f405962293279523a6a00a18ed532fdd2298b7c4c3be8dfbefca9","type":"CURTAIL_PROPOSED","policyVersion":"flex-policy-v1","proposedAtUtc":"2026-09-24T03:34:12.886Z","jobId":"job-1","class":4,"requestedReductionPct":100,"executed":false,"hash":"eab7985d8a5fcec88d9c0ca9f4a757ed13ca775b9fed968296c236143749c79a"} +{"seq":16,"atUtc":"2026-09-24T03:34:12.887Z","prevHash":"eab7985d8a5fcec88d9c0ca9f4a757ed13ca775b9fed968296c236143749c79a","type":"CURTAIL_EXECUTED","policyVersion":"flex-policy-v1","proposedAtUtc":"2026-09-24T03:34:12.887Z","jobId":"job-1","enforcerResult":{"action":"PAUSE","jobId":"job-1","pid":3411,"outcome":"OK_VERIFIED","signal":"SIGSTOP"},"proposalId":"2026-09-24T03:34:12.886Z","executed":true,"hash":"f32b048767c2325d50e7d5f1ba10272c52f47062a246b74a001951a1c811ca74"} +{"seq":17,"atUtc":"2026-09-24T03:34:13.389Z","prevHash":"f32b048767c2325d50e7d5f1ba10272c52f47062a246b74a001951a1c811ca74","type":"TELEMETRY_SAMPLE","phase":"control_paused","tS":0.5,"cpuUtilizationPct":null,"loadAvg1m":0.11,"memoryUsedBytes":424321024,"thermalZones":0,"gpuPresent":false,"powerW":null,"elapsedSinceCommandS":null,"hash":"3b146e4b3b7e4ca7a8f5664208bd2dbf8a396045d919f50a4e11be98e954cb47"} +{"seq":18,"atUtc":"2026-09-24T03:34:13.892Z","prevHash":"3b146e4b3b7e4ca7a8f5664208bd2dbf8a396045d919f50a4e11be98e954cb47","type":"TELEMETRY_SAMPLE","phase":"control_paused","tS":1,"cpuUtilizationPct":1,"loadAvg1m":0.11,"memoryUsedBytes":424321024,"thermalZones":0,"gpuPresent":false,"powerW":null,"elapsedSinceCommandS":null,"hash":"7108e44e7b777e7514d1b3f232bd63b3821868ac7a4760c732ab6224f10b6377"} +{"seq":19,"atUtc":"2026-09-24T03:34:14.394Z","prevHash":"7108e44e7b777e7514d1b3f232bd63b3821868ac7a4760c732ab6224f10b6377","type":"TELEMETRY_SAMPLE","phase":"control_paused","tS":1.51,"cpuUtilizationPct":0.99,"loadAvg1m":0.11,"memoryUsedBytes":424255488,"thermalZones":0,"gpuPresent":false,"powerW":null,"elapsedSinceCommandS":null,"hash":"d804672fa51a01d88b5e3cadddc1f73d7863f5fb2eff57ef71f8486b218cc429"} +{"seq":20,"atUtc":"2026-09-24T03:34:14.898Z","prevHash":"d804672fa51a01d88b5e3cadddc1f73d7863f5fb2eff57ef71f8486b218cc429","type":"TELEMETRY_SAMPLE","phase":"control_paused","tS":2.01,"cpuUtilizationPct":1,"loadAvg1m":0.11,"memoryUsedBytes":424255488,"thermalZones":0,"gpuPresent":false,"powerW":null,"elapsedSinceCommandS":null,"hash":"8727edf97652dcc0055e9d246a6fe1bd8a1c37ecb19d61c8c97116e8d0dfc2d8"} +{"seq":21,"atUtc":"2026-09-24T03:34:15.401Z","prevHash":"8727edf97652dcc0055e9d246a6fe1bd8a1c37ecb19d61c8c97116e8d0dfc2d8","type":"TELEMETRY_SAMPLE","phase":"control_paused","tS":2.51,"cpuUtilizationPct":0.99,"loadAvg1m":0.11,"memoryUsedBytes":424513536,"thermalZones":0,"gpuPresent":false,"powerW":null,"elapsedSinceCommandS":null,"hash":"56f928e8bff08127a898c7a1562ae1a45fc1bbb616f604c0460370d218856f31"} +{"seq":22,"atUtc":"2026-09-24T03:34:15.904Z","prevHash":"56f928e8bff08127a898c7a1562ae1a45fc1bbb616f604c0460370d218856f31","type":"TELEMETRY_SAMPLE","phase":"control_paused","tS":3.02,"cpuUtilizationPct":1.98,"loadAvg1m":0.11,"memoryUsedBytes":424574976,"thermalZones":0,"gpuPresent":false,"powerW":null,"elapsedSinceCommandS":null,"hash":"680e1e39a24e2c3669b90933bb38f4a896773402f2c00f8aeecdd83ea428084b"} +{"seq":23,"atUtc":"2026-09-24T03:34:16.407Z","prevHash":"680e1e39a24e2c3669b90933bb38f4a896773402f2c00f8aeecdd83ea428084b","type":"TELEMETRY_SAMPLE","phase":"control_paused","tS":3.52,"cpuUtilizationPct":0,"loadAvg1m":0.11,"memoryUsedBytes":424509440,"thermalZones":0,"gpuPresent":false,"powerW":null,"elapsedSinceCommandS":null,"hash":"55fb8f878826e9a37b52012dac3dc1f226010ab23fb2826c36a07d98138e6373"} +{"seq":24,"atUtc":"2026-09-24T03:34:16.910Z","prevHash":"55fb8f878826e9a37b52012dac3dc1f226010ab23fb2826c36a07d98138e6373","type":"TELEMETRY_SAMPLE","phase":"control_paused","tS":4.02,"cpuUtilizationPct":1,"loadAvg1m":0.1,"memoryUsedBytes":424509440,"thermalZones":0,"gpuPresent":false,"powerW":null,"elapsedSinceCommandS":null,"hash":"38dd8e36fcee4c486cbf77982e7675edc5aa77ad306af68158ff674dba8239f4"} +{"seq":25,"atUtc":"2026-09-24T03:34:17.413Z","prevHash":"38dd8e36fcee4c486cbf77982e7675edc5aa77ad306af68158ff674dba8239f4","type":"TELEMETRY_SAMPLE","phase":"control_paused","tS":4.53,"cpuUtilizationPct":1.96,"loadAvg1m":0.1,"memoryUsedBytes":424509440,"thermalZones":0,"gpuPresent":false,"powerW":null,"elapsedSinceCommandS":null,"hash":"17e2c8334888af639858d4ba771a93dc03646b9e7a32ee270c3f0f2d12508128"} +{"seq":26,"atUtc":"2026-09-24T03:34:17.915Z","prevHash":"17e2c8334888af639858d4ba771a93dc03646b9e7a32ee270c3f0f2d12508128","type":"TELEMETRY_SAMPLE","phase":"control_paused","tS":5.03,"cpuUtilizationPct":0,"loadAvg1m":0.1,"memoryUsedBytes":424570880,"thermalZones":0,"gpuPresent":false,"powerW":null,"elapsedSinceCommandS":null,"hash":"456ba5dc2767986b8d5b005abe00a0b0960cf403063fdecac9897befd310b25e"} +{"seq":27,"atUtc":"2026-09-24T03:34:18.417Z","prevHash":"456ba5dc2767986b8d5b005abe00a0b0960cf403063fdecac9897befd310b25e","type":"TELEMETRY_SAMPLE","phase":"control_paused","tS":5.53,"cpuUtilizationPct":0.99,"loadAvg1m":0.1,"memoryUsedBytes":424509440,"thermalZones":0,"gpuPresent":false,"powerW":null,"elapsedSinceCommandS":null,"hash":"a0c26249f610188bd8c87e0618335b7e59938f306c5f83bd023c31a12b5a2b7f"} +{"seq":28,"atUtc":"2026-09-24T03:34:18.920Z","prevHash":"a0c26249f610188bd8c87e0618335b7e59938f306c5f83bd023c31a12b5a2b7f","type":"TELEMETRY_SAMPLE","phase":"control_paused","tS":6.03,"cpuUtilizationPct":1,"loadAvg1m":0.1,"memoryUsedBytes":424509440,"thermalZones":0,"gpuPresent":false,"powerW":null,"elapsedSinceCommandS":null,"hash":"543fd49362c58a6f12ab6e6bc4795e1edf8ae98a3414839f3b7cd281f9eb2548"} +{"seq":29,"atUtc":"2026-09-24T03:34:18.922Z","prevHash":"543fd49362c58a6f12ab6e6bc4795e1edf8ae98a3414839f3b7cd281f9eb2548","type":"RESTORE_EXECUTED","policyVersion":"flex-policy-v1","proposedAtUtc":"2026-09-24T03:34:18.922Z","jobId":"job-1","result":{"action":"RESUME","jobId":"job-1","pid":3411,"outcome":"OK_VERIFIED","signal":"SIGCONT","postState":"R"},"executed":true,"hash":"4da576a2f80c91d9f37b7b1f26c6865c92c713ff2ce4c74c79757dad481b70b9"} +{"seq":30,"atUtc":"2026-09-24T03:34:19.425Z","prevHash":"4da576a2f80c91d9f37b7b1f26c6865c92c713ff2ce4c74c79757dad481b70b9","type":"TELEMETRY_SAMPLE","phase":"recovery_resumed","tS":0.5,"cpuUtilizationPct":null,"loadAvg1m":0.1,"memoryUsedBytes":423993344,"thermalZones":0,"gpuPresent":false,"powerW":null,"hash":"06a4c602ee800bc4aea4b145448ed5bd0fce153572ae6463d61493841af2c2c0"} +{"seq":31,"atUtc":"2026-09-24T03:34:19.928Z","prevHash":"06a4c602ee800bc4aea4b145448ed5bd0fce153572ae6463d61493841af2c2c0","type":"TELEMETRY_SAMPLE","phase":"recovery_resumed","tS":1,"cpuUtilizationPct":51,"loadAvg1m":0.1,"memoryUsedBytes":423993344,"thermalZones":0,"gpuPresent":false,"powerW":null,"hash":"dc960dad9404df441b24b82ad8fbc3e6871917489c2fcd15d5bce6a46d53da5a"} +{"seq":32,"atUtc":"2026-09-24T03:34:20.430Z","prevHash":"dc960dad9404df441b24b82ad8fbc3e6871917489c2fcd15d5bce6a46d53da5a","type":"TELEMETRY_SAMPLE","phase":"recovery_resumed","tS":1.51,"cpuUtilizationPct":51.49,"loadAvg1m":0.1,"memoryUsedBytes":423993344,"thermalZones":0,"gpuPresent":false,"powerW":null,"hash":"d8681a6a0335025d2aed3f3813b8fac77816fa2d094791c22139d56bef60f1c0"} +{"seq":33,"atUtc":"2026-09-24T03:34:20.932Z","prevHash":"d8681a6a0335025d2aed3f3813b8fac77816fa2d094791c22139d56bef60f1c0","type":"TELEMETRY_SAMPLE","phase":"recovery_resumed","tS":2.01,"cpuUtilizationPct":51,"loadAvg1m":0.1,"memoryUsedBytes":423993344,"thermalZones":0,"gpuPresent":false,"powerW":null,"hash":"89f6be1a54e8a36b213f4a1f1777b416d6bb2c8e6dbfbb5f89e8aef885d3aded"} +{"seq":34,"atUtc":"2026-09-24T03:34:21.435Z","prevHash":"89f6be1a54e8a36b213f4a1f1777b416d6bb2c8e6dbfbb5f89e8aef885d3aded","type":"TELEMETRY_SAMPLE","phase":"recovery_resumed","tS":2.51,"cpuUtilizationPct":50.5,"loadAvg1m":0.1,"memoryUsedBytes":424247296,"thermalZones":0,"gpuPresent":false,"powerW":null,"hash":"00fbaf1696c96c13f692fea0f85b9864ea6959387039605d65316ab7327541a3"} +{"seq":35,"atUtc":"2026-09-24T03:34:21.937Z","prevHash":"00fbaf1696c96c13f692fea0f85b9864ea6959387039605d65316ab7327541a3","type":"TELEMETRY_SAMPLE","phase":"recovery_resumed","tS":3.01,"cpuUtilizationPct":51.49,"loadAvg1m":0.17,"memoryUsedBytes":424505344,"thermalZones":0,"gpuPresent":false,"powerW":null,"hash":"21acca54d354e34625536440a1323f7f58786a79501044ef3e951a769f703a70"} +{"seq":36,"atUtc":"2026-09-24T03:34:22.440Z","prevHash":"21acca54d354e34625536440a1323f7f58786a79501044ef3e951a769f703a70","type":"TELEMETRY_SAMPLE","phase":"recovery_resumed","tS":3.52,"cpuUtilizationPct":50,"loadAvg1m":0.17,"memoryUsedBytes":424505344,"thermalZones":0,"gpuPresent":false,"powerW":null,"hash":"2f9cfaa49ab31fd6c46b61a82e9ccd4c37e34d04d6decd42f926cfc2e22a0d37"} +{"seq":37,"atUtc":"2026-09-24T03:34:22.943Z","prevHash":"2f9cfaa49ab31fd6c46b61a82e9ccd4c37e34d04d6decd42f926cfc2e22a0d37","type":"TELEMETRY_SAMPLE","phase":"recovery_resumed","tS":4.02,"cpuUtilizationPct":51.49,"loadAvg1m":0.17,"memoryUsedBytes":424505344,"thermalZones":0,"gpuPresent":false,"powerW":null,"hash":"b89a904a6905489c002bed65348096f0e3fcf17dd04a0b8d79ce67b733de1d37"} diff --git a/syntropic-compute-flex/src/enforcement.js b/syntropic-compute-flex/src/enforcement.js new file mode 100644 index 0000000..cdbd6e8 --- /dev/null +++ b/syntropic-compute-flex/src/enforcement.js @@ -0,0 +1,62 @@ +'use strict'; +// Node-local enforcement: the ONLY actuator path in this platform is POSIX +// process signals to explicitly-registered, class-4 child processes. +// No utility, BESS, HVAC, substation, inverter, breaker, or market interface exists. + +const { spawnSync } = require('child_process'); + +function pidAlive(pid) { + try { process.kill(pid, 0); return true; } catch (e) { return e.code === 'EPERM' ? true : false; } +} + +class LocalEnforcer { + constructor({ maxSignalRetries = 3 } = {}) { + this.maxSignalRetries = maxSignalRetries; + this.actions = []; // tamper-evident action log (also written by runner) + } + + _log(entry) { this.actions.push(entry); return entry; } + + pauseProcess(job) { + if (job.class !== 4) return this._log({ action: 'PAUSE', jobId: job.id, outcome: 'REFUSED', reason: `class ${job.class} not eligible for native pause` }); + if (!Number.isInteger(job.pid) || !pidAlive(job.pid)) return this._log({ action: 'PAUSE', jobId: job.id, outcome: 'REFUSED', reason: 'no live registered pid' }); + try { + process.kill(job.pid, 'SIGSTOP'); + const verified = this._stateOf(job.pid) === 'T'; + return this._log({ action: 'PAUSE', jobId: job.pid ? job.id : job.id, pid: job.pid, outcome: verified ? 'OK_VERIFIED' : 'SENT_UNVERIFIED', signal: 'SIGSTOP' }); + } catch (e) { + return this._log({ action: 'PAUSE', jobId: job.id, pid: job.pid, outcome: 'ERROR', reason: e.message }); + } + } + + resumeProcess(job) { + if (!Number.isInteger(job.pid) || !pidAlive(job.pid)) return this._log({ action: 'RESUME', jobId: job.id, outcome: 'REFUSED', reason: 'no live registered pid' }); + try { + process.kill(job.pid, 'SIGCONT'); + const state = this._stateOf(job.pid); + return this._log({ action: 'RESUME', jobId: job.id, pid: job.pid, outcome: state && state !== 'T' ? 'OK_VERIFIED' : 'SENT_UNVERIFIED', signal: 'SIGCONT', postState: state }); + } catch (e) { + return this._log({ action: 'RESUME', jobId: job.id, pid: job.pid, outcome: 'ERROR', reason: e.message }); + } + } + + // Read real process state from /proc//stat — verification, not assumption. + _stateOf(pid) { + try { + const stat = require('fs').readFileSync(`/proc/${pid}/stat`, 'utf8'); + const m = stat.match(/\)\s+(\S)/); // state char follows comm field + return m ? m[1] : null; + } catch (_) { return null; } + } + + gpuPowerCapAttempt(desiredWatts) { + // Honest capability probe: attempts nvidia-smi -pl only if the tool exists. + let has; + try { has = spawnSync('which', ['nvidia-smi'], { encoding: 'utf8' }).status === 0; } catch (_) { has = false; } + if (!has) return this._log({ action: 'GPU_POWER_CAP', outcome: 'UNAVAILABLE', reason: 'nvidia-smi not present on this node; no GPU power claim can be made' }); + const r = spawnSync('nvidia-smi', ['-lgc', `${desiredWatts}`, '-pl', `${desiredWatts}`], { encoding: 'utf8', timeout: 5000 }); + return this._log({ action: 'GPU_POWER_CAP', outcome: r.status === 0 ? 'OK' : 'FAILED', desiredWatts, stderr: r.stderr?.slice(0, 200) || null }); + } +} + +module.exports = { LocalEnforcer, pidAlive }; diff --git a/syntropic-compute-flex/src/eventlog.js b/syntropic-compute-flex/src/eventlog.js new file mode 100644 index 0000000..fd6f52d --- /dev/null +++ b/syntropic-compute-flex/src/eventlog.js @@ -0,0 +1,33 @@ +'use strict'; +// Append-only, hash-chained event log (reuses the resonance-ledger pattern). +// Every telemetry sample, proposal, and executed action links to its predecessor. + +const crypto = require('crypto'); +const fs = require('fs'); + +class EventLog { + constructor(path) { this.path = path; this.prevHash = 'GENESIS'; this.seq = 0; } + + append(event) { + const rec = { seq: ++this.seq, atUtc: new Date().toISOString(), prevHash: this.prevHash, ...event }; + const body = JSON.stringify(rec); + rec.hash = crypto.createHash('sha256').update(this.prevHash + '|' + body).digest('hex'); + this.prevHash = rec.hash; + if (this.path) fs.appendFileSync(this.path, JSON.stringify(rec) + '\n'); + return rec; + } + + static verifyFile(path) { + const lines = fs.readFileSync(path, 'utf8').trim().split('\n').map(l => JSON.parse(l)); + let prev = 'GENESIS'; + for (const r of lines) { + const { hash, ...rest } = r; + const expect = crypto.createHash('sha256').update(prev + '|' + JSON.stringify(rest)).digest('hex'); + if (r.prevHash !== prev || hash !== expect) return { ok: false, brokenAtSeq: r.seq }; + prev = hash; + } + return { ok: true, records: lines.length }; + } +} + +module.exports = { EventLog }; diff --git a/syntropic-compute-flex/src/report.js b/syntropic-compute-flex/src/report.js new file mode 100644 index 0000000..b3ba40f --- /dev/null +++ b/syntropic-compute-flex/src/report.js @@ -0,0 +1,31 @@ +'use strict'; +// Verified event report generator — states ONLY what was measured. +// Power fields remain null unless a real meter source is configured. No estimation. + +function buildTestReport({ asset, mode, baselineSamples, controlSamples, recoverySamples, workloadOutcome, meterSource }) { + const avgW = (rows) => { + const vals = rows.map(r => r.powerW).filter(v => Number.isFinite(v)); + return vals.length ? +(vals.reduce((a, b) => a + b, 0) / vals.length).toFixed(1) : null; + }; + const base = avgW(baselineSamples), ctrl = avgW(controlSamples); + return { + asset, + testMode: mode, // e.g. "local authorized workload test" + powerMeasurementSource: meterSource || 'NONE_CONFIGURED', + baselinePowerW: base, + powerAfterPolicyW: ctrl, + reductionW: (base != null && ctrl != null) ? +(base - ctrl).toFixed(1) : null, + timeToTargetS: ctrl != null ? controlSamples[0]?.elapsedSinceCommandS ?? null : null, + durationMin: controlSamples.length ? +(controlSamples.at(-1).tS / 60).toFixed(1) : null, + cpuUtilBaselinePct: (() => { const v = baselineSamples.map(s => s.cpuUtilizationPct).filter(Number.isFinite); return v.length ? +(v.reduce((a,b)=>a+b,0)/v.length).toFixed(1) : null; })(), + cpuUtilDuringControlPct: (() => { const v = controlSamples.map(s => s.cpuUtilizationPct).filter(Number.isFinite); return v.length ? +(v.reduce((a,b)=>a+b,0)/v.length).toFixed(1) : null; })(), + workloadOutcome, // completed / checkpointed / resumed / refused + physicalGridClaim: 'none', + marketParticipation: 'none', + note: base == null + ? 'Watts not reported: no authenticated meter source configured. CPU utilization deltas are real measurements; do not convert them into power claims.' + : 'Watts from declared meter source; provenance recorded per sample.', + }; +} + +module.exports = { buildTestReport }; diff --git a/syntropic-compute-flex/src/run_test.js b/syntropic-compute-flex/src/run_test.js new file mode 100644 index 0000000..6fb79be --- /dev/null +++ b/syntropic-compute-flex/src/run_test.js @@ -0,0 +1,106 @@ +'use strict'; +// Phase-1 measured test runner: baseline → controlled event (real SIGSTOP on a +// real spawned class-4 busy worker) → recovery. Writes hash-chained event log +// and a report stating ONLY what was measured. + +const { spawn } = require('child_process'); +const fs = require('fs'); +const path = require('path'); +const { snapshot } = require('./telemetry'); +const { WorkloadQueue } = require('./workloads'); +const { LocalEnforcer } = require('./enforcement'); +const { SchedulerPolicy } = require('./scheduler'); +const { EventLog } = require('./eventlog'); +const { buildTestReport } = require('./report'); + +const sleep = ms => new Promise(r => setTimeout(r, ms)); +const BASELINE_S = Number(process.env.BASELINE_S || 6); +const CONTROL_S = Number(process.env.CONTROL_S || 6); +const RECOVERY_S = Number(process.env.RECOVERY_S || 4); +const SAMPLE_MS = 500; + +async function sampleWindow(seconds, label, log, extra = {}) { + const rows = []; + let prev = null; + const t0 = Date.now(); + while ((Date.now() - t0) / 1000 < seconds) { + await sleep(SAMPLE_MS); + const s = snapshot(prev); prev = s._prevTimes; + const row = { phase: label, tS: +((Date.now() - t0) / 1000).toFixed(2), + cpuUtilizationPct: s.cpuUtilizationPct, loadAvg1m: s.loadAvg1m, + memoryUsedBytes: s.memoryUsedBytes, thermalZones: s.thermal.length, + gpuPresent: s.gpu != null, powerW: null, ...extra }; + rows.push(row); + log.append({ type: 'TELEMETRY_SAMPLE', phase: label, ...row }); + } + return rows; +} + +async function main() { + const outDir = path.join(__dirname, '..', 'data'); + fs.mkdirSync(outDir, { recursive: true }); + const logPath = path.join(outDir, `test-run-${Date.now()}.jsonl`); + const log = new EventLog(logPath); + const queue = new WorkloadQueue(); + const enforcer = new LocalEnforcer(); + const sched = new SchedulerPolicy({ queue, enforcer, eventLog: log }); + + log.append({ type: 'TEST_START', asset: require('os').hostname(), mode: 'local authorized workload test', + controlAction: 'SIGSTOP/SIGCONT on explicitly spawned class-4 child process', + powerMeter: 'NONE_CONFIGURED — watts will be reported as null, not estimated' }); + + // Spawn a real, bounded, non-critical CPU worker (class 4). It self-terminates after 90s max. + const workerSrc = ` + const end = Date.now() + 90000; let x = 0; + const tick = () => { const s = Date.now(); while (Date.now() - s < 40) x += Math.sqrt(x + 1); if (Date.now() < end) setImmediate(tick); else process.exit(0); }; + process.on('SIGTERM', () => process.exit(0)); tick();`; + const child = spawn(process.execPath, ['-e', workerSrc], { stdio: 'ignore' }); + const jobId = queue.submit({ name: 'cpu-spin-experiment', class: 4, runFn: () => {} }); + const job = queue.get(jobId); + job.pid = child.pid; + queue.start(jobId); + log.append({ type: 'JOB_BOUND', jobId, pid: child.pid, class: 4, note: 'explicitly registered by this operator-owned test script' }); + + console.log(`[test] baseline window (${BASELINE_S}s), worker pid ${child.pid} running…`); + const baseline = await sampleWindow(BASELINE_S, 'baseline', log); + + const cmdT0 = Date.now(); + console.log('[test] controlled event: scheduler curtailment request → SIGSTOP'); + const execResults = sched.respondToCurtailmentRequest({ requestedReductionPct: 100, eligibleJobIds: [jobId] }); + const timeToTargetMs = Date.now() - cmdT0; + const pauseResult = execResults.find(e => e.type === 'CURTAIL_EXECUTED'); + + const control = await sampleWindow(CONTROL_S, 'control_paused', log, + { elapsedSinceCommandS: null }); + control.forEach(r => r.elapsedSinceCommandS = +((Date.now() - cmdT0) / 1000).toFixed(2)); + + console.log('[test] recovery: restore → SIGCONT'); + sched.restoreAfterEvent(); + const recovery = await sampleWindow(RECOVERY_S, 'recovery_resumed', log); + + // Job integrity: verify the OS-level state actually flipped (read /proc again post-resume) + const procState = fs.existsSync(`/proc/${child.pid}/stat`) + ? fs.readFileSync(`/proc/${child.pid}/stat`, 'utf8').match(/\)\s+(\S)/)[1] : 'EXITED'; + child.kill('SIGTERM'); + await sleep(300); + + const report = buildTestReport({ + asset: require('os').hostname(), + mode: 'local authorized workload test', + baselineSamples: baseline, controlSamples: control, recoverySamples: recovery, + workloadOutcome: procState !== 'T' ? 'resumed then terminated cleanly' : 'FAILED_TO_RECOVER', + }); + report.timeToTargetS = +(timeToTargetMs / 1000).toFixed(3); + report.pauseVerification = pauseResult?.enforcerResult?.outcome || 'MISSING'; + report.postResumeProcState = procState; // 'R'/'S' = running again, 'T' = still stopped + report.eventLog = path.basename(logPath); + report.eventLogIntegrity = EventLog.verifyFile(logPath); + + fs.writeFileSync(path.join(outDir, 'last-report.json'), JSON.stringify(report, null, 2)); + console.log('\n===== MEASURED TEST REPORT ====='); + console.log(JSON.stringify(report, null, 2)); +} + +require('os'); // ensure available +const os = require('os'); +main().catch(e => { console.error(e); process.exit(1); }); diff --git a/syntropic-compute-flex/src/scheduler.js b/syntropic-compute-flex/src/scheduler.js new file mode 100644 index 0000000..d856aad --- /dev/null +++ b/syntropic-compute-flex/src/scheduler.js @@ -0,0 +1,66 @@ +'use strict'; +// Scheduler policy engine. Fleet rules enforced here: +// Never interrupt protected workloads (class 1-2). +// Require explicit workload class before curtailment. +// Class 4 only for automatic action; everything else escalates to operator. +// Log every proposed AND executed action. +// Local fallback: if coordinator unreachable, agent holds current state (fail-in-place). + +const POLICY_VERSION = 'flex-policy-v1'; + +class SchedulerPolicy { + constructor({ queue, enforcer, eventLog }) { + this.queue = queue; this.enforcer = enforcer; this.eventLog = eventLog; + } + + _record(type, payload, executed) { + const ev = { type, policyVersion: POLICY_VERSION, proposedAtUtc: new Date().toISOString(), ...payload, executed: !!executed }; + this.eventLog.append(ev); + return ev; + } + + // A curtailment request arrives (e.g., forecast advisory "defer eligible Class 4 batch"). + // The scheduler may only ACT on class-4 jobs it owns. It never invents authority. + respondToCurtailmentRequest({ requestedReductionPct, eligibleJobIds, operatorApproval = false }) { + const results = []; + for (const id of eligibleJobIds || []) { + const job = this.queue.get(id); + if (!job) { results.push(this._record('CURTAIL_SKIP', { jobId: id, reason: 'unknown job' }, false)); continue; } + if (job.class <= 2) { results.push(this._record('CURTAIL_REFUSED', { jobId: id, class: job.class, reason: 'protected workload class; refusing to interrupt' }, false)); continue; } + if (job.class === 3 && !operatorApproval) { results.push(this._record('CURTAIL_ESCALATED', { jobId: id, class: 3, reason: 'best-effort batch requires operator approval to interrupt' }, false)); continue; } + if (job.status !== 'RUNNING') { results.push(this._record('CURTAIL_SKIP', { jobId: id, reason: `not running (${job.status})` }, false)); continue; } + const proposal = this._record('CURTAIL_PROPOSED', { jobId: id, class: job.class, requestedReductionPct }, false); + let exec; + if (job.pid) { + exec = this.enforcer.pauseProcess(job); + if (String(exec.outcome).startsWith('OK')) { // reflect the verified OS state in the queue too + try { this.queue.pause(id); } catch (_) { /* status already reconciled elsewhere */ } + } + } else { + exec = this.queue.pause(id) && { action: 'PAUSE', outcome: 'OK_LOGICAL_ONLY', note: 'logical job, no OS process bound' }; + } + results.push(this._record('CURTAIL_EXECUTED', { jobId: id, enforcerResult: exec, proposalId: proposal.proposedAtUtc }, true)); + } + return results; + } + + restoreAfterEvent() { + const out = []; + for (const j of this.queue.list()) { + if (j.status === 'PAUSED_NATIVE' || j.status === 'PAUSED_CHECKPOINTED') { + const job = this.queue.get(j.id); + let exec; + if (job.pid) { + exec = this.enforcer.resumeProcess(job); + if (String(exec.outcome).startsWith('OK')) { try { this.queue.resume(j.id); } catch (_) {} } + } else { + exec = this.queue.resume(j.id) && { outcome: 'OK_LOGICAL_ONLY' }; + } + out.push(this._record('RESTORE_EXECUTED', { jobId: j.id, result: exec }, true)); + } + } + return out; + } +} + +module.exports = { SchedulerPolicy, POLICY_VERSION }; diff --git a/syntropic-compute-flex/src/telemetry.js b/syntropic-compute-flex/src/telemetry.js new file mode 100644 index 0000000..1152a52 --- /dev/null +++ b/syntropic-compute-flex/src/telemetry.js @@ -0,0 +1,97 @@ +'use strict'; +// Node telemetry agent — honest measurement only. +// Reads real OS metrics; never estimates or fabricates power numbers. + +const os = require('os'); +const fs = require('fs'); + +function readCpuTimes() { + const cpus = os.cpus(); + let user = 0, nice = 0, sys = 0, idle = 0, iowait = 0, irq = 0, softirq = 0, steal = 0; + for (const c of cpus) { + user += c.times.user; nice += c.times.nice; sys += c.times.system; idle += c.times.idle; + iowait += c.times.iowait || 0; irq += c.times.irq || 0; softirq += c.times.softirq || 0; + steal += c.times.steal || 0; + } + return { user, nice, sys, idle, iowait, irq, softirq, steal, + total: user + nice + sys + idle + iowait + irq + softirq + steal }; +} + +// CPU utilization via /proc/stat delta when available, else os.cpus() delta. +function cpuUtilization(prev, curr) { + const busyDelta = (curr.total - curr.idle - curr.iowait) - (prev.total - prev.idle - prev.iowait); + const totalDelta = curr.total - prev.total; + if (totalDelta <= 0) return null; + return Math.max(0, Math.min(1, busyDelta / totalDelta)); +} + +// Preferred source: aggregate "cpu" line of /proc/stat (USER_HZ jiffies). +// On some virtualized kernels os.cpus().times is quantized far too coarsely +// to yield usable deltas; /proc/stat remains exact. Returns null if absent. +function readProcStat() { + try { + const line = fs.readFileSync('/proc/stat', 'utf8').split('\n')[0]; + if (!line.startsWith('cpu ')) return null; + const n = line.trim().split(/\s+/).slice(1).map(Number); + if (n.length < 4 || n.some(v => !Number.isFinite(v))) return null; + const [user, nice, system, idle, iowait = 0, irq = 0, softirq = 0, steal = 0] = n; + return { user, nice, sys: system, idle, iowait, irq, softirq, steal, + total: user + nice + system + idle + iowait + irq + softirq + steal }; + } catch (_) { return null; } +} + +function thermalReadings() { + // Real kernel thermal sensors under /sys/class/thermal, if present. + const out = []; + const base = '/sys/class/thermal'; + try { + for (const z of fs.readdirSync(base)) { + const tzPath = `${base}/${z}/temp`; + if (fs.existsSync(tzPath)) { + const milli = parseInt(fs.readFileSync(tzPath, 'utf8').trim(), 10); + if (Number.isFinite(milli)) out.push({ zone: z, celsius: +(milli / 1000).toFixed(2) }); + } + } + } catch (_) { /* no thermal zones on this platform */ } + return out; +} + +function gpuTelemetry() { + // nvidia-smi if present; otherwise honestly report absence. Never guess. + try { + const { execFileSync } = require('child_process'); + const csv = execFileSync('nvidia-smi', + ['--query-gpu=utilization.gpu,memory.used,memory.total,power.draw,power.limit,temperature.gpu', + '--format=csv,noheader,nounits'], + { timeout: 3000, encoding: 'utf8' }); + return csv.trim().split('\n').map((line, i) => { + const [util, memUsed, memTotal, powerDraw, powerLimit, temp] = line.split(',').map(s => parseFloat(s.trim())); + return { index: i, utilPct: util, memUsedMiB: memUsed, memTotalMiB: memTotal, + powerDrawW: Number.isFinite(powerDraw) ? powerDraw : null, + powerLimitW: Number.isFinite(powerLimit) ? powerLimit : null, + tempC: Number.isFinite(temp) ? temp : null }; + }); + } catch (_) { + return null; // no NVIDIA GPU / driver on this node — reported as absent, not zero + } +} + +function snapshot(prevTimes) { + // Prefer /proc/stat (exact jiffies); fall back to os.cpus() on other platforms. + const curr = readProcStat() || readCpuTimes(); + const loadAvg = os.loadavg(); + const mem = { totalBytes: os.totalmem(), freeBytes: os.freemem() }; + return { + observedAtUtc: new Date().toISOString(), + hostname: os.hostname(), + cores: os.cpus().length, + cpuUtilizationPct: prevTimes ? +(cpuUtilization(prevTimes, curr) * 100).toFixed(2) : null, + loadAvg1m: loadAvg[0], + memoryUsedBytes: mem.totalBytes - mem.freeBytes, + thermal: thermalReadings(), + gpu: gpuTelemetry(), + _prevTimes: curr, + }; +} + +module.exports = { snapshot, readCpuTimes, readProcStat, cpuUtilization, thermalReadings, gpuTelemetry }; diff --git a/syntropic-compute-flex/src/workloads.js b/syntropic-compute-flex/src/workloads.js new file mode 100644 index 0000000..ed9b2ba --- /dev/null +++ b/syntropic-compute-flex/src/workloads.js @@ -0,0 +1,65 @@ +'use strict'; +// Workload queue with explicit classes. Only class 4 is eligible for curtailment. +// Protected workloads can NEVER be interrupted by policy — enforced in code, not convention. + +const CLASS_DESCRIPTIONS = { + 1: 'protected / interactive (never interruptible)', + 2: 'production batch (checkpointed pause only, requires operator flag)', + 3: 'best-effort batch (deferral allowed, interruption requires operator flag)', + 4: 'non-critical experimental (start/defer/pause/resume allowed without extra approval)', +}; + +class WorkloadQueue { + constructor() { this.jobs = new Map(); this.seq = 0; } + + submit({ name, class: cls, runFn, checkpointFn, resumeFn }) { + if (![1, 2, 3, 4].includes(cls)) throw new Error(`Workload class must be 1-4, got ${cls}`); + if (typeof runFn !== 'function') throw new Error('runFn required'); + const id = `job-${++this.seq}`; + this.jobQueue ||= []; + this.jobQueue.push(id); + this.jobs.set(id, { + id, name, class: cls, status: 'QUEUED', log: [], + runFn, checkpointFn: checkpointFn || null, resumeFn: resumeFn || null, + }); + return id; + } + + get(id) { return this.jobs.get(id); } + list() { return [...this.jobs.values()].map(j => ({ id: j.id, name: j.name, class: j.class, status: j.status })); } + + _transition(id, from, to, action) { + const j = this.jobs.get(id); + if (!j) throw new Error(`Unknown job ${id}`); + if (!from.includes(j.status)) throw new Error(`Illegal transition: ${j.status} -> ${to} (action=${action})`); + j.status = to; + j.log.push({ at: new Date().toISOString(), action, from: from.join('|'), to }); + return j; + } + + start(id) { return this._transition(id, ['QUEUED', 'DEFERRED', 'PAUSED_CHECKPOINTED'], 'RUNNING', 'START'); } + defer(id) { + const j = this.jobs.get(id); + if (!j) throw new Error(`Unknown job ${id}`); + if (j.class < 3) throw new Error(`Class ${j.class} workload is protected against deferral`); + return this._transition(id, ['QUEUED'], 'DEFERRED', 'DEFER'); + } + pause(id) { + const j = this.jobs.get(id); + if (!j) throw new Error(`Unknown job ${id}`); + if (j.class !== 4 && !j.operatorApprovalForInterruption) + throw new Error(`Pause requires class 4 or explicit operator approval; refusing to interrupt class ${j.class}`); + if (j.class === 4) return this._transition(id, ['RUNNING'], 'PAUSED_NATIVE', 'PAUSE(SIGSTOP)'); + if (!j.checkpointFn) throw new Error('Non-class-4 pause requires a registered checkpoint function'); + j.checkpointFn(); + return this._transition(id, ['RUNNING'], 'PAUSED_CHECKPOINTED', 'CHECKPOINT+PAUSE'); + } + resume(id) { + const j = this.jobs.get(id); + if (!j) throw new Error(`Unknown job ${id}`); + if (j.status === 'PAUSED_CHECKPOINTED' && j.resumeFn) j.resumeFn(); + return this._transition(id, ['PAUSED_NATIVE', 'PAUSED_CHECKPOINTED'], 'RUNNING', 'RESUME'); + } +} + +module.exports = { WorkloadQueue, CLASS_DESCRIPTIONS }; diff --git a/syntropic-compute-flex/tests/flex.test.js b/syntropic-compute-flex/tests/flex.test.js new file mode 100644 index 0000000..319f041 --- /dev/null +++ b/syntropic-compute-flex/tests/flex.test.js @@ -0,0 +1,117 @@ +'use strict'; +const { test } = require('node:test'); +const assert = require('node:assert'); +const { spawn } = require('child_process'); +const os = require('os'); +const fs = require('fs'); +const { WorkloadQueue } = require('../src/workloads'); +const { LocalEnforcer } = require('../src/enforcement'); +const { SchedulerPolicy } = require('../src/scheduler'); +const { EventLog } = require('../src/eventlog'); +const { snapshot, cpuUtilization, readCpuTimes } = require('../src/telemetry'); +const { buildTestReport } = require('../src/report'); + +const sleep = ms => new Promise(r => setTimeout(r, ms)); +function mk() { return { queue: new WorkloadQueue(), enf: new LocalEnforcer(), log: new EventLog(null) }; } + +test('class 4 job full lifecycle', () => { + const { queue } = mk(); + const id = queue.submit({ name: 'j', class: 4, runFn: () => {} }); + queue.start(id); assert.equal(queue.get(id).status, 'RUNNING'); + queue.pause(id); assert.equal(queue.get(id).status, 'PAUSED_NATIVE'); + queue.resume(id); assert.equal(queue.get(id).status, 'RUNNING'); +}); + +test('protected classes refuse deferral and interruption', () => { + const { queue } = mk(); + for (const cls of [1, 2]) { + const id = queue.submit({ name: `p${cls}`, class: cls, runFn: () => {} }); + assert.throws(() => queue.defer(id), /protected/i); + queue.start(id); + assert.throws(() => queue.pause(id), /class 4 or explicit operator approval/i); + } +}); + +test('illegal transitions rejected', () => { + const { queue } = mk(); + const id = queue.submit({ name: 'x', class: 4, runFn: () => {} }); + assert.throws(() => queue.pause(id), /Illegal transition/); // QUEUED -> PAUSED not allowed +}); + +test('scheduler refuses class-1/2, escalates class-3, acts on class-4', async () => { + const { queue, enf, log } = mk(); + const sched = new SchedulerPolicy({ queue, enforcer: enf, eventLog: log }); + const c1 = queue.submit({ name: 'db', class: 1, runFn: () => {} }); queue.start(c1); + const c3 = queue.submit({ name: 'etl', class: 3, runFn: () => {} }); queue.start(c3); + const workerSrc = 'let x=0;setInterval(()=>{const s=Date.now();while(Date.now()-s<30)x+=Math.sqrt(x+1);},5);setTimeout(()=>process.exit(0),6000);'; + const child = spawn(process.execPath, ['-e', workerSrc], { stdio: 'ignore' }); + let childDone = false; + child.on('exit', () => { childDone = true; }); + const killChild = () => { try { process.kill(child.pid, 'SIGCONT'); } catch {} try { child.kill('SIGKILL'); } catch {} }; + const c4 = queue.submit({ name: 'exp', class: 4, runFn: () => {} }); queue.get(c4).pid = child.pid; queue.start(c4); + await sleep(200); + const res = sched.respondToCurtailmentRequest({ requestedReductionPct: 50, eligibleJobIds: [c1, c3, c4] }); + assert.ok(res.some(e => e.type === 'CURTAIL_REFUSED' && e.jobId === c1)); + assert.ok(res.some(e => e.type === 'CURTAIL_ESCALATED' && e.jobId === c3)); + const exec = res.find(e => e.type === 'CURTAIL_EXECUTED' && e.jobId === c4); + assert.ok(exec, 'class-4 executed'); + const readState = () => { try { return fs.readFileSync(`/proc/${child.pid}/stat`, 'utf8').match(/\)\s+(\S)/)[1]; } catch { return null; } }; + let state = null; for (let i = 0; i < 20 && state !== 'T'; i++) { state = readState(); if (state !== 'T') await sleep(25); } + try { + assert.equal(state, 'T', 'OS-level SIGSTOP verified via /proc'); + sched.restoreAfterEvent(); + let state2 = 'T'; for (let i = 0; i < 20 && state2 === 'T'; i++) { state2 = readState(); await sleep(25); } + assert.ok(state2 !== 'T' && state2 !== null, 'process resumed at OS level'); + } finally { + killChild(); + for (let i = 0; i < 40 && !childDone; i++) await sleep(25); + } +}); + +test('enforcer refuses signals to non-class-4 jobs even with a pid', () => { + const { queue, enf } = mk(); + const id = queue.submit({ name: 'prot', class: 1, runFn: () => {} }); + queue.get(id).pid = process.pid; // attacker-ish binding: our own pid + const r = enf.pauseProcess(queue.get(id)); + assert.equal(r.outcome, 'REFUSED'); + assert.equal(r.reason.includes('not eligible'), true); +}); + +test('gpu power cap honestly reports unavailability without nvidia-smi', () => { + const { enf } = mk(); + const r = enf.gpuPowerCapAttempt(100); + assert.ok(['UNAVAILABLE', 'FAILED'].includes(r.outcome) || os.platform() === 'linux'); + if (!fs.existsSync('/usr/bin/nvidia-smi') && !spawnSyncExists()) assert.equal(r.outcome, 'UNAVAILABLE'); + function spawnSyncExists() { try { require('child_process').execFileSync('which', ['nvidia-smi'], {stdio:'ignore'}); return true; } catch { return false; } } +}); + +test('event log hash chain verifies and detects tampering', () => { + const p = '/tmp/flex-test-log.jsonl'; + try { fs.unlinkSync(p); } catch {} + const log = new EventLog(p); + for (let i = 0; i < 5; i++) log.append({ type: 'TEST', i }); + assert.deepEqual(EventLog.verifyFile(p), { ok: true, records: 5 }); + const lines = fs.readFileSync(p, 'utf8').trim().split('\n'); + lines[2] = JSON.stringify({ ...JSON.parse(lines[2]), i: 999 }); + fs.writeFileSync(p, lines.join('\n') + '\n'); + assert.equal(EventLog.verifyFile(p).ok, false); +}); + +test('telemetry returns real measured values', async () => { + const a = snapshot(null); const prev = a._prevTimes; + const busyStart = Date.now(); while (Date.now() - busyStart < 300) Math.sqrt(Math.random()); + const b = snapshot(prev); + // Coarse-precision platforms may report zero jiffies in a short window; poll up to ~1s. + let util = b.cpuUtilizationPct, pprev = b._prevTimes, tries = 0; + while ((!Number.isFinite(util) || util <= 0) && tries++ < 6) { await sleep(150); const t = snapshot(pprev); pprev = t._prevTimes; util = t.cpuUtilizationPct; } + assert.ok(Number.isFinite(util) && util > 0, `expected positive measured CPU utilization, got ${util}`); + assert.equal(typeof b.hostname, 'string'); + assert.ok(Array.isArray(b.thermal)); +}); + +test('report never fabricates watts', () => { + const rep = buildTestReport({ asset: 'a', mode: 'm', baselineSamples: [{ cpuUtilizationPct: 50 }], controlSamples: [{ cpuUtilizationPct: 10, tS: 6 }], recoverySamples: [], workloadOutcome: 'resumed' }); + assert.equal(rep.baselinePowerW, null); + assert.equal(rep.reductionW, null); + assert.match(rep.note, /do not convert them into power claims/); +}); diff --git a/syntropic-grid/README.md b/syntropic-grid/README.md new file mode 100644 index 0000000..73fd181 --- /dev/null +++ b/syntropic-grid/README.md @@ -0,0 +1,94 @@ +# Syntropic Grid — Forecasting and Flexible-Load Planning Console + +**Scope (deliberately bounded):** this is a forecasting *and planning-advisory* console. +It is **not** a VPP control plane. It issues no physical dispatches, no market bids, +no setpoints, and has no actuator path. `AUTHORIZED_LOCAL_CONTROL` mode is defined in +the mode taxonomy but **not implemented**, by design. + +## Modes (explicit, never silent) + +| Mode | Status | Meaning | +|---|---|---| +| `SIMULATION` | implemented | synthetic/replay data, labelled as such in every record | +| `LIVE_READ_ONLY` | implemented | authorized telemetry from assets you own/monitor; measurements only | +| `AUTHORIZED_LOCAL_CONTROL` | **not implemented** | reserved; requires separate authorization review before any build | + +Every stored record carries its mode (`_ingest.environment`). No button or endpoint +transitions between modes. + +## Pipeline + +```text +Authorized/synthetic source +→ authenticated collector (Bearer token) +→ schema/unit/freshness/provenance validation +→ append-only immutable raw store +→ 15-minute aligned aggregation +→ OLS baseline v1 forecast (96-interval minimum history) +→ forecast + 95% prediction interval + provenance +→ advisory recommendation only +``` + +## Ingestion contract + +Accepted shapes (see `src/ingest.js` for the full rule list): + +- Simulation: `loadMw`, `spotPriceUsdPerMwh`, `projectedSolarMw` + `source{kind,sourceId,quality}` +- Owned lab/cluster: `siteId`, `assetClass: FLEXIBLE_COMPUTE_LOAD`, `siteImportKw`, + `gpuPowerKw`, `coolingPowerKw`, `otherPowerKw`, `meterQuality` + +`substationId` is rejected unless paired with an actual registered utility substation — +use `siteId` for owned equipment. The example site is honestly named +`owned-compute-lab-01` with meter type `INTERNAL_NON_REVENUE_GRADE`. + +The collector rejects: unauthenticated sources, any control/command field (deep scan), +non-finite or stringly-typed numerics, negative physical values, unknown sites, +bad intervals, future-dated non-replay timestamps, missing provenance, +non-monotonic sequences, and `SIMULATED` quality claiming `LIVE_READ_ONLY`. + +## Model honesty + +- OLS v1: `p̂(t+1) = β₀ + β₁·Lₜ + β₂·Gₜ + β₃·pₜ`, rolling 96-interval window, + standardized features + ridge for conditioning, persistence-anchored fallback on + degenerate designs. +- Forecast is **withheld** below 97 labeled intervals (`INSUFFICIENT_HISTORY`). +- Output always includes point + 95% prediction interval + sigma + freshness bucket + + model status. Never a bare point estimate. +- Walk-forward backtest reports MAE/RMSE/bias/interval-coverage against a **persistence + benchmark**. On the synthetic fixture: OLS MAE ≈ 3.59 vs persistence ≈ 5.18 — which + demonstrates the harness works, not that the model predicts real markets. Several + weeks of real data are needed before accuracy metrics are informative. + +## Run + +```bash +node --test tests/ # 14 tests +node src/server.js # http://localhost:4173/console (read-only dashboard) +# replay labelled synthetic data via POST /ingest (see src/replay.js pattern) +``` + +## What success looks like (target status block) + +```text +Registered asset: owned-compute-lab-01 +Mode: LIVE_READ_ONLY +Telemetry source: local rack PDU, internal/non-revenue-grade +Aggregation: 15-minute intervals +Forecast model: OLS baseline v1 · Horizon: 15 minutes +Backtest MAE: vs persistence +Recommendation: defer eligible Class 4 batch queue for 15 minutes ← advisory text only +Physical actuation: disabled +Market participation: none +Settlement status: none +``` + +## Build sequence followed / remaining + +Done: mode+provenance tagging, asset registry (controls default false), authenticated +idempotent ingestion, immutable raw store, 15-min aggregation, 96-interval threshold, +prediction intervals, walk-forward backtest, advisory-only recommendations, honest empty state. + +Next (only when real authorized data exists): register your actual PDU/meter as a +`live-meter` source identity, run several weeks, then evaluate whether flexible-compute +scheduling advisories earn their keep. Control paths stay unbuilt until a separate, +explicit authorization decision. diff --git a/syntropic-grid/src/forecast.js b/syntropic-grid/src/forecast.js new file mode 100644 index 0000000..619f874 --- /dev/null +++ b/syntropic-grid/src/forecast.js @@ -0,0 +1,185 @@ +// Syntropic Grid — aggregation, OLS baseline forecast, backtest, recommendations. +// Forecasts are advisory only. No dispatch, no bids, no actuation anywhere here. + +'use strict'; + +const MIN_INTERVALS_FOR_FORECAST = 96; // 24h of 15-min intervals + +// ---- 15-minute aggregation --------------------------------------------------- +// Raw samples (any declared interval) -> aligned 900s buckets per site. +function aggregate15min(rawRecords, siteId) { + const buckets = new Map(); // bucketStartMs -> {sums, counts} + for (const r of rawRecords) { + if ((r.siteId || r.substationId) !== siteId) continue; + const t = Date.parse(r.observedAtUtc); + const start = Math.floor(t / 900000) * 900000; + let b = buckets.get(start); + if (!b) { b = { n: 0, loadKw: 0, priceSum: 0, priceN: 0, solarMw: 0 }; buckets.set(start, b); } + b.n += 1; + b.loadKw += r.siteImportKw ?? (isNum(r.loadMw) ? r.loadMw * 1000 : 0); + if (isNum(r.spotPriceUsdPerMwh)) { b.priceSum += r.spotPriceUsdPerMwh; b.priceN += 1; } + if (isNum(r.projectedSolarMw)) b.solarMw += r.projectedSolarMw; + } + return [...buckets.entries()] + .sort((a, b) => a[0] - b[0]) + .map(([start, b]) => ({ + bucketStartUtc: new Date(start).toISOString(), + samples: b.n, + meanLoadKw: round(b.loadKw / b.n, 4), + meanPriceUsdPerMwh: b.priceN ? round(b.priceSum / b.priceN, 4) : null, + projectedSolarMw: round(b.solarMw / b.n, 6), + })); +} +function isNum(v) { return typeof v === 'number' && Number.isFinite(v); } +function round(v, d) { const m = 10 ** d; return Math.round(v * m) / m; } + +// ---- OLS baseline v1 ----------------------------------------------------------- +// p_hat(t+1) = b0 + b1*L_t + b2*G_t + b3*p_t (ridge-lambda=1e-8, window W) +function fitOls(series, window = 96) { + const rows = series.filter(s => s.meanPriceUsdPerMwh != null); + if (rows.length < window + 1) { + return { status: 'INSUFFICIENT_HISTORY', observations: rows.length, required: window + 1 }; + } + const use = rows.slice(-(window + 1)); + const X = [], y = []; + for (let i = 0; i < use.length - 1; i++) { + X.push([1, use[i].meanLoadKw, use[i].projectedSolarMw, use[i].meanPriceUsdPerMwh]); + y.push(use[i + 1].meanPriceUsdPerMwh); + } + let beta; + try { + beta = solveNormalEquations(X, y); + } catch (err) { + // Degenerate design (e.g. constant features). Fall back to persistence-anchored fit: + // p_hat(t+1) = mean + slope*(p_t - mean), load/solar terms zero. + if (!/singular|unstable/.test(err.message)) throw err; + const m = y.reduce((a, b) => a + b, 0) / y.length; + const slope = slopeThroughOrigin(X.map(x => x[3] - m), y.map(v => v - m)); + beta = [m - slope * m, 0, 0, slope]; // prediction = m + slope*(p_t - m) + } + // residuals on the fitted window -> prediction interval + const resid = X.map((x, i) => y[i] - dot(x, beta)); + const sigma = Math.sqrt(resid.reduce((a, r) => a + r * r, 0) / Math.max(1, resid.length - beta.length)); + return { status: 'BASELINE', beta: beta.map(b => round(b, 6)), sigma: round(sigma, 4), window: use.length, last: use[use.length - 1] }; +} + +function dot(a, b) { return a.reduce((s, v, i) => s + v * b[i], 0); } + +function solveNormalEquations(X, y) { + const k = X[0].length; + // Standardize non-intercept columns so normal equations stay well-conditioned + // for large-magnitude features (e.g. prices ~50, loads ~12). + const mean = new Array(k).fill(0), scale = new Array(k).fill(1); + for (let j = 1; j < k; j++) { + mean[j] = X.reduce((s, x) => s + x[j], 0) / X.length; + const varr = X.reduce((s, x) => s + (x[j] - mean[j]) ** 2, 0) / X.length; + scale[j] = Math.sqrt(varr) || 1; + } + const Z = X.map(x => x.map((v, j) => j === 0 ? v : (v - mean[j]) / scale[j])); + const yMean = y.reduce((a, b) => a + b, 0) / y.length; + + const XtX = Array.from({ length: k }, () => new Array(k).fill(0)); + const Xty = new Array(k).fill(0); + for (let i = 0; i < Z.length; i++) { + for (let a = 0; a < k; a++) { + Xty[a] += Z[i][a] * (y[i] - yMean); + for (let b = 0; b < k; b++) XtX[a][b] += Z[i][a] * Z[i][b]; + } + } + for (let a = 0; a < k; a++) XtX[a][a] += 1e-8; // tiny ridge for stability + const gamma = gaussSolve(XtX, Xty); + if (gamma.some(v => !Number.isFinite(v))) throw new Error('unstable solve'); + // Unstandardize: beta_0 absorbs intercept shift; beta_j = gamma_j / scale_j. + const beta = gamma.map((g, j) => j === 0 ? g + yMean - gamma.slice(1).reduce((s, gj, idx) => s + gj * mean[idx + 1] / scale[idx + 1], 0) : g / scale[j]); + return beta; +} + +function gaussSolve(A, b) { + const n = b.length; + const M = A.map((row, i) => [...row, b[i]]); + for (let c = 0; c < n; c++) { + let p = c; + for (let r = c + 1; r < n; r++) if (Math.abs(M[r][c]) > Math.abs(M[p][c])) p = r; + [M[c], M[p]] = [M[p], M[c]]; + if (Math.abs(M[c][c]) < 1e-12) throw new Error('singular design matrix'); + for (let r = 0; r < n; r++) { + if (r === c) continue; + const f = M[r][c] / M[c][c]; + for (let j = c; j <= n; j++) M[r][j] -= f * M[c][j]; + } + } + return M.map((row, i) => row[n] / row[i][i]); +} + +// Least-squares fit through origin: y ≈ slope * x (used as degenerate fallback). +function slopeThroughOrigin(xs, ys) { + const num = xs.reduce((s, x, i) => s + x * ys[i], 0); + const den = xs.reduce((s, x) => s + x * x, 0); + return den > 1e-12 ? num / den : 0; +} + +// ---- forecast ------------------------------------------------------------------ +function forecast(series, window = 96) { + const fit = fitOls(series, window); + if (fit.status !== 'BASELINE') { + return { ...fit, point: null, interval: null, message: + `Need ${fit.required} labeled 15-min intervals; have ${fit.observations}. Forecast withheld.` }; + } + const L = fit.last.meanLoadKw, G = fit.last.projectedSolarMw, p = fit.last.meanPriceUsdPerMwh; + const point = round(fit.beta[0] + fit.beta[1] * L + fit.beta[2] * G + fit.beta[3] * p, 2); + const lo = round(point - 1.96 * fit.sigma, 2), hi = round(point + 1.96 * fit.sigma, 2); + return { + model: 'OLS v1', horizonMinutes: 15, windowIntervals: fit.window, + point, interval: [lo, hi], sigma: fit.sigma, + inputFreshnessBucket: fit.last.bucketStartUtc, + status: 'baseline', + }; +} + +// ---- backtest: walk-forward MAE/RMSE/bias/coverage vs persistence ---------------- +function backtest(series, { window = 96, steps = 24 } = {}) { + const rows = series.filter(s => s.meanPriceUsdPerMwh != null); + const results = { ols: { abs: [], sq: [], err: [], covered: 0, n: 0 }, persistence: { abs: [], sq: [] } }; + for (let i = window; i < rows.length; i++) { + const train = rows.slice(Math.max(0, i - window - 1), i + 1); + const fit = fitOls(train, Math.min(window, train.length - 1)); + if (fit.status !== 'BASELINE') continue; + const actual = rows[i].meanPriceUsdPerMwh; + const prev = rows[i - 1]; + const pred = fit.beta[0] + fit.beta[1] * prev.meanLoadKw + fit.beta[2] * prev.projectedSolarMw + fit.beta[3] * prev.meanPriceUsdPerMwh; + const e = actual - pred; + results.ols.abs.push(Math.abs(e)); results.ols.sq.push(e * e); results.ols.err.push(e); results.ols.n++; + if (actual >= pred - 1.96 * fit.sigma && actual <= pred + 1.96 * fit.sigma) results.ols.covered++; + const pe = actual - prev.meanPriceUsdPerMwh; + results.persistence.abs.push(Math.abs(pe)); results.persistence.sq.push(pe * pe); + if (results.ols.n >= steps) break; + } + const summarize = (arr) => arr.length ? round(arr.reduce((a, b) => a + b, 0) / arr.length, 4) : null; + return { + evaluatedSteps: results.ols.n, + ols: { + mae: summarize(results.ols.abs), + rmse: results.ols.sq.length ? round(Math.sqrt(results.ols.sq.reduce((a, b) => a + b, 0) / results.ols.sq.length), 4) : null, + bias: summarize(results.ols.err), + intervalCoverage95: results.ols.n ? round(results.ols.covered / results.ols.n, 3) : null, + }, + persistenceBenchmark: { mae: summarize(results.persistence.abs) }, + note: 'Accuracy metrics become informative after several weeks of data, not days.', + }; +} + +// ---- recommendations (text only — never commands) -------------------------------- +function recommend(series, fc) { + if (!series.length) return 'No telemetry window accepted. Register a site and submit at least 96 valid 15-minute observations or load a labelled replay dataset.'; + if (!fc || fc.point == null) return `Model status: insufficient history (${fc.observations || 0}/${fc.required || 96} intervals). Forecast and recommendations withheld.`; + const last = series[series.length - 1]; + if (fc.point > last.meanPriceUsdPerMwh * 1.15) { + return `Advisory only: next-interval modeled price ($${fc.point}/MWh) exceeds current by >15%. Eligible Class 4 batch work could be deferred ~15 minutes. No action taken; physical actuation disabled.`; + } + if (fc.point < last.meanPriceUsdPerMwh * 0.85) { + return `Advisory only: modeled price dip detected. Eligible Class 4 batch work could be advanced into this window. No action taken; physical actuation disabled.`; + } + return 'Advisory only: modeled price within ±15% of current. No scheduling recommendation. Physical actuation disabled; market participation none.'; +} + +module.exports = { aggregate15min, fitOls, forecast, backtest, recommend, MIN_INTERVALS_FOR_FORECAST }; diff --git a/syntropic-grid/src/ingest.js b/syntropic-grid/src/ingest.js new file mode 100644 index 0000000..fbcf0a4 --- /dev/null +++ b/syntropic-grid/src/ingest.js @@ -0,0 +1,212 @@ +// Syntropic Grid — authenticated, validated, read-only telemetry ingestion. +// Modes are explicit and never silently change: SIMULATION | LIVE_READ_ONLY. +// AUTHORIZED_LOCAL_CONTROL is intentionally NOT implemented in this version. +// The collector accepts measurements only. It has no command path at all. + +'use strict'; + +const crypto = require('crypto'); + +const MODES = Object.freeze(['SIMULATION', 'LIVE_READ_ONLY']); + +// Field names that indicate a control/command payload. Presence = hard reject. +const FORBIDDEN_KEYS = new Set([ + 'command', 'setpoint', 'dispatch', 'actuate', 'control', 'targetTempC', + 'curtailKw', 'bidMw', 'offerMw', 'preCoolTo', 'startGenset', +]); + +// Clock-skew and freshness policy (seconds). +const MAX_FUTURE_SKEW_S = 120; +const MAX_STALE_AGE_S = 3600; +const ALLOWED_INTERVALS = new Set([60, 300, 900]); + +// ---- asset registry --------------------------------------------------------- +// Defaults: controls false, market participation none. Owner must be explicit. +class AssetRegistry { + constructor() { this.assets = new Map(); } + + register({ siteId, assetClass, owner, meterType, authorizedSources, timezone = 'UTC' }) { + if (!siteId || !owner) throw new Error('siteId and owner required'); + this.assets.set(siteId, { + siteId, + assetClass: assetClass || 'FLEXIBLE_COMPUTE_LOAD', + owner, + meterType: meterType || 'INTERNAL_NON_REVENUE_GRADE', + authorizedSources: new Set(authorizedSources || []), + timezone, + // Capability flags — every one defaults off and cannot be set here. + controlCapable: false, + marketParticipation: false, + settlement: false, + }); + return this.assets.get(siteId); + } + + get(siteId) { return this.assets.get(siteId); } +} + +// ---- helpers ---------------------------------------------------------------- +function isFiniteNumber(v) { return typeof v === 'number' && Number.isFinite(v); } + +function canonicalize(obj) { + if (Array.isArray(obj)) return '[' + obj.map(canonicalize).join(',') + ']'; + if (obj && typeof obj === 'object') { + return '{' + Object.keys(obj).sort() + .map(k => JSON.stringify(k) + ':' + canonicalize(obj[k])).join(',') + '}'; + } + return JSON.stringify(obj); +} + +function eventIdFor(envelope) { + return 'sha256:' + crypto.createHash('sha256').update(canonicalize(envelope)).digest('hex'); +} + +// ---- collector ---------------------------------------------------------------- +class Collector { + constructor({ registry, auth }) { + this.registry = registry; + this.auth = auth; // { verify(token) -> sourceIdentity | null } + this.raw = []; // immutable raw accepted samples (append-only) + this.seenEventIds = new Set(); + this.lastSeqBySource = new Map(); // `${sourceId}:${siteId}` -> seq + this.rejections = []; + } + + ingest(envelope, authToken) { + const reject = (reason, detail) => { + const r = { reason, detail, at: new Date().toISOString() }; + this.rejections.push(r); + return { accepted: false, ...r }; + }; + + // 1. Authenticated source identity. + const source = this.auth.verify(authToken); + if (!source) return reject('UNAUTHENTICATED', 'missing or invalid API token'); + + // 2. No commands, ever. Scan deeply for forbidden keys. + const stack = [envelope]; + while (stack.length) { + const cur = stack.pop(); + if (cur && typeof cur === 'object') { + for (const k of Object.keys(cur)) { + if (FORBIDDEN_KEYS.has(k.toLowerCase()) || FORBIDDEN_KEYS.has(k)) { + return reject('CONTROL_FIELD_PROHIBITED', `field "${k}" not accepted by read-only collector`); + } + if (typeof cur[k] === 'object') stack.push(cur[k]); + } + } + } + + // 3. Schema version. + if (envelope.schemaVersion !== 1) return reject('BAD_SCHEMA_VERSION', String(envelope.schemaVersion)); + + // 4. Explicit mode; AUTHORIZED_LOCAL_CONTROL not implemented. + if (!MODES.includes(envelope.environment)) { + return reject('BAD_ENVIRONMENT', String(envelope.environment)); + } + + // 5. Known/allowlisted site + authorization of this source for it. + const siteId = envelope.siteId || envelope.substationId; + if (!siteId) return reject('MISSING_SITE_ID', 'siteId required'); + if (envelope.substationId && !envelope.siteId) { + return reject('MISLABELD_ASSET', 'substationId reserved for authorized utility substations; use siteId'); + } + const asset = this.registry.get(siteId); + if (!asset) return reject('UNKNOWN_SITE', siteId); + if (!asset.authorizedSources.has(source.id)) return reject('SOURCE_NOT_AUTHORIZED', source.id); + + // Mode consistency with asset reality: live claims on synthetic sources rejected. + if (envelope.environment === 'LIVE_READ_ONLY' && source.kind === 'synthetic-replay') { + return reject('MODE_MISMATCH', 'synthetic source cannot declare LIVE_READ_ONLY'); + } + + // 6. Timestamps: UTC, bounded skew, not stale. + // Replay datasets are accepted with historical timestamps; the skew + // bound applies to non-replay sources only. + const observed = Date.parse(envelope.observedAtUtc); + if (Number.isNaN(observed)) return reject('BAD_TIMESTAMP', String(envelope.observedAtUtc)); + const isReplaySource = !!(envelope.source && ['historical-replay', 'synthetic-replay'].includes(envelope.source.kind)); + const now = Date.now(); + if (!isReplaySource && (observed - now) / 1000 > MAX_FUTURE_SKEW_S) { + return reject('FUTURE_DATED', 'exceeds clock-skew bound'); + } + if ((now - observed) / 1000 > MAX_STALE_AGE_S * 24 * 30) { + // replay datasets may be old; require explicit provenance for that + if (!envelope.source || !['historical-replay', 'synthetic-replay'].includes(envelope.source.kind)) { + return reject('STALE_WITHOUT_PROVENANCE', 'old timestamps require replay provenance'); + } + } + + // 7. Declared interval. + if (!ALLOWED_INTERVALS.has(envelope.intervalSeconds)) { + return reject('BAD_INTERVAL', String(envelope.intervalSeconds)); + } + + // 8. Units + physical sanity per contract shape. + const values = {}; + if (isFiniteNumber(envelope.loadMw)) values.loadMw = envelope.loadMw; + if (isFiniteNumber(envelope.siteImportKw)) values.siteImportKw = envelope.siteImportKw; + if (isFiniteNumber(envelope.gpuPowerKw)) values.gpuPowerKw = envelope.gpuPowerKw; + if (isFiniteNumber(envelope.coolingPowerKw)) values.coolingPowerKw = envelope.coolingPowerKw; + if (isFiniteNumber(envelope.otherPowerKw)) values.otherPowerKw = envelope.otherPowerKw; + if (isFiniteNumber(envelope.projectedSolarMw)) values.projectedSolarMw = envelope.projectedSolarMw; + if (isFiniteNumber(envelope.spotPriceUsdPerMwh)) values.spotPriceUsdPerMwh = envelope.spotPriceUsdPerMwh; + + for (const [k, v] of Object.entries(values)) { + if (v < 0 && k !== 'spotPriceUsdPerMwh') return reject('NEGATIVE_PHYSICAL_VALUE', `${k}=${v}`); + } + const nonPrice = Object.keys(values).filter(k => k !== 'spotPriceUsdPerMwh'); + if (nonPrice.length === 0) return reject('NO_VALID_MEASUREMENTS', 'all fields missing/non-finite'); + // Reject stringly-typed numerics like "high" or nulls the caller meant as numbers. + for (const k of ['loadMw', 'siteImportKw', 'spotPriceUsdPerMwh']) { + if (k in envelope && envelope[k] !== undefined && !isFiniteNumber(envelope[k])) { + return reject('NON_NUMERIC_FIELD', `${k}=${JSON.stringify(envelope[k])}`); + } + } + + // 9. Declared provenance + quality. + if (!envelope.source || !envelope.source.kind || !envelope.source.sourceId || !envelope.source.quality) { + return reject('MISSING_PROVENANCE', 'source{kind,sourceId,quality} required'); + } + if (envelope.environment === 'LIVE_READ_ONLY' && envelope.source.quality === 'SIMULATED') { + return reject('QUALITY_MODE_CONFLICT', 'SIMULATED quality cannot be declared LIVE'); + } + + // 10. Monotonic per-source sequence + idempotency. + if (!Number.isInteger(envelope.sourceSequence) || envelope.sourceSequence < 1) { + return reject('BAD_SEQUENCE', String(envelope.sourceSequence)); + } + const seqKey = `${source.id}:${siteId}`; + const lastSeq = this.lastSeqBySource.get(seqKey) || 0; + if (envelope.sourceSequence <= lastSeq) { + // could be replay/idempotent retry — allow exact-duplicate event ids below + const eid = eventIdFor(envelope); + if (this.seenEventIds.has(eid)) { + return { accepted: true, duplicate: true, eventId: eid }; + } + return reject('NON_MONOTONIC_SEQUENCE', `${envelope.sourceSequence} <= ${lastSeq}`); + } + + // 11. Idempotency key / event id. + const eventId = envelope.eventId || eventIdFor(envelope); + if (this.seenEventIds.has(eventId)) return { accepted: true, duplicate: true, eventId }; + + // Accept — store raw immutably, tagged with mode + server-side provenance. + const record = Object.freeze({ + eventId, + ...envelope, + _ingest: Object.freeze({ + acceptedAtUtc: new Date(now).toISOString(), + sourceIdentity: source.id, + environment: envelope.environment, + meterType: asset.meterType, + }), + }); + this.raw.push(record); + this.seenEventIds.add(eventId); + this.lastSeqBySource.set(seqKey, envelope.sourceSequence); + return { accepted: true, eventId, stored: this.raw.length }; + } +} + +module.exports = { MODES, AssetRegistry, Collector, eventIdFor, canonicalize }; diff --git a/syntropic-grid/src/replay.js b/syntropic-grid/src/replay.js new file mode 100644 index 0000000..e0a945c --- /dev/null +++ b/syntropic-grid/src/replay.js @@ -0,0 +1,34 @@ +// Syntropic Grid — labelled replay driver. +// Submits a synthetic 15-minute price/load trajectory for owned-compute-lab-01, +// clearly marked SIMULATION + synthetic-replay provenance. Advisory output only. + +'use strict'; + +const { collector } = require('./server'); +const TOKEN = process.env.SG_API_TOKEN || 'dev-token-change-me'; + +const N = parseInt(process.argv[2] || '120', 10); // intervals (>=97 to unlock forecast) +const t0 = Math.floor(Date.now() / 900000) * 900000 - N * 900000; + +for (let i = 0; i < N; i++) { + const price = 50 + 5 * Math.sin(i / 6) + (((i * 37) % 11) - 5); + const env = { + schemaVersion: 1, + environment: 'SIMULATION', + siteId: 'owned-compute-lab-01', + assetClass: 'FLEXIBLE_COMPUTE_LOAD', + observedAtUtc: new Date(t0 + i * 900000).toISOString(), + intervalSeconds: 900, + siteImportKw: +(12 + Math.sin(i / 9)).toFixed(3), + gpuPowerKw: 8.1, coolingPowerKw: 2.0, otherPowerKw: 2.3, + projectedSolarMw: 0.02, + spotPriceUsdPerMwh: +price.toFixed(2), + source: { kind: 'synthetic-replay', sourceId: 'local-fixture-v1', quality: 'SIMULATED' }, + sourceSequence: i + 1, + }; + const r = collector.ingest(env, TOKEN); + if (!r.accepted) { console.error('rejected at', i, r.reason, r.detail); process.exit(1); } +} + +console.log(`Replayed ${N} labelled SIMULATION intervals (source: local-fixture-v1, quality: SIMULATED).`); +console.log('This is synthetic replay data — not live telemetry, not market data.'); diff --git a/syntropic-grid/src/server.js b/syntropic-grid/src/server.js new file mode 100644 index 0000000..e5f9e7d --- /dev/null +++ b/syntropic-grid/src/server.js @@ -0,0 +1,108 @@ +// Syntropic Grid — Forecasting and Flexible-Load Planning Console +// Read-only HTTP surface: POST /ingest (measurements only), GET /console, GET /status. +// There is no control endpoint, no actuator path, and no mode-switch route. + +'use strict'; + +const http = require('http'); +const { AssetRegistry, Collector } = require('./ingest'); +const { aggregate15min, forecast, backtest, recommend } = require('./forecast'); + +const API_TOKEN = process.env.SG_API_TOKEN || 'dev-token-change-me'; +const auth = { verify: (t) => (t === API_TOKEN ? { id: 'local-fixture-v1', kind: 'synthetic-replay' } : null) }; + +const registry = new AssetRegistry(); +registry.register({ + siteId: 'owned-compute-lab-01', + assetClass: 'FLEXIBLE_COMPUTE_LOAD', + owner: 'project-steward', + meterType: 'INTERNAL_NON_REVENUE_GRADE', + authorizedSources: ['local-fixture-v1'], +}); + +const collector = new Collector({ registry, auth }); + +function statusPayload() { + const siteId = 'owned-compute-lab-01'; + const series = aggregate15min(collector.raw, siteId); + const fc = forecast(series); + const bt = series.length > 97 ? backtest(series) : null; + return { + title: 'Syntropic Grid — Forecasting and Flexible-Load Planning Console', + disclaimer: 'Simulation/replay and read-only telemetry. This console does not issue physical dispatches or market bids.', + modesImplemented: ['SIMULATION', 'LIVE_READ_ONLY'], + modeNotImplemented: 'AUTHORIZED_LOCAL_CONTROL', + registeredAsset: registry.get(siteId), + rawSamplesRetained: collector.raw.length, + aggregatedIntervals: series.length, + rejectionsLast20: collector.rejections.slice(-20), + forecast: fc, + backtest: bt, + recommendation: recommend(series, fc), + physicalActuation: 'disabled', + marketParticipation: 'none', + settlementStatus: 'none', + }; +} + +const CONSOLE_HTML = `Syntropic Grid — Forecasting Console + +

Syntropic Grid — Forecasting and Flexible-Load Planning Console

+

SIMULATION / LIVE_READ_ONLY only

Physical actuation: DISABLED

Market participation: NONE

+
+`; + +const server = http.createServer((req, res) => { + const send = (code, obj, type = 'application/json') => { + res.writeHead(code, { 'Content-Type': type }); + res.end(type === 'application/json' ? JSON.stringify(obj, null, 2) : obj); + }; + if (req.method === 'GET' && req.url === '/console') return send(200, CONSOLE_HTML, 'text/html'); + if (req.method === 'GET' && req.url === '/status') return send(200, statusPayload()); + if (req.method === 'POST' && req.url === '/ingest') { + let body = ''; + req.on('data', c => { body += c; if (body.length > 1e6) req.destroy(); }); + req.on('end', () => { + let envelope; + try { envelope = JSON.parse(body); } + catch { return send(400, { accepted: false, reason: 'INVALID_JSON' }); } + const token = (req.headers['authorization'] || '').replace(/^Bearer\s+/i, ''); + const result = collector.ingest(envelope, token); + return send(result.accepted ? 200 : 422, result); + }); + return; + } + // Control paths deliberately do not exist. + if (/^\/(dispatch|control|actuate|bid|command)/.test(req.url)) { + return send(404, { error: 'No control interface exists in this system.' }); + } + send(404, { error: 'not found' }); +}); + +if (require.main === module) { + const port = process.env.PORT || 4173; + server.listen(port, () => console.log(`Syntropic Grid console (read-only): http://localhost:${port}/console`)); +} + +module.exports = { server, collector, registry, statusPayload }; diff --git a/syntropic-grid/tests/grid.test.js b/syntropic-grid/tests/grid.test.js new file mode 100644 index 0000000..f22b347 --- /dev/null +++ b/syntropic-grid/tests/grid.test.js @@ -0,0 +1,186 @@ +// Syntropic Grid — test suite (node --test) +'use strict'; + +const test = require('node:test'); +const assert = require('node:assert'); +const { AssetRegistry, Collector } = require('../src/ingest'); +const { aggregate15min, forecast, backtest, recommend } = require('../src/forecast'); + +const TOKEN = 't0ken'; +const auth = { verify: t => (t === TOKEN ? { id: 'local-fixture-v1', kind: 'synthetic-replay' } : null) }; + +function makeCollector() { + const registry = new AssetRegistry(); + registry.register({ + siteId: 'owned-compute-lab-01', owner: 'steward', + authorizedSources: ['local-fixture-v1'], + }); + return new Collector({ registry, auth }); +} + +function baseEnvelope(overrides = {}) { + return { + schemaVersion: 1, + environment: 'SIMULATION', + siteId: 'owned-compute-lab-01', + assetClass: 'FLEXIBLE_COMPUTE_LOAD', + observedAtUtc: new Date().toISOString(), + intervalSeconds: 900, + siteImportKw: 12.4, + gpuPowerKw: 8.1, + coolingPowerKw: 2.0, + otherPowerKw: 2.3, + spotPriceUsdPerMwh: 48.72, + source: { kind: 'synthetic-replay', sourceId: 'local-fixture-v1', quality: 'SIMULATED' }, + sourceSequence: 1, + ...overrides, + }; +} + +test('rejects unauthenticated ingestion', () => { + const c = makeCollector(); + const r = c.ingest(baseEnvelope(), 'wrong'); + assert.strictEqual(r.accepted, false); + assert.strictEqual(r.reason, 'UNAUTHENTICATED'); +}); + +test('rejects control fields outright (no command path)', () => { + const c = makeCollector(); + const r = c.ingest(baseEnvelope({ command: 'PRE_COOL_TO_14C' }), TOKEN); + assert.strictEqual(r.accepted, false); + assert.strictEqual(r.reason, 'CONTROL_FIELD_PROHIBITED'); +}); + +test('rejects stringly-typed and null measurements', () => { + const c = makeCollector(); + let r = c.ingest(baseEnvelope({ loadMw: 'high' }), TOKEN); + assert.strictEqual(r.accepted, false); + assert.strictEqual(r.reason, 'NON_NUMERIC_FIELD'); + r = c.ingest(baseEnvelope({ spotPriceUsdPerMwh: null, siteImportKw: undefined, gpuPowerKw: undefined, coolingPowerKw: undefined, otherPowerKw: undefined }), TOKEN); + assert.strictEqual(r.accepted, false); +}); + +test('rejects LIVE mode declared by synthetic source', () => { + const c = makeCollector(); + const r = c.ingest(baseEnvelope({ environment: 'LIVE_READ_ONLY' }), TOKEN); + assert.strictEqual(r.accepted, false); + assert.strictEqual(r.reason, 'MODE_MISMATCH'); +}); + +test('rejects AUTHORIZED_LOCAL_CONTROL (not implemented)', () => { + const c = makeCollector(); + const r = c.ingest(baseEnvelope({ environment: 'AUTHORIZED_LOCAL_CONTROL' }), TOKEN); + assert.strictEqual(r.accepted, false); + assert.strictEqual(r.reason, 'BAD_ENVIRONMENT'); +}); + +test('rejects substationId-only payloads as mislabeled assets', () => { + const c = makeCollector(); + const env = baseEnvelope(); delete env.siteId; + env.substationId = 'ERCOT Alpha'; + const r = c.ingest(env, TOKEN); + assert.strictEqual(r.accepted, false); + assert.strictEqual(r.reason, 'MISLABELD_ASSET'); +}); + +test('rejects unknown sites, bad intervals, future timestamps, missing provenance', () => { + const c = makeCollector(); + assert.strictEqual(c.ingest(baseEnvelope({ siteId: 'nope' }), TOKEN).reason, 'UNKNOWN_SITE'); + assert.strictEqual(c.ingest(baseEnvelope({ intervalSeconds: 7 }), TOKEN).reason, 'BAD_INTERVAL'); + // The default test source is a replay source (skew bound exempt); use a live + // meter identity to verify the clock-skew rule applies to non-replay sources. + const liveAuth = { verify: t => (t === TOKEN ? { id: 'rack-pdu-01', kind: 'live-meter' } : null) }; + const registry2 = new AssetRegistry(); + registry2.register({ siteId: 'owned-compute-lab-01', owner: 'steward', authorizedSources: ['rack-pdu-01'] }); + const c2 = new Collector({ registry: registry2, auth: liveAuth }); + const env = baseEnvelope({ + environment: 'LIVE_READ_ONLY', + observedAtUtc: new Date(Date.now() + 3600e3).toISOString(), + source: { kind: 'pdu', sourceId: 'rack-pdu-01', quality: 'MEASURED' }, + }); + assert.strictEqual(c2.ingest(env, TOKEN).reason, 'FUTURE_DATED'); + const env3 = baseEnvelope(); delete env3.source; + assert.strictEqual(c.ingest(env3, TOKEN).reason, 'MISSING_PROVENANCE'); +}); + +test('enforces monotonic source sequence and idempotent retry', () => { + const c = makeCollector(); + // Fixed timestamp so the seq-2 envelope and its retry are byte-identical. + const t = new Date().toISOString(); + assert.strictEqual(c.ingest(baseEnvelope({ sourceSequence: 2, observedAtUtc: t }), TOKEN).accepted, true); + assert.strictEqual(c.ingest(baseEnvelope({ sourceSequence: 1, observedAtUtc: t }), TOKEN).reason, 'NON_MONOTONIC_SEQUENCE'); + // exact duplicate of seq 2 (same payload) -> idempotent duplicate, not error + const dup = c.ingest(baseEnvelope({ sourceSequence: 2, observedAtUtc: t }), TOKEN); + assert.strictEqual(dup.accepted, true); + assert.strictEqual(dup.duplicate, true); + assert.strictEqual(c.raw.length, 1); +}); + +test('accepts a valid simulation envelope and stores raw immutably with mode tag', () => { + const c = makeCollector(); + const r = c.ingest(baseEnvelope(), TOKEN); + assert.strictEqual(r.accepted, true); + assert.strictEqual(c.raw[0]._ingest.environment, 'SIMULATION'); + assert.throws(() => { c.raw[0].siteImportKw = 99; }, TypeError); // frozen record +}); + +// ---- forecast tests ----------------------------------------------------------- +function synthSeries(n = 120) { + const rows = []; + for (let i = 0; i < n; i++) { + const price = 50 + 5 * Math.sin(i / 6) + ((i * 37) % 11) - 5; // deterministic pseudo-noise + rows.push({ + bucketStartUtc: new Date(1700000000000 + i * 900000).toISOString(), + samples: 15, meanLoadKw: 12 + Math.sin(i / 9), projectedSolarMw: 0.02, + meanPriceUsdPerMwh: price, + }); + } + return rows; +} + +test('withholds forecast below 96-interval history threshold', () => { + const fc = forecast(synthSeries(40)); + assert.strictEqual(fc.point, null); + assert.strictEqual(fc.status, 'INSUFFICIENT_HISTORY'); + assert.ok(/Forecast withheld/.test(fc.message)); +}); + +test('produces point estimate with 95% prediction interval when history suffices', () => { + const fc = forecast(synthSeries(120)); + assert.ok(Number.isFinite(fc.point)); + assert.strictEqual(fc.interval.length, 2); + assert.ok(fc.interval[0] < fc.point && fc.point < fc.interval[1]); + assert.ok(fc.windowIntervals >= 96); +}); + +test('aggregation buckets 1-minute samples into aligned 15-minute intervals', () => { + const c = makeCollector(); + const t0 = Math.floor(Date.now() / 900000) * 900000; + for (let m = 0; m < 15; m++) { + const ok = c.ingest(baseEnvelope({ + intervalSeconds: 60, + observedAtUtc: new Date(t0 + m * 60000).toISOString(), + sourceSequence: m + 1, + }), TOKEN); + assert.strictEqual(ok.accepted, true, JSON.stringify(ok)); + } + const series = aggregate15min(c.raw, 'owned-compute-lab-01'); + assert.strictEqual(series.length, 1); + assert.strictEqual(series[0].samples, 15); +}); + +test('backtest reports MAE/RMSE/bias/coverage and persistence benchmark', () => { + const bt = backtest(synthSeries(140), { window: 96, steps: 20 }); + assert.ok(bt.evaluatedSteps > 0); + assert.ok(Number.isFinite(bt.ols.mae)); + assert.ok(Number.isFinite(bt.persistenceBenchmark.mae)); + assert.ok(bt.ols.intervalCoverage95 >= 0 && bt.ols.intervalCoverage95 <= 1); +}); + +test('recommendations are advisory text only', () => { + const rec = recommend(synthSeries(120), forecast(synthSeries(120))); + assert.match(rec, /Advisory only|could be/i); + assert.doesNotMatch(rec, /\b(PRE_COOL|DISPATCH|START|STOP|BID)\b/); + const empty = recommend([], forecast([])); + assert.match(empty, /96 valid 15-minute observations|withheld/i); +}); diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..836bbe7 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,41 @@ +{ + // Visit https://aka.ms/tsconfig to read more about this file + "compilerOptions": { + // File Layout + "rootDir": "./", + "outDir": "./dist", + + // Environment Settings + // See also https://aka.ms/tsconfig/module + "module": "nodenext", + "target": "esnext", + "lib": ["esnext"], + "types": ["node"], + + // Other Outputs + "sourceMap": true, + "declaration": true, + "declarationMap": true, + + // Stricter Typechecking Options + "noUncheckedIndexedAccess": true, + "exactOptionalPropertyTypes": true, + + // Style Options + // "noImplicitReturns": true, + // "noImplicitOverride": true, + // "noUnusedLocals": true, + // "noUnusedParameters": true, + // "noFallthroughCasesInSwitch": true, + // "noPropertyAccessFromIndexSignature": true, + + // Recommended Options + "strict": true, + "jsx": "react-jsx", + "verbatimModuleSyntax": false, + "isolatedModules": true, + "noUncheckedSideEffectImports": true, + "moduleDetection": "force", + "skipLibCheck": true, + } +}