@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
|
|
4
|
-
config
|
|
3
|
+
url,
|
|
4
|
+
config,
|
|
5
5
|
};
|
|
6
6
|
// Sensible default:
|
|
7
7
|
if (typeof tapConfig.url === 'undefined') {
|
|
8
|
-
|
|
8
|
+
tapConfig.url = 'http://localhost:2480';
|
|
9
9
|
}
|
|
10
|
-
//
|
|
11
|
-
if (
|
|
12
|
-
tapConfig.
|
|
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
|
}
|
package/build/src/types.d.ts
CHANGED