Skip to content

Commit

Permalink
Merge pull request #89 from mbc-net/develop
Browse files Browse the repository at this point in the history
resolve security vulnerabilities for appsync local and cognito
  • Loading branch information
koichimurakami authored Dec 3, 2024
2 parents 731addb + a7bce5e commit 67ce90c
Show file tree
Hide file tree
Showing 19 changed files with 4,471 additions and 8,481 deletions.
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

0 comments on commit 67ce90c

Please sign in to comment.