@aws-amplify/graphql-model-transformer 1.1.2-alpha.3 → 1.1.2-alpha.9
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/graphql-model-transformer",
|
|
3
|
-
"version": "1.1.2-alpha.
|
|
3
|
+
"version": "1.1.2-alpha.9+b8a5b9b23",
|
|
4
4
|
"description": "Amplify graphql @model transformer",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
"extract-api": "ts-node ../../scripts/extract-api.ts"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@aws-amplify/graphql-transformer-core": "1.1.2-alpha.
|
|
33
|
-
"@aws-amplify/graphql-transformer-interfaces": "2.1.2-alpha.
|
|
32
|
+
"@aws-amplify/graphql-transformer-core": "1.1.2-alpha.9+b8a5b9b23",
|
|
33
|
+
"@aws-amplify/graphql-transformer-interfaces": "2.1.2-alpha.9+b8a5b9b23",
|
|
34
34
|
"aws-cdk-lib": "~2.68.0",
|
|
35
35
|
"constructs": "^10.0.5",
|
|
36
36
|
"graphql": "^15.5.0",
|
|
37
|
-
"graphql-mapping-template": "4.20.9-alpha.
|
|
38
|
-
"graphql-transformer-common": "4.24.6-alpha.
|
|
37
|
+
"graphql-mapping-template": "4.20.9-alpha.63+b8a5b9b23",
|
|
38
|
+
"graphql-transformer-common": "4.24.6-alpha.63+b8a5b9b23"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/node": "^12.12.6"
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"overrides"
|
|
59
59
|
]
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "b8a5b9b234483f8b4e73f42a0c57b30d64070e43"
|
|
62
62
|
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { ModelTransformer } from '@aws-amplify/graphql-model-transformer';
|
|
2
2
|
import { GraphQLTransform } from '@aws-amplify/graphql-transformer-core';
|
|
3
3
|
import path from 'path';
|
|
4
|
+
import { stateManager } from 'amplify-cli-core';
|
|
5
|
+
|
|
6
|
+
jest.spyOn(stateManager, 'getLocalEnvInfo').mockReturnValue({ envName: 'testEnvName' });
|
|
7
|
+
jest.spyOn(stateManager, 'getProjectConfig').mockReturnValue({ projectName: 'testProjectName' });
|
|
4
8
|
|
|
5
9
|
const featureFlags = {
|
|
6
10
|
getBoolean: jest.fn(),
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
function override(resource) {
|
|
1
|
+
function override(resource, amplifyProjectInfo) {
|
|
2
2
|
resource.api.GraphQLAPI.xrayEnabled = true;
|
|
3
3
|
resource.models['Post'].modelDDBTable.billingMode = 'PROVISIONED';
|
|
4
4
|
resource.models['Comment'].modelDDBTable.billingMode = 'PROVISIONED';
|
|
5
5
|
// override resolver
|
|
6
6
|
resource.models['Post'].resolvers['subscriptionOnUpdatePostResolver'].requestMappingTemplate = 'mockTemplate';
|
|
7
|
+
|
|
8
|
+
if (amplifyProjectInfo.envName != 'testEnvName') {
|
|
9
|
+
throw new Error(`Unexpected envName: ${amplifyProjectInfo.envName}`);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
if (amplifyProjectInfo.projectName != 'testProjectName') {
|
|
13
|
+
throw new Error(`Unexpected envName: ${amplifyProjectInfo.envName}`);
|
|
14
|
+
}
|
|
7
15
|
}
|
|
8
16
|
exports.override = override;
|