Socket
Socket
Sign inDemoInstall

pocketbase

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pocketbase - npm Package Versions

13
9

0.20.1

Diff

Changelog

Source

0.20.1

  • Propagate the PB_CONNECT event to allow listening to the realtime connect/reconnect events.
    pb.realtime.subscribe("PB_CONNECT", (e) => {
      console.log(e.clientId);
    })
    
gani.georgiev
published 0.20.0 •

Changelog

Source

0.20.0

  • Added expand, filter, fields, custom query and headers parameters support for the realtime subscriptions.

    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+:

    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.

gani.georgiev
published 0.20.0-rc3 •

gani.georgiev
published 0.20.0-rc2 •

gani.georgiev
published 0.20.0-rc •

gani.georgiev
published 0.19.0 •

Changelog

Source

0.19.0

  • Added pb.filter(rawExpr, params?) helper to construct a filter string with placeholder parameters populated from an object.

    const record = await pb.collection("example").getList(1, 20, {
      // the same as: "title ~ 'te\\'st' && (totalA = 123 || totalB = 123)"
      filter: pb.filter("title ~ {:title} && (totalA = {:num} || totalB = {:num})", { title: "te'st", num: 123 })
    })
    

    The supported placeholder parameter values are:

    • string (single quotes will be autoescaped)
    • number
    • boolean
    • Date object (will be stringified into the format expected by PocketBase)
    • null
    • anything else is converted to a string using JSON.stringify()
gani.georgiev
published 0.18.3 •

Changelog

Source

0.18.3

  • Added optional generic support for the RecordService (#251). This should allow specifying a single TypeScript definition for the client, eg. using type assertion:
    interface Task {
      id:   string;
      name: string;
    }
    
    interface Post {
      id:     string;
      title:  string;
      active: boolean;
    }
    
    interface TypedPocketBase extends PocketBase {
      collection(idOrName: string): RecordService // default fallback for any other collection
      collection(idOrName: 'tasks'): RecordService<Task>
      collection(idOrName: 'posts'): RecordService<Post>
    }
    
    ...
    
    const pb = new PocketBase("http://127.0.0.1:8090") as TypedPocketBase;
    
    // the same as pb.collection('tasks').getOne<Task>("RECORD_ID")
    await pb.collection('tasks').getOne("RECORD_ID") // -> results in Task
    
    // the same as pb.collection('posts').getOne<Post>("RECORD_ID")
    await pb.collection('posts').getOne("RECORD_ID") // -> results in Post
    
gani.georgiev
published 0.18.2 •

Changelog

Source

0.18.2

  • Added support for assigning a Promise as AsyncAuthStore initial value (#249).
gani.georgiev
published 0.18.1 •

Changelog

Source

0.18.1

  • Fixed realtime subscriptions auto cancellation to use the proper requestKey param.
gani.georgiev
published 0.18.0 •

Changelog

Source

0.18.0

  • Added pb.backups.upload(data) action (available with PocketBase v0.18.0).

  • Added experimental autoRefreshThreshold option to auto refresh (or reauthenticate) the AuthStore when authenticated as admin. This could be used as an alternative to fixed Admin API keys.

    await pb.admins.authWithPassword("test@example.com", "1234567890", {
      // This will trigger auto refresh or auto reauthentication in case
      // the token has expired or is going to expire in the next 30 minutes.
      autoRefreshThreshold: 30 * 60
    })
    
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc