n8n-nodes-pocketbase 2.40.1 → 2.40.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/README.md +7 -2
  2. package/dist/credentials/PocketbaseHttpApi.credentials.js.map +1 -1
  3. package/dist/nodes/Common/LoadOptions.js +1 -1
  4. package/dist/nodes/Common/RequestBodyFunctions.js.map +2 -2
  5. package/dist/nodes/PocketbaseHttp/PocketbaseHttp.node.js +1 -1
  6. package/dist/nodes/PocketbaseHttp/PocketbaseHttp.node.js.map +1 -1
  7. package/dist/nodes/PocketbaseTrigger/PocketbaseTrigger.node.js +75 -41
  8. package/dist/nodes/PocketbaseTrigger/PocketbaseTrigger.node.js.map +2 -2
  9. package/dist/package.json +9 -7
  10. package/dist/tests/GenericFunctions.spec.js +1 -3
  11. package/dist/tests/GenericFunctions.spec.js.map +1 -1
  12. package/dist/tests/PocketbaseCredentials.spec.js +3 -1
  13. package/dist/tests/PocketbaseCredentials.spec.js.map +1 -1
  14. package/dist/tests/PocketbaseTrigger.spec.js +163 -34
  15. package/dist/tests/PocketbaseTrigger.spec.js.map +1 -1
  16. package/dist/tests/PocketbaseTriggerIntegration.spec.js +13 -5
  17. package/dist/tests/PocketbaseTriggerIntegration.spec.js.map +1 -1
  18. package/dist/tests/PocketbaseTriggerN8nE2E.spec.d.ts +1 -0
  19. package/dist/tests/PocketbaseTriggerN8nE2E.spec.js +169 -0
  20. package/dist/tests/PocketbaseTriggerN8nE2E.spec.js.map +1 -0
  21. package/dist/tests/PocketbaseTriggerOptionsIntegration.spec.d.ts +1 -0
  22. package/dist/tests/PocketbaseTriggerOptionsIntegration.spec.js +106 -0
  23. package/dist/tests/PocketbaseTriggerOptionsIntegration.spec.js.map +1 -0
  24. package/dist/tests/PocketbaseTriggerReconnectIntegration.spec.d.ts +1 -0
  25. package/dist/tests/PocketbaseTriggerReconnectIntegration.spec.js +133 -0
  26. package/dist/tests/PocketbaseTriggerReconnectIntegration.spec.js.map +1 -0
  27. package/dist/tests/RequestBodyFunctions.spec.js.map +1 -1
  28. package/dist/tsconfig.tsbuildinfo +1 -1
  29. package/package.json +9 -7
package/README.md CHANGED
@@ -41,6 +41,11 @@ Turn on **Download Files** under **Parameters** of View or List/Search to get th
41
41
 
42
42
  This node allows you to subscribe to PocketBase events (create, update, delete) in real-time via Server-Sent Events (SSE).
43
43
 
44
+ - **Options**: **Filter**, **Fields** and **Expand Relations** are applied by PocketBase before an event is sent, so the workflow only starts for the records it needs. The filter uses the same syntax as the List operation, for example `status = 'paid'`.
45
+ - **Testing**: a test run in the editor waits for the first real event from your collection, so create or change a record to finish it.
46
+ - **Dropped connections**: PocketBase closes a stream after five idle minutes. The node reconnects by itself and the workflow stays active. It reports an error, and so makes n8n deactivate the workflow, when PocketBase rejects the credentials (HTTP 400, 401 or 403), or after it has failed to reconnect 50 times in a row. A server that is still starting up, or a refused connection, is simply retried. PocketBase does not replay events, so a change made while the node is reconnecting is not delivered. That gap is usually a second or two, but the retry delay grows to 30 seconds plus jitter during a longer outage.
47
+ - **Invalid filter**: PocketBase only evaluates the filter when an event happens, so it accepts a bad one without an error. The workflow then stays active but never starts. If a filtered trigger stays silent, test the same filter in the List operation.
48
+
44
49
  **Note**: The trigger node is currently in Beta. We've implemented basic reconnection logic, but it may still be sensitive to network interruptions or large amounts of data. Please use with caution in production.
45
50
 
46
51
  ## Credentials
@@ -56,7 +61,7 @@ Alternatively, you can use your administrator account and the "\_superusers" col
56
61
  When a new n8n or PocketBase version comes out, a nightly job runs the integration tests against it and releases an update once they pass.
57
62
 
58
63
  <!-- n8n-node-tooling:compatibility -->
59
- Last tested with n8n 2.46.6 and PocketBase 0.40.6.
64
+ Last tested with n8n 2.47.3 and PocketBase 0.40.6.
60
65
  <!-- /n8n-node-tooling:compatibility -->
61
66
 
62
67
  ## Versioning
@@ -81,7 +86,7 @@ This project uses modern tooling for development:
81
86
  - `npm run lint`: Lint the project.
82
87
  - `npm run format`: Format the project.
83
88
  - `npm test`: Run tests.
84
- - `npm run test:pipeline`: Run a full integration test against a PocketBase instance in Docker.
89
+ - `npm run test:pipeline`: Run a full integration test against a PocketBase instance in Docker. It also publishes a workflow with the Trigger node in a real n8n, drives PocketBase through its API (create, update, delete, a dropped stream) and checks the files that workflow writes.
85
90
 
86
91
  ## Resources
87
92
 
@@ -1 +1 @@
1
- {"version":3,"file":"PocketbaseHttpApi.credentials.js","sourceRoot":"","sources":["../../credentials/PocketbaseHttpApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,iBAAiB;IAA9B;QACE,SAAI,GAAG,mBAAmB,CAAC;QAC3B,gBAAW,GAAG,qBAAqB,CAAC;QACpC,qBAAgB,GAAG,4CAA4C,CAAC;QAChE,eAAU,GAAsB;YAC9B;gBACE,WAAW,EAAE,KAAK;gBAClB,IAAI,EAAE,KAAK;gBACX,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;aACf;YACD;gBACE,WAAW,EAAE,8BAA8B;gBAC3C,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;aACf;YACD;gBACE,WAAW,EAAE,8BAA8B;gBAC3C,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACX,QAAQ,EAAE,IAAI;iBACf;gBACD,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;aACf;SACF,CAAC;QAEF,SAAI,GAA2B;YAC7B,OAAO,EAAE;gBACP,OAAO,EAAE,6CAA6C;gBACtD,GAAG,EAAE,kDAAkD;gBACvD,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE;oBACJ,QAAQ,EAAE,6BAA6B;oBACvC,QAAQ,EAAE,6BAA6B;iBACxC;aACF;YACD,KAAK,EAAE;gBACL;oBACE,IAAI,EAAE,cAAc;oBACpB,UAAU,EAAE;wBACV,KAAK,EAAE,GAAG;wBACV,OAAO,EAAE,MAAM;qBAChB;iBACF;gBACD;oBACE,IAAI,EAAE,cAAc;oBACpB,UAAU,EAAE;wBACV,KAAK,EAAE,GAAG;wBACV,OAAO,EAAE,gCAAgC;qBAC1C;iBACF;aACF;SACF,CAAC;QAEF,SAAI,GAAG,qBAAiC,CAAC;IAC3C,CAAC;CAAA;AA5DD,8CA4DC"}
1
+ {"version":3,"file":"PocketbaseHttpApi.credentials.js","sourceRoot":"","sources":["../../credentials/PocketbaseHttpApi.credentials.ts"],"names":[],"mappings":";;;AAEA,MAAa,iBAAiB;IAA9B;QACE,SAAI,GAAG,mBAAmB,CAAC;QAC3B,gBAAW,GAAG,qBAAqB,CAAC;QACpC,qBAAgB,GAAG,4CAA4C,CAAC;QAChE,eAAU,GAAsB;YAC9B;gBACE,WAAW,EAAE,KAAK;gBAClB,IAAI,EAAE,KAAK;gBACX,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;aACf;YACD;gBACE,WAAW,EAAE,8BAA8B;gBAC3C,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;aACf;YACD;gBACE,WAAW,EAAE,8BAA8B;gBAC3C,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACX,QAAQ,EAAE,IAAI;iBACf;gBACD,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;aACf;SACF,CAAC;QAEF,SAAI,GAA2B;YAC7B,OAAO,EAAE;gBACP,OAAO,EAAE,6CAA6C;gBACtD,GAAG,EAAE,kDAAkD;gBACvD,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE;oBACJ,QAAQ,EAAE,6BAA6B;oBACvC,QAAQ,EAAE,6BAA6B;iBACxC;aACF;YACD,KAAK,EAAE;gBACL;oBACE,IAAI,EAAE,cAAc;oBACpB,UAAU,EAAE;wBACV,KAAK,EAAE,GAAG;wBACV,OAAO,EAAE,MAAM;qBAChB;iBACF;gBACD;oBACE,IAAI,EAAE,cAAc;oBACpB,UAAU,EAAE;wBACV,KAAK,EAAE,GAAG;wBACV,OAAO,EAAE,gCAAgC;qBAC1C;iBACF;aACF;SACF,CAAC;QAEF,SAAI,GAAG,qBAAiC,CAAC;IAC3C,CAAC;CAAA;AA5DD,8CA4DC"}
@@ -140,7 +140,7 @@ exports.LoadOptions = {
140
140
  if (items.length === 0) {
141
141
  return [
142
142
  {
143
- name: 'No Records Found',
143
+ name: "No Records Found",
144
144
  value: "",
145
145
  },
146
146
  ];