Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps(cw): regen clients with codegen at 0.25.x (IGNORE) #6439

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28,657 changes: 12,366 additions & 16,291 deletions package-lock.json

Large diffs are not rendered by default.

33 changes: 16 additions & 17 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -496,26 +496,25 @@
"dependencies": {
"@amzn/amazon-q-developer-streaming-client": "file:../../src.gen/@amzn/amazon-q-developer-streaming-client",
"@amzn/codewhisperer-streaming": "file:../../src.gen/@amzn/codewhisperer-streaming",
"@aws-sdk/client-cloudformation": "^3.667.0",
"@aws-sdk/client-cloudwatch-logs": "^3.666.0",
"@aws-sdk/client-cognito-identity": "^3.637.0",
"@aws-sdk/client-lambda": "^3.637.0",
"@aws-sdk/client-sso": "^3.342.0",
"@aws-sdk/client-sso-oidc": "^3.574.0",
"@aws-sdk/credential-provider-ini": "3.46.0",
"@aws-sdk/credential-provider-process": "3.37.0",
"@aws-sdk/credential-provider-sso": "^3.345.0",
"@aws-sdk/property-provider": "3.46.0",
"@aws-sdk/smithy-client": "^3.46.0",
"@aws-sdk/util-arn-parser": "^3.46.0",
"@aws-sdk/client-cloudformation": "<3.696.0",
"@aws-sdk/client-cloudwatch-logs": "<3.696.0",
"@aws-sdk/client-cognito-identity": "<3.696.0",
"@aws-sdk/client-lambda": "<3.696.0",
"@aws-sdk/client-sso": "<3.696.0",
"@aws-sdk/client-sso-oidc": "<3.696.0",
"@aws-sdk/credential-provider-env": "<3.696.0",
"@aws-sdk/credential-provider-process": "<3.696.0",
"@aws-sdk/property-provider": "<3.696.0",
"@aws-sdk/smithy-client": "<3.696.0",
"@aws-sdk/util-arn-parser": "<3.696.0",
"@aws/mynah-ui": "^4.21.6",
"@gerhobbelt/gitignore-parser": "^0.2.0-9",
"@iarna/toml": "^2.2.5",
"@smithy/middleware-retry": "^2.3.1",
"@smithy/protocol-http": "^3.3.0",
"@smithy/service-error-classification": "^2.1.5",
"@smithy/shared-ini-file-loader": "^2.2.8",
"@smithy/util-retry": "^2.2.0",
"@smithy/middleware-retry": "^3.0.0",
"@smithy/protocol-http": "^4.0.0",
"@smithy/service-error-classification": "^3.0.0",
"@smithy/shared-ini-file-loader": "^3.0.0",
"@smithy/util-retry": "^3.0.0",
"@vscode/debugprotocol": "^1.57.0",
"@zip.js/zip.js": "^2.7.41",
"adm-zip": "^0.5.10",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"AWS.configuration.description.suppressPrompts": "Prompts which ask for confirmation. Checking an item suppresses the prompt.",
"AWS.configuration.enableCodeLenses": "Enable SAM hints in source code and template.yaml files",
"AWS.configuration.description.resources.enabledResources": "AWS resources to display in the 'Resources' portion of the explorer.",
"AWS.configuration.description.featureDevelopment.allowRunningCodeAndTests": "Allow /dev to run code and test commands",
"AWS.configuration.description.featureDevelopment.allowRunningCodeAndTests": "Allow /dev to run code and test commands",
"AWS.configuration.description.experiments": "Try experimental features and give feedback. Note that experimental features may be removed at any time.\n * `jsonResourceModification` - Enables basic create, update, and delete support for cloud resources via the JSON Resources explorer component.",
"AWS.stepFunctions.asl.format.enable.desc": "Enables the default formatter used with Amazon States Language files",
"AWS.stepFunctions.asl.maxItemsComputed.desc": "The maximum number of outline symbols and folding regions computed (limited for performance reasons).",
Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/amazonqFeatureDev/client/featureDev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
MetricData,
TelemetryEvent,
} from './featuredevproxyclient'
import { ExportResultArchiveCommandInput } from '@amzn/codewhisperer-streaming'

// Re-enable once BE is able to handle retries.
const writeAPIRetryOptions = {
Expand Down Expand Up @@ -231,7 +232,7 @@ export class FeatureDevClient {
const params = {
exportId: conversationId,
exportIntent: 'TASK_ASSIST',
}
} satisfies ExportResultArchiveCommandInput
getLogger().debug(`Executing exportResultArchive with %O`, params)
const archiveResponse = await streamingClient.exportResultArchive(params)
const buffer: number[] = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import { Credentials } from '@aws-sdk/types'
import { fromInstanceMetadata } from '@aws-sdk/credential-provider-imds'
import { fromInstanceMetadata } from '@smithy/credential-provider-imds'
import { DefaultEc2MetadataClient } from '../../shared/clients/ec2MetadataClient'
import { Ec2MetadataClient } from '../../shared/clients/ec2MetadataClient'
import { getLogger } from '../../shared/logger'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import { Credentials, CredentialProvider } from '@aws-sdk/types'
import { fromContainerMetadata } from '@aws-sdk/credential-provider-imds'
import { fromContainerMetadata } from '@smithy/credential-provider-imds'
import { EnvironmentVariables } from '../../shared/environmentVariables'
import { CredentialType } from '../../shared/telemetry/telemetry.gen'
import { getStringHash } from '../../shared/utilities/textUtilities'
Expand Down
29 changes: 15 additions & 14 deletions packages/core/src/auth/providers/sharedCredentialsProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
*/

import * as AWS from '@aws-sdk/types'
import { AssumeRoleParams, fromIni } from '@aws-sdk/credential-provider-ini'
import { fromIni } from '@aws-sdk/credential-provider-ini'
import { fromProcess } from '@aws-sdk/credential-provider-process'
import { ParsedIniData, SharedConfigFiles } from '@smithy/shared-ini-file-loader'
import { ParsedIniData } from '@smithy/types'
import { chain } from '@aws-sdk/property-provider'
import { fromInstanceMetadata, fromContainerMetadata } from '@aws-sdk/credential-provider-imds'
import { fromInstanceMetadata, fromContainerMetadata } from '@smithy/credential-provider-imds'
import { fromEnv } from '@aws-sdk/credential-provider-env'
import { getLogger } from '../../shared/logger'
import { getStringHash } from '../../shared/utilities/textUtilities'
Expand All @@ -19,19 +19,19 @@ import { assertHasProps, getMissingProps, hasProps } from '../../shared/utilitie
import { DefaultStsClient } from '../../shared/clients/stsClient'
import { SsoAccessTokenProvider } from '../sso/ssoAccessTokenProvider'
import { SsoClient } from '../sso/clients'
import { toRecord } from '../../shared/utilities/collectionUtils'
import {
extractDataFromSection,
getRequiredFields,
getSectionDataOrThrow,
getSectionOrThrow,
isProfileSection,
Profile,
Section,
} from '../credentials/sharedCredentials'
import { SectionName, SharedCredentialsKeys } from '../credentials/types'
import { SsoProfile, hasScopes, scopesSsoAccountAccess } from '../connection'
import { builderIdStartUrl } from '../sso/constants'
// TODO: There must be a better way to import this.
import { AssumeRoleParams } from '@aws-sdk/credential-provider-ini/dist-types/resolveAssumeRoleCredentials'

const credentialSources = {
ECS_CONTAINER: 'EcsContainer',
Expand Down Expand Up @@ -390,23 +390,24 @@ export class SharedCredentialsProvider implements CredentialsProvider {
}
}

// TODO: reimplement this workaround, and confirm that it is still needed.
// Our credentials logic merges profiles from the credentials and config files but SDK v3 does not
// This can cause odd behavior where the Toolkit can switch to a profile but not authenticate with it
// So the workaround is to do give the SDK the merged profiles directly
const profileSections = this.sections.filter(isProfileSection)
const profiles = toRecord(
profileSections.map((s) => s.name),
(k) => this.getProfile(k)
)
// const profileSections = this.sections.filter(isProfileSection)
// const profiles = toRecord(
// profileSections.map((s) => s.name),
// (k) => this.getProfile(k)
// )

return fromIni({
profile: this.profileName,
mfaCodeProvider: async (mfaSerial) => await getMfaTokenFromUser(mfaSerial, this.profileName),
roleAssumer: assumeRole,
loadedConfig: Promise.resolve({
credentialsFile: loadedCreds ?? profiles,
configFile: {},
} as SharedConfigFiles),
// loadedConfig: Promise.resolve({
// credentialsFile: loadedCreds ?? profiles,
// configFile: {},
// } as SharedConfigFiles),
})
}

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/shared/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import * as vscode from 'vscode'
import { AWSError } from 'aws-sdk'
import { ServiceException } from '@aws-sdk/smithy-client'
import { ServiceException } from '@smithy/smithy-client'
import { isThrottlingError, isTransientError } from '@smithy/service-error-classification'
import { Result } from './telemetry/telemetry'
import { CancellationError } from './utilities/timeoutUtils'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
52 changes: 51 additions & 1 deletion src.gen/@amzn/amazon-q-developer-streaming-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
AWS SDK for JavaScript QDeveloperStreaming Client for Node.js, Browser and React Native.

## Installing
To install the this package, simply type add or install @amzn/amazon-q-developer-streaming-client
To install this package, simply type add or install @amzn/amazon-q-developer-streaming-client
using your favorite package manager:
- `npm install @amzn/amazon-q-developer-streaming-client`
- `yarn add @amzn/amazon-q-developer-streaming-client`
Expand Down Expand Up @@ -194,6 +194,7 @@ To contribute to client you can check our [generate clients scripts](https://git
This SDK is distributed under the
[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0),
see LICENSE for more information.

## Client Commands (Operations List)

<details>
Expand Down Expand Up @@ -324,6 +325,13 @@ UpdateProfile
</details>
<details>
<summary>
VendKeyGrant
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qdeveloperstreaming/command/VendKeyGrantCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qdeveloperstreaming/Interface/VendKeyGrantCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qdeveloperstreaming/Interface/VendKeyGrantCommandOutput/)
</details>
<details>
<summary>
CreateArtifactUploadUrl
</summary>

Expand Down Expand Up @@ -366,6 +374,13 @@ GetCodeAnalysis
</details>
<details>
<summary>
GetCodeFixJob
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qdeveloperstreaming/command/GetCodeFixJobCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qdeveloperstreaming/Interface/GetCodeFixJobCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qdeveloperstreaming/Interface/GetCodeFixJobCommandOutput/)
</details>
<details>
<summary>
GetTaskAssistCodeGeneration
</summary>

Expand Down Expand Up @@ -436,6 +451,13 @@ StartCodeAnalysis
</details>
<details>
<summary>
StartCodeFixJob
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qdeveloperstreaming/command/StartCodeFixJobCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qdeveloperstreaming/Interface/StartCodeFixJobCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qdeveloperstreaming/Interface/StartCodeFixJobCommandOutput/)
</details>
<details>
<summary>
StartTaskAssistCodeGeneration
</summary>

Expand Down Expand Up @@ -485,6 +507,13 @@ GenerateTaskAssistPlan
</details>
<details>
<summary>
AssociateConnectorResource
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qdeveloperstreaming/command/AssociateConnectorResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qdeveloperstreaming/Interface/AssociateConnectorResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qdeveloperstreaming/Interface/AssociateConnectorResourceCommandOutput/)
</details>
<details>
<summary>
CreateAssignment
</summary>

Expand Down Expand Up @@ -534,6 +563,13 @@ DeletePlugin
</details>
<details>
<summary>
GetConnector
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qdeveloperstreaming/command/GetConnectorCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qdeveloperstreaming/Interface/GetConnectorCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qdeveloperstreaming/Interface/GetConnectorCommandOutput/)
</details>
<details>
<summary>
GetConversation
</summary>

Expand Down Expand Up @@ -590,6 +626,13 @@ ListConversations
</details>
<details>
<summary>
ListDashboardMetrics
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qdeveloperstreaming/command/ListDashboardMetricsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qdeveloperstreaming/Interface/ListDashboardMetricsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qdeveloperstreaming/Interface/ListDashboardMetricsCommandOutput/)
</details>
<details>
<summary>
ListExtensionProviders
</summary>

Expand Down Expand Up @@ -639,6 +682,13 @@ PassRequest
</details>
<details>
<summary>
RejectConnector
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qdeveloperstreaming/command/RejectConnectorCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qdeveloperstreaming/Interface/RejectConnectorCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qdeveloperstreaming/Interface/RejectConnectorCommandOutput/)
</details>
<details>
<summary>
SendEvent
</summary>

Expand Down
Loading
Loading