@retter/rio-generator
Advanced tools
Comparing version 1.2.6 to 1.2.7
@@ -550,5 +550,5 @@ const generator = require('./dist/index').generator | ||
}, | ||
'kotlin-client', | ||
'swift-client', | ||
) | ||
console.log(code) | ||
})() |
import { Classes } from '../../utils'; | ||
export declare function renderClass(classId: string, template: any): string; | ||
export declare function renderSwift(classes: Classes, interfaces: string): string; | ||
/** | ||
// TODO! swift template - baran | ||
enum AuthStatus: String, Codable { | ||
case authFailedInvalidOtp = 'AUTH_FAILED_INVALID_OTP' | ||
case signupRequired = 'SIGNUP_REQUIRED' | ||
case success = 'SUCCESS' | ||
case tooManyAttempts = 'TOO_MANY_ATTEMPTS' | ||
} | ||
*/ |
@@ -32,3 +32,3 @@ "use strict"; | ||
.replace(/Any/g, 'AnyCodable') | ||
.replace(/ID/g, 'Id') | ||
// .replace(/ID/g, 'Id') | ||
.replace(/_-_-ReplaceEncodable-_-_/g, encodable) | ||
@@ -44,2 +44,11 @@ .replace(/_-_-ReplaceMethods-_-_/, blocks.reduce(function (f, i) { | ||
exports.renderSwift = renderSwift; | ||
/** | ||
// TODO! swift template - baran | ||
enum AuthStatus: String, Codable { | ||
case authFailedInvalidOtp = 'AUTH_FAILED_INVALID_OTP' | ||
case signupRequired = 'SIGNUP_REQUIRED' | ||
case success = 'SUCCESS' | ||
case tooManyAttempts = 'TOO_MANY_ATTEMPTS' | ||
} | ||
*/ | ||
//# sourceMappingURL=swift.js.map |
@@ -78,6 +78,5 @@ "use strict"; | ||
if (index !== -1) | ||
targetLanguage.optionDefinitions[index].defaultValue = true; | ||
index = targetLanguage.optionDefinitions.findIndex(function (i) { return i.name === 'mutable-properties'; }); | ||
if (index !== -1) | ||
targetLanguage.optionDefinitions[index].defaultValue = true; | ||
targetLanguage.optionDefinitions[index].defaultValue = false; | ||
// index = targetLanguage.optionDefinitions.findIndex(i => i.name === 'mutable-properties') | ||
// if (index !== -1) targetLanguage.optionDefinitions[index].defaultValue = true | ||
index = targetLanguage.optionDefinitions.findIndex(function (i) { return i.name === 'protocol'; }); | ||
@@ -89,2 +88,11 @@ if (index !== -1) | ||
targetLanguage.optionDefinitions[index].defaultValue = 'just-types'; | ||
index = targetLanguage.optionDefinitions.findIndex(function (i) { return i.name === 'initializers'; }); | ||
if (index !== -1) | ||
targetLanguage.optionDefinitions[index].defaultValue = false; | ||
index = targetLanguage.optionDefinitions.findIndex(function (i) { return i.name === 'density'; }); | ||
if (index !== -1) | ||
targetLanguage.optionDefinitions[index].defaultValue = 'normal'; | ||
index = targetLanguage.optionDefinitions.findIndex(function (i) { return i.name === 'access-level'; }); | ||
if (index !== -1) | ||
targetLanguage.optionDefinitions[index].defaultValue = 'public'; | ||
return [4 /*yield*/, quicktype_core_1.quicktype({ | ||
@@ -91,0 +99,0 @@ inputData: inputData, |
{ | ||
"name": "@retter/rio-generator", | ||
"version": "1.2.6", | ||
"version": "1.2.7", | ||
"description": "retter io proxy class helper generator", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -291,3 +291,3 @@ import YAML from 'yaml' | ||
.replace(/Any/g, 'AnyCodable') | ||
.replace(/ID/g, 'Id') | ||
// .replace(/ID/g, 'Id') | ||
.replace(/_-_-ReplaceEncodable-_-_/g, encodable) | ||
@@ -306,1 +306,11 @@ .replace( | ||
} | ||
/** | ||
// TODO! swift template - baran | ||
enum AuthStatus: String, Codable { | ||
case authFailedInvalidOtp = 'AUTH_FAILED_INVALID_OTP' | ||
case signupRequired = 'SIGNUP_REQUIRED' | ||
case success = 'SUCCESS' | ||
case tooManyAttempts = 'TOO_MANY_ATTEMPTS' | ||
} | ||
*/ |
@@ -42,5 +42,5 @@ import { quicktype, InputData, JSONSchemaInput, FetchingJSONSchemaStore } from 'quicktype-core' | ||
let index = targetLanguage.optionDefinitions.findIndex(i => i.name === 'just-types') | ||
if (index !== -1) targetLanguage.optionDefinitions[index].defaultValue = true | ||
index = targetLanguage.optionDefinitions.findIndex(i => i.name === 'mutable-properties') | ||
if (index !== -1) targetLanguage.optionDefinitions[index].defaultValue = true | ||
if (index !== -1) targetLanguage.optionDefinitions[index].defaultValue = false | ||
// index = targetLanguage.optionDefinitions.findIndex(i => i.name === 'mutable-properties') | ||
// if (index !== -1) targetLanguage.optionDefinitions[index].defaultValue = true | ||
index = targetLanguage.optionDefinitions.findIndex(i => i.name === 'protocol') | ||
@@ -50,2 +50,8 @@ if (index !== -1) targetLanguage.optionDefinitions[index].defaultValue = 'equatable' | ||
if (index !== -1) targetLanguage.optionDefinitions[index].defaultValue = 'just-types' | ||
index = targetLanguage.optionDefinitions.findIndex(i => i.name === 'initializers') | ||
if (index !== -1) targetLanguage.optionDefinitions[index].defaultValue = false | ||
index = targetLanguage.optionDefinitions.findIndex(i => i.name === 'density') | ||
if (index !== -1) targetLanguage.optionDefinitions[index].defaultValue = 'normal' | ||
index = targetLanguage.optionDefinitions.findIndex(i => i.name === 'access-level') | ||
if (index !== -1) targetLanguage.optionDefinitions[index].defaultValue = 'public' | ||
return await quicktype({ | ||
@@ -52,0 +58,0 @@ inputData, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
104847
1568