Closed querielo closed 2 years ago
What's the context of the PR? I can see a function being added but not used anywhere? 😅
It can be used like this to create a new checkpoint
await api.methodPost(`/checkpoints`, "/api", true, {
branchId: PLAYCANVAS_BRANCH_ID,
description: "My awesome checkpoint",
projectId: PLAYCANVAS_PROJECT_ID,
});
For the purposes of a PR, I'm a bit hesitant to merge code that isn't used as it's quite confusing (why do we have an internal function that isn't used anywhere?)
Do you have plans to use this function in a future PR? If so, I would prefer this to be merged with these changes so it's all in the same context.
@yaustar But aren't the functions in api
for devs who want to programmatically drive pc-sync with Node? So I'm not sure it's right to say they're internal.
@yaustar But aren't the functions in
api
for devs who want to programmatically drive pc-sync with Node? So I'm not sure it's right to say they're internal.
Not really sure about the direction to go here as pc-sync wasn't meant to be a library to be built on top of programmatically.
We could change direction so that it is one and create a public API so that we have a default scripts to do things like push/pull etc
And/Or convert this to a NPM package so that it can used as a library in projects.
The main reason to use pc-sync as a library is ability to create a custom development pipeline with ESNext, Typescript, Eslint, Prettier, CI/CD, review processes and so on.
Sounds good. Thanks for the contribution, @querielo! Merging...
It can be used as
await api.methodPost(PATH, PREF, true, payload);