-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HCK-9614: adapt FE to work in the browser (#16)
* HCK-9614: adapt FE to work in the browser * HCK-9614: update esbuild config * HCK-9614: small fixes * HCK-9614: revert package.lock * Update package-lock.json
- Loading branch information
1 parent
1dad1e5
commit 3ede0c0
Showing
8 changed files
with
5,837 additions
and
5,680 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const { generateContainerScript } = require('../forward_engineering/generateContainerScript'); | ||
|
||
module.exports = { | ||
generateContainerScript, | ||
}; |
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,34 @@ | ||
const { generateVertices, generateEdges } = require('./gremlinHelper'); | ||
|
||
function generateContainerScript(data, logger, cb) { | ||
const { jsonData } = data; | ||
let { collections, relationships } = data; | ||
logger.clear(); | ||
try { | ||
let resultScript = ''; | ||
|
||
collections = collections.map(JSON.parse); | ||
relationships = relationships.map(JSON.parse); | ||
|
||
const verticesScript = generateVertices(collections, jsonData); | ||
const edgesScript = generateEdges(collections, relationships, jsonData); | ||
|
||
if (verticesScript) { | ||
resultScript += verticesScript; | ||
} | ||
|
||
if (edgesScript) { | ||
resultScript += '\n\n' + edgesScript; | ||
} | ||
|
||
cb(null, resultScript); | ||
} catch (e) { | ||
logger.log('error', { message: e.message, stack: e.stack }, 'Forward-Engineering Error'); | ||
|
||
cb({ message: e.message, stack: e.stack }); | ||
} | ||
} | ||
|
||
module.exports = { | ||
generateContainerScript, | ||
}; |
Oops, something went wrong.