Skip to content

Commit

Permalink
feat: vocabulary manager (#361)
Browse files Browse the repository at this point in the history
  • Loading branch information
dselman authored Jan 12, 2022
1 parent 3239e3d commit 3da6d0c
Show file tree
Hide file tree
Showing 27 changed files with 7,971 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/concerto-vocabulary/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@babel/preset-env"]
}
19 changes: 19 additions & 0 deletions packages/concerto-vocabulary/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

coverage
node_modules
out
lib/parser.js
test/data
47 changes: 47 additions & 0 deletions packages/concerto-vocabulary/.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:
ecmaVersion: 13
sourceType: script
rules:
indent:
- error
- 4
linebreak-style:
- warn
- unix
quotes:
- error
- single
semi:
- error
- always
no-unused-vars:
- error
- args: none
no-console: warn
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
90 changes: 90 additions & 0 deletions packages/concerto-vocabulary/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

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

# hidden config files
.editorconfig
.eslint.yml
.eslintignore
.eslintrc.yml
.tern-project

# test directory
test

# scripts directory
scripts

# 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/acl/parser.js
# lib/introspect/parser.js
# lib/query/parser.js
# index.d.ts

.babelrc
api.txt
changelog.txt
jsdoc.json
HEADER
HEADER.md
rollup.config.js
lib/introspect/parser.pegjs

# Locally built npm packages
*.tgz
15 changes: 15 additions & 0 deletions packages/concerto-vocabulary/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

save-exact=true
11 changes: 11 additions & 0 deletions packages/concerto-vocabulary/HEADER
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
2 changes: 2 additions & 0 deletions packages/concerto-vocabulary/HEADER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## License <a name="license"></a>
Accord Project source code files are made available under the Apache License, Version 2.0 (Apache-2.0), located in the LICENSE file. Accord Project documentation files are made available under the Creative Commons Attribution 4.0 International License (CC-BY-4.0), available at http://creativecommons.org/licenses/by/4.0/.
11 changes: 11 additions & 0 deletions packages/concerto-vocabulary/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
15 changes: 15 additions & 0 deletions packages/concerto-vocabulary/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Concerto Vocabulary

Library to manage vocabulary terms associated with Concerto models. Vocabulary terms are human-readable labels (for a specific locale) for model elements,

Terms may be loaded from YAML format files and then validated against a Concerto ModelManager to detect missing and additional terms.

# Installation

```
npm install @accordproject/concerto-vocabulary --save
```

## License <a name="license"></a>
Accord Project source code files are made available under the Apache License, Version 2.0 (Apache-2.0), located in the LICENSE file. Accord Project documentation files are made available under the Creative Commons Attribution 4.0 International License (CC-BY-4.0), available at http://creativecommons.org/licenses/by/4.0/.

25 changes: 25 additions & 0 deletions packages/concerto-vocabulary/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

'use strict';

/**
* Concerto Vocabulary module. Concerto is a framework for defining domain
* specific models.
*
* @module concerto-vocabulary
*/

module.exports.VocabularyManager = require('./lib/vocabularymanager');
module.exports.Vocabulary = require('./lib/vocabulary');
36 changes: 36 additions & 0 deletions packages/concerto-vocabulary/jsdoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"tags": {
"allowUnknownTags": true,
"dictionaries": ["jsdoc","closure"]
},
"source": {
"include": [
"./lib",
"./index.js"
],
"includePattern": ".+\\.js(doc|x)?$"
},
"plugins": ["plugins/markdown"],
"templates": {
"logoFile": "",
"cleverLinks": false,
"monospaceLinks": false,
"dateFormat": "ddd MMM Do YYYY",
"outputSourceFiles": true,
"outputSourcePath": true,
"systemName": "Concerto",
"footer": "",
"copyright": "Released under the Apache License v2.0",
"navType": "vertical",
"theme": "spacelab",
"linenums": true,
"collapseSymbols": false,
"inverseNav": true,
"protocol": "html://",
"methodHeadingReturns": false
},
"markdown": {
"parser": "gfm",
"hardwrap": true
}
}
Loading

0 comments on commit 3da6d0c

Please sign in to comment.