Skip to content
This repository has been archived by the owner on Feb 28, 2020. It is now read-only.

Commit

Permalink
Merge pull request #694 from IBM-Swift/updateTo5.14.0
Browse files Browse the repository at this point in the history
Release 5.14.0
  • Loading branch information
Christian Compton authored May 7, 2019
2 parents 2b3bc3f + c5aae15 commit ff9589e
Show file tree
Hide file tree
Showing 18 changed files with 354 additions and 642 deletions.
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ node_js:
os:
- linux
- osx
dist: trusty
osx_image: xcode10.1
dist: xenial
osx_image: xcode10.2
before_install:
- if [[ $TRAVIS_NODE_VERSION == "8" ]]; then npm install -g npm@4; fi
- git clone https://github.com/IBM-Swift/Package-Builder.git
Expand All @@ -25,9 +25,10 @@ before_install:
script:
- osName="linux"
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then osName="osx"; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install libressl; fi
- export projectFolder=`pwd`
- projectName="$(basename $projectFolder)"
- export SWIFT_SNAPSHOT=swift-4.2.3
- export SWIFT_SNAPSHOT=swift-5.0
- source ./Package-Builder/install-swift.sh
- if [[ $TRAVIS_EVENT_TYPE == "cron" ]]; then npm run testsdkgen; fi
- if [[ $TRAVIS_EVENT_TYPE != "cron" ]]; then npm run coverage && npm run report-coverage; fi
Expand Down
10 changes: 10 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,21 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

<a name="5.14.0"></a>
# [5.14.0](https://github.com/IBM-Swift/generator-swiftserver/compare/5.13.0...5.14.0) (2019-05-07)


### Features

* swift 5 application generation ([337061c](https://github.com/IBM-Swift/generator-swiftserver/commit/337061c))
* Swift 5.0 support ([a61ae2c](https://github.com/IBM-Swift/generator-swiftserver/commit/a61ae2c))

<a name="5.13.1"></a>
## [5.13.1](https://github.com/IBM-Swift/generator-swiftserver/compare/5.13.0...5.13.1) (2019-04-25)




<a name="5.13.0"></a>
# [5.13.0](https://github.com/IBM-Swift/generator-swiftserver/compare/5.12.1...5.13.0) (2019-04-18)

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

This module is a [Yeoman](http://yeoman.io) generator for creating REST webservices based on the [Kitura web framework](http://kitura.io) with the [Swift](https://swift.org/) language.

This generator and the Yeoman library runs on Node.js and generates a Swift 4.2.3 application.
This generator and the Yeoman library runs on Node.js and generates a Swift 5.0 application.

## Contents
1. [Prerequisites](#prerequisites)
Expand All @@ -26,7 +26,7 @@ This generator and the Yeoman library runs on Node.js and generates a Swift 4.2.
1. [Contributing](#contributing)

## Prerequisites
To use this module, you will need Node.js and Swift 4.2.3 installed on your Linux or macOS system. You can get Node.js from https://nodejs.org and Swift 4.2.3 from https://swift.org/download.
To use this module, you will need Node.js and Swift 5.0 installed on your Linux or macOS system. You can get Node.js from https://nodejs.org and Swift 5.0 from https://swift.org/download.

You will also need the Yeoman command line utility [yo](https://github.com/yeoman/yo) installed in your global Node.js module directory.

Expand Down
51 changes: 0 additions & 51 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,6 @@ module.exports = Generator.extend({
'MongoDB',
'PostgreSQL',
'ElephantSQL',
'Object Storage',
'AppID',
'Auto-scaling',
'Watson Assistant, formerly Conversation',
Expand Down Expand Up @@ -567,9 +566,6 @@ module.exports = Generator.extend({
if (answers.services.indexOf('ElephantSQL') !== -1) {
this._addService('elephantsql', generateServiceName(this.appname, 'ElephantSQL'))
}
if (answers.services.indexOf('Object Storage') !== -1) {
this._addService('objectStorage', generateServiceName(this.appname, 'ObjectStorage'))
}
if (answers.services.indexOf('AppID') !== -1) {
this._addService('appid', generateServiceName(this.appname, 'AppID'))
}
Expand Down Expand Up @@ -651,7 +647,6 @@ module.exports = Generator.extend({
case 'mongodb': return 'MongoDB'
case 'postgresql': return 'PostgreSQL'
case 'elephantsql': return 'ElephantSQL'
case 'objectStorage': return 'Object Storage'
case 'appid': return 'AppID'
case 'autoscaling': return 'Auto-scaling'
case 'conversation': return 'Watson Assistant'
Expand Down Expand Up @@ -989,52 +984,6 @@ module.exports = Generator.extend({
})
},

promptConfigureObjectStorage: function () {
if (this.skipPrompting) return
if (!this.servicesToConfigure) return
if (!this.servicesToConfigure.objectStorage) return

this.log()
this.log('Configure Object Storage')
var prompts = [
/*
{ name: 'objectstorageAuth_url' message: 'Enter auth url:' },
{ name: 'objectstorageDomainId', message: 'Enter domain ID:' },
{ name: 'objectstorageDomainName', message: 'Enter domain name:' },
{ name: 'objectstorageProject', message: 'Enter project:' },
{ name: 'objectstorageRole', message: 'Enter role:' },
{ name: 'objectstorageUsername', message: 'Enter username:' },
*/
{ name: 'objectstorageName', message: 'Enter name (blank for default):' },
{ name: 'objectstorageRegion', message: 'Enter region:' },
{ name: 'objectstorageProjectId', message: 'Enter project ID:' },
{ name: 'objectstorageUserId', message: 'Enter user ID:' },
{ name: 'objectstoragePassword', message: 'Enter password:', type: 'password' }
]
return this.prompt(prompts).then((answers) => {
var objectStorageService = this.services.objectStorage[0]
this.services.objectStorage[0] = {
/*
auth_url: answers.objectstorageAuth_url || undefined,
domainId: answers.objectstorageDomainId || undefined,
domainName: answers.objectstorageDomainName || undefined,
project: answers.objectstorageProject || undefined,
role: answers.objectstorageRole || undefined,
username: answers.objectstorageUsername || undefined,
*/
region: answers.objectstorageRegion || undefined,
projectId: answers.objectstorageProjectId || undefined,
userId: answers.objectstorageUserId || undefined,
password: answers.objectstoragePassword || undefined,
serviceInfo: {
label: objectStorageService.serviceInfo.label,
name: answers.objectstorageName || objectStorageService.serviceInfo.name,
plan: objectStorageService.serviceInfo.plan
}
}
})
},

promptConfigureAppID: function () {
if (this.skipPrompting) return
if (!this.servicesToConfigure) return
Expand Down
4 changes: 2 additions & 2 deletions lib/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ exports.ensureRequiredSwiftInstalled = function () {
reject(new Error(chalk.red('Could not determine swift version')))
return
}
if (version !== '4') {
reject(new Error(chalk.red('Swift version 4 is required for Swift Server Generator.')))
if (version !== '5') {
reject(new Error(chalk.red('Swift version 5 is required for Swift Server Generator.')))
return
}
resolve()
Expand Down
18 changes: 1 addition & 17 deletions lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -447,20 +447,6 @@ function sanitizeCredentialsAndFillInDefaults (serviceType, service) {
return {
uri: service.uri || url.format(defaultElephantSqlURI)
}
case 'objectStorage':
var defaultAuthURL = 'https://identity.open.softlayer.com'
return {
auth_url: service.auth_url || defaultAuthURL,
project: service.project || '',
projectId: service.projectId || '',
region: service.region || '',
userId: service.userId || '',
username: service.username || '',
password: service.password || '',
domainId: service.domainId || '',
domainName: service.domainName || '',
role: service.role || ''
}
case 'appid':
return {
clientId: service.clientId || '',
Expand Down Expand Up @@ -519,7 +505,6 @@ exports.getBluemixServiceLabel = function (serviceType) {
case 'redis': return 'compose-for-redis'
case 'mongodb': return 'compose-for-mongodb'
case 'postgresql': return 'compose-for-postgresql'
case 'objectStorage': return 'Object-Storage'
case 'appid': return 'AppID'
case 'conversation': return 'conversation'
case 'alertNotification': return 'AlertNotification'
Expand All @@ -535,7 +520,6 @@ exports.getBluemixDefaultPlan = function (serviceType) {
case 'redis': return 'Standard'
case 'mongodb': return 'Standard'
case 'postgresql': return 'Standard'
case 'objectStorage': return 'Free'
case 'appid': return 'Graduated tier'
case 'conversation': return 'free'
case 'alertNotification': return 'authorizedusers'
Expand Down Expand Up @@ -717,7 +701,7 @@ exports.routeMethodVariant = function (detail) {
}

exports.isThisServiceAnArray = function (serviceType) {
return (serviceType === 'cloudant' || serviceType === 'objectStorage')
return (serviceType === 'cloudant')
}

exports.validateServiceFields = function (serviceType, service) {
Expand Down
Loading

0 comments on commit ff9589e

Please sign in to comment.