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

@aws-amplify/appsync-modelgen-plugin

Package Overview
Dependencies
Maintainers
6
Versions
289
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-amplify/appsync-modelgen-plugin - npm Package Compare versions

Comparing version 1.23.2-dev.11 to 1.23.2-dev.12

74

lib/visitors/appsync-swift-visitor.js

@@ -65,30 +65,48 @@ "use strict";

.join(',\n')).trim()})`;
structBlock.addClassMethod('init', null, initImpl, initParams.map(field => {
const listType = field.connectionInfo ? swift_declaration_block_1.ListType.LIST : swift_declaration_block_1.ListType.ARRAY;
return {
name: this.getFieldName(field),
type: this.getNativeType(field),
value: field.name === 'id' ? 'UUID().uuidString' : undefined,
flags: {
optional: field.isNullable,
isList: field.isList,
isEnum: this.isEnumType(field),
listType: field.isList ? listType : undefined,
},
};
}), 'public', {});
structBlock.addClassMethod('init', null, this.getInitBody(obj.fields), obj.fields.map(field => {
const listType = field.connectionInfo ? swift_declaration_block_1.ListType.LIST : swift_declaration_block_1.ListType.ARRAY;
return {
name: this.getFieldName(field),
type: this.getNativeType(field),
value: field.name === 'id' ? 'UUID().uuidString' : undefined,
flags: {
optional: field.isNullable,
isList: field.isList,
isEnum: this.isEnumType(field),
listType: field.isList ? listType : undefined,
},
};
}), 'internal', {});
if (this.config.isTimestampFieldsAdded) {
structBlock.addClassMethod('init', null, initImpl, initParams.map(field => {
const listType = field.connectionInfo ? swift_declaration_block_1.ListType.LIST : swift_declaration_block_1.ListType.ARRAY;
return {
name: this.getFieldName(field),
type: this.getNativeType(field),
value: field.name === 'id' ? 'UUID().uuidString' : undefined,
flags: {
optional: field.isNullable,
isList: field.isList,
isEnum: this.isEnumType(field),
listType: field.isList ? listType : undefined,
},
};
}), 'public', {});
structBlock.addClassMethod('init', null, this.getInitBody(obj.fields), obj.fields.map(field => {
const listType = field.connectionInfo ? swift_declaration_block_1.ListType.LIST : swift_declaration_block_1.ListType.ARRAY;
return {
name: this.getFieldName(field),
type: this.getNativeType(field),
value: field.name === 'id' ? 'UUID().uuidString' : undefined,
flags: {
optional: field.isNullable,
isList: field.isList,
isEnum: this.isEnumType(field),
listType: field.isList ? listType : undefined,
},
};
}), 'internal', {});
}
else {
structBlock.addClassMethod('init', null, this.getInitBody(obj.fields), obj.fields.map(field => {
const listType = field.connectionInfo ? swift_declaration_block_1.ListType.LIST : swift_declaration_block_1.ListType.ARRAY;
return {
name: this.getFieldName(field),
type: this.getNativeType(field),
value: field.name === 'id' ? 'UUID().uuidString' : undefined,
flags: {
optional: field.isNullable,
isList: field.isList,
isEnum: this.isEnumType(field),
listType: field.isList ? listType : undefined,
},
};
}), 'public', {});
}
result.push(structBlock.string);

@@ -95,0 +113,0 @@ });

{
"name": "@aws-amplify/appsync-modelgen-plugin",
"version": "1.23.2-dev.11+a99d67c",
"version": "1.23.2-dev.12+f923e14",
"repository": {

@@ -73,3 +73,3 @@ "type": "git",

},
"gitHead": "a99d67c1053896cc62f9cfc1898fff3c992907da"
"gitHead": "f923e144e9cf51f904d792a5c01ceffca685d0ea"
}

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