icloud.js icon indicating copy to clipboard operation
icloud.js copied to clipboard

Make logging optional

Open WeeJeWel opened this issue 1 year ago • 9 comments

Thank you for this amazing library!

I'm working on a CLI utility to automate downloading iCloud Drive to a NAS.

Can the console.debug entries be replaced by the debug module, or a options.debug = console.debug parameter, so it can be disabled?

Thank you!

WeeJeWel avatar Aug 25 '24 09:08 WeeJeWel

Fixed in 622f66c6a5994a1583c2cc8be9958ca34da9135d. npm isn't letting me publish right now for some reason so it's not on there just yet.

foxt avatar Aug 25 '24 15:08 foxt

Wow, that was fast! Thank you! 🙏🏻

WeeJeWel avatar Aug 25 '24 15:08 WeeJeWel

@foxt Could you retry publishing to npm please?

WeeJeWel avatar Aug 30 '24 19:08 WeeJeWel

thanks for the reminder, should be up now.

foxt avatar Aug 31 '24 00:08 foxt

Awesome, thank you!

WeeJeWel avatar Aug 31 '24 16:08 WeeJeWel

There seems to be a new bug:

TypeError: this.log is not a function
    at iCloudAuthenticationStore.loadTrustToken (/Users/emile/Git/@weejewel/node-icloud-backup/node_modules/icloudjs/build/auth/authStore.js:49:18)
    at iCloudService.authenticate (/Users/emile/Git/@weejewel/node-icloud-backup/node_modules/icloudjs/build/index.js:164:24)
    at iCloudBackup.authenticate (file:///Users/emile/Git/@weejewel/node-icloud-backup/lib/iCloudBackup.mjs:63:20)
    at async iCloudBackup.backupDrive (file:///Users/emile/Git/@weejewel/node-icloud-backup/lib/iCloudBackup.mjs:84:5)
    at async Promise.all (index 0)
    at async file:///Users/emile/Git/@weejewel/node-icloud-backup/bin/icloud-backup.mjs:30:1

WeeJeWel avatar Aug 31 '24 16:08 WeeJeWel

There seems to be a new bug:

TypeError: this.log is not a function
    at iCloudAuthenticationStore.loadTrustToken (/Users/emile/Git/@weejewel/node-icloud-backup/node_modules/icloudjs/build/auth/authStore.js:49:18)
    at iCloudService.authenticate (/Users/emile/Git/@weejewel/node-icloud-backup/node_modules/icloudjs/build/index.js:164:24)
    at iCloudBackup.authenticate (file:///Users/emile/Git/@weejewel/node-icloud-backup/lib/iCloudBackup.mjs:63:20)
    at async iCloudBackup.backupDrive (file:///Users/emile/Git/@weejewel/node-icloud-backup/lib/iCloudBackup.mjs:84:5)
    at async Promise.all (index 0)
    at async file:///Users/emile/Git/@weejewel/node-icloud-backup/bin/icloud-backup.mjs:30:1

I am also getting this error on 1.6.1.

constancebello avatar Nov 19 '24 15:11 constancebello

The patch results in an error when trying to login: Uncaught TypeError: this.log is not a function Because the log function is declared on iCloudStore but not on iCloudAuthenticationStore.

MarSoft avatar Dec 14 '24 16:12 MarSoft

hi all, apologies it took so long,

can you try again with 1.6.2

(and in the meantime i'll see if i can refactor and enable ts strict mode 😬)

foxt avatar Dec 19 '24 20:12 foxt