@walkeros/server-source-gcp 4.0.0 → 4.0.1-next-1778183328892

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.
@@ -1,13 +1,15 @@
1
1
  {
2
2
  "$meta": {
3
3
  "package": "@walkeros/server-source-gcp",
4
- "version": "4.0.0",
4
+ "version": "4.0.1-next-1778183328892",
5
5
  "type": "source",
6
6
  "platform": [
7
7
  "server"
8
8
  ],
9
9
  "exports": {
10
- "sourceCloudFunction": "GCP Cloud Function event source"
10
+ "sourceCloudFunction": "GCP Cloud Function event source",
11
+ "sourcePubSubPull": "Pub/Sub pull subscriber (long-running)",
12
+ "sourcePubSubPush": "Pub/Sub push webhook handler (HTTP POST)"
11
13
  },
12
14
  "docs": "https://www.walkeros.io/docs/sources/server/gcp",
13
15
  "source": "https://github.com/elbwalker/walkerOS/tree/main/packages/server/sources/gcp/src"
@@ -94,7 +96,7 @@
94
96
  },
95
97
  "examples": {
96
98
  "createTrigger": {
97
- "$code": "async e=>{let o;return{get flow(){return o},trigger:()=>async t=>{if(!o){const t=await y(e);o={collector:t.collector,elb:t.elb}}const r=function(e){for(const o of Object.values(e.sources||{}))if(\"cloudfunction\"===o.type)return o}(o.collector);if(!r)throw new Error(\"CloudFunction source not found in collector — ensure it is configured in sources\");const n={...t.body};n.name&&!n.event&&(n.event=n.name,delete n.name);const a=t.headers||{\"content-type\":\"application/json\"},i={method:t.method,body:n,headers:a,get:e=>a[e.toLowerCase()]};let s,l=200;const c={status:e=>(l=e,c),json:e=>(s=e,c),send:e=>(s=e,c),set:()=>c};return await r.push(i,c),{status:l,body:s}}}}"
99
+ "$code": "async e=>{let t;return{get flow(){return t},trigger:()=>async o=>{if(!t){const o=await y(e);t={collector:o.collector,elb:o.elb}}const r=function(e){for(const t of Object.values(e.sources||{}))if(\"cloudfunction\"===t.type)return t}(t.collector);if(!r)throw new Error(\"CloudFunction source not found in collector — ensure it is configured in sources\");const s={...o.body};s.name&&!s.event&&(s.event=s.name,delete s.name);const i=o.headers||{\"content-type\":\"application/json\"},n={method:o.method,body:s,headers:i,get:e=>i[e.toLowerCase()]};let a,c=200;const l={status:e=>(c=e,l),json:e=>(a=e,l),send:e=>(a=e,l),set:()=>l};return await r.push(n,l),{status:c,body:a}}}}"
98
100
  },
99
101
  "env": {
100
102
  "push": {
@@ -127,7 +129,7 @@
127
129
  "$code": "()=>{}"
128
130
  },
129
131
  "scope": {
130
- "$code": "()=>b"
132
+ "$code": "()=>f"
131
133
  }
132
134
  }
133
135
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@walkeros/server-source-gcp",
3
- "description": "Google Cloud Platform server sources for walkerOS (Cloud Functions)",
4
- "version": "4.0.0",
3
+ "description": "Google Cloud Platform server sources for walkerOS (Cloud Functions, Pub/Sub)",
4
+ "version": "4.0.1-next-1778183328892",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.mjs",
@@ -19,8 +19,9 @@
19
19
  "update": "npx npm-check-updates -u && npm update"
20
20
  },
21
21
  "dependencies": {
22
- "@walkeros/collector": "4.0.0",
23
- "@walkeros/core": "4.0.0"
22
+ "@google-cloud/pubsub": "^5.3.0",
23
+ "@walkeros/collector": "4.0.1-next-1778183328892",
24
+ "@walkeros/core": "4.0.1-next-1778183328892"
24
25
  },
25
26
  "peerDependencies": {
26
27
  "@google-cloud/functions-framework": "^3.0.0"
@@ -42,7 +43,14 @@
42
43
  ],
43
44
  "docs": "https://www.walkeros.io/docs/sources/server/gcp",
44
45
  "exports": {
45
- "sourceCloudFunction": "GCP Cloud Function event source"
46
+ "sourceCloudFunction": "GCP Cloud Function event source",
47
+ "sourcePubSubPull": "Pub/Sub pull subscriber (long-running)",
48
+ "sourcePubSubPush": "Pub/Sub push webhook handler (HTTP POST)"
49
+ },
50
+ "bundle": {
51
+ "external": [
52
+ "@google-cloud/pubsub"
53
+ ]
46
54
  }
47
55
  },
48
56
  "keywords": [
@@ -52,6 +60,9 @@
52
60
  "server",
53
61
  "gcp",
54
62
  "cloud functions",
63
+ "pubsub",
64
+ "pub-sub",
65
+ "messaging",
55
66
  "analytics"
56
67
  ],
57
68
  "funding": [