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

resolve security vulnerabilities for appsync local and cognito #89

Merged
merged 6 commits into from
Dec 3, 2024
Merged
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
436 changes: 270 additions & 166 deletions examples/master/package-lock.json

Large diffs are not rendered by default.

436 changes: 270 additions & 166 deletions examples/seq/package-lock.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ WORKDIR /app

COPY ./package.json ./
COPY ./package-lock.json ./
RUN npm install --legacy-peer-deps
RUN npm ci
COPY . .
CMD ["npm", "run", "serve"]
5,241 changes: 1,406 additions & 3,835 deletions packages/cli/templates/infra-local/appsync-simulator/package-lock.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
"typescript": "^4.9.4"
},
"dependencies": {
"amplify-appsync-simulator": "https://github.com/tabk30/amplify-appsync-simulator.git"
"@aws-amplify/amplify-appsync-simulator": "^2.16.7"
},
"overrides": {
"graphql": "^14.7.0"
}
}
29 changes: 15 additions & 14 deletions packages/cli/templates/infra-local/appsync-simulator/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ import {
AmplifyAppSyncSimulator,
AmplifyAppSyncSimulatorAuthenticationType,
AmplifyAppSyncSimulatorConfig,
} from 'amplify-appsync-simulator';
} from '@aws-amplify/amplify-appsync-simulator'

import { schema } from './schema';
import { readVTL } from './vtl/readVTL';
import { resolversConfig } from './resolversConfig';
import { schema } from './schema'
import { readVTL } from './vtl/readVTL'
import { resolversConfig } from './resolversConfig'

class AppSyncSimulator {
httpPort: number;
httpPort: number

constructor(httpPort: number) {
this.httpPort = httpPort;
this.httpPort = httpPort
}

async start() {
Expand Down Expand Up @@ -43,19 +43,20 @@ class AppSyncSimulator {
},
],
resolvers: resolversConfig,
};
}
const amplifySimulator = new AmplifyAppSyncSimulator({
port: this.httpPort,
});
await amplifySimulator.start();
await amplifySimulator.init(simulatorConfig);
})
console.log('simulatorConfig', simulatorConfig)
await amplifySimulator.start()
await amplifySimulator.init(simulatorConfig)
}
}

const httpPort = Number(process.env.PORT) || 4000;
const simulator = new AppSyncSimulator(httpPort);
const httpPort = Number(process.env.PORT) || 4000
const simulator = new AppSyncSimulator(httpPort)
simulator.start().then(() => {
console.log(
`🚀 App Sync Simulator started at http://localhost:${httpPort}/graphql`,
);
});
)
})
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
AppSyncSimulatorPipelineResolverConfig,
AppSyncSimulatorUnitResolverConfig,
RESOLVER_KIND,
} from 'amplify-appsync-simulator';
} from '@aws-amplify/amplify-appsync-simulator';

export const resolversConfig: (
| AppSyncSimulatorPipelineResolverConfig
Expand Down
Loading
Loading