@stacksjs/buddy 0.75.171 → 0.75.173
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,2 +1,2 @@
|
|
|
1
|
-
import process from"node:process";export const PROBE_TARGETS=[{name:"FCM HTTP v1",url:"https://fcm.googleapis.com/v1/projects/stacks-probe/messages:send",method:"POST",observed:401},{name:"OpenAI",url:"https://api.openai.com/v1/models",method:"GET",observed:401},{name:"Anthropic",url:"https://api.anthropic.com/v1/messages",method:"POST",observed:401},{name:"SendGrid",url:"https://api.sendgrid.com/v3/mail/send",method:"POST",observed:401},{name:"Twilio",url:"https://api.twilio.com/2010-04-01/Accounts",method:"GET",observed:401},{name:"Twilio Lookups v2",url:"https://lookups.twilio.com/v2/PhoneNumbers/+15005550006",method:"GET",observed:401},{name:"Twilio Verify v2",url:"https://verify.twilio.com/v2/Services",method:"GET",observed:401},{name:"Discord",url:"https://discord.com/api/v10/users/@me",method:"GET",observed:401},{name:"Mozilla add-ons v5",url:"https://addons.mozilla.org/api/v5/addons/search/?q=test",method:"GET",observed:200},{name:"Hetzner Cloud",url:"https://api.hetzner.cloud/v1/servers",method:"GET",observed:401},{name:"Lemon Squeezy",url:"https://api.lemonsqueezy.com/v1/products",method:"GET",observed:401},{name:"Vonage Messages v1",url:"https://api.nexmo.com/v1/messages",method:"POST",observed:401},{name:"Vonage Verify v2",url:"https://api.nexmo.com/v2/verify",method:"POST",observed:422},{name:"Expo push",url:"https://exp.host/--/api/v2/push/send",method:"POST",observed:400},{name:"Threads",url:"https://graph.threads.net/v1.0/me",method:"GET",observed:400},{name:"Meta Graph",url:"https://graph.facebook.com/v24.0/me",method:"GET",observed:400},{name:"LinkedIn",url:"https://api.linkedin.com/rest/me",method:"GET",observed:401},{name:"GitHub",url:"https://api.github.com/user",method:"GET",observed:401}],PROBE_CONTROLS=[{name:"FCM legacy send (decommissioned 2024-06-20)",url:"https://fcm.googleapis.com/fcm/send",method:"POST",observed:404},{name:"GitHub, a path that cannot exist",url:"https://api.github.com/stacks-probe-control-does-not-exist",method:"GET",observed:404},{name:"OpenAI, a path that cannot exist",url:"https://api.openai.com/v1/stacks-probe-control-does-not-exist",method:"GET",observed:404}];export function classifyStatus(status){if(status===null)return"inconclusive";if(status===404||status===410)return"gone";if(status>=500)return"inconclusive";return"alive"}export function concludeProbe(targets,controls){if(controls.length===0)return"untrustworthy";if(controls.some((result)=>result.verdict!=="gone"))return"untrustworthy";if(targets.some((result)=>result.verdict==="gone"))return"withdrawn";if(targets.some((result)=>result.verdict==="inconclusive"))return"inconclusive";return"ok"}export function exitCodeFor(conclusion){if(conclusion==="withdrawn")return 1;if(conclusion==="ok")return 0;return 2}export function renderReport(targets,controls,conclusion){const row=(result)=>{const status=result.status===null?"no answer":String(result.status),moved=result.status!==null&&result.status!==result.target.observed?` (was ${result.target.observed})`:"";return`| ${result.target.name} | ${result.target.method} | ${status}${moved} | ${result.verdict} |`};return["## Integration sunset probe","",{ok:"Every endpoint this framework calls is still answering.",withdrawn:"An endpoint this framework calls has been withdrawn.",untrustworthy:"This run proves nothing: a control that must read as gone did not, so something is answering for the network.",inconclusive:"No conclusion: something did not answer. The controls were sound, so this is likely a transient failure."}[conclusion],"","| Endpoint | Method | Status | Verdict |","| --- | --- | --- | --- |",...targets.map(row),"","### Controls","","Paths that must read as gone. If any does not, the table above says nothing.","","| Control | Method | Status | Verdict |","| --- | --- | --- | --- |",...controls.map(row),"","No credential is sent by any request here, which is what makes the signal readable: an endpoint that exists rejects an unauthenticated request, and one that is gone answers 404."].join(`
|
|
1
|
+
import process from"node:process";export const PROBE_TARGETS=[{name:"FCM HTTP v1",url:"https://fcm.googleapis.com/v1/projects/stacks-probe/messages:send",method:"POST",observed:401},{name:"OpenAI",url:"https://api.openai.com/v1/models",method:"GET",observed:401},{name:"Anthropic",url:"https://api.anthropic.com/v1/messages",method:"POST",observed:401},{name:"SendGrid",url:"https://api.sendgrid.com/v3/mail/send",method:"POST",observed:401},{name:"Twilio",url:"https://api.twilio.com/2010-04-01/Accounts",method:"GET",observed:401},{name:"Twilio Lookups v2",url:"https://lookups.twilio.com/v2/PhoneNumbers/+15005550006",method:"GET",observed:401},{name:"Twilio Verify v2",url:"https://verify.twilio.com/v2/Services",method:"GET",observed:401},{name:"Discord",url:"https://discord.com/api/v10/users/@me",method:"GET",observed:401},{name:"Mozilla add-ons v5",url:"https://addons.mozilla.org/api/v5/addons/search/?q=test",method:"GET",observed:200},{name:"Hetzner Cloud",url:"https://api.hetzner.cloud/v1/servers",method:"GET",observed:401},{name:"fiskaly SIGN DE v2",url:"https://kassensichv-middleware.fiskaly.com/api/v2/tss",method:"GET",observed:401},{name:"Lemon Squeezy",url:"https://api.lemonsqueezy.com/v1/products",method:"GET",observed:401},{name:"Vonage Messages v1",url:"https://api.nexmo.com/v1/messages",method:"POST",observed:401},{name:"Vonage Verify v2",url:"https://api.nexmo.com/v2/verify",method:"POST",observed:422},{name:"Expo push",url:"https://exp.host/--/api/v2/push/send",method:"POST",observed:400},{name:"Threads",url:"https://graph.threads.net/v1.0/me",method:"GET",observed:400},{name:"Meta Graph",url:"https://graph.facebook.com/v24.0/me",method:"GET",observed:400},{name:"LinkedIn",url:"https://api.linkedin.com/rest/me",method:"GET",observed:401},{name:"GitHub",url:"https://api.github.com/user",method:"GET",observed:401}],PROBE_CONTROLS=[{name:"FCM legacy send (decommissioned 2024-06-20)",url:"https://fcm.googleapis.com/fcm/send",method:"POST",observed:404},{name:"GitHub, a path that cannot exist",url:"https://api.github.com/stacks-probe-control-does-not-exist",method:"GET",observed:404},{name:"OpenAI, a path that cannot exist",url:"https://api.openai.com/v1/stacks-probe-control-does-not-exist",method:"GET",observed:404}];export function classifyStatus(status){if(status===null)return"inconclusive";if(status===404||status===410)return"gone";if(status>=500)return"inconclusive";return"alive"}export function concludeProbe(targets,controls){if(controls.length===0)return"untrustworthy";if(controls.some((result)=>result.verdict!=="gone"))return"untrustworthy";if(targets.some((result)=>result.verdict==="gone"))return"withdrawn";if(targets.some((result)=>result.verdict==="inconclusive"))return"inconclusive";return"ok"}export function exitCodeFor(conclusion){if(conclusion==="withdrawn")return 1;if(conclusion==="ok")return 0;return 2}export function renderReport(targets,controls,conclusion){const row=(result)=>{const status=result.status===null?"no answer":String(result.status),moved=result.status!==null&&result.status!==result.target.observed?` (was ${result.target.observed})`:"";return`| ${result.target.name} | ${result.target.method} | ${status}${moved} | ${result.verdict} |`};return["## Integration sunset probe","",{ok:"Every endpoint this framework calls is still answering.",withdrawn:"An endpoint this framework calls has been withdrawn.",untrustworthy:"This run proves nothing: a control that must read as gone did not, so something is answering for the network.",inconclusive:"No conclusion: something did not answer. The controls were sound, so this is likely a transient failure."}[conclusion],"","| Endpoint | Method | Status | Verdict |","| --- | --- | --- | --- |",...targets.map(row),"","### Controls","","Paths that must read as gone. If any does not, the table above says nothing.","","| Control | Method | Status | Verdict |","| --- | --- | --- | --- |",...controls.map(row),"","No credential is sent by any request here, which is what makes the signal readable: an endpoint that exists rejects an unauthenticated request, and one that is gone answers 404."].join(`
|
|
2
2
|
`)}async function probe(target,timeoutMs){try{const response=await fetch(target.url,{method:target.method,redirect:"manual",signal:AbortSignal.timeout(timeoutMs)});return{target,status:response.status,verdict:classifyStatus(response.status)}}catch{return{target,status:null,verdict:"inconclusive"}}}async function probeAll(targets,timeoutMs,concurrency=4){const results=[];for(let index=0;index<targets.length;index+=concurrency)results.push(...await Promise.all(targets.slice(index,index+concurrency).map((target)=>probe(target,timeoutMs))));return results}export function integrationsProbe(buddy){buddy.command("integrations:probe","Check whether the third-party endpoints this framework calls still exist (sends no credentials)").option("--timeout <ms>","How long to wait for each endpoint",{default:"12000"}).option("--json","Print the results as JSON instead of a report",{default:!1}).action(async(options)=>{const timeoutMs=Number.parseInt(String(options.timeout??"12000"),10)||12000,controls=await probeAll(PROBE_CONTROLS,timeoutMs),targets=await probeAll(PROBE_TARGETS,timeoutMs),conclusion=concludeProbe(targets,controls);if(options.json)console.log(JSON.stringify({conclusion,targets,controls},null,2));else console.log(renderReport(targets,controls,conclusion));process.exit(exitCodeFor(conclusion))})}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/buddy",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.75.
|
|
5
|
+
"version": "0.75.173",
|
|
6
6
|
"description": "Meet Buddy. The Stacks runtime.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"contributors": [
|
|
@@ -96,68 +96,68 @@
|
|
|
96
96
|
},
|
|
97
97
|
"dependencies": {
|
|
98
98
|
"@stacksjs/bumpx": "^0.2.21",
|
|
99
|
-
"@stacksjs/actions": "0.75.
|
|
100
|
-
"@stacksjs/ai": "0.75.
|
|
101
|
-
"@stacksjs/alias": "0.75.
|
|
102
|
-
"@stacksjs/analytics": "0.75.
|
|
103
|
-
"@stacksjs/api": "0.75.
|
|
104
|
-
"@stacksjs/arrays": "0.75.
|
|
105
|
-
"@stacksjs/auth": "0.75.
|
|
106
|
-
"@stacksjs/browser-extension": "0.75.
|
|
107
|
-
"@stacksjs/build": "0.75.
|
|
108
|
-
"@stacksjs/cache": "0.75.
|
|
109
|
-
"@stacksjs/chat": "0.75.
|
|
99
|
+
"@stacksjs/actions": "0.75.173",
|
|
100
|
+
"@stacksjs/ai": "0.75.173",
|
|
101
|
+
"@stacksjs/alias": "0.75.173",
|
|
102
|
+
"@stacksjs/analytics": "0.75.173",
|
|
103
|
+
"@stacksjs/api": "0.75.173",
|
|
104
|
+
"@stacksjs/arrays": "0.75.173",
|
|
105
|
+
"@stacksjs/auth": "0.75.173",
|
|
106
|
+
"@stacksjs/browser-extension": "0.75.173",
|
|
107
|
+
"@stacksjs/build": "0.75.173",
|
|
108
|
+
"@stacksjs/cache": "0.75.173",
|
|
109
|
+
"@stacksjs/chat": "0.75.173",
|
|
110
110
|
"@stacksjs/clapp": "^0.2.16",
|
|
111
|
-
"@stacksjs/cli": "0.75.
|
|
112
|
-
"@stacksjs/cloud": "0.75.
|
|
113
|
-
"@stacksjs/cms": "0.75.
|
|
114
|
-
"@stacksjs/collections": "0.75.
|
|
115
|
-
"@stacksjs/commerce": "0.75.
|
|
116
|
-
"@stacksjs/config": "0.75.
|
|
117
|
-
"@stacksjs/database": "0.75.
|
|
118
|
-
"@stacksjs/desktop-build": "0.75.
|
|
119
|
-
"@stacksjs/dns": "0.75.
|
|
111
|
+
"@stacksjs/cli": "0.75.173",
|
|
112
|
+
"@stacksjs/cloud": "0.75.173",
|
|
113
|
+
"@stacksjs/cms": "0.75.173",
|
|
114
|
+
"@stacksjs/collections": "0.75.173",
|
|
115
|
+
"@stacksjs/commerce": "0.75.173",
|
|
116
|
+
"@stacksjs/config": "0.75.173",
|
|
117
|
+
"@stacksjs/database": "0.75.173",
|
|
118
|
+
"@stacksjs/desktop-build": "0.75.173",
|
|
119
|
+
"@stacksjs/dns": "0.75.173",
|
|
120
120
|
"@stacksjs/dnsx": "^0.2.3",
|
|
121
|
-
"@stacksjs/email": "0.75.
|
|
122
|
-
"@stacksjs/enums": "0.75.
|
|
123
|
-
"@stacksjs/env": "0.75.
|
|
124
|
-
"@stacksjs/error-handling": "0.75.
|
|
125
|
-
"@stacksjs/events": "0.75.
|
|
126
|
-
"@stacksjs/features": "0.75.
|
|
127
|
-
"@stacksjs/git": "0.75.
|
|
121
|
+
"@stacksjs/email": "0.75.173",
|
|
122
|
+
"@stacksjs/enums": "0.75.173",
|
|
123
|
+
"@stacksjs/env": "0.75.173",
|
|
124
|
+
"@stacksjs/error-handling": "0.75.173",
|
|
125
|
+
"@stacksjs/events": "0.75.173",
|
|
126
|
+
"@stacksjs/features": "0.75.173",
|
|
127
|
+
"@stacksjs/git": "0.75.173",
|
|
128
128
|
"@stacksjs/gitit": "^0.2.5",
|
|
129
|
-
"@stacksjs/health": "0.75.
|
|
129
|
+
"@stacksjs/health": "0.75.173",
|
|
130
130
|
"@stacksjs/httx": "^0.1.10",
|
|
131
|
-
"@stacksjs/image": "0.75.
|
|
132
|
-
"@stacksjs/lint": "0.75.
|
|
133
|
-
"@stacksjs/logging": "0.75.
|
|
134
|
-
"@stacksjs/notifications": "0.75.
|
|
135
|
-
"@stacksjs/objects": "0.75.
|
|
136
|
-
"@stacksjs/orm": "0.75.
|
|
137
|
-
"@stacksjs/path": "0.75.
|
|
138
|
-
"@stacksjs/payments": "0.75.
|
|
139
|
-
"@stacksjs/realtime": "0.75.
|
|
140
|
-
"@stacksjs/router": "0.75.
|
|
131
|
+
"@stacksjs/image": "0.75.173",
|
|
132
|
+
"@stacksjs/lint": "0.75.173",
|
|
133
|
+
"@stacksjs/logging": "0.75.173",
|
|
134
|
+
"@stacksjs/notifications": "0.75.173",
|
|
135
|
+
"@stacksjs/objects": "0.75.173",
|
|
136
|
+
"@stacksjs/orm": "0.75.173",
|
|
137
|
+
"@stacksjs/path": "0.75.173",
|
|
138
|
+
"@stacksjs/payments": "0.75.173",
|
|
139
|
+
"@stacksjs/realtime": "0.75.173",
|
|
140
|
+
"@stacksjs/router": "0.75.173",
|
|
141
141
|
"@stacksjs/rpx": "^0.11.54",
|
|
142
|
-
"@stacksjs/scheduler": "0.75.
|
|
143
|
-
"@stacksjs/search-engine": "0.75.
|
|
144
|
-
"@stacksjs/security": "0.75.
|
|
145
|
-
"@stacksjs/server": "0.75.
|
|
146
|
-
"@stacksjs/sites": "0.75.
|
|
147
|
-
"@stacksjs/skills": "0.75.
|
|
148
|
-
"@stacksjs/socials": "0.75.
|
|
149
|
-
"@stacksjs/storage": "0.75.
|
|
150
|
-
"@stacksjs/strings": "0.75.
|
|
142
|
+
"@stacksjs/scheduler": "0.75.173",
|
|
143
|
+
"@stacksjs/search-engine": "0.75.173",
|
|
144
|
+
"@stacksjs/security": "0.75.173",
|
|
145
|
+
"@stacksjs/server": "0.75.173",
|
|
146
|
+
"@stacksjs/sites": "0.75.173",
|
|
147
|
+
"@stacksjs/skills": "0.75.173",
|
|
148
|
+
"@stacksjs/socials": "0.75.173",
|
|
149
|
+
"@stacksjs/storage": "0.75.173",
|
|
150
|
+
"@stacksjs/strings": "0.75.173",
|
|
151
151
|
"@stacksjs/stx": "^0.2.483",
|
|
152
|
-
"@stacksjs/testing": "0.75.
|
|
153
|
-
"@stacksjs/tinker": "0.75.
|
|
152
|
+
"@stacksjs/testing": "0.75.173",
|
|
153
|
+
"@stacksjs/tinker": "0.75.173",
|
|
154
154
|
"@stacksjs/tlsx": "^0.13.19",
|
|
155
155
|
"@stacksjs/ts-cloud": "^0.16.52",
|
|
156
|
-
"@stacksjs/tunnel": "0.75.
|
|
157
|
-
"@stacksjs/types": "0.75.
|
|
158
|
-
"@stacksjs/ui": "0.75.
|
|
159
|
-
"@stacksjs/utils": "0.75.
|
|
160
|
-
"@stacksjs/validation": "0.75.
|
|
156
|
+
"@stacksjs/tunnel": "0.75.173",
|
|
157
|
+
"@stacksjs/types": "0.75.173",
|
|
158
|
+
"@stacksjs/ui": "0.75.173",
|
|
159
|
+
"@stacksjs/utils": "0.75.173",
|
|
160
|
+
"@stacksjs/validation": "0.75.173",
|
|
161
161
|
"ajv": "^8.20.0",
|
|
162
162
|
"ajv-formats": "^3.0.1",
|
|
163
163
|
"bun-plugin-stx": "^0.2.483",
|