@mbc-cqrs-serverless/cli 0.1.39-beta.0 → 0.1.41-beta.0
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/README.md +1 -1
- package/package.json +2 -2
- package/templates/infra-local/appsync-simulator/Dockerfile +1 -1
- package/templates/infra-local/appsync-simulator/package-lock.json +1406 -3835
- package/templates/infra-local/appsync-simulator/package.json +4 -1
- package/templates/infra-local/appsync-simulator/src/main.ts +15 -14
- package/templates/infra-local/appsync-simulator/src/resolversConfig.ts +1 -1
- package/templates/infra-local/cognito-local/package-lock.json +623 -285
- package/templates/infra-local/cognito-local/package.json +5 -0
- package/templates/prisma/schema.prisma +1 -1
- package/templates/src/master/master.controller.ts +3 -1
- package/templates/src/repl.ts +1 -1
|
@@ -2,17 +2,17 @@ import {
|
|
|
2
2
|
AmplifyAppSyncSimulator,
|
|
3
3
|
AmplifyAppSyncSimulatorAuthenticationType,
|
|
4
4
|
AmplifyAppSyncSimulatorConfig,
|
|
5
|
-
} from 'amplify-appsync-simulator'
|
|
5
|
+
} from '@aws-amplify/amplify-appsync-simulator'
|
|
6
6
|
|
|
7
|
-
import { schema } from './schema'
|
|
8
|
-
import { readVTL } from './vtl/readVTL'
|
|
9
|
-
import { resolversConfig } from './resolversConfig'
|
|
7
|
+
import { schema } from './schema'
|
|
8
|
+
import { readVTL } from './vtl/readVTL'
|
|
9
|
+
import { resolversConfig } from './resolversConfig'
|
|
10
10
|
|
|
11
11
|
class AppSyncSimulator {
|
|
12
|
-
httpPort: number
|
|
12
|
+
httpPort: number
|
|
13
13
|
|
|
14
14
|
constructor(httpPort: number) {
|
|
15
|
-
this.httpPort = httpPort
|
|
15
|
+
this.httpPort = httpPort
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
async start() {
|
|
@@ -43,19 +43,20 @@ class AppSyncSimulator {
|
|
|
43
43
|
},
|
|
44
44
|
],
|
|
45
45
|
resolvers: resolversConfig,
|
|
46
|
-
}
|
|
46
|
+
}
|
|
47
47
|
const amplifySimulator = new AmplifyAppSyncSimulator({
|
|
48
48
|
port: this.httpPort,
|
|
49
|
-
})
|
|
50
|
-
|
|
51
|
-
await amplifySimulator.
|
|
49
|
+
})
|
|
50
|
+
console.log('simulatorConfig', simulatorConfig)
|
|
51
|
+
await amplifySimulator.start()
|
|
52
|
+
await amplifySimulator.init(simulatorConfig)
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
55
|
|
|
55
|
-
const httpPort = Number(process.env.PORT) || 4000
|
|
56
|
-
const simulator = new AppSyncSimulator(httpPort)
|
|
56
|
+
const httpPort = Number(process.env.PORT) || 4000
|
|
57
|
+
const simulator = new AppSyncSimulator(httpPort)
|
|
57
58
|
simulator.start().then(() => {
|
|
58
59
|
console.log(
|
|
59
60
|
`🚀 App Sync Simulator started at http://localhost:${httpPort}/graphql`,
|
|
60
|
-
)
|
|
61
|
-
})
|
|
61
|
+
)
|
|
62
|
+
})
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
AppSyncSimulatorPipelineResolverConfig,
|
|
3
3
|
AppSyncSimulatorUnitResolverConfig,
|
|
4
4
|
RESOLVER_KIND,
|
|
5
|
-
} from 'amplify-appsync-simulator';
|
|
5
|
+
} from '@aws-amplify/amplify-appsync-simulator';
|
|
6
6
|
|
|
7
7
|
export const resolversConfig: (
|
|
8
8
|
| AppSyncSimulatorPipelineResolverConfig
|