@apifuse/provider-sdk 2.2.0-beta.3 → 2.2.0-beta.5
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 +53 -0
- package/CHANGELOG.md +8 -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 +266 -34
- 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 +104 -3
- package/dist/server/self-test.js +673 -115
- package/dist/server/serve.d.ts +3 -3
- package/dist/server/serve.js +37 -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 +12 -7
- package/src/server/self-test-redaction.ts +2 -2
- package/src/server/self-test.ts +857 -132
- package/src/server/serve.ts +89 -238
- 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,30 +1,35 @@
|
|
|
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,
|
|
5
|
+
createSelfTestAuthFlowInvoke,
|
|
5
6
|
createSelfTestInvoke,
|
|
6
7
|
DEFAULT_SELF_TEST_REQUEST_BUDGET_MS,
|
|
7
8
|
isSelfTestReadOnlyOperation,
|
|
8
9
|
PROVIDER_RUNTIME_SELF_TEST_REQUEST_BUDGET_MS_ENV,
|
|
9
10
|
resolveSelfTestPort,
|
|
11
|
+
SELF_TEST_AUTH_FLOW_MULTI_TURN_SKIP_REASON,
|
|
12
|
+
SELF_TEST_AUTH_FLOW_REJECTED_SKIP_REASON,
|
|
10
13
|
SELF_TEST_HEALTHZ_PATH,
|
|
11
14
|
SELF_TEST_PATH,
|
|
12
15
|
SELF_TEST_SCHEMA_VERSION,
|
|
13
16
|
type SelfTestAppOptions,
|
|
17
|
+
type SelfTestAuthFlowInvoke,
|
|
18
|
+
type SelfTestAuthFlowRoute,
|
|
14
19
|
type SelfTestCaseResult,
|
|
15
20
|
type SelfTestCaseStatus,
|
|
16
21
|
type SelfTestOperationInvoke,
|
|
17
22
|
type SelfTestRequest,
|
|
18
23
|
SelfTestRequestSchema,
|
|
19
24
|
type SelfTestResponse,
|
|
20
|
-
} from "./self-test";
|
|
21
|
-
export { resolveHealthCheckInputDateTokens } from "./self-test-input-tokens";
|
|
25
|
+
} from "./self-test.js";
|
|
26
|
+
export { resolveHealthCheckInputDateTokens } from "./self-test-input-tokens.js";
|
|
22
27
|
export {
|
|
23
28
|
collectSelfTestSensitiveValues,
|
|
24
29
|
redactSelfTestText,
|
|
25
30
|
SELF_TEST_MAX_TEXT_LENGTH,
|
|
26
31
|
SELF_TEST_REDACTED_PLACEHOLDER,
|
|
27
|
-
} from "./self-test-redaction";
|
|
32
|
+
} from "./self-test-redaction.js";
|
|
28
33
|
export {
|
|
29
34
|
DEFAULT_SELF_TEST_PORT,
|
|
30
35
|
deriveSelfTestToken,
|
|
@@ -34,7 +39,7 @@ export {
|
|
|
34
39
|
resolveSelfTestMasterSecrets,
|
|
35
40
|
type SelfTestMasterSecrets,
|
|
36
41
|
verifySelfTestAuthorization,
|
|
37
|
-
} from "./self-test-token";
|
|
42
|
+
} from "./self-test-token.js";
|
|
38
43
|
export type {
|
|
39
44
|
AuthFlowRequest,
|
|
40
45
|
AuthFlowResponse,
|
|
@@ -45,7 +50,7 @@ export type {
|
|
|
45
50
|
OperationRequest,
|
|
46
51
|
OperationResponse,
|
|
47
52
|
OperationSuccessResponse,
|
|
48
|
-
} from "./types";
|
|
53
|
+
} from "./types.js";
|
|
49
54
|
export {
|
|
50
55
|
AuthFlowRequestSchema,
|
|
51
56
|
AuthFlowSuccessResponseSchema,
|
|
@@ -55,4 +60,4 @@ export {
|
|
|
55
60
|
OperationErrorResponseSchema,
|
|
56
61
|
OperationRequestSchema,
|
|
57
62
|
OperationSuccessResponseSchema,
|
|
58
|
-
} from "./types";
|
|
63
|
+
} 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
|
|