@owlmeans/server-payment 0.1.18-rc.2 → 0.1.18-rc.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.
- package/README.md +1 -1
- package/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/server-payment/SKILL.md +2 -1
- package/build/consts.d.ts +0 -1
- package/build/consts.d.ts.map +1 -1
- package/build/consts.js +1 -2
- package/build/consts.js.map +1 -1
- package/package.json +13 -13
- package/src/consts.ts +1 -3
- package/tests/protocol.spec.ts +7 -4
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
|
|
|
46
46
|
your project's skill store (`.agents/skills/`):
|
|
47
47
|
|
|
48
48
|
```sh
|
|
49
|
-
npx @owlmeans/agent-skills@^0.1.18-rc.
|
|
49
|
+
npx @owlmeans/agent-skills@^0.1.18-rc.18
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
The embedded files are version-matched to this package release. Do not edit them
|
package/agent-meta/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"package": "@owlmeans/server-payment",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
5
|
-
"generatedAt": "2026-09-
|
|
4
|
+
"version": "0.1.18-rc.3",
|
|
5
|
+
"generatedAt": "2026-09-12T13:35:38.915Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -66,7 +66,8 @@ must be safe to repeat.
|
|
|
66
66
|
## Protocols and security
|
|
67
67
|
|
|
68
68
|
`paymentGate` is an immutable protocol tree. `paymentGateEntrypoints` binds its base, webhook, and
|
|
69
|
-
resync declarations directly with `bind(protocol, handler)`;
|
|
69
|
+
resync declarations directly with `bind(protocol, handler)`; do not publish a flattened
|
|
70
|
+
`paymentGateProtocols` compatibility list. The webhook is public because Stripe
|
|
70
71
|
signature verification requires the untouched raw body, while resync carries the ED25519 guard.
|
|
71
72
|
Never put an application auth guard on the Stripe webhook.
|
|
72
73
|
|
package/build/consts.d.ts
CHANGED
|
@@ -22,5 +22,4 @@ export declare const paymentGate: {
|
|
|
22
22
|
}, undefined>;
|
|
23
23
|
readonly resync: import("@owlmeans/entrypoint").EntrypointProtocol<{}, ResyncResult>;
|
|
24
24
|
};
|
|
25
|
-
export declare const paymentGateProtocols: import("@owlmeans/entrypoint").EntrypointProtocolDeclaration[];
|
|
26
25
|
//# sourceMappingURL=consts.d.ts.map
|
package/build/consts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,oBAAoB,WAAW,CAAA;AAC5C,eAAO,MAAM,oBAAoB,qBAAqB,CAAA;AACtD,eAAO,MAAM,gBAAgB,qBAAqB,CAAA;AAClD,eAAO,MAAM,eAAe,oBAAoB,CAAA;AAChD,eAAO,MAAM,gBAAgB,qBAAqB,CAAA;AAClD,eAAO,MAAM,oBAAoB,6BAA6B,CAAA;AAC9D,eAAO,MAAM,wBAAwB,yBAAyB,CAAA;AAC9D,eAAO,MAAM,uBAAuB,wBAAwB,CAAA;AAC5D,eAAO,MAAM,iBAAiB,WAAW,CAAA;AACzC,eAAO,MAAM,uBAAuB,iBAAiB,CAAA;AAErD,MAAM,WAAW,aAAa;IAAG,OAAO,EAAE,MAAM,CAAA;CAAE;AAClD,MAAM,WAAW,YAAY;IAAG,EAAE,EAAE,OAAO,CAAA;CAAE;AAe7C,qFAAqF;AACrF,eAAO,MAAM,WAAW;;;;;;CAWd,CAAA
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,oBAAoB,WAAW,CAAA;AAC5C,eAAO,MAAM,oBAAoB,qBAAqB,CAAA;AACtD,eAAO,MAAM,gBAAgB,qBAAqB,CAAA;AAClD,eAAO,MAAM,eAAe,oBAAoB,CAAA;AAChD,eAAO,MAAM,gBAAgB,qBAAqB,CAAA;AAClD,eAAO,MAAM,oBAAoB,6BAA6B,CAAA;AAC9D,eAAO,MAAM,wBAAwB,yBAAyB,CAAA;AAC9D,eAAO,MAAM,uBAAuB,wBAAwB,CAAA;AAC5D,eAAO,MAAM,iBAAiB,WAAW,CAAA;AACzC,eAAO,MAAM,uBAAuB,iBAAiB,CAAA;AAErD,MAAM,WAAW,aAAa;IAAG,OAAO,EAAE,MAAM,CAAA;CAAE;AAClD,MAAM,WAAW,YAAY;IAAG,EAAE,EAAE,OAAO,CAAA;CAAE;AAe7C,qFAAqF;AACrF,eAAO,MAAM,WAAW;;;;;;CAWd,CAAA"}
|
package/build/consts.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { contract, protocol,
|
|
1
|
+
import { contract, protocol, schema, typed } from '@owlmeans/entrypoint';
|
|
2
2
|
import { backend, route, RouteMethod } from '@owlmeans/route';
|
|
3
3
|
import { GUARD_ED25519 } from '@owlmeans/server-app';
|
|
4
4
|
export const STRIPE_PAYGATE_ALIAS = 'stripe';
|
|
@@ -29,5 +29,4 @@ export const paymentGate = {
|
|
|
29
29
|
webhook: protocol(route(aliases.webhook, '/webhook/:paygate', backend({ parent: base, method: RouteMethod.POST })), contract.request({ params: PaygateParamsSchema }, typed())),
|
|
30
30
|
resync: protocol(route(aliases.resync, '/resync', backend({ parent: base, method: RouteMethod.POST })), contract(ResyncResultSchema), { guards: GUARD_ED25519 }),
|
|
31
31
|
};
|
|
32
|
-
export const paymentGateProtocols = protocols(paymentGate);
|
|
33
32
|
//# sourceMappingURL=consts.js.map
|
package/build/consts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,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AAK;CACI,CAAC,CAAA;AAElC,MAAM,OAAO,GAAG;IACd,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,EAAE,qBAAqB;CAC5E,CAAA;AACV,MAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAA;AAElF,qFAAqF;AACrF,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,IAAI;IACJ,OAAO,EAAE,QAAQ,CACf,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC,EAChG,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,mBAAmB,EAAE,EAAE,KAAK,EAAa,CAAC,CACtE;IACD,MAAM,EAAE,QAAQ,CACd,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC,EACrF,QAAQ,CAAC,kBAAkB,CAAC,EAC5B,EAAE,MAAM,EAAE,aAAa,EAAE,CAC1B;CACO,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owlmeans/server-payment",
|
|
3
|
-
"version": "0.1.18-rc.
|
|
3
|
+
"version": "0.1.18-rc.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Protocol-bound payment resources, entitlement gates, and Stripe checkout for OwlMeans servers.",
|
|
6
6
|
"type": "module",
|
|
@@ -26,18 +26,18 @@
|
|
|
26
26
|
"ajv": "*"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@owlmeans/auth": "^0.1.18-rc.
|
|
30
|
-
"@owlmeans/config": "^0.1.18-rc.
|
|
31
|
-
"@owlmeans/context": "^0.1.18-rc.
|
|
32
|
-
"@owlmeans/entrypoint": "^0.1.18-rc.
|
|
33
|
-
"@owlmeans/mongo-resource": "^0.1.18-rc.
|
|
34
|
-
"@owlmeans/payment": "^0.1.18-rc.
|
|
35
|
-
"@owlmeans/resource": "^0.1.18-rc.
|
|
36
|
-
"@owlmeans/route": "^0.1.18-rc.
|
|
37
|
-
"@owlmeans/server-api": "^0.1.18-rc.
|
|
38
|
-
"@owlmeans/server-app": "^0.1.18-rc.
|
|
39
|
-
"@owlmeans/server-context": "^0.1.18-rc.
|
|
40
|
-
"@owlmeans/server-entrypoint": "^0.1.18-rc.
|
|
29
|
+
"@owlmeans/auth": "^0.1.18-rc.15",
|
|
30
|
+
"@owlmeans/config": "^0.1.18-rc.18",
|
|
31
|
+
"@owlmeans/context": "^0.1.18-rc.14",
|
|
32
|
+
"@owlmeans/entrypoint": "^0.1.18-rc.17",
|
|
33
|
+
"@owlmeans/mongo-resource": "^0.1.18-rc.18",
|
|
34
|
+
"@owlmeans/payment": "^0.1.18-rc.19",
|
|
35
|
+
"@owlmeans/resource": "^0.1.18-rc.15",
|
|
36
|
+
"@owlmeans/route": "^0.1.18-rc.15",
|
|
37
|
+
"@owlmeans/server-api": "^0.1.18-rc.23",
|
|
38
|
+
"@owlmeans/server-app": "^0.1.18-rc.25",
|
|
39
|
+
"@owlmeans/server-context": "^0.1.18-rc.18",
|
|
40
|
+
"@owlmeans/server-entrypoint": "^0.1.18-rc.17",
|
|
41
41
|
"async-mutex": "^0.5.0",
|
|
42
42
|
"stripe": "^17.7.0"
|
|
43
43
|
},
|
package/src/consts.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { contract, protocol,
|
|
1
|
+
import { contract, protocol, schema, typed } from '@owlmeans/entrypoint'
|
|
2
2
|
import { backend, route, RouteMethod } from '@owlmeans/route'
|
|
3
3
|
import { GUARD_ED25519 } from '@owlmeans/server-app'
|
|
4
4
|
import type { JSONSchemaType } from 'ajv'
|
|
@@ -43,5 +43,3 @@ export const paymentGate = {
|
|
|
43
43
|
{ guards: GUARD_ED25519 },
|
|
44
44
|
),
|
|
45
45
|
} as const
|
|
46
|
-
|
|
47
|
-
export const paymentGateProtocols = protocols(paymentGate)
|
package/tests/protocol.spec.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { describe, expect, test } from 'bun:test'
|
|
2
|
+
import { protocols } from '@owlmeans/entrypoint'
|
|
2
3
|
import type { ParamsOf, ResponseOf } from '@owlmeans/entrypoint'
|
|
3
|
-
import
|
|
4
|
+
import * as payment from '../src/index.js'
|
|
5
|
+
import { paymentGate } from '../src/index.js'
|
|
4
6
|
|
|
5
7
|
describe('server payment protocols', () => {
|
|
6
8
|
test('bind webhook params and resync response to their declarations', () => {
|
|
@@ -12,9 +14,10 @@ describe('server payment protocols', () => {
|
|
|
12
14
|
expect(paymentGate.webhook.route.route.parent).toBe(paymentGate.base.alias)
|
|
13
15
|
})
|
|
14
16
|
|
|
15
|
-
test('exports
|
|
16
|
-
expect(
|
|
17
|
-
expect(
|
|
17
|
+
test('exports an immutable protocol tree without a flattened compatibility list', () => {
|
|
18
|
+
expect(protocols(paymentGate)).toContain(paymentGate.webhook)
|
|
19
|
+
expect(protocols(paymentGate).every(item => item.kind === 'entrypoint-protocol')).toBe(true)
|
|
20
|
+
expect(payment).not.toHaveProperty('paymentGateProtocols')
|
|
18
21
|
expect(Object.isFrozen(paymentGate.resync)).toBe(true)
|
|
19
22
|
})
|
|
20
23
|
})
|