-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add jdl support to blueprints (#27291)
- Loading branch information
Showing
62 changed files
with
659 additions
and
623 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,33 @@ | ||
import { join } from 'path'; | ||
import { execa } from 'execa'; | ||
import { basicHelpers as helpers, runResult } from '../lib/testing/index.js'; | ||
import { getPackageRoot } from '../lib/index.js'; | ||
|
||
const jhipsterCli = join(getPackageRoot(), 'bin/jhipster.cjs'); | ||
|
||
describe('allows customizing JDL definitions', () => { | ||
it('accepts a custom JDL definition', async () => { | ||
await helpers | ||
.prepareTemporaryDir() | ||
.withFiles({ | ||
'.blueprint/app/index.mjs': `export const command = { | ||
configs: { | ||
fooConfig: { | ||
jdl: { | ||
type: 'boolean', | ||
tokenType: 'BOOLEAN', | ||
}, | ||
scope: 'storage', | ||
}, | ||
}, | ||
};`, | ||
}) | ||
.commitFiles(); | ||
await execa(jhipsterCli, ['jdl', '--json-only', '--inline', 'application { config { fooConfig false } }'], { stdio: 'pipe' }); | ||
runResult.assertJsonFileContent('.yo-rc.json', { | ||
'generator-jhipster': { | ||
fooConfig: false, | ||
}, | ||
}); | ||
}); | ||
}); |
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
Oops, something went wrong.