@strav/social 0.1.0 → 0.1.1

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 CHANGED
@@ -1,20 +1,20 @@
1
- # @stravigor/social
1
+ # @strav/social
2
2
 
3
- OAuth social authentication for the [Strav](https://www.npmjs.com/package/@stravigor/core) framework. Sign in with Google, GitHub, Discord, Facebook, and LinkedIn using a fluent, driver-based API.
3
+ OAuth social authentication for the [Strav](https://www.npmjs.com/package/@strav/core) framework. Sign in with Google, GitHub, Discord, Facebook, and LinkedIn using a fluent, driver-based API.
4
4
 
5
5
  ## Install
6
6
 
7
7
  ```bash
8
- bun add @stravigor/social
8
+ bun add @strav/social
9
9
  bun strav install social
10
10
  ```
11
11
 
12
- Requires `@stravigor/core` as a peer dependency.
12
+ Requires `@strav/core` as a peer dependency.
13
13
 
14
14
  ## Setup
15
15
 
16
16
  ```ts
17
- import { SocialProvider } from '@stravigor/social'
17
+ import { SocialProvider } from '@strav/social'
18
18
 
19
19
  app.use(new SocialProvider())
20
20
  ```
@@ -22,7 +22,7 @@ app.use(new SocialProvider())
22
22
  ## Usage
23
23
 
24
24
  ```ts
25
- import { social } from '@stravigor/social'
25
+ import { social } from '@strav/social'
26
26
 
27
27
  // Redirect to provider
28
28
  r.get('/auth/github', ctx => {
@@ -64,7 +64,7 @@ const user = await social.driver('google').userFromToken(accessToken)
64
64
  ## Custom Providers
65
65
 
66
66
  ```ts
67
- import { AbstractProvider, social } from '@stravigor/social'
67
+ import { AbstractProvider, social } from '@strav/social'
68
68
 
69
69
  class SpotifyProvider extends AbstractProvider { /* ... */ }
70
70
  social.extend('spotify', config => new SpotifyProvider(config))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strav/social",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "description": "OAuth social authentication for the Strav framework",
6
6
  "license": "MIT",
@@ -1,5 +1,5 @@
1
- import type { Context, Session } from '@stravigor/http'
2
- import { randomHex, ExternalServiceError } from '@stravigor/kernel'
1
+ import type { Context, Session } from '@strav/http'
2
+ import { randomHex, ExternalServiceError } from '@strav/kernel'
3
3
  import type { ProviderConfig, SocialUser, TokenResponse } from './types.ts'
4
4
 
5
5
  const STATE_KEY = 'social_state'
@@ -1,4 +1,4 @@
1
- import { ExternalServiceError } from '@stravigor/kernel'
1
+ import { ExternalServiceError } from '@strav/kernel'
2
2
  import { AbstractProvider } from '../abstract_provider.ts'
3
3
  import type { SocialUser } from '../types.ts'
4
4
 
@@ -1,4 +1,4 @@
1
- import { ExternalServiceError } from '@stravigor/kernel'
1
+ import { ExternalServiceError } from '@strav/kernel'
2
2
  import { AbstractProvider } from '../abstract_provider.ts'
3
3
  import type { SocialUser } from '../types.ts'
4
4
 
@@ -1,4 +1,4 @@
1
- import { ExternalServiceError } from '@stravigor/kernel'
1
+ import { ExternalServiceError } from '@strav/kernel'
2
2
  import { AbstractProvider } from '../abstract_provider.ts'
3
3
  import type { SocialUser } from '../types.ts'
4
4
 
@@ -1,4 +1,4 @@
1
- import { ExternalServiceError } from '@stravigor/kernel'
1
+ import { ExternalServiceError } from '@strav/kernel'
2
2
  import { AbstractProvider } from '../abstract_provider.ts'
3
3
  import type { SocialUser } from '../types.ts'
4
4
 
@@ -1,4 +1,4 @@
1
- import { ExternalServiceError } from '@stravigor/kernel'
1
+ import { ExternalServiceError } from '@strav/kernel'
2
2
  import { AbstractProvider } from '../abstract_provider.ts'
3
3
  import type { SocialUser } from '../types.ts'
4
4
 
package/src/schema.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { defineSchema, t, Archetype } from '@stravigor/database'
1
+ import { defineSchema, t, Archetype } from '@strav/database'
2
2
 
3
3
  export const schema = defineSchema('social_account', {
4
4
  archetype: Archetype.Component,
@@ -1,4 +1,4 @@
1
- import { extractUserId } from '@stravigor/database'
1
+ import { extractUserId } from '@strav/database'
2
2
  import SocialManager from './social_manager.ts'
3
3
  import type { SocialUser } from './types.ts'
4
4
 
@@ -1,5 +1,5 @@
1
- import { inject, Configuration, ConfigurationError } from '@stravigor/kernel'
2
- import { Database, toSnakeCase } from '@stravigor/database'
1
+ import { inject, Configuration, ConfigurationError } from '@strav/kernel'
2
+ import { Database, toSnakeCase } from '@strav/database'
3
3
  import type { AbstractProvider } from './abstract_provider.ts'
4
4
  import type { ProviderConfig, SocialConfig } from './types.ts'
5
5
  import { GoogleProvider } from './providers/google_provider.ts'
@@ -1,5 +1,5 @@
1
- import { ServiceProvider } from '@stravigor/kernel'
2
- import type { Application } from '@stravigor/kernel'
1
+ import { ServiceProvider } from '@strav/kernel'
2
+ import type { Application } from '@strav/kernel'
3
3
  import SocialManager from './social_manager.ts'
4
4
 
5
5
  export default class SocialProvider extends ServiceProvider {
@@ -1,4 +1,4 @@
1
- import { env } from '@stravigor/kernel'
1
+ import { env } from '@strav/kernel'
2
2
 
3
3
  export default {
4
4
  userKey: 'id',
@@ -1,4 +1,4 @@
1
- import { defineSchema, t, Archetype } from '@stravigor/database'
1
+ import { defineSchema, t, Archetype } from '@strav/database'
2
2
 
3
3
  export default defineSchema('social_account', {
4
4
  archetype: Archetype.Component,