question

ryansurv avatar image
ryansurv asked coder12 edited

Clover with Angular

Forgive me if I sound ignorant, but Clover is auto-generating files with "Avro" that do not declare objects which fails strict mode with Angular. Is there something I am doing wrong or is this something that can be fixed?

example:

/**
 * Autogenerated by Avro
 * 
 * DO NOT EDIT DIRECTLY
 */

...

AppExclusionType = {
  ALL : "ALL",
  MARKET : "MARKET",
  SEARCH : "SEARCH",
  INSTALL : "INSTALL"
};


edit: This is coming from remote-pay-cloud-api

Remote Pay Cloud
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated commented

It sounds like something we should probably fix. Would you be willing to provide a simple repo with instructions on reproducing the issue?

20 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ryansurv avatar image ryansurv commented ·

Hello David! Thanks for the response. Simply installing remote-pay-cloud in an Angular app should reproduce the issue, I'm using Angular v8.1.3.

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ ryansurv commented ·

Sorry, I haven't worked with Angular in years. Should I use the CLI, create a project with strict mode enabled and then install rpc?

0 Likes 0 ·
ryansurv avatar image ryansurv David Marginian ♦♦ commented ·

Yes sir! That should work.

0 Likes 0 ·
Show more comments
David Marginian avatar image
David Marginian Deactivated answered coder12 edited

I looked into this in more depth and the root cause is that our typings file was incorrectly referencing source. The end result was that the TypeScript compiler was recompiling our source when building your project - this is obviously not ideal. I have fixed our typings and will let you know when we will be releasing the fix.

Update:

I just pushed an updated version 4.0.2 of Remote Pay Cloud that addresses the typings issue. Please give it a shot and let me know.


1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

coder12 avatar image coder12 commented ·

Hi, I am still running into the issue where I get the following error when running my angular project with the remote cloud pay api:

Uncaught ReferenceError: AppExclusionType is not defined.

I am using the following version:

"remote-pay-cloud": "4.0.5",
"remote-pay-cloud-api": "4.0.5",
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community