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-ext2.0 to 0.3.6-ext20.0

8

CHANGELOG.md

@@ -6,10 +6,14 @@ # Change Log

## [0.3.6-ext2.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-ext2.0) (2021-10-18)
## [0.3.6-ext20.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-ext20.0) (2021-11-10)
**Note:** Version bump only for package @aws-amplify/graphql-predictions-transformer
### Bug Fixes
* **graphql-model-transformer:** override resource logical id to fix v1 to v2 transformer migration ([#8597](https://github.com/aws-amplify/amplify-cli/issues/8597)) ([e3a2afb](https://github.com/aws-amplify/amplify-cli/commit/e3a2afbbed6e97f143fc7c83064e2193f4c91bdd))
* override http datasource logical IDs ([#8714](https://github.com/aws-amplify/amplify-cli/issues/8714)) ([81cc461](https://github.com/aws-amplify/amplify-cli/commit/81cc461ed5e02b2f296825283993ad026f1126d1))
## [0.3.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-predictions-transformer@0.3.4...@aws-amplify/graphql-predictions-transformer@0.3.5) (2021-10-10)

@@ -16,0 +20,0 @@

@@ -33,2 +33,3 @@ "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 {

@@ -215,2 +216,15 @@ 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', [

@@ -224,3 +238,3 @@ 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)}"))`, {

graphql_mapping_template_1.ifElse(graphql_mapping_template_1.ref('ctx.stash.get("isList")'), graphql_mapping_template_1.compoundExpression([graphql_mapping_template_1.set(graphql_mapping_template_1.ref('result'), graphql_mapping_template_1.ref('ctx.result.split("[ ,]+")')), graphql_mapping_template_1.toJson(graphql_mapping_template_1.ref('result'))]), graphql_mapping_template_1.toJson(graphql_mapping_template_1.ref('ctx.result'))),
]))), undefined, pipelineFunctions, stack);
]))), undefined, undefined, pipelineFunctions, stack);
}

@@ -227,0 +241,0 @@ function createPredictionsLambda(context, stack) {

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

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

"dependencies": {
"@aws-amplify/graphql-transformer-core": "0.9.3-ext2.0",
"@aws-amplify/graphql-transformer-interfaces": "1.10.1-ext2.0",
"@aws-amplify/graphql-transformer-core": "0.10.0-ext20.0",
"@aws-amplify/graphql-transformer-interfaces": "1.10.1-ext20.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.3",
"graphql-transformer-common": "4.19.11-ext2.0"
"graphql-mapping-template": "4.18.4-ext20.0",
"graphql-transformer-common": "4.20.0-ext20.0"
},

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

},
"gitHead": "a8f1746356ac50d6bd230f566f39ff433b64fec4"
"gitHead": "6a930893e4d90ccf369bff1f4e460ab96b825d6a"
}

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