lambda-live-debugger 1.12.7 → 1.12.8
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/dist/extension/extension.zip +0 -0
- package/dist/extension/nodejs/node_modules/interceptor.js +258 -47
- package/dist/extension/nodejs/node_modules/interceptor.js.map +4 -4
- package/node_modules/@aws-sdk/checksums/package.json +5 -5
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/package.json +8 -8
- package/node_modules/@aws-sdk/client-iam/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-iam/package.json +9 -9
- package/node_modules/@aws-sdk/client-iot/dist-cjs/index.js +71 -9
- package/node_modules/@aws-sdk/client-iot/dist-es/models/enums.js +14 -0
- package/node_modules/@aws-sdk/client-iot/dist-es/schemas/schemas_0.js +49 -8
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/AttachSecurityProfileCommand.d.ts +4 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/CancelDetectMitigationActionsTaskCommand.d.ts +4 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/CreateCustomMetricCommand.d.ts +4 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/CreateDimensionCommand.d.ts +4 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/CreateSecurityProfileCommand.d.ts +4 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/CreateTopicRuleCommand.d.ts +34 -0
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/CreateTopicRuleDestinationCommand.d.ts +14 -0
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/DeleteCustomMetricCommand.d.ts +4 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/DeleteDimensionCommand.d.ts +4 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/DeleteSecurityProfileCommand.d.ts +4 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/DeleteTopicRuleDestinationCommand.d.ts +2 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/DeleteV2LoggingLevelCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/DeprecateThingTypeCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/DescribeCustomMetricCommand.d.ts +4 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/DescribeDetectMitigationActionsTaskCommand.d.ts +4 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/DescribeDimensionCommand.d.ts +4 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/DescribeSecurityProfileCommand.d.ts +4 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/DetachSecurityProfileCommand.d.ts +4 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/GetBehaviorModelTrainingSummariesCommand.d.ts +4 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/GetTopicRuleCommand.d.ts +34 -0
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/GetTopicRuleDestinationCommand.d.ts +7 -0
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/ListActiveViolationsCommand.d.ts +4 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/ListCustomMetricsCommand.d.ts +4 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/ListDetectMitigationActionsExecutionsCommand.d.ts +4 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/ListDetectMitigationActionsTasksCommand.d.ts +4 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/ListDimensionsCommand.d.ts +4 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/ListSecurityProfilesCommand.d.ts +4 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/ListSecurityProfilesForTargetCommand.d.ts +4 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/ListStreamsCommand.d.ts +2 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/ListTagsForResourceCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/ListTargetsForPolicyCommand.d.ts +1 -2
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/ListTargetsForSecurityProfileCommand.d.ts +4 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/ListTopicRuleDestinationsCommand.d.ts +7 -0
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/ListViolationEventsCommand.d.ts +4 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/PutVerificationStateOnViolationCommand.d.ts +4 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/ReplaceTopicRuleCommand.d.ts +34 -0
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/StartDetectMitigationActionsTaskCommand.d.ts +4 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/UpdateCustomMetricCommand.d.ts +4 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/UpdateDimensionCommand.d.ts +4 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/UpdateSecurityProfileCommand.d.ts +4 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/commands/ValidateSecurityProfileBehaviorsCommand.d.ts +4 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/models/enums.d.ts +38 -0
- package/node_modules/@aws-sdk/client-iot/dist-types/models/models_0.d.ts +195 -45
- package/node_modules/@aws-sdk/client-iot/dist-types/models/models_1.d.ts +46 -69
- package/node_modules/@aws-sdk/client-iot/dist-types/models/models_2.d.ts +112 -2
- package/node_modules/@aws-sdk/client-iot/dist-types/schemas/schemas_0.d.ts +5 -0
- package/node_modules/@aws-sdk/client-iot/dist-types/ts3.4/commands/DeleteTopicRuleDestinationCommand.d.ts +2 -4
- package/node_modules/@aws-sdk/client-iot/dist-types/ts3.4/commands/DeleteV2LoggingLevelCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/ts3.4/commands/DeprecateThingTypeCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/ts3.4/commands/ListStreamsCommand.d.ts +2 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/ts3.4/commands/ListTargetsForPolicyCommand.d.ts +1 -2
- package/node_modules/@aws-sdk/client-iot/dist-types/ts3.4/models/enums.d.ts +18 -0
- package/node_modules/@aws-sdk/client-iot/dist-types/ts3.4/models/models_0.d.ts +36 -11
- package/node_modules/@aws-sdk/client-iot/dist-types/ts3.4/models/models_1.d.ts +11 -18
- package/node_modules/@aws-sdk/client-iot/dist-types/ts3.4/models/models_2.d.ts +28 -0
- package/node_modules/@aws-sdk/client-iot/dist-types/ts3.4/schemas/schemas_0.d.ts +5 -0
- package/node_modules/@aws-sdk/client-iot/package.json +8 -8
- package/node_modules/@aws-sdk/client-iot-data-plane/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-iot-data-plane/package.json +8 -8
- package/node_modules/@aws-sdk/client-lambda/README.md +21 -0
- package/node_modules/@aws-sdk/client-lambda/dist-cjs/index.js +83 -3
- package/node_modules/@aws-sdk/client-lambda/dist-es/Lambda.js +6 -0
- package/node_modules/@aws-sdk/client-lambda/dist-es/commands/DeleteResourcePolicyCommand.js +4 -0
- package/node_modules/@aws-sdk/client-lambda/dist-es/commands/GetResourcePolicyCommand.js +4 -0
- package/node_modules/@aws-sdk/client-lambda/dist-es/commands/PutResourcePolicyCommand.js +4 -0
- package/node_modules/@aws-sdk/client-lambda/dist-es/commands/index.js +3 -0
- package/node_modules/@aws-sdk/client-lambda/dist-es/models/enums.js +5 -0
- package/node_modules/@aws-sdk/client-lambda/dist-es/schemas/schemas_0.js +52 -2
- package/node_modules/@aws-sdk/client-lambda/dist-types/Lambda.d.ts +21 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/LambdaClient.d.ts +5 -2
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/AddPermissionCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/CreateFunctionCommand.d.ts +6 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/DeleteResourcePolicyCommand.d.ts +88 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetFunctionCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetFunctionConfigurationCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetProvisionedConcurrencyConfigCommand.d.ts +4 -4
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetResourcePolicyCommand.d.ts +84 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/ListFunctionsCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/ListVersionsByFunctionCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/PublishVersionCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/PutResourcePolicyCommand.d.ts +98 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/RemovePermissionCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/UpdateFunctionCodeCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/UpdateFunctionConfigurationCommand.d.ts +6 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/index.d.ts +3 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/models/enums.d.ts +13 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/models/errors.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/models/models_0.d.ts +95 -4
- package/node_modules/@aws-sdk/client-lambda/dist-types/schemas/schemas_0.d.ts +9 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/Lambda.d.ts +51 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/LambdaClient.d.ts +18 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/commands/DeleteResourcePolicyCommand.d.ts +38 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/commands/GetResourcePolicyCommand.d.ts +39 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/commands/PutResourcePolicyCommand.d.ts +39 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/commands/index.d.ts +3 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/models/enums.d.ts +6 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/models/models_0.d.ts +25 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/schemas/schemas_0.d.ts +9 -0
- package/node_modules/@aws-sdk/client-lambda/package.json +9 -9
- package/node_modules/@aws-sdk/client-s3/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-s3/package.json +13 -13
- package/node_modules/@aws-sdk/core/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-cognito-identity/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-env/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-http/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +12 -12
- package/node_modules/@aws-sdk/credential-provider-login/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +2 -0
- package/node_modules/@aws-sdk/credential-provider-node/dist-es/runtime/memoize-chain.js +2 -0
- package/node_modules/@aws-sdk/credential-provider-node/package.json +10 -10
- package/node_modules/@aws-sdk/credential-provider-process/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +6 -6
- package/node_modules/@aws-sdk/credential-providers/package.json +15 -15
- package/node_modules/@aws-sdk/middleware-sdk-s3/package.json +6 -6
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/package.json +8 -8
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +3 -3
- package/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +8 -4
- package/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +8 -4
- package/node_modules/@aws-sdk/token-providers/package.json +6 -6
- package/node_modules/@aws-sdk/types/package.json +2 -2
- package/node_modules/@aws-sdk/xml-builder/package.json +2 -2
- package/node_modules/@inquirer/ansi/package.json +3 -2
- package/node_modules/@inquirer/checkbox/dist/index.d.ts +12 -1
- package/node_modules/@inquirer/checkbox/package.json +7 -6
- package/node_modules/@inquirer/confirm/README.md +23 -0
- package/node_modules/@inquirer/confirm/dist/index.d.ts +27 -3
- package/node_modules/@inquirer/confirm/dist/index.js +40 -14
- package/node_modules/@inquirer/confirm/package.json +5 -4
- package/node_modules/@inquirer/core/README.md +9 -3
- package/node_modules/@inquirer/core/dist/lib/create-prompt.d.ts +10 -3
- package/node_modules/@inquirer/core/dist/lib/hook-engine.d.ts +2 -8
- package/node_modules/@inquirer/core/dist/lib/make-theme.js +1 -0
- package/node_modules/@inquirer/core/dist/lib/pagination/use-pagination.d.ts +2 -3
- package/node_modules/@inquirer/core/dist/lib/theme.d.ts +1 -1
- package/node_modules/@inquirer/core/dist/lib/use-memo.js +1 -1
- package/node_modules/@inquirer/core/dist/lib/use-state.d.ts +5 -2
- package/node_modules/@inquirer/core/dist/lib/use-state.js +7 -2
- package/node_modules/@inquirer/core/package.json +7 -6
- package/node_modules/@inquirer/editor/dist/index.d.ts +10 -2
- package/node_modules/@inquirer/editor/package.json +6 -5
- package/node_modules/@inquirer/expand/README.md +1 -1
- package/node_modules/@inquirer/expand/dist/index.d.ts +12 -1
- package/node_modules/@inquirer/expand/package.json +5 -4
- package/node_modules/@inquirer/external-editor/README.md +13 -0
- package/node_modules/@inquirer/external-editor/package.json +4 -3
- package/node_modules/@inquirer/figures/package.json +4 -3
- package/node_modules/@inquirer/input/dist/index.d.ts +13 -1
- package/node_modules/@inquirer/input/package.json +5 -4
- package/node_modules/@inquirer/number/dist/index.d.ts +12 -2
- package/node_modules/@inquirer/number/dist/index.js +1 -6
- package/node_modules/@inquirer/number/dist/is-step-of.d.ts +1 -0
- package/node_modules/@inquirer/number/dist/is-step-of.js +22 -0
- package/node_modules/@inquirer/number/package.json +5 -4
- package/node_modules/@inquirer/password/README.md +24 -6
- package/node_modules/@inquirer/password/dist/index.d.ts +9 -1
- package/node_modules/@inquirer/password/dist/index.js +27 -8
- package/node_modules/@inquirer/password/package.json +6 -5
- package/node_modules/@inquirer/prompts/README.md +67 -7
- package/node_modules/@inquirer/prompts/package.json +14 -13
- package/node_modules/@inquirer/rawlist/dist/index.d.ts +8 -1
- package/node_modules/@inquirer/rawlist/package.json +5 -4
- package/node_modules/@inquirer/search/README.md +9 -8
- package/node_modules/@inquirer/search/dist/index.d.ts +13 -1
- package/node_modules/@inquirer/search/dist/index.js +6 -1
- package/node_modules/@inquirer/search/package.json +6 -5
- package/node_modules/@inquirer/select/dist/index.d.ts +9 -1
- package/node_modules/@inquirer/select/package.json +7 -6
- package/node_modules/@inquirer/type/dist/utils.d.ts +8 -3
- package/node_modules/@inquirer/type/package.json +3 -2
- package/node_modules/@smithy/core/CHANGELOG.md +7 -0
- package/node_modules/@smithy/core/dist-cjs/index.js +3 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +126 -39
- package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +14 -3
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +3 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +3 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +10 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +10 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +16 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +4 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +4 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +4 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +4 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +4 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +7 -0
- package/node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/DefaultIdentityProviderConfig.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-decode.js +29 -13
- package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-encode.js +12 -4
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeDeserializer.js +9 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeSerializer.js +7 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeDeserializer2.js +44 -15
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeSerializer2.js +22 -4
- package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +5 -0
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js +4 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js +6 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js +4 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/resolveEndpoint.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +7 -0
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js +4 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +9 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +5 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/parseRetryAfterHeader.js +4 -1
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.browser.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.native.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/transport/hasOwn.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/transport/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js +3 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.browser.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.native.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/transport/hasOwn.d.ts +4 -0
- package/node_modules/@smithy/core/dist-types/submodules/transport/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.browser.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.native.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/transport/hasOwn.d.ts +4 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/transport/index.d.ts +1 -0
- package/node_modules/@smithy/core/package.json +1 -1
- package/node_modules/@smithy/node-http-handler/CHANGELOG.md +23 -0
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +18 -6
- package/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +3 -0
- package/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +1 -0
- package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +3 -0
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +2 -3
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +8 -1
- package/node_modules/@smithy/node-http-handler/package.json +3 -3
- package/node_modules/@smithy/types/CHANGELOG.md +6 -0
- package/node_modules/@smithy/types/dist-types/http/httpHandlerInitialization.d.ts +14 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/http/httpHandlerInitialization.d.ts +14 -0
- package/node_modules/@smithy/types/package.json +1 -1
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/buffer.buffer.d.ts +10 -5
- package/node_modules/@types/node/crypto.d.ts +2 -4
- package/node_modules/@types/node/dgram.d.ts +119 -4
- package/node_modules/@types/node/ffi.d.ts +1 -1
- package/node_modules/@types/node/fs/promises.d.ts +61 -65
- package/node_modules/@types/node/fs.d.ts +86 -76
- package/node_modules/@types/node/http.d.ts +17 -1
- package/node_modules/@types/node/http2.d.ts +12 -4
- package/node_modules/@types/node/index.d.ts +1 -0
- package/node_modules/@types/node/inspector.d.ts +2 -1
- package/node_modules/@types/node/net.d.ts +108 -16
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/node/process.d.ts +52 -0
- package/node_modules/@types/node/quic.d.ts +246 -38
- package/node_modules/@types/node/sqlite.d.ts +6 -2
- package/node_modules/@types/node/stream/iter.d.ts +4 -4
- package/node_modules/@types/node/test.d.ts +36 -0
- package/node_modules/@types/node/tls.d.ts +24 -0
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +5 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +1 -0
- package/node_modules/@types/node/ts5.7/index.d.ts +1 -0
- package/node_modules/@types/node/tty.d.ts +4 -3
- package/node_modules/@types/node/vfs.d.ts +210 -0
- package/node_modules/@types/node/vm.d.ts +1 -1
- package/node_modules/fast-xml-parser/CHANGELOG.md +8 -1
- package/node_modules/fast-xml-parser/README.md +1 -1
- package/node_modules/fast-xml-parser/lib/fxp.cjs +1 -1
- package/node_modules/fast-xml-parser/lib/fxp.min.js +1 -1
- package/node_modules/fast-xml-parser/lib/fxp.min.js.map +1 -1
- package/node_modules/fast-xml-parser/lib/fxparser.min.js +1 -1
- package/node_modules/fast-xml-parser/lib/fxparser.min.js.map +1 -1
- package/node_modules/fast-xml-parser/lib/fxvalidator.min.js +1 -1
- package/node_modules/fast-xml-parser/lib/fxvalidator.min.js.map +1 -1
- package/node_modules/fast-xml-parser/package.json +2 -2
- package/node_modules/fast-xml-parser/src/fxp.d.ts +2 -0
- package/node_modules/fast-xml-parser/src/validator.js +98 -5
- package/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +16 -1
- package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +23 -1
- package/node_modules/fast-xml-parser/src/xmlparser/xmlNode.js +14 -0
- package/node_modules/inquirer/README.md +3 -9
- package/node_modules/inquirer/dist/index.d.ts +2 -3
- package/node_modules/inquirer/dist/index.js +1 -1
- package/node_modules/inquirer/dist/types.d.ts +3 -3
- package/node_modules/inquirer/package.json +7 -6
- package/node_modules/strnum/CHANGELOG.md +6 -0
- package/node_modules/strnum/package.json +1 -1
- package/node_modules/strnum/strnum.js +5 -1
- package/package.json +19 -19
- package/node_modules/@inquirer/external-editor/dist/errors/CreateFileError.d.ts +0 -10
- package/node_modules/@inquirer/external-editor/dist/errors/CreateFileError.js +0 -13
- package/node_modules/@inquirer/external-editor/dist/errors/LaunchEditorError.d.ts +0 -10
- package/node_modules/@inquirer/external-editor/dist/errors/LaunchEditorError.js +0 -13
- package/node_modules/@inquirer/external-editor/dist/errors/ReadFileError.d.ts +0 -10
- package/node_modules/@inquirer/external-editor/dist/errors/ReadFileError.js +0 -13
- package/node_modules/@inquirer/external-editor/dist/errors/RemoveFileError.d.ts +0 -10
- package/node_modules/@inquirer/external-editor/dist/errors/RemoveFileError.js +0 -13
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import type { Prettify } from '@inquirer/type';
|
|
2
1
|
export declare function usePagination<T>({ items, active, renderItem, pageSize, loop, }: {
|
|
3
2
|
items: ReadonlyArray<T>;
|
|
4
3
|
/** The index of the active item. */
|
|
5
4
|
active: number;
|
|
6
5
|
/** Renders an item as part of a page. */
|
|
7
|
-
renderItem: (layout:
|
|
6
|
+
renderItem: (layout: {
|
|
8
7
|
item: T;
|
|
9
8
|
index: number;
|
|
10
9
|
isActive: boolean;
|
|
11
|
-
}
|
|
10
|
+
}) => string;
|
|
12
11
|
/** The size of the page. */
|
|
13
12
|
pageSize: number;
|
|
14
13
|
/** Allows creating an infinitely looping list. `true` if unspecified. */
|
|
@@ -160,7 +160,7 @@ type DefaultTheme = {
|
|
|
160
160
|
key: (text: string) => string;
|
|
161
161
|
};
|
|
162
162
|
};
|
|
163
|
-
export type Theme<Extension extends object = object> =
|
|
163
|
+
export type Theme<Extension extends object = object> = Extension & DefaultTheme;
|
|
164
164
|
export declare const defaultTheme: DefaultTheme;
|
|
165
165
|
export declare function getDefaultTheme(): DefaultTheme;
|
|
166
166
|
export {};
|
|
@@ -2,7 +2,7 @@ import { withPointer } from "./hook-engine.js";
|
|
|
2
2
|
export function useMemo(fn, dependencies) {
|
|
3
3
|
return withPointer((pointer) => {
|
|
4
4
|
const prev = pointer.get();
|
|
5
|
-
if (!
|
|
5
|
+
if (!pointer.initialized ||
|
|
6
6
|
prev.dependencies.length !== dependencies.length ||
|
|
7
7
|
prev.dependencies.some((dep, i) => dep !== dependencies[i])) {
|
|
8
8
|
const value = fn();
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
type NotFunction<T> = T extends (...args: never) => unknown ? never : T;
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type Reducer<Value> = (currentValue: Value) => Value;
|
|
3
|
+
type SetState<Value> = (newValue: NotFunction<Value> | Reducer<Value>) => void;
|
|
4
|
+
type OptionalSetState<Value> = (newValue?: NotFunction<Value> | Reducer<Value>) => void;
|
|
5
|
+
export declare function useState<Value>(defaultValue: NotFunction<Value> | (() => Value)): [Value, SetState<Value>];
|
|
6
|
+
export declare function useState<Value>(defaultValue?: NotFunction<Value> | (() => Value)): [Value | undefined, OptionalSetState<Value | undefined>];
|
|
4
7
|
export {};
|
|
@@ -3,12 +3,17 @@ import { withPointer, handleChange } from "./hook-engine.js";
|
|
|
3
3
|
function isFactory(value) {
|
|
4
4
|
return typeof value === 'function';
|
|
5
5
|
}
|
|
6
|
+
function isReducer(value) {
|
|
7
|
+
return typeof value === 'function';
|
|
8
|
+
}
|
|
6
9
|
export function useState(defaultValue) {
|
|
7
10
|
return withPointer((pointer) => {
|
|
8
11
|
const setState = AsyncResource.bind(function setState(newValue) {
|
|
12
|
+
const currentValue = pointer.get();
|
|
13
|
+
const nextValue = isReducer(newValue) ? newValue(currentValue) : newValue;
|
|
9
14
|
// Noop if the value is still the same.
|
|
10
|
-
if (
|
|
11
|
-
pointer.set(
|
|
15
|
+
if (!Object.is(currentValue, nextValue)) {
|
|
16
|
+
pointer.set(nextValue);
|
|
12
17
|
// Trigger re-render
|
|
13
18
|
handleChange();
|
|
14
19
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inquirer/core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.2",
|
|
4
4
|
"description": "Core Inquirer prompt API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"answer",
|
|
@@ -67,17 +67,18 @@
|
|
|
67
67
|
"tsc": "tsc"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@inquirer/ansi": "^2.0.
|
|
71
|
-
"@inquirer/figures": "^2.0.
|
|
72
|
-
"@inquirer/type": "
|
|
70
|
+
"@inquirer/ansi": "^2.0.8",
|
|
71
|
+
"@inquirer/figures": "^2.0.9",
|
|
72
|
+
"@inquirer/type": "4.1.1",
|
|
73
73
|
"cli-width": "^4.1.0",
|
|
74
74
|
"fast-wrap-ansi": "^0.2.0",
|
|
75
75
|
"mute-stream": "^3.0.0",
|
|
76
76
|
"signal-exit": "^4.1.0"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
|
+
"@repo/tsconfig": "0.0.0",
|
|
79
80
|
"@types/mute-stream": "^0.0.4",
|
|
80
|
-
"@types/node": "^
|
|
81
|
+
"@types/node": "^26.1.1",
|
|
81
82
|
"typescript": "^6.0.2"
|
|
82
83
|
},
|
|
83
84
|
"peerDependencies": {
|
|
@@ -93,5 +94,5 @@
|
|
|
93
94
|
},
|
|
94
95
|
"main": "./dist/index.js",
|
|
95
96
|
"types": "./dist/index.d.ts",
|
|
96
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "5748bd9966b5e175ddf5995ee4cdce6f60c4272e"
|
|
97
98
|
}
|
|
@@ -10,12 +10,20 @@ type EditorTheme = {
|
|
|
10
10
|
};
|
|
11
11
|
type EditorConfig = {
|
|
12
12
|
message: string;
|
|
13
|
-
default?: string;
|
|
13
|
+
default?: string | undefined;
|
|
14
14
|
postfix?: string;
|
|
15
15
|
waitForUserInput?: boolean;
|
|
16
16
|
validate?: (value: string) => boolean | string | Promise<string | boolean>;
|
|
17
17
|
file?: FileOptions;
|
|
18
18
|
theme?: PartialDeep<Theme<EditorTheme>>;
|
|
19
19
|
};
|
|
20
|
-
declare const _default: import("@inquirer/type").Prompt<string,
|
|
20
|
+
declare const _default: import("@inquirer/type").Prompt<string, {
|
|
21
|
+
message: string;
|
|
22
|
+
default?: string | undefined | undefined;
|
|
23
|
+
postfix?: string | undefined;
|
|
24
|
+
waitForUserInput?: boolean | undefined;
|
|
25
|
+
validate?: ((value: string) => boolean | string | Promise<string | boolean>) | undefined;
|
|
26
|
+
file?: FileOptions | undefined;
|
|
27
|
+
theme?: PartialDeep<Theme<EditorTheme>> | undefined;
|
|
28
|
+
} & EditorConfig>;
|
|
21
29
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inquirer/editor",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.2",
|
|
4
4
|
"description": "Inquirer multiline editor prompt",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"answer",
|
|
@@ -67,11 +67,12 @@
|
|
|
67
67
|
"tsc": "tsc"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@inquirer/core": "^
|
|
71
|
-
"@inquirer/external-editor": "^3.0.
|
|
72
|
-
"@inquirer/type": "
|
|
70
|
+
"@inquirer/core": "^12.0.2",
|
|
71
|
+
"@inquirer/external-editor": "^3.0.5",
|
|
72
|
+
"@inquirer/type": "4.1.1"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
|
+
"@repo/tsconfig": "0.0.0",
|
|
75
76
|
"typescript": "^6.0.2"
|
|
76
77
|
},
|
|
77
78
|
"peerDependencies": {
|
|
@@ -87,5 +88,5 @@
|
|
|
87
88
|
},
|
|
88
89
|
"main": "./dist/index.js",
|
|
89
90
|
"types": "./dist/index.d.ts",
|
|
90
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "5748bd9966b5e175ddf5995ee4cdce6f60c4272e"
|
|
91
92
|
}
|
|
@@ -112,7 +112,7 @@ Here's each property:
|
|
|
112
112
|
|
|
113
113
|
- `value`: The value is what will be returned by `await expand()`.
|
|
114
114
|
- `name`: The string displayed in the choice list. It'll default to the stringify `value`.
|
|
115
|
-
- `key`: The input the use must provide to select the choice. Must be a lowercase single
|
|
115
|
+
- `key`: The input the use must provide to select the choice. Must be a lowercase single alphanumeric character string.
|
|
116
116
|
|
|
117
117
|
## Theming
|
|
118
118
|
|
|
@@ -9,6 +9,17 @@ type Choice<Value> = {
|
|
|
9
9
|
name: string;
|
|
10
10
|
value: Value;
|
|
11
11
|
};
|
|
12
|
+
type ExpandConfig<Value = string> = {
|
|
13
|
+
message: string;
|
|
14
|
+
choices: readonly (Separator | {
|
|
15
|
+
key: Key;
|
|
16
|
+
name: Value & string;
|
|
17
|
+
value?: never;
|
|
18
|
+
} | Choice<Value>)[];
|
|
19
|
+
default?: Key | 'h';
|
|
20
|
+
expanded?: boolean;
|
|
21
|
+
theme?: PartialDeep<Theme>;
|
|
22
|
+
};
|
|
12
23
|
declare const expand: <const Value>(config: {
|
|
13
24
|
message: string;
|
|
14
25
|
choices: readonly (Separator | {
|
|
@@ -19,6 +30,6 @@ declare const expand: <const Value>(config: {
|
|
|
19
30
|
default?: (Key | "h") | undefined;
|
|
20
31
|
expanded?: boolean | undefined;
|
|
21
32
|
theme?: PartialDeep<Theme> | undefined;
|
|
22
|
-
}
|
|
33
|
+
} & ExpandConfig<Value>, context?: import("@inquirer/type").Context) => Promise<Value>;
|
|
23
34
|
export default expand;
|
|
24
35
|
export { Separator } from '@inquirer/core';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inquirer/expand",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.4",
|
|
4
4
|
"description": "Inquirer checkbox prompt",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"answer",
|
|
@@ -67,10 +67,11 @@
|
|
|
67
67
|
"tsc": "tsc"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@inquirer/core": "^
|
|
71
|
-
"@inquirer/type": "
|
|
70
|
+
"@inquirer/core": "^12.0.2",
|
|
71
|
+
"@inquirer/type": "4.1.1"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
+
"@repo/tsconfig": "0.0.0",
|
|
74
75
|
"typescript": "^6.0.2"
|
|
75
76
|
},
|
|
76
77
|
"peerDependencies": {
|
|
@@ -86,5 +87,5 @@
|
|
|
86
87
|
},
|
|
87
88
|
"main": "./dist/index.js",
|
|
88
89
|
"types": "./dist/index.d.ts",
|
|
89
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "5748bd9966b5e175ddf5995ee4cdce6f60c4272e"
|
|
90
91
|
}
|
|
@@ -77,6 +77,19 @@ try {
|
|
|
77
77
|
}
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
+
### Windows editor commands
|
|
81
|
+
|
|
82
|
+
On Windows, prefer setting `$VISUAL` or `$EDITOR` to the editor executable
|
|
83
|
+
rather than a `.cmd` or `.bat` shim. This package launches the editor directly
|
|
84
|
+
instead of through a shell so editor arguments and temporary file paths are not
|
|
85
|
+
interpreted as shell commands.
|
|
86
|
+
|
|
87
|
+
For example, use `Code.exe` with `--wait` instead of `code.cmd`:
|
|
88
|
+
|
|
89
|
+
```powershell
|
|
90
|
+
setx VISUAL '"C:\Program Files\Microsoft VS Code\Code.exe" --wait'
|
|
91
|
+
```
|
|
92
|
+
|
|
80
93
|
#### API
|
|
81
94
|
|
|
82
95
|
**Convenience Functions**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inquirer/external-editor",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.5",
|
|
4
4
|
"description": "Edit a string with the users preferred text editor using $VISUAL or $ENVIRONMENT",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"answer",
|
|
@@ -76,8 +76,9 @@
|
|
|
76
76
|
"iconv-lite": "^0.7.2"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
|
+
"@repo/tsconfig": "0.0.0",
|
|
79
80
|
"@types/chardet": "^1.0.0",
|
|
80
|
-
"@types/node": "^
|
|
81
|
+
"@types/node": "^26.1.1",
|
|
81
82
|
"typescript": "^6.0.2"
|
|
82
83
|
},
|
|
83
84
|
"peerDependencies": {
|
|
@@ -93,5 +94,5 @@
|
|
|
93
94
|
},
|
|
94
95
|
"main": "./dist/index.js",
|
|
95
96
|
"types": "./dist/index.d.ts",
|
|
96
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "5748bd9966b5e175ddf5995ee4cdce6f60c4272e"
|
|
97
98
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inquirer/figures",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
4
4
|
"description": "Vendored version of figures, for CJS compatibility",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"answer",
|
|
@@ -68,7 +68,8 @@
|
|
|
68
68
|
"tsc": "tsc"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"@
|
|
71
|
+
"@repo/tsconfig": "0.0.0",
|
|
72
|
+
"@types/node": "^26.1.1",
|
|
72
73
|
"typescript": "^6.0.2"
|
|
73
74
|
},
|
|
74
75
|
"engines": {
|
|
@@ -76,5 +77,5 @@
|
|
|
76
77
|
},
|
|
77
78
|
"main": "./dist/index.js",
|
|
78
79
|
"types": "./dist/index.d.ts",
|
|
79
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "5748bd9966b5e175ddf5995ee4cdce6f60c4272e"
|
|
80
81
|
}
|
|
@@ -16,5 +16,17 @@ type InputConfig = {
|
|
|
16
16
|
pattern?: RegExp;
|
|
17
17
|
patternError?: string;
|
|
18
18
|
};
|
|
19
|
-
declare const _default: import("@inquirer/type").Prompt<string,
|
|
19
|
+
declare const _default: import("@inquirer/type").Prompt<string, {
|
|
20
|
+
message: string;
|
|
21
|
+
default?: string | undefined | undefined;
|
|
22
|
+
prefill?: "tab" | "editable" | undefined;
|
|
23
|
+
required?: boolean | undefined;
|
|
24
|
+
transformer?: ((value: string, { isFinal }: {
|
|
25
|
+
isFinal: boolean;
|
|
26
|
+
}) => string) | undefined;
|
|
27
|
+
validate?: ((value: string) => boolean | string | Promise<string | boolean>) | undefined;
|
|
28
|
+
theme?: PartialDeep<Theme<InputTheme>> | undefined;
|
|
29
|
+
pattern?: RegExp | undefined;
|
|
30
|
+
patternError?: string | undefined;
|
|
31
|
+
} & InputConfig>;
|
|
20
32
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inquirer/input",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.5",
|
|
4
4
|
"description": "Inquirer input text prompt",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"answer",
|
|
@@ -67,10 +67,11 @@
|
|
|
67
67
|
"tsc": "tsc"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@inquirer/core": "^
|
|
71
|
-
"@inquirer/type": "
|
|
70
|
+
"@inquirer/core": "^12.0.2",
|
|
71
|
+
"@inquirer/type": "4.1.1"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
+
"@repo/tsconfig": "0.0.0",
|
|
74
75
|
"typescript": "^6.0.2"
|
|
75
76
|
},
|
|
76
77
|
"peerDependencies": {
|
|
@@ -86,5 +87,5 @@
|
|
|
86
87
|
},
|
|
87
88
|
"main": "./dist/index.js",
|
|
88
89
|
"types": "./dist/index.d.ts",
|
|
89
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "5748bd9966b5e175ddf5995ee4cdce6f60c4272e"
|
|
90
91
|
}
|
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
import { type Theme } from '@inquirer/core';
|
|
2
2
|
import type { PartialDeep } from '@inquirer/type';
|
|
3
|
-
|
|
3
|
+
type NumberConfig<Required extends boolean = boolean> = {
|
|
4
4
|
message: string;
|
|
5
5
|
default?: number | undefined;
|
|
6
|
+
min?: number;
|
|
7
|
+
max?: number;
|
|
8
|
+
step?: number | 'any';
|
|
9
|
+
required?: Required;
|
|
10
|
+
validate?: (value: Required extends true ? number : number | undefined) => boolean | string | Promise<string | boolean>;
|
|
11
|
+
theme?: PartialDeep<Theme>;
|
|
12
|
+
};
|
|
13
|
+
declare const _default: <Required extends boolean>(config: {
|
|
14
|
+
message: string;
|
|
15
|
+
default?: number | undefined | undefined;
|
|
6
16
|
min?: number | undefined;
|
|
7
17
|
max?: number | undefined;
|
|
8
18
|
step?: number | "any" | undefined;
|
|
9
19
|
required?: Required | undefined;
|
|
10
20
|
validate?: ((value: Required extends true ? number : number | undefined) => boolean | string | Promise<string | boolean>) | undefined;
|
|
11
21
|
theme?: PartialDeep<Theme> | undefined;
|
|
12
|
-
}
|
|
22
|
+
} & NumberConfig<Required>, context?: import("@inquirer/type").Context) => Promise<Required extends true ? number : number | undefined>;
|
|
13
23
|
export default _default;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { createPrompt, useState, useKeypress, usePrefix, isBackspaceKey, isEnterKey, isTabKey, makeTheme, } from '@inquirer/core';
|
|
2
|
-
|
|
3
|
-
const valuePow = value * Math.pow(10, 6);
|
|
4
|
-
const stepPow = step * Math.pow(10, 6);
|
|
5
|
-
const minPow = min * Math.pow(10, 6);
|
|
6
|
-
return (valuePow - (Number.isFinite(min) ? minPow : 0)) % stepPow === 0;
|
|
7
|
-
}
|
|
2
|
+
import { isStepOf } from "./is-step-of.js";
|
|
8
3
|
function validateNumber(value, { min, max, step, }) {
|
|
9
4
|
if (value == null || Number.isNaN(value)) {
|
|
10
5
|
return false;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isStepOf(value: number, step: number, min: number): boolean;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
function toDecimal(value) {
|
|
2
|
+
const [coefficient = '', exponent = '0'] = value.toString().toLowerCase().split('e');
|
|
3
|
+
const [integer = '', fraction = ''] = coefficient.split('.');
|
|
4
|
+
return {
|
|
5
|
+
significand: BigInt(`${integer}${fraction}`),
|
|
6
|
+
exponent: Number(exponent) - fraction.length,
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export function isStepOf(value, step, min) {
|
|
10
|
+
if (!Number.isFinite(value) || !Number.isFinite(step) || step === 0) {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
const valueDecimal = toDecimal(value);
|
|
14
|
+
const stepDecimal = toDecimal(step);
|
|
15
|
+
const minDecimal = Number.isFinite(min) ? toDecimal(min) : undefined;
|
|
16
|
+
const exponent = Math.min(valueDecimal.exponent, stepDecimal.exponent, minDecimal?.exponent ?? Infinity);
|
|
17
|
+
const toInteger = (decimal) => decimal.significand * 10n ** BigInt(decimal.exponent - exponent);
|
|
18
|
+
const valueInteger = toInteger(valueDecimal);
|
|
19
|
+
const stepInteger = toInteger(stepDecimal);
|
|
20
|
+
const minInteger = minDecimal ? toInteger(minDecimal) : 0n;
|
|
21
|
+
return (valueInteger - minInteger) % stepInteger === 0n;
|
|
22
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inquirer/number",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.2",
|
|
4
4
|
"description": "Inquirer number prompt",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"answer",
|
|
@@ -67,10 +67,11 @@
|
|
|
67
67
|
"tsc": "tsc"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@inquirer/core": "^
|
|
71
|
-
"@inquirer/type": "
|
|
70
|
+
"@inquirer/core": "^12.0.2",
|
|
71
|
+
"@inquirer/type": "4.1.1"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
+
"@repo/tsconfig": "0.0.0",
|
|
74
75
|
"typescript": "^6.0.2"
|
|
75
76
|
},
|
|
76
77
|
"peerDependencies": {
|
|
@@ -86,5 +87,5 @@
|
|
|
86
87
|
},
|
|
87
88
|
"main": "./dist/index.js",
|
|
88
89
|
"types": "./dist/index.d.ts",
|
|
89
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "5748bd9966b5e175ddf5995ee4cdce6f60c4272e"
|
|
90
91
|
}
|
|
@@ -60,12 +60,13 @@ const answer = await password({ message: 'Enter your name' });
|
|
|
60
60
|
|
|
61
61
|
## Options
|
|
62
62
|
|
|
63
|
-
| Property
|
|
64
|
-
|
|
|
65
|
-
| message
|
|
66
|
-
| mask
|
|
67
|
-
|
|
|
68
|
-
|
|
|
63
|
+
| Property | Type | Required | Description |
|
|
64
|
+
| ---------- | ----------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
65
|
+
| message | `string` | yes | The question to ask |
|
|
66
|
+
| mask | `boolean \| string` | no | Show a `*` mask over the input, use a custom mask character, or keep it transparent. |
|
|
67
|
+
| toggleMask | `boolean` | no | Allow the user to press `ctrl+t` to temporarily reveal the typed value. Defaults to `true`; set to `false` to disable both the shortcut and its help line. |
|
|
68
|
+
| validate | `string => boolean \| string \| Promise<boolean \| string>` | no | On submit, validate the filtered answered content. When returning a string, it'll be used as the error message displayed to the user. Note: returning a rejected promise, we'll assume a code error happened and crash. |
|
|
69
|
+
| theme | [See Theming](#Theming) | no | Customize look of the prompt. |
|
|
69
70
|
|
|
70
71
|
## Theming
|
|
71
72
|
|
|
@@ -83,10 +84,27 @@ type Theme = {
|
|
|
83
84
|
message: (text: string, status: 'idle' | 'done' | 'loading') => string;
|
|
84
85
|
error: (text: string) => string;
|
|
85
86
|
help: (text: string) => string;
|
|
87
|
+
maskedText: string;
|
|
88
|
+
keysHelpTip: (keys: [key: string, action: string][]) => string | undefined;
|
|
86
89
|
};
|
|
87
90
|
};
|
|
88
91
|
```
|
|
89
92
|
|
|
93
|
+
`maskedText` is the inline tip shown when `mask` is off and the value is hidden (default: `[input is masked]`).
|
|
94
|
+
|
|
95
|
+
### `theme.style.keysHelpTip`
|
|
96
|
+
|
|
97
|
+
This function customizes the keyboard shortcut help displayed on the line below the prompt. It receives `[['ctrl+t', 'toggle visibility']]` while the value is hidden. Use it to change the formatting or localize the action, or return `undefined` to hide the help line entirely.
|
|
98
|
+
|
|
99
|
+
```js
|
|
100
|
+
theme: {
|
|
101
|
+
style: {
|
|
102
|
+
keysHelpTip: (keys) =>
|
|
103
|
+
keys.map(([key, action]) => `${key}: ${action}`).join(' | '),
|
|
104
|
+
},
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
90
108
|
# License
|
|
91
109
|
|
|
92
110
|
Copyright (c) 2023 Simon Boudrias (twitter: [@vaxilart](https://twitter.com/Vaxilart))<br/>
|
|
@@ -3,13 +3,21 @@ import type { PartialDeep } from '@inquirer/type';
|
|
|
3
3
|
type PasswordTheme = {
|
|
4
4
|
style: {
|
|
5
5
|
maskedText: string;
|
|
6
|
+
keysHelpTip: (keys: [key: string, action: string][]) => string | undefined;
|
|
6
7
|
};
|
|
7
8
|
};
|
|
8
9
|
type PasswordConfig = {
|
|
9
10
|
message: string;
|
|
10
11
|
mask?: boolean | string;
|
|
12
|
+
toggleMask?: boolean;
|
|
11
13
|
validate?: (value: string) => boolean | string | Promise<string | boolean>;
|
|
12
14
|
theme?: PartialDeep<Theme<PasswordTheme>>;
|
|
13
15
|
};
|
|
14
|
-
declare const _default: import("@inquirer/type").Prompt<string,
|
|
16
|
+
declare const _default: import("@inquirer/type").Prompt<string, {
|
|
17
|
+
message: string;
|
|
18
|
+
mask?: boolean | string | undefined;
|
|
19
|
+
toggleMask?: boolean | undefined;
|
|
20
|
+
validate?: ((value: string) => boolean | string | Promise<string | boolean>) | undefined;
|
|
21
|
+
theme?: PartialDeep<Theme<PasswordTheme>> | undefined;
|
|
22
|
+
} & PasswordConfig>;
|
|
15
23
|
export default _default;
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import { createPrompt, useState, useKeypress, usePrefix, isEnterKey, makeTheme, } from '@inquirer/core';
|
|
2
2
|
import { cursorHide } from '@inquirer/ansi';
|
|
3
|
+
import { styleText } from 'node:util';
|
|
3
4
|
const passwordTheme = {
|
|
4
5
|
style: {
|
|
5
6
|
maskedText: '[input is masked]',
|
|
7
|
+
keysHelpTip: (keys) => keys
|
|
8
|
+
.map(([key, action]) => `${styleText('bold', key)} ${styleText('dim', action)}`)
|
|
9
|
+
.join(styleText('dim', ' • ')),
|
|
6
10
|
},
|
|
7
11
|
};
|
|
8
12
|
export default createPrompt((config, done) => {
|
|
9
|
-
const { validate = () => true } = config;
|
|
13
|
+
const { toggleMask = true, validate = () => true } = config;
|
|
10
14
|
const theme = makeTheme(passwordTheme, config.theme);
|
|
11
15
|
const [status, setStatus] = useState('idle');
|
|
12
16
|
const [errorMsg, setError] = useState();
|
|
13
17
|
const [value, setValue] = useState('');
|
|
18
|
+
const [revealed, setRevealed] = useState(false);
|
|
14
19
|
const prefix = usePrefix({ status, theme });
|
|
15
20
|
useKeypress(async (key, rl) => {
|
|
16
21
|
// Ignore keypress while our prompt is doing other processing.
|
|
@@ -34,27 +39,41 @@ export default createPrompt((config, done) => {
|
|
|
34
39
|
setStatus('idle');
|
|
35
40
|
}
|
|
36
41
|
}
|
|
42
|
+
else if (toggleMask && key.ctrl && key.name === 't') {
|
|
43
|
+
setRevealed((prev) => !prev);
|
|
44
|
+
}
|
|
37
45
|
else {
|
|
38
46
|
setValue(rl.line);
|
|
39
47
|
setError(undefined);
|
|
40
48
|
}
|
|
41
49
|
});
|
|
42
50
|
const message = theme.style.message(config.message, status);
|
|
51
|
+
const showPlaintext = toggleMask && revealed && status === 'idle';
|
|
43
52
|
let formattedValue = '';
|
|
44
|
-
|
|
45
|
-
|
|
53
|
+
if (showPlaintext) {
|
|
54
|
+
formattedValue = value;
|
|
55
|
+
}
|
|
56
|
+
else if (config.mask) {
|
|
46
57
|
const maskChar = typeof config.mask === 'string' ? config.mask : '*';
|
|
47
58
|
formattedValue = maskChar.repeat(value.length);
|
|
48
59
|
}
|
|
49
60
|
else if (status !== 'done') {
|
|
50
|
-
|
|
61
|
+
formattedValue = theme.style.help(theme.style.maskedText);
|
|
51
62
|
}
|
|
52
63
|
if (status === 'done') {
|
|
53
64
|
formattedValue = theme.style.answer(formattedValue);
|
|
54
65
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
error = theme.style.error(errorMsg);
|
|
66
|
+
else if (!config.mask) {
|
|
67
|
+
formattedValue += cursorHide;
|
|
58
68
|
}
|
|
59
|
-
|
|
69
|
+
const content = [prefix, message, formattedValue].filter(Boolean).join(' ');
|
|
70
|
+
const bottomContent = [
|
|
71
|
+
errorMsg ? theme.style.error(errorMsg) : '',
|
|
72
|
+
toggleMask && status === 'idle'
|
|
73
|
+
? theme.style.keysHelpTip([['ctrl+t', 'toggle visibility']])
|
|
74
|
+
: '',
|
|
75
|
+
]
|
|
76
|
+
.filter(Boolean)
|
|
77
|
+
.join('\n');
|
|
78
|
+
return [content, bottomContent];
|
|
60
79
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inquirer/password",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.1",
|
|
4
4
|
"description": "Inquirer password prompt",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"answer",
|
|
@@ -67,11 +67,12 @@
|
|
|
67
67
|
"tsc": "tsc"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@inquirer/ansi": "^2.0.
|
|
71
|
-
"@inquirer/core": "^
|
|
72
|
-
"@inquirer/type": "
|
|
70
|
+
"@inquirer/ansi": "^2.0.8",
|
|
71
|
+
"@inquirer/core": "^12.0.2",
|
|
72
|
+
"@inquirer/type": "4.1.1"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
|
+
"@repo/tsconfig": "0.0.0",
|
|
75
76
|
"typescript": "^6.0.2"
|
|
76
77
|
},
|
|
77
78
|
"peerDependencies": {
|
|
@@ -87,5 +88,5 @@
|
|
|
87
88
|
},
|
|
88
89
|
"main": "./dist/index.js",
|
|
89
90
|
"types": "./dist/index.d.ts",
|
|
90
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "5748bd9966b5e175ddf5995ee4cdce6f60c4272e"
|
|
91
92
|
}
|