Skip to content

Conversation

@tatelax
Copy link

@tatelax tatelax commented Jul 7, 2025

  • Adds binary file support for pcwatch
  • Adds -a & --all argument to sync changes of all file types to and from PlayCanvas for both pcwatch and pcsync

Copy link
Contributor

@willeastcott willeastcott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for the contribution. I think someone else should also cast an eye. @kpal81xd, can you also do a review pass before we merge please?

@tatelax
Copy link
Author

tatelax commented Jul 14, 2025

Sometimes this error is thrown:

/Users/tatemccormick/Documents/Projects/playcanvas-sync/src/utils/common-utils.js:179
            return md5 === remote.file.hash;
                                       ^

TypeError: Cannot read properties of null (reading 'hash')
    at Object.sameHashAsRemote (/Users/tatemccormick/Documents/Projects/playcanvas-sync/src/utils/common-utils.js:179:40)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ComputeDiffAll.handleFileOnBoth (/Users/tatemccormick/Documents/Projects/playcanvas-sync/src/sync-commands/compute-diff-all.js:97:28)
    at async Promise.all (index 49)
    at async ComputeDiffAll.handleAllFiles (/Users/tatemccormick/Documents/Projects/playcanvas-sync/src/sync-commands/compute-diff-all.js:83:9)
    at async ComputeDiffAll.run (/Users/tatemccormick/Documents/Projects/playcanvas-sync/src/sync-commands/compute-diff-all.js:40:9)
    at async reportDiffAll (/Users/tatemccormick/Documents/Projects/playcanvas-sync/src/sync-commands/sync-utils.js:10:19)
    at async Object.wrapUserErrors (/Users/tatemccormick/Documents/Projects/playcanvas-sync/src/utils/common-utils.js:112:20)
    at async Object.compareAndPrompt (/Users/tatemccormick/Documents/Projects/playcanvas-sync/src/sync-commands/sync-utils.js:34:19)

@tatelax
Copy link
Author

tatelax commented Jul 14, 2025

Just pushed an issue that fixes this. One of the util files assumed that a download was a file.

Also, I fixed an issue where pulling changes showed many missing files/directories on local that exist on remote. What actually is happening is that PlayCanvas handles some files as directories (fbx, glb, etc.) but when you download them via API, they download as files.

@tatelax
Copy link
Author

tatelax commented Jul 16, 2025

TODO: Deleting local files that have already been deleted on remote causes crash

Copy link

@kpal81xd kpal81xd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a couple comments for layout but otherwise looks good nice 🙂

@tatelax
Copy link
Author

tatelax commented Jul 17, 2025

TODO: Deleting local files that have already been deleted on remote causes crash

Pushed a fix for this: fabc1a8

@tatelax
Copy link
Author

tatelax commented Jul 17, 2025

#73

I agree with this issue. This PR could include this change. It's a bit confusing to run pcsync pullAll --all.

…eting files calls WatchUtils.reportWatchAction() now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants