@code-yeongyu/senpi 2026.6.4 → 2026.6.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +64 -1
- package/README.md +127 -110
- package/dist/bun/cli.d.ts.map +1 -1
- package/dist/bun/cli.js.map +1 -1
- package/dist/bun/register-bedrock.d.ts.map +1 -1
- package/dist/bun/restore-sandbox-env.d.ts.map +1 -1
- package/dist/bun/restore-sandbox-env.js.map +1 -1
- package/dist/cli/args.d.ts +1 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +13 -4
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/config-selector.d.ts.map +1 -1
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/cli/file-processor.d.ts.map +1 -1
- package/dist/cli/file-processor.js.map +1 -1
- package/dist/cli/initial-message.d.ts +1 -1
- package/dist/cli/initial-message.d.ts.map +1 -1
- package/dist/cli/initial-message.js.map +1 -1
- package/dist/cli/list-models.d.ts.map +1 -1
- package/dist/cli/list-models.js.map +1 -1
- package/dist/cli/project-trust.d.ts +10 -0
- package/dist/cli/project-trust.d.ts.map +1 -0
- package/dist/cli/project-trust.js +48 -0
- package/dist/cli/project-trust.js.map +1 -0
- package/dist/cli/session-picker.d.ts.map +1 -1
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/cli/startup-ui.d.ts +7 -0
- package/dist/cli/startup-ui.d.ts.map +1 -0
- package/dist/cli/startup-ui.js +59 -0
- package/dist/cli/startup-ui.js.map +1 -0
- package/dist/cli-main.d.ts.map +1 -1
- package/dist/cli-main.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +10 -1
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts +3 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +4 -9
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +2 -1
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +2 -2
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +33 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +57 -79
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-guidance.d.ts.map +1 -1
- package/dist/core/auth-guidance.js.map +1 -1
- package/dist/core/auth-storage.d.ts +4 -0
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +4 -8
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/index.d.ts.map +1 -1
- package/dist/core/compaction/utils.d.ts +1 -1
- package/dist/core/compaction/utils.d.ts.map +1 -1
- package/dist/core/compaction/utils.js +1 -1
- package/dist/core/compaction/utils.js.map +1 -1
- package/dist/core/defaults.d.ts.map +1 -1
- package/dist/core/diagnostics.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/build.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/build.js.map +1 -1
- package/dist/core/dynamic-prompt/exploration.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/exploration.js.map +1 -1
- package/dist/core/dynamic-prompt/identity.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/identity.js.map +1 -1
- package/dist/core/dynamic-prompt/index.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/intent-gate.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/intent-gate.js.map +1 -1
- package/dist/core/dynamic-prompt/parallel-tools.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/parallel-tools.js.map +1 -1
- package/dist/core/dynamic-prompt/policies.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/policies.js.map +1 -1
- package/dist/core/dynamic-prompt/style.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/style.js.map +1 -1
- package/dist/core/dynamic-prompt/tool-categorization.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/tool-categorization.js.map +1 -1
- package/dist/core/dynamic-prompt/tool-section.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/tool-section.js.map +1 -1
- package/dist/core/dynamic-prompt/types.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/verification.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/verification.js.map +1 -1
- package/dist/core/event-bus.d.ts.map +1 -1
- package/dist/core/event-bus.js.map +1 -1
- package/dist/core/exec.d.ts.map +1 -1
- package/dist/core/exec.js.map +1 -1
- package/dist/core/experimental.d.ts +2 -0
- package/dist/core/experimental.d.ts.map +1 -0
- package/dist/core/experimental.js +4 -0
- package/dist/core/experimental.js.map +1 -0
- package/dist/core/export-html/ansi-to-html.d.ts.map +1 -1
- package/dist/core/export-html/ansi-to-html.js.map +1 -1
- package/dist/core/export-html/index.d.ts.map +1 -1
- package/dist/core/export-html/index.js.map +1 -1
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
- package/dist/core/export-html/tool-renderer.js.map +1 -1
- package/dist/core/extensions/builtin/anthropic-bash/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/anthropic-bash/index.js.map +1 -1
- package/dist/core/extensions/builtin/anthropic-web-search/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/anthropic-web-search/index.js.map +1 -1
- package/dist/core/extensions/builtin/bash-timeout/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/bash-timeout/index.js.map +1 -1
- package/dist/core/extensions/builtin/bash-timeout/timeout.d.ts.map +1 -1
- package/dist/core/extensions/builtin/bash-timeout/timeout.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/checkpoint-state.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/checkpoint-state.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/circuit-breaker.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/circuit-breaker.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/context-reduction.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/context-reduction.js +1 -1
- package/dist/core/extensions/builtin/compaction/context-reduction.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/degradation-monitor.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/degradation-monitor.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/index.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/openai-remote.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/openai-remote.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/overflow-detection.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/overflow-detection.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/per-turn-cap.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/per-turn-cap.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/policy.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/policy.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/prompts.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/prompts.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/repair-tool-pairs.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/repair-tool-pairs.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/restoration-tracker.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/restoration-tracker.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/speculative.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/speculative.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/state.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/state.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/todo-bridge.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/todo-bridge.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/tool-truncation.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/tool-truncation.js.map +1 -1
- package/dist/core/extensions/builtin/diff.d.ts.map +1 -1
- package/dist/core/extensions/builtin/diff.js.map +1 -1
- package/dist/core/extensions/builtin/files.d.ts.map +1 -1
- package/dist/core/extensions/builtin/files.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/apply.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/apply.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/constants.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/constants.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/errors.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/errors.js +0 -2
- package/dist/core/extensions/builtin/gpt-apply-patch/errors.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/extension.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/extension.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/params.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/params.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/parser.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/parser.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/patch-diff.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/patch-diff.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/patch-replace.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/patch-replace.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/preview-format.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/preview-format.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/preview.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/preview.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/seek-sequence.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/seek-sequence.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/streaming-parser.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/streaming-parser.js +7 -5
- package/dist/core/extensions/builtin/gpt-apply-patch/streaming-parser.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/streaming-render.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/streaming-render.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/text.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/text.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/tool.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/tool.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/types.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/workspace.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/workspace.js.map +1 -1
- package/dist/core/extensions/builtin/history-search/filter.d.ts.map +1 -1
- package/dist/core/extensions/builtin/history-search/filter.js.map +1 -1
- package/dist/core/extensions/builtin/history-search/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/history-search/index.js.map +1 -1
- package/dist/core/extensions/builtin/history-search/indexer.d.ts.map +1 -1
- package/dist/core/extensions/builtin/history-search/indexer.js.map +1 -1
- package/dist/core/extensions/builtin/history-search/overlay.d.ts.map +1 -1
- package/dist/core/extensions/builtin/history-search/overlay.js +3 -6
- package/dist/core/extensions/builtin/history-search/overlay.js.map +1 -1
- package/dist/core/extensions/builtin/history-search/types.d.ts.map +1 -1
- package/dist/core/extensions/builtin/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/kimi-web-search/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/kimi-web-search/index.js.map +1 -1
- package/dist/core/extensions/builtin/openai-web-search/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/openai-web-search/index.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/arity.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/arity.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/cli.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/cli.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/config.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/config.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/evaluate.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/evaluate.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/events.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/events.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/external-dir.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/external-dir.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/index.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/non-interactive.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/non-interactive.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/parsers.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/parsers.js +3 -1
- package/dist/core/extensions/builtin/permission-system/parsers.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/prompt.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/prompt.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/service.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/service.js +2 -5
- package/dist/core/extensions/builtin/permission-system/service.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/settings.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/settings.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/storage.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/storage.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/types.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/types.js +3 -5
- package/dist/core/extensions/builtin/permission-system/types.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/wildcard.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/wildcard.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-5.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-5.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-6.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-6.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-7.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-7.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/file-operations.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/file-operations.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.2.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.2.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.3-codex.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.3-codex.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.4.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.4.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.5.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.5.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/index.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/kimi-k2-6.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/kimi-k2-6.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/presets.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/presets.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/settings.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/settings.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-url-widget.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-url-widget.js.map +1 -1
- package/dist/core/extensions/builtin/redraws.d.ts.map +1 -1
- package/dist/core/extensions/builtin/redraws.js.map +1 -1
- package/dist/core/extensions/builtin/service-tier.d.ts.map +1 -1
- package/dist/core/extensions/builtin/service-tier.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/index.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/loader.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/loader.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/overlay-format.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/overlay-format.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/overlay.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/overlay.js +13 -18
- package/dist/core/extensions/builtin/session-observer/overlay.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/scanner.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/scanner.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/text.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/text.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/transcript-entries.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/transcript-entries.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/transcript-format.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/transcript-format.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/transcript.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/transcript.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/types.d.ts.map +1 -1
- package/dist/core/extensions/builtin/system-messages.d.ts.map +1 -1
- package/dist/core/extensions/builtin/system-messages.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/index.js +0 -2
- package/dist/core/extensions/builtin/todotools/index.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/prompt.d.ts +1 -1
- package/dist/core/extensions/builtin/todotools/prompt.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/prompt.js +0 -2
- package/dist/core/extensions/builtin/todotools/prompt.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/state.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/state.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/tools/todoread.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/tools/todoread.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/tools/todowrite.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/tools/todowrite.js.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/index.js.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.d.ts.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.js.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-openai-chat-completions-payload.d.ts.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-openai-chat-completions-payload.js.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-openai-responses-payload.d.ts.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-openai-responses-payload.js.map +1 -1
- package/dist/core/extensions/builtin/tps.d.ts.map +1 -1
- package/dist/core/extensions/builtin/tps.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +4 -4
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +7 -2
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +69 -43
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +22 -2
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/extensions/wrapper.d.ts.map +1 -1
- package/dist/core/extensions/wrapper.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +17 -18
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/http-dispatcher.d.ts.map +1 -1
- package/dist/core/http-dispatcher.js.map +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/keybindings.d.ts +1 -1
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +0 -1
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js.map +1 -1
- package/dist/core/model-registry.d.ts +3 -1
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +30 -13
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/output-guard.d.ts.map +1 -1
- package/dist/core/output-guard.js.map +1 -1
- package/dist/core/package-manager.d.ts +1 -0
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +25 -13
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/project-trust.d.ts +15 -0
- package/dist/core/project-trust.d.ts.map +1 -0
- package/dist/core/project-trust.js +58 -0
- package/dist/core/project-trust.js.map +1 -0
- package/dist/core/prompt-templates.d.ts +2 -1
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js +24 -26
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/provider-attribution.d.ts.map +1 -1
- package/dist/core/provider-attribution.js.map +1 -1
- package/dist/core/provider-display-names.d.ts.map +1 -1
- package/dist/core/resolve-config-value.d.ts.map +1 -1
- package/dist/core/resolve-config-value.js.map +1 -1
- package/dist/core/resource-loader.d.ts +14 -2
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +117 -74
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-cwd.d.ts.map +1 -1
- package/dist/core/session-cwd.js +0 -1
- package/dist/core/session-cwd.js.map +1 -1
- package/dist/core/session-manager.d.ts +3 -0
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +41 -28
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/session-resident-store.d.ts +16 -0
- package/dist/core/session-resident-store.d.ts.map +1 -0
- package/dist/core/session-resident-store.js +48 -0
- package/dist/core/session-resident-store.js.map +1 -0
- package/dist/core/session-work-barrier.d.ts.map +1 -1
- package/dist/core/session-work-barrier.js +5 -3
- package/dist/core/session-work-barrier.js.map +1 -1
- package/dist/core/settings-manager.d.ts +14 -2
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +86 -46
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +1 -0
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/source-info.d.ts.map +1 -1
- package/dist/core/source-info.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/telemetry.d.ts.map +1 -1
- package/dist/core/telemetry.js.map +1 -1
- package/dist/core/thinking-levels.d.ts.map +1 -1
- package/dist/core/thinking-levels.js.map +1 -1
- package/dist/core/timings.d.ts.map +1 -1
- package/dist/core/timings.js.map +1 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +9 -6
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/diff-render.d.ts.map +1 -1
- package/dist/core/tools/diff-render.js.map +1 -1
- package/dist/core/tools/edit-diff.d.ts.map +1 -1
- package/dist/core/tools/edit-diff.js.map +1 -1
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/file-mutation-queue.d.ts.map +1 -1
- package/dist/core/tools/file-mutation-queue.js.map +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +1 -1
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +1 -1
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +1 -1
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/output-accumulator.d.ts.map +1 -1
- package/dist/core/tools/output-accumulator.js +12 -18
- package/dist/core/tools/output-accumulator.js.map +1 -1
- package/dist/core/tools/path-utils.d.ts.map +1 -1
- package/dist/core/tools/path-utils.js.map +1 -1
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +1 -1
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
- package/dist/core/tools/truncate.d.ts.map +1 -1
- package/dist/core/tools/truncate.js.map +1 -1
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +1 -2
- package/dist/core/tools/write.js.map +1 -1
- package/dist/core/trust-manager.d.ts +31 -0
- package/dist/core/trust-manager.d.ts.map +1 -0
- package/dist/core/trust-manager.js +186 -0
- package/dist/core/trust-manager.js.map +1 -0
- package/dist/index.d.ts +5 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +101 -86
- package/dist/main.js.map +1 -1
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js +39 -34
- package/dist/migrations.js.map +1 -1
- package/dist/modes/index.d.ts +1 -1
- package/dist/modes/index.d.ts.map +1 -1
- package/dist/modes/index.js.map +1 -1
- package/dist/modes/interactive/components/armin.d.ts.map +1 -1
- package/dist/modes/interactive/components/armin.js +6 -10
- package/dist/modes/interactive/components/armin.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +2 -11
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js +6 -11
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.js +0 -3
- package/dist/modes/interactive/components/bordered-loader.js.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.js +1 -3
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.js +1 -3
- package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/config-selector.js +5 -15
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -1
- package/dist/modes/interactive/components/countdown-timer.js +0 -5
- package/dist/modes/interactive/components/countdown-timer.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +1 -8
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +1 -6
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/daxnuts.d.ts.map +1 -1
- package/dist/modes/interactive/components/daxnuts.js +6 -8
- package/dist/modes/interactive/components/daxnuts.js.map +1 -1
- package/dist/modes/interactive/components/diff.d.ts.map +1 -1
- package/dist/modes/interactive/components/diff.js +2 -2
- package/dist/modes/interactive/components/diff.js.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.js +0 -1
- package/dist/modes/interactive/components/dynamic-border.js.map +1 -1
- package/dist/modes/interactive/components/earendil-announcement.d.ts.map +1 -1
- package/dist/modes/interactive/components/earendil-announcement.js.map +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-editor.js +1 -6
- package/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/dist/modes/interactive/components/extension-input.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-input.js +2 -8
- package/dist/modes/interactive/components/extension-input.js.map +1 -1
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-selector.js +1 -9
- package/dist/modes/interactive/components/extension-selector.js.map +1 -1
- package/dist/modes/interactive/components/favorite-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/favorite-models-selector.js +9 -15
- package/dist/modes/interactive/components/favorite-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +10 -3
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +1 -0
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js +1 -0
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts +1 -0
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +10 -10
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/model-favorites.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-favorites.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +9 -22
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +3 -12
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +33 -58
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +3 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +20 -4
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/show-images-selector.js +0 -1
- package/dist/modes/interactive/components/show-images-selector.js.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.js +1 -3
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
- package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/theme-selector.js +0 -2
- package/dist/modes/interactive/components/theme-selector.js.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.js +0 -1
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +35 -32
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector.js +18 -32
- package/dist/modes/interactive/components/tree-selector.js.map +1 -1
- package/dist/modes/interactive/components/trust-selector.d.ts +23 -0
- package/dist/modes/interactive/components/trust-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/trust-selector.js +85 -0
- package/dist/modes/interactive/components/trust-selector.js.map +1 -0
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.js +3 -6
- package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +0 -1
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +39 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +264 -114
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/session-info-format.d.ts.map +1 -1
- package/dist/modes/interactive/session-info-format.js.map +1 -1
- package/dist/modes/interactive/startup-tools.d.ts.map +1 -1
- package/dist/modes/interactive/startup-tools.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +0 -6
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/interactive/working-status.d.ts +2 -0
- package/dist/modes/interactive/working-status.d.ts.map +1 -1
- package/dist/modes/interactive/working-status.js +34 -0
- package/dist/modes/interactive/working-status.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/provider-native-rendering.d.ts.map +1 -1
- package/dist/modes/provider-native-rendering.js.map +1 -1
- package/dist/modes/rpc/jsonl.d.ts.map +1 -1
- package/dist/modes/rpc/jsonl.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +7 -8
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/package-manager-cli.d.ts +6 -2
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +105 -11
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/self-update-bootstrap.d.ts.map +1 -1
- package/dist/self-update-bootstrap.js.map +1 -1
- package/dist/senpi +10 -1
- package/dist/utils/ansi.d.ts.map +1 -1
- package/dist/utils/ansi.js.map +1 -1
- package/dist/utils/changelog.d.ts +1 -0
- package/dist/utils/changelog.d.ts.map +1 -1
- package/dist/utils/changelog.js +78 -0
- package/dist/utils/changelog.js.map +1 -1
- package/dist/utils/child-process.d.ts.map +1 -1
- package/dist/utils/child-process.js.map +1 -1
- package/dist/utils/clipboard-image.d.ts.map +1 -1
- package/dist/utils/clipboard-image.js.map +1 -1
- package/dist/utils/clipboard-native.d.ts.map +1 -1
- package/dist/utils/clipboard-native.js.map +1 -1
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/deprecation.d.ts.map +1 -1
- package/dist/utils/deprecation.js.map +1 -1
- package/dist/utils/exif-orientation.d.ts.map +1 -1
- package/dist/utils/exif-orientation.js.map +1 -1
- package/dist/utils/frontmatter.d.ts.map +1 -1
- package/dist/utils/frontmatter.js.map +1 -1
- package/dist/utils/fs-watch.d.ts.map +1 -1
- package/dist/utils/fs-watch.js.map +1 -1
- package/dist/utils/git.d.ts.map +1 -1
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/html.d.ts.map +1 -1
- package/dist/utils/html.js.map +1 -1
- package/dist/utils/image-convert.d.ts.map +1 -1
- package/dist/utils/image-convert.js.map +1 -1
- package/dist/utils/image-resize-core.d.ts.map +1 -1
- package/dist/utils/image-resize-core.js.map +1 -1
- package/dist/utils/image-resize-worker.d.ts.map +1 -1
- package/dist/utils/image-resize-worker.js.map +1 -1
- package/dist/utils/image-resize.d.ts.map +1 -1
- package/dist/utils/image-resize.js.map +1 -1
- package/dist/utils/json.d.ts.map +1 -1
- package/dist/utils/json.js.map +1 -1
- package/dist/utils/mime.d.ts.map +1 -1
- package/dist/utils/mime.js.map +1 -1
- package/dist/utils/open-browser.d.ts.map +1 -1
- package/dist/utils/open-browser.js.map +1 -1
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/photon.d.ts.map +1 -1
- package/dist/utils/photon.js.map +1 -1
- package/dist/utils/pi-user-agent.d.ts.map +1 -1
- package/dist/utils/pi-user-agent.js.map +1 -1
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/sleep.d.ts.map +1 -1
- package/dist/utils/sleep.js.map +1 -1
- package/dist/utils/syntax-highlight.d.ts.map +1 -1
- package/dist/utils/syntax-highlight.js.map +1 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js.map +1 -1
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js.map +1 -1
- package/dist/utils/windows-self-update.d.ts.map +1 -1
- package/dist/utils/windows-self-update.js.map +1 -1
- package/docs/docs.json +4 -0
- package/docs/extensions.md +31 -2
- package/docs/index.md +1 -0
- package/docs/models.md +6 -39
- package/docs/packages.md +1 -1
- package/docs/prompt-templates.md +9 -2
- package/docs/sdk.md +5 -0
- package/docs/security.md +55 -0
- package/docs/settings.md +13 -0
- package/docs/skills.md +3 -3
- package/docs/terminal-setup.md +36 -2
- package/docs/themes.md +1 -1
- package/docs/tmux.md +4 -2
- package/docs/usage.md +18 -1
- package/examples/extensions/README.md +1 -0
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/minimal-mode.ts +6 -6
- package/examples/extensions/project-trust.ts +64 -0
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +125 -77
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts +7 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.js +2 -27
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +7 -20
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/utils.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/utils.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +0 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.js +0 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.js +0 -7
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.js +3 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.js +0 -5
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/uuid.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/uuid.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/system-prompt.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/system-prompt.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js +0 -16
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/node.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +6 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/package.json +6 -6
- package/node_modules/@earendil-works/pi-ai/README.md +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/api-registry.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api-registry.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/bedrock-provider.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/cli.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/cli.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/image-models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts +30 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +30 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/image-models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/images-api-registry.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/images-api-registry.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/images.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/images.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +533 -131
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +530 -255
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/oauth.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js +15 -7
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.d.ts +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js +17 -7
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot-headers.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot-headers.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-shared.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-shared.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/openrouter.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/openrouter.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/register-builtins.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/register-builtins.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.js +3 -3
- package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js +0 -7
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js +5 -4
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-prompt-cache.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-prompt-cache.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js +3 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/register-builtins.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/register-builtins.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.d.ts +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.js +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/transform-messages.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/transform-messages.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/session-resources.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/session-resources.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/stream.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/stream.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/context-transformer.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/context-transformer.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/gemma4.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/gemma4.js +10 -8
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/gemma4.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/hermes.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/hermes.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/json-mix.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/json-mix.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/morph-xml.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/morph-xml.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/xml-tool-tag-scanner.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/xml-tool-tag-scanner.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/yaml-xml.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/yaml-xml.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/stream-wrapper.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/stream-wrapper.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +6 -2
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/abort-signals.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/abort-signals.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/diagnostics.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/diagnostics.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js +3 -7
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/hash.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/hash.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/headers.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/headers.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/json-parse.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/json-parse.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/node-http-proxy.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/node-http-proxy.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/anthropic.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/anthropic.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/device-code.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/device-code.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/oauth-page.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/oauth-page.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/pkce.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/pkce.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/sanitize-unicode.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/sanitize-unicode.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/tool-pair-repair.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/tool-pair-repair.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/typebox-helpers.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/typebox-helpers.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/validation.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/validation.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/package.json +5 -5
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts +3 -1
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js +0 -3
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/box.js +1 -6
- package/node_modules/@earendil-works/pi-tui/dist/components/box.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.js +4 -3
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +6 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +132 -93
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/image.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/image.js +0 -8
- package/node_modules/@earendil-works/pi-tui/dist/components/image.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/input.js +14 -14
- package/node_modules/@earendil-works/pi-tui/dist/components/input.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts +5 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.js +29 -17
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +0 -11
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js +4 -9
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +4 -12
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.js +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/text.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/text.js +0 -8
- package/node_modules/@earendil-works/pi-tui/dist/components/text.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.js +0 -3
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/editor-component.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js +131 -61
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js +2 -4
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keys.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keys.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.js +3 -1
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/slash-command-autocomplete.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/slash-command-autocomplete.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js +4 -6
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +4 -7
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js +60 -103
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.js +39 -31
- package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.js +3 -1
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.js +57 -27
- package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/word-navigation.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/word-navigation.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/node_modules/@types/node/README.md +3 -3
- package/node_modules/@types/node/assert/strict.d.ts +3 -55
- package/node_modules/@types/node/assert.d.ts +49 -177
- package/node_modules/@types/node/async_hooks.d.ts +151 -43
- package/node_modules/@types/node/buffer.buffer.d.ts +2 -8
- package/node_modules/@types/node/buffer.d.ts +43 -212
- package/node_modules/@types/node/child_process.d.ts +23 -133
- package/node_modules/@types/node/cluster.d.ts +238 -384
- package/node_modules/@types/node/compatibility/iterators.d.ts +1 -0
- package/node_modules/@types/node/console.d.ts +45 -404
- package/node_modules/@types/node/constants.d.ts +3 -10
- package/node_modules/@types/node/crypto.d.ts +640 -1127
- package/node_modules/@types/node/dgram.d.ts +14 -77
- package/node_modules/@types/node/diagnostics_channel.d.ts +3 -29
- package/node_modules/@types/node/dns/promises.d.ts +4 -10
- package/node_modules/@types/node/dns.d.ts +130 -177
- package/node_modules/@types/node/domain.d.ts +12 -32
- package/node_modules/@types/node/events.d.ts +872 -840
- package/node_modules/@types/node/fs/promises.d.ts +193 -20
- package/node_modules/@types/node/fs.d.ts +754 -435
- package/node_modules/@types/node/globals.d.ts +8 -30
- package/node_modules/@types/node/globals.typedarray.d.ts +63 -0
- package/node_modules/@types/node/http.d.ts +363 -305
- package/node_modules/@types/node/http2.d.ts +545 -781
- package/node_modules/@types/node/https.d.ts +64 -243
- package/node_modules/@types/node/index.d.ts +26 -6
- package/node_modules/@types/node/inspector/promises.d.ts +35 -0
- package/node_modules/@types/node/inspector.d.ts +68 -57
- package/node_modules/@types/node/inspector.generated.d.ts +764 -410
- package/node_modules/@types/node/module.d.ts +53 -189
- package/node_modules/@types/node/net.d.ts +101 -207
- package/node_modules/@types/node/os.d.ts +11 -19
- package/node_modules/@types/node/package.json +13 -3
- package/node_modules/@types/node/path/posix.d.ts +8 -0
- package/node_modules/@types/node/path/win32.d.ts +8 -0
- package/node_modules/@types/node/path.d.ts +119 -141
- package/node_modules/@types/node/perf_hooks.d.ts +317 -673
- package/node_modules/@types/node/process.d.ts +277 -157
- package/node_modules/@types/node/punycode.d.ts +3 -31
- package/node_modules/@types/node/querystring.d.ts +3 -16
- package/node_modules/@types/node/quic.d.ts +897 -0
- package/node_modules/@types/node/readline/promises.d.ts +3 -6
- package/node_modules/@types/node/readline.d.ts +65 -152
- package/node_modules/@types/node/repl.d.ts +101 -109
- package/node_modules/@types/node/sea.d.ts +9 -115
- package/node_modules/@types/node/sqlite.d.ts +415 -68
- package/node_modules/@types/node/stream/consumers.d.ts +91 -15
- package/node_modules/@types/node/stream/iter.d.ts +301 -0
- package/node_modules/@types/node/stream/promises.d.ts +136 -15
- package/node_modules/@types/node/stream/web.d.ts +179 -501
- package/node_modules/@types/node/stream.d.ts +577 -490
- package/node_modules/@types/node/string_decoder.d.ts +3 -43
- package/node_modules/@types/node/test/reporters.d.ts +59 -0
- package/node_modules/@types/node/test.d.ts +402 -286
- package/node_modules/@types/node/timers/promises.d.ts +3 -18
- package/node_modules/@types/node/timers.d.ts +3 -141
- package/node_modules/@types/node/tls.d.ts +115 -241
- package/node_modules/@types/node/trace_events.d.ts +3 -97
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +2 -8
- package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +2 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +28 -6
- package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
- package/node_modules/@types/node/ts5.7/index.d.ts +119 -0
- package/node_modules/@types/node/tty.d.ts +57 -40
- package/node_modules/@types/node/url.d.ts +156 -584
- package/node_modules/@types/node/util/types.d.ts +558 -0
- package/node_modules/@types/node/util.d.ts +167 -1096
- package/node_modules/@types/node/v8.d.ts +75 -15
- package/node_modules/@types/node/vm.d.ts +334 -198
- package/node_modules/@types/node/wasi.d.ts +24 -74
- package/node_modules/@types/node/web-globals/abortcontroller.d.ts +27 -2
- package/node_modules/@types/node/web-globals/blob.d.ts +23 -0
- package/node_modules/@types/node/web-globals/console.d.ts +9 -0
- package/node_modules/@types/node/web-globals/crypto.d.ts +39 -0
- package/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
- package/node_modules/@types/node/web-globals/events.d.ts +9 -0
- package/node_modules/@types/node/web-globals/fetch.d.ts +14 -0
- package/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
- package/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
- package/node_modules/@types/node/web-globals/navigator.d.ts +3 -0
- package/node_modules/@types/node/web-globals/performance.d.ts +45 -0
- package/node_modules/@types/node/web-globals/streams.d.ts +115 -0
- package/node_modules/@types/node/web-globals/timers.d.ts +44 -0
- package/node_modules/@types/node/web-globals/url.d.ts +24 -0
- package/node_modules/@types/node/worker_threads.d.ts +280 -393
- package/node_modules/@types/node/zlib/iter.d.ts +131 -0
- package/node_modules/@types/node/zlib.d.ts +7 -165
- package/node_modules/undici-types/agent.d.ts +13 -12
- package/node_modules/undici-types/api.d.ts +26 -26
- package/node_modules/undici-types/balanced-pool.d.ts +13 -12
- package/node_modules/undici-types/cache-interceptor.d.ts +179 -0
- package/node_modules/undici-types/client-stats.d.ts +15 -0
- package/node_modules/undici-types/client.d.ts +34 -19
- package/node_modules/undici-types/connector.d.ts +4 -2
- package/node_modules/undici-types/cookies.d.ts +2 -0
- package/node_modules/undici-types/diagnostics-channel.d.ts +18 -10
- package/node_modules/undici-types/dispatcher.d.ts +127 -104
- package/node_modules/undici-types/env-http-proxy-agent.d.ts +4 -3
- package/node_modules/undici-types/errors.d.ts +82 -54
- package/node_modules/undici-types/eventsource.d.ts +9 -4
- package/node_modules/undici-types/fetch.d.ts +22 -20
- package/node_modules/undici-types/formdata.d.ts +7 -7
- package/node_modules/undici-types/global-dispatcher.d.ts +4 -4
- package/node_modules/undici-types/global-origin.d.ts +5 -5
- package/node_modules/undici-types/h2c-client.d.ts +73 -0
- package/node_modules/undici-types/handlers.d.ts +8 -8
- package/node_modules/undici-types/header.d.ts +157 -1
- package/node_modules/undici-types/index.d.ts +67 -47
- package/node_modules/undici-types/interceptors.d.ts +71 -8
- package/node_modules/undici-types/mock-agent.d.ts +36 -18
- package/node_modules/undici-types/mock-call-history.d.ts +111 -0
- package/node_modules/undici-types/mock-client.d.ts +6 -4
- package/node_modules/undici-types/mock-errors.d.ts +3 -3
- package/node_modules/undici-types/mock-interceptor.d.ts +21 -20
- package/node_modules/undici-types/mock-pool.d.ts +6 -4
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/patch.d.ts +0 -4
- package/node_modules/undici-types/pool-stats.d.ts +8 -8
- package/node_modules/undici-types/pool.d.ts +15 -13
- package/node_modules/undici-types/proxy-agent.d.ts +5 -4
- package/node_modules/undici-types/readable.d.ts +19 -16
- package/node_modules/undici-types/retry-agent.d.ts +1 -1
- package/node_modules/undici-types/retry-handler.d.ts +19 -10
- package/node_modules/undici-types/round-robin-pool.d.ts +41 -0
- package/node_modules/undici-types/snapshot-agent.d.ts +109 -0
- package/node_modules/undici-types/socks5-proxy-agent.d.ts +25 -0
- package/node_modules/undici-types/util.d.ts +3 -3
- package/node_modules/undici-types/utility.d.ts +7 -0
- package/node_modules/undici-types/webidl.d.ts +148 -29
- package/node_modules/undici-types/websocket.d.ts +48 -10
- package/npm-shrinkwrap.json +21 -21
- package/package.json +13 -12
- package/dist/core/extensions/builtin/todotools/continuation/config.d.ts +0 -10
- package/dist/core/extensions/builtin/todotools/continuation/config.d.ts.map +0 -1
- package/dist/core/extensions/builtin/todotools/continuation/config.js +0 -33
- package/dist/core/extensions/builtin/todotools/continuation/config.js.map +0 -1
- package/dist/core/extensions/builtin/todotools/continuation/index.d.ts +0 -2
- package/dist/core/extensions/builtin/todotools/continuation/index.d.ts.map +0 -1
- package/dist/core/extensions/builtin/todotools/continuation/index.js +0 -2
- package/dist/core/extensions/builtin/todotools/continuation/index.js.map +0 -1
- package/dist/core/extensions/builtin/todotools/continuation/prompt.d.ts +0 -5
- package/dist/core/extensions/builtin/todotools/continuation/prompt.d.ts.map +0 -1
- package/dist/core/extensions/builtin/todotools/continuation/prompt.js +0 -34
- package/dist/core/extensions/builtin/todotools/continuation/prompt.js.map +0 -1
- package/dist/core/extensions/builtin/todotools/continuation/runtime.d.ts +0 -11
- package/dist/core/extensions/builtin/todotools/continuation/runtime.d.ts.map +0 -1
- package/dist/core/extensions/builtin/todotools/continuation/runtime.js +0 -201
- package/dist/core/extensions/builtin/todotools/continuation/runtime.js.map +0 -1
- package/dist/core/extensions/builtin/todotools/settings.d.ts +0 -6
- package/dist/core/extensions/builtin/todotools/settings.d.ts.map +0 -1
- package/dist/core/extensions/builtin/todotools/settings.js +0 -58
- package/dist/core/extensions/builtin/todotools/settings.js.map +0 -1
- package/dist/core/extensions/builtin/todotools/system-messages.d.ts +0 -34
- package/dist/core/extensions/builtin/todotools/system-messages.d.ts.map +0 -1
- package/dist/core/extensions/builtin/todotools/system-messages.js +0 -82
- package/dist/core/extensions/builtin/todotools/system-messages.js.map +0 -1
- package/node_modules/@types/node/compatibility/disposable.d.ts +0 -14
- package/node_modules/@types/node/compatibility/index.d.ts +0 -9
- package/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
- package/node_modules/undici-types/file.d.ts +0 -39
- package/node_modules/undici-types/filereader.d.ts +0 -54
|
@@ -1,49 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
* The `node:fs` module enables interacting with the file system in a
|
|
3
|
-
* way modeled on standard POSIX functions.
|
|
4
|
-
*
|
|
5
|
-
* To use the promise-based APIs:
|
|
6
|
-
*
|
|
7
|
-
* ```js
|
|
8
|
-
* import * as fs from 'node:fs/promises';
|
|
9
|
-
* ```
|
|
10
|
-
*
|
|
11
|
-
* To use the callback and sync APIs:
|
|
12
|
-
*
|
|
13
|
-
* ```js
|
|
14
|
-
* import * as fs from 'node:fs';
|
|
15
|
-
* ```
|
|
16
|
-
*
|
|
17
|
-
* All file system operations have synchronous, callback, and promise-based
|
|
18
|
-
* forms, and are accessible using both CommonJS syntax and ES6 Modules (ESM).
|
|
19
|
-
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/fs.js)
|
|
20
|
-
*/
|
|
21
|
-
declare module "fs" {
|
|
1
|
+
declare module "node:fs" {
|
|
22
2
|
import { NonSharedBuffer } from "node:buffer";
|
|
3
|
+
import { Abortable, EventEmitter, InternalEventEmitter } from "node:events";
|
|
4
|
+
import { FileHandle } from "node:fs/promises";
|
|
23
5
|
import * as stream from "node:stream";
|
|
24
|
-
import { Abortable, EventEmitter } from "node:events";
|
|
25
6
|
import { URL } from "node:url";
|
|
26
|
-
import * as promises from "node:fs/promises";
|
|
27
|
-
export { promises };
|
|
28
7
|
/**
|
|
29
8
|
* Valid types for path values in "fs".
|
|
30
9
|
*/
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
10
|
+
type PathLike = string | Buffer | URL;
|
|
11
|
+
type PathOrFileDescriptor = PathLike | number;
|
|
12
|
+
type TimeLike = string | number | Date;
|
|
13
|
+
type NoParamCallback = (err: NodeJS.ErrnoException | null) => void;
|
|
14
|
+
type BufferEncodingOption =
|
|
36
15
|
| "buffer"
|
|
37
16
|
| {
|
|
38
17
|
encoding: "buffer";
|
|
39
18
|
};
|
|
40
|
-
|
|
19
|
+
interface ObjectEncodingOptions {
|
|
41
20
|
encoding?: BufferEncoding | null | undefined;
|
|
42
21
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
22
|
+
type EncodingOption = ObjectEncodingOptions | BufferEncoding | undefined | null;
|
|
23
|
+
type OpenMode = number | string;
|
|
24
|
+
type Mode = number | string;
|
|
25
|
+
interface StatsBase<T> {
|
|
47
26
|
isFile(): boolean;
|
|
48
27
|
isDirectory(): boolean;
|
|
49
28
|
isBlockDevice(): boolean;
|
|
@@ -70,7 +49,7 @@ declare module "fs" {
|
|
|
70
49
|
ctime: Date;
|
|
71
50
|
birthtime: Date;
|
|
72
51
|
}
|
|
73
|
-
|
|
52
|
+
interface Stats extends StatsBase<number> {}
|
|
74
53
|
/**
|
|
75
54
|
* A `fs.Stats` object provides information about a file.
|
|
76
55
|
*
|
|
@@ -131,10 +110,10 @@ declare module "fs" {
|
|
|
131
110
|
* ```
|
|
132
111
|
* @since v0.1.21
|
|
133
112
|
*/
|
|
134
|
-
|
|
113
|
+
class Stats {
|
|
135
114
|
private constructor();
|
|
136
115
|
}
|
|
137
|
-
|
|
116
|
+
interface StatsFsBase<T> {
|
|
138
117
|
/** Type of file system. */
|
|
139
118
|
type: T;
|
|
140
119
|
/** Optimal transfer block size. */
|
|
@@ -150,7 +129,7 @@ declare module "fs" {
|
|
|
150
129
|
/** Free file nodes in file system. */
|
|
151
130
|
ffree: T;
|
|
152
131
|
}
|
|
153
|
-
|
|
132
|
+
interface StatsFs extends StatsFsBase<number> {}
|
|
154
133
|
/**
|
|
155
134
|
* Provides information about a mounted file system.
|
|
156
135
|
*
|
|
@@ -185,9 +164,9 @@ declare module "fs" {
|
|
|
185
164
|
* ```
|
|
186
165
|
* @since v19.6.0, v18.15.0
|
|
187
166
|
*/
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
167
|
+
class StatsFs {}
|
|
168
|
+
interface BigIntStatsFs extends StatsFsBase<bigint> {}
|
|
169
|
+
interface StatFsOptions {
|
|
191
170
|
bigint?: boolean | undefined;
|
|
192
171
|
}
|
|
193
172
|
/**
|
|
@@ -199,7 +178,7 @@ declare module "fs" {
|
|
|
199
178
|
* the `withFileTypes` option set to `true`, the resulting array is filled with `fs.Dirent` objects, rather than strings or `Buffer` s.
|
|
200
179
|
* @since v10.10.0
|
|
201
180
|
*/
|
|
202
|
-
|
|
181
|
+
class Dirent<Name extends string | Buffer = string> {
|
|
203
182
|
/**
|
|
204
183
|
* Returns `true` if the `fs.Dirent` object describes a regular file.
|
|
205
184
|
* @since v10.10.0
|
|
@@ -248,12 +227,6 @@ declare module "fs" {
|
|
|
248
227
|
* @since v20.12.0, v18.20.0
|
|
249
228
|
*/
|
|
250
229
|
parentPath: string;
|
|
251
|
-
/**
|
|
252
|
-
* Alias for `dirent.parentPath`.
|
|
253
|
-
* @since v20.1.0
|
|
254
|
-
* @deprecated Since v20.12.0
|
|
255
|
-
*/
|
|
256
|
-
path: string;
|
|
257
230
|
}
|
|
258
231
|
/**
|
|
259
232
|
* A class representing a directory stream.
|
|
@@ -276,7 +249,7 @@ declare module "fs" {
|
|
|
276
249
|
* closed after the iterator exits.
|
|
277
250
|
* @since v12.12.0
|
|
278
251
|
*/
|
|
279
|
-
|
|
252
|
+
class Dir implements AsyncIterable<Dirent> {
|
|
280
253
|
/**
|
|
281
254
|
* The read-only path of this directory as was provided to {@link opendir},{@link opendirSync}, or `fsPromises.opendir()`.
|
|
282
255
|
* @since v12.12.0
|
|
@@ -332,15 +305,13 @@ declare module "fs" {
|
|
|
332
305
|
/**
|
|
333
306
|
* Calls `dir.close()` if the directory handle is open, and returns a promise that
|
|
334
307
|
* fulfills when disposal is complete.
|
|
335
|
-
* @since
|
|
336
|
-
* @experimental
|
|
308
|
+
* @since v24.1.0
|
|
337
309
|
*/
|
|
338
310
|
[Symbol.asyncDispose](): Promise<void>;
|
|
339
311
|
/**
|
|
340
312
|
* Calls `dir.closeSync()` if the directory handle is open, and returns
|
|
341
313
|
* `undefined`.
|
|
342
|
-
* @since
|
|
343
|
-
* @experimental
|
|
314
|
+
* @since v24.1.0
|
|
344
315
|
*/
|
|
345
316
|
[Symbol.dispose](): void;
|
|
346
317
|
}
|
|
@@ -350,7 +321,7 @@ declare module "fs" {
|
|
|
350
321
|
* Extends `EventEmitter`
|
|
351
322
|
* A successful call to {@link watchFile} method will return a new fs.StatWatcher object.
|
|
352
323
|
*/
|
|
353
|
-
|
|
324
|
+
interface StatWatcher extends EventEmitter {
|
|
354
325
|
/**
|
|
355
326
|
* 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
|
|
356
327
|
* no effect.
|
|
@@ -371,7 +342,12 @@ declare module "fs" {
|
|
|
371
342
|
*/
|
|
372
343
|
unref(): this;
|
|
373
344
|
}
|
|
374
|
-
|
|
345
|
+
interface FSWatcherEventMap {
|
|
346
|
+
"change": [eventType: string, filename: string | NonSharedBuffer];
|
|
347
|
+
"close": [];
|
|
348
|
+
"error": [error: Error];
|
|
349
|
+
}
|
|
350
|
+
interface FSWatcher extends InternalEventEmitter<FSWatcherEventMap> {
|
|
375
351
|
/**
|
|
376
352
|
* Stop watching for changes on the given `fs.FSWatcher`. Once stopped, the `fs.FSWatcher` object is no longer usable.
|
|
377
353
|
* @since v0.5.8
|
|
@@ -396,44 +372,19 @@ declare module "fs" {
|
|
|
396
372
|
* @since v14.3.0, v12.20.0
|
|
397
373
|
*/
|
|
398
374
|
unref(): this;
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
addListener(event: string, listener: (...args: any[]) => void): this;
|
|
406
|
-
addListener(event: "change", listener: (eventType: string, filename: string | NonSharedBuffer) => void): this;
|
|
407
|
-
addListener(event: "close", listener: () => void): this;
|
|
408
|
-
addListener(event: "error", listener: (error: Error) => void): this;
|
|
409
|
-
on(event: string, listener: (...args: any[]) => void): this;
|
|
410
|
-
on(event: "change", listener: (eventType: string, filename: string | NonSharedBuffer) => void): this;
|
|
411
|
-
on(event: "close", listener: () => void): this;
|
|
412
|
-
on(event: "error", listener: (error: Error) => void): this;
|
|
413
|
-
once(event: string, listener: (...args: any[]) => void): this;
|
|
414
|
-
once(event: "change", listener: (eventType: string, filename: string | NonSharedBuffer) => void): this;
|
|
415
|
-
once(event: "close", listener: () => void): this;
|
|
416
|
-
once(event: "error", listener: (error: Error) => void): this;
|
|
417
|
-
prependListener(event: string, listener: (...args: any[]) => void): this;
|
|
418
|
-
prependListener(
|
|
419
|
-
event: "change",
|
|
420
|
-
listener: (eventType: string, filename: string | NonSharedBuffer) => void,
|
|
421
|
-
): this;
|
|
422
|
-
prependListener(event: "close", listener: () => void): this;
|
|
423
|
-
prependListener(event: "error", listener: (error: Error) => void): this;
|
|
424
|
-
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
|
425
|
-
prependOnceListener(
|
|
426
|
-
event: "change",
|
|
427
|
-
listener: (eventType: string, filename: string | NonSharedBuffer) => void,
|
|
428
|
-
): this;
|
|
429
|
-
prependOnceListener(event: "close", listener: () => void): this;
|
|
430
|
-
prependOnceListener(event: "error", listener: (error: Error) => void): this;
|
|
375
|
+
}
|
|
376
|
+
interface ReadStreamEventMap extends stream.ReadableEventMap {
|
|
377
|
+
"close": [];
|
|
378
|
+
"data": [chunk: string | NonSharedBuffer];
|
|
379
|
+
"open": [fd: number];
|
|
380
|
+
"ready": [];
|
|
431
381
|
}
|
|
432
382
|
/**
|
|
433
|
-
* Instances of `fs.ReadStream`
|
|
383
|
+
* Instances of `fs.ReadStream` cannot be constructed directly. They are created and
|
|
384
|
+
* returned using the `fs.createReadStream()` function.
|
|
434
385
|
* @since v0.1.93
|
|
435
386
|
*/
|
|
436
|
-
|
|
387
|
+
class ReadStream extends stream.Readable {
|
|
437
388
|
close(callback?: (err?: NodeJS.ErrnoException | null) => void): void;
|
|
438
389
|
/**
|
|
439
390
|
* The number of bytes that have been read so far.
|
|
@@ -453,60 +404,251 @@ declare module "fs" {
|
|
|
453
404
|
* @since v11.2.0, v10.16.0
|
|
454
405
|
*/
|
|
455
406
|
pending: boolean;
|
|
407
|
+
// #region InternalEventEmitter
|
|
408
|
+
addListener<E extends keyof ReadStreamEventMap>(
|
|
409
|
+
eventName: E,
|
|
410
|
+
listener: (...args: ReadStreamEventMap[E]) => void,
|
|
411
|
+
): this;
|
|
412
|
+
addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
413
|
+
emit<E extends keyof ReadStreamEventMap>(eventName: E, ...args: ReadStreamEventMap[E]): boolean;
|
|
414
|
+
emit(eventName: string | symbol, ...args: any[]): boolean;
|
|
415
|
+
listenerCount<E extends keyof ReadStreamEventMap>(
|
|
416
|
+
eventName: E,
|
|
417
|
+
listener?: (...args: ReadStreamEventMap[E]) => void,
|
|
418
|
+
): number;
|
|
419
|
+
listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
|
|
420
|
+
listeners<E extends keyof ReadStreamEventMap>(eventName: E): ((...args: ReadStreamEventMap[E]) => void)[];
|
|
421
|
+
listeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
|
422
|
+
off<E extends keyof ReadStreamEventMap>(eventName: E, listener: (...args: ReadStreamEventMap[E]) => void): this;
|
|
423
|
+
off(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
424
|
+
on<E extends keyof ReadStreamEventMap>(eventName: E, listener: (...args: ReadStreamEventMap[E]) => void): this;
|
|
425
|
+
on(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
426
|
+
once<E extends keyof ReadStreamEventMap>(
|
|
427
|
+
eventName: E,
|
|
428
|
+
listener: (...args: ReadStreamEventMap[E]) => void,
|
|
429
|
+
): this;
|
|
430
|
+
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
431
|
+
prependListener<E extends keyof ReadStreamEventMap>(
|
|
432
|
+
eventName: E,
|
|
433
|
+
listener: (...args: ReadStreamEventMap[E]) => void,
|
|
434
|
+
): this;
|
|
435
|
+
prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
436
|
+
prependOnceListener<E extends keyof ReadStreamEventMap>(
|
|
437
|
+
eventName: E,
|
|
438
|
+
listener: (...args: ReadStreamEventMap[E]) => void,
|
|
439
|
+
): this;
|
|
440
|
+
prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
441
|
+
rawListeners<E extends keyof ReadStreamEventMap>(eventName: E): ((...args: ReadStreamEventMap[E]) => void)[];
|
|
442
|
+
rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
|
443
|
+
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
|
|
444
|
+
removeAllListeners<E extends keyof ReadStreamEventMap>(eventName?: E): this;
|
|
445
|
+
removeAllListeners(eventName?: string | symbol): this;
|
|
446
|
+
removeListener<E extends keyof ReadStreamEventMap>(
|
|
447
|
+
eventName: E,
|
|
448
|
+
listener: (...args: ReadStreamEventMap[E]) => void,
|
|
449
|
+
): this;
|
|
450
|
+
removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
451
|
+
// #endregion
|
|
452
|
+
}
|
|
453
|
+
interface Utf8StreamOptions {
|
|
454
|
+
/**
|
|
455
|
+
* Appends writes to dest file instead of truncating it.
|
|
456
|
+
* @default true
|
|
457
|
+
*/
|
|
458
|
+
append?: boolean | undefined;
|
|
459
|
+
/**
|
|
460
|
+
* Which type of data you can send to the write
|
|
461
|
+
* function, supported values are `'utf8'` or `'buffer'`.
|
|
462
|
+
* @default 'utf8'
|
|
463
|
+
*/
|
|
464
|
+
contentMode?: "utf8" | "buffer" | undefined;
|
|
456
465
|
/**
|
|
457
|
-
*
|
|
458
|
-
*
|
|
459
|
-
* 2. close
|
|
460
|
-
* 3. ready
|
|
466
|
+
* A path to a file to be written to (mode controlled by the
|
|
467
|
+
* append option).
|
|
461
468
|
*/
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
469
|
+
dest?: string | undefined;
|
|
470
|
+
/**
|
|
471
|
+
* A file descriptor, something that is returned by `fs.open()`
|
|
472
|
+
* or `fs.openSync()`.
|
|
473
|
+
*/
|
|
474
|
+
fd?: number | undefined;
|
|
475
|
+
/**
|
|
476
|
+
* An object that has the same API as the `fs` module, useful
|
|
477
|
+
* for mocking, testing, or customizing the behavior of the stream.
|
|
478
|
+
*/
|
|
479
|
+
fs?: object | undefined;
|
|
480
|
+
/**
|
|
481
|
+
* Perform a `fs.fsyncSync()` every time a write is
|
|
482
|
+
* completed.
|
|
483
|
+
*/
|
|
484
|
+
fsync?: boolean | undefined;
|
|
485
|
+
/**
|
|
486
|
+
* The maximum length of the internal buffer. If a write
|
|
487
|
+
* operation would cause the buffer to exceed `maxLength`, the data written is
|
|
488
|
+
* dropped and a drop event is emitted with the dropped data
|
|
489
|
+
*/
|
|
490
|
+
maxLength?: number | undefined;
|
|
491
|
+
/**
|
|
492
|
+
* The maximum number of bytes that can be written;
|
|
493
|
+
* @default 16384
|
|
494
|
+
*/
|
|
495
|
+
maxWrite?: number | undefined;
|
|
496
|
+
/**
|
|
497
|
+
* The minimum length of the internal buffer that is
|
|
498
|
+
* required to be full before flushing.
|
|
499
|
+
*/
|
|
500
|
+
minLength?: number | undefined;
|
|
501
|
+
/**
|
|
502
|
+
* Ensure directory for `dest` file exists when true.
|
|
503
|
+
* @default false
|
|
504
|
+
*/
|
|
505
|
+
mkdir?: boolean | undefined;
|
|
506
|
+
/**
|
|
507
|
+
* Specify the creating file mode (see `fs.open()`).
|
|
508
|
+
*/
|
|
509
|
+
mode?: number | string | undefined;
|
|
510
|
+
/**
|
|
511
|
+
* Calls flush every `periodicFlush` milliseconds.
|
|
512
|
+
*/
|
|
513
|
+
periodicFlush?: number | undefined;
|
|
514
|
+
/**
|
|
515
|
+
* A function that will be called when `write()`,
|
|
516
|
+
* `writeSync()`, or `flushSync()` encounters an `EAGAIN` or `EBUSY` error.
|
|
517
|
+
* If the return value is `true` the operation will be retried, otherwise it
|
|
518
|
+
* will bubble the error. The `err` is the error that caused this function to
|
|
519
|
+
* be called, `writeBufferLen` is the length of the buffer that was written,
|
|
520
|
+
* and `remainingBufferLen` is the length of the remaining buffer that the
|
|
521
|
+
* stream did not try to write.
|
|
522
|
+
*/
|
|
523
|
+
retryEAGAIN?: ((err: Error | null, writeBufferLen: number, remainingBufferLen: number) => boolean) | undefined;
|
|
524
|
+
/**
|
|
525
|
+
* Perform writes synchronously.
|
|
526
|
+
*/
|
|
527
|
+
sync?: boolean | undefined;
|
|
528
|
+
}
|
|
529
|
+
interface Utf8StreamEventMap {
|
|
530
|
+
"close": [];
|
|
531
|
+
"drain": [];
|
|
532
|
+
"drop": [data: string | Buffer];
|
|
533
|
+
"error": [error: Error];
|
|
534
|
+
"finish": [];
|
|
535
|
+
"ready": [];
|
|
536
|
+
"write": [n: number];
|
|
467
537
|
}
|
|
468
|
-
|
|
469
|
-
/**
|
|
470
|
-
* The Keys are events of the ReadStream and the values are the functions that are called when the event is emitted.
|
|
471
|
-
*/
|
|
472
|
-
type ReadStreamEvents = {
|
|
473
|
-
close: () => void;
|
|
474
|
-
data: (chunk: Buffer | string) => void;
|
|
475
|
-
end: () => void;
|
|
476
|
-
error: (err: Error) => void;
|
|
477
|
-
open: (fd: number) => void;
|
|
478
|
-
pause: () => void;
|
|
479
|
-
readable: () => void;
|
|
480
|
-
ready: () => void;
|
|
481
|
-
resume: () => void;
|
|
482
|
-
} & CustomEvents;
|
|
483
|
-
|
|
484
|
-
/**
|
|
485
|
-
* string & {} allows to allow any kind of strings for the event
|
|
486
|
-
* but still allows to have auto completion for the normal events.
|
|
487
|
-
*/
|
|
488
|
-
type CustomEvents = { [Key in string & {} | symbol]: (...args: any[]) => void };
|
|
489
|
-
|
|
490
538
|
/**
|
|
491
|
-
*
|
|
539
|
+
* An optimized UTF-8 stream writer that allows for flushing all the internal
|
|
540
|
+
* buffering on demand. It handles `EAGAIN` errors correctly, allowing for
|
|
541
|
+
* customization, for example, by dropping content if the disk is busy.
|
|
542
|
+
* @since v24.6.0
|
|
543
|
+
* @experimental
|
|
492
544
|
*/
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
545
|
+
class Utf8Stream implements EventEmitter {
|
|
546
|
+
constructor(options: Utf8StreamOptions);
|
|
547
|
+
/**
|
|
548
|
+
* Whether the stream is appending to the file or truncating it.
|
|
549
|
+
*/
|
|
550
|
+
readonly append: boolean;
|
|
551
|
+
/**
|
|
552
|
+
* The type of data that can be written to the stream. Supported
|
|
553
|
+
* values are `'utf8'` or `'buffer'`.
|
|
554
|
+
* @default 'utf8'
|
|
555
|
+
*/
|
|
556
|
+
readonly contentMode: "utf8" | "buffer";
|
|
557
|
+
/**
|
|
558
|
+
* Close the stream immediately, without flushing the internal buffer.
|
|
559
|
+
*/
|
|
560
|
+
destroy(): void;
|
|
561
|
+
/**
|
|
562
|
+
* Close the stream gracefully, flushing the internal buffer before closing.
|
|
563
|
+
*/
|
|
564
|
+
end(): void;
|
|
565
|
+
/**
|
|
566
|
+
* The file descriptor that is being written to.
|
|
567
|
+
*/
|
|
568
|
+
readonly fd: number;
|
|
569
|
+
/**
|
|
570
|
+
* The file that is being written to.
|
|
571
|
+
*/
|
|
572
|
+
readonly file: string;
|
|
573
|
+
/**
|
|
574
|
+
* Writes the current buffer to the file if a write was not in progress. Do
|
|
575
|
+
* nothing if `minLength` is zero or if it is already writing.
|
|
576
|
+
*/
|
|
577
|
+
flush(callback: (err: Error | null) => void): void;
|
|
578
|
+
/**
|
|
579
|
+
* Flushes the buffered data synchronously. This is a costly operation.
|
|
580
|
+
*/
|
|
581
|
+
flushSync(): void;
|
|
582
|
+
/**
|
|
583
|
+
* Whether the stream is performing a `fs.fsyncSync()` after every
|
|
584
|
+
* write operation.
|
|
585
|
+
*/
|
|
586
|
+
readonly fsync: boolean;
|
|
587
|
+
/**
|
|
588
|
+
* The maximum length of the internal buffer. If a write
|
|
589
|
+
* operation would cause the buffer to exceed `maxLength`, the data written is
|
|
590
|
+
* dropped and a drop event is emitted with the dropped data.
|
|
591
|
+
*/
|
|
592
|
+
readonly maxLength: number;
|
|
593
|
+
/**
|
|
594
|
+
* The minimum length of the internal buffer that is required to be
|
|
595
|
+
* full before flushing.
|
|
596
|
+
*/
|
|
597
|
+
readonly minLength: number;
|
|
598
|
+
/**
|
|
599
|
+
* Whether the stream should ensure that the directory for the
|
|
600
|
+
* `dest` file exists. If `true`, it will create the directory if it does not
|
|
601
|
+
* exist.
|
|
602
|
+
* @default false
|
|
603
|
+
*/
|
|
604
|
+
readonly mkdir: boolean;
|
|
605
|
+
/**
|
|
606
|
+
* The mode of the file that is being written to.
|
|
607
|
+
*/
|
|
608
|
+
readonly mode: number | string;
|
|
609
|
+
/**
|
|
610
|
+
* The number of milliseconds between flushes. If set to `0`, no
|
|
611
|
+
* periodic flushes will be performed.
|
|
612
|
+
*/
|
|
613
|
+
readonly periodicFlush: number;
|
|
614
|
+
/**
|
|
615
|
+
* Reopen the file in place, useful for log rotation.
|
|
616
|
+
* @param file A path to a file to be written to (mode
|
|
617
|
+
* controlled by the append option).
|
|
618
|
+
*/
|
|
619
|
+
reopen(file: PathLike): void;
|
|
620
|
+
/**
|
|
621
|
+
* Whether the stream is writing synchronously or asynchronously.
|
|
622
|
+
*/
|
|
623
|
+
readonly sync: boolean;
|
|
624
|
+
/**
|
|
625
|
+
* When the `options.contentMode` is set to `'utf8'` when the stream is created,
|
|
626
|
+
* the `data` argument must be a string. If the `contentMode` is set to `'buffer'`,
|
|
627
|
+
* the `data` argument must be a `Buffer`.
|
|
628
|
+
* @param data The data to write.
|
|
629
|
+
*/
|
|
630
|
+
write(data: string | Buffer): boolean;
|
|
631
|
+
/**
|
|
632
|
+
* Whether the stream is currently writing data to the file.
|
|
633
|
+
*/
|
|
634
|
+
readonly writing: boolean;
|
|
635
|
+
/**
|
|
636
|
+
* Calls `utf8Stream.destroy()`.
|
|
637
|
+
*/
|
|
638
|
+
[Symbol.dispose](): void;
|
|
639
|
+
}
|
|
640
|
+
interface Utf8Stream extends InternalEventEmitter<Utf8StreamEventMap> {}
|
|
641
|
+
interface WriteStreamEventMap extends stream.WritableEventMap {
|
|
642
|
+
"close": [];
|
|
643
|
+
"open": [fd: number];
|
|
644
|
+
"ready": [];
|
|
645
|
+
}
|
|
503
646
|
/**
|
|
504
|
-
*
|
|
505
|
-
*
|
|
506
|
-
* Instances of `fs.WriteStream` are created and returned using the {@link createWriteStream} function.
|
|
647
|
+
* Instances of `fs.WriteStream` cannot be constructed directly. They are created and
|
|
648
|
+
* returned using the `fs.createWriteStream()` function.
|
|
507
649
|
* @since v0.1.93
|
|
508
650
|
*/
|
|
509
|
-
|
|
651
|
+
class WriteStream extends stream.Writable {
|
|
510
652
|
/**
|
|
511
653
|
* Closes `writeStream`. Optionally accepts a
|
|
512
654
|
* callback that will be executed once the `writeStream`is closed.
|
|
@@ -532,17 +674,57 @@ declare module "fs" {
|
|
|
532
674
|
* @since v11.2.0
|
|
533
675
|
*/
|
|
534
676
|
pending: boolean;
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
677
|
+
// #region InternalEventEmitter
|
|
678
|
+
addListener<E extends keyof WriteStreamEventMap>(
|
|
679
|
+
eventName: E,
|
|
680
|
+
listener: (...args: WriteStreamEventMap[E]) => void,
|
|
681
|
+
): this;
|
|
682
|
+
addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
683
|
+
emit<E extends keyof WriteStreamEventMap>(eventName: E, ...args: WriteStreamEventMap[E]): boolean;
|
|
684
|
+
emit(eventName: string | symbol, ...args: any[]): boolean;
|
|
685
|
+
listenerCount<E extends keyof WriteStreamEventMap>(
|
|
686
|
+
eventName: E,
|
|
687
|
+
listener?: (...args: WriteStreamEventMap[E]) => void,
|
|
688
|
+
): number;
|
|
689
|
+
listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
|
|
690
|
+
listeners<E extends keyof WriteStreamEventMap>(eventName: E): ((...args: WriteStreamEventMap[E]) => void)[];
|
|
691
|
+
listeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
|
692
|
+
off<E extends keyof WriteStreamEventMap>(
|
|
693
|
+
eventName: E,
|
|
694
|
+
listener: (...args: WriteStreamEventMap[E]) => void,
|
|
695
|
+
): this;
|
|
696
|
+
off(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
697
|
+
on<E extends keyof WriteStreamEventMap>(
|
|
698
|
+
eventName: E,
|
|
699
|
+
listener: (...args: WriteStreamEventMap[E]) => void,
|
|
700
|
+
): this;
|
|
701
|
+
on(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
702
|
+
once<E extends keyof WriteStreamEventMap>(
|
|
703
|
+
eventName: E,
|
|
704
|
+
listener: (...args: WriteStreamEventMap[E]) => void,
|
|
705
|
+
): this;
|
|
706
|
+
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
707
|
+
prependListener<E extends keyof WriteStreamEventMap>(
|
|
708
|
+
eventName: E,
|
|
709
|
+
listener: (...args: WriteStreamEventMap[E]) => void,
|
|
710
|
+
): this;
|
|
711
|
+
prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
712
|
+
prependOnceListener<E extends keyof WriteStreamEventMap>(
|
|
713
|
+
eventName: E,
|
|
714
|
+
listener: (...args: WriteStreamEventMap[E]) => void,
|
|
715
|
+
): this;
|
|
716
|
+
prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
717
|
+
rawListeners<E extends keyof WriteStreamEventMap>(eventName: E): ((...args: WriteStreamEventMap[E]) => void)[];
|
|
718
|
+
rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
|
719
|
+
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
|
|
720
|
+
removeAllListeners<E extends keyof WriteStreamEventMap>(eventName?: E): this;
|
|
721
|
+
removeAllListeners(eventName?: string | symbol): this;
|
|
722
|
+
removeListener<E extends keyof WriteStreamEventMap>(
|
|
723
|
+
eventName: E,
|
|
724
|
+
listener: (...args: WriteStreamEventMap[E]) => void,
|
|
725
|
+
): this;
|
|
726
|
+
removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
727
|
+
// #endregion
|
|
546
728
|
}
|
|
547
729
|
/**
|
|
548
730
|
* Asynchronously rename file at `oldPath` to the pathname provided
|
|
@@ -563,8 +745,8 @@ declare module "fs" {
|
|
|
563
745
|
* ```
|
|
564
746
|
* @since v0.0.2
|
|
565
747
|
*/
|
|
566
|
-
|
|
567
|
-
|
|
748
|
+
function rename(oldPath: PathLike, newPath: PathLike, callback: NoParamCallback): void;
|
|
749
|
+
namespace rename {
|
|
568
750
|
/**
|
|
569
751
|
* Asynchronous rename(2) - Change the name or location of a file or directory.
|
|
570
752
|
* @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
@@ -580,7 +762,7 @@ declare module "fs" {
|
|
|
580
762
|
* See the POSIX [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html) documentation for more details.
|
|
581
763
|
* @since v0.1.21
|
|
582
764
|
*/
|
|
583
|
-
|
|
765
|
+
function renameSync(oldPath: PathLike, newPath: PathLike): void;
|
|
584
766
|
/**
|
|
585
767
|
* Truncates the file. No arguments other than a possible exception are
|
|
586
768
|
* given to the completion callback. A file descriptor can also be passed as the
|
|
@@ -602,13 +784,13 @@ declare module "fs" {
|
|
|
602
784
|
* @since v0.8.6
|
|
603
785
|
* @param [len=0]
|
|
604
786
|
*/
|
|
605
|
-
|
|
787
|
+
function truncate(path: PathLike, len: number | undefined, callback: NoParamCallback): void;
|
|
606
788
|
/**
|
|
607
789
|
* Asynchronous truncate(2) - Truncate a file to a specified length.
|
|
608
790
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
609
791
|
*/
|
|
610
|
-
|
|
611
|
-
|
|
792
|
+
function truncate(path: PathLike, callback: NoParamCallback): void;
|
|
793
|
+
namespace truncate {
|
|
612
794
|
/**
|
|
613
795
|
* Asynchronous truncate(2) - Truncate a file to a specified length.
|
|
614
796
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
@@ -625,7 +807,7 @@ declare module "fs" {
|
|
|
625
807
|
* @since v0.8.6
|
|
626
808
|
* @param [len=0]
|
|
627
809
|
*/
|
|
628
|
-
|
|
810
|
+
function truncateSync(path: PathLike, len?: number): void;
|
|
629
811
|
/**
|
|
630
812
|
* Truncates the file descriptor. No arguments other than a possible exception are
|
|
631
813
|
* given to the completion callback.
|
|
@@ -669,13 +851,13 @@ declare module "fs" {
|
|
|
669
851
|
* @since v0.8.6
|
|
670
852
|
* @param [len=0]
|
|
671
853
|
*/
|
|
672
|
-
|
|
854
|
+
function ftruncate(fd: number, len: number | undefined, callback: NoParamCallback): void;
|
|
673
855
|
/**
|
|
674
856
|
* Asynchronous ftruncate(2) - Truncate a file to a specified length.
|
|
675
857
|
* @param fd A file descriptor.
|
|
676
858
|
*/
|
|
677
|
-
|
|
678
|
-
|
|
859
|
+
function ftruncate(fd: number, callback: NoParamCallback): void;
|
|
860
|
+
namespace ftruncate {
|
|
679
861
|
/**
|
|
680
862
|
* Asynchronous ftruncate(2) - Truncate a file to a specified length.
|
|
681
863
|
* @param fd A file descriptor.
|
|
@@ -691,7 +873,7 @@ declare module "fs" {
|
|
|
691
873
|
* @since v0.8.6
|
|
692
874
|
* @param [len=0]
|
|
693
875
|
*/
|
|
694
|
-
|
|
876
|
+
function ftruncateSync(fd: number, len?: number): void;
|
|
695
877
|
/**
|
|
696
878
|
* Asynchronously changes owner and group of a file. No arguments other than a
|
|
697
879
|
* possible exception are given to the completion callback.
|
|
@@ -699,8 +881,8 @@ declare module "fs" {
|
|
|
699
881
|
* See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail.
|
|
700
882
|
* @since v0.1.97
|
|
701
883
|
*/
|
|
702
|
-
|
|
703
|
-
|
|
884
|
+
function chown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void;
|
|
885
|
+
namespace chown {
|
|
704
886
|
/**
|
|
705
887
|
* Asynchronous chown(2) - Change ownership of a file.
|
|
706
888
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
@@ -714,7 +896,7 @@ declare module "fs" {
|
|
|
714
896
|
* See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail.
|
|
715
897
|
* @since v0.1.97
|
|
716
898
|
*/
|
|
717
|
-
|
|
899
|
+
function chownSync(path: PathLike, uid: number, gid: number): void;
|
|
718
900
|
/**
|
|
719
901
|
* Sets the owner of the file. No arguments other than a possible exception are
|
|
720
902
|
* given to the completion callback.
|
|
@@ -722,8 +904,8 @@ declare module "fs" {
|
|
|
722
904
|
* See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail.
|
|
723
905
|
* @since v0.4.7
|
|
724
906
|
*/
|
|
725
|
-
|
|
726
|
-
|
|
907
|
+
function fchown(fd: number, uid: number, gid: number, callback: NoParamCallback): void;
|
|
908
|
+
namespace fchown {
|
|
727
909
|
/**
|
|
728
910
|
* Asynchronous fchown(2) - Change ownership of a file.
|
|
729
911
|
* @param fd A file descriptor.
|
|
@@ -738,15 +920,15 @@ declare module "fs" {
|
|
|
738
920
|
* @param uid The file's new owner's user id.
|
|
739
921
|
* @param gid The file's new group's group id.
|
|
740
922
|
*/
|
|
741
|
-
|
|
923
|
+
function fchownSync(fd: number, uid: number, gid: number): void;
|
|
742
924
|
/**
|
|
743
925
|
* Set the owner of the symbolic link. No arguments other than a possible
|
|
744
926
|
* exception are given to the completion callback.
|
|
745
927
|
*
|
|
746
928
|
* See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more detail.
|
|
747
929
|
*/
|
|
748
|
-
|
|
749
|
-
|
|
930
|
+
function lchown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void;
|
|
931
|
+
namespace lchown {
|
|
750
932
|
/**
|
|
751
933
|
* Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links.
|
|
752
934
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
@@ -760,7 +942,7 @@ declare module "fs" {
|
|
|
760
942
|
* @param uid The file's new owner's user id.
|
|
761
943
|
* @param gid The file's new group's group id.
|
|
762
944
|
*/
|
|
763
|
-
|
|
945
|
+
function lchownSync(path: PathLike, uid: number, gid: number): void;
|
|
764
946
|
/**
|
|
765
947
|
* 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
|
|
766
948
|
* link, then the link is not dereferenced: instead, the timestamps of the
|
|
@@ -770,8 +952,8 @@ declare module "fs" {
|
|
|
770
952
|
* callback.
|
|
771
953
|
* @since v14.5.0, v12.19.0
|
|
772
954
|
*/
|
|
773
|
-
|
|
774
|
-
|
|
955
|
+
function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void;
|
|
956
|
+
namespace lutimes {
|
|
775
957
|
/**
|
|
776
958
|
* Changes the access and modification times of a file in the same way as `fsPromises.utimes()`,
|
|
777
959
|
* with the difference that if the path refers to a symbolic link, then the link is not
|
|
@@ -788,7 +970,7 @@ declare module "fs" {
|
|
|
788
970
|
* the operation fails. This is the synchronous version of {@link lutimes}.
|
|
789
971
|
* @since v14.5.0, v12.19.0
|
|
790
972
|
*/
|
|
791
|
-
|
|
973
|
+
function lutimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void;
|
|
792
974
|
/**
|
|
793
975
|
* Asynchronously changes the permissions of a file. No arguments other than a
|
|
794
976
|
* possible exception are given to the completion callback.
|
|
@@ -805,8 +987,8 @@ declare module "fs" {
|
|
|
805
987
|
* ```
|
|
806
988
|
* @since v0.1.30
|
|
807
989
|
*/
|
|
808
|
-
|
|
809
|
-
|
|
990
|
+
function chmod(path: PathLike, mode: Mode, callback: NoParamCallback): void;
|
|
991
|
+
namespace chmod {
|
|
810
992
|
/**
|
|
811
993
|
* Asynchronous chmod(2) - Change permissions of a file.
|
|
812
994
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
@@ -821,7 +1003,7 @@ declare module "fs" {
|
|
|
821
1003
|
* See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail.
|
|
822
1004
|
* @since v0.6.7
|
|
823
1005
|
*/
|
|
824
|
-
|
|
1006
|
+
function chmodSync(path: PathLike, mode: Mode): void;
|
|
825
1007
|
/**
|
|
826
1008
|
* Sets the permissions on the file. No arguments other than a possible exception
|
|
827
1009
|
* are given to the completion callback.
|
|
@@ -829,8 +1011,8 @@ declare module "fs" {
|
|
|
829
1011
|
* See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail.
|
|
830
1012
|
* @since v0.4.7
|
|
831
1013
|
*/
|
|
832
|
-
|
|
833
|
-
|
|
1014
|
+
function fchmod(fd: number, mode: Mode, callback: NoParamCallback): void;
|
|
1015
|
+
namespace fchmod {
|
|
834
1016
|
/**
|
|
835
1017
|
* Asynchronous fchmod(2) - Change permissions of a file.
|
|
836
1018
|
* @param fd A file descriptor.
|
|
@@ -844,7 +1026,7 @@ declare module "fs" {
|
|
|
844
1026
|
* See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail.
|
|
845
1027
|
* @since v0.4.7
|
|
846
1028
|
*/
|
|
847
|
-
|
|
1029
|
+
function fchmodSync(fd: number, mode: Mode): void;
|
|
848
1030
|
/**
|
|
849
1031
|
* Changes the permissions on a symbolic link. No arguments other than a possible
|
|
850
1032
|
* exception are given to the completion callback.
|
|
@@ -854,9 +1036,9 @@ declare module "fs" {
|
|
|
854
1036
|
* See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail.
|
|
855
1037
|
* @deprecated Since v0.4.7
|
|
856
1038
|
*/
|
|
857
|
-
|
|
1039
|
+
function lchmod(path: PathLike, mode: Mode, callback: NoParamCallback): void;
|
|
858
1040
|
/** @deprecated */
|
|
859
|
-
|
|
1041
|
+
namespace lchmod {
|
|
860
1042
|
/**
|
|
861
1043
|
* Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links.
|
|
862
1044
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
@@ -872,7 +1054,7 @@ declare module "fs" {
|
|
|
872
1054
|
* See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail.
|
|
873
1055
|
* @deprecated Since v0.4.7
|
|
874
1056
|
*/
|
|
875
|
-
|
|
1057
|
+
function lchmodSync(path: PathLike, mode: Mode): void;
|
|
876
1058
|
/**
|
|
877
1059
|
* 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.
|
|
878
1060
|
*
|
|
@@ -958,48 +1140,98 @@ declare module "fs" {
|
|
|
958
1140
|
* ```
|
|
959
1141
|
* @since v0.0.2
|
|
960
1142
|
*/
|
|
961
|
-
|
|
962
|
-
|
|
1143
|
+
function stat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
|
|
1144
|
+
function stat(
|
|
963
1145
|
path: PathLike,
|
|
964
1146
|
options:
|
|
965
1147
|
| (StatOptions & {
|
|
966
1148
|
bigint?: false | undefined;
|
|
1149
|
+
throwIfNoEntry?: true | undefined;
|
|
967
1150
|
})
|
|
968
1151
|
| undefined,
|
|
969
1152
|
callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void,
|
|
970
1153
|
): void;
|
|
971
|
-
|
|
1154
|
+
function stat(
|
|
972
1155
|
path: PathLike,
|
|
973
1156
|
options: StatOptions & {
|
|
974
1157
|
bigint: true;
|
|
1158
|
+
throwIfNoEntry?: true | undefined;
|
|
975
1159
|
},
|
|
976
1160
|
callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void,
|
|
977
1161
|
): void;
|
|
978
|
-
|
|
1162
|
+
function stat(
|
|
979
1163
|
path: PathLike,
|
|
980
|
-
options: StatOptions
|
|
1164
|
+
options: StatOptions & {
|
|
1165
|
+
bigint?: false | undefined;
|
|
1166
|
+
throwIfNoEntry: false;
|
|
1167
|
+
},
|
|
1168
|
+
callback: (err: NodeJS.ErrnoException | null, stats: Stats | undefined) => void,
|
|
1169
|
+
): void;
|
|
1170
|
+
function stat(
|
|
1171
|
+
path: PathLike,
|
|
1172
|
+
options: StatOptions & {
|
|
1173
|
+
bigint: true;
|
|
1174
|
+
throwIfNoEntry: false;
|
|
1175
|
+
},
|
|
1176
|
+
callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats | undefined) => void,
|
|
1177
|
+
): void;
|
|
1178
|
+
function stat(
|
|
1179
|
+
path: PathLike,
|
|
1180
|
+
options: StatOptions & {
|
|
1181
|
+
throwIfNoEntry?: true | undefined;
|
|
1182
|
+
},
|
|
981
1183
|
callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void,
|
|
982
1184
|
): void;
|
|
983
|
-
|
|
1185
|
+
function stat(
|
|
1186
|
+
path: PathLike,
|
|
1187
|
+
options: StatOptions | undefined,
|
|
1188
|
+
callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats | undefined) => void,
|
|
1189
|
+
): void;
|
|
1190
|
+
namespace stat {
|
|
1191
|
+
// TODO: aliased promisify signatures
|
|
984
1192
|
/**
|
|
985
1193
|
* Asynchronous stat(2) - Get file status.
|
|
986
1194
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
987
1195
|
*/
|
|
1196
|
+
function __promisify__(path: PathLike): Promise<Stats>;
|
|
988
1197
|
function __promisify__(
|
|
989
1198
|
path: PathLike,
|
|
990
1199
|
options?: StatOptions & {
|
|
991
1200
|
bigint?: false | undefined;
|
|
1201
|
+
throwIfNoEntry?: true | undefined;
|
|
992
1202
|
},
|
|
993
1203
|
): Promise<Stats>;
|
|
994
1204
|
function __promisify__(
|
|
995
1205
|
path: PathLike,
|
|
996
1206
|
options: StatOptions & {
|
|
997
1207
|
bigint: true;
|
|
1208
|
+
throwIfNoEntry?: true | undefined;
|
|
998
1209
|
},
|
|
999
1210
|
): Promise<BigIntStats>;
|
|
1000
|
-
function __promisify__(
|
|
1211
|
+
function __promisify__(
|
|
1212
|
+
path: PathLike,
|
|
1213
|
+
options: StatOptions & {
|
|
1214
|
+
bigint?: false | undefined;
|
|
1215
|
+
throwIfNoEntry: false;
|
|
1216
|
+
},
|
|
1217
|
+
): Promise<Stats | undefined>;
|
|
1218
|
+
function __promisify__(
|
|
1219
|
+
path: PathLike,
|
|
1220
|
+
options: StatOptions & {
|
|
1221
|
+
bigint: true;
|
|
1222
|
+
throwIfNoEntry: false;
|
|
1223
|
+
},
|
|
1224
|
+
): Promise<BigIntStats | undefined>;
|
|
1225
|
+
function __promisify__(
|
|
1226
|
+
path: PathLike,
|
|
1227
|
+
options: StatOptions & {
|
|
1228
|
+
throwIfNoEntry?: true | undefined;
|
|
1229
|
+
},
|
|
1230
|
+
): Promise<Stats | BigIntStats>;
|
|
1231
|
+
function __promisify__(path: PathLike, options?: StatOptions): Promise<Stats | BigIntStats | undefined>;
|
|
1001
1232
|
}
|
|
1002
|
-
|
|
1233
|
+
/** @deprecated This orphaned interface will be removed in a future version. */
|
|
1234
|
+
interface StatSyncFn extends Function {
|
|
1003
1235
|
(path: PathLike, options?: undefined): Stats;
|
|
1004
1236
|
(
|
|
1005
1237
|
path: PathLike,
|
|
@@ -1040,15 +1272,50 @@ declare module "fs" {
|
|
|
1040
1272
|
* Synchronous stat(2) - Get file status.
|
|
1041
1273
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
1042
1274
|
*/
|
|
1043
|
-
|
|
1275
|
+
function statSync(path: PathLike): Stats;
|
|
1276
|
+
function statSync(
|
|
1277
|
+
path: PathLike,
|
|
1278
|
+
options?: StatOptions & {
|
|
1279
|
+
bigint?: false | undefined;
|
|
1280
|
+
throwIfNoEntry?: true | undefined;
|
|
1281
|
+
},
|
|
1282
|
+
): Stats;
|
|
1283
|
+
function statSync(
|
|
1284
|
+
path: PathLike,
|
|
1285
|
+
options: StatOptions & {
|
|
1286
|
+
bigint: true;
|
|
1287
|
+
throwIfNoEntry?: true | undefined;
|
|
1288
|
+
},
|
|
1289
|
+
): BigIntStats;
|
|
1290
|
+
function statSync(
|
|
1291
|
+
path: PathLike,
|
|
1292
|
+
options: StatOptions & {
|
|
1293
|
+
bigint?: false | undefined;
|
|
1294
|
+
throwIfNoEntry: false;
|
|
1295
|
+
},
|
|
1296
|
+
): Stats | undefined;
|
|
1297
|
+
function statSync(
|
|
1298
|
+
path: PathLike,
|
|
1299
|
+
options: StatOptions & {
|
|
1300
|
+
bigint: true;
|
|
1301
|
+
throwIfNoEntry: false;
|
|
1302
|
+
},
|
|
1303
|
+
): BigIntStats | undefined;
|
|
1304
|
+
function statSync(
|
|
1305
|
+
path: PathLike,
|
|
1306
|
+
options: StatOptions & {
|
|
1307
|
+
throwIfNoEntry?: true | undefined;
|
|
1308
|
+
},
|
|
1309
|
+
): Stats | BigIntStats;
|
|
1310
|
+
function statSync(path: PathLike, options?: StatOptions): Stats | BigIntStats | undefined;
|
|
1044
1311
|
/**
|
|
1045
1312
|
* Invokes the callback with the `fs.Stats` for the file descriptor.
|
|
1046
1313
|
*
|
|
1047
1314
|
* See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail.
|
|
1048
1315
|
* @since v0.1.95
|
|
1049
1316
|
*/
|
|
1050
|
-
|
|
1051
|
-
|
|
1317
|
+
function fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
|
|
1318
|
+
function fstat(
|
|
1052
1319
|
fd: number,
|
|
1053
1320
|
options:
|
|
1054
1321
|
| (StatOptions & {
|
|
@@ -1057,19 +1324,19 @@ declare module "fs" {
|
|
|
1057
1324
|
| undefined,
|
|
1058
1325
|
callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void,
|
|
1059
1326
|
): void;
|
|
1060
|
-
|
|
1327
|
+
function fstat(
|
|
1061
1328
|
fd: number,
|
|
1062
1329
|
options: StatOptions & {
|
|
1063
1330
|
bigint: true;
|
|
1064
1331
|
},
|
|
1065
1332
|
callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void,
|
|
1066
1333
|
): void;
|
|
1067
|
-
|
|
1334
|
+
function fstat(
|
|
1068
1335
|
fd: number,
|
|
1069
1336
|
options: StatOptions | undefined,
|
|
1070
1337
|
callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void,
|
|
1071
1338
|
): void;
|
|
1072
|
-
|
|
1339
|
+
namespace fstat {
|
|
1073
1340
|
/**
|
|
1074
1341
|
* Asynchronous fstat(2) - Get file status.
|
|
1075
1342
|
* @param fd A file descriptor.
|
|
@@ -1094,19 +1361,19 @@ declare module "fs" {
|
|
|
1094
1361
|
* See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail.
|
|
1095
1362
|
* @since v0.1.95
|
|
1096
1363
|
*/
|
|
1097
|
-
|
|
1364
|
+
function fstatSync(
|
|
1098
1365
|
fd: number,
|
|
1099
1366
|
options?: StatOptions & {
|
|
1100
1367
|
bigint?: false | undefined;
|
|
1101
1368
|
},
|
|
1102
1369
|
): Stats;
|
|
1103
|
-
|
|
1370
|
+
function fstatSync(
|
|
1104
1371
|
fd: number,
|
|
1105
1372
|
options: StatOptions & {
|
|
1106
1373
|
bigint: true;
|
|
1107
1374
|
},
|
|
1108
1375
|
): BigIntStats;
|
|
1109
|
-
|
|
1376
|
+
function fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats;
|
|
1110
1377
|
/**
|
|
1111
1378
|
* Retrieves the `fs.Stats` for the symbolic link referred to by the path.
|
|
1112
1379
|
* 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
|
|
@@ -1115,8 +1382,8 @@ declare module "fs" {
|
|
|
1115
1382
|
* See the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) documentation for more details.
|
|
1116
1383
|
* @since v0.1.30
|
|
1117
1384
|
*/
|
|
1118
|
-
|
|
1119
|
-
|
|
1385
|
+
function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
|
|
1386
|
+
function lstat(
|
|
1120
1387
|
path: PathLike,
|
|
1121
1388
|
options:
|
|
1122
1389
|
| (StatOptions & {
|
|
@@ -1125,19 +1392,19 @@ declare module "fs" {
|
|
|
1125
1392
|
| undefined,
|
|
1126
1393
|
callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void,
|
|
1127
1394
|
): void;
|
|
1128
|
-
|
|
1395
|
+
function lstat(
|
|
1129
1396
|
path: PathLike,
|
|
1130
1397
|
options: StatOptions & {
|
|
1131
1398
|
bigint: true;
|
|
1132
1399
|
},
|
|
1133
1400
|
callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void,
|
|
1134
1401
|
): void;
|
|
1135
|
-
|
|
1402
|
+
function lstat(
|
|
1136
1403
|
path: PathLike,
|
|
1137
1404
|
options: StatOptions | undefined,
|
|
1138
1405
|
callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void,
|
|
1139
1406
|
): void;
|
|
1140
|
-
|
|
1407
|
+
namespace lstat {
|
|
1141
1408
|
/**
|
|
1142
1409
|
* Asynchronous lstat(2) - Get file status. Does not dereference symbolic links.
|
|
1143
1410
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
@@ -1164,8 +1431,8 @@ declare module "fs" {
|
|
|
1164
1431
|
* @since v19.6.0, v18.15.0
|
|
1165
1432
|
* @param path A path to an existing file or directory on the file system to be queried.
|
|
1166
1433
|
*/
|
|
1167
|
-
|
|
1168
|
-
|
|
1434
|
+
function statfs(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void): void;
|
|
1435
|
+
function statfs(
|
|
1169
1436
|
path: PathLike,
|
|
1170
1437
|
options:
|
|
1171
1438
|
| (StatFsOptions & {
|
|
@@ -1174,19 +1441,19 @@ declare module "fs" {
|
|
|
1174
1441
|
| undefined,
|
|
1175
1442
|
callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void,
|
|
1176
1443
|
): void;
|
|
1177
|
-
|
|
1444
|
+
function statfs(
|
|
1178
1445
|
path: PathLike,
|
|
1179
1446
|
options: StatFsOptions & {
|
|
1180
1447
|
bigint: true;
|
|
1181
1448
|
},
|
|
1182
1449
|
callback: (err: NodeJS.ErrnoException | null, stats: BigIntStatsFs) => void,
|
|
1183
1450
|
): void;
|
|
1184
|
-
|
|
1451
|
+
function statfs(
|
|
1185
1452
|
path: PathLike,
|
|
1186
1453
|
options: StatFsOptions | undefined,
|
|
1187
1454
|
callback: (err: NodeJS.ErrnoException | null, stats: StatsFs | BigIntStatsFs) => void,
|
|
1188
1455
|
): void;
|
|
1189
|
-
|
|
1456
|
+
namespace statfs {
|
|
1190
1457
|
/**
|
|
1191
1458
|
* Asynchronous statfs(2) - Returns information about the mounted file system which contains path. The callback gets two arguments (err, stats) where stats is an <fs.StatFs> object.
|
|
1192
1459
|
* @param path A path to an existing file or directory on the file system to be queried.
|
|
@@ -1213,32 +1480,67 @@ declare module "fs" {
|
|
|
1213
1480
|
* @since v19.6.0, v18.15.0
|
|
1214
1481
|
* @param path A path to an existing file or directory on the file system to be queried.
|
|
1215
1482
|
*/
|
|
1216
|
-
|
|
1483
|
+
function statfsSync(
|
|
1217
1484
|
path: PathLike,
|
|
1218
1485
|
options?: StatFsOptions & {
|
|
1219
1486
|
bigint?: false | undefined;
|
|
1220
1487
|
},
|
|
1221
1488
|
): StatsFs;
|
|
1222
|
-
|
|
1489
|
+
function statfsSync(
|
|
1223
1490
|
path: PathLike,
|
|
1224
1491
|
options: StatFsOptions & {
|
|
1225
1492
|
bigint: true;
|
|
1226
1493
|
},
|
|
1227
1494
|
): BigIntStatsFs;
|
|
1228
|
-
|
|
1495
|
+
function statfsSync(path: PathLike, options?: StatFsOptions): StatsFs | BigIntStatsFs;
|
|
1229
1496
|
/**
|
|
1230
1497
|
* Synchronous lstat(2) - Get file status. Does not dereference symbolic links.
|
|
1231
1498
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
1232
1499
|
*/
|
|
1233
|
-
|
|
1500
|
+
function lstatSync(path: PathLike): Stats;
|
|
1501
|
+
function lstatSync(
|
|
1502
|
+
path: PathLike,
|
|
1503
|
+
options?: StatOptions & {
|
|
1504
|
+
bigint?: false | undefined;
|
|
1505
|
+
throwIfNoEntry?: true | undefined;
|
|
1506
|
+
},
|
|
1507
|
+
): Stats;
|
|
1508
|
+
function lstatSync(
|
|
1509
|
+
path: PathLike,
|
|
1510
|
+
options: StatOptions & {
|
|
1511
|
+
bigint: true;
|
|
1512
|
+
throwIfNoEntry?: true | undefined;
|
|
1513
|
+
},
|
|
1514
|
+
): BigIntStats;
|
|
1515
|
+
function lstatSync(
|
|
1516
|
+
path: PathLike,
|
|
1517
|
+
options: StatOptions & {
|
|
1518
|
+
bigint?: false | undefined;
|
|
1519
|
+
throwIfNoEntry: false;
|
|
1520
|
+
},
|
|
1521
|
+
): Stats | undefined;
|
|
1522
|
+
function lstatSync(
|
|
1523
|
+
path: PathLike,
|
|
1524
|
+
options: StatOptions & {
|
|
1525
|
+
bigint: true;
|
|
1526
|
+
throwIfNoEntry: false;
|
|
1527
|
+
},
|
|
1528
|
+
): BigIntStats | undefined;
|
|
1529
|
+
function lstatSync(
|
|
1530
|
+
path: PathLike,
|
|
1531
|
+
options: StatOptions & {
|
|
1532
|
+
throwIfNoEntry?: true | undefined;
|
|
1533
|
+
},
|
|
1534
|
+
): Stats | BigIntStats;
|
|
1535
|
+
function lstatSync(path: PathLike, options?: StatOptions): Stats | BigIntStats | undefined;
|
|
1234
1536
|
/**
|
|
1235
1537
|
* 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
|
|
1236
1538
|
* a possible
|
|
1237
1539
|
* exception are given to the completion callback.
|
|
1238
1540
|
* @since v0.1.31
|
|
1239
1541
|
*/
|
|
1240
|
-
|
|
1241
|
-
|
|
1542
|
+
function link(existingPath: PathLike, newPath: PathLike, callback: NoParamCallback): void;
|
|
1543
|
+
namespace link {
|
|
1242
1544
|
/**
|
|
1243
1545
|
* Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file.
|
|
1244
1546
|
* @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
@@ -1250,7 +1552,7 @@ declare module "fs" {
|
|
|
1250
1552
|
* 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`.
|
|
1251
1553
|
* @since v0.1.31
|
|
1252
1554
|
*/
|
|
1253
|
-
|
|
1555
|
+
function linkSync(existingPath: PathLike, newPath: PathLike): void;
|
|
1254
1556
|
/**
|
|
1255
1557
|
* Creates the link called `path` pointing to `target`. No arguments other than a
|
|
1256
1558
|
* possible exception are given to the completion callback.
|
|
@@ -1284,7 +1586,7 @@ declare module "fs" {
|
|
|
1284
1586
|
* @since v0.1.31
|
|
1285
1587
|
* @param [type='null']
|
|
1286
1588
|
*/
|
|
1287
|
-
|
|
1589
|
+
function symlink(
|
|
1288
1590
|
target: PathLike,
|
|
1289
1591
|
path: PathLike,
|
|
1290
1592
|
type: symlink.Type | undefined | null,
|
|
@@ -1295,8 +1597,8 @@ declare module "fs" {
|
|
|
1295
1597
|
* @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
|
|
1296
1598
|
* @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
|
|
1297
1599
|
*/
|
|
1298
|
-
|
|
1299
|
-
|
|
1600
|
+
function symlink(target: PathLike, path: PathLike, callback: NoParamCallback): void;
|
|
1601
|
+
namespace symlink {
|
|
1300
1602
|
/**
|
|
1301
1603
|
* Asynchronous symlink(2) - Create a new symbolic link to an existing file.
|
|
1302
1604
|
* @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
|
|
@@ -1315,7 +1617,7 @@ declare module "fs" {
|
|
|
1315
1617
|
* @since v0.1.31
|
|
1316
1618
|
* @param [type='null']
|
|
1317
1619
|
*/
|
|
1318
|
-
|
|
1620
|
+
function symlinkSync(target: PathLike, path: PathLike, type?: symlink.Type | null): void;
|
|
1319
1621
|
/**
|
|
1320
1622
|
* Reads the contents of the symbolic link referred to by `path`. The callback gets
|
|
1321
1623
|
* two arguments `(err, linkString)`.
|
|
@@ -1328,7 +1630,7 @@ declare module "fs" {
|
|
|
1328
1630
|
* the link path returned will be passed as a `Buffer` object.
|
|
1329
1631
|
* @since v0.1.31
|
|
1330
1632
|
*/
|
|
1331
|
-
|
|
1633
|
+
function readlink(
|
|
1332
1634
|
path: PathLike,
|
|
1333
1635
|
options: EncodingOption,
|
|
1334
1636
|
callback: (err: NodeJS.ErrnoException | null, linkString: string) => void,
|
|
@@ -1338,7 +1640,7 @@ declare module "fs" {
|
|
|
1338
1640
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
1339
1641
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
1340
1642
|
*/
|
|
1341
|
-
|
|
1643
|
+
function readlink(
|
|
1342
1644
|
path: PathLike,
|
|
1343
1645
|
options: BufferEncodingOption,
|
|
1344
1646
|
callback: (err: NodeJS.ErrnoException | null, linkString: NonSharedBuffer) => void,
|
|
@@ -1348,7 +1650,7 @@ declare module "fs" {
|
|
|
1348
1650
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
1349
1651
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
1350
1652
|
*/
|
|
1351
|
-
|
|
1653
|
+
function readlink(
|
|
1352
1654
|
path: PathLike,
|
|
1353
1655
|
options: EncodingOption,
|
|
1354
1656
|
callback: (err: NodeJS.ErrnoException | null, linkString: string | NonSharedBuffer) => void,
|
|
@@ -1357,11 +1659,11 @@ declare module "fs" {
|
|
|
1357
1659
|
* Asynchronous readlink(2) - read value of a symbolic link.
|
|
1358
1660
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
1359
1661
|
*/
|
|
1360
|
-
|
|
1662
|
+
function readlink(
|
|
1361
1663
|
path: PathLike,
|
|
1362
1664
|
callback: (err: NodeJS.ErrnoException | null, linkString: string) => void,
|
|
1363
1665
|
): void;
|
|
1364
|
-
|
|
1666
|
+
namespace readlink {
|
|
1365
1667
|
/**
|
|
1366
1668
|
* Asynchronous readlink(2) - read value of a symbolic link.
|
|
1367
1669
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
@@ -1392,19 +1694,19 @@ declare module "fs" {
|
|
|
1392
1694
|
* the link path returned will be passed as a `Buffer` object.
|
|
1393
1695
|
* @since v0.1.31
|
|
1394
1696
|
*/
|
|
1395
|
-
|
|
1697
|
+
function readlinkSync(path: PathLike, options?: EncodingOption): string;
|
|
1396
1698
|
/**
|
|
1397
1699
|
* Synchronous readlink(2) - read value of a symbolic link.
|
|
1398
1700
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
1399
1701
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
1400
1702
|
*/
|
|
1401
|
-
|
|
1703
|
+
function readlinkSync(path: PathLike, options: BufferEncodingOption): NonSharedBuffer;
|
|
1402
1704
|
/**
|
|
1403
1705
|
* Synchronous readlink(2) - read value of a symbolic link.
|
|
1404
1706
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
1405
1707
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
1406
1708
|
*/
|
|
1407
|
-
|
|
1709
|
+
function readlinkSync(path: PathLike, options?: EncodingOption): string | NonSharedBuffer;
|
|
1408
1710
|
/**
|
|
1409
1711
|
* Asynchronously computes the canonical pathname by resolving `.`, `..`, and
|
|
1410
1712
|
* symbolic links.
|
|
@@ -1431,7 +1733,7 @@ declare module "fs" {
|
|
|
1431
1733
|
* dependent name for that object.
|
|
1432
1734
|
* @since v0.1.31
|
|
1433
1735
|
*/
|
|
1434
|
-
|
|
1736
|
+
function realpath(
|
|
1435
1737
|
path: PathLike,
|
|
1436
1738
|
options: EncodingOption,
|
|
1437
1739
|
callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void,
|
|
@@ -1441,7 +1743,7 @@ declare module "fs" {
|
|
|
1441
1743
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
1442
1744
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
1443
1745
|
*/
|
|
1444
|
-
|
|
1746
|
+
function realpath(
|
|
1445
1747
|
path: PathLike,
|
|
1446
1748
|
options: BufferEncodingOption,
|
|
1447
1749
|
callback: (err: NodeJS.ErrnoException | null, resolvedPath: NonSharedBuffer) => void,
|
|
@@ -1451,7 +1753,7 @@ declare module "fs" {
|
|
|
1451
1753
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
1452
1754
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
1453
1755
|
*/
|
|
1454
|
-
|
|
1756
|
+
function realpath(
|
|
1455
1757
|
path: PathLike,
|
|
1456
1758
|
options: EncodingOption,
|
|
1457
1759
|
callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | NonSharedBuffer) => void,
|
|
@@ -1460,11 +1762,11 @@ declare module "fs" {
|
|
|
1460
1762
|
* Asynchronous realpath(3) - return the canonicalized absolute pathname.
|
|
1461
1763
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
1462
1764
|
*/
|
|
1463
|
-
|
|
1765
|
+
function realpath(
|
|
1464
1766
|
path: PathLike,
|
|
1465
1767
|
callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void,
|
|
1466
1768
|
): void;
|
|
1467
|
-
|
|
1769
|
+
namespace realpath {
|
|
1468
1770
|
/**
|
|
1469
1771
|
* Asynchronous realpath(3) - return the canonicalized absolute pathname.
|
|
1470
1772
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
@@ -1527,20 +1829,20 @@ declare module "fs" {
|
|
|
1527
1829
|
* this API: {@link realpath}.
|
|
1528
1830
|
* @since v0.1.31
|
|
1529
1831
|
*/
|
|
1530
|
-
|
|
1832
|
+
function realpathSync(path: PathLike, options?: EncodingOption): string;
|
|
1531
1833
|
/**
|
|
1532
1834
|
* Synchronous realpath(3) - return the canonicalized absolute pathname.
|
|
1533
1835
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
1534
1836
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
1535
1837
|
*/
|
|
1536
|
-
|
|
1838
|
+
function realpathSync(path: PathLike, options: BufferEncodingOption): NonSharedBuffer;
|
|
1537
1839
|
/**
|
|
1538
1840
|
* Synchronous realpath(3) - return the canonicalized absolute pathname.
|
|
1539
1841
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
1540
1842
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
1541
1843
|
*/
|
|
1542
|
-
|
|
1543
|
-
|
|
1844
|
+
function realpathSync(path: PathLike, options?: EncodingOption): string | NonSharedBuffer;
|
|
1845
|
+
namespace realpathSync {
|
|
1544
1846
|
function native(path: PathLike, options?: EncodingOption): string;
|
|
1545
1847
|
function native(path: PathLike, options: BufferEncodingOption): NonSharedBuffer;
|
|
1546
1848
|
function native(path: PathLike, options?: EncodingOption): string | NonSharedBuffer;
|
|
@@ -1564,8 +1866,8 @@ declare module "fs" {
|
|
|
1564
1866
|
* See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more details.
|
|
1565
1867
|
* @since v0.0.2
|
|
1566
1868
|
*/
|
|
1567
|
-
|
|
1568
|
-
|
|
1869
|
+
function unlink(path: PathLike, callback: NoParamCallback): void;
|
|
1870
|
+
namespace unlink {
|
|
1569
1871
|
/**
|
|
1570
1872
|
* Asynchronous unlink(2) - delete a name and possibly the file it refers to.
|
|
1571
1873
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
@@ -1576,34 +1878,10 @@ declare module "fs" {
|
|
|
1576
1878
|
* Synchronous [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html). Returns `undefined`.
|
|
1577
1879
|
* @since v0.1.21
|
|
1578
1880
|
*/
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
* `EPERM` error is encountered, Node.js will retry the operation with a linear
|
|
1584
|
-
* backoff wait of `retryDelay` ms longer on each try. This option represents the
|
|
1585
|
-
* number of retries. This option is ignored if the `recursive` option is not
|
|
1586
|
-
* `true`.
|
|
1587
|
-
* @default 0
|
|
1588
|
-
*/
|
|
1589
|
-
maxRetries?: number | undefined;
|
|
1590
|
-
/**
|
|
1591
|
-
* @deprecated since v14.14.0 In future versions of Node.js and will trigger a warning
|
|
1592
|
-
* `fs.rmdir(path, { recursive: true })` will throw if `path` does not exist or is a file.
|
|
1593
|
-
* Use `fs.rm(path, { recursive: true, force: true })` instead.
|
|
1594
|
-
*
|
|
1595
|
-
* If `true`, perform a recursive directory removal. In
|
|
1596
|
-
* recursive mode, operations are retried on failure.
|
|
1597
|
-
* @default false
|
|
1598
|
-
*/
|
|
1599
|
-
recursive?: boolean | undefined;
|
|
1600
|
-
/**
|
|
1601
|
-
* The amount of time in milliseconds to wait between retries.
|
|
1602
|
-
* This option is ignored if the `recursive` option is not `true`.
|
|
1603
|
-
* @default 100
|
|
1604
|
-
*/
|
|
1605
|
-
retryDelay?: number | undefined;
|
|
1606
|
-
}
|
|
1881
|
+
function unlinkSync(path: PathLike): void;
|
|
1882
|
+
/** @deprecated `rmdir()` no longer provides any options. This interface will be removed in a future version. */
|
|
1883
|
+
// TODO: remove in future major
|
|
1884
|
+
interface RmDirOptions {}
|
|
1607
1885
|
/**
|
|
1608
1886
|
* Asynchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). No arguments other than a possible exception are given
|
|
1609
1887
|
* to the completion callback.
|
|
@@ -1614,14 +1892,13 @@ declare module "fs" {
|
|
|
1614
1892
|
* To get a behavior similar to the `rm -rf` Unix command, use {@link rm} with options `{ recursive: true, force: true }`.
|
|
1615
1893
|
* @since v0.0.2
|
|
1616
1894
|
*/
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
export namespace rmdir {
|
|
1895
|
+
function rmdir(path: PathLike, callback: NoParamCallback): void;
|
|
1896
|
+
namespace rmdir {
|
|
1620
1897
|
/**
|
|
1621
1898
|
* Asynchronous rmdir(2) - delete a directory.
|
|
1622
1899
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
1623
1900
|
*/
|
|
1624
|
-
function __promisify__(path: PathLike
|
|
1901
|
+
function __promisify__(path: PathLike): Promise<void>;
|
|
1625
1902
|
}
|
|
1626
1903
|
/**
|
|
1627
1904
|
* Synchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). Returns `undefined`.
|
|
@@ -1632,8 +1909,8 @@ declare module "fs" {
|
|
|
1632
1909
|
* To get a behavior similar to the `rm -rf` Unix command, use {@link rmSync} with options `{ recursive: true, force: true }`.
|
|
1633
1910
|
* @since v0.1.21
|
|
1634
1911
|
*/
|
|
1635
|
-
|
|
1636
|
-
|
|
1912
|
+
function rmdirSync(path: PathLike): void;
|
|
1913
|
+
interface RmOptions {
|
|
1637
1914
|
/**
|
|
1638
1915
|
* When `true`, exceptions will be ignored if `path` does not exist.
|
|
1639
1916
|
* @default false
|
|
@@ -1666,9 +1943,9 @@ declare module "fs" {
|
|
|
1666
1943
|
* completion callback.
|
|
1667
1944
|
* @since v14.14.0
|
|
1668
1945
|
*/
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1946
|
+
function rm(path: PathLike, callback: NoParamCallback): void;
|
|
1947
|
+
function rm(path: PathLike, options: RmOptions, callback: NoParamCallback): void;
|
|
1948
|
+
namespace rm {
|
|
1672
1949
|
/**
|
|
1673
1950
|
* Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility).
|
|
1674
1951
|
*/
|
|
@@ -1678,8 +1955,8 @@ declare module "fs" {
|
|
|
1678
1955
|
* Synchronously removes files and directories (modeled on the standard POSIX `rm` utility). Returns `undefined`.
|
|
1679
1956
|
* @since v14.14.0
|
|
1680
1957
|
*/
|
|
1681
|
-
|
|
1682
|
-
|
|
1958
|
+
function rmSync(path: PathLike, options?: RmOptions): void;
|
|
1959
|
+
interface MakeDirectoryOptions {
|
|
1683
1960
|
/**
|
|
1684
1961
|
* Indicates whether parent folders should be created.
|
|
1685
1962
|
* If a folder was created, the path to the first created folder will be returned.
|
|
@@ -1728,7 +2005,7 @@ declare module "fs" {
|
|
|
1728
2005
|
* See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details.
|
|
1729
2006
|
* @since v0.1.8
|
|
1730
2007
|
*/
|
|
1731
|
-
|
|
2008
|
+
function mkdir(
|
|
1732
2009
|
path: PathLike,
|
|
1733
2010
|
options: MakeDirectoryOptions & {
|
|
1734
2011
|
recursive: true;
|
|
@@ -1741,7 +2018,7 @@ declare module "fs" {
|
|
|
1741
2018
|
* @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
|
|
1742
2019
|
* should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
|
|
1743
2020
|
*/
|
|
1744
|
-
|
|
2021
|
+
function mkdir(
|
|
1745
2022
|
path: PathLike,
|
|
1746
2023
|
options:
|
|
1747
2024
|
| Mode
|
|
@@ -1758,7 +2035,7 @@ declare module "fs" {
|
|
|
1758
2035
|
* @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
|
|
1759
2036
|
* should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
|
|
1760
2037
|
*/
|
|
1761
|
-
|
|
2038
|
+
function mkdir(
|
|
1762
2039
|
path: PathLike,
|
|
1763
2040
|
options: Mode | MakeDirectoryOptions | null | undefined,
|
|
1764
2041
|
callback: (err: NodeJS.ErrnoException | null, path?: string) => void,
|
|
@@ -1767,8 +2044,8 @@ declare module "fs" {
|
|
|
1767
2044
|
* Asynchronous mkdir(2) - create a directory with a mode of `0o777`.
|
|
1768
2045
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
1769
2046
|
*/
|
|
1770
|
-
|
|
1771
|
-
|
|
2047
|
+
function mkdir(path: PathLike, callback: NoParamCallback): void;
|
|
2048
|
+
namespace mkdir {
|
|
1772
2049
|
/**
|
|
1773
2050
|
* Asynchronous mkdir(2) - create a directory.
|
|
1774
2051
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
@@ -1814,7 +2091,7 @@ declare module "fs" {
|
|
|
1814
2091
|
* See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details.
|
|
1815
2092
|
* @since v0.1.21
|
|
1816
2093
|
*/
|
|
1817
|
-
|
|
2094
|
+
function mkdirSync(
|
|
1818
2095
|
path: PathLike,
|
|
1819
2096
|
options: MakeDirectoryOptions & {
|
|
1820
2097
|
recursive: true;
|
|
@@ -1826,7 +2103,7 @@ declare module "fs" {
|
|
|
1826
2103
|
* @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
|
|
1827
2104
|
* should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
|
|
1828
2105
|
*/
|
|
1829
|
-
|
|
2106
|
+
function mkdirSync(
|
|
1830
2107
|
path: PathLike,
|
|
1831
2108
|
options?:
|
|
1832
2109
|
| Mode
|
|
@@ -1841,7 +2118,7 @@ declare module "fs" {
|
|
|
1841
2118
|
* @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
|
|
1842
2119
|
* should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
|
|
1843
2120
|
*/
|
|
1844
|
-
|
|
2121
|
+
function mkdirSync(path: PathLike, options?: Mode | MakeDirectoryOptions | null): string | undefined;
|
|
1845
2122
|
/**
|
|
1846
2123
|
* Creates a unique temporary directory.
|
|
1847
2124
|
*
|
|
@@ -1901,7 +2178,7 @@ declare module "fs" {
|
|
|
1901
2178
|
* ```
|
|
1902
2179
|
* @since v5.10.0
|
|
1903
2180
|
*/
|
|
1904
|
-
|
|
2181
|
+
function mkdtemp(
|
|
1905
2182
|
prefix: string,
|
|
1906
2183
|
options: EncodingOption,
|
|
1907
2184
|
callback: (err: NodeJS.ErrnoException | null, folder: string) => void,
|
|
@@ -1911,7 +2188,7 @@ declare module "fs" {
|
|
|
1911
2188
|
* Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
|
|
1912
2189
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
1913
2190
|
*/
|
|
1914
|
-
|
|
2191
|
+
function mkdtemp(
|
|
1915
2192
|
prefix: string,
|
|
1916
2193
|
options: BufferEncodingOption,
|
|
1917
2194
|
callback: (err: NodeJS.ErrnoException | null, folder: NonSharedBuffer) => void,
|
|
@@ -1921,7 +2198,7 @@ declare module "fs" {
|
|
|
1921
2198
|
* Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
|
|
1922
2199
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
1923
2200
|
*/
|
|
1924
|
-
|
|
2201
|
+
function mkdtemp(
|
|
1925
2202
|
prefix: string,
|
|
1926
2203
|
options: EncodingOption,
|
|
1927
2204
|
callback: (err: NodeJS.ErrnoException | null, folder: string | NonSharedBuffer) => void,
|
|
@@ -1930,11 +2207,11 @@ declare module "fs" {
|
|
|
1930
2207
|
* Asynchronously creates a unique temporary directory.
|
|
1931
2208
|
* Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
|
|
1932
2209
|
*/
|
|
1933
|
-
|
|
2210
|
+
function mkdtemp(
|
|
1934
2211
|
prefix: string,
|
|
1935
2212
|
callback: (err: NodeJS.ErrnoException | null, folder: string) => void,
|
|
1936
2213
|
): void;
|
|
1937
|
-
|
|
2214
|
+
namespace mkdtemp {
|
|
1938
2215
|
/**
|
|
1939
2216
|
* Asynchronously creates a unique temporary directory.
|
|
1940
2217
|
* Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
|
|
@@ -1964,19 +2241,52 @@ declare module "fs" {
|
|
|
1964
2241
|
* object with an `encoding` property specifying the character encoding to use.
|
|
1965
2242
|
* @since v5.10.0
|
|
1966
2243
|
*/
|
|
1967
|
-
|
|
2244
|
+
function mkdtempSync(prefix: string, options?: EncodingOption): string;
|
|
1968
2245
|
/**
|
|
1969
2246
|
* Synchronously creates a unique temporary directory.
|
|
1970
2247
|
* Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
|
|
1971
2248
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
1972
2249
|
*/
|
|
1973
|
-
|
|
2250
|
+
function mkdtempSync(prefix: string, options: BufferEncodingOption): NonSharedBuffer;
|
|
1974
2251
|
/**
|
|
1975
2252
|
* Synchronously creates a unique temporary directory.
|
|
1976
2253
|
* Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
|
|
1977
2254
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
1978
2255
|
*/
|
|
1979
|
-
|
|
2256
|
+
function mkdtempSync(prefix: string, options?: EncodingOption): string | NonSharedBuffer;
|
|
2257
|
+
interface DisposableTempDir extends Disposable {
|
|
2258
|
+
/**
|
|
2259
|
+
* The path of the created directory.
|
|
2260
|
+
*/
|
|
2261
|
+
path: string;
|
|
2262
|
+
/**
|
|
2263
|
+
* A function which removes the created directory.
|
|
2264
|
+
*/
|
|
2265
|
+
remove(): void;
|
|
2266
|
+
/**
|
|
2267
|
+
* The same as `remove`.
|
|
2268
|
+
*/
|
|
2269
|
+
[Symbol.dispose](): void;
|
|
2270
|
+
}
|
|
2271
|
+
/**
|
|
2272
|
+
* Returns a disposable object whose `path` property holds the created directory
|
|
2273
|
+
* path. When the object is disposed, the directory and its contents will be
|
|
2274
|
+
* removed if it still exists. If the directory cannot be deleted, disposal will
|
|
2275
|
+
* throw an error. The object has a `remove()` method which will perform the same
|
|
2276
|
+
* task.
|
|
2277
|
+
*
|
|
2278
|
+
* <!-- TODO: link MDN docs for disposables once https://github.com/mdn/content/pull/38027 lands -->
|
|
2279
|
+
*
|
|
2280
|
+
* For detailed information, see the documentation of `fs.mkdtemp()`.
|
|
2281
|
+
*
|
|
2282
|
+
* There is no callback-based version of this API because it is designed for use
|
|
2283
|
+
* with the `using` syntax.
|
|
2284
|
+
*
|
|
2285
|
+
* The optional `options` argument can be a string specifying an encoding, or an
|
|
2286
|
+
* object with an `encoding` property specifying the character encoding to use.
|
|
2287
|
+
* @since v24.4.0
|
|
2288
|
+
*/
|
|
2289
|
+
function mkdtempDisposableSync(prefix: string, options?: EncodingOption): DisposableTempDir;
|
|
1980
2290
|
/**
|
|
1981
2291
|
* 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 `'..'`.
|
|
1982
2292
|
*
|
|
@@ -1990,7 +2300,7 @@ declare module "fs" {
|
|
|
1990
2300
|
* If `options.withFileTypes` is set to `true`, the `files` array will contain `fs.Dirent` objects.
|
|
1991
2301
|
* @since v0.1.8
|
|
1992
2302
|
*/
|
|
1993
|
-
|
|
2303
|
+
function readdir(
|
|
1994
2304
|
path: PathLike,
|
|
1995
2305
|
options:
|
|
1996
2306
|
| {
|
|
@@ -2008,7 +2318,7 @@ declare module "fs" {
|
|
|
2008
2318
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
2009
2319
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
2010
2320
|
*/
|
|
2011
|
-
|
|
2321
|
+
function readdir(
|
|
2012
2322
|
path: PathLike,
|
|
2013
2323
|
options:
|
|
2014
2324
|
| {
|
|
@@ -2024,7 +2334,7 @@ declare module "fs" {
|
|
|
2024
2334
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
2025
2335
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
2026
2336
|
*/
|
|
2027
|
-
|
|
2337
|
+
function readdir(
|
|
2028
2338
|
path: PathLike,
|
|
2029
2339
|
options:
|
|
2030
2340
|
| (ObjectEncodingOptions & {
|
|
@@ -2040,7 +2350,7 @@ declare module "fs" {
|
|
|
2040
2350
|
* Asynchronous readdir(3) - read a directory.
|
|
2041
2351
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
2042
2352
|
*/
|
|
2043
|
-
|
|
2353
|
+
function readdir(
|
|
2044
2354
|
path: PathLike,
|
|
2045
2355
|
callback: (err: NodeJS.ErrnoException | null, files: string[]) => void,
|
|
2046
2356
|
): void;
|
|
@@ -2049,7 +2359,7 @@ declare module "fs" {
|
|
|
2049
2359
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
2050
2360
|
* @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
|
|
2051
2361
|
*/
|
|
2052
|
-
|
|
2362
|
+
function readdir(
|
|
2053
2363
|
path: PathLike,
|
|
2054
2364
|
options: ObjectEncodingOptions & {
|
|
2055
2365
|
withFileTypes: true;
|
|
@@ -2062,7 +2372,7 @@ declare module "fs" {
|
|
|
2062
2372
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
2063
2373
|
* @param options Must include `withFileTypes: true` and `encoding: 'buffer'`.
|
|
2064
2374
|
*/
|
|
2065
|
-
|
|
2375
|
+
function readdir(
|
|
2066
2376
|
path: PathLike,
|
|
2067
2377
|
options: {
|
|
2068
2378
|
encoding: "buffer";
|
|
@@ -2071,7 +2381,7 @@ declare module "fs" {
|
|
|
2071
2381
|
},
|
|
2072
2382
|
callback: (err: NodeJS.ErrnoException | null, files: Dirent<NonSharedBuffer>[]) => void,
|
|
2073
2383
|
): void;
|
|
2074
|
-
|
|
2384
|
+
namespace readdir {
|
|
2075
2385
|
/**
|
|
2076
2386
|
* Asynchronous readdir(3) - read a directory.
|
|
2077
2387
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
@@ -2157,7 +2467,7 @@ declare module "fs" {
|
|
|
2157
2467
|
* If `options.withFileTypes` is set to `true`, the result will contain `fs.Dirent` objects.
|
|
2158
2468
|
* @since v0.1.21
|
|
2159
2469
|
*/
|
|
2160
|
-
|
|
2470
|
+
function readdirSync(
|
|
2161
2471
|
path: PathLike,
|
|
2162
2472
|
options?:
|
|
2163
2473
|
| {
|
|
@@ -2173,7 +2483,7 @@ declare module "fs" {
|
|
|
2173
2483
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
2174
2484
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
2175
2485
|
*/
|
|
2176
|
-
|
|
2486
|
+
function readdirSync(
|
|
2177
2487
|
path: PathLike,
|
|
2178
2488
|
options:
|
|
2179
2489
|
| {
|
|
@@ -2188,7 +2498,7 @@ declare module "fs" {
|
|
|
2188
2498
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
2189
2499
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
2190
2500
|
*/
|
|
2191
|
-
|
|
2501
|
+
function readdirSync(
|
|
2192
2502
|
path: PathLike,
|
|
2193
2503
|
options?:
|
|
2194
2504
|
| (ObjectEncodingOptions & {
|
|
@@ -2203,7 +2513,7 @@ declare module "fs" {
|
|
|
2203
2513
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
2204
2514
|
* @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
|
|
2205
2515
|
*/
|
|
2206
|
-
|
|
2516
|
+
function readdirSync(
|
|
2207
2517
|
path: PathLike,
|
|
2208
2518
|
options: ObjectEncodingOptions & {
|
|
2209
2519
|
withFileTypes: true;
|
|
@@ -2215,7 +2525,7 @@ declare module "fs" {
|
|
|
2215
2525
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
2216
2526
|
* @param options Must include `withFileTypes: true` and `encoding: 'buffer'`.
|
|
2217
2527
|
*/
|
|
2218
|
-
|
|
2528
|
+
function readdirSync(
|
|
2219
2529
|
path: PathLike,
|
|
2220
2530
|
options: {
|
|
2221
2531
|
encoding: "buffer";
|
|
@@ -2233,8 +2543,8 @@ declare module "fs" {
|
|
|
2233
2543
|
* See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail.
|
|
2234
2544
|
* @since v0.0.2
|
|
2235
2545
|
*/
|
|
2236
|
-
|
|
2237
|
-
|
|
2546
|
+
function close(fd: number, callback?: NoParamCallback): void;
|
|
2547
|
+
namespace close {
|
|
2238
2548
|
/**
|
|
2239
2549
|
* Asynchronous close(2) - close a file descriptor.
|
|
2240
2550
|
* @param fd A file descriptor.
|
|
@@ -2250,7 +2560,7 @@ declare module "fs" {
|
|
|
2250
2560
|
* See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail.
|
|
2251
2561
|
* @since v0.1.21
|
|
2252
2562
|
*/
|
|
2253
|
-
|
|
2563
|
+
function closeSync(fd: number): void;
|
|
2254
2564
|
/**
|
|
2255
2565
|
* Asynchronous file open. See the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more details.
|
|
2256
2566
|
*
|
|
@@ -2268,7 +2578,7 @@ declare module "fs" {
|
|
|
2268
2578
|
* @param [flags='r'] See `support of file system `flags``.
|
|
2269
2579
|
* @param [mode=0o666]
|
|
2270
2580
|
*/
|
|
2271
|
-
|
|
2581
|
+
function open(
|
|
2272
2582
|
path: PathLike,
|
|
2273
2583
|
flags: OpenMode | undefined,
|
|
2274
2584
|
mode: Mode | undefined | null,
|
|
@@ -2279,7 +2589,7 @@ declare module "fs" {
|
|
|
2279
2589
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
2280
2590
|
* @param [flags='r'] See `support of file system `flags``.
|
|
2281
2591
|
*/
|
|
2282
|
-
|
|
2592
|
+
function open(
|
|
2283
2593
|
path: PathLike,
|
|
2284
2594
|
flags: OpenMode | undefined,
|
|
2285
2595
|
callback: (err: NodeJS.ErrnoException | null, fd: number) => void,
|
|
@@ -2288,8 +2598,8 @@ declare module "fs" {
|
|
|
2288
2598
|
* Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`.
|
|
2289
2599
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
2290
2600
|
*/
|
|
2291
|
-
|
|
2292
|
-
|
|
2601
|
+
function open(path: PathLike, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
|
|
2602
|
+
namespace open {
|
|
2293
2603
|
/**
|
|
2294
2604
|
* Asynchronous open(2) - open and possibly create a file.
|
|
2295
2605
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
@@ -2306,7 +2616,7 @@ declare module "fs" {
|
|
|
2306
2616
|
* @param [flags='r']
|
|
2307
2617
|
* @param [mode=0o666]
|
|
2308
2618
|
*/
|
|
2309
|
-
|
|
2619
|
+
function openSync(path: PathLike, flags: OpenMode, mode?: Mode | null): number;
|
|
2310
2620
|
/**
|
|
2311
2621
|
* Change the file system timestamps of the object referenced by `path`.
|
|
2312
2622
|
*
|
|
@@ -2316,8 +2626,8 @@ declare module "fs" {
|
|
|
2316
2626
|
* * If the value can not be converted to a number, or is `NaN`, `Infinity`, or `-Infinity`, an `Error` will be thrown.
|
|
2317
2627
|
* @since v0.4.2
|
|
2318
2628
|
*/
|
|
2319
|
-
|
|
2320
|
-
|
|
2629
|
+
function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void;
|
|
2630
|
+
namespace utimes {
|
|
2321
2631
|
/**
|
|
2322
2632
|
* Asynchronously change file timestamps of the file referenced by the supplied path.
|
|
2323
2633
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
@@ -2333,14 +2643,14 @@ declare module "fs" {
|
|
|
2333
2643
|
* this API: {@link utimes}.
|
|
2334
2644
|
* @since v0.4.2
|
|
2335
2645
|
*/
|
|
2336
|
-
|
|
2646
|
+
function utimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void;
|
|
2337
2647
|
/**
|
|
2338
2648
|
* Change the file system timestamps of the object referenced by the supplied file
|
|
2339
2649
|
* descriptor. See {@link utimes}.
|
|
2340
2650
|
* @since v0.4.2
|
|
2341
2651
|
*/
|
|
2342
|
-
|
|
2343
|
-
|
|
2652
|
+
function futimes(fd: number, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void;
|
|
2653
|
+
namespace futimes {
|
|
2344
2654
|
/**
|
|
2345
2655
|
* Asynchronously change file timestamps of the file referenced by the supplied file descriptor.
|
|
2346
2656
|
* @param fd A file descriptor.
|
|
@@ -2353,7 +2663,7 @@ declare module "fs" {
|
|
|
2353
2663
|
* Synchronous version of {@link futimes}. Returns `undefined`.
|
|
2354
2664
|
* @since v0.4.2
|
|
2355
2665
|
*/
|
|
2356
|
-
|
|
2666
|
+
function futimesSync(fd: number, atime: TimeLike, mtime: TimeLike): void;
|
|
2357
2667
|
/**
|
|
2358
2668
|
* Request that all data for the open file descriptor is flushed to the storage
|
|
2359
2669
|
* device. The specific implementation is operating system and device specific.
|
|
@@ -2361,8 +2671,8 @@ declare module "fs" {
|
|
|
2361
2671
|
* than a possible exception are given to the completion callback.
|
|
2362
2672
|
* @since v0.1.96
|
|
2363
2673
|
*/
|
|
2364
|
-
|
|
2365
|
-
|
|
2674
|
+
function fsync(fd: number, callback: NoParamCallback): void;
|
|
2675
|
+
namespace fsync {
|
|
2366
2676
|
/**
|
|
2367
2677
|
* Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
|
|
2368
2678
|
* @param fd A file descriptor.
|
|
@@ -2375,8 +2685,8 @@ declare module "fs" {
|
|
|
2375
2685
|
* Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. Returns `undefined`.
|
|
2376
2686
|
* @since v0.1.96
|
|
2377
2687
|
*/
|
|
2378
|
-
|
|
2379
|
-
|
|
2688
|
+
function fsyncSync(fd: number): void;
|
|
2689
|
+
interface WriteOptions {
|
|
2380
2690
|
/**
|
|
2381
2691
|
* @default 0
|
|
2382
2692
|
*/
|
|
@@ -2417,7 +2727,7 @@ declare module "fs" {
|
|
|
2417
2727
|
* @param [length=buffer.byteLength - offset]
|
|
2418
2728
|
* @param [position='null']
|
|
2419
2729
|
*/
|
|
2420
|
-
|
|
2730
|
+
function write<TBuffer extends NodeJS.ArrayBufferView>(
|
|
2421
2731
|
fd: number,
|
|
2422
2732
|
buffer: TBuffer,
|
|
2423
2733
|
offset: number | undefined | null,
|
|
@@ -2431,7 +2741,7 @@ declare module "fs" {
|
|
|
2431
2741
|
* @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
|
|
2432
2742
|
* @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
|
|
2433
2743
|
*/
|
|
2434
|
-
|
|
2744
|
+
function write<TBuffer extends NodeJS.ArrayBufferView>(
|
|
2435
2745
|
fd: number,
|
|
2436
2746
|
buffer: TBuffer,
|
|
2437
2747
|
offset: number | undefined | null,
|
|
@@ -2443,7 +2753,7 @@ declare module "fs" {
|
|
|
2443
2753
|
* @param fd A file descriptor.
|
|
2444
2754
|
* @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
|
|
2445
2755
|
*/
|
|
2446
|
-
|
|
2756
|
+
function write<TBuffer extends NodeJS.ArrayBufferView>(
|
|
2447
2757
|
fd: number,
|
|
2448
2758
|
buffer: TBuffer,
|
|
2449
2759
|
offset: number | undefined | null,
|
|
@@ -2453,7 +2763,7 @@ declare module "fs" {
|
|
|
2453
2763
|
* Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
|
|
2454
2764
|
* @param fd A file descriptor.
|
|
2455
2765
|
*/
|
|
2456
|
-
|
|
2766
|
+
function write<TBuffer extends NodeJS.ArrayBufferView>(
|
|
2457
2767
|
fd: number,
|
|
2458
2768
|
buffer: TBuffer,
|
|
2459
2769
|
callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void,
|
|
@@ -2466,7 +2776,7 @@ declare module "fs" {
|
|
|
2466
2776
|
* * `length` The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
|
|
2467
2777
|
* * `position` The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
|
|
2468
2778
|
*/
|
|
2469
|
-
|
|
2779
|
+
function write<TBuffer extends NodeJS.ArrayBufferView>(
|
|
2470
2780
|
fd: number,
|
|
2471
2781
|
buffer: TBuffer,
|
|
2472
2782
|
options: WriteOptions,
|
|
@@ -2479,7 +2789,7 @@ declare module "fs" {
|
|
|
2479
2789
|
* @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
|
|
2480
2790
|
* @param encoding The expected string encoding.
|
|
2481
2791
|
*/
|
|
2482
|
-
|
|
2792
|
+
function write(
|
|
2483
2793
|
fd: number,
|
|
2484
2794
|
string: string,
|
|
2485
2795
|
position: number | undefined | null,
|
|
@@ -2492,7 +2802,7 @@ declare module "fs" {
|
|
|
2492
2802
|
* @param string A string to write.
|
|
2493
2803
|
* @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
|
|
2494
2804
|
*/
|
|
2495
|
-
|
|
2805
|
+
function write(
|
|
2496
2806
|
fd: number,
|
|
2497
2807
|
string: string,
|
|
2498
2808
|
position: number | undefined | null,
|
|
@@ -2503,12 +2813,12 @@ declare module "fs" {
|
|
|
2503
2813
|
* @param fd A file descriptor.
|
|
2504
2814
|
* @param string A string to write.
|
|
2505
2815
|
*/
|
|
2506
|
-
|
|
2816
|
+
function write(
|
|
2507
2817
|
fd: number,
|
|
2508
2818
|
string: string,
|
|
2509
2819
|
callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void,
|
|
2510
2820
|
): void;
|
|
2511
|
-
|
|
2821
|
+
namespace write {
|
|
2512
2822
|
/**
|
|
2513
2823
|
* Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
|
|
2514
2824
|
* @param fd A file descriptor.
|
|
@@ -2568,7 +2878,7 @@ declare module "fs" {
|
|
|
2568
2878
|
* @param [position='null']
|
|
2569
2879
|
* @return The number of bytes written.
|
|
2570
2880
|
*/
|
|
2571
|
-
|
|
2881
|
+
function writeSync(
|
|
2572
2882
|
fd: number,
|
|
2573
2883
|
buffer: NodeJS.ArrayBufferView,
|
|
2574
2884
|
offset?: number | null,
|
|
@@ -2582,14 +2892,14 @@ declare module "fs" {
|
|
|
2582
2892
|
* @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
|
|
2583
2893
|
* @param encoding The expected string encoding.
|
|
2584
2894
|
*/
|
|
2585
|
-
|
|
2895
|
+
function writeSync(
|
|
2586
2896
|
fd: number,
|
|
2587
2897
|
string: string,
|
|
2588
2898
|
position?: number | null,
|
|
2589
2899
|
encoding?: BufferEncoding | null,
|
|
2590
2900
|
): number;
|
|
2591
|
-
|
|
2592
|
-
|
|
2901
|
+
type ReadPosition = number | bigint;
|
|
2902
|
+
interface ReadOptions {
|
|
2593
2903
|
/**
|
|
2594
2904
|
* @default 0
|
|
2595
2905
|
*/
|
|
@@ -2603,15 +2913,15 @@ declare module "fs" {
|
|
|
2603
2913
|
*/
|
|
2604
2914
|
position?: ReadPosition | null | undefined;
|
|
2605
2915
|
}
|
|
2606
|
-
|
|
2916
|
+
interface ReadOptionsWithBuffer<T extends NodeJS.ArrayBufferView> extends ReadOptions {
|
|
2607
2917
|
buffer?: T | undefined;
|
|
2608
2918
|
}
|
|
2609
2919
|
/** @deprecated Use `ReadOptions` instead. */
|
|
2610
2920
|
// TODO: remove in future major
|
|
2611
|
-
|
|
2921
|
+
interface ReadSyncOptions extends ReadOptions {}
|
|
2612
2922
|
/** @deprecated Use `ReadOptionsWithBuffer` instead. */
|
|
2613
2923
|
// TODO: remove in future major
|
|
2614
|
-
|
|
2924
|
+
interface ReadAsyncOptions<T extends NodeJS.ArrayBufferView> extends ReadOptionsWithBuffer<T> {}
|
|
2615
2925
|
/**
|
|
2616
2926
|
* Read data from the file specified by `fd`.
|
|
2617
2927
|
*
|
|
@@ -2629,7 +2939,7 @@ declare module "fs" {
|
|
|
2629
2939
|
* @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
|
|
2630
2940
|
* `position` is an integer, the file position will be unchanged.
|
|
2631
2941
|
*/
|
|
2632
|
-
|
|
2942
|
+
function read<TBuffer extends NodeJS.ArrayBufferView>(
|
|
2633
2943
|
fd: number,
|
|
2634
2944
|
buffer: TBuffer,
|
|
2635
2945
|
offset: number,
|
|
@@ -2646,27 +2956,27 @@ declare module "fs" {
|
|
|
2646
2956
|
* `position` defaults to `null`
|
|
2647
2957
|
* @since v12.17.0, 13.11.0
|
|
2648
2958
|
*/
|
|
2649
|
-
|
|
2959
|
+
function read<TBuffer extends NodeJS.ArrayBufferView = NonSharedBuffer>(
|
|
2650
2960
|
fd: number,
|
|
2651
2961
|
options: ReadOptionsWithBuffer<TBuffer>,
|
|
2652
2962
|
callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void,
|
|
2653
2963
|
): void;
|
|
2654
|
-
|
|
2964
|
+
function read<TBuffer extends NodeJS.ArrayBufferView>(
|
|
2655
2965
|
fd: number,
|
|
2656
2966
|
buffer: TBuffer,
|
|
2657
2967
|
options: ReadOptions,
|
|
2658
2968
|
callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void,
|
|
2659
2969
|
): void;
|
|
2660
|
-
|
|
2970
|
+
function read<TBuffer extends NodeJS.ArrayBufferView>(
|
|
2661
2971
|
fd: number,
|
|
2662
2972
|
buffer: TBuffer,
|
|
2663
2973
|
callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void,
|
|
2664
2974
|
): void;
|
|
2665
|
-
|
|
2975
|
+
function read(
|
|
2666
2976
|
fd: number,
|
|
2667
2977
|
callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: NonSharedBuffer) => void,
|
|
2668
2978
|
): void;
|
|
2669
|
-
|
|
2979
|
+
namespace read {
|
|
2670
2980
|
/**
|
|
2671
2981
|
* @param fd A file descriptor.
|
|
2672
2982
|
* @param buffer The buffer that the data will be written to.
|
|
@@ -2704,7 +3014,7 @@ declare module "fs" {
|
|
|
2704
3014
|
* @since v0.1.21
|
|
2705
3015
|
* @param [position='null']
|
|
2706
3016
|
*/
|
|
2707
|
-
|
|
3017
|
+
function readSync(
|
|
2708
3018
|
fd: number,
|
|
2709
3019
|
buffer: NodeJS.ArrayBufferView,
|
|
2710
3020
|
offset: number,
|
|
@@ -2715,7 +3025,7 @@ declare module "fs" {
|
|
|
2715
3025
|
* Similar to the above `fs.readSync` function, this version takes an optional `options` object.
|
|
2716
3026
|
* If no `options` object is specified, it will default with the above values.
|
|
2717
3027
|
*/
|
|
2718
|
-
|
|
3028
|
+
function readSync(fd: number, buffer: NodeJS.ArrayBufferView, opts?: ReadOptions): number;
|
|
2719
3029
|
/**
|
|
2720
3030
|
* Asynchronously reads the entire contents of a file.
|
|
2721
3031
|
*
|
|
@@ -2782,7 +3092,7 @@ declare module "fs" {
|
|
|
2782
3092
|
* @since v0.1.29
|
|
2783
3093
|
* @param path filename or file descriptor
|
|
2784
3094
|
*/
|
|
2785
|
-
|
|
3095
|
+
function readFile(
|
|
2786
3096
|
path: PathOrFileDescriptor,
|
|
2787
3097
|
options:
|
|
2788
3098
|
| ({
|
|
@@ -2800,7 +3110,7 @@ declare module "fs" {
|
|
|
2800
3110
|
* @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
|
|
2801
3111
|
* If a flag is not provided, it defaults to `'r'`.
|
|
2802
3112
|
*/
|
|
2803
|
-
|
|
3113
|
+
function readFile(
|
|
2804
3114
|
path: PathOrFileDescriptor,
|
|
2805
3115
|
options:
|
|
2806
3116
|
| ({
|
|
@@ -2817,7 +3127,7 @@ declare module "fs" {
|
|
|
2817
3127
|
* @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
|
|
2818
3128
|
* If a flag is not provided, it defaults to `'r'`.
|
|
2819
3129
|
*/
|
|
2820
|
-
|
|
3130
|
+
function readFile(
|
|
2821
3131
|
path: PathOrFileDescriptor,
|
|
2822
3132
|
options:
|
|
2823
3133
|
| (ObjectEncodingOptions & {
|
|
@@ -2833,11 +3143,11 @@ declare module "fs" {
|
|
|
2833
3143
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
2834
3144
|
* If a file descriptor is provided, the underlying file will _not_ be closed automatically.
|
|
2835
3145
|
*/
|
|
2836
|
-
|
|
3146
|
+
function readFile(
|
|
2837
3147
|
path: PathOrFileDescriptor,
|
|
2838
3148
|
callback: (err: NodeJS.ErrnoException | null, data: NonSharedBuffer) => void,
|
|
2839
3149
|
): void;
|
|
2840
|
-
|
|
3150
|
+
namespace readFile {
|
|
2841
3151
|
/**
|
|
2842
3152
|
* Asynchronously reads the entire contents of a file.
|
|
2843
3153
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
@@ -2911,7 +3221,7 @@ declare module "fs" {
|
|
|
2911
3221
|
* @since v0.1.8
|
|
2912
3222
|
* @param path filename or file descriptor
|
|
2913
3223
|
*/
|
|
2914
|
-
|
|
3224
|
+
function readFileSync(
|
|
2915
3225
|
path: PathOrFileDescriptor,
|
|
2916
3226
|
options?: {
|
|
2917
3227
|
encoding?: null | undefined;
|
|
@@ -2925,7 +3235,7 @@ declare module "fs" {
|
|
|
2925
3235
|
* @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
|
|
2926
3236
|
* If a flag is not provided, it defaults to `'r'`.
|
|
2927
3237
|
*/
|
|
2928
|
-
|
|
3238
|
+
function readFileSync(
|
|
2929
3239
|
path: PathOrFileDescriptor,
|
|
2930
3240
|
options:
|
|
2931
3241
|
| {
|
|
@@ -2941,7 +3251,7 @@ declare module "fs" {
|
|
|
2941
3251
|
* @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
|
|
2942
3252
|
* If a flag is not provided, it defaults to `'r'`.
|
|
2943
3253
|
*/
|
|
2944
|
-
|
|
3254
|
+
function readFileSync(
|
|
2945
3255
|
path: PathOrFileDescriptor,
|
|
2946
3256
|
options?:
|
|
2947
3257
|
| (ObjectEncodingOptions & {
|
|
@@ -2950,7 +3260,7 @@ declare module "fs" {
|
|
|
2950
3260
|
| BufferEncoding
|
|
2951
3261
|
| null,
|
|
2952
3262
|
): string | NonSharedBuffer;
|
|
2953
|
-
|
|
3263
|
+
type WriteFileOptions =
|
|
2954
3264
|
| (
|
|
2955
3265
|
& ObjectEncodingOptions
|
|
2956
3266
|
& Abortable
|
|
@@ -3023,7 +3333,7 @@ declare module "fs" {
|
|
|
3023
3333
|
* @since v0.1.29
|
|
3024
3334
|
* @param file filename or file descriptor
|
|
3025
3335
|
*/
|
|
3026
|
-
|
|
3336
|
+
function writeFile(
|
|
3027
3337
|
file: PathOrFileDescriptor,
|
|
3028
3338
|
data: string | NodeJS.ArrayBufferView,
|
|
3029
3339
|
options: WriteFileOptions,
|
|
@@ -3035,12 +3345,12 @@ declare module "fs" {
|
|
|
3035
3345
|
* If a file descriptor is provided, the underlying file will _not_ be closed automatically.
|
|
3036
3346
|
* @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
|
|
3037
3347
|
*/
|
|
3038
|
-
|
|
3348
|
+
function writeFile(
|
|
3039
3349
|
path: PathOrFileDescriptor,
|
|
3040
3350
|
data: string | NodeJS.ArrayBufferView,
|
|
3041
3351
|
callback: NoParamCallback,
|
|
3042
3352
|
): void;
|
|
3043
|
-
|
|
3353
|
+
namespace writeFile {
|
|
3044
3354
|
/**
|
|
3045
3355
|
* Asynchronously writes data to a file, replacing the file if it already exists.
|
|
3046
3356
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
@@ -3069,7 +3379,7 @@ declare module "fs" {
|
|
|
3069
3379
|
* @since v0.1.29
|
|
3070
3380
|
* @param file filename or file descriptor
|
|
3071
3381
|
*/
|
|
3072
|
-
|
|
3382
|
+
function writeFileSync(
|
|
3073
3383
|
file: PathOrFileDescriptor,
|
|
3074
3384
|
data: string | NodeJS.ArrayBufferView,
|
|
3075
3385
|
options?: WriteFileOptions,
|
|
@@ -3127,7 +3437,7 @@ declare module "fs" {
|
|
|
3127
3437
|
* @since v0.6.7
|
|
3128
3438
|
* @param path filename or file descriptor
|
|
3129
3439
|
*/
|
|
3130
|
-
|
|
3440
|
+
function appendFile(
|
|
3131
3441
|
path: PathOrFileDescriptor,
|
|
3132
3442
|
data: string | Uint8Array,
|
|
3133
3443
|
options: WriteFileOptions,
|
|
@@ -3139,8 +3449,8 @@ declare module "fs" {
|
|
|
3139
3449
|
* If a file descriptor is provided, the underlying file will _not_ be closed automatically.
|
|
3140
3450
|
* @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
|
|
3141
3451
|
*/
|
|
3142
|
-
|
|
3143
|
-
|
|
3452
|
+
function appendFile(file: PathOrFileDescriptor, data: string | Uint8Array, callback: NoParamCallback): void;
|
|
3453
|
+
namespace appendFile {
|
|
3144
3454
|
/**
|
|
3145
3455
|
* Asynchronously append data to a file, creating the file if it does not exist.
|
|
3146
3456
|
* @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
@@ -3206,7 +3516,7 @@ declare module "fs" {
|
|
|
3206
3516
|
* @since v0.6.7
|
|
3207
3517
|
* @param path filename or file descriptor
|
|
3208
3518
|
*/
|
|
3209
|
-
|
|
3519
|
+
function appendFileSync(
|
|
3210
3520
|
path: PathOrFileDescriptor,
|
|
3211
3521
|
data: string | Uint8Array,
|
|
3212
3522
|
options?: WriteFileOptions,
|
|
@@ -3257,7 +3567,7 @@ declare module "fs" {
|
|
|
3257
3567
|
* * the file is renamed and then renamed a second time back to its original name
|
|
3258
3568
|
* @since v0.1.31
|
|
3259
3569
|
*/
|
|
3260
|
-
|
|
3570
|
+
interface WatchFileOptions {
|
|
3261
3571
|
bigint?: boolean | undefined;
|
|
3262
3572
|
persistent?: boolean | undefined;
|
|
3263
3573
|
interval?: number | undefined;
|
|
@@ -3308,7 +3618,7 @@ declare module "fs" {
|
|
|
3308
3618
|
* * the file is renamed and then renamed a second time back to its original name
|
|
3309
3619
|
* @since v0.1.31
|
|
3310
3620
|
*/
|
|
3311
|
-
|
|
3621
|
+
function watchFile(
|
|
3312
3622
|
filename: PathLike,
|
|
3313
3623
|
options:
|
|
3314
3624
|
| (WatchFileOptions & {
|
|
@@ -3317,7 +3627,7 @@ declare module "fs" {
|
|
|
3317
3627
|
| undefined,
|
|
3318
3628
|
listener: StatsListener,
|
|
3319
3629
|
): StatWatcher;
|
|
3320
|
-
|
|
3630
|
+
function watchFile(
|
|
3321
3631
|
filename: PathLike,
|
|
3322
3632
|
options:
|
|
3323
3633
|
| (WatchFileOptions & {
|
|
@@ -3330,7 +3640,7 @@ declare module "fs" {
|
|
|
3330
3640
|
* Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed.
|
|
3331
3641
|
* @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
|
|
3332
3642
|
*/
|
|
3333
|
-
|
|
3643
|
+
function watchFile(filename: PathLike, listener: StatsListener): StatWatcher;
|
|
3334
3644
|
/**
|
|
3335
3645
|
* Stop watching for changes on `filename`. If `listener` is specified, only that
|
|
3336
3646
|
* particular listener is removed. Otherwise, _all_ listeners are removed,
|
|
@@ -3343,23 +3653,25 @@ declare module "fs" {
|
|
|
3343
3653
|
* @since v0.1.31
|
|
3344
3654
|
* @param listener Optional, a listener previously attached using `fs.watchFile()`
|
|
3345
3655
|
*/
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3656
|
+
function unwatchFile(filename: PathLike, listener?: StatsListener): void;
|
|
3657
|
+
function unwatchFile(filename: PathLike, listener?: BigIntStatsListener): void;
|
|
3658
|
+
type WatchIgnorePredicate = string | RegExp | ((filename: string) => boolean);
|
|
3659
|
+
interface WatchOptions extends Abortable {
|
|
3349
3660
|
encoding?: BufferEncoding | "buffer" | undefined;
|
|
3350
3661
|
persistent?: boolean | undefined;
|
|
3351
3662
|
recursive?: boolean | undefined;
|
|
3663
|
+
ignore?: WatchIgnorePredicate | readonly WatchIgnorePredicate[] | undefined;
|
|
3352
3664
|
}
|
|
3353
|
-
|
|
3665
|
+
interface WatchOptionsWithBufferEncoding extends WatchOptions {
|
|
3354
3666
|
encoding: "buffer";
|
|
3355
3667
|
}
|
|
3356
|
-
|
|
3668
|
+
interface WatchOptionsWithStringEncoding extends WatchOptions {
|
|
3357
3669
|
encoding?: BufferEncoding | undefined;
|
|
3358
3670
|
}
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3671
|
+
type WatchEventType = "rename" | "change";
|
|
3672
|
+
type WatchListener<T> = (event: WatchEventType, filename: T | null) => void;
|
|
3673
|
+
type StatsListener = (curr: Stats, prev: Stats) => void;
|
|
3674
|
+
type BigIntStatsListener = (curr: BigIntStats, prev: BigIntStats) => void;
|
|
3363
3675
|
/**
|
|
3364
3676
|
* Watch for changes on `filename`, where `filename` is either a file or a
|
|
3365
3677
|
* directory.
|
|
@@ -3380,22 +3692,22 @@ declare module "fs" {
|
|
|
3380
3692
|
* @since v0.5.10
|
|
3381
3693
|
* @param listener
|
|
3382
3694
|
*/
|
|
3383
|
-
|
|
3695
|
+
function watch(
|
|
3384
3696
|
filename: PathLike,
|
|
3385
3697
|
options?: WatchOptionsWithStringEncoding | BufferEncoding | null,
|
|
3386
3698
|
listener?: WatchListener<string>,
|
|
3387
3699
|
): FSWatcher;
|
|
3388
|
-
|
|
3700
|
+
function watch(
|
|
3389
3701
|
filename: PathLike,
|
|
3390
3702
|
options: WatchOptionsWithBufferEncoding | "buffer",
|
|
3391
3703
|
listener: WatchListener<NonSharedBuffer>,
|
|
3392
3704
|
): FSWatcher;
|
|
3393
|
-
|
|
3705
|
+
function watch(
|
|
3394
3706
|
filename: PathLike,
|
|
3395
3707
|
options: WatchOptions | BufferEncoding | "buffer" | null,
|
|
3396
3708
|
listener: WatchListener<string | NonSharedBuffer>,
|
|
3397
3709
|
): FSWatcher;
|
|
3398
|
-
|
|
3710
|
+
function watch(filename: PathLike, listener: WatchListener<string>): FSWatcher;
|
|
3399
3711
|
/**
|
|
3400
3712
|
* Test whether or not the given path exists by checking with the file system.
|
|
3401
3713
|
* Then call the `callback` argument with either true or false:
|
|
@@ -3525,9 +3837,9 @@ declare module "fs" {
|
|
|
3525
3837
|
* @since v0.0.2
|
|
3526
3838
|
* @deprecated Since v1.0.0 - Use {@link stat} or {@link access} instead.
|
|
3527
3839
|
*/
|
|
3528
|
-
|
|
3840
|
+
function exists(path: PathLike, callback: (exists: boolean) => void): void;
|
|
3529
3841
|
/** @deprecated */
|
|
3530
|
-
|
|
3842
|
+
namespace exists {
|
|
3531
3843
|
/**
|
|
3532
3844
|
* @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
|
|
3533
3845
|
* URL support is _experimental_.
|
|
@@ -3551,8 +3863,8 @@ declare module "fs" {
|
|
|
3551
3863
|
* ```
|
|
3552
3864
|
* @since v0.1.21
|
|
3553
3865
|
*/
|
|
3554
|
-
|
|
3555
|
-
|
|
3866
|
+
function existsSync(path: PathLike): boolean;
|
|
3867
|
+
namespace constants {
|
|
3556
3868
|
// File Access Constants
|
|
3557
3869
|
/** Constant for fs.access(). File is visible to the calling process. */
|
|
3558
3870
|
const F_OK: number;
|
|
@@ -3826,13 +4138,13 @@ declare module "fs" {
|
|
|
3826
4138
|
* @since v0.11.15
|
|
3827
4139
|
* @param [mode=fs.constants.F_OK]
|
|
3828
4140
|
*/
|
|
3829
|
-
|
|
4141
|
+
function access(path: PathLike, mode: number | undefined, callback: NoParamCallback): void;
|
|
3830
4142
|
/**
|
|
3831
4143
|
* Asynchronously tests a user's permissions for the file specified by path.
|
|
3832
4144
|
* @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
|
|
3833
4145
|
*/
|
|
3834
|
-
|
|
3835
|
-
|
|
4146
|
+
function access(path: PathLike, callback: NoParamCallback): void;
|
|
4147
|
+
namespace access {
|
|
3836
4148
|
/**
|
|
3837
4149
|
* Asynchronously tests a user's permissions for the file specified by path.
|
|
3838
4150
|
* @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
|
|
@@ -3863,11 +4175,11 @@ declare module "fs" {
|
|
|
3863
4175
|
* @since v0.11.15
|
|
3864
4176
|
* @param [mode=fs.constants.F_OK]
|
|
3865
4177
|
*/
|
|
3866
|
-
|
|
4178
|
+
function accessSync(path: PathLike, mode?: number): void;
|
|
3867
4179
|
interface StreamOptions {
|
|
3868
4180
|
flags?: string | undefined;
|
|
3869
4181
|
encoding?: BufferEncoding | undefined;
|
|
3870
|
-
fd?: number |
|
|
4182
|
+
fd?: number | FileHandle | undefined;
|
|
3871
4183
|
mode?: number | undefined;
|
|
3872
4184
|
autoClose?: boolean | undefined;
|
|
3873
4185
|
emitClose?: boolean | undefined;
|
|
@@ -3955,7 +4267,7 @@ declare module "fs" {
|
|
|
3955
4267
|
* If `options` is a string, then it specifies the encoding.
|
|
3956
4268
|
* @since v0.1.31
|
|
3957
4269
|
*/
|
|
3958
|
-
|
|
4270
|
+
function createReadStream(path: PathLike, options?: BufferEncoding | ReadStreamOptions): ReadStream;
|
|
3959
4271
|
/**
|
|
3960
4272
|
* `options` may also include a `start` option to allow writing data at some
|
|
3961
4273
|
* position past the beginning of the file, allowed values are in the
|
|
@@ -3983,7 +4295,7 @@ declare module "fs" {
|
|
|
3983
4295
|
* If `options` is a string, then it specifies the encoding.
|
|
3984
4296
|
* @since v0.1.31
|
|
3985
4297
|
*/
|
|
3986
|
-
|
|
4298
|
+
function createWriteStream(path: PathLike, options?: BufferEncoding | WriteStreamOptions): WriteStream;
|
|
3987
4299
|
/**
|
|
3988
4300
|
* Forces all currently queued I/O operations associated with the file to the
|
|
3989
4301
|
* 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
|
|
@@ -3991,8 +4303,8 @@ declare module "fs" {
|
|
|
3991
4303
|
* exception are given to the completion callback.
|
|
3992
4304
|
* @since v0.1.96
|
|
3993
4305
|
*/
|
|
3994
|
-
|
|
3995
|
-
|
|
4306
|
+
function fdatasync(fd: number, callback: NoParamCallback): void;
|
|
4307
|
+
namespace fdatasync {
|
|
3996
4308
|
/**
|
|
3997
4309
|
* Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
|
|
3998
4310
|
* @param fd A file descriptor.
|
|
@@ -4004,7 +4316,7 @@ declare module "fs" {
|
|
|
4004
4316
|
* 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`.
|
|
4005
4317
|
* @since v0.1.96
|
|
4006
4318
|
*/
|
|
4007
|
-
|
|
4319
|
+
function fdatasyncSync(fd: number): void;
|
|
4008
4320
|
/**
|
|
4009
4321
|
* Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it
|
|
4010
4322
|
* already exists. No arguments other than a possible exception are given to the
|
|
@@ -4044,9 +4356,9 @@ declare module "fs" {
|
|
|
4044
4356
|
* @param dest destination filename of the copy operation
|
|
4045
4357
|
* @param [mode=0] modifiers for copy operation.
|
|
4046
4358
|
*/
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4359
|
+
function copyFile(src: PathLike, dest: PathLike, callback: NoParamCallback): void;
|
|
4360
|
+
function copyFile(src: PathLike, dest: PathLike, mode: number, callback: NoParamCallback): void;
|
|
4361
|
+
namespace copyFile {
|
|
4050
4362
|
function __promisify__(src: PathLike, dst: PathLike, mode?: number): Promise<void>;
|
|
4051
4363
|
}
|
|
4052
4364
|
/**
|
|
@@ -4083,7 +4395,7 @@ declare module "fs" {
|
|
|
4083
4395
|
* @param dest destination filename of the copy operation
|
|
4084
4396
|
* @param [mode=0] modifiers for copy operation.
|
|
4085
4397
|
*/
|
|
4086
|
-
|
|
4398
|
+
function copyFileSync(src: PathLike, dest: PathLike, mode?: number): void;
|
|
4087
4399
|
/**
|
|
4088
4400
|
* Write an array of `ArrayBufferView`s to the file specified by `fd` using `writev()`.
|
|
4089
4401
|
*
|
|
@@ -4104,12 +4416,12 @@ declare module "fs" {
|
|
|
4104
4416
|
* @since v12.9.0
|
|
4105
4417
|
* @param [position='null']
|
|
4106
4418
|
*/
|
|
4107
|
-
|
|
4419
|
+
function writev<TBuffers extends readonly NodeJS.ArrayBufferView[]>(
|
|
4108
4420
|
fd: number,
|
|
4109
4421
|
buffers: TBuffers,
|
|
4110
4422
|
cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: TBuffers) => void,
|
|
4111
4423
|
): void;
|
|
4112
|
-
|
|
4424
|
+
function writev<TBuffers extends readonly NodeJS.ArrayBufferView[]>(
|
|
4113
4425
|
fd: number,
|
|
4114
4426
|
buffers: TBuffers,
|
|
4115
4427
|
position: number | null,
|
|
@@ -4117,11 +4429,11 @@ declare module "fs" {
|
|
|
4117
4429
|
): void;
|
|
4118
4430
|
// Providing a default type parameter doesn't provide true BC for userland consumers, but at least suppresses TS2314
|
|
4119
4431
|
// TODO: remove default in future major version
|
|
4120
|
-
|
|
4432
|
+
interface WriteVResult<T extends readonly NodeJS.ArrayBufferView[] = NodeJS.ArrayBufferView[]> {
|
|
4121
4433
|
bytesWritten: number;
|
|
4122
4434
|
buffers: T;
|
|
4123
4435
|
}
|
|
4124
|
-
|
|
4436
|
+
namespace writev {
|
|
4125
4437
|
function __promisify__<TBuffers extends readonly NodeJS.ArrayBufferView[]>(
|
|
4126
4438
|
fd: number,
|
|
4127
4439
|
buffers: TBuffers,
|
|
@@ -4135,7 +4447,7 @@ declare module "fs" {
|
|
|
4135
4447
|
* @param [position='null']
|
|
4136
4448
|
* @return The number of bytes written.
|
|
4137
4449
|
*/
|
|
4138
|
-
|
|
4450
|
+
function writevSync(fd: number, buffers: readonly NodeJS.ArrayBufferView[], position?: number): number;
|
|
4139
4451
|
/**
|
|
4140
4452
|
* Read from a file specified by `fd` and write to an array of `ArrayBufferView`s
|
|
4141
4453
|
* using `readv()`.
|
|
@@ -4151,12 +4463,12 @@ declare module "fs" {
|
|
|
4151
4463
|
* @since v13.13.0, v12.17.0
|
|
4152
4464
|
* @param [position='null']
|
|
4153
4465
|
*/
|
|
4154
|
-
|
|
4466
|
+
function readv<TBuffers extends readonly NodeJS.ArrayBufferView[]>(
|
|
4155
4467
|
fd: number,
|
|
4156
4468
|
buffers: TBuffers,
|
|
4157
4469
|
cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: TBuffers) => void,
|
|
4158
4470
|
): void;
|
|
4159
|
-
|
|
4471
|
+
function readv<TBuffers extends readonly NodeJS.ArrayBufferView[]>(
|
|
4160
4472
|
fd: number,
|
|
4161
4473
|
buffers: TBuffers,
|
|
4162
4474
|
position: number | null,
|
|
@@ -4164,11 +4476,11 @@ declare module "fs" {
|
|
|
4164
4476
|
): void;
|
|
4165
4477
|
// Providing a default type parameter doesn't provide true BC for userland consumers, but at least suppresses TS2314
|
|
4166
4478
|
// TODO: remove default in future major version
|
|
4167
|
-
|
|
4479
|
+
interface ReadVResult<T extends readonly NodeJS.ArrayBufferView[] = NodeJS.ArrayBufferView[]> {
|
|
4168
4480
|
bytesRead: number;
|
|
4169
4481
|
buffers: T;
|
|
4170
4482
|
}
|
|
4171
|
-
|
|
4483
|
+
namespace readv {
|
|
4172
4484
|
function __promisify__<TBuffers extends readonly NodeJS.ArrayBufferView[]>(
|
|
4173
4485
|
fd: number,
|
|
4174
4486
|
buffers: TBuffers,
|
|
@@ -4182,9 +4494,9 @@ declare module "fs" {
|
|
|
4182
4494
|
* @param [position='null']
|
|
4183
4495
|
* @return The number of bytes read.
|
|
4184
4496
|
*/
|
|
4185
|
-
|
|
4497
|
+
function readvSync(fd: number, buffers: readonly NodeJS.ArrayBufferView[], position?: number): number;
|
|
4186
4498
|
|
|
4187
|
-
|
|
4499
|
+
interface OpenAsBlobOptions {
|
|
4188
4500
|
/**
|
|
4189
4501
|
* An optional mime type for the blob.
|
|
4190
4502
|
*
|
|
@@ -4210,9 +4522,9 @@ declare module "fs" {
|
|
|
4210
4522
|
* ```
|
|
4211
4523
|
* @since v19.8.0
|
|
4212
4524
|
*/
|
|
4213
|
-
|
|
4525
|
+
function openAsBlob(path: PathLike, options?: OpenAsBlobOptions): Promise<Blob>;
|
|
4214
4526
|
|
|
4215
|
-
|
|
4527
|
+
interface OpenDirOptions {
|
|
4216
4528
|
/**
|
|
4217
4529
|
* @default 'utf8'
|
|
4218
4530
|
*/
|
|
@@ -4239,7 +4551,7 @@ declare module "fs" {
|
|
|
4239
4551
|
* directory and subsequent read operations.
|
|
4240
4552
|
* @since v12.12.0
|
|
4241
4553
|
*/
|
|
4242
|
-
|
|
4554
|
+
function opendirSync(path: PathLike, options?: OpenDirOptions): Dir;
|
|
4243
4555
|
/**
|
|
4244
4556
|
* Asynchronously open a directory. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for
|
|
4245
4557
|
* more details.
|
|
@@ -4251,30 +4563,30 @@ declare module "fs" {
|
|
|
4251
4563
|
* directory and subsequent read operations.
|
|
4252
4564
|
* @since v12.12.0
|
|
4253
4565
|
*/
|
|
4254
|
-
|
|
4255
|
-
|
|
4566
|
+
function opendir(path: PathLike, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void;
|
|
4567
|
+
function opendir(
|
|
4256
4568
|
path: PathLike,
|
|
4257
4569
|
options: OpenDirOptions,
|
|
4258
4570
|
cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void,
|
|
4259
4571
|
): void;
|
|
4260
|
-
|
|
4572
|
+
namespace opendir {
|
|
4261
4573
|
function __promisify__(path: PathLike, options?: OpenDirOptions): Promise<Dir>;
|
|
4262
4574
|
}
|
|
4263
|
-
|
|
4575
|
+
interface BigIntStats extends StatsBase<bigint> {
|
|
4264
4576
|
atimeNs: bigint;
|
|
4265
4577
|
mtimeNs: bigint;
|
|
4266
4578
|
ctimeNs: bigint;
|
|
4267
4579
|
birthtimeNs: bigint;
|
|
4268
4580
|
}
|
|
4269
|
-
|
|
4581
|
+
interface BigIntOptions {
|
|
4270
4582
|
bigint: true;
|
|
4271
4583
|
}
|
|
4272
|
-
|
|
4584
|
+
interface StatOptions {
|
|
4273
4585
|
bigint?: boolean | undefined;
|
|
4274
|
-
}
|
|
4275
|
-
export interface StatSyncOptions extends StatOptions {
|
|
4276
4586
|
throwIfNoEntry?: boolean | undefined;
|
|
4277
4587
|
}
|
|
4588
|
+
/** @deprecated This orphaned interface will be removed in a future version. Use `StatOptions` instead. */
|
|
4589
|
+
interface StatSyncOptions extends StatOptions {}
|
|
4278
4590
|
interface CopyOptionsBase {
|
|
4279
4591
|
/**
|
|
4280
4592
|
* Dereference symlinks
|
|
@@ -4315,14 +4627,14 @@ declare module "fs" {
|
|
|
4315
4627
|
*/
|
|
4316
4628
|
verbatimSymlinks?: boolean | undefined;
|
|
4317
4629
|
}
|
|
4318
|
-
|
|
4630
|
+
interface CopyOptions extends CopyOptionsBase {
|
|
4319
4631
|
/**
|
|
4320
4632
|
* Function to filter copied files/directories. Return
|
|
4321
4633
|
* `true` to copy the item, `false` to ignore it.
|
|
4322
4634
|
*/
|
|
4323
4635
|
filter?: ((source: string, destination: string) => boolean | Promise<boolean>) | undefined;
|
|
4324
4636
|
}
|
|
4325
|
-
|
|
4637
|
+
interface CopySyncOptions extends CopyOptionsBase {
|
|
4326
4638
|
/**
|
|
4327
4639
|
* Function to filter copied files/directories. Return
|
|
4328
4640
|
* `true` to copy the item, `false` to ignore it.
|
|
@@ -4340,12 +4652,12 @@ declare module "fs" {
|
|
|
4340
4652
|
* @param src source path to copy.
|
|
4341
4653
|
* @param dest destination path to copy to.
|
|
4342
4654
|
*/
|
|
4343
|
-
|
|
4655
|
+
function cp(
|
|
4344
4656
|
source: string | URL,
|
|
4345
4657
|
destination: string | URL,
|
|
4346
4658
|
callback: (err: NodeJS.ErrnoException | null) => void,
|
|
4347
4659
|
): void;
|
|
4348
|
-
|
|
4660
|
+
function cp(
|
|
4349
4661
|
source: string | URL,
|
|
4350
4662
|
destination: string | URL,
|
|
4351
4663
|
opts: CopyOptions,
|
|
@@ -4362,8 +4674,9 @@ declare module "fs" {
|
|
|
4362
4674
|
* @param src source path to copy.
|
|
4363
4675
|
* @param dest destination path to copy to.
|
|
4364
4676
|
*/
|
|
4365
|
-
|
|
4677
|
+
function cpSync(source: string | URL, destination: string | URL, opts?: CopySyncOptions): void;
|
|
4366
4678
|
|
|
4679
|
+
// TODO: collapse
|
|
4367
4680
|
interface _GlobOptions<T extends Dirent | string> {
|
|
4368
4681
|
/**
|
|
4369
4682
|
* Current working directory.
|
|
@@ -4380,15 +4693,18 @@ declare module "fs" {
|
|
|
4380
4693
|
* Function to filter out files/directories or a
|
|
4381
4694
|
* list of glob patterns to be excluded. If a function is provided, return
|
|
4382
4695
|
* `true` to exclude the item, `false` to include it.
|
|
4696
|
+
* If a string array is provided, each string should be a glob pattern that
|
|
4697
|
+
* specifies paths to exclude. Note: Negation patterns (e.g., '!foo.js') are
|
|
4698
|
+
* not supported.
|
|
4383
4699
|
* @default undefined
|
|
4384
4700
|
*/
|
|
4385
4701
|
exclude?: ((fileName: T) => boolean) | readonly string[] | undefined;
|
|
4386
4702
|
}
|
|
4387
|
-
|
|
4388
|
-
|
|
4703
|
+
interface GlobOptions extends _GlobOptions<Dirent | string> {}
|
|
4704
|
+
interface GlobOptionsWithFileTypes extends _GlobOptions<Dirent> {
|
|
4389
4705
|
withFileTypes: true;
|
|
4390
4706
|
}
|
|
4391
|
-
|
|
4707
|
+
interface GlobOptionsWithoutFileTypes extends _GlobOptions<string> {
|
|
4392
4708
|
withFileTypes?: false | undefined;
|
|
4393
4709
|
}
|
|
4394
4710
|
|
|
@@ -4405,11 +4721,11 @@ declare module "fs" {
|
|
|
4405
4721
|
* ```
|
|
4406
4722
|
* @since v22.0.0
|
|
4407
4723
|
*/
|
|
4408
|
-
|
|
4724
|
+
function glob(
|
|
4409
4725
|
pattern: string | readonly string[],
|
|
4410
4726
|
callback: (err: NodeJS.ErrnoException | null, matches: string[]) => void,
|
|
4411
4727
|
): void;
|
|
4412
|
-
|
|
4728
|
+
function glob(
|
|
4413
4729
|
pattern: string | readonly string[],
|
|
4414
4730
|
options: GlobOptionsWithFileTypes,
|
|
4415
4731
|
callback: (
|
|
@@ -4417,7 +4733,7 @@ declare module "fs" {
|
|
|
4417
4733
|
matches: Dirent[],
|
|
4418
4734
|
) => void,
|
|
4419
4735
|
): void;
|
|
4420
|
-
|
|
4736
|
+
function glob(
|
|
4421
4737
|
pattern: string | readonly string[],
|
|
4422
4738
|
options: GlobOptionsWithoutFileTypes,
|
|
4423
4739
|
callback: (
|
|
@@ -4425,7 +4741,7 @@ declare module "fs" {
|
|
|
4425
4741
|
matches: string[],
|
|
4426
4742
|
) => void,
|
|
4427
4743
|
): void;
|
|
4428
|
-
|
|
4744
|
+
function glob(
|
|
4429
4745
|
pattern: string | readonly string[],
|
|
4430
4746
|
options: GlobOptions,
|
|
4431
4747
|
callback: (
|
|
@@ -4442,20 +4758,23 @@ declare module "fs" {
|
|
|
4442
4758
|
* @since v22.0.0
|
|
4443
4759
|
* @returns paths of files that match the pattern.
|
|
4444
4760
|
*/
|
|
4445
|
-
|
|
4446
|
-
|
|
4761
|
+
function globSync(pattern: string | readonly string[]): string[];
|
|
4762
|
+
function globSync(
|
|
4447
4763
|
pattern: string | readonly string[],
|
|
4448
4764
|
options: GlobOptionsWithFileTypes,
|
|
4449
4765
|
): Dirent[];
|
|
4450
|
-
|
|
4766
|
+
function globSync(
|
|
4451
4767
|
pattern: string | readonly string[],
|
|
4452
4768
|
options: GlobOptionsWithoutFileTypes,
|
|
4453
4769
|
): string[];
|
|
4454
|
-
|
|
4770
|
+
function globSync(
|
|
4455
4771
|
pattern: string | readonly string[],
|
|
4456
4772
|
options: GlobOptions,
|
|
4457
4773
|
): Dirent[] | string[];
|
|
4458
4774
|
}
|
|
4459
4775
|
declare module "node:fs" {
|
|
4460
|
-
export * from "fs";
|
|
4776
|
+
export * as promises from "node:fs/promises";
|
|
4777
|
+
}
|
|
4778
|
+
declare module "fs" {
|
|
4779
|
+
export * from "node:fs";
|
|
4461
4780
|
}
|