xiges / jhipster-generator-firebase

Jhipster generator for firebase
Apache License 2.0
3 stars 4 forks source link

cannot get the generator run #4

Open codezork opened 4 years ago

codezork commented 4 years ago

installing: npm i @xiges/generator-jhipster-firebase running: yo @xiges/jhipster-firebase
result: Just found a .yo-rc.json in a parent directory. Setting the project root at: /Users/joerg/git/tdmanager

██████ ██████ ██████ ██████ ██████ ██ ███████ ██████ ██ ██ ██ ██ ██ █ ██ ████ ██ ██
██████ ██ █████ ████ ████ █ █ ███████ ████
██ ██ ██ ██ ██ █ ██ █ ██ █ ██ ██
██ ██████ ██ ██ ██████ ██████ █ █ ███████ ██████

Welcome to the JHipster Firebase generator! v0.0.5

ReferenceError: DEFAULT_FIREBASE_TYPE is not defined at module.exports.prompting (/Users/joerg/git/tdmanager/node_modules/@xiges/generator-jhipster-firebase/generators/app/index.js:66:21) at Object. (/Users/joerg/git/tdmanager/node_modules/yeoman-generator/lib/index.js:647:25) at /Users/joerg/git/tdmanager/node_modules/run-async/index.js:47:25 at new Promise () at /Users/joerg/git/tdmanager/node_modules/run-async/index.js:24:19 at self.env.runLoop.add.once.once (/Users/joerg/git/tdmanager/node_modules/yeoman-generator/lib/index.js:648:11) at processImmediate (internal/timers.js:439:21) at process.topLevelDomainCallback (domain.js:131:23)

INFO! Using JHipster version installed globally INFO! Executing jhipster:info INFO! Options: from-cli: true

Just found a .yo-rc.json in a parent directory. Setting the project root at: /Users/joerg/git/tdmanager Welcome to the JHipster Information Sub-Generator

JHipster Version(s)
t-d-manager@0.0.1-SNAPSHOT /Users/joerg/git/tdmanager
├─┬ @xiges/generator-jhipster-firebase@0.0.5
│ └── generator-jhipster@6.8.0  deduped
└── generator-jhipster@6.8.0 
JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
{
  "generator-jhipster": {
    "applicationType": "monolith",
    "gitCompany": "",
    "baseName": "tDManager",
    "packageName": "de.codecentric.tdmanager",
    "packageFolder": "de/codecentric/tdmanager",
    "serverPort": 8088,
    "serviceDiscoveryType": false,
    "authenticationType": "jwt",
    "uaaBaseName": "../uaa",
    "cacheProvider": "ehcache",
    "enableHibernateCache": true,
    "websocket": false,
    "databaseType": "sql",
    "devDatabaseType": "h2Disk",
    "prodDatabaseType": "mysql",
    "searchEngine": false,
    "enableSwaggerCodegen": false,
    "messageBroker": false,
    "buildTool": "maven",
    "useSass": true,
    "clientPackageManager": "npm",
    "testFrameworks": ["gatling", "cucumber", "protractor"],
    "enableTranslation": true,
    "nativeLanguage": "de",
    "languages": ["en", "de"],
    "clientFramework": "angularX",
    "jhiPrefix": "jhi",
    "jhipsterVersion": "6.8.0",
    "jwtSecretKey": "bXktc2VjcmV0LXRva2VuLXRvLWNoYW5nZS1pbi1wcm9kdWN0aW9uLWFuZC10by1rZWVwLWluLWEtc2VjdXJlLXBsYWNl",
    "embeddableLaunchScript": false,
    "clientTheme": "none",
    "creationTimestamp": 1587935854834,
    "entitySuffix": "",
    "dtoSuffix": "DTO",
    "otherModules": [],
    "blueprints": []
  },
  "git-provider": "GitHub",
  "git-company": "codezork",
  "repository-name": "tdmanager"
}

JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions
entity ISP {
  ispName String required minlength(1),
  statId String,
  uiUnit Boolean,
  rolloutDomainList Boolean
}
entity Company {
  companyName String required,
  domain String required
}
entity Domain {
  domain String required,
  logo ImageBlob,
  domainStatus DomainStatus,
  liveStatus LiveStatus,
  type DomainType
}
entity Customer {
  fullName String,
  firstName String required minlength(1),
  lastName String required minlength(1),
  salutation Salutation required,
  email String required pattern(/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/),
  comment String,
  status CustomerStatus,
  insights Boolean required,
  password String required minlength(6),
  autoPassword Boolean,
  role CustomerRole required,
  lastLogin LocalDate
}
entity DKIMSelector {
  dkim String required
}
entity FAQ {
  question String,
  answer String
}
entity ImportLog {
  startImport LocalDate,
  endImport LocalDate,
  fileName String,
  category ImportCategory,
  importStatus ImportStatus
}
entity ExportLog {
  exportedOn LocalDate,
  configuration AnyBlob,
  jar AnyBlob,
  liveStatus LiveStatus
}
entity TimeDim {
  dateValue LocalDate,
  dateISO String,
  year Integer,
  yearName String,
  month Integer,
  monthName String,
  monthAbbrev String,
  weekName String,
  dayOfMonth Integer,
  dayOfYear Integer,
  dayOfWeek Integer,
  dayName String,
  dayAbbrev String,
  weekend Boolean,
  weekDay Boolean,
  holiday Boolean
}
entity Statistics {
  deviceType DeviceType,
  sentCount BigDecimal,
  deliveredCount BigDecimal,
  seenCount BigDecimal,
  viewTime10 BigDecimal,
  viewTime30 BigDecimal,
  viewTime60 BigDecimal,
  viewTime300 BigDecimal,
  viewTimePlus BigDecimal
}
enum DomainStatus {
  INACTIVE,
  ACTIVE
}
enum LiveStatus {
  PRELIVE,
  LIVE
}
enum DomainType {
  DOMAIN,
  BOUNCE,
  ITAG
}
enum Salutation {
  MR,
  MRS
}
enum CustomerStatus {
  CUSTOMER,
  TEST
}
enum CustomerRole {
  ADMIN,
  EDITOR,
  CUSTOMER
}
enum ImportCategory {
  ANALYSIS,
  H_CLUSTER,
  CAPACITY
}
enum ImportStatus {
  IMPORTED,
  DUPLICATE,
  NOT_FINISHED,
  MISSING_FILE
}
enum DeviceType {
  DESKTOP,
  TABLET,
  MOBILE
}

relationship ManyToOne {
  Domain{isp(ispName)} to ISP,
  Domain{company(companyName)} to Company,
  Customer{company(companyName)} to Company,
  Customer{master(fullName)} to Customer,
  DKIMSelector{domain(domain)} to Domain,
  ImportLog{domain(domain)} to Domain,
  ExportLog{domain(domain)} to Domain,
  Statistics{timeTheDay(dateValue)} to TimeDim,
  Statistics{isp(ispName)} to ISP,
  Statistics{domain(domain)} to Domain
}

paginate Customer with infinite-scroll
paginate Statistics with pagination

Environment and Tools

openjdk version "11.0.6" 2020-01-14 OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10) OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.6+10, mixed mode)

git version 2.23.0

node: v12.13.0

npm: 6.12.0

yeoman: 3.1.1

yarn: 1.22.4

Docker version 19.03.8, build afacb8b

docker-compose version 1.25.4, build 8d51620a

INFO! Congratulations, JHipster execution is complete!

abhirathod commented 4 years ago

There are some syntactical issues...

\node_modules\@xiges\generator-jhipster-firebase\generators\app\index.js Constants name mismatch **Line 9** must be replaced with below: `const DEFAULT_FIREBASE_TYPE = 'FCM';` Still one will face below errors: ` Welcome to the JHipster Firebase generator! v0.0.5 ? Which *type* of would you like to add? Firebase Cloud Messaging ? Please enter your Firebase server key... 1234bcnxbc ? Please enter your Firebase API URL... https://fcm.googleapis.com/fcm/send TypeError: Cannot read property 'firebaseType' of undefined at \node_modules\@xiges\generator-jhipster-firebase\generators\app\index.js:96:48 at processTicksAndRejections (internal/process/task_queues.js:94:5)` I think class needs to have below properties: - firebaseType - firebaseServerKey - firebaseApiURL