From 737a51672ea186d1b22aa85aa8240f9d3b521904 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 8 Aug 2024 16:09:27 +0000 Subject: [PATCH] chore(actions): publish v3.18.1 to npm (#891) Signed-off-by: GitHub Co-authored-by: ekarademir --- lerna.json | 2 +- package-lock.json | 4 +- package.json | 2 +- packages/concerto-analysis/package-lock.json | 8 +-- packages/concerto-analysis/package.json | 6 +- packages/concerto-core/package-lock.json | 8 +-- packages/concerto-core/package.json | 6 +- .../types/lib/decoratorextractor.d.ts | 27 +++++++- .../types/lib/decoratormanager.d.ts | 64 +++++++++++++++++-- packages/concerto-cto/package-lock.json | 6 +- packages/concerto-cto/package.json | 4 +- packages/concerto-types/package-lock.json | 8 +-- packages/concerto-types/package.json | 6 +- packages/concerto-util/package-lock.json | 4 +- packages/concerto-util/package.json | 2 +- .../concerto-vocabulary/package-lock.json | 6 +- packages/concerto-vocabulary/package.json | 4 +- .../types/lib/vocabulary.d.ts | 6 ++ 18 files changed, 127 insertions(+), 46 deletions(-) diff --git a/lerna.json b/lerna.json index f2a88bd53..74d8f9324 100644 --- a/lerna.json +++ b/lerna.json @@ -2,6 +2,6 @@ "packages": [ "packages/*" ], - "version": "3.18.0", + "version": "3.18.1", "hoist": true } diff --git a/package-lock.json b/package-lock.json index 8353c4878..4b25c97a7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "concerto", - "version": "3.18.0", + "version": "3.18.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "concerto", - "version": "3.18.0", + "version": "3.18.1", "hasInstallScript": true, "devDependencies": { "colors": "1.4.0", diff --git a/package.json b/package.json index 09fbe139d..927513073 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ }, "name": "concerto", "description": "You must install [Lerna](https://lernajs.io) to build this multi-package repository.", - "version": "3.18.0", + "version": "3.18.1", "private": true, "scripts": { "coverage": "node ./scripts/coverage.js \"packages/concerto-*\" && nyc report -t coverage --cwd . --report-dir coverage --reporter=lcov && cat ./coverage/lcov.info", diff --git a/packages/concerto-analysis/package-lock.json b/packages/concerto-analysis/package-lock.json index 765b94df3..dacfbcb72 100644 --- a/packages/concerto-analysis/package-lock.json +++ b/packages/concerto-analysis/package-lock.json @@ -1,19 +1,19 @@ { "name": "@accordproject/concerto-analysis", - "version": "3.18.0", + "version": "3.18.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@accordproject/concerto-analysis", - "version": "3.18.0", + "version": "3.18.1", "license": "Apache-2.0", "dependencies": { - "@accordproject/concerto-core": "3.18.0", + "@accordproject/concerto-core": "3.18.1", "semver": "7.5.4" }, "devDependencies": { - "@accordproject/concerto-cto": "3.18.0", + "@accordproject/concerto-cto": "3.18.1", "@types/jest": "28.1.1", "@types/semver": "7.3.10", "@typescript-eslint/eslint-plugin": "5.27.1", diff --git a/packages/concerto-analysis/package.json b/packages/concerto-analysis/package.json index f49829cd8..d47c4fff7 100644 --- a/packages/concerto-analysis/package.json +++ b/packages/concerto-analysis/package.json @@ -1,6 +1,6 @@ { "name": "@accordproject/concerto-analysis", - "version": "3.18.0", + "version": "3.18.1", "description": "Analysis of Concerto model files", "homepage": "https://github.com/accordproject/concerto", "engines": { @@ -32,11 +32,11 @@ "author": "accordproject.org", "license": "Apache-2.0", "dependencies": { - "@accordproject/concerto-core": "3.18.0", + "@accordproject/concerto-core": "3.18.1", "semver": "7.5.4" }, "devDependencies": { - "@accordproject/concerto-cto": "3.18.0", + "@accordproject/concerto-cto": "3.18.1", "@types/jest": "28.1.1", "@types/semver": "7.3.10", "@typescript-eslint/eslint-plugin": "5.27.1", diff --git a/packages/concerto-core/package-lock.json b/packages/concerto-core/package-lock.json index df05b1df2..609b9341b 100644 --- a/packages/concerto-core/package-lock.json +++ b/packages/concerto-core/package-lock.json @@ -1,17 +1,17 @@ { "name": "@accordproject/concerto-core", - "version": "3.18.0", + "version": "3.18.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@accordproject/concerto-core", - "version": "3.18.0", + "version": "3.18.1", "license": "Apache-2.0", "dependencies": { - "@accordproject/concerto-cto": "3.18.0", + "@accordproject/concerto-cto": "3.18.1", "@accordproject/concerto-metamodel": "3.10.0", - "@accordproject/concerto-util": "3.18.0", + "@accordproject/concerto-util": "3.18.1", "dayjs": "1.11.10", "debug": "4.3.4", "lorem-ipsum": "2.0.8", diff --git a/packages/concerto-core/package.json b/packages/concerto-core/package.json index 6821fd525..42738b738 100644 --- a/packages/concerto-core/package.json +++ b/packages/concerto-core/package.json @@ -1,6 +1,6 @@ { "name": "@accordproject/concerto-core", - "version": "3.18.0", + "version": "3.18.1", "description": "Core Implementation for the Concerto Modeling Language", "homepage": "https://github.com/accordproject/concerto", "engines": { @@ -71,9 +71,9 @@ "yargs": "17.3.1" }, "dependencies": { - "@accordproject/concerto-cto": "3.18.0", + "@accordproject/concerto-cto": "3.18.1", "@accordproject/concerto-metamodel": "3.10.0", - "@accordproject/concerto-util": "3.18.0", + "@accordproject/concerto-util": "3.18.1", "dayjs": "1.11.10", "debug": "4.3.4", "lorem-ipsum": "2.0.8", diff --git a/packages/concerto-core/types/lib/decoratorextractor.d.ts b/packages/concerto-core/types/lib/decoratorextractor.d.ts index 432b3b642..85bf62c6d 100644 --- a/packages/concerto-core/types/lib/decoratorextractor.d.ts +++ b/packages/concerto-core/types/lib/decoratorextractor.d.ts @@ -3,8 +3,17 @@ export = DecoratorExtractor; * Utility functions to work with * [DecoratorCommandSet](https://models.accordproject.org/concerto/decorators.cto) * @memberof module:concerto-core + * @private */ declare class DecoratorExtractor { + /** + * The action to be performed to extract all, only vocab or only non-vocab decorators + */ + static Action: { + EXTRACT_ALL: number; + EXTRACT_VOCAB: number; + EXTRACT_NON_VOCAB: number; + }; /** * Create the DecoratorExtractor. * @constructor @@ -12,14 +21,23 @@ declare class DecoratorExtractor { * @param {string} locale - locale for extracted vocabularies * @param {string} dcs_version - version string * @param {Object} sourceModelAst - the ast of source models + * @param {int} [action=DecoratorExtractor.Action.EXTRACT_ALL] - the action to be performed */ - constructor(removeDecoratorsFromModel: boolean, locale: string, dcs_version: string, sourceModelAst: any); + constructor(removeDecoratorsFromModel: boolean, locale: string, dcs_version: string, sourceModelAst: any, action?: int); extractionDictionary: {}; removeDecoratorsFromModel: boolean; locale: string; dcs_version: string; sourceModelAst: any; updatedModelAst: any; + action: any; + /** + * Returns if the decorator is vocab or not + * @param {string} decoractorName - the name of decorator + * @returns {boolean} - returns true if the decorator is a vocabulary decorator else false + * @private + */ + private isVocabDecorator; /** * Adds a key-value pair to a dictionary (object) if the key exists, * or creates a new key with the provided value. @@ -84,6 +102,13 @@ declare class DecoratorExtractor { * @private */ private transformDecoratorsAndVocabularies; + /** + * Filter vocab or non-vocab decorators + * @param {Object} decorators - the collection of decorators + * @returns {Object} - the collection of filtered decorators + * @private + */ + private filterOutDecorators; /** * Process the map declarations to extract the decorators. * diff --git a/packages/concerto-core/types/lib/decoratormanager.d.ts b/packages/concerto-core/types/lib/decoratormanager.d.ts index cab9f7a2e..e2adb610a 100644 --- a/packages/concerto-core/types/lib/decoratormanager.d.ts +++ b/packages/concerto-core/types/lib/decoratormanager.d.ts @@ -91,15 +91,11 @@ declare class DecoratorManager { enableDcsNamespaceTarget?: boolean; }): ModelManager; /** - * @typedef decoratorCommandSet - * @type {object} - * @typedef vocabularies - * @type {string} * @typedef ExtractDecoratorsResult * @type {object} * @property {ModelManager} modelManager - A model manager containing models stripped without decorators - * @property {decoratorCommandSet} object[] - Stripped out decorators, formed into decorator command sets - * @property {vocabularies} object[] - Stripped out vocabularies, formed into vocabulary files + * @property {*} decoratorCommandSet - Stripped out decorators, formed into decorator command sets + * @property {string[]} vocabularies - Stripped out vocabularies, formed into vocabulary files */ /** * Extracts all the decorator commands from all the models in modelManager @@ -120,7 +116,61 @@ declare class DecoratorManager { /** * - Stripped out decorators, formed into decorator command sets */ - object: {}; + decoratorCommandSet: any; + /** + * - Stripped out vocabularies, formed into vocabulary files + */ + vocabularies: string[]; + }; + /** + * Extracts all the vocab decorator commands from all the models in modelManager + * @param {ModelManager} modelManager the input model manager + * @param {object} options - decorator models options + * @param {boolean} options.removeDecoratorsFromModel - flag to strip out vocab decorators from models + * @param {string} options.locale - locale for extracted vocabulary set + * @returns {ExtractDecoratorsResult} - a new model manager with/without the decorators and vocab yamls + */ + static extractVocabularies(modelManager: ModelManager, options: { + removeDecoratorsFromModel: boolean; + locale: string; + }): { + /** + * - A model manager containing models stripped without decorators + */ + modelManager: ModelManager; + /** + * - Stripped out decorators, formed into decorator command sets + */ + decoratorCommandSet: any; + /** + * - Stripped out vocabularies, formed into vocabulary files + */ + vocabularies: string[]; + }; + /** + * Extracts all the non-vocab decorator commands from all the models in modelManager + * @param {ModelManager} modelManager the input model manager + * @param {object} options - decorator models options + * @param {boolean} options.removeDecoratorsFromModel - flag to strip out non-vocab decorators from models + * @param {string} options.locale - locale for extracted vocabulary set + * @returns {ExtractDecoratorsResult} - a new model manager with/without the decorators and a list of extracted decorator jsons + */ + static extractNonVocabDecorators(modelManager: ModelManager, options: { + removeDecoratorsFromModel: boolean; + locale: string; + }): { + /** + * - A model manager containing models stripped without decorators + */ + modelManager: ModelManager; + /** + * - Stripped out decorators, formed into decorator command sets + */ + decoratorCommandSet: any; + /** + * - Stripped out vocabularies, formed into vocabulary files + */ + vocabularies: string[]; }; /** * Throws an error if the decoractor command is invalid diff --git a/packages/concerto-cto/package-lock.json b/packages/concerto-cto/package-lock.json index eca9cb431..b9cb35d98 100644 --- a/packages/concerto-cto/package-lock.json +++ b/packages/concerto-cto/package-lock.json @@ -1,16 +1,16 @@ { "name": "@accordproject/concerto-cto", - "version": "3.18.0", + "version": "3.18.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@accordproject/concerto-cto", - "version": "3.18.0", + "version": "3.18.1", "license": "Apache-2.0", "dependencies": { "@accordproject/concerto-metamodel": "3.10.0", - "@accordproject/concerto-util": "3.18.0", + "@accordproject/concerto-util": "3.18.1", "path-browserify": "1.0.1" }, "devDependencies": { diff --git a/packages/concerto-cto/package.json b/packages/concerto-cto/package.json index 4a6cc71e0..a7c30ef7d 100644 --- a/packages/concerto-cto/package.json +++ b/packages/concerto-cto/package.json @@ -1,6 +1,6 @@ { "name": "@accordproject/concerto-cto", - "version": "3.18.0", + "version": "3.18.1", "description": "Parser for Concerto CTO files", "homepage": "https://github.com/accordproject/concerto", "engines": { @@ -57,7 +57,7 @@ }, "dependencies": { "@accordproject/concerto-metamodel": "3.10.0", - "@accordproject/concerto-util": "3.18.0", + "@accordproject/concerto-util": "3.18.1", "path-browserify": "1.0.1" }, "browserslist": "> 0.25%, not dead", diff --git a/packages/concerto-types/package-lock.json b/packages/concerto-types/package-lock.json index 05b0ab9a5..f23537c45 100644 --- a/packages/concerto-types/package-lock.json +++ b/packages/concerto-types/package-lock.json @@ -1,18 +1,18 @@ { "name": "@accordproject/concerto-types", - "version": "3.18.0", + "version": "3.18.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@accordproject/concerto-types", - "version": "3.18.0", + "version": "3.18.1", "license": "Apache-2.0", "devDependencies": { "@accordproject/concerto-codegen": "3.22.1", - "@accordproject/concerto-core": "3.18.0", + "@accordproject/concerto-core": "3.18.1", "@accordproject/concerto-metamodel": "3.10.0", - "@accordproject/concerto-util": "3.18.0", + "@accordproject/concerto-util": "3.18.1", "@types/jest": "28.1.1", "ajv": "8.12.0", "eslint": "8.2.0", diff --git a/packages/concerto-types/package.json b/packages/concerto-types/package.json index 4054c8a43..e7433533c 100644 --- a/packages/concerto-types/package.json +++ b/packages/concerto-types/package.json @@ -1,6 +1,6 @@ { "name": "@accordproject/concerto-types", - "version": "3.18.0", + "version": "3.18.1", "description": "Types for the Concerto Modeling Language", "homepage": "https://github.com/accordproject/concerto", "engines": { @@ -34,9 +34,9 @@ "license": "Apache-2.0", "devDependencies": { "@accordproject/concerto-codegen": "3.22.1", - "@accordproject/concerto-core": "3.18.0", + "@accordproject/concerto-core": "3.18.1", "@accordproject/concerto-metamodel": "3.10.0", - "@accordproject/concerto-util": "3.18.0", + "@accordproject/concerto-util": "3.18.1", "@types/jest": "28.1.1", "ajv": "8.12.0", "eslint": "8.2.0", diff --git a/packages/concerto-util/package-lock.json b/packages/concerto-util/package-lock.json index a413a3be8..0ed4f74e3 100644 --- a/packages/concerto-util/package-lock.json +++ b/packages/concerto-util/package-lock.json @@ -1,12 +1,12 @@ { "name": "@accordproject/concerto-util", - "version": "3.18.0", + "version": "3.18.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@accordproject/concerto-util", - "version": "3.18.0", + "version": "3.18.1", "license": "Apache-2.0", "dependencies": { "@supercharge/promise-pool": "1.7.0", diff --git a/packages/concerto-util/package.json b/packages/concerto-util/package.json index 3a835d6dd..c5713ab45 100644 --- a/packages/concerto-util/package.json +++ b/packages/concerto-util/package.json @@ -1,6 +1,6 @@ { "name": "@accordproject/concerto-util", - "version": "3.18.0", + "version": "3.18.1", "description": "Utilities for Concerto Modeling Language", "homepage": "https://github.com/accordproject/concerto", "engines": { diff --git a/packages/concerto-vocabulary/package-lock.json b/packages/concerto-vocabulary/package-lock.json index b2397ecd0..ffd0fea97 100644 --- a/packages/concerto-vocabulary/package-lock.json +++ b/packages/concerto-vocabulary/package-lock.json @@ -1,19 +1,19 @@ { "name": "@accordproject/concerto-vocabulary", - "version": "3.18.0", + "version": "3.18.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@accordproject/concerto-vocabulary", - "version": "3.18.0", + "version": "3.18.1", "license": "Apache-2.0", "dependencies": { "@accordproject/concerto-metamodel": "3.10.0", "yaml": "2.2.2" }, "devDependencies": { - "@accordproject/concerto-core": "3.18.0", + "@accordproject/concerto-core": "3.18.1", "chai": "4.3.6", "chai-as-promised": "7.1.1", "chai-things": "0.2.0", diff --git a/packages/concerto-vocabulary/package.json b/packages/concerto-vocabulary/package.json index 21d6253a8..2dbf2cf76 100644 --- a/packages/concerto-vocabulary/package.json +++ b/packages/concerto-vocabulary/package.json @@ -1,6 +1,6 @@ { "name": "@accordproject/concerto-vocabulary", - "version": "3.18.0", + "version": "3.18.1", "description": "Associate human-readable text to model declarations", "homepage": "https://github.com/accordproject/concerto", "engines": { @@ -37,7 +37,7 @@ "author": "accordproject.org", "license": "Apache-2.0", "devDependencies": { - "@accordproject/concerto-core": "3.18.0", + "@accordproject/concerto-core": "3.18.1", "chai": "4.3.6", "chai-as-promised": "7.1.1", "chai-things": "0.2.0", diff --git a/packages/concerto-vocabulary/types/lib/vocabulary.d.ts b/packages/concerto-vocabulary/types/lib/vocabulary.d.ts index 2fa6f160f..ddcc1b7c3 100644 --- a/packages/concerto-vocabulary/types/lib/vocabulary.d.ts +++ b/packages/concerto-vocabulary/types/lib/vocabulary.d.ts @@ -5,6 +5,12 @@ export = Vocabulary; * @memberof module:concerto-vocabulary */ declare class Vocabulary { + /** + * Validates a locale + * @param {string} locale the locale to validate + * @throws {Error} if the locale is invalid + */ + static validateLocale(locale: string): void; /** * Create the Vocabulary * @constructor