@mshima/generator-jhipster-nodejs 0.0.0-stage → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +204 -0
- package/README.md +243 -2
- package/build-info.json +3 -0
- package/cli/cli-customizations.cjs +9 -0
- package/cli/cli.cjs +40 -0
- package/cli/logo.js +31 -0
- package/cli/version.cjs +12 -0
- package/generators/ci-cd/USAGE +5 -0
- package/generators/ci-cd/command.js +5 -0
- package/generators/ci-cd/generator.js +158 -0
- package/generators/ci-cd/index.js +2 -0
- package/generators/ci-cd/templates/.gitlab-ci.yml.ejs +137 -0
- package/generators/ci-cd/templates/azure-pipelines.yml.ejs +68 -0
- package/generators/ci-cd/templates/circle.yml.ejs +59 -0
- package/generators/ci-cd/templates/docker-registry.yml.ejs +58 -0
- package/generators/ci-cd/templates/github-ci.yml.ejs +90 -0
- package/generators/ci-cd/templates/jenkins/Jenkinsfile.ejs +104 -0
- package/generators/ci-cd/templates/jenkins/idea.gdsl +90 -0
- package/generators/ci-cd/templates/jenkins/jenkins.yml.ejs +33 -0
- package/generators/ci-cd/templates/travis.yml.ejs +75 -0
- package/generators/client/command.js +5 -0
- package/generators/client/generator.js +21 -0
- package/generators/client/generators/bootstrap/command.js +5 -0
- package/generators/client/generators/bootstrap/generator.js +28 -0
- package/generators/client/generators/bootstrap/index.js +2 -0
- package/generators/client/index.js +2 -0
- package/generators/common/generators/bootstrap/command.js +5 -0
- package/generators/common/generators/bootstrap/generator.js +37 -0
- package/generators/common/generators/bootstrap/index.js +2 -0
- package/generators/docker/command.js +5 -0
- package/generators/docker/generator.js +16 -0
- package/generators/docker/generators/bootstrap/command.js +5 -0
- package/generators/docker/generators/bootstrap/generator.js +56 -0
- package/generators/docker/generators/bootstrap/index.js +2 -0
- package/generators/docker/index.js +2 -0
- package/generators/docker/templates/docker/app.yml.ejs +25 -0
- package/generators/generator-nodejs-constants.js +32 -0
- package/generators/languages/command.js +5 -0
- package/generators/languages/generator.js +22 -0
- package/generators/languages/index.js +2 -0
- package/generators/languages/templates/src/main/webapp/i18n/en/home.json +19 -0
- package/generators/languages/templates/src/main/webapp/i18n/es/home.json +19 -0
- package/generators/languages/templates/src/main/webapp/i18n/it/home.json +19 -0
- package/generators/node-server/command.js +96 -0
- package/generators/node-server/entity-files.js +41 -0
- package/generators/node-server/files.js +254 -0
- package/generators/node-server/generator.js +702 -0
- package/generators/node-server/generators/bootstrap/command.js +5 -0
- package/generators/node-server/generators/bootstrap/generator.js +83 -0
- package/generators/node-server/generators/bootstrap/index.js +2 -0
- package/generators/node-server/index.js +2 -0
- package/generators/node-server/resources/package.json +76 -0
- package/generators/node-server/support/api-fake-data.js +54 -0
- package/generators/node-server/support/columns.js +73 -0
- package/generators/node-server/support/database.js +24 -0
- package/generators/node-server/support/entity-authorities.js +32 -0
- package/generators/node-server/support/entity-paths.js +13 -0
- package/generators/node-server/support/enums.js +11 -0
- package/generators/node-server/support/index.js +9 -0
- package/generators/node-server/support/mail-templates.js +82 -0
- package/generators/node-server/support/migrations.js +197 -0
- package/generators/node-server/support/validators.js +25 -0
- package/generators/node-server/templates/.dockerignore.ejs +16 -0
- package/generators/node-server/templates/.gitignore.jhi.nodejs.ejs +24 -0
- package/generators/node-server/templates/Dockerfile.ejs +54 -0
- package/generators/node-server/templates/README.md.jhi.nodejs.ejs +220 -0
- package/generators/node-server/templates/package.json.ejs +84 -0
- package/generators/node-server/templates/server/README.md.ejs +269 -0
- package/generators/node-server/templates/server/e2e/_entityFileName_.database.e2e-spec.ts.ejs +192 -0
- package/generators/node-server/templates/server/e2e/_entityFileName_.e2e-spec.ts.ejs +402 -0
- package/generators/node-server/templates/server/e2e/account.e2e-spec.ts.ejs +349 -0
- package/generators/node-server/templates/server/e2e/app.e2e-spec.ts.ejs +188 -0
- package/generators/node-server/templates/server/e2e/authority.e2e-spec.ts.ejs +50 -0
- package/generators/node-server/templates/server/e2e/cors.e2e-spec.ts.ejs +110 -0
- package/generators/node-server/templates/server/e2e/management.e2e-spec.ts.ejs +180 -0
- package/generators/node-server/templates/server/e2e/oauth2-bearer.e2e-spec.ts.ejs +71 -0
- package/generators/node-server/templates/server/e2e/session.e2e-spec.ts.ejs +219 -0
- package/generators/node-server/templates/server/e2e/setup.test.js.ejs +1 -0
- package/generators/node-server/templates/server/e2e/user.e2e-spec.ts.ejs +318 -0
- package/generators/node-server/templates/server/env.ejs +1 -0
- package/generators/node-server/templates/server/eslint.config.mjs.ejs +48 -0
- package/generators/node-server/templates/server/nest-cli.json.ejs +11 -0
- package/generators/node-server/templates/server/ormconfig.ts.ejs +35 -0
- package/generators/node-server/templates/server/package.json.ejs +143 -0
- package/generators/node-server/templates/server/sonar-project.properties.ejs +10 -0
- package/generators/node-server/templates/server/src/app.config.spec.ts.ejs +13 -0
- package/generators/node-server/templates/server/src/app.config.ts.ejs +179 -0
- package/generators/node-server/templates/server/src/app.module.ts.ejs +80 -0
- package/generators/node-server/templates/server/src/application-config.ts.ejs +153 -0
- package/generators/node-server/templates/server/src/auth/account.controller.ts.ejs +183 -0
- package/generators/node-server/templates/server/src/auth/auth.module.ts.ejs +104 -0
- package/generators/node-server/templates/server/src/auth/auth.service.ts.ejs +294 -0
- package/generators/node-server/templates/server/src/auth/csrf.middleware.spec.ts.ejs +65 -0
- package/generators/node-server/templates/server/src/auth/csrf.middleware.ts.ejs +76 -0
- package/generators/node-server/templates/server/src/auth/decorators/auth-user.decorator.ts.ejs +8 -0
- package/generators/node-server/templates/server/src/auth/decorators/roles.decorator.ts.ejs +4 -0
- package/generators/node-server/templates/server/src/auth/dto/key-and-password.dto.ts.ejs +17 -0
- package/generators/node-server/templates/server/src/auth/dto/password-change.dto.ts.ejs +17 -0
- package/generators/node-server/templates/server/src/auth/dto/user-login.dto.ts.ejs +21 -0
- package/generators/node-server/templates/server/src/auth/guards/auth.guard.ts.ejs +50 -0
- package/generators/node-server/templates/server/src/auth/guards/oauth2-login.guard.ts.ejs +6 -0
- package/generators/node-server/templates/server/src/auth/guards/roles.guard.ts.ejs +25 -0
- package/generators/node-server/templates/server/src/auth/index.ts.ejs +8 -0
- package/generators/node-server/templates/server/src/auth/jwt.config.spec.ts.ejs +22 -0
- package/generators/node-server/templates/server/src/auth/jwt.config.ts.ejs +29 -0
- package/generators/node-server/templates/server/src/auth/oauth2.authorities.spec.ts.ejs +24 -0
- package/generators/node-server/templates/server/src/auth/oauth2.authorities.ts.ejs +33 -0
- package/generators/node-server/templates/server/src/auth/oauth2.config.ts.ejs +51 -0
- package/generators/node-server/templates/server/src/auth/passport.jwt.strategy.ts.ejs +45 -0
- package/generators/node-server/templates/server/src/auth/passport.oauth2-bearer.strategy.ts.ejs +32 -0
- package/generators/node-server/templates/server/src/auth/passport.oauth2.strategy.spec.ts.ejs +27 -0
- package/generators/node-server/templates/server/src/auth/passport.oauth2.strategy.ts.ejs +44 -0
- package/generators/node-server/templates/server/src/auth/password-util.ts.ejs +10 -0
- package/generators/node-server/templates/server/src/auth/password.service.ts.ejs +34 -0
- package/generators/node-server/templates/server/src/auth/payload.interface.ts.ejs +14 -0
- package/generators/node-server/templates/server/src/auth/role-type.ts.ejs +7 -0
- package/generators/node-server/templates/server/src/auth/session-user.middleware.ts.ejs +33 -0
- package/generators/node-server/templates/server/src/auth/session.entity.ts.ejs +36 -0
- package/generators/node-server/templates/server/src/auth/session.store.spec.ts.ejs +99 -0
- package/generators/node-server/templates/server/src/auth/session.store.ts.ejs +116 -0
- package/generators/node-server/templates/server/src/auth/user.jwt.controller.ts.ejs +26 -0
- package/generators/node-server/templates/server/src/auth/user.oauth2.controller.ts.ejs +78 -0
- package/generators/node-server/templates/server/src/auth/user.session.controller.ts.ejs +103 -0
- package/generators/node-server/templates/server/src/common/common.module.ts.ejs +19 -0
- package/generators/node-server/templates/server/src/common/database/base.entity.ts.ejs +13 -0
- package/generators/node-server/templates/server/src/common/database/column-transformers.spec.ts.ejs +46 -0
- package/generators/node-server/templates/server/src/common/database/column-transformers.ts.ejs +69 -0
- package/generators/node-server/templates/server/src/common/database/column-types.spec.ts.ejs +21 -0
- package/generators/node-server/templates/server/src/common/database/column-types.ts.ejs +29 -0
- package/generators/node-server/templates/server/src/common/database/pagination.entity.spec.ts.ejs +66 -0
- package/generators/node-server/templates/server/src/common/database/pagination.entity.ts.ejs +108 -0
- package/generators/node-server/templates/server/src/common/dto/base.dto.ts.ejs +19 -0
- package/generators/node-server/templates/server/src/common/errors/error-constants.ts.ejs +10 -0
- package/generators/node-server/templates/server/src/common/errors/problem-details.filter.ts.ejs +63 -0
- package/generators/node-server/templates/server/src/common/errors/problem.exception.ts.ejs +92 -0
- package/generators/node-server/templates/server/src/common/field_validators.ejs +77 -0
- package/generators/node-server/templates/server/src/common/header-util.ts.ejs +105 -0
- package/generators/node-server/templates/server/src/common/interceptors/logging.interceptor.spec.ts.ejs +93 -0
- package/generators/node-server/templates/server/src/common/interceptors/logging.interceptor.ts.ejs +48 -0
- package/generators/node-server/templates/server/src/common/logging.spec.ts.ejs +83 -0
- package/generators/node-server/templates/server/src/common/logging.ts.ejs +129 -0
- package/generators/node-server/templates/server/src/common/metrics.spec.ts.ejs +43 -0
- package/generators/node-server/templates/server/src/common/metrics.ts.ejs +198 -0
- package/generators/node-server/templates/server/src/common/request.ts.ejs +8 -0
- package/generators/node-server/templates/server/src/common/sortable-properties.ts.ejs +43 -0
- package/generators/node-server/templates/server/src/common/updatable-properties.ts.ejs +14 -0
- package/generators/node-server/templates/server/src/config/application-dev.yml.ejs +118 -0
- package/generators/node-server/templates/server/src/config/application-prod.yml.ejs +97 -0
- package/generators/node-server/templates/server/src/config/application-secret-samples.yml.ejs +42 -0
- package/generators/node-server/templates/server/src/config/application-test.yml.ejs +68 -0
- package/generators/node-server/templates/server/src/config/application-tls-samples.yml.ejs +15 -0
- package/generators/node-server/templates/server/src/config/application-tls.yml.ejs +15 -0
- package/generators/node-server/templates/server/src/config/application.yml.ejs +149 -0
- package/generators/node-server/templates/server/src/config.spec.ts.ejs +81 -0
- package/generators/node-server/templates/server/src/config.ts.ejs +255 -0
- package/generators/node-server/templates/server/src/entities/_entityFileName_/_entityFileName_.controller.ts.ejs +178 -0
- package/generators/node-server/templates/server/src/entities/_entityFileName_/_entityFileName_.entity.ts.ejs +110 -0
- package/generators/node-server/templates/server/src/entities/_entityFileName_/_entityFileName_.mapper.ts.ejs +37 -0
- package/generators/node-server/templates/server/src/entities/_entityFileName_/_entityFileName_.module.ts.ejs +14 -0
- package/generators/node-server/templates/server/src/entities/_entityFileName_/_entityFileName_.service.ts.ejs +123 -0
- package/generators/node-server/templates/server/src/entities/_entityFileName_/dto/_entityFileName_.dto.ts.ejs +99 -0
- package/generators/node-server/templates/server/src/mail/mail.module.ts.ejs +49 -0
- package/generators/node-server/templates/server/src/mail/mail.service.spec.ts.ejs +105 -0
- package/generators/node-server/templates/server/src/mail/mail.service.ts.ejs +120 -0
- package/generators/node-server/templates/server/src/main.ts.ejs +114 -0
- package/generators/node-server/templates/server/src/management/api-docs.controller.ts.ejs +27 -0
- package/generators/node-server/templates/server/src/management/api-docs.service.ts.ejs +8 -0
- package/generators/node-server/templates/server/src/management/configuration.controller.ts.ejs +80 -0
- package/generators/node-server/templates/server/src/management/health.controller.spec.ts.ejs +79 -0
- package/generators/node-server/templates/server/src/management/health.controller.ts.ejs +87 -0
- package/generators/node-server/templates/server/src/management/health.module.ts.ejs +9 -0
- package/generators/node-server/templates/server/src/management/loggers.controller.ts.ejs +40 -0
- package/generators/node-server/templates/server/src/management/management.controller.spec.ts.ejs +26 -0
- package/generators/node-server/templates/server/src/management/management.controller.ts.ejs +34 -0
- package/generators/node-server/templates/server/src/management/management.module.ts.ejs +21 -0
- package/generators/node-server/templates/server/src/management/metrics.controller.ts.ejs +85 -0
- package/generators/node-server/templates/server/src/migrations/1570200270081-CreateTables.ts.ejs +64 -0
- package/generators/node-server/templates/server/src/migrations/1570200270082-CreateSessions.ts.ejs +26 -0
- package/generators/node-server/templates/server/src/migrations/1570200490072-SeedUsersRoles.ts.ejs +74 -0
- package/generators/node-server/templates/server/src/migrations/_entityConstraintsMigration_.ts.ejs +40 -0
- package/generators/node-server/templates/server/src/migrations/_entityMigration_.ts.ejs +26 -0
- package/generators/node-server/templates/server/src/migrations/support/schema.ts.ejs +202 -0
- package/generators/node-server/templates/server/src/orm.config.ts.ejs +147 -0
- package/generators/node-server/templates/server/src/registry/consul.service.ts.ejs +70 -0
- package/generators/node-server/templates/server/src/registry/eureka.service.ts.ejs +129 -0
- package/generators/node-server/templates/server/src/swagger.ts.ejs +24 -0
- package/generators/node-server/templates/server/src/tls.ts.ejs +27 -0
- package/generators/node-server/templates/server/src/users/authority.controller.ts.ejs +85 -0
- package/generators/node-server/templates/server/src/users/authority.entity.ts.ejs +22 -0
- package/generators/node-server/templates/server/src/users/dto/authority.dto.ts.ejs +10 -0
- package/generators/node-server/templates/server/src/users/dto/user.dto.ts.ejs +116 -0
- package/generators/node-server/templates/server/src/users/public.user.controller.ts.ejs +51 -0
- package/generators/node-server/templates/server/src/users/user.controller.ts.ejs +191 -0
- package/generators/node-server/templates/server/src/users/user.entity.ts.ejs +63 -0
- package/generators/node-server/templates/server/src/users/user.mapper.ts.ejs +26 -0
- package/generators/node-server/templates/server/src/users/user.module.ts.ejs +19 -0
- package/generators/node-server/templates/server/src/users/user.service.ts.ejs +156 -0
- package/generators/node-server/templates/server/tsconfig.build.json.ejs +9 -0
- package/generators/node-server/templates/server/tsconfig.json.ejs +23 -0
- package/generators/node-server/templates/server/typeorm-migration.ts.ejs +18 -0
- package/generators/node-server/templates/server/vitest.config.e2e.ts.ejs +16 -0
- package/generators/node-server/templates/server/vitest.config.ts.ejs +16 -0
- package/generators/server/command.js +7 -0
- package/generators/server/generator.js +20 -0
- package/generators/server/generators/bootstrap/command.js +5 -0
- package/generators/server/generators/bootstrap/generator.js +15 -0
- package/generators/server/generators/bootstrap/index.js +2 -0
- package/generators/server/index.js +2 -0
- package/package.json +75 -4
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// Jenkinsfile completions for Intellij IDEA
|
|
2
|
+
|
|
3
|
+
def ctx = context(scope: scriptScope())
|
|
4
|
+
contributor(ctx) {
|
|
5
|
+
method(name: 'build', type: 'Object', params: [job:'java.lang.String'], doc: 'Build a job')
|
|
6
|
+
method(name: 'build', type: 'Object', namedParams: [parameter(name: 'job', type: 'java.lang.String'), parameter(name: 'parameters', type: 'Map'), parameter(name: 'propagate', type: 'boolean'), parameter(name: 'quietPeriod', type: 'java.lang.Integer'), parameter(name: 'wait', type: 'boolean'), ], doc: 'Build a job')
|
|
7
|
+
method(name: 'echo', type: 'Object', params: [message:'java.lang.String'], doc: 'Print Message')
|
|
8
|
+
method(name: 'emailext', type: 'Object', namedParams: [parameter(name: 'subject', type: 'java.lang.String'), parameter(name: 'body', type: 'java.lang.String'), parameter(name: 'attachLog', type: 'boolean'), parameter(name: 'attachmentsPattern', type: 'java.lang.String'), parameter(name: 'compressLog', type: 'boolean'), parameter(name: 'mimeType', type: 'java.lang.String'), parameter(name: 'recipientProviders', type: 'Map'), parameter(name: 'replyTo', type: 'java.lang.String'), parameter(name: 'to', type: 'java.lang.String'), ], doc: 'Extended Email')
|
|
9
|
+
method(name: 'emailextrecipients', type: 'Object', params: [recipientProviders:'Map'], doc: 'Extended Email Recipients')
|
|
10
|
+
method(name: 'error', type: 'Object', params: [message:'java.lang.String'], doc: 'Error signal')
|
|
11
|
+
method(name: 'input', type: 'Object', params: [message:'java.lang.String'], doc: 'Wait for interactive input')
|
|
12
|
+
method(name: 'input', type: 'Object', namedParams: [parameter(name: 'message', type: 'java.lang.String'), parameter(name: 'id', type: 'java.lang.String'), parameter(name: 'ok', type: 'java.lang.String'), parameter(name: 'parameters', type: 'Map'), parameter(name: 'submitter', type: 'java.lang.String'), parameter(name: 'submitterParameter', type: 'java.lang.String'), ], doc: 'Wait for interactive input')
|
|
13
|
+
method(name: 'isUnix', type: 'Object', params: [:], doc: 'Checks if running on a Unix-like node')
|
|
14
|
+
method(name: 'library', type: 'Object', params: [identifier:'java.lang.String'], doc: 'Load a shared library on the fly')
|
|
15
|
+
method(name: 'library', type: 'Object', namedParams: [parameter(name: 'identifier', type: 'java.lang.String'), parameter(name: 'retriever', type: 'Map'), ], doc: 'Load a shared library on the fly')
|
|
16
|
+
method(name: 'libraryResource', type: 'Object', params: [resource:'java.lang.String'], doc: 'Load a resource file from a shared library')
|
|
17
|
+
method(name: 'mail', type: 'Object', namedParams: [parameter(name: 'subject', type: 'java.lang.String'), parameter(name: 'body', type: 'java.lang.String'), parameter(name: 'bcc', type: 'java.lang.String'), parameter(name: 'cc', type: 'java.lang.String'), parameter(name: 'charset', type: 'java.lang.String'), parameter(name: 'from', type: 'java.lang.String'), parameter(name: 'mimeType', type: 'java.lang.String'), parameter(name: 'replyTo', type: 'java.lang.String'), parameter(name: 'to', type: 'java.lang.String'), ], doc: 'Mail')
|
|
18
|
+
method(name: 'milestone', type: 'Object', params: [ordinal:'java.lang.Integer'], doc: 'The milestone step forces all builds to go through in order')
|
|
19
|
+
method(name: 'milestone', type: 'Object', namedParams: [parameter(name: 'ordinal', type: 'java.lang.Integer'), parameter(name: 'label', type: 'java.lang.String'), ], doc: 'The milestone step forces all builds to go through in order')
|
|
20
|
+
method(name: 'properties', type: 'Object', params: [properties:'Map'], doc: 'Set job properties')
|
|
21
|
+
method(name: 'readTrusted', type: 'Object', params: [path:'java.lang.String'], doc: 'Read trusted file from SCM')
|
|
22
|
+
method(name: 'resolveScm', type: 'Object', namedParams: [parameter(name: 'source', type: 'Map'), parameter(name: 'targets', type: 'Map'), parameter(name: 'ignoreErrors', type: 'boolean'), ], doc: 'Resolves an SCM from an SCM Source and a list of candidate target branch names')
|
|
23
|
+
method(name: 'retry', type: 'Object', params: [count:int, body:'Closure'], doc: 'Retry the body up to N times')
|
|
24
|
+
method(name: 'script', type: 'Object', params: [body:'Closure'], doc: 'Run arbitrary Pipeline script')
|
|
25
|
+
method(name: 'sleep', type: 'Object', params: [time:'int'], doc: 'Sleep')
|
|
26
|
+
method(name: 'sleep', type: 'Object', namedParams: [parameter(name: 'time', type: 'int'), parameter(name: 'unit', type: 'java.util.concurrent.TimeUnit'), ], doc: 'Sleep')
|
|
27
|
+
method(name: 'stage', type: 'Object', params: [name:java.lang.String, body:'Closure'], doc: 'Stage')
|
|
28
|
+
method(name: 'stage', type: 'Object', params: [body:Closure], namedParams: [parameter(name: 'name', type: 'java.lang.String'), parameter(name: 'concurrency', type: 'java.lang.Integer'), ], doc: 'Stage')
|
|
29
|
+
method(name: 'timeout', type: 'Object', params: [time:int, body:'Closure'], doc: 'Enforce time limit')
|
|
30
|
+
method(name: 'timeout', type: 'Object', params: [body:Closure], namedParams: [parameter(name: 'time', type: 'int'), parameter(name: 'unit', type: 'java.util.concurrent.TimeUnit'), ], doc: 'Enforce time limit')
|
|
31
|
+
method(name: 'timestamps', type: 'Object', params: [body:'Closure'], doc: 'Timestamps')
|
|
32
|
+
method(name: 'tool', type: 'Object', params: [name:'java.lang.String'], doc: 'Use a tool from a predefined Tool Installation')
|
|
33
|
+
method(name: 'tool', type: 'Object', namedParams: [parameter(name: 'name', type: 'java.lang.String'), parameter(name: 'type', type: 'java.lang.String'), ], doc: 'Use a tool from a predefined Tool Installation')
|
|
34
|
+
method(name: 'waitUntil', type: 'Object', params: [body:'Closure'], doc: 'Wait for condition')
|
|
35
|
+
method(name: 'withEnv', type: 'Object', params: [overrides:Map, body:'Closure'], doc: 'Set environment variables')
|
|
36
|
+
method(name: 'ws', type: 'Object', params: [dir:java.lang.String, body:'Closure'], doc: 'Allocate workspace')
|
|
37
|
+
method(name: 'catchError', type: 'Object', params: [body:'Closure'], doc: 'Advanced/Deprecated Catch error and set build result')
|
|
38
|
+
method(name: 'dockerFingerprintRun', type: 'Object', params: [containerId:'java.lang.String'], doc: 'Advanced/Deprecated Record trace of a Docker image run in a container')
|
|
39
|
+
method(name: 'dockerFingerprintRun', type: 'Object', namedParams: [parameter(name: 'containerId', type: 'java.lang.String'), parameter(name: 'toolName', type: 'java.lang.String'), ], doc: 'Record trace of a Docker image run in a container')
|
|
40
|
+
method(name: 'envVarsForTool', type: 'Object', namedParams: [parameter(name: 'toolId', type: 'java.lang.String'), parameter(name: 'toolVersion', type: 'java.lang.String'), ], doc: 'Fetches the environment variables for a given tool in a list of \'FOO=bar\' strings suitable for the withEnv step.')
|
|
41
|
+
method(name: 'getContext', type: 'Object', params: [type:'Map'], doc: 'Advanced/Deprecated Get contextual object from internal APIs')
|
|
42
|
+
method(name: 'withContext', type: 'Object', params: [context:java.lang.Object, body:'Closure'], doc: 'Advanced/Deprecated Use contextual object from internal APIs within a block')
|
|
43
|
+
property(name: 'docker', type: 'org.jenkinsci.plugins.docker.workflow.DockerDSL')
|
|
44
|
+
property(name: 'pipeline', type: 'org.jenkinsci.plugins.pipeline.modeldefinition.ModelStepLoader')
|
|
45
|
+
property(name: 'env', type: 'org.jenkinsci.plugins.workflow.cps.EnvActionImpl.Binder')
|
|
46
|
+
property(name: 'params', type: 'org.jenkinsci.plugins.workflow.cps.ParamsVariable')
|
|
47
|
+
property(name: 'currentBuild', type: 'org.jenkinsci.plugins.workflow.cps.RunWrapperBinder')
|
|
48
|
+
property(name: 'scm', type: 'org.jenkinsci.plugins.workflow.multibranch.SCMVar')
|
|
49
|
+
}
|
|
50
|
+
//Steps that require a node context
|
|
51
|
+
def nodeCtx = context(scope: closureScope())
|
|
52
|
+
contributor(nodeCtx) {
|
|
53
|
+
def call = enclosingCall('node')
|
|
54
|
+
if (call) {
|
|
55
|
+
method(name: 'bat', type: 'Object', params: [script:'java.lang.String'], doc: 'Windows Batch Script')
|
|
56
|
+
method(name: 'bat', type: 'Object', namedParams: [parameter(name: 'script', type: 'java.lang.String'), parameter(name: 'encoding', type: 'java.lang.String'), parameter(name: 'returnStatus', type: 'boolean'), parameter(name: 'returnStdout', type: 'boolean'), ], doc: 'Windows Batch Script')
|
|
57
|
+
method(name: 'checkout', type: 'Object', params: [scm:'Map'], doc: 'General SCM')
|
|
58
|
+
method(name: 'checkout', type: 'Object', namedParams: [parameter(name: 'scm', type: 'Map'), parameter(name: 'changelog', type: 'boolean'), parameter(name: 'poll', type: 'boolean'), ], doc: 'General SCM')
|
|
59
|
+
method(name: 'deleteDir', type: 'Object', params: [:], doc: 'Recursively delete the current directory from the workspace')
|
|
60
|
+
method(name: 'dir', type: 'Object', params: [path:java.lang.String, body:'Closure'], doc: 'Change current directory')
|
|
61
|
+
method(name: 'fileExists', type: 'Object', params: [file:'java.lang.String'], doc: 'Verify if file exists in workspace')
|
|
62
|
+
method(name: 'git', type: 'Object', params: [url:'java.lang.String'], doc: 'Git')
|
|
63
|
+
method(name: 'git', type: 'Object', namedParams: [parameter(name: 'url', type: 'java.lang.String'), parameter(name: 'branch', type: 'java.lang.String'), parameter(name: 'changelog', type: 'boolean'), parameter(name: 'credentialsId', type: 'java.lang.String'), parameter(name: 'poll', type: 'boolean'), ], doc: 'Git')
|
|
64
|
+
method(name: 'load', type: 'Object', params: [path:'java.lang.String'], doc: 'Evaluate a Groovy source file into the Pipeline script')
|
|
65
|
+
method(name: 'pwd', type: 'Object', params: [:], doc: 'Determine current directory')
|
|
66
|
+
method(name: 'pwd', type: 'Object', namedParams: [parameter(name: 'tmp', type: 'boolean'), ], doc: 'Determine current directory')
|
|
67
|
+
method(name: 'readFile', type: 'Object', params: [file:'java.lang.String'], doc: 'Read file from workspace')
|
|
68
|
+
method(name: 'readFile', type: 'Object', namedParams: [parameter(name: 'file', type: 'java.lang.String'), parameter(name: 'encoding', type: 'java.lang.String'), ], doc: 'Read file from workspace')
|
|
69
|
+
method(name: 'sh', type: 'Object', params: [script:'java.lang.String'], doc: 'Shell Script')
|
|
70
|
+
method(name: 'sh', type: 'Object', namedParams: [parameter(name: 'script', type: 'java.lang.String'), parameter(name: 'encoding', type: 'java.lang.String'), parameter(name: 'returnStatus', type: 'boolean'), parameter(name: 'returnStdout', type: 'boolean'), ], doc: 'Shell Script')
|
|
71
|
+
method(name: 'stash', type: 'Object', params: [name:'java.lang.String'], doc: 'Stash some files to be used later in the build')
|
|
72
|
+
method(name: 'stash', type: 'Object', namedParams: [parameter(name: 'name', type: 'java.lang.String'), parameter(name: 'excludes', type: 'java.lang.String'), parameter(name: 'includes', type: 'java.lang.String'), parameter(name: 'useDefaultExcludes', type: 'boolean'), ], doc: 'Stash some files to be used later in the build')
|
|
73
|
+
method(name: 'step', type: 'Object', params: [delegate:'Map'], doc: 'General Build Step')
|
|
74
|
+
method(name: 'svn', type: 'Object', params: [url:'java.lang.String'], doc: 'Subversion')
|
|
75
|
+
method(name: 'svn', type: 'Object', namedParams: [parameter(name: 'url', type: 'java.lang.String'), parameter(name: 'changelog', type: 'boolean'), parameter(name: 'poll', type: 'boolean'), ], doc: 'Subversion')
|
|
76
|
+
method(name: 'unstash', type: 'Object', params: [name:'java.lang.String'], doc: 'Restore files previously stashed')
|
|
77
|
+
method(name: 'withCredentials', type: 'Object', params: [bindings:Map, body:'Closure'], doc: 'Bind credentials to variables')
|
|
78
|
+
method(name: 'wrap', type: 'Object', params: [delegate:Map, body:'Closure'], doc: 'General Build Wrapper')
|
|
79
|
+
method(name: 'writeFile', type: 'Object', namedParams: [parameter(name: 'file', type: 'java.lang.String'), parameter(name: 'text', type: 'java.lang.String'), parameter(name: 'encoding', type: 'java.lang.String'), ], doc: 'Write file to workspace')
|
|
80
|
+
method(name: 'archive', type: 'Object', params: [includes:'java.lang.String'], doc: 'Advanced/Deprecated Archive artifacts')
|
|
81
|
+
method(name: 'archive', type: 'Object', namedParams: [parameter(name: 'includes', type: 'java.lang.String'), parameter(name: 'excludes', type: 'java.lang.String'), ], doc: 'Archive artifacts')
|
|
82
|
+
method(name: 'dockerFingerprintFrom', type: 'Object', namedParams: [parameter(name: 'dockerfile', type: 'java.lang.String'), parameter(name: 'image', type: 'java.lang.String'), parameter(name: 'toolName', type: 'java.lang.String'), ], doc: 'Record trace of a Docker image used in FROM')
|
|
83
|
+
method(name: 'unarchive', type: 'Object', params: [:], doc: 'Advanced/Deprecated Copy archived artifacts into the workspace')
|
|
84
|
+
method(name: 'unarchive', type: 'Object', namedParams: [parameter(name: 'mapping', type: 'Map'), ], doc: 'Copy archived artifacts into the workspace')
|
|
85
|
+
method(name: 'withDockerContainer', type: 'Object', params: [image:java.lang.String, body:'Closure'], doc: 'Advanced/Deprecated Run build steps inside a Docker container')
|
|
86
|
+
method(name: 'withDockerContainer', type: 'Object', params: [body:Closure], namedParams: [parameter(name: 'image', type: 'java.lang.String'), parameter(name: 'args', type: 'java.lang.String'), parameter(name: 'toolName', type: 'java.lang.String'), ], doc: 'Run build steps inside a Docker container')
|
|
87
|
+
method(name: 'withDockerRegistry', type: 'Object', params: [registry:Map, body:'Closure'], doc: 'Advanced/Deprecated Sets up Docker registry endpoint')
|
|
88
|
+
method(name: 'withDockerServer', type: 'Object', params: [server:Map, body:'Closure'], doc: 'Advanced/Deprecated Sets up Docker server endpoint')
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<%#
|
|
2
|
+
Copyright 2019-2023 the original author or authors from the JHipster project.
|
|
3
|
+
|
|
4
|
+
This file is part of the JHipster project, see https://www.jhipster.tech/
|
|
5
|
+
for more information.
|
|
6
|
+
|
|
7
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
you may not use this file except in compliance with the License.
|
|
9
|
+
You may obtain a copy of the License at
|
|
10
|
+
|
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
|
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
See the License for the specific language governing permissions and
|
|
17
|
+
limitations under the License.
|
|
18
|
+
-%>
|
|
19
|
+
version: '2'
|
|
20
|
+
services:
|
|
21
|
+
jenkins:
|
|
22
|
+
image: <%= DOCKER_JENKINS %>
|
|
23
|
+
ports:
|
|
24
|
+
- 49001:8080
|
|
25
|
+
- 50000:50000
|
|
26
|
+
# uncomment for docker in docker
|
|
27
|
+
#privileged: true
|
|
28
|
+
#volumes:
|
|
29
|
+
# enable persistent volume (warning: make sure that the local jenkins_home folder is created)
|
|
30
|
+
#- ~/volumes/jenkins_home:/var/jenkins_home
|
|
31
|
+
# mount docker sock and binary for docker in docker (only works on linux)
|
|
32
|
+
#- /var/run/docker.sock:/var/run/docker.sock
|
|
33
|
+
#- /usr/bin/docker:/usr/bin/docker
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<%#
|
|
2
|
+
Copyright 2019-2023 the original author or authors from the JHipster project.
|
|
3
|
+
|
|
4
|
+
This file is part of the JHipster project, see https://www.jhipster.tech/
|
|
5
|
+
for more information.
|
|
6
|
+
|
|
7
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
you may not use this file except in compliance with the License.
|
|
9
|
+
You may obtain a copy of the License at
|
|
10
|
+
|
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
|
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
See the License for the specific language governing permissions and
|
|
17
|
+
limitations under the License.
|
|
18
|
+
-%>
|
|
19
|
+
# NHipster ci-cd
|
|
20
|
+
os:
|
|
21
|
+
- linux
|
|
22
|
+
services:
|
|
23
|
+
- docker
|
|
24
|
+
language: node_js
|
|
25
|
+
node_js:
|
|
26
|
+
- "<%= NODE_VERSION %>"
|
|
27
|
+
cache:
|
|
28
|
+
directories:
|
|
29
|
+
- node
|
|
30
|
+
- node_modules
|
|
31
|
+
<%_ if (clientPackageManager === 'yarn') { _%>
|
|
32
|
+
- $HOME/.yarn-cache
|
|
33
|
+
<%_ } _%>
|
|
34
|
+
env:
|
|
35
|
+
global:
|
|
36
|
+
- nodeVersion=<%= nodeVersion %>
|
|
37
|
+
- NG_CLI_ANALYTICS="false"
|
|
38
|
+
before_install:
|
|
39
|
+
- sudo /etc/init.d/mysql stop
|
|
40
|
+
- sudo /etc/init.d/postgresql stop
|
|
41
|
+
<%_ if (clientPackageManager === 'npm') { _%>
|
|
42
|
+
- nvm install $NODE_VERSION
|
|
43
|
+
- npm install -g npm
|
|
44
|
+
- node -v
|
|
45
|
+
- npm -v
|
|
46
|
+
<%_ } _%>
|
|
47
|
+
<%_ if (clientPackageManager === 'yarn') { _%>
|
|
48
|
+
# Repo for Yarn
|
|
49
|
+
- curl -o- -L https://yarnpkg.com/install.sh | bash
|
|
50
|
+
- export PATH=$HOME/.yarn/bin:$PATH
|
|
51
|
+
<%_ } _%>
|
|
52
|
+
install:
|
|
53
|
+
- <%= clientPackageManager %> install
|
|
54
|
+
<%_ if (!skipServer) { _%>
|
|
55
|
+
- cd server && <%= clientPackageManager %> install
|
|
56
|
+
script:
|
|
57
|
+
- cd server && <%= clientPackageManager %> run test
|
|
58
|
+
- cd server && <%= clientPackageManager %> run build
|
|
59
|
+
<%_ } _%>
|
|
60
|
+
<%_ if (!skipClient) { _%>
|
|
61
|
+
- <%= clientPackageManager %> run test
|
|
62
|
+
- <%= clientPackageManager %> run build
|
|
63
|
+
<%_ } _%>
|
|
64
|
+
<%_ if (cicdIntegrations.includes('sonar')) { _%>
|
|
65
|
+
# - if [ $TRAVIS_PULL_REQUEST == "false" ]; then ./mvnw -ntp org.jacoco:jacoco-maven-plugin:prepare-agent initialize sonar:sonar <% if (sonarOrga) { %>-Dsonar.organization=<%= sonarOrga %> <% } %>-Dsonar.host.url=<%= sonarUrl %> -Dsonar.login=$SONAR_TOKEN; fi
|
|
66
|
+
<%_ } _%>
|
|
67
|
+
- ./mvnw -ntp verify -Pprod -DskipTests
|
|
68
|
+
<%_ if (cicdIntegrations.includes('heroku')) { _%>
|
|
69
|
+
# - ./mvnw -ntp com.heroku.sdk:heroku-maven-plugin:2.0.5:deploy -DskipTests -Pprod -Dheroku.buildpacks=heroku/jvm -Dheroku.appName=<%= herokuAppName %>
|
|
70
|
+
<%_ } _%>
|
|
71
|
+
notifications:
|
|
72
|
+
webhooks:
|
|
73
|
+
on_success: change # options: [always|never|change] default: always
|
|
74
|
+
on_failure: always # options: [always|never|change] default: always
|
|
75
|
+
on_start: false # default: false
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import BaseApplicationGenerator from 'generator-jhipster/generators/base-application';
|
|
2
|
+
|
|
3
|
+
export default class extends BaseApplicationGenerator {
|
|
4
|
+
constructor(args, opts, features) {
|
|
5
|
+
super(args, opts, { ...features, sbsBlueprint: true });
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
get [BaseApplicationGenerator.POST_WRITING]() {
|
|
9
|
+
return this.asPostWritingTaskGroup({
|
|
10
|
+
async postWritingTemplateTask({ application }) {
|
|
11
|
+
if (application.clientFrameworkAny) {
|
|
12
|
+
const clientPackageJson = this.createStorage(`${application.clientRootDir}package.json`);
|
|
13
|
+
const clientName = clientPackageJson.get('name');
|
|
14
|
+
if (clientName === application.dasherizedBaseName) {
|
|
15
|
+
clientPackageJson.set('name', `${application.dasherizedBaseName}-client`);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import BaseApplicationGenerator from 'generator-jhipster/generators/base-application';
|
|
2
|
+
|
|
3
|
+
import { SERVER_NODEJS_SRC_DIR } from '../../../generator-nodejs-constants.js';
|
|
4
|
+
|
|
5
|
+
export default class extends BaseApplicationGenerator {
|
|
6
|
+
constructor(args, opts, features) {
|
|
7
|
+
super(args, opts, { ...features, sbsBlueprint: true });
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async beforeQueue() {
|
|
11
|
+
// The client uses what the server gives (its built-in entities, user management), also when the client generator
|
|
12
|
+
// runs without the server one.
|
|
13
|
+
await this.dependsOnBootstrap('server');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
get [BaseApplicationGenerator.LOADING]() {
|
|
17
|
+
return this.asLoadingTaskGroup({
|
|
18
|
+
clientFolders({ applicationDefaults }) {
|
|
19
|
+
// The client is a workspace of its own (client/, JHipster derives its src/ and test/ folders), and its build is
|
|
20
|
+
// served by the NodeJS server.
|
|
21
|
+
applicationDefaults({
|
|
22
|
+
clientRootDir: 'client/',
|
|
23
|
+
clientDistDir: `${SERVER_NODEJS_SRC_DIR}/dist/static/`,
|
|
24
|
+
});
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import BaseApplicationGenerator from 'generator-jhipster/generators/base-application';
|
|
2
|
+
|
|
3
|
+
import { SERVER_NODEJS_SRC_DIR } from '../../../generator-nodejs-constants.js';
|
|
4
|
+
|
|
5
|
+
export default class extends BaseApplicationGenerator {
|
|
6
|
+
constructor(args, opts, features) {
|
|
7
|
+
super(args, opts, { ...features, sbsBlueprint: true });
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
get [BaseApplicationGenerator.LOADING]() {
|
|
11
|
+
return this.asLoadingTaskGroup({
|
|
12
|
+
backendType({ applicationDefaults }) {
|
|
13
|
+
// The backend of the application, read by the server and the client generators of JHipster.
|
|
14
|
+
applicationDefaults({
|
|
15
|
+
backendType: 'NodeJS',
|
|
16
|
+
backendTypeJavaAny: false,
|
|
17
|
+
});
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
get [BaseApplicationGenerator.PREPARING]() {
|
|
23
|
+
return this.asPreparingTaskGroup({
|
|
24
|
+
serverI18n({ applicationDefaults }) {
|
|
25
|
+
// The messages of the server (server:i18n, the account mails), next to its sources instead of the Java resources,
|
|
26
|
+
// without their test copies, each language in the file of its language tag, the langKey of the users
|
|
27
|
+
// (messages_pt-br.properties). In the common bootstrap, which the languages command runs too.
|
|
28
|
+
applicationDefaults({
|
|
29
|
+
__override__: true,
|
|
30
|
+
serverI18nDir: ({ generateUserManagement }) => (generateUserManagement ? `${SERVER_NODEJS_SRC_DIR}/src/i18n/` : undefined),
|
|
31
|
+
serverI18nTestDir: undefined,
|
|
32
|
+
serverI18nFileNaming: 'languageTag',
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import BaseApplicationGenerator from 'generator-jhipster/generators/base-application';
|
|
2
|
+
|
|
3
|
+
export default class extends BaseApplicationGenerator {
|
|
4
|
+
constructor(args, opts, features) {
|
|
5
|
+
super(args, opts, { ...features, sbsBlueprint: true });
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
get [BaseApplicationGenerator.PREPARING]() {
|
|
9
|
+
return this.asPreparingTaskGroup({
|
|
10
|
+
async preparingTemplateTask({ application }) {
|
|
11
|
+
// The app service, which docker:bootstrap adds too: the bootstrap alone runs for a deployment.
|
|
12
|
+
if (!application.dockerServices.includes('app')) application.dockerServices.push('app');
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import BaseApplicationGenerator from 'generator-jhipster/generators/base-application';
|
|
2
|
+
import { mutateData } from 'generator-jhipster/utils';
|
|
3
|
+
|
|
4
|
+
/** The database service of the application, when it has one. */
|
|
5
|
+
const databaseServiceOf = ({ databaseTypeSql, databaseTypeMongodb, prodDatabaseType, databaseType }) =>
|
|
6
|
+
databaseTypeSql ? prodDatabaseType : databaseTypeMongodb ? databaseType : undefined;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The docker compose file of the NodeJS application, `app`, as its data: the docker generator merges it into the app.yml
|
|
10
|
+
* it writes, a deployment (JHipster's docker-compose generator) into the app.yml template of JHipster, instead of reading
|
|
11
|
+
* the app.yml of the application.
|
|
12
|
+
*/
|
|
13
|
+
export default class extends BaseApplicationGenerator {
|
|
14
|
+
constructor(args, opts, features) {
|
|
15
|
+
super(args, opts, { ...features, sbsBlueprint: true });
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
get [BaseApplicationGenerator.PREPARING]() {
|
|
19
|
+
return this.asPreparingTaskGroup({
|
|
20
|
+
appService({ application }) {
|
|
21
|
+
// The app service of the NodeJS application, which JHipster prepares (its docker compose file, its service of a
|
|
22
|
+
// deployment) and writes (app.yml) like the one of a Spring Boot application.
|
|
23
|
+
if (!application.dockerServices.includes('app')) application.dockerServices.push('app');
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
get [BaseApplicationGenerator.POST_PREPARING]() {
|
|
29
|
+
return this.asPostPreparingTaskGroup({
|
|
30
|
+
environment({ application }) {
|
|
31
|
+
const database = databaseServiceOf(application);
|
|
32
|
+
// The variables of the application, the hosts named like the services of its docker compose files, like JHipster
|
|
33
|
+
// Spring Boot; a deployment names them with its prefix (notes-postgresql). At POST_PREPARING, like Spring Boot: the
|
|
34
|
+
// derived properties (serviceDiscoveryEureka) are prepared by the other bootstraps during PREPARING.
|
|
35
|
+
mutateData(application.dockerApplicationEnvironment, {
|
|
36
|
+
BACKEND_ENV: 'prod,api-docs,secret-samples',
|
|
37
|
+
...(database ? { DATABASE_HOST: database } : {}),
|
|
38
|
+
...(application.serviceDiscoveryEureka
|
|
39
|
+
? {
|
|
40
|
+
EUREKA_CLIENT_ENABLED: 'true',
|
|
41
|
+
CLOUD_CONFIG_URI: 'http://admin:$${jhipster.registry.password}@jhipster-registry:8761/config',
|
|
42
|
+
}
|
|
43
|
+
: {}),
|
|
44
|
+
...(application.authenticationTypeOauth2 ? { NODE_CLIENT_PROVIDER_OIDC_ISSUER_URI: 'http://keycloak:9080/realms/jhipster' } : {}),
|
|
45
|
+
});
|
|
46
|
+
// The healthcheck of the app service in its docker compose file and in a deployment: the NodeJS image has no bash.
|
|
47
|
+
application.dockerApplicationHealthcheckCommand = `node -e "fetch('http://localhost:${application.serverPort}/management/health').then(r => process.exit(r.ok ? 0 : 1), () => process.exit(1))"`;
|
|
48
|
+
if (database) {
|
|
49
|
+
mutateData(application.dockerDeploymentEnvironment, {
|
|
50
|
+
DATABASE_HOST: `${application.dockerDeploymentServicePrefix}${database}`,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<%#
|
|
2
|
+
Copyright 2019-2023 the original author or authors from the JHipster project.
|
|
3
|
+
|
|
4
|
+
This file is part of the JHipster project, see https://www.jhipster.tech/
|
|
5
|
+
for more information.
|
|
6
|
+
|
|
7
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
you may not use this file except in compliance with the License.
|
|
9
|
+
You may obtain a copy of the License at
|
|
10
|
+
|
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
|
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
See the License for the specific language governing permissions and
|
|
17
|
+
limitations under the License.
|
|
18
|
+
-%>
|
|
19
|
+
# The image, its environment, its ports, its healthcheck and the services it depends on are the data of the docker
|
|
20
|
+
# compose file of the application (generators/docker/generators/bootstrap), merged into this file and into the deployments.
|
|
21
|
+
name: <%= lowercaseBaseName %>
|
|
22
|
+
services:
|
|
23
|
+
app:
|
|
24
|
+
image: <%= lowercaseBaseName %>
|
|
25
|
+
build: ..
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2019-2023 the original author or authors from the JHipster project.
|
|
3
|
+
*
|
|
4
|
+
* This file is part of the JHipster project, see https://www.jhipster.tech/
|
|
5
|
+
* for more information.
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
export const SERVER_NODEJS_SRC_DIR = 'server';
|
|
21
|
+
export const PACKAGE_NAME_NODEJS = 'com.jhipster.node';
|
|
22
|
+
export const CACHE_PROVIDER_NODEJS = 'no';
|
|
23
|
+
export const ENABLE_HIBERNATE_CACHE_NODEJS = false;
|
|
24
|
+
export const WEB_SOCKET_NODEJS = false;
|
|
25
|
+
export const DATABASE_TYPE_NODEJS = 'sql';
|
|
26
|
+
export const DEV_DATABASE_TYPE_NODEJS = 'sqlite';
|
|
27
|
+
export const MONGODB_DATABASE_TYPE_NODEJS = 'mongodb';
|
|
28
|
+
export const SEARCH_ENGINE_NODEJS = false;
|
|
29
|
+
export const MESSAGE_BROKER_NODEJS = false;
|
|
30
|
+
export const SERVICE_DISCOVERY_TYPE_NODEJS = false;
|
|
31
|
+
export const ENABLE_SWAGGER_CODEGEN_NODEJS = false;
|
|
32
|
+
export const BUILD_TOOL_NODEJS = 'maven';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import BaseApplicationGenerator from 'generator-jhipster/generators/base-application';
|
|
2
|
+
|
|
3
|
+
export default class extends BaseApplicationGenerator {
|
|
4
|
+
constructor(args, opts, features) {
|
|
5
|
+
super(args, opts, { ...features, sbsBlueprint: true });
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
get [BaseApplicationGenerator.INITIALIZING]() {
|
|
9
|
+
return this.asInitializingTaskGroup({});
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
get [BaseApplicationGenerator.COMPOSING]() {
|
|
13
|
+
return this.asComposingTaskGroup({
|
|
14
|
+
async composingServerI18n() {
|
|
15
|
+
// The messages of the server in the languages to generate, like java:i18n for a Java backend: generator-jhipster
|
|
16
|
+
// leaves them to the blueprint of another backend. Its serverI18nDir comes from common:bootstrap.
|
|
17
|
+
if (this.jhipsterConfigWithDefaults.skipUserManagement || this.jhipsterConfigWithDefaults.skipServer) return;
|
|
18
|
+
await this.composeWithJHipster('jhipster:server:i18n');
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"home": {
|
|
3
|
+
"title": "Welcome, Node Hipster Official Blueprint!",
|
|
4
|
+
"subtitle": "This is your homepage",
|
|
5
|
+
"logged": {
|
|
6
|
+
"message": "You are logged in as user \"{{username}}\"."
|
|
7
|
+
},
|
|
8
|
+
"question": "If you have any question on JHipster or NHipster:",
|
|
9
|
+
"link": {
|
|
10
|
+
"homepage": "JHipster homepage",
|
|
11
|
+
"stackoverflow": "JHipster on Stack Overflow",
|
|
12
|
+
"bugtracker": "NHipster bug tracker",
|
|
13
|
+
"chat": "NHipster public chat room",
|
|
14
|
+
"follow": "follow @jhipster on Twitter"
|
|
15
|
+
},
|
|
16
|
+
"like": "If you like NHipster, don't forget to give us a star on",
|
|
17
|
+
"github": "GitHub"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"home": {
|
|
3
|
+
"title": "¡Bienvenido, Node Hipster Official Blueprint!",
|
|
4
|
+
"subtitle": "Esta es su página de inicio",
|
|
5
|
+
"logged": {
|
|
6
|
+
"message": "Está conectado como \"{{username}}\"."
|
|
7
|
+
},
|
|
8
|
+
"question": "Si tiene preguntas sobre JHipster or NHipster:",
|
|
9
|
+
"link": {
|
|
10
|
+
"homepage": "Página de inicio de JHipster",
|
|
11
|
+
"stackoverflow": "JHipster en Stack Overflow",
|
|
12
|
+
"bugtracker": "NHipster seguimiento de errores",
|
|
13
|
+
"chat": "Sala de chat pública de NHipster",
|
|
14
|
+
"follow": "contacto @jhipster en Twitter"
|
|
15
|
+
},
|
|
16
|
+
"like": "Si te gusta NHipster, danos una estrella en",
|
|
17
|
+
"github": "GitHub"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"home": {
|
|
3
|
+
"title": "Benvenuto, Node Official Blueprint di JHipster!",
|
|
4
|
+
"subtitle": "Questa è la tua home page",
|
|
5
|
+
"logged": {
|
|
6
|
+
"message": "Autenticato come \"{{username}}\"."
|
|
7
|
+
},
|
|
8
|
+
"question": "In caso di domande su JHipster o su NHipster:",
|
|
9
|
+
"link": {
|
|
10
|
+
"homepage": "Homepage JHipster",
|
|
11
|
+
"stackoverflow": "JHipster su Stack Overflow",
|
|
12
|
+
"bugtracker": "NHipster tracciamento errori",
|
|
13
|
+
"chat": "Chat room pubblica di NHipster",
|
|
14
|
+
"follow": "segui @jhipster su Twitter"
|
|
15
|
+
},
|
|
16
|
+
"like": "Se ti piace NHipster, non dimenticarti di darci una stella su",
|
|
17
|
+
"github": "GitHub"
|
|
18
|
+
}
|
|
19
|
+
}
|