Skip to content

Commit

Permalink
Merge pull request #1863 from aws-amplify/merge-main-to-conversation-…
Browse files Browse the repository at this point in the history
…handler-2

Merge main to conversation handler
  • Loading branch information
sobolk authored Aug 14, 2024
2 parents 06ecf88 + 49edc26 commit 1605ce0
Show file tree
Hide file tree
Showing 48 changed files with 17,965 additions and 26,027 deletions.
5 changes: 0 additions & 5 deletions .changeset/cyan-crews-watch.md

This file was deleted.

2 changes: 0 additions & 2 deletions .changeset/fifty-balloons-love.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/wise-planes-fly.md

This file was deleted.

43,129 changes: 17,174 additions & 25,955 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions packages/auth-construct/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @aws-amplify/auth-construct

## 1.2.1

### Patch Changes

- 3c698e0: upgrade AWS SDK packages to latest
- Updated dependencies [3c698e0]
- @aws-amplify/plugin-types@1.1.1

## 1.2.0

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/auth-construct/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aws-amplify/auth-construct",
"version": "1.2.0",
"version": "1.2.1",
"type": "commonjs",
"publishConfig": {
"access": "public"
Expand All @@ -20,7 +20,7 @@
"dependencies": {
"@aws-amplify/backend-output-schemas": "^1.1.0",
"@aws-amplify/backend-output-storage": "^1.0.2",
"@aws-amplify/plugin-types": "^1.0.1",
"@aws-amplify/plugin-types": "^1.1.1",
"@aws-sdk/util-arn-parser": "^3.568.0"
},
"peerDependencies": {
Expand Down
11 changes: 11 additions & 0 deletions packages/backend-deployer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @aws-amplify/backend-deployer

## 1.0.4

### Patch Changes

- 489d16e: throw child process error if no stderr generated during CDK cli execution
- 057a069: Update cdk error mapper to catch all deployment errors
- Updated dependencies [3c698e0]
- Updated dependencies [320a86d]
- @aws-amplify/platform-core@1.0.5
- @aws-amplify/plugin-types@1.1.1

## 1.0.3

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/backend-deployer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aws-amplify/backend-deployer",
"version": "1.0.3",
"version": "1.0.4",
"type": "module",
"publishConfig": {
"access": "public"
Expand All @@ -18,8 +18,8 @@
},
"license": "Apache-2.0",
"dependencies": {
"@aws-amplify/platform-core": "^1.0.4",
"@aws-amplify/plugin-types": "^1.1.0",
"@aws-amplify/platform-core": "^1.0.5",
"@aws-amplify/plugin-types": "^1.1.1",
"execa": "^8.0.1",
"tsx": "^4.6.1"
},
Expand Down
8 changes: 8 additions & 0 deletions packages/backend-function/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @aws-amplify/backend-function

## 1.3.1

### Patch Changes

- 3c698e0: upgrade AWS SDK packages to latest
- Updated dependencies [3c698e0]
- @aws-amplify/plugin-types@1.1.1

## 1.3.0

### Minor Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/backend-function/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aws-amplify/backend-function",
"version": "1.3.0",
"version": "1.3.1",
"type": "module",
"publishConfig": {
"access": "public"
Expand All @@ -20,12 +20,12 @@
"dependencies": {
"@aws-amplify/backend-output-schemas": "^1.1.0",
"@aws-amplify/backend-output-storage": "^1.0.2",
"@aws-amplify/plugin-types": "^1.1.0",
"@aws-amplify/plugin-types": "^1.1.1",
"execa": "^8.0.1"
},
"devDependencies": {
"@aws-amplify/backend-platform-test-stubs": "^0.3.3",
"@aws-amplify/platform-core": "^1.0.3",
"@aws-amplify/platform-core": "^1.0.5",
"@aws-sdk/client-ssm": "^3.624.0",
"aws-sdk": "^2.1550.0",
"uuid": "^9.0.1"
Expand Down
10 changes: 10 additions & 0 deletions packages/backend-secret/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# @aws-amplify/backend-secret

## 1.0.1

### Patch Changes

- 3c698e0: upgrade AWS SDK packages to latest
- Updated dependencies [3c698e0]
- Updated dependencies [320a86d]
- @aws-amplify/platform-core@1.0.5
- @aws-amplify/plugin-types@1.1.1

## 1.0.0

### Major Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/backend-secret/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aws-amplify/backend-secret",
"version": "1.0.0",
"version": "1.0.1",
"type": "module",
"publishConfig": {
"access": "public"
Expand All @@ -18,8 +18,8 @@
},
"license": "Apache-2.0",
"dependencies": {
"@aws-amplify/plugin-types": "^1.0.0",
"@aws-amplify/platform-core": "^1.0.0",
"@aws-amplify/plugin-types": "^1.1.1",
"@aws-amplify/platform-core": "^1.0.5",
"@aws-sdk/client-ssm": "^3.624.0"
},
"devDependencies": {
Expand Down
14 changes: 14 additions & 0 deletions packages/backend/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# @aws-amplify/backend

## 1.0.5

### Patch Changes

- 3c698e0: upgrade AWS SDK packages to latest
- Updated dependencies [3c698e0]
- Updated dependencies [eab6ddb]
- Updated dependencies [320a86d]
- @aws-amplify/backend-function@1.3.1
- @aws-amplify/backend-secret@1.0.1
- @aws-amplify/client-config@1.1.3
- @aws-amplify/platform-core@1.0.5
- @aws-amplify/plugin-types@1.1.1

## 1.0.4

### Patch Changes
Expand Down
12 changes: 6 additions & 6 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aws-amplify/backend",
"version": "1.0.4",
"version": "1.0.5",
"type": "module",
"publishConfig": {
"access": "public"
Expand All @@ -26,15 +26,15 @@
"dependencies": {
"@aws-amplify/data-schema": "^1.0.0",
"@aws-amplify/backend-auth": "^1.1.0",
"@aws-amplify/backend-function": "^1.1.0",
"@aws-amplify/backend-function": "^1.3.1",
"@aws-amplify/backend-data": "^1.0.3",
"@aws-amplify/backend-output-schemas": "^1.1.0",
"@aws-amplify/backend-output-storage": "^1.0.2",
"@aws-amplify/backend-secret": "^1.0.0",
"@aws-amplify/backend-secret": "^1.0.1",
"@aws-amplify/backend-storage": "^1.0.4",
"@aws-amplify/client-config": "^1.0.5",
"@aws-amplify/platform-core": "^1.0.1",
"@aws-amplify/plugin-types": "^1.0.1",
"@aws-amplify/client-config": "^1.1.3",
"@aws-amplify/platform-core": "^1.0.5",
"@aws-amplify/plugin-types": "^1.1.1",
"@aws-sdk/client-amplify": "^3.624.0",
"lodash.snakecase": "^4.1.1"
},
Expand Down
9 changes: 9 additions & 0 deletions packages/cli-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @aws-amplify/cli-core

## 1.1.2

### Patch Changes

- 36feb29: prevent CTRL+C handling for pnpm
- Updated dependencies [3c698e0]
- Updated dependencies [320a86d]
- @aws-amplify/platform-core@1.0.5

## 1.1.1

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/cli-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aws-amplify/cli-core",
"version": "1.1.1",
"version": "1.1.2",
"type": "module",
"publishConfig": {
"access": "public"
Expand All @@ -18,7 +18,7 @@
},
"license": "Apache-2.0",
"dependencies": {
"@aws-amplify/platform-core": "^1.0.3",
"@aws-amplify/platform-core": "^1.0.5",
"@inquirer/prompts": "^3.0.0",
"execa": "^8.0.1",
"kleur": "^4.1.5"
Expand Down
24 changes: 24 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# @aws-amplify/backend-cli

## 1.2.3

### Patch Changes

- 3c698e0: upgrade AWS SDK packages to latest
- eab6ddb: wrap credential related errors for generate commands in AmplifyUserError
- Updated dependencies [489d16e]
- Updated dependencies [3c698e0]
- Updated dependencies [decd10e]
- Updated dependencies [057a069]
- Updated dependencies [eab6ddb]
- Updated dependencies [36feb29]
- Updated dependencies [320a86d]
- @aws-amplify/backend-deployer@1.0.4
- @aws-amplify/deployed-backend-client@1.3.0
- @aws-amplify/model-generator@1.0.4
- @aws-amplify/backend-secret@1.0.1
- @aws-amplify/form-generator@1.0.1
- @aws-amplify/client-config@1.1.3
- @aws-amplify/platform-core@1.0.5
- @aws-amplify/sandbox@1.1.2
- @aws-amplify/schema-generator@1.2.1
- @aws-amplify/cli-core@1.1.2

## 1.2.2

### Patch Changes
Expand Down
22 changes: 11 additions & 11 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aws-amplify/backend-cli",
"version": "1.2.2",
"version": "1.2.3",
"description": "Command line interface for various Amplify tools",
"bin": {
"ampx": "lib/ampx.js",
Expand Down Expand Up @@ -30,17 +30,17 @@
},
"homepage": "https://github.com/aws-amplify/amplify-backend#readme",
"dependencies": {
"@aws-amplify/backend-deployer": "^1.0.3",
"@aws-amplify/backend-deployer": "^1.0.4",
"@aws-amplify/backend-output-schemas": "^1.1.0",
"@aws-amplify/backend-secret": "^1.0.0",
"@aws-amplify/cli-core": "^1.1.1",
"@aws-amplify/client-config": "^1.1.2",
"@aws-amplify/deployed-backend-client": "^1.2.0",
"@aws-amplify/form-generator": "^1.0.0",
"@aws-amplify/model-generator": "^1.0.3",
"@aws-amplify/platform-core": "^1.0.4",
"@aws-amplify/sandbox": "^1.1.1",
"@aws-amplify/schema-generator": "^1.1.0",
"@aws-amplify/backend-secret": "^1.0.1",
"@aws-amplify/cli-core": "^1.1.2",
"@aws-amplify/client-config": "^1.1.3",
"@aws-amplify/deployed-backend-client": "^1.3.0",
"@aws-amplify/form-generator": "^1.0.1",
"@aws-amplify/model-generator": "^1.0.4",
"@aws-amplify/platform-core": "^1.0.5",
"@aws-amplify/sandbox": "^1.1.2",
"@aws-amplify/schema-generator": "^1.2.1",
"@aws-sdk/client-amplify": "^3.624.0",
"@aws-sdk/client-cloudformation": "^3.624.0",
"@aws-sdk/client-s3": "^3.624.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,4 +329,98 @@ void describe('generate forms command', () => {
}
);
});

void it('throws user error if credentials are expired when getting backend outputs', async () => {
const fakeSandboxId = 'my-fake-app-my-fake-username';
const backendIdResolver = {
resolve: mock.fn(() =>
Promise.resolve({
namespace: fakeSandboxId,
name: fakeSandboxId,
type: 'sandbox',
})
),
} as BackendIdentifierResolver;
const formGenerationHandler = new FormGenerationHandler({
awsClientProvider,
});

const fakedBackendOutputClient = {
getOutput: mock.fn(() => {
throw new BackendOutputClientError(
BackendOutputClientErrorType.CREDENTIALS_ERROR,
'token is expired'
);
}),
};

const generateFormsCommand = new GenerateFormsCommand(
backendIdResolver,
() => fakedBackendOutputClient,
formGenerationHandler
);

const parser = yargs().command(
generateFormsCommand as unknown as CommandModule
);
const commandRunner = new TestCommandRunner(parser);
await assert.rejects(
() => commandRunner.runCommand('forms'),
(error: TestCommandError) => {
assert.strictEqual(error.error.name, 'CredentialsError');
assert.strictEqual(
error.error.message,
'Unable to get backend outputs due to invalid credentials.'
);
return true;
}
);
});

void it('throws user error if access is denied when getting backend outputs', async () => {
const fakeSandboxId = 'my-fake-app-my-fake-username';
const backendIdResolver = {
resolve: mock.fn(() =>
Promise.resolve({
namespace: fakeSandboxId,
name: fakeSandboxId,
type: 'sandbox',
})
),
} as BackendIdentifierResolver;
const formGenerationHandler = new FormGenerationHandler({
awsClientProvider,
});

const fakedBackendOutputClient = {
getOutput: mock.fn(() => {
throw new BackendOutputClientError(
BackendOutputClientErrorType.ACCESS_DENIED,
'access is denied'
);
}),
};

const generateFormsCommand = new GenerateFormsCommand(
backendIdResolver,
() => fakedBackendOutputClient,
formGenerationHandler
);

const parser = yargs().command(
generateFormsCommand as unknown as CommandModule
);
const commandRunner = new TestCommandRunner(parser);
await assert.rejects(
() => commandRunner.runCommand('forms'),
(error: TestCommandError) => {
assert.strictEqual(error.error.name, 'AccessDenied');
assert.strictEqual(
error.error.message,
'Unable to get backend outputs due to insufficient permissions.'
);
return true;
}
);
});
});
Loading

0 comments on commit 1605ce0

Please sign in to comment.