Pocketbase

Latest version: v0.10.1

Safety actively analyzes 623092 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 7

0.21.1

- Manually update the verified state of the current matching `AuthStore` model on successful "confirm-verification" call.

- Manually clear the current matching `AuthStore` on "confirm-email-change" call because previous tokens are always invalidated.

- Updated the `fetch` mock tests to check also the sent body params.

- Formatted the source and tests with prettier.

0.21.0

**⚠️ This release works only with PocketBase v0.21.0+ due to changes of how the `multipart/form-data` body is handled.**

- Properly sent json body with `multipart/form-data` requests.
_This should fix the edge cases mentioned in the v0.20.3 release._

- Gracefully handle OAuth2 redirect error with the `authWithOAuth2()` call.

0.20.3

- Partial and temporary workaround for the auto `application/json` -> `multipart/form-data` request serialization of a `json` field when a `Blob`/`File` is found in the request body ([274](https://github.com/pocketbase/js-sdk/issues/274)).

The "fix" is partial because there are still 2 edge cases that are not handled - when a `json` field value is empty array (eg. `[]`) or array of strings (eg. `["a","b"]`).
The reason for this is because the SDK doesn't have information about the field types and doesn't know which field is a `json` or an arrayable `select`, `file` or `relation`, so it can't serialize it properly on its own as `FormData` string value.

If you are having troubles with persisting `json` values as part of a `multipart/form-data` request the easiest fix for now is to manually stringify the `json` field value:
js
await pb.collection("example").create({
// having a Blob/File as object value will convert the request to multipart/form-data
"someFileField": new Blob([123]),
"someJsonField": JSON.stringify(["a","b","c"]),
})


A proper fix for this will be implemented with PocketBase v0.21.0 where we'll have support for a special `jsonPayload` multipart body key, which will allow us to submit mixed `multipart/form-data` content (_kindof similar to the `multipart/mixed` MIME_).

0.20.2

- Throw 404 error for `getOne("")` when invoked with empty id ([271](https://github.com/pocketbase/js-sdk/issues/271)).

- Added `throw {ClientResponseError}` jsdoc annotation to the regular request methods ([262](https://github.com/pocketbase/js-sdk/issues/262)).

0.20.1

- Propagate the `PB_CONNECT` event to allow listening to the realtime connect/reconnect events.
js
pb.realtime.subscribe("PB_CONNECT", (e) => {
console.log(e.clientId);
})

0.20.0

- Added `expand`, `filter`, `fields`, custom query and headers parameters support for the realtime subscriptions.
js
pb.collection("example").subscribe("*", (e) => {
...
}, { filter: "someField > 10" });

_This works only with PocketBase v0.20.0+._

- Changes to the logs service methods in relation to the logs generalization in PocketBase v0.20.0+:
js
pb.logs.getRequestsList(...) -> pb.logs.getList(...)
pb.logs.getRequest(...) -> pb.logs.getOne(...)
pb.logs.getRequestsStats(...) -> pb.logs.getStats(...)


- Added missing `SchemaField.presentable` field.

- Added new `AuthProviderInfo.displayName` string field.

- Added new `AuthMethodsList.onlyVerified` bool field.

Page 1 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.