Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aws-amplify/graphql-predictions-transformer

Package Overview
Dependencies
Maintainers
7
Versions
395
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-amplify/graphql-predictions-transformer - npm Package Compare versions

Comparing version 0.3.6-amplify-export2.0 to 0.3.6-ext1.0

2

CHANGELOG.md

@@ -6,3 +6,3 @@ # Change Log

## [0.3.6-amplify-export2.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-predictions-transformer@0.3.5...@aws-amplify/graphql-predictions-transformer@0.3.6-amplify-export2.0) (2021-10-18)
## [0.3.6-ext1.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-predictions-transformer@0.3.3...@aws-amplify/graphql-predictions-transformer@0.3.6-ext1.0) (2021-10-18)

@@ -9,0 +9,0 @@ **Note:** Version bump only for package @aws-amplify/graphql-predictions-transformer

@@ -33,3 +33,2 @@ "use strict";

const constants_1 = require("./utils/constants");
const aws_appsync_1 = require("@aws-cdk/aws-appsync");
class PredictionsTransformer extends graphql_transformer_core_1.TransformerPluginBase {

@@ -216,15 +215,2 @@ constructor(predictionsConfig) {

}
const requestTemplate = [
cdk.Fn.conditionIf(graphql_transformer_common_1.ResourceConstants.CONDITIONS.HasEnvironmentParameter, cdk.Fn.sub(`$util.qr($ctx.stash.put("s3Bucket", "${bucketName}"))`, substitutions), cdk.Fn.sub(`$util.qr($ctx.stash.put("s3Bucket", "${removeEnvReference(bucketName)}"))`, {
hash: cdk.Fn.select(3, cdk.Fn.split('-', cdk.Fn.ref('AWS::StackName'))),
})),
graphql_mapping_template_1.print(graphql_mapping_template_1.compoundExpression([graphql_mapping_template_1.qref('$ctx.stash.put("isList", false)')])),
];
const authModes = [context.authConfig.defaultAuthentication, ...(context.authConfig.additionalAuthenticationProviders || [])].map(mode => mode === null || mode === void 0 ? void 0 : mode.authenticationType);
if (authModes.includes(aws_appsync_1.AuthorizationType.IAM)) {
const authRoleParameter = context.stackManager.getParameter(graphql_transformer_core_1.IAM_AUTH_ROLE_PARAMETER).valueAsString;
const unauthRoleParameter = context.stackManager.getParameter(graphql_transformer_core_1.IAM_UNAUTH_ROLE_PARAMETER).valueAsString;
requestTemplate.push(`$util.qr($ctx.stash.put("authRole", "arn:aws:sts::${cdk.Stack.of(context.stackManager.rootStack).account}:assumed-role/${authRoleParameter}/CognitoIdentityCredentials"))`, `$util.qr($ctx.stash.put("unauthRole", "arn:aws:sts::${cdk.Stack.of(context.stackManager.rootStack).account}:assumed-role/${unauthRoleParameter}/CognitoIdentityCredentials"))`);
}
requestTemplate.push(graphql_mapping_template_1.print(graphql_mapping_template_1.obj({})));
return context.api.host.addResolver(config.resolverTypeName, config.resolverFieldName, graphql_transformer_core_1.MappingTemplate.inlineTemplateFromString(cdk.Fn.join('\n', [

@@ -231,0 +217,0 @@ cdk.Fn.conditionIf(graphql_transformer_common_1.ResourceConstants.CONDITIONS.HasEnvironmentParameter, cdk.Fn.sub(`$util.qr($ctx.stash.put("s3Bucket", "${bucketName}"))`, substitutions), cdk.Fn.sub(`$util.qr($ctx.stash.put("s3Bucket", "${removeEnvReference(bucketName)}"))`, {

{
"name": "@aws-amplify/graphql-predictions-transformer",
"version": "0.3.6-amplify-export2.0",
"version": "0.3.6-ext1.0",
"description": "Amplify GraphQL @predictions tranformer",

@@ -30,4 +30,4 @@ "repository": {

"dependencies": {
"@aws-amplify/graphql-transformer-core": "0.9.3-amplify-export2.0",
"@aws-amplify/graphql-transformer-interfaces": "1.10.1-amplify-export2.0",
"@aws-amplify/graphql-transformer-core": "0.9.3-ext1.0",
"@aws-amplify/graphql-transformer-interfaces": "1.10.1-ext1.0",
"@aws-cdk/aws-appsync": "~1.124.0",

@@ -38,4 +38,4 @@ "@aws-cdk/aws-iam": "~1.124.0",

"graphql": "^14.5.8",
"graphql-mapping-template": "4.18.4-amplify-export2.0",
"graphql-transformer-common": "4.19.11-amplify-export2.0"
"graphql-mapping-template": "4.18.3",
"graphql-transformer-common": "4.19.11-ext1.0"
},

@@ -61,3 +61,3 @@ "devDependencies": {

},
"gitHead": "9b61aadb895c0307ef3267ca868fc4a68e7a853a"
"gitHead": "4e4b39edf00f3bfbd7b225d84a4b5b64f5965025"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc