forked from devonfw/cobigen-devon4node-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
devonfw#29 created workspaces for windows, linux and macos
added prepare script to container project (builds all exectutables) adjusted .gitignore and .npmignore changed version to 1.2.0
- Loading branch information
1 parent
c54d375
commit 28dcbbf
Showing
82 changed files
with
1,680 additions
and
74 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# Node.js Tools for Visual Studio | ||
.ntvs_analysis.dat | ||
node_modules/ | ||
nestserver-*.exe | ||
nestserver-* | ||
.vscode | ||
dist/ | ||
yarn-error.log |
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 |
---|---|---|
|
@@ -3,5 +3,4 @@ | |
node_modules/ | ||
.vscode | ||
dist/ | ||
nestserver-linux-1.0.7 | ||
nestserver-macos-1.0.7 | ||
nestserver-* |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,64 @@ | ||
{ | ||
"name": "@devonfw/cobigen-nestserver-linux", | ||
"bin": "dist/main.js", | ||
"version": "1.2.0", | ||
"description": "Nestjs server to implement the input reader and merger for CobiGen", | ||
"author": "CobiGen Team", | ||
"license": "MIT", | ||
"scripts":{ | ||
"build": "tsc -p tsconfig.build.json", | ||
"format": "prettier --write \"src/**/*.ts\"", | ||
"start": "ts-node -r tsconfig-paths/register src/main.ts", | ||
"start:dev": "nodemon", | ||
"start:debug": "nodemon --config nodemon-debug.json", | ||
"prestart:prod": "rimraf dist && npm run build", | ||
"start:prod": "node dist/main.js", | ||
"lint": "tslint -p tsconfig.json -c tslint.json", | ||
"test": "jest", | ||
"test:watch": "jest --watch", | ||
"test:cov": "jest --coverage", | ||
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", | ||
"test:e2e": "jest --config ./test/jest-e2e.json" | ||
}, | ||
"dependencies": { | ||
"@devonfw/ts-merger": "^2.2.10", | ||
"@nestjs/common": "^5.4.0", | ||
"@nestjs/core": "^5.4.0", | ||
"js-beautify": "^1.9.0", | ||
"pkg": "^4.4.9", | ||
"reflect-metadata": "^0.1.12", | ||
"rimraf": "^2.6.2", | ||
"rxjs": "^6.2.2", | ||
"typescript": "^3.0.1" | ||
}, | ||
"devDependencies": { | ||
"@nestjs/testing": "^5.1.0", | ||
"@types/express": "^4.16.0", | ||
"@types/jest": "^23.3.1", | ||
"@types/node": "^10.7.1", | ||
"@types/supertest": "^2.0.5", | ||
"jest": "^23.5.0", | ||
"nodemon": "^1.18.3", | ||
"prettier": "^1.14.2", | ||
"supertest": "^3.1.0", | ||
"ts-jest": "^23.1.3", | ||
"ts-loader": "^4.4.2", | ||
"ts-node": "^7.0.1", | ||
"tsconfig-paths": "^3.5.0", | ||
"tslint": "5.11.0" | ||
}, | ||
"jest": { | ||
"moduleFileExtensions": [ | ||
"js", | ||
"json", | ||
"ts" | ||
], | ||
"rootDir": "src", | ||
"testRegex": ".spec.ts$", | ||
"transform": { | ||
"^.+\\.(t|j)s$": "ts-jest" | ||
}, | ||
"coverageDirectory": "../coverage", | ||
"testEnvironment": "node" | ||
} | ||
} |
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.
3 changes: 2 additions & 1 deletion
3
...essmanagement/inputreader/input-reader.ts → ...essmanagement/inputreader/input-reader.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
File renamed without changes.
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
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.
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,4 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all" | ||
} |
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,175 @@ | ||
openapi: 3.0.0 | ||
servers: | ||
- url: 'https://localhost:5000/' | ||
description: nest server | ||
info: | ||
title: External process communication | ||
description: Specification of communication between external process and CobiGen | ||
version: 1.0.0 | ||
x-rootpackage: com.devonfw.poc | ||
|
||
paths: | ||
/processmanagement/tsplugin/isConnectionReady/: | ||
get: | ||
description: Needed for CobiGen to know that the server is ready to receive requests. Also we need it to differentiate plug-ins. | ||
responses: | ||
'200': | ||
description: Returns server version | ||
content: | ||
text/plain: | ||
schema: | ||
type: string | ||
|
||
/processmanagement/tsplugin/isValidInput/: | ||
post: | ||
description: Returns true or false whether it is a valid input for generation. It can be a simple file extension check or more complex logic. | ||
requestBody: | ||
$ref: '#/components/requestBodies/InputFile' | ||
operationId: isValidInput | ||
responses: | ||
'200': | ||
description: Returns true or false whether it is a valid input for generation | ||
content: | ||
text/plain: | ||
schema: | ||
type: boolean | ||
'404': | ||
description: Not found | ||
|
||
/processmanagement/tsplugin/getInputModel/: | ||
post: | ||
description: Requesting a key-value model of the input file in JSON format. | ||
requestBody: | ||
$ref: '#/components/requestBodies/InputFile' | ||
operationId: getInputObjects | ||
responses: | ||
'200': | ||
description: Returns a model in JSON format | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Model' | ||
'404': | ||
description: Not found | ||
|
||
/processmanagement/tsplugin/merge/: | ||
post: | ||
description: Merges two files and returns the result | ||
requestBody: | ||
$ref: '#/components/requestBodies/Merger' | ||
operationId: merge | ||
responses: | ||
'200': | ||
description: Returns merge file as a string | ||
content: | ||
text/plain: | ||
schema: | ||
type: string | ||
'404': | ||
description: Not found | ||
|
||
components: | ||
schemas: | ||
Model: | ||
x-component: processmanagement | ||
description: Data model of the input file | ||
type: object | ||
properties: | ||
path: | ||
type: string | ||
description: Input file path. It can also be just the file name. | ||
uniqueItems: true | ||
inputObject: | ||
$ref: '#/components/schemas/InputObject' | ||
InputObject: | ||
x-component: processmanagement | ||
description: Input object containing needed information for the templates | ||
type: object | ||
properties: | ||
Fields: | ||
$ref: '#/components/schemas/Fields' | ||
Imports: | ||
$ref: '#/components/schemas/Imports' | ||
Fields: | ||
x-component: processmanagement | ||
description: Not really needed, just used as an example for the model. | ||
type: array | ||
items: | ||
type: object | ||
properties: | ||
Field: | ||
$ref: '#/components/schemas/Field' | ||
Field: | ||
x-component: processmanagement | ||
description: Not really needed, just used as an example for the model. | ||
type: object | ||
properties: | ||
fieldName: | ||
type: string | ||
fieldType: | ||
type: string | ||
Imports: | ||
x-component: processmanagement | ||
description: Not really needed, just used as an example for the model. | ||
type: array | ||
items: | ||
type: object | ||
properties: | ||
Import: | ||
$ref: '#/components/schemas/Import' | ||
Import: | ||
x-component: processmanagement | ||
description: Not really needed, just used as an example for the model. | ||
type: object | ||
properties: | ||
importValue: | ||
type: string | ||
InputFile: | ||
x-component: processmanagement | ||
description: Input file | ||
type: object | ||
properties: | ||
filename: | ||
type: string | ||
content: | ||
type: string | ||
charset: | ||
type: string | ||
Merger: | ||
x-component: processmanagement | ||
description: Merger properties. baseContent is the current user's file. patchContent is CobiGen freshly generated file. patchOverrides is set to true when in case of conflict, we want to override using patch. | ||
type: object | ||
properties: | ||
baseContent: | ||
type: string | ||
patchContent: | ||
type: string | ||
patchOverrides: | ||
type: boolean | ||
|
||
|
||
requestBodies: | ||
Model: | ||
description: Data model of the file in JSON format | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Model' | ||
required: true | ||
|
||
InputFile: | ||
description: Input file for CobiGen to parse | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/InputFile' | ||
required: true | ||
|
||
Merger: | ||
description: baseContent is the current user's file. patchContent is CobiGen freshly generated file. patchOverrides is set to true when in case of conflict, we want to override using patch. | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Merger' | ||
required: true | ||
|
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 @@ | ||
{ | ||
"language": "ts", | ||
"collection": "@nestjs/schematics", | ||
"sourceRoot": "src" | ||
} |
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 @@ | ||
{ | ||
"watch": ["src"], | ||
"ext": "ts", | ||
"ignore": ["src/**/*.spec.ts"], | ||
"exec": "node --inspect-brk -r ts-node/register -r tsconfig-paths/register src/main.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,6 @@ | ||
{ | ||
"watch": ["src"], | ||
"ext": "ts", | ||
"ignore": ["src/**/*.spec.ts"], | ||
"exec": "ts-node -r tsconfig-paths/register src/main.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,64 @@ | ||
{ | ||
"name": "@devonfw/cobigen-nestserver-macos", | ||
"bin": "dist/main.js", | ||
"version": "1.2.0", | ||
"description": "Nestjs server to implement the input reader and merger for CobiGen", | ||
"author": "CobiGen Team", | ||
"license": "MIT", | ||
"scripts":{ | ||
"build": "tsc -p tsconfig.build.json", | ||
"format": "prettier --write \"src/**/*.ts\"", | ||
"start": "ts-node -r tsconfig-paths/register src/main.ts", | ||
"start:dev": "nodemon", | ||
"start:debug": "nodemon --config nodemon-debug.json", | ||
"prestart:prod": "rimraf dist && npm run build", | ||
"start:prod": "node dist/main.js", | ||
"lint": "tslint -p tsconfig.json -c tslint.json", | ||
"test": "jest", | ||
"test:watch": "jest --watch", | ||
"test:cov": "jest --coverage", | ||
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", | ||
"test:e2e": "jest --config ./test/jest-e2e.json" | ||
}, | ||
"dependencies": { | ||
"@devonfw/ts-merger": "^2.2.10", | ||
"@nestjs/common": "^5.4.0", | ||
"@nestjs/core": "^5.4.0", | ||
"js-beautify": "^1.9.0", | ||
"pkg": "^4.4.9", | ||
"reflect-metadata": "^0.1.12", | ||
"rimraf": "^2.6.2", | ||
"rxjs": "^6.2.2", | ||
"typescript": "^3.0.1" | ||
}, | ||
"devDependencies": { | ||
"@nestjs/testing": "^5.1.0", | ||
"@types/express": "^4.16.0", | ||
"@types/jest": "^23.3.1", | ||
"@types/node": "^10.7.1", | ||
"@types/supertest": "^2.0.5", | ||
"jest": "^23.5.0", | ||
"nodemon": "^1.18.3", | ||
"prettier": "^1.14.2", | ||
"supertest": "^3.1.0", | ||
"ts-jest": "^23.1.3", | ||
"ts-loader": "^4.4.2", | ||
"ts-node": "^7.0.1", | ||
"tsconfig-paths": "^3.5.0", | ||
"tslint": "5.11.0" | ||
}, | ||
"jest": { | ||
"moduleFileExtensions": [ | ||
"js", | ||
"json", | ||
"ts" | ||
], | ||
"rootDir": "src", | ||
"testRegex": ".spec.ts$", | ||
"transform": { | ||
"^.+\\.(t|j)s$": "ts-jest" | ||
}, | ||
"coverageDirectory": "../coverage", | ||
"testEnvironment": "node" | ||
} | ||
} |
Oops, something went wrong.