Generator-jhipster: Fix Export JDL

Created on 23 Sep 2018  ·  19Comments  ·  Source: jhipster/generator-jhipster

Some issues and improvements for export-jdl command

$ jhipster export-jdl app.jdl -d
Using JHipster version installed locally in current project's node_modules
Debug logging is on
DEBUG!  cmd: export-jdl
DEBUG!  args: app.jdl, commands: Object, options: Object, _execs: Object, _allowUnknownOption: true, _args: Object, _name: export-jdl, _noHelp: false, parent: Object, _description: Create a JDL file from the existing entities, _argsDescription: undefined, _events: Object, _eventsCount: 1
DEBUG!  opts: argument: Object, desc: Create a JDL file from the existing entities
DEBUG!  Arguments found
DEBUG!  cmdArgs: app.jdl
Executing jhipster:export-jdl app.jdl
Options: d: true, from-cli: true
Parsing entities from .jhipster dir...
The passed validation must be valid to be added to the field.
Errors: No value
events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: ERROR! 
Error while parsing entities to JDL

    at Environment.error (/home/deepu/workspace/temp/iHomer/store/node_modules/yeoman-environment/lib/environment.js:157:40)
    at module.exports.error (/home/deepu/workspace/temp/iHomer/store/node_modules/generator-jhipster/generators/generator-base.js:2060:18)
    at module.exports.generateJDLFromEntities (/home/deepu/workspace/temp/iHomer/store/node_modules/generator-jhipster/generators/generator-base-private.js:1000:18)
    at module.exports.parseJson (/home/deepu/workspace/temp/iHomer/store/node_modules/generator-jhipster/generators/export-jdl/index.js:51:33)
    at Object.<anonymous> (/home/deepu/workspace/temp/iHomer/store/node_modules/yeoman-generator/lib/index.js:418:27)
    at /home/deepu/workspace/temp/iHomer/store/node_modules/run-async/index.js:25:25
    at new Promise (<anonymous>)
    at /home/deepu/workspace/temp/iHomer/store/node_modules/run-async/index.js:24:19
    at self.env.runLoop.add.completed (/home/deepu/workspace/temp/iHomer/store/node_modules/yeoman-generator/lib/index.js:419:13)
    at runCallback (timers.js:810:20)
  • [x] it doesn't support exporting applications
  • [x] it doesn't support exporting multiple applications from a root folder
$$ bug-bounty $$ $100 area JDL

All 19 comments

@MathieuAA do you think the second and third point is feasible

Fixed the first one already, I'll create an issue for the two.

closing as corresponding ticket is created in JH core

Well, I'm reopening this. The culprit is here

@deepu105 I'm creating an exporting file in JCore to deal with this situation (and moving the logic from here to JCore, like the JDL importer). After that, I'll do a release to update the code here.

Awesome thanks

Thanks & Regards,
Deepu

On Sat, Sep 29, 2018 at 7:07 PM Mathieu ABOU-AICHI notifications@github.com
wrote:

@deepu105 https://github.com/deepu105 I'm creating an exporting file in
JCore to deal with this situation (and moving the logic from here to JCore,
like the JDL importer). After that, I'll do a release to update the code
here.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/8391#issuecomment-425660349,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF6BjuWdTu1DCROfC0sLJanFpyl_Wks5uf6jGgaJpZM4W1rU4
.

@MathieuAA Hello, I would like to contribute on this enhancement. Are you still working on it ?

@Shaolans Hi, nop. I don't have much time to work on it.

Okay thanks ! Just so I know, is there already some base to work with ? like some utilities functions for exporting jdl

@Shaolans : you can have a look at this file https://github.com/jhipster/generator-jhipster/blob/master/generators/export-jdl/index.js

The export jdl works well for entities, inside a folder with existing JHipster app. It does not export the JHipster config.
And same for multi folder

Thanks ! I will check it out :+1:

I'm adding a bounty on this as:

  • it's opened for long time
  • it looks like a lot of work
  • it deserves this

A PR has been merged on JCore about that. The credit goes to @Shaolans as I've taken his code (his PR) as inspiration to implement it. He absolutely deserves the bounty.

@MathieuAA shall we close this then?

@deepu105 I'll be closing this tomorrow, when I'll drop the (hopefully) latest release of JCore before the merge.

Sure thanks man. Awesome work

On Tue, 2 Jul 2019, 10:35 pm Mathieu ABOU-AICHI, notifications@github.com
wrote:

@deepu105 https://github.com/deepu105 I'll be closing this tomorrow,
when I'll drop the (hopefully) latest release of JCore before the merge.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/8391?email_source=notifications&email_token=AAIOKF3NWCIURTOZKOVOUI3P5O3ZPA5CNFSM4FWWWU4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZCPCCA#issuecomment-507834632,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAIOKF2BDHPKMRMKXLWVIY3P5O3ZPANCNFSM4FWWWU4A
.

@MathieuAA You deserve as much as I do, if not more ! You did a great work by reviewing my PR and reimplement it better 👍

I propose that both of you claim the bounty of $100 :) I'll be happy to
approve

Thanks & Regards,
Deepu

On Thu, Jul 4, 2019 at 7:32 PM Ling-Chun SO notifications@github.com
wrote:

@MathieuAA https://github.com/MathieuAA You deserve as much as I do, if
not more ! You did a great work by reviewing my PR and reimplement it
better 👍


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/8391?email_source=notifications&email_token=AAIOKF6PVMAN6KIMPRGPWHTP5YX3DA5CNFSM4FWWWU4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZH4P6Y#issuecomment-508545019,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAIOKF5VD7A2DJ5ZNNUHI53P5YX3DANCNFSM4FWWWU4A
.

Was this page helpful?
0 / 5 - 0 ratings