@apifuse/provider-sdk 2.2.0-beta.3 → 2.2.0-beta.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/AUTHORING.md +14 -0
- package/CHANGELOG.md +4 -0
- package/bin/apifuse-check.ts +18 -58
- package/bin/apifuse-create.ts +1 -1
- package/bin/apifuse-dev.ts +27 -52
- package/bin/apifuse-pack-smoke.ts +22 -81
- package/bin/apifuse-pack-types.ts +266 -0
- package/bin/apifuse-perf.ts +45 -127
- package/bin/apifuse-record.ts +23 -61
- package/bin/apifuse-submit-check.ts +26 -21
- package/bin/apifuse.ts +1 -1
- package/bin/submit-check-xml.ts +1 -1
- package/dist/auth-turn/index.d.ts +1 -1
- package/dist/auth.d.ts +2 -2
- package/dist/auth.js +9 -18
- package/dist/ceremonies/index.d.ts +1 -1
- package/dist/ceremonies/index.js +8 -18
- package/dist/config/loader.d.ts +2 -2
- package/dist/config/loader.js +19 -42
- package/dist/contract-serialization.d.ts +2 -2
- package/dist/contract-serialization.js +3 -6
- package/dist/contract-types.d.ts +2 -2
- package/dist/contract.d.ts +3 -3
- package/dist/contract.js +4 -6
- package/dist/define.d.ts +8 -1
- package/dist/define.js +57 -115
- package/dist/dev.d.ts +1 -1
- package/dist/dev.js +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +1 -3
- package/dist/i18n/catalog.d.ts +2 -2
- package/dist/i18n/catalog.js +4 -10
- package/dist/i18n/index.d.ts +2 -2
- package/dist/i18n/index.js +2 -2
- package/dist/i18n/keys.d.ts +2 -2
- package/dist/index.d.ts +43 -42
- package/dist/index.js +38 -37
- package/dist/lint.js +8 -15
- package/dist/provider.d.ts +11 -11
- package/dist/provider.js +9 -9
- package/dist/public-schema-field-lint.d.ts +1 -1
- package/dist/recipes/gov-api.js +1 -1
- package/dist/runtime/auth-flow.d.ts +1 -1
- package/dist/runtime/auth-flow.js +3 -3
- package/dist/runtime/browser.d.ts +1 -1
- package/dist/runtime/browser.js +15 -29
- package/dist/runtime/cache.d.ts +1 -1
- package/dist/runtime/cache.js +4 -8
- package/dist/runtime/choice.d.ts +1 -1
- package/dist/runtime/choice.js +12 -34
- package/dist/runtime/credential.d.ts +1 -1
- package/dist/runtime/credential.js +1 -1
- package/dist/runtime/env.d.ts +1 -1
- package/dist/runtime/executor.d.ts +1 -1
- package/dist/runtime/executor.js +2 -2
- package/dist/runtime/http.d.ts +2 -2
- package/dist/runtime/http.js +5 -5
- package/dist/runtime/insights.d.ts +1 -1
- package/dist/runtime/insights.js +6 -13
- package/dist/runtime/instrumentation.d.ts +2 -2
- package/dist/runtime/instrumentation.js +5 -15
- package/dist/runtime/keyring.js +1 -1
- package/dist/runtime/namespace.js +1 -1
- package/dist/runtime/otlp.d.ts +1 -1
- package/dist/runtime/perf.d.ts +1 -1
- package/dist/runtime/provider.d.ts +1 -1
- package/dist/runtime/provider.js +1 -2
- package/dist/runtime/proxy-errors.d.ts +1 -1
- package/dist/runtime/proxy-errors.js +3 -5
- package/dist/runtime/proxy-retry-policy.d.ts +2 -2
- package/dist/runtime/proxy-retry-policy.js +2 -2
- package/dist/runtime/proxy-telemetry.d.ts +1 -1
- package/dist/runtime/proxy-telemetry.js +16 -48
- package/dist/runtime/redis.d.ts +1 -1
- package/dist/runtime/redis.js +2 -4
- package/dist/runtime/request-options.d.ts +1 -1
- package/dist/runtime/state.d.ts +2 -2
- package/dist/runtime/state.js +3 -3
- package/dist/runtime/stealth.d.ts +2 -2
- package/dist/runtime/stealth.js +6 -6
- package/dist/runtime/stt.d.ts +1 -1
- package/dist/runtime/stt.js +11 -15
- package/dist/runtime/trace.d.ts +2 -2
- package/dist/runtime/trace.js +2 -4
- package/dist/runtime/waterfall.d.ts +1 -1
- package/dist/schema.d.ts +1 -1
- package/dist/schema.js +7 -15
- package/dist/serve.d.ts +1 -1
- package/dist/serve.js +1 -1
- package/dist/server/index.d.ts +7 -7
- package/dist/server/index.js +6 -6
- package/dist/server/self-test-redaction.d.ts +1 -1
- package/dist/server/self-test-redaction.js +1 -1
- package/dist/server/self-test.d.ts +3 -3
- package/dist/server/self-test.js +3 -3
- package/dist/server/serve.d.ts +3 -3
- package/dist/server/serve.js +36 -49
- package/dist/server/types.js +2 -7
- package/dist/stealth/profiles.d.ts +1 -1
- package/dist/stealth/profiles.js +5 -14
- package/dist/stream.d.ts +1 -1
- package/dist/testing/index.d.ts +2 -2
- package/dist/testing/index.js +2 -2
- package/dist/testing/run.d.ts +1 -1
- package/dist/testing/run.js +7 -14
- package/dist/types.d.ts +57 -0
- package/dist/user-input.d.ts +30 -0
- package/dist/user-input.js +66 -0
- package/package.json +6 -4
- package/src/auth-turn/index.ts +1 -1
- package/src/auth.ts +28 -86
- package/src/ceremonies/index.ts +24 -78
- package/src/config/loader.ts +58 -176
- package/src/contract-serialization.ts +5 -11
- package/src/contract-types.ts +2 -2
- package/src/contract.ts +12 -28
- package/src/define.ts +174 -495
- package/src/dev.ts +4 -9
- package/src/errors.ts +4 -11
- package/src/i18n/catalog.ts +10 -32
- package/src/i18n/index.ts +2 -2
- package/src/i18n/keys.ts +5 -11
- package/src/index.ts +44 -42
- package/src/lint.ts +89 -159
- package/src/provider.ts +12 -11
- package/src/public-schema-field-lint.ts +7 -33
- package/src/recipes/gov-api.ts +2 -5
- package/src/runtime/auth-flow.ts +5 -7
- package/src/runtime/browser.ts +64 -187
- package/src/runtime/cache.ts +20 -67
- package/src/runtime/choice.ts +55 -129
- package/src/runtime/credential.ts +2 -2
- package/src/runtime/env.ts +1 -1
- package/src/runtime/executor.ts +9 -19
- package/src/runtime/http.ts +7 -7
- package/src/runtime/insights.ts +15 -53
- package/src/runtime/instrumentation.ts +19 -58
- package/src/runtime/keyring.ts +7 -19
- package/src/runtime/namespace.ts +2 -7
- package/src/runtime/otlp.ts +12 -23
- package/src/runtime/perf.ts +1 -1
- package/src/runtime/provider.ts +4 -9
- package/src/runtime/proxy-errors.ts +17 -38
- package/src/runtime/proxy-retry-policy.ts +3 -3
- package/src/runtime/proxy-telemetry.ts +23 -72
- package/src/runtime/redis.ts +4 -12
- package/src/runtime/request-options.ts +4 -13
- package/src/runtime/state.ts +30 -109
- package/src/runtime/stealth.ts +8 -8
- package/src/runtime/stt.ts +38 -94
- package/src/runtime/trace.ts +14 -44
- package/src/runtime/waterfall.ts +5 -18
- package/src/schema.ts +23 -84
- package/src/serve.ts +1 -1
- package/src/server/index.ts +7 -7
- package/src/server/self-test-redaction.ts +2 -2
- package/src/server/self-test.ts +5 -5
- package/src/server/serve.ts +87 -242
- package/src/server/types.ts +6 -19
- package/src/stealth/profiles.ts +10 -26
- package/src/stream.ts +8 -19
- package/src/testing/index.ts +2 -2
- package/src/testing/run.ts +19 -67
- package/src/types.ts +58 -0
- package/src/user-input.ts +118 -0
package/src/server/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { createServerApp, type ServeOptions, serve } from "./serve";
|
|
1
|
+
export { createServerApp, type ServeOptions, serve } from "./serve.js";
|
|
2
2
|
export {
|
|
3
3
|
computeSelfTestPlanDigest,
|
|
4
4
|
createSelfTestApp,
|
|
@@ -17,14 +17,14 @@ export {
|
|
|
17
17
|
type SelfTestRequest,
|
|
18
18
|
SelfTestRequestSchema,
|
|
19
19
|
type SelfTestResponse,
|
|
20
|
-
} from "./self-test";
|
|
21
|
-
export { resolveHealthCheckInputDateTokens } from "./self-test-input-tokens";
|
|
20
|
+
} from "./self-test.js";
|
|
21
|
+
export { resolveHealthCheckInputDateTokens } from "./self-test-input-tokens.js";
|
|
22
22
|
export {
|
|
23
23
|
collectSelfTestSensitiveValues,
|
|
24
24
|
redactSelfTestText,
|
|
25
25
|
SELF_TEST_MAX_TEXT_LENGTH,
|
|
26
26
|
SELF_TEST_REDACTED_PLACEHOLDER,
|
|
27
|
-
} from "./self-test-redaction";
|
|
27
|
+
} from "./self-test-redaction.js";
|
|
28
28
|
export {
|
|
29
29
|
DEFAULT_SELF_TEST_PORT,
|
|
30
30
|
deriveSelfTestToken,
|
|
@@ -34,7 +34,7 @@ export {
|
|
|
34
34
|
resolveSelfTestMasterSecrets,
|
|
35
35
|
type SelfTestMasterSecrets,
|
|
36
36
|
verifySelfTestAuthorization,
|
|
37
|
-
} from "./self-test-token";
|
|
37
|
+
} from "./self-test-token.js";
|
|
38
38
|
export type {
|
|
39
39
|
AuthFlowRequest,
|
|
40
40
|
AuthFlowResponse,
|
|
@@ -45,7 +45,7 @@ export type {
|
|
|
45
45
|
OperationRequest,
|
|
46
46
|
OperationResponse,
|
|
47
47
|
OperationSuccessResponse,
|
|
48
|
-
} from "./types";
|
|
48
|
+
} from "./types.js";
|
|
49
49
|
export {
|
|
50
50
|
AuthFlowRequestSchema,
|
|
51
51
|
AuthFlowSuccessResponseSchema,
|
|
@@ -55,4 +55,4 @@ export {
|
|
|
55
55
|
OperationErrorResponseSchema,
|
|
56
56
|
OperationRequestSchema,
|
|
57
57
|
OperationSuccessResponseSchema,
|
|
58
|
-
} from "./types";
|
|
58
|
+
} from "./types.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { ProviderDefinition } from "../types";
|
|
1
|
+
import type { ProviderDefinition } from "../types.js";
|
|
2
2
|
import {
|
|
3
3
|
PROVIDER_RUNTIME_SELF_TEST_MASTER_SECRET_ENV,
|
|
4
4
|
PROVIDER_RUNTIME_SELF_TEST_MASTER_SECRET_PREVIOUS_ENV,
|
|
5
|
-
} from "./self-test-token";
|
|
5
|
+
} from "./self-test-token.js";
|
|
6
6
|
|
|
7
7
|
export const SELF_TEST_REDACTED_PLACEHOLDER = "[REDACTED]";
|
|
8
8
|
|
package/src/server/self-test.ts
CHANGED
|
@@ -9,16 +9,16 @@ import type {
|
|
|
9
9
|
HealthCheckSuite,
|
|
10
10
|
OperationDefinition,
|
|
11
11
|
ProviderDefinition,
|
|
12
|
-
} from "../types";
|
|
13
|
-
import { resolveHealthCheckInputDateTokens } from "./self-test-input-tokens";
|
|
14
|
-
import { collectSelfTestSensitiveValues, redactSelfTestText } from "./self-test-redaction";
|
|
12
|
+
} from "../types.js";
|
|
13
|
+
import { resolveHealthCheckInputDateTokens } from "./self-test-input-tokens.js";
|
|
14
|
+
import { collectSelfTestSensitiveValues, redactSelfTestText } from "./self-test-redaction.js";
|
|
15
15
|
import {
|
|
16
16
|
DEFAULT_SELF_TEST_PORT,
|
|
17
17
|
PROVIDER_RUNTIME_SELF_TEST_PORT_ENV,
|
|
18
18
|
type SelfTestMasterSecrets,
|
|
19
19
|
verifySelfTestAuthorization,
|
|
20
|
-
} from "./self-test-token";
|
|
21
|
-
import type { OperationConnection } from "./types";
|
|
20
|
+
} from "./self-test-token.js";
|
|
21
|
+
import type { OperationConnection } from "./types.js";
|
|
22
22
|
|
|
23
23
|
export const SELF_TEST_SCHEMA_VERSION = 1 as const;
|
|
24
24
|
export const SELF_TEST_PATH = "/internal/health/self-test";
|