@entelligentsia/forgecli 0.7.10 → 0.8.4
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 +74 -0
- package/dist/CHANGELOG-forge-plugin.md +70 -0
- package/dist/CHANGELOG-pi.md +63 -0
- package/dist/bin/argv.d.ts +2 -2
- package/dist/bin/argv.js +10 -0
- package/dist/bin/argv.js.map +1 -1
- package/dist/bin/env-defaults.d.ts +1 -0
- package/dist/bin/env-defaults.js +13 -0
- package/dist/bin/env-defaults.js.map +1 -0
- package/dist/bin/forge.js +9 -0
- package/dist/bin/forge.js.map +1 -1
- package/dist/bin/update-cli.d.ts +9 -0
- package/dist/bin/update-cli.js +120 -0
- package/dist/bin/update-cli.js.map +1 -0
- package/dist/extensions/forgecli/index.js +3 -3
- package/dist/extensions/forgecli/index.js.map +1 -1
- package/dist/extensions/forgecli/update-check.js +1 -1
- package/dist/extensions/forgecli/update-check.js.map +1 -1
- package/dist/extensions/forgecli/whats-new-widget.d.ts +5 -5
- package/dist/extensions/forgecli/whats-new-widget.js +11 -11
- package/dist/extensions/forgecli/whats-new-widget.js.map +1 -1
- package/dist/extensions/forgecli/whats-new.js +6 -5
- package/dist/extensions/forgecli/whats-new.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +27 -98
- 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 +62 -132
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js.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 +25 -15
- 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.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js +1 -0
- 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 +17 -1
- 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/openai-completions.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js +8 -2
- 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-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js +17 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js.map +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 +8 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/package.json +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/CHANGELOG.md +63 -0
- package/node_modules/@earendil-works/pi-coding-agent/README.md +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/config-selector.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/config-selector.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/config-selector.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli.js +6 -10
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/config.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/config.js +12 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/config.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.d.ts +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js +30 -15
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.d.ts +3 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.js +23 -13
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.d.ts +4 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js +58 -38
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/slash-commands.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/slash-commands.js +0 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/slash-commands.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.js +3 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/config-selector.d.ts +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/config-selector.js +7 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js +6 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js +3 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/changelog.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/changelog.js +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/changelog.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/child-process.d.ts +7 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/child-process.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/child-process.js +60 -7
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/child-process.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/docs/packages.md +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/docs/settings.md +1 -3
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/sandbox/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/package.json +6 -6
- package/node_modules/@earendil-works/pi-tui/package.json +2 -2
- package/node_modules/@protobufjs/fetch/CHANGELOG.md +8 -0
- package/node_modules/@protobufjs/fetch/index.d.ts +7 -7
- package/node_modules/@protobufjs/fetch/index.js +4 -7
- package/node_modules/@protobufjs/fetch/package.json +7 -5
- package/node_modules/@protobufjs/fetch/tests/data/file.txt +1 -0
- package/node_modules/@protobufjs/fetch/tests/index.js +150 -8
- package/node_modules/@protobufjs/fetch/util/fs.js +11 -0
- package/node_modules/@protobufjs/inquire/CHANGELOG.md +8 -0
- package/node_modules/@protobufjs/inquire/index.d.ts +1 -0
- package/node_modules/@protobufjs/inquire/index.js +1 -0
- package/node_modules/@protobufjs/inquire/package.json +1 -1
- package/node_modules/protobufjs/dist/light/protobuf.js +187 -153
- package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/dist/minimal/protobuf.js +14 -5
- package/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/dist/protobuf.js +207 -173
- package/node_modules/protobufjs/dist/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/package.json +6 -3
- package/node_modules/protobufjs/src/util/fs.js +11 -0
- package/node_modules/protobufjs/src/util/minimal.js +10 -2
- package/node_modules/protobufjs/src/util.js +1 -1
- package/node_modules/undici/README.md +14 -5
- package/node_modules/undici/docs/docs/api/Client.md +4 -2
- package/node_modules/undici/docs/docs/api/Dispatcher.md +62 -27
- package/node_modules/undici/docs/docs/api/GlobalInstallation.md +7 -5
- package/node_modules/undici/docs/docs/api/H2CClient.md +1 -1
- package/node_modules/undici/docs/docs/api/RedirectHandler.md +14 -9
- package/node_modules/undici/docs/docs/api/RetryAgent.md +0 -1
- package/node_modules/undici/docs/docs/api/RetryHandler.md +12 -14
- package/node_modules/undici/docs/docs/api/SnapshotAgent.md +23 -0
- package/node_modules/undici/docs/docs/best-practices/migrating-from-v7-to-v8.md +231 -0
- package/node_modules/undici/index.js +4 -2
- package/node_modules/undici/lib/api/api-connect.js +13 -11
- package/node_modules/undici/lib/api/api-pipeline.js +26 -13
- package/node_modules/undici/lib/api/api-request.js +45 -21
- package/node_modules/undici/lib/api/api-stream.js +81 -20
- package/node_modules/undici/lib/api/api-upgrade.js +21 -11
- package/node_modules/undici/lib/api/readable.js +3 -2
- package/node_modules/undici/lib/cache/memory-cache-store.js +1 -1
- package/node_modules/undici/lib/cache/sqlite-cache-store.js +6 -4
- package/node_modules/undici/lib/core/connect.js +17 -1
- package/node_modules/undici/lib/core/constants.js +1 -24
- package/node_modules/undici/lib/core/errors.js +2 -2
- package/node_modules/undici/lib/core/request.js +115 -18
- package/node_modules/undici/lib/core/socks5-client.js +24 -9
- package/node_modules/undici/lib/core/socks5-utils.js +32 -23
- package/node_modules/undici/lib/core/symbols.js +1 -0
- package/node_modules/undici/lib/core/util.js +70 -43
- package/node_modules/undici/lib/dispatcher/agent.js +47 -33
- package/node_modules/undici/lib/dispatcher/balanced-pool.js +21 -26
- package/node_modules/undici/lib/dispatcher/client-h1.js +98 -39
- package/node_modules/undici/lib/dispatcher/client-h2.js +603 -272
- package/node_modules/undici/lib/dispatcher/client.js +12 -5
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +24 -5
- package/node_modules/undici/lib/dispatcher/dispatcher.js +0 -4
- package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +107 -0
- package/node_modules/undici/lib/dispatcher/h2c-client.js +5 -5
- package/node_modules/undici/lib/dispatcher/pool-base.js +28 -10
- package/node_modules/undici/lib/dispatcher/pool.js +31 -6
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +38 -13
- package/node_modules/undici/lib/dispatcher/round-robin-pool.js +31 -9
- package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +95 -80
- package/node_modules/undici/lib/global.js +13 -1
- package/node_modules/undici/lib/handler/cache-handler.js +16 -8
- package/node_modules/undici/lib/handler/decorator-handler.js +1 -2
- package/node_modules/undici/lib/handler/redirect-handler.js +5 -51
- package/node_modules/undici/lib/handler/retry-handler.js +15 -2
- package/node_modules/undici/lib/interceptor/cache.js +30 -17
- package/node_modules/undici/lib/interceptor/decompress.js +28 -2
- package/node_modules/undici/lib/interceptor/dns.js +1 -1
- package/node_modules/undici/lib/interceptor/redirect.js +3 -3
- package/node_modules/undici/lib/llhttp/llhttp-wasm.js +1 -1
- package/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +1 -1
- package/node_modules/undici/lib/mock/mock-agent.js +8 -8
- package/node_modules/undici/lib/mock/mock-call-history.js +15 -15
- package/node_modules/undici/lib/mock/mock-utils.js +37 -22
- package/node_modules/undici/lib/mock/snapshot-agent.js +16 -6
- package/node_modules/undici/lib/mock/snapshot-recorder.js +38 -3
- package/node_modules/undici/lib/util/cache.js +8 -7
- package/node_modules/undici/lib/util/runtime-features.js +3 -34
- package/node_modules/undici/lib/web/cache/cache.js +6 -8
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +245 -150
- package/node_modules/undici/lib/web/fetch/body.js +3 -9
- package/node_modules/undici/lib/web/fetch/formdata-parser.js +17 -6
- package/node_modules/undici/lib/web/fetch/formdata.js +21 -2
- package/node_modules/undici/lib/web/fetch/index.js +214 -221
- package/node_modules/undici/lib/web/webidl/index.js +7 -9
- package/node_modules/undici/lib/web/websocket/frame.js +1 -7
- package/node_modules/undici/lib/web/websocket/permessage-deflate.js +13 -31
- package/node_modules/undici/lib/web/websocket/receiver.js +62 -22
- package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +11 -17
- package/node_modules/undici/lib/web/websocket/websocket.js +6 -1
- package/node_modules/undici/package.json +9 -9
- package/node_modules/undici/types/agent.d.ts +0 -2
- package/node_modules/undici/types/client.d.ts +25 -19
- package/node_modules/undici/types/dispatcher.d.ts +7 -27
- package/node_modules/undici/types/dispatcher1-wrapper.d.ts +7 -0
- package/node_modules/undici/types/formdata.d.ts +0 -6
- package/node_modules/undici/types/h2c-client.d.ts +6 -6
- package/node_modules/undici/types/header.d.ts +5 -0
- package/node_modules/undici/types/index.d.ts +3 -1
- package/node_modules/undici/types/interceptors.d.ts +1 -1
- package/node_modules/undici/types/pool.d.ts +0 -2
- package/node_modules/undici/types/proxy-agent.d.ts +2 -2
- package/node_modules/undici/types/round-robin-pool.d.ts +0 -2
- package/node_modules/undici/types/snapshot-agent.d.ts +4 -0
- package/node_modules/undici/types/socks5-proxy-agent.d.ts +2 -2
- package/node_modules/undici/types/webidl.d.ts +0 -1
- package/package.json +7 -8
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/package-lock.json +0 -24
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/sandbox/package-lock.json +0 -92
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package-lock.json +0 -31
- package/node_modules/undici/lib/handler/unwrap-handler.js +0 -100
- package/node_modules/undici/lib/handler/wrap-handler.js +0 -105
- package/node_modules/undici/lib/llhttp/.gitkeep +0 -0
- package/node_modules/undici/lib/util/promise.js +0 -28
- package/skills/refresh-kb-links/SKILL.md +0 -217
- package/skills/store-custodian/SKILL.md +0 -163
- package/skills/store-query-grammar/SKILL.md +0 -145
- package/skills/store-query-nlp/SKILL.md +0 -110
|
@@ -11,6 +11,7 @@ import H2CClient from './h2c-client'
|
|
|
11
11
|
import buildConnector from './connector'
|
|
12
12
|
import errors from './errors'
|
|
13
13
|
import Agent from './agent'
|
|
14
|
+
import Dispatcher1Wrapper from './dispatcher1-wrapper'
|
|
14
15
|
import MockClient from './mock-client'
|
|
15
16
|
import MockPool from './mock-pool'
|
|
16
17
|
import MockAgent from './mock-agent'
|
|
@@ -44,7 +45,7 @@ export { Interceptable } from './mock-interceptor'
|
|
|
44
45
|
|
|
45
46
|
declare function globalThisInstall (): void
|
|
46
47
|
|
|
47
|
-
export { Dispatcher, BalancedPool, RoundRobinPool, Pool, Client, buildConnector, errors, Agent, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, interceptors, cacheStores, MockClient, MockPool, MockAgent, SnapshotAgent, MockCallHistory, MockCallHistoryLog, mockErrors, ProxyAgent, Socks5ProxyAgent, EnvHttpProxyAgent, RedirectHandler, DecoratorHandler, RetryHandler, RetryAgent, H2CClient, globalThisInstall as install }
|
|
48
|
+
export { Dispatcher, BalancedPool, RoundRobinPool, Pool, Client, buildConnector, errors, Agent, Dispatcher1Wrapper, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, interceptors, cacheStores, MockClient, MockPool, MockAgent, SnapshotAgent, MockCallHistory, MockCallHistoryLog, mockErrors, ProxyAgent, Socks5ProxyAgent, EnvHttpProxyAgent, RedirectHandler, DecoratorHandler, RetryHandler, RetryAgent, H2CClient, globalThisInstall as install }
|
|
48
49
|
export default Undici
|
|
49
50
|
|
|
50
51
|
declare namespace Undici {
|
|
@@ -60,6 +61,7 @@ declare namespace Undici {
|
|
|
60
61
|
const buildConnector: typeof import('./connector').default
|
|
61
62
|
const errors: typeof import('./errors').default
|
|
62
63
|
const Agent: typeof import('./agent').default
|
|
64
|
+
const Dispatcher1Wrapper: typeof import('./dispatcher1-wrapper').default
|
|
63
65
|
const setGlobalDispatcher: typeof import('./global-dispatcher').setGlobalDispatcher
|
|
64
66
|
const getGlobalDispatcher: typeof import('./global-dispatcher').getGlobalDispatcher
|
|
65
67
|
const request: typeof import('./api').request
|
|
@@ -8,7 +8,7 @@ export default Interceptors
|
|
|
8
8
|
declare namespace Interceptors {
|
|
9
9
|
export type DumpInterceptorOpts = { maxSize?: number }
|
|
10
10
|
export type RetryInterceptorOpts = RetryHandler.RetryOptions
|
|
11
|
-
export type RedirectInterceptorOpts = { maxRedirections?: number }
|
|
11
|
+
export type RedirectInterceptorOpts = { maxRedirections?: number, throwOnMaxRedirect?: boolean }
|
|
12
12
|
export type DecompressInterceptorOpts = {
|
|
13
13
|
skipErrorResponses?: boolean
|
|
14
14
|
skipStatusCodes?: number[]
|
|
@@ -35,7 +35,5 @@ declare namespace Pool {
|
|
|
35
35
|
connections?: number | null;
|
|
36
36
|
/** The amount of time before a client is removed from the pool and closed. `null` if no time limit. Default `null` */
|
|
37
37
|
clientTtl?: number | null;
|
|
38
|
-
|
|
39
|
-
interceptors?: { Pool?: readonly Dispatcher.DispatchInterceptor[] } & Client.Options['interceptors']
|
|
40
38
|
}
|
|
41
39
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Agent from './agent'
|
|
2
2
|
import buildConnector from './connector'
|
|
3
3
|
import Dispatcher from './dispatcher'
|
|
4
|
-
import {
|
|
4
|
+
import { OutgoingHttpHeaders } from './header'
|
|
5
5
|
|
|
6
6
|
export default ProxyAgent
|
|
7
7
|
|
|
@@ -20,7 +20,7 @@ declare namespace ProxyAgent {
|
|
|
20
20
|
*/
|
|
21
21
|
auth?: string;
|
|
22
22
|
token?: string;
|
|
23
|
-
headers?:
|
|
23
|
+
headers?: OutgoingHttpHeaders;
|
|
24
24
|
requestTls?: buildConnector.BuildOptions;
|
|
25
25
|
proxyTls?: buildConnector.BuildOptions;
|
|
26
26
|
clientFactory?(origin: URL, opts: object): Dispatcher;
|
|
@@ -35,7 +35,5 @@ declare namespace RoundRobinPool {
|
|
|
35
35
|
connections?: number | null;
|
|
36
36
|
/** The amount of time before a client is removed from the pool and closed. `null` if no time limit. Default `null` */
|
|
37
37
|
clientTtl?: number | null;
|
|
38
|
-
|
|
39
|
-
interceptors?: { RoundRobinPool?: readonly Dispatcher.DispatchInterceptor[] } & Client.Options['interceptors']
|
|
40
38
|
}
|
|
41
39
|
}
|
|
@@ -30,7 +30,9 @@ declare namespace SnapshotRecorder {
|
|
|
30
30
|
ignoreHeaders?: string[]
|
|
31
31
|
excludeHeaders?: string[]
|
|
32
32
|
matchBody?: boolean
|
|
33
|
+
normalizeBody?: (body: string | Buffer | null | undefined) => string
|
|
33
34
|
matchQuery?: boolean
|
|
35
|
+
normalizeQuery?: (query: URLSearchParams) => string
|
|
34
36
|
caseSensitive?: boolean
|
|
35
37
|
shouldRecord?: (requestOpts: any) => boolean
|
|
36
38
|
shouldPlayback?: (requestOpts: any) => boolean
|
|
@@ -98,7 +100,9 @@ declare namespace SnapshotAgent {
|
|
|
98
100
|
ignoreHeaders?: string[]
|
|
99
101
|
excludeHeaders?: string[]
|
|
100
102
|
matchBody?: boolean
|
|
103
|
+
normalizeBody?: (body: string | Buffer | null | undefined) => string
|
|
101
104
|
matchQuery?: boolean
|
|
105
|
+
normalizeQuery?: (query: URLSearchParams) => string
|
|
102
106
|
caseSensitive?: boolean
|
|
103
107
|
shouldRecord?: (requestOpts: any) => boolean
|
|
104
108
|
shouldPlayback?: (requestOpts: any) => boolean
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Dispatcher from './dispatcher'
|
|
2
2
|
import buildConnector from './connector'
|
|
3
|
-
import {
|
|
3
|
+
import { OutgoingHttpHeaders } from './header'
|
|
4
4
|
import Pool from './pool'
|
|
5
5
|
|
|
6
6
|
export default Socks5ProxyAgent
|
|
@@ -12,7 +12,7 @@ declare class Socks5ProxyAgent extends Dispatcher {
|
|
|
12
12
|
declare namespace Socks5ProxyAgent {
|
|
13
13
|
export interface Options extends Pool.Options {
|
|
14
14
|
/** Additional headers to send with the proxy connection */
|
|
15
|
-
headers?:
|
|
15
|
+
headers?: OutgoingHttpHeaders;
|
|
16
16
|
/** SOCKS5 proxy username for authentication */
|
|
17
17
|
username?: string;
|
|
18
18
|
/** SOCKS5 proxy password for authentication */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@entelligentsia/forgecli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.4",
|
|
4
4
|
"description": "Forge SDLC ported onto @earendil-works/pi-coding-agent — production launcher with three bin aliases (forge/forgecli/4ge). Bundles a curated fork of pi-coding-agent vendored under earendil-works names.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Entelligentsia",
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
"agents",
|
|
26
26
|
"prompts",
|
|
27
27
|
"registry",
|
|
28
|
-
"skills",
|
|
29
28
|
"themes",
|
|
30
29
|
"workflows",
|
|
31
30
|
"README.md",
|
|
@@ -40,7 +39,7 @@
|
|
|
40
39
|
"./dist/extensions/forgecli/index.js"
|
|
41
40
|
],
|
|
42
41
|
"skills": [
|
|
43
|
-
"./skills"
|
|
42
|
+
"./dist/forge-payload/skills"
|
|
44
43
|
],
|
|
45
44
|
"prompts": [
|
|
46
45
|
"./prompts"
|
|
@@ -71,15 +70,15 @@
|
|
|
71
70
|
"js-yaml"
|
|
72
71
|
],
|
|
73
72
|
"dependencies": {
|
|
74
|
-
"@earendil-works/pi-coding-agent": "file:./vendor-pi/earendil-works-pi-coding-agent-0.
|
|
75
|
-
"@earendil-works/pi-agent-core": "file:./vendor-pi/earendil-works-pi-agent-core-0.
|
|
76
|
-
"@earendil-works/pi-ai": "file:./vendor-pi/earendil-works-pi-ai-0.
|
|
77
|
-
"@earendil-works/pi-tui": "file:./vendor-pi/earendil-works-pi-tui-0.
|
|
73
|
+
"@earendil-works/pi-coding-agent": "file:./vendor-pi/earendil-works-pi-coding-agent-0.75.1-forge.4.tgz",
|
|
74
|
+
"@earendil-works/pi-agent-core": "file:./vendor-pi/earendil-works-pi-agent-core-0.75.1.tgz",
|
|
75
|
+
"@earendil-works/pi-ai": "file:./vendor-pi/earendil-works-pi-ai-0.75.1.tgz",
|
|
76
|
+
"@earendil-works/pi-tui": "file:./vendor-pi/earendil-works-pi-tui-0.75.1.tgz",
|
|
78
77
|
"js-yaml": "^4.1.0",
|
|
79
78
|
"typebox": "^1.1.24"
|
|
80
79
|
},
|
|
81
80
|
"peerDependencies": {
|
|
82
|
-
"@earendil-works/pi-coding-agent": "0.
|
|
81
|
+
"@earendil-works/pi-coding-agent": "0.75.1-forge.4"
|
|
83
82
|
},
|
|
84
83
|
"devDependencies": {
|
|
85
84
|
"@biomejs/biome": "^2.3.5",
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "pi-extension-custom-provider",
|
|
3
|
-
"version": "0.74.2",
|
|
4
|
-
"lockfileVersion": 3,
|
|
5
|
-
"requires": true,
|
|
6
|
-
"packages": {
|
|
7
|
-
"": {
|
|
8
|
-
"name": "pi-extension-custom-provider",
|
|
9
|
-
"version": "0.74.2",
|
|
10
|
-
"dependencies": {
|
|
11
|
-
"@anthropic-ai/sdk": "^0.52.0"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"node_modules/@anthropic-ai/sdk": {
|
|
15
|
-
"version": "0.52.0",
|
|
16
|
-
"resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.52.0.tgz",
|
|
17
|
-
"integrity": "sha512-d4c+fg+xy9e46c8+YnrrgIQR45CZlAi7PwdzIfDXDM6ACxEZli1/fxhURsq30ZpMZy6LvSkr41jGq5aF5TD7rQ==",
|
|
18
|
-
"license": "MIT",
|
|
19
|
-
"bin": {
|
|
20
|
-
"anthropic-ai-sdk": "bin/cli"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/sandbox/package-lock.json
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "pi-extension-sandbox",
|
|
3
|
-
"version": "1.4.2",
|
|
4
|
-
"lockfileVersion": 3,
|
|
5
|
-
"requires": true,
|
|
6
|
-
"packages": {
|
|
7
|
-
"": {
|
|
8
|
-
"name": "pi-extension-sandbox",
|
|
9
|
-
"version": "1.4.2",
|
|
10
|
-
"dependencies": {
|
|
11
|
-
"@anthropic-ai/sandbox-runtime": "^0.0.26"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"node_modules/@anthropic-ai/sandbox-runtime": {
|
|
15
|
-
"version": "0.0.26",
|
|
16
|
-
"resolved": "https://registry.npmjs.org/@anthropic-ai/sandbox-runtime/-/sandbox-runtime-0.0.26.tgz",
|
|
17
|
-
"integrity": "sha512-DYV5LSsVMnzq0lbfaYMSpxZPUMAx4+hy343dRss+pVCLIfF62qOhxpYfZ5TmOk1GTDQm5f9wPprMNSStmnsV4w==",
|
|
18
|
-
"license": "Apache-2.0",
|
|
19
|
-
"dependencies": {
|
|
20
|
-
"@pondwader/socks5-server": "^1.0.10",
|
|
21
|
-
"@types/lodash-es": "^4.17.12",
|
|
22
|
-
"commander": "^12.1.0",
|
|
23
|
-
"lodash-es": "^4.17.21",
|
|
24
|
-
"shell-quote": "^1.8.3",
|
|
25
|
-
"zod": "^3.24.1"
|
|
26
|
-
},
|
|
27
|
-
"bin": {
|
|
28
|
-
"srt": "dist/cli.js"
|
|
29
|
-
},
|
|
30
|
-
"engines": {
|
|
31
|
-
"node": ">=18.0.0"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"node_modules/@pondwader/socks5-server": {
|
|
35
|
-
"version": "1.0.10",
|
|
36
|
-
"resolved": "https://registry.npmjs.org/@pondwader/socks5-server/-/socks5-server-1.0.10.tgz",
|
|
37
|
-
"integrity": "sha512-bQY06wzzR8D2+vVCUoBsr5QS2U6UgPUQRmErNwtsuI6vLcyRKkafjkr3KxbtGFf9aBBIV2mcvlsKD1UYaIV+sg==",
|
|
38
|
-
"license": "MIT"
|
|
39
|
-
},
|
|
40
|
-
"node_modules/@types/lodash": {
|
|
41
|
-
"version": "4.17.23",
|
|
42
|
-
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.23.tgz",
|
|
43
|
-
"integrity": "sha512-RDvF6wTulMPjrNdCoYRC8gNR880JNGT8uB+REUpC2Ns4pRqQJhGz90wh7rgdXDPpCczF3VGktDuFGVnz8zP7HA==",
|
|
44
|
-
"license": "MIT"
|
|
45
|
-
},
|
|
46
|
-
"node_modules/@types/lodash-es": {
|
|
47
|
-
"version": "4.17.12",
|
|
48
|
-
"resolved": "https://registry.npmjs.org/@types/lodash-es/-/lodash-es-4.17.12.tgz",
|
|
49
|
-
"integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==",
|
|
50
|
-
"license": "MIT",
|
|
51
|
-
"dependencies": {
|
|
52
|
-
"@types/lodash": "*"
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
"node_modules/commander": {
|
|
56
|
-
"version": "12.1.0",
|
|
57
|
-
"resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz",
|
|
58
|
-
"integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==",
|
|
59
|
-
"license": "MIT",
|
|
60
|
-
"engines": {
|
|
61
|
-
"node": ">=18"
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
"node_modules/lodash-es": {
|
|
65
|
-
"version": "4.18.1",
|
|
66
|
-
"resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.18.1.tgz",
|
|
67
|
-
"integrity": "sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==",
|
|
68
|
-
"license": "MIT"
|
|
69
|
-
},
|
|
70
|
-
"node_modules/shell-quote": {
|
|
71
|
-
"version": "1.8.3",
|
|
72
|
-
"resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.3.tgz",
|
|
73
|
-
"integrity": "sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw==",
|
|
74
|
-
"license": "MIT",
|
|
75
|
-
"engines": {
|
|
76
|
-
"node": ">= 0.4"
|
|
77
|
-
},
|
|
78
|
-
"funding": {
|
|
79
|
-
"url": "https://github.com/sponsors/ljharb"
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
"node_modules/zod": {
|
|
83
|
-
"version": "3.25.76",
|
|
84
|
-
"resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",
|
|
85
|
-
"integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
|
|
86
|
-
"license": "MIT",
|
|
87
|
-
"funding": {
|
|
88
|
-
"url": "https://github.com/sponsors/colinhacks"
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package-lock.json
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "pi-extension-with-deps",
|
|
3
|
-
"version": "0.74.2",
|
|
4
|
-
"lockfileVersion": 3,
|
|
5
|
-
"requires": true,
|
|
6
|
-
"packages": {
|
|
7
|
-
"": {
|
|
8
|
-
"name": "pi-extension-with-deps",
|
|
9
|
-
"version": "0.74.2",
|
|
10
|
-
"dependencies": {
|
|
11
|
-
"ms": "^2.1.3"
|
|
12
|
-
},
|
|
13
|
-
"devDependencies": {
|
|
14
|
-
"@types/ms": "^2.1.0"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"node_modules/@types/ms": {
|
|
18
|
-
"version": "2.1.0",
|
|
19
|
-
"resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz",
|
|
20
|
-
"integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==",
|
|
21
|
-
"dev": true,
|
|
22
|
-
"license": "MIT"
|
|
23
|
-
},
|
|
24
|
-
"node_modules/ms": {
|
|
25
|
-
"version": "2.1.3",
|
|
26
|
-
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
|
27
|
-
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
|
28
|
-
"license": "MIT"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const { parseHeaders } = require('../core/util')
|
|
4
|
-
const { InvalidArgumentError } = require('../core/errors')
|
|
5
|
-
|
|
6
|
-
const kResume = Symbol('resume')
|
|
7
|
-
|
|
8
|
-
class UnwrapController {
|
|
9
|
-
#paused = false
|
|
10
|
-
#reason = null
|
|
11
|
-
#aborted = false
|
|
12
|
-
#abort
|
|
13
|
-
|
|
14
|
-
[kResume] = null
|
|
15
|
-
|
|
16
|
-
constructor (abort) {
|
|
17
|
-
this.#abort = abort
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
pause () {
|
|
21
|
-
this.#paused = true
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
resume () {
|
|
25
|
-
if (this.#paused) {
|
|
26
|
-
this.#paused = false
|
|
27
|
-
this[kResume]?.()
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
abort (reason) {
|
|
32
|
-
if (!this.#aborted) {
|
|
33
|
-
this.#aborted = true
|
|
34
|
-
this.#reason = reason
|
|
35
|
-
this.#abort(reason)
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
get aborted () {
|
|
40
|
-
return this.#aborted
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
get reason () {
|
|
44
|
-
return this.#reason
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
get paused () {
|
|
48
|
-
return this.#paused
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
module.exports = class UnwrapHandler {
|
|
53
|
-
#handler
|
|
54
|
-
#controller
|
|
55
|
-
|
|
56
|
-
constructor (handler) {
|
|
57
|
-
this.#handler = handler
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
static unwrap (handler) {
|
|
61
|
-
// TODO (fix): More checks...
|
|
62
|
-
return !handler.onRequestStart ? handler : new UnwrapHandler(handler)
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
onConnect (abort, context) {
|
|
66
|
-
this.#controller = new UnwrapController(abort)
|
|
67
|
-
this.#handler.onRequestStart?.(this.#controller, context)
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
onResponseStarted () {
|
|
71
|
-
return this.#handler.onResponseStarted?.()
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
onUpgrade (statusCode, rawHeaders, socket) {
|
|
75
|
-
this.#handler.onRequestUpgrade?.(this.#controller, statusCode, parseHeaders(rawHeaders), socket)
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
onHeaders (statusCode, rawHeaders, resume, statusMessage) {
|
|
79
|
-
this.#controller[kResume] = resume
|
|
80
|
-
this.#handler.onResponseStart?.(this.#controller, statusCode, parseHeaders(rawHeaders), statusMessage)
|
|
81
|
-
return !this.#controller.paused
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
onData (data) {
|
|
85
|
-
this.#handler.onResponseData?.(this.#controller, data)
|
|
86
|
-
return !this.#controller.paused
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
onComplete (rawTrailers) {
|
|
90
|
-
this.#handler.onResponseEnd?.(this.#controller, parseHeaders(rawTrailers))
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
onError (err) {
|
|
94
|
-
if (!this.#handler.onResponseError) {
|
|
95
|
-
throw new InvalidArgumentError('invalid onError method')
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
this.#handler.onResponseError?.(this.#controller, err)
|
|
99
|
-
}
|
|
100
|
-
}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const { InvalidArgumentError } = require('../core/errors')
|
|
4
|
-
|
|
5
|
-
module.exports = class WrapHandler {
|
|
6
|
-
#handler
|
|
7
|
-
|
|
8
|
-
constructor (handler) {
|
|
9
|
-
this.#handler = handler
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
static wrap (handler) {
|
|
13
|
-
// TODO (fix): More checks...
|
|
14
|
-
return handler.onRequestStart ? handler : new WrapHandler(handler)
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// Unwrap Interface
|
|
18
|
-
|
|
19
|
-
onConnect (abort, context) {
|
|
20
|
-
return this.#handler.onConnect?.(abort, context)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
onResponseStarted () {
|
|
24
|
-
return this.#handler.onResponseStarted?.()
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
onHeaders (statusCode, rawHeaders, resume, statusMessage) {
|
|
28
|
-
return this.#handler.onHeaders?.(statusCode, rawHeaders, resume, statusMessage)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
onUpgrade (statusCode, rawHeaders, socket) {
|
|
32
|
-
return this.#handler.onUpgrade?.(statusCode, rawHeaders, socket)
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
onData (data) {
|
|
36
|
-
return this.#handler.onData?.(data)
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
onComplete (trailers) {
|
|
40
|
-
return this.#handler.onComplete?.(trailers)
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
onError (err) {
|
|
44
|
-
if (!this.#handler.onError) {
|
|
45
|
-
throw err
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return this.#handler.onError?.(err)
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// Wrap Interface
|
|
52
|
-
|
|
53
|
-
onRequestStart (controller, context) {
|
|
54
|
-
this.#handler.onConnect?.((reason) => controller.abort(reason), context)
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
onRequestUpgrade (controller, statusCode, headers, socket) {
|
|
58
|
-
const rawHeaders = []
|
|
59
|
-
for (const [key, val] of Object.entries(headers)) {
|
|
60
|
-
rawHeaders.push(Buffer.from(key, 'latin1'), toRawHeaderValue(val))
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
this.#handler.onUpgrade?.(statusCode, rawHeaders, socket)
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
onResponseStart (controller, statusCode, headers, statusMessage) {
|
|
67
|
-
const rawHeaders = []
|
|
68
|
-
for (const [key, val] of Object.entries(headers)) {
|
|
69
|
-
rawHeaders.push(Buffer.from(key, 'latin1'), toRawHeaderValue(val))
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
if (this.#handler.onHeaders?.(statusCode, rawHeaders, () => controller.resume(), statusMessage) === false) {
|
|
73
|
-
controller.pause()
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
onResponseData (controller, data) {
|
|
78
|
-
if (this.#handler.onData?.(data) === false) {
|
|
79
|
-
controller.pause()
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
onResponseEnd (controller, trailers) {
|
|
84
|
-
const rawTrailers = []
|
|
85
|
-
for (const [key, val] of Object.entries(trailers)) {
|
|
86
|
-
rawTrailers.push(Buffer.from(key, 'latin1'), toRawHeaderValue(val))
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
this.#handler.onComplete?.(rawTrailers)
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
onResponseError (controller, err) {
|
|
93
|
-
if (!this.#handler.onError) {
|
|
94
|
-
throw new InvalidArgumentError('invalid onError method')
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
this.#handler.onError?.(err)
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
function toRawHeaderValue (value) {
|
|
102
|
-
return Array.isArray(value)
|
|
103
|
-
? value.map((item) => Buffer.from(item, 'latin1'))
|
|
104
|
-
: Buffer.from(value, 'latin1')
|
|
105
|
-
}
|
|
File without changes
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @template {*} T
|
|
5
|
-
* @typedef {Object} DeferredPromise
|
|
6
|
-
* @property {Promise<T>} promise
|
|
7
|
-
* @property {(value?: T) => void} resolve
|
|
8
|
-
* @property {(reason?: any) => void} reject
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @template {*} T
|
|
13
|
-
* @returns {DeferredPromise<T>} An object containing a promise and its resolve/reject methods.
|
|
14
|
-
*/
|
|
15
|
-
function createDeferredPromise () {
|
|
16
|
-
let res
|
|
17
|
-
let rej
|
|
18
|
-
const promise = new Promise((resolve, reject) => {
|
|
19
|
-
res = resolve
|
|
20
|
-
rej = reject
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
return { promise, resolve: res, reject: rej }
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
module.exports = {
|
|
27
|
-
createDeferredPromise
|
|
28
|
-
}
|