mean-expert-official / loopback-sdk-builder

Tool for auto-generating Software Development Kits (SDKs) for LoopBack
Other
399 stars 175 forks source link

Generated files not getting saved #629

Closed kamal0808 closed 6 years ago

kamal0808 commented 6 years ago

What type of issue are you creating?

What version of this module are you using?

Write other if any:

Please add a description for your issue:

Everything works fine, I get the logs properly for files getting generated, but when I look, the files don't exist. Is because of user permissions to save file? Or is it something else I don't understand. I need help to debug this issue inside the code. I can't figure where in the code the generator generates the files, so that I can go look why there are no errors, but still the files don't appear.

The target directory isn't empty because I already generated files lb-sdk, but something weird has happened now.

Here are the logs:

WARNING: The targeted SDK Directory is not empty, do you want to erase its content? (Y/n) 

Y
Loading Framework angular2
Generating "sdk" for the API endpoint "/api"
Warning: scope UserModel.accessTokens targets class "AccessToken", which is not exposed 
via remoting. The Angular code for this scope won't be generated.
Warning: scope UserModel.roles targets class "Role", which is not exposed 
via remoting. The Angular code for this scope won't be generated.
Warning: scope UserModel.teamModels targets class "TeamModel", which is not exposed 
via remoting. The Angular code for this scope won't be generated.
Warning: scope StoreConfigModel.productModels targets class "ProductModel", which is not exposed 
via remoting. The Angular code for this scope won't be generated.
Warning: scope StoreConfigModel.syncModels targets class "SyncModel", which is not exposed 
via remoting. The Angular code for this scope won't be generated.
Warning: scope StoreConfigModel.inventoryModels targets class "InventoryModel", which is not exposed 
via remoting. The Angular code for this scope won't be generated.
Warning: scope StockOrderLineitemModel.productModel targets class "ProductModel", which is not exposed 
via remoting. The Angular code for this scope won't be generated.
Warning: scope SupplierModel.productModels targets class "ProductModel", which is not exposed 
via remoting. The Angular code for this scope won't be generated.
Removing base directory /apps/warehouse/admin/src/app/shared/lb-sdk
DRIVER:  ng2web
LoopBack SDK Builder: adding UserModel model to SDK
LoopBack SDK Builder: adding GlobalConfigModel model to SDK
LoopBack SDK Builder: adding StoreConfigModel model to SDK
LoopBack SDK Builder: adding StoreModel model to SDK
LoopBack SDK Builder: adding ReportModel model to SDK
LoopBack SDK Builder: adding StockOrderLineitemModel model to SDK
LoopBack SDK Builder: adding SupplierModel model to SDK
LoopBack SDK Builder: adding Container model to SDK
Generating: /apps/warehouse/admin/src/app/shared/lb-sdk/index.ts
Generating: /apps/warehouse/admin/src/app/shared/lb-sdk/models/index.ts
Generating: /apps/warehouse/admin/src/app/shared/lb-sdk/services/index.ts
Generating: /apps/warehouse/admin/src/app/shared/lb-sdk/services/custom/index.ts
Generating: /apps/warehouse/admin/src/app/shared/lb-sdk/services/core/index.ts
Generating: /apps/warehouse/admin/src/app/shared/lb-sdk/services/custom/SDKModels.ts
Generating: /apps/warehouse/admin/src/app/shared/lb-sdk/lb.config.ts
Generating: /apps/warehouse/admin/src/app/shared/lb-sdk/models/BaseModels.ts
Generating: /apps/warehouse/admin/src/app/shared/lb-sdk/services/core/auth.service.ts
Generating: /apps/warehouse/admin/src/app/shared/lb-sdk/services/core/base.service.ts
Generating: /apps/warehouse/admin/src/app/shared/lb-sdk/services/core/error.service.ts
Generating: /apps/warehouse/admin/src/app/shared/lb-sdk/services/custom/logger.service.ts
Generating: /apps/warehouse/admin/src/app/shared/lb-sdk/storage/storage.swaps.ts
Generating: /apps/warehouse/admin/src/app/shared/lb-sdk/storage/cookie.browser.ts
Generating: /apps/warehouse/admin/src/app/shared/lb-sdk/storage/storage.browser.ts
Generating: /apps/warehouse/admin/src/app/shared/lb-sdk/models/UserModel.ts
Generating: /apps/warehouse/admin/src/app/shared/lb-sdk/services/custom/UserModel.ts
Generating: /apps/warehouse/admin/src/app/shared/lb-sdk/models/GlobalConfigModel.ts
Generating: /apps/warehouse/admin/src/app/shared/lb-sdk/services/custom/GlobalConfigModel.ts
Generating: /apps/warehouse/admin/src/app/shared/lb-sdk/models/StoreConfigModel.ts
Generating: /apps/warehouse/admin/src/app/shared/lb-sdk/services/custom/StoreConfigModel.ts
Generating: /apps/warehouse/admin/src/app/shared/lb-sdk/models/StoreModel.ts
Generating: /apps/warehouse/admin/src/app/shared/lb-sdk/services/custom/StoreModel.ts
Generating: /apps/warehouse/admin/src/app/shared/lb-sdk/models/ReportModel.ts
Generating: /apps/warehouse/admin/src/app/shared/lb-sdk/services/custom/ReportModel.ts
Generating: /apps/warehouse/admin/src/app/shared/lb-sdk/models/StockOrderLineitemModel.ts
Generating: /apps/warehouse/admin/src/app/shared/lb-sdk/services/custom/StockOrderLineitemModel.ts
Generating: /apps/warehouse/admin/src/app/shared/lb-sdk/models/SupplierModel.ts
Generating: /apps/warehouse/admin/src/app/shared/lb-sdk/services/custom/SupplierModel.ts
Generating: /apps/warehouse/admin/src/app/shared/lb-sdk/models/Container.ts
Generating: /apps/warehouse/admin/src/app/shared/lb-sdk/services/custom/Container.ts

Enjoy!!!
npm info lifecycle shoppinpal-warehouse-mongo@1.5.6~postangular2-sdk: shoppinpal-warehouse-mongo@1.5.6
npm info ok 
kamal0808 commented 6 years ago

My bad, it was an issue due to docker-compose volume mounting. Will close this issue.