Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
Merge e9d6c0a into 00f2826
Browse files Browse the repository at this point in the history
  • Loading branch information
paolobueno committed Aug 25, 2017
2 parents 00f2826 + e9d6c0a commit f8179a8
Show file tree
Hide file tree
Showing 27 changed files with 164 additions and 38 deletions.
4 changes: 2 additions & 2 deletions client/datasync-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@raincatcher/datasync-client",
"version": "1.0.0",
"version": "0.0.1",
"description": "Raincatcher datasync client wrapper for TypeScript",
"types": "src/index.ts",
"main": "src/",
Expand Down Expand Up @@ -53,7 +53,7 @@
"typescript": "^2.5.0"
},
"dependencies": {
"@raincatcher/logger": "1.0.0",
"@raincatcher/logger": "^0.0.1",
"fh-sync-js": "^1.0.3",
"lodash": "^4.17.4"
}
Expand Down
1 change: 0 additions & 1 deletion client/logger

This file was deleted.

8 changes: 4 additions & 4 deletions client/wfm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@raincatcher/wfm",
"version": "1.0.0",
"version": "0.0.1",
"description": "Set of WorkForce Management tools",
"types": "src/index.ts",
"author": "feedhenry-raincatcher@redhat.com",
Expand Down Expand Up @@ -38,13 +38,13 @@
},
"devDependencies": {
"@types/bluebird": "^3.5.8",
"@types/chai": "^4.0.3",
"@types/chai-as-promised": "0.0.31",
"@types/lodash": "^4.14.73",
"@types/mocha": "^2.2.41",
"@types/node": "^8.0.7",
"@types/shortid": "0.0.29",
"@types/valid-url": "^1.0.2",
"@types/node": "^8.0.7",
"@types/chai": "^4.0.3",
"@types/chai-as-promised": "0.0.31",
"del-cli": "^1.1.0",
"mocha": "^3.5.0",
"nyc": "^11.1.0",
Expand Down
6 changes: 3 additions & 3 deletions cloud/datasync/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@raincatcher/datasync-cloud",
"version": "1.0.0",
"version": "0.0.1",
"description": "Raincatcher DataSync cloud",
"types": "src/index.ts",
"main": "src/",
Expand Down Expand Up @@ -32,14 +32,14 @@
"branches": 50
},
"devDependencies": {
"@raincatcher/logger": "1.0.0",
"@raincatcher/logger": "^0.0.1",
"@types/body-parser": "^1.16.4",
"@types/cors": "^2.8.1",
"@types/express": "^4.0.36",
"@types/mocha": "^2.2.41",
"@types/mongodb": "^2.2.10",
"@types/node": "^8.0.7",
"@types/proxyquire": "^1.3.27",
"@types/mongodb": "^2.2.10",
"del-cli": "^1.1.0",
"mocha": "^3.5.0",
"nyc": "^11.1.0",
Expand Down
4 changes: 2 additions & 2 deletions cloud/passportauth/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@raincatcher/auth-passport",
"version": "1.0.0",
"version": "0.0.1",
"description": "Passport authentication module",
"types": "src/index.ts",
"author": "feedhenry-raincatcher@redhat.com",
Expand Down Expand Up @@ -34,7 +34,7 @@
"branches": 80
},
"devDependencies": {
"@raincatcher/logger": "1.0.0",
"@raincatcher/logger": "^0.0.1",
"@types/body-parser": "^1.16.4",
"@types/cors": "^2.8.1",
"@types/express": "^4.0.36",
Expand Down
6 changes: 3 additions & 3 deletions cloud/wfm-rest-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@raincatcher/wfm-rest-api",
"version": "1.0.0",
"version": "0.0.1",
"description": "Module used for building a RESTful api on top of the WFM solution",
"types": "src/index.ts",
"author": "feedhenry-raincatcher@redhat.com",
Expand Down Expand Up @@ -33,8 +33,8 @@
"branches": 70
},
"dependencies": {
"@raincatcher/logger": "1.0.0",
"@raincatcher/wfm": "1.0.0",
"@raincatcher/logger": "^0.0.1",
"@raincatcher/wfm": "^0.0.1",
"bluebird": "^3.5.0",
"express": "^4.15.4",
"lodash": "^4.17.4",
Expand Down
6 changes: 3 additions & 3 deletions cloud/wfm-user/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@raincatcher/wfm-user",
"version": "1.0.0",
"version": "0.0.1",
"description": "Module responsible for user management",
"types": "src/index.ts",
"author": "feedhenry-raincatcher@redhat.com",
Expand Down Expand Up @@ -52,8 +52,8 @@
"typescript": "^2.5.0"
},
"dependencies": {
"@raincatcher/wfm-rest-api": "1.0.0",
"@raincatcher/logger": "1.0.0",
"@raincatcher/logger": "^0.0.1",
"@raincatcher/wfm-rest-api": "^0.0.1",
"bluebird": "^3.5.0",
"express": "^4.15.4"
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion cloud/logger/package.json → common/logger/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@raincatcher/logger",
"version": "1.0.0",
"version": "0.0.1",
"description": "Logger facade used by RainCatcher modules",
"types": "src/index.ts",
"author": "feedhenry-raincatcher@redhat.com",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 5 additions & 6 deletions demo/data/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@raincatcher/demo-data",
"version": "1.0.0",
"version": "0.0.1",
"description": "Example seed data for the RainCatcher project",
"types": "src/index.ts",
"author": "feedhenry-raincatcher@redhat.com",
Expand Down Expand Up @@ -32,16 +32,16 @@
"branches": 80
},
"dependencies": {
"@raincatcher/logger": "1.0.0",
"@raincatcher/wfm": "1.0.0",
"@raincatcher/wfm-user": "1.0.0",
"@raincatcher/logger": "^0.0.1",
"@raincatcher/wfm": "^0.0.1",
"@raincatcher/wfm-user": "^0.0.1",
"bluebird": "^3.5.0",
"mongodb": "^2.2.31"
},
"devDependencies": {
"@types/mongodb": "^2.2.10",
"@types/bluebird": "^3.5.8",
"@types/mocha": "^2.2.41",
"@types/mongodb": "^2.2.10",
"del-cli": "^1.1.0",
"mocha": "^3.5.0",
"nyc": "^11.1.0",
Expand All @@ -50,4 +50,3 @@
"typescript": "^2.5.0"
}
}

16 changes: 8 additions & 8 deletions demo/server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@raincatcher/demo-server",
"version": "1.0.0",
"version": "0.0.1",
"description": "Raincatcher demo application server using express",
"types": "src/index.ts",
"main": "src/index.ts",
Expand Down Expand Up @@ -35,7 +35,7 @@
"branches": 70
},
"devDependencies": {
"@raincatcher/logger": "1.0.0",
"@raincatcher/logger": "^0.0.1",
"@types/bluebird": "^3.5.8",
"@types/body-parser": "^1.16.4",
"@types/cookie-parser": "^1.4.0",
Expand All @@ -57,12 +57,12 @@
"typescript": "^2.5.0"
},
"dependencies": {
"@raincatcher/auth-passport": "1.0.0",
"@raincatcher/datasync-cloud": "1.0.0",
"@raincatcher/logger": "1.0.0",
"@raincatcher/wfm-rest-api": "1.0.0",
"@raincatcher/wfm-user": "1.0.0",
"@raincatcher/demo-data": "1.0.0",
"@raincatcher/auth-passport": "^0.0.1",
"@raincatcher/datasync-cloud": "^0.0.1",
"@raincatcher/demo-data": "^0.0.1",
"@raincatcher/logger": "^0.0.1",
"@raincatcher/wfm-rest-api": "^0.0.1",
"@raincatcher/wfm-user": "^0.0.1",
"bluebird": "^3.5.0",
"body-parser": "^1.17.2",
"cookie-parser": "^1.4.3",
Expand Down
7 changes: 5 additions & 2 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
"packages": [
"cloud/*",
"client/*",
"integration/*",
"common/*",
"demo/*"
],
"commands": {
"bootstrap": {
"hoist": "**"
},
"publish": {
"ignore": "@raincatcher/demo-server"
}
},
"version": "independent"
"version": "0.0.2"
}
14 changes: 11 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"test": "lerna run test",
"test-ci": "npm-run-all test coverage:*",
"test-ci": "npm-run-all test coverage:* && npm run publish:test",
"coverage:create-file": "echo '' > ./coverage_report/coverage_merged.info",
"coverage:merge-reports": "lcov-result-merger './coverage_report/*/lcov.info' './coverage_report/coverage_merged.info'",
"coverage:upload-coveralls": "cat ./coverage_report/coverage_merged.info | coveralls",
Expand All @@ -18,7 +18,12 @@
"clean": "npm-run-all clean:*",
"clean:coverage": "del coverage_report",
"clean:packages": "lerna run clean",
"clean:docs": "del **/**/docs "
"clean:dependencies": "lerna clean --yes",
"clean:docs": "del **/**/docs ",
"publish:prepare": "rm -rf node_modules && npm install && npm run clean && npm run bootstrap && npm run build",
"publish:dry": "npm run publish:prepare && lerna publish --skip-npm --skip-git --canary --yes",
"publish:test": "./scripts/test-publish.sh",
"publish:full": "npm run publish:prepare && lerna publish"
},
"repository": {
"type": "git",
Expand All @@ -33,12 +38,15 @@
"devDependencies": {
"coveralls": "^2.13.1",
"del-cli": "^1.1.0",
"gh-pages": "^1.0.0",
"lcov-result-merger": "^1.2.0",
"lerna": "^2.0.0-rc.5",
"npm-run-all": "^4.0.2",
"opn-cli": "^3.1.0",
"tslint": "^5.4.3",
"typedoc": "^0.8.0",
"typescript": "^2.3.4"
"typescript": "^2.3.4",
"yargs": "^8.0.2"
},
"dependencies": {
"tslint": "^5.6.0",
Expand Down
14 changes: 14 additions & 0 deletions scripts/apps.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"server": {
"path": "demo/server",
"repo": "git@github.com:feedhenry-templates/wfm-server.git"
},
"mobile": {
"path": "demo/mobile",
"repo": "git@github.com:feedhenry-templates/wfm-portal.git"
},
"portal": {
"path": "demo/portal",
"repo": "git@github.com:feedhenry-templates/wfm-mobile.git"
}
}
65 changes: 65 additions & 0 deletions scripts/publish-app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/usr/bin/env node

var ghpages = require('gh-pages');
var path = require('path');
var fs = require('fs');
var args = require('yargs')
.boolean('p')
.default('p', false)
.alias('p', 'push')
.describe('p', 'Push changes to remote repository, i.e. do an actual publish')
.alias('v', 'version')
.describe('v', 'semver version to publish the app as, defaults to the version in lerna.json')
.alias('u', 'user')
.describe('u', 'Git user')
.alias('e', 'email')
.describe('e', "Git user's email")
.demandCommand(1)
.usage('Usage: $0 <app name>')
.argv;

// Debug tooling
process.env.NODE_DEBUG = 'gh-pages';

// get version from lerna global version
var version = args.version || require(path.resolve(__dirname, '../lerna.json')).version;
var appName = args._[0];

var appInfo = require('./apps.json');

// gh-branch's default, should pick from local machine's git config
var gitUser = null;
if (args.user && args.email) {
gitUser = {
user: args.user,
email: args.email
};
}

var target = appInfo[appName];

if(!target || !fs.existsSync(target.path)) {
console.error('module ' + appName + ' not found!');
}

var options = {
branch: version,
dotfiles: true,
remote: 'origin',
repo: target.repo,
user: gitUser,
tag: 'release-' + appName + "-" + version,
message: "Release " + appName + " at version: " + version,
push: args.push
};

console.info('Publishing contents of ' + target.path +
' to remote ' + target.repo);

ghpages.publish(target.path, options, function(err) {
if (err) {
console.info("Finished with error ", err);
} else {
console.info("Finished with success ");
}
});
38 changes: 38 additions & 0 deletions scripts/test-publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash
set -e
containerId=$(docker run -itd -p 0:4873 verdaccio/verdaccio)

# get random assined port
port=$(docker port $containerId | awk -F ':' '{print $2}')
echo "Started local npm registry"
registry="http://localhost:$port"

# adduser doesn't allow cli params, use stdin hack
npm adduser --registry=$registry <<EOF
test-user
testPwd
test@test.com
EOF

echo "Beginning publish test"
npm run publish:prepare
lerna publish --skip-git --canary --yes --registry=$registry

# kill container if in CI, else open in browser
# travis sets CI=true by default
if [ -n "$CI" ];
then
echo "Testing regular npm install..."
packages=$(lerna ls | awk -F " +v" '{print $1"@"$2}')
npm install $packages
echo "Removing npm registry container"
docker kill $containerId
docker rm $containerId
else
# cross-platform `open` command
# requires `npm i -g opn-cli` if not running as npm script
opn $registry
fi

echo "Publishing finished, reverting version changes..."
git checkout cloud/ demo/ client/

0 comments on commit f8179a8

Please sign in to comment.