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

@aws-amplify/data-schema

Package Overview
Dependencies
Maintainers
10
Versions
187
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-amplify/data-schema - npm Package Compare versions

Comparing version 0.14.12 to 0.14.13

14

lib-esm/src/SchemaProcessor.js

@@ -158,3 +158,3 @@ "use strict";

}
function transformFunctionHandler(handlers, callSignature) {
function transformFunctionHandler(handlers, functionFieldName) {
let gqlHandlerContent = '';

@@ -168,5 +168,3 @@ const lambdaFunctionDefinition = {};

else if (typeof handlerData.getInstance === 'function') {
const fnBaseName = `Fn${capitalize(callSignature)}`;
const fnNameSuffix = idx === 0 ? '' : `${idx + 1}`;
const fnName = fnBaseName + fnNameSuffix;
const fnName = `Fn${capitalize(functionFieldName)}${idx === 0 ? '' : `${idx + 1}`}`;
lambdaFunctionDefinition[fnName] = handlerData;

@@ -176,3 +174,3 @@ gqlHandlerContent += `@function(name: "${fnName}") `;

else {
throw new Error(`Invalid value specified for ${callSignature} handler.function(). Expected: defineFunction or string.`);
throw new Error(`Invalid value specified for ${functionFieldName} handler.function(). Expected: defineFunction or string.`);
}

@@ -246,3 +244,3 @@ });

if (isFunctionHandler(handlers)) {
({ gqlHandlerContent, lambdaFunctionDefinition } = transformFunctionHandler(handlers, callSignature));
({ gqlHandlerContent, lambdaFunctionDefinition } = transformFunctionHandler(handlers, typeName));
}

@@ -828,3 +826,3 @@ else if (functionRef) {

const jsFunctions = [];
let lambdaFunctions = {};
const lambdaFunctions = {};
const customSqlDataSourceStrategies = [];

@@ -867,3 +865,3 @@ const databaseType = schema.data.configuration.database.engine === 'dynamodb'

const { gqlField, models, jsFunctionForField, lambdaFunctionDefinition, customSqlDataSourceStrategy, } = transformCustomOperations(typeDef, typeName, mostRelevantAuthRules, databaseType, getRefType);
lambdaFunctions = lambdaFunctionDefinition;
Object.assign(lambdaFunctions, lambdaFunctionDefinition);
topLevelTypes.push(...models);

@@ -870,0 +868,0 @@ if (jsFunctionForField) {

{
"name": "@aws-amplify/data-schema",
"version": "0.14.12",
"version": "0.14.13",
"license": "Apache-2.0",

@@ -5,0 +5,0 @@ "repository": {

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