-
-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(build) Recreate TypeScript interfaces for the new packages
Signed-off-by: jeromesimeon <[email protected]>
- Loading branch information
1 parent
6977dd4
commit 6165d1c
Showing
24 changed files
with
454 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export var BaseException: typeof import("./lib/baseexception"); | ||
export var BaseFileException: typeof import("./lib/basefileexception"); | ||
export var ParseException: typeof import("./lib/parseexception"); | ||
export var Parser: typeof import("./lib/parserMain"); | ||
export var Printer: typeof import("./lib/printer"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
export = BaseException; | ||
/** | ||
* A base class for all Concerto exceptions | ||
* @extends Error | ||
* @class | ||
* @memberof module:concerto-core | ||
*/ | ||
declare class BaseException extends Error { | ||
/** | ||
* Create the BaseException. | ||
* @param {string} message - The exception message. | ||
* @param {string} component - The optional component which throws this error. | ||
*/ | ||
constructor(message: string, component: string); | ||
component: any; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
export = BaseFileException; | ||
/** | ||
* Exception throws when a Concerto file is semantically invalid | ||
* @extends BaseException | ||
* @see {@link BaseException} | ||
* @class | ||
* @memberof module:concerto-core | ||
*/ | ||
declare class BaseFileException extends BaseException { | ||
/** | ||
* Create an BaseFileException | ||
* @param {string} message - the message for the exception | ||
* @param {string} fileLocation - the optional file location associated with the exception | ||
* @param {string} fullMessage - the optional full message text | ||
* @param {string} [fileName] - the file name | ||
* @param {string} [component] - the component which throws this error | ||
*/ | ||
constructor(message: string, fileLocation: string, fullMessage: string, fileName?: string, component?: string); | ||
fileLocation: string; | ||
shortMessage: string; | ||
fileName: string; | ||
/** | ||
* Returns the file location associated with the exception or null | ||
* @return {string} the optional location associated with the exception | ||
*/ | ||
getFileLocation(): string; | ||
/** | ||
* Returns the error message without the location of the error | ||
* @returns {string} the error message | ||
*/ | ||
getShortMessage(): string; | ||
/** | ||
* Returns the fileName for the error | ||
* @returns {string} the file name or null | ||
*/ | ||
getFileName(): string; | ||
} | ||
import BaseException = require("./baseexception"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
export = ParseException; | ||
/** | ||
* Exception throws when a Concerto file is syntactically invalid | ||
* @extends BaseFileException | ||
* @see See {@link BaseFileException} | ||
* @class | ||
* @memberof module:concerto-core | ||
* @private | ||
*/ | ||
declare class ParseException extends BaseFileException { | ||
/** | ||
* Create an ParseException | ||
* @param {string} message - the message for the exception | ||
* @param {string} [fileLocation] - the file location associated with the exception | ||
* @param {string} [fileName] - the file name associated with the exception | ||
* @param {string} [fullMessageOverride] - the pre-existing full message | ||
* @param {string} [component] - the component which throws this error | ||
*/ | ||
constructor(message: string, fileLocation?: string, fileName?: string, fullMessageOverride?: string, component?: string); | ||
} | ||
import BaseFileException = require("./basefileexception"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
declare function peg$SyntaxError(message: any, expected: any, found: any, location: any): any; | ||
declare class peg$SyntaxError { | ||
constructor(message: any, expected: any, found: any, location: any); | ||
format(sources: any): string; | ||
} | ||
declare namespace peg$SyntaxError { | ||
function buildMessage(expected: any, found: any): string; | ||
} | ||
declare function peg$parse(input: any, options: any): any; | ||
export { peg$SyntaxError as SyntaxError, peg$parse as parse }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** | ||
* Create decorator argument string from a metamodel | ||
* @param {string} cto - the Concerto string | ||
* @param {string} [fileName] - an optional file name | ||
* @return {object} the string for the decorator argument | ||
*/ | ||
export function parse(cto: string, fileName?: string): object; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** | ||
* Create a model string from a metamodel | ||
* @param {object} metaModel - the metamodel | ||
* @return {string} the string for that model | ||
*/ | ||
export function toCTO(metaModel: object): string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export var FileDownloader: typeof import("./lib/filedownloader"); | ||
export var CompositeFileLoader: typeof import("./lib/loaders/compositefileloader"); | ||
export var DefaultFileLoader: typeof import("./lib/loaders/defaultfileloader"); | ||
export var GitHubFileLoader: typeof import("./lib/loaders/githubfileloader"); | ||
export var HTTPFileLoader: typeof import("./lib/loaders/httpfileloader"); | ||
export var Writer: typeof import("./lib/writer"); | ||
export var Logger: typeof import("./lib/logger"); | ||
export var TypedStack: typeof import("./lib/typedstack"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
export = FileDownloader; | ||
/** | ||
* Downloads the transitive closure of a set of model files. | ||
* @class | ||
* @memberof module:concerto-core | ||
*/ | ||
declare class FileDownloader { | ||
/** | ||
* Create a FileDownloader and bind to a FileLoader. | ||
* @param {fileLoader} fileLoader - the loader to use to download model files | ||
* @param {*} getExternalImports - a function taking a file and returning new files | ||
* @param {Number} concurrency - the number of model files to download concurrently | ||
*/ | ||
constructor(fileLoader: fileLoader, getExternalImports: any, concurrency?: number); | ||
fileLoader: fileLoader; | ||
concurrency: number; | ||
getExternalImports: any; | ||
/** | ||
* Download all external dependencies for an array of model files | ||
* @param {File[]} files - the model files | ||
* @param {Object} [options] - Options object passed to FileLoaders | ||
* @return {Promise} a promise that resolves to Files[] for the external model files | ||
*/ | ||
downloadExternalDependencies(files: File[], options?: any): Promise<any>; | ||
/** | ||
* Execute a Job | ||
* @param {Object} job - the job to execute | ||
* @param {Object} fileLoader - the loader to use to download model files. | ||
* @return {Promise} a promise to the job results | ||
*/ | ||
runJob(job: any, fileLoader: any): Promise<any>; | ||
} |
42 changes: 42 additions & 0 deletions
42
packages/concerto-util/types/lib/loaders/compositefileloader.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
export = CompositeFileLoader; | ||
/** | ||
* <p> | ||
* Manages a set of model file loaders, delegating to the first model file | ||
* loader that accepts a URL. | ||
* </p> | ||
* @private | ||
* @class | ||
* @memberof module:concerto-util | ||
*/ | ||
declare class CompositeFileLoader { | ||
fileLoaders: any[]; | ||
/** | ||
* Adds a FileLoader implemenetation to the FileLoader | ||
* @param {FileLoader} fileLoader - The script to add to the ScriptManager | ||
*/ | ||
addFileLoader(fileLoader: FileLoader): void; | ||
/** | ||
* Get the array of FileLoader instances | ||
* @return {FileLoaders[]} The FileLoader registered | ||
* @private | ||
*/ | ||
private getFileLoaders; | ||
/** | ||
* Remove all registered FileLoaders | ||
*/ | ||
clearFileLoaders(): void; | ||
/** | ||
* Returns true if this ModelLoader can process the URL | ||
* @param {string} url - the URL | ||
* @return {boolean} true if this ModelLoader accepts the URL | ||
* @abstract | ||
*/ | ||
accepts(url: string): boolean; | ||
/** | ||
* Load a File from a URL and return it | ||
* @param {string} url - the url to get | ||
* @param {object} options - additional options | ||
* @return {Promise} a promise to the File | ||
*/ | ||
load(url: string, options: object): Promise<any>; | ||
} |
19 changes: 19 additions & 0 deletions
19
packages/concerto-util/types/lib/loaders/defaultfileloader.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
export = DefaultFileLoader; | ||
/** | ||
* <p> | ||
* A default CompositeFileLoader implementation which supports | ||
* github://, http:// and https:// URLs. | ||
* </p> | ||
* @private | ||
* @class | ||
* @see See {@link CompositeFileLoader} | ||
* @memberof module:concerto-util | ||
*/ | ||
declare class DefaultFileLoader extends CompositeFileLoader { | ||
/** | ||
* Create the DefaultFileLoader. | ||
* @param {*} processFile - a function to apply to the content of the file | ||
*/ | ||
constructor(processFile: any); | ||
} | ||
import CompositeFileLoader = require("./compositefileloader"); |
11 changes: 11 additions & 0 deletions
11
packages/concerto-util/types/lib/loaders/githubfileloader.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export = GitHubFileLoader; | ||
/** | ||
* Loads Files from an external source, such as a URL. | ||
* | ||
* @class | ||
* @private | ||
* @memberof module:concerto-util | ||
*/ | ||
declare class GitHubFileLoader extends HTTPFileLoader { | ||
} | ||
import HTTPFileLoader = require("./httpfileloader"); |
29 changes: 29 additions & 0 deletions
29
packages/concerto-util/types/lib/loaders/httpfileloader.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
export = HTTPFileLoader; | ||
/** | ||
* Loads Files from an HTTP(S) URL using the axios library. | ||
* @class | ||
* @private | ||
* @memberof module:concerto-util | ||
*/ | ||
declare class HTTPFileLoader { | ||
/** | ||
* Create the HTTPFileLoader. | ||
* @param {*} processFile - a function to apply to the content of the file | ||
*/ | ||
constructor(processFile: any); | ||
processFile: any; | ||
/** | ||
* Returns true if this ModelLoader can process the URL | ||
* @param {string} url - the URL | ||
* @return {boolean} true if this ModelLoader accepts the URL | ||
* @abstract | ||
*/ | ||
accepts(url: string): boolean; | ||
/** | ||
* Load a File from a URL and return it | ||
* @param {string} requestUrl - the url to get | ||
* @param {object} options - additional options | ||
* @return {Promise} a promise to the File | ||
*/ | ||
load(requestUrl: string, options: object): Promise<any>; | ||
} |
Oops, something went wrong.