Skip to content

Commit

Permalink
Merge branch 'develop' of /Users/sstone1/git/Concerto-Common into dev…
Browse files Browse the repository at this point in the history
…elop
  • Loading branch information
Simon Stone committed Jan 5, 2017
2 parents de0e223 + ab1f518 commit 1bddbbb
Show file tree
Hide file tree
Showing 201 changed files with 36,990 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/concerto-common/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
6 changes: 6 additions & 0 deletions packages/concerto-common/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
coverage
node_modules
out
lib/introspect/parser.js
lib/acl/parser.js
test/data
47 changes: 47 additions & 0 deletions packages/concerto-common/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
env:
es6: true
node: true
mocha: true
extends: 'eslint:recommended'
parserOptions:
sourceType:
- script
rules:
indent:
- error
- 4
linebreak-style:
- error
- unix
quotes:
- error
- single
semi:
- error
- always
no-unused-vars:
- error
- args: none
no-console: off
curly: error
eqeqeq: error
no-throw-literal: error
strict: error
no-var: error
dot-notation: error
no-tabs: error
no-trailing-spaces: error
# no-use-before-define: error
no-useless-call: error
no-with: error
operator-linebreak: error
require-jsdoc:
- error
- require:
ClassDeclaration: true
MethodDefinition: true
FunctionDeclaration: true
valid-jsdoc:
- error
- requireReturn: false
yoda: error
49 changes: 49 additions & 0 deletions packages/concerto-common/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules
jspm_packages

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history

# JSDoc
out

# Mac files.
**/.DS_Store

*.swp

# Build generated files should be ignored by git, but not by npm.
lib/introspect/parser.js
index.d.ts
20 changes: 20 additions & 0 deletions packages/concerto-common/.istanbul.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
instrumentation:
excludes:
- "lib/codegen/*"
- "lib/codegen/fromcto/golang/**"
- "lib/codegen/fromcto/plantuml/**"
- "lib/codegen/fromcto/typescript/**"
- "lib/codegen/fromjs/**"
- "lib/tools/changelog.js"
- "lib/tools/plantumltoimage.js"
- "lib/introspect/parser.js"
- "lib/acl/parser.js"
- "out/**"
- "scripts/**"
- "systest/**"
check:
global:
statements: 98
branches: 94
functions: 99
lines: 98
49 changes: 49 additions & 0 deletions packages/concerto-common/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules
jspm_packages

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history

# JSDoc
out

# Mac files.
**/.DS_Store

*.swp

# Build generated files should be ignored by git, but not by npm.
# lib/introspect/parser.js
# index.d.ts
9 changes: 9 additions & 0 deletions packages/concerto-common/.tern-project
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"ecmaVersion": 6,
"libs": [
"chai"
],
"plugins": {
"node": {}
}
}
16 changes: 16 additions & 0 deletions packages/concerto-common/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
language: node_js
node_js:
- '4'
- '6'
dist: trusty
before_install: |
set -ev
npm install -g npm
npm config set @ibm:registry https://npm-registry.whitewater.ibm.com
npm config set //npm-registry.whitewater.ibm.com/:_authToken ${NPM_TOKEN}
deploy:
provider: script
script: ./scripts/deploy.sh
skip_cleanup: true
on:
all_branches: true
8 changes: 8 additions & 0 deletions packages/concerto-common/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
IBM Confidential
OCO Source Materials
IBM Concerto - Blockchain Solution Framework
Copyright IBM Corp. 2016

The source code for this program is not published or otherwise
divested of its trade secrets, irrespective of what has
been deposited with the U.S. Copyright Office.
4 changes: 4 additions & 0 deletions packages/concerto-common/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Concerto-Common
Code that is shared across Concerto-Client, Concerto-Admin and Concerto-Runtime

Defines the core of the Concerto programming model, including the parser for the CTO language and services for assets, registries, participants and transactions.
73 changes: 73 additions & 0 deletions packages/concerto-common/api.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
class BaseException extends Error {
+ void constructor(string)
}
class BusinessNetworkDefinition {
+ void constructor(String,String)
+ String getIdentifier()
+ String getName()
+ String getVersion()
+ String getDescription()
+ Promise fromArchive(Buffer)
+ Buffer toArchive()
+ Promise fromDirectory(String,Object,Object,boolean,boolean)
+ Introspector getIntrospector()
+ Factory getFactory()
+ Serializer getSerializer()
}
class Factory {
+ void constructor(ModelManager)
+ Resource newInstance(string,string,string,boolean) throws ModelException
+ Relationship newRelationship(string,string,string) throws ModelException
+ Resource newTransaction(string,string)
+ Object toJSON()
}
class IllegalModelException extends BaseException {
+ void constructor(string)
}
class Introspector {
+ void constructor(ModelManager)
+ ClassDeclaration[] getClassDeclarations()
+ ClassDeclaration getClassDeclaration(String) throws Error
}
class ParseException extends BaseException {
+ void constructor(string)
}
class Identifiable {
+ string getIdentifier()
+ void setIdentifier(string)
+ string getFullyQualifiedIdentifier()
+ string getType()
+ string getFullyQualifiedType()
+ string getNamespace()
+ String toString()
}
class Relationship extends Identifiable {
+ String toString()
}
class Resource extends Identifiable {
+ void setPropertyValue(string,string)
+ void addArrayValue(string,string)
+ String toString()
}
class ValidatedResource extends Resource {
+ void setPropertyValue(string,string) throws Error
+ void addArrayValue(string,string) throws Error
+ void validate() throws Error
}
class SecurityContext {
+ void constructor(Connection,string)
+ Connection getConnection()
+ string getUser()
+ Object toJSON()
}
class SecurityException extends BaseException {
+ void constructor(string)
}
class Serializer {
+ void constructor(Factory,ModelManager)
+ Object toJSON(Resource,Object,boolean,boolean,boolean) throws Error
+ Resource fromJSON(Object,Object,boolean)
}
class ValidationException extends BaseException {
+ void constructor(string)
}
93 changes: 93 additions & 0 deletions packages/concerto-common/changelog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
#
# This is the changelog for IBM Concerto. It lists all significant changes to
# functionality and public API.
#
# The most recent entry in the changelog should be at the top of this file
# and must follow the format: Version <number> {public api digest} <date>. The version
# number must match that specified in package.json. The public api digest is computed
# and validated using ./scripts/api-changelog.sh
#
# Any changes to the public API must have an associated changelog entry.
#
# Note that the latest public API is documented using JSDocs and is available in api.txt.
#

Version 0.2.0 {527e1a68596d676f560cfdcd1aa1fca6} 2016-12-15
- Playback 1

Version 0.1.16 {fea512a10f25b132d4a683a232a4f6e1} 2016-12-09
- Added getName and getVersion to BusinessNetworkDefinition
- Added options to BusinessNetworkDefinition.fromDirectory and make static

Version 0.1.15 {6a358e14976153039246fc1c466b7cf7} 2016-11-30
- Added options to Serializer fromJSON/toJSON APIs

Version 0.1.14 {ecb5f554bbfbfe92dd7c4f05a3491882} 2016-11-28
- Re-introduced the fromDirectory API

Version 0.1.13 {d3d85a95909c32d44e1ee5190a54f6e0} 2016-11-28
- Changed the name of BusinessNetwork to BusinessNetworkDefinition

Version 0.1.12 {8029f091f512572e7e64c9eba84b10b3} 2016-11-24
- JSDoc fixes to remove private classes

Version 0.1.11 {4220e2570af565a664f8ea087d3ab9e3} 2016-11-23
- Added BusinessNetwork.toArchive

Version 0.1.10 {05dafaf99a431dc4f4b774525fccf69f} 2016-11-23
- Added test-archive (and zip)

Version 0.1.9 {e7f84562eeebf7ee9503f18c02adc4f7} 2016-11-23
- Added BusinessNetwork.fromArchive

Version 0.1.8 {60d00f2b524c04421d8467484c234c07} 2016-11-23
- Added ConnectionProfileManager.connect
- Added ConnectionManager.deploy with a BusinessNetwork
- Added ConnectionProfileManager, ConnectionProfileStore

Version 0.1.6 {2fa60fd22886a5a44e1bbb9f966bfbe1} 2016-11-23
- Modified ConnectionManager.connect to take connection profile name

Version 0.1.5 {44348565a0cc6b97e7d4d87fea166945} 2016-11-22
- Modified ConnectionManager to introduce connection profiles
- Stop serialization of connection manager interfaces

Version 0.1.4 {07e701400cc255fbc1413490405af162} 2016-11-18
- Added description to BusinessNetwork

Version 0.1.3 {a10f96f1abd8236e7e414b85228243fe} 2016-11-17
- Added BusinessNetwork APIs

Version 0.1.2 {ec8cb98ca41a011d5b595cdc24abfbfc} 2016-11-17
- Added connection manager APIs

Version 0.1.1 {882ad35d7b7f29f4d910d0100406f852} 2016-11-17
- Added the Introspector

Version 0.1.0 {134597a1d97142fe03b0cc8acd87ad53} 2016-11-16
- Refactor the APIs

Version 0.0.16 {d3b0dfc754c6b95c59849cf547bf9486} 2016-11-05
- Added find() and query() methods to AssetRegistry

Version 0.0.15 {ed3c045ab18f3e988f67b5edb2abd438} 2016-10-31
- Added an automatic 'timestamp' property to transactions

Version 0.0.14 {ed3c045ab18f3e988f67b5edb2abd438} 2016-10-27
- Modified Concerto to extend EventEmitter

Version 0.0.13 {1ff98116f0b834387a85d49d50debc69} 2016-10-27
- Added ping() method to Concerto

Version 0.0.12 {d3861b7bd41ea2eae871d2783ab259e2} 2016-10-27
- Added setIdentifier method to Identifiable.

Version 0.0.11 {097696ed79f18ca03d16975f4a257635} 2016-10-27
- Added bulk addAll(), updateAll(), and removeAll() methods to AssetRegistry

Version 0.0.10 {332e7e48d4d49d1ec0dee3dd1355b689} 2016-10-24
- API signature of Registry.getAll and Registry.get changed

Version 0.0.9 {09e645fa8244c6acdfac427a178584bb} 2016-10-22
- Basic public API is defined and useable from both command line and Express applications
- Start to enforce a change log entry for API changes
Loading

0 comments on commit 1bddbbb

Please sign in to comment.