@thisismissem/adonisjs-atproto-tap 1.0.1 → 1.0.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.
@@ -13,10 +13,6 @@ export default class TapProvider {
13
13
  if (!config || !config.url) {
14
14
  throw new RuntimeException('Invalid config exported from "config/tap.ts" file. Make sure to return an object with the url property defined');
15
15
  }
16
- // FIXME: Workaround for https://github.com/bluesky-social/atproto/issues/4476
17
- if (config.url.endsWith('/')) {
18
- config.url = config.url.slice(0, -1);
19
- }
20
16
  return new Tap(config.url, config.config ?? {});
21
17
  });
22
18
  this.app.container.singleton('tap.indexer', () => {
@@ -1,2 +1,2 @@
1
1
  import type { Config, TapProviderConfig } from './types.js';
2
- export declare function defineConfig<T extends Config>(config: T): TapProviderConfig;
2
+ export declare function defineConfig<T extends Config>({ url, ...config }: T): TapProviderConfig;
@@ -1,15 +1,15 @@
1
- export function defineConfig(config) {
1
+ export function defineConfig({ url, ...config }) {
2
2
  const tapConfig = {
3
- url: config.url,
4
- config: {},
3
+ url,
4
+ config,
5
5
  };
6
6
  // Sensible default:
7
7
  if (typeof tapConfig.url === 'undefined') {
8
- config.url = 'http://localhost:2480/';
8
+ tapConfig.url = 'http://localhost:2480';
9
9
  }
10
- // Copy across the admin password if any:
11
- if (config && typeof config.adminPassword === 'string') {
12
- tapConfig.config.adminPassword = config.adminPassword;
10
+ // FIXME: Workaround for https://github.com/bluesky-social/atproto/issues/4476
11
+ if (tapConfig.url.endsWith('/')) {
12
+ tapConfig.url = tapConfig.url.slice(0, -1);
13
13
  }
14
14
  return tapConfig;
15
15
  }
@@ -1,8 +1,7 @@
1
1
  import { TapConfig, Tap as TapClient } from '@atproto/tap';
2
2
  export type Config = {
3
3
  url: string;
4
- adminPassword?: string;
5
- };
4
+ } & TapConfig;
6
5
  export type TapProviderConfig = {
7
6
  url: Config['url'];
8
7
  config: TapConfig;
@@ -6,7 +6,5 @@ import env from "#start/env"
6
6
 
7
7
  export default defineConfig({
8
8
  url: env.get('TAP_URL'),
9
- config: {
10
- adminPassword: env.get('TAP_ADMIN_PASSWORD'),
11
- },
9
+ adminPassword: env.get('TAP_ADMIN_PASSWORD'),
12
10
  })
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@thisismissem/adonisjs-atproto-tap",
3
3
  "description": "Adonis.js provider for AT Protocol Tap Client",
4
- "version": "1.0.1",
4
+ "version": "1.0.2",
5
5
  "engines": {
6
6
  "node": ">=20.6.0"
7
7
  },