@stravigor/socialite 0.2.0 → 0.4.0

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/socialite",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "type": "module",
5
5
  "description": "OAuth social authentication for the Strav framework",
6
6
  "license": "MIT",
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "files": ["src/", "stubs/", "package.json", "tsconfig.json", "CHANGELOG.md"],
12
12
  "peerDependencies": {
13
- "@stravigor/core": "0.2.2"
13
+ "@stravigor/core": "0.3.3"
14
14
  },
15
15
  "scripts": {
16
16
  "test": "bun test tests/",
package/src/index.ts CHANGED
@@ -1,4 +1,7 @@
1
1
  export { default, default as SocialiteManager } from './socialite_manager.ts'
2
+
3
+ // Provider
4
+ export { default as SocialiteProvider } from './socialite_provider.ts'
2
5
  export { default as SocialAccount } from './social_account.ts'
3
6
  export { socialite } from './helpers.ts'
4
7
  export { AbstractProvider, SocialiteError } from './abstract_provider.ts'
@@ -0,0 +1,16 @@
1
+ import { ServiceProvider } from '@stravigor/core/core'
2
+ import type { Application } from '@stravigor/core/core'
3
+ import SocialiteManager from './socialite_manager.ts'
4
+
5
+ export default class SocialiteProvider extends ServiceProvider {
6
+ readonly name = 'socialite'
7
+ override readonly dependencies = ['database']
8
+
9
+ override register(app: Application): void {
10
+ app.singleton(SocialiteManager)
11
+ }
12
+
13
+ override boot(app: Application): void {
14
+ app.resolve(SocialiteManager)
15
+ }
16
+ }