@stravigor/cashier 0.1.1 → 0.1.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stravigor/cashier",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "description": "Stripe billing for the Strav framework",
6
6
  "license": "MIT",
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "files": ["src/", "stubs/", "package.json", "tsconfig.json"],
12
12
  "peerDependencies": {
13
- "@stravigor/core": "0.2.5"
13
+ "@stravigor/core": "0.2.6"
14
14
  },
15
15
  "dependencies": {
16
16
  "stripe": "^17.4.0"
@@ -0,0 +1,16 @@
1
+ import { ServiceProvider } from '@stravigor/core/core'
2
+ import type { Application } from '@stravigor/core/core'
3
+ import CashierManager from './cashier_manager.ts'
4
+
5
+ export default class CashierProvider extends ServiceProvider {
6
+ readonly name = 'cashier'
7
+ override readonly dependencies = ['database']
8
+
9
+ override register(app: Application): void {
10
+ app.singleton(CashierManager)
11
+ }
12
+
13
+ override boot(app: Application): void {
14
+ app.resolve(CashierManager)
15
+ }
16
+ }
package/src/index.ts CHANGED
@@ -1,6 +1,9 @@
1
1
  // Manager
2
2
  export { default, default as CashierManager } from './cashier_manager.ts'
3
3
 
4
+ // Provider
5
+ export { default as CashierProvider } from './cashier_provider.ts'
6
+
4
7
  // Static helpers
5
8
  export { default as Customer } from './customer.ts'
6
9
  export { default as Subscription } from './subscription.ts'