@polinetwork/backend 0.14.0 → 0.15.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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/constants.ts"],"sourcesContent":["export { AUTH_PATH, TRPC_PATH, WS_PATH } from \"./constants\"\nexport type { AppRouter } from \"./routers\"\n\nimport type { telegramPlugin } from \"./auth/plugins/telegram\"\nexport type TelegramPlugin = typeof telegramPlugin\n\nexport type { TelegramSocket } from \"./websocket/telegram\"\n","export const TRPC_PATH = \"/api/trpc\"\nexport const AUTH_PATH = \"/api/auth\"\nexport const WS_PATH = \"/ws\"\n\nexport const TRUSTED_ORIGINS = [\n \"http://localhost:3001\",\n \"http://localhost:3002\",\n \"http://localhost:3003\",\n \"http://localhost:5173\",\n \"http://localhost:5174\",\n \"http://localhost:5175\",\n]\n\nexport const MESSAGES_RETENTION_DAYS = 7\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,YAAY;AAClB,IAAM,YAAY;AAClB,IAAM,UAAU;","names":[]}
1
+ {"version":3,"sources":["../../src/index.ts","../../src/constants.ts"],"sourcesContent":["export { AUTH_PATH, TRPC_PATH, WS_PATH } from \"./constants\"\nexport type { AppRouter } from \"./routers\"\n\nimport type { telegramPlugin } from \"./auth/plugins/telegram\"\nexport type TelegramPlugin = typeof telegramPlugin\n\nexport type { TelegramSocket } from \"./websocket/telegram\"\n","export const TRPC_PATH = \"/api/trpc\"\nexport const AUTH_PATH = \"/api/auth\"\nexport const WS_PATH = \"/ws\"\n\nexport const TRUSTED_ORIGINS = [\n \"http://localhost:3001\",\n \"http://localhost:3002\",\n \"http://localhost:3003\",\n \"http://localhost:5173\",\n \"http://localhost:5174\",\n \"http://localhost:5175\",\n]\n\nexport const MESSAGES_RETENTION_DAYS = 7\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,YAAY;AAClB,IAAM,YAAY;AAClB,IAAM,UAAU;","names":[]}
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _trpc_server from '@trpc/server';
2
- import * as better_auth from 'better-auth';
2
+ import * as better_call from 'better-call';
3
3
  import { z } from 'zod';
4
4
  import { Socket } from 'socket.io-client';
5
5
 
@@ -584,9 +584,9 @@ declare const telegramPlugin: () => {
584
584
  };
585
585
  };
586
586
  endpoints: {
587
- startLink: better_auth.StrictEndpoint<"/telegram/link/start", {
587
+ startLink: better_call.StrictEndpoint<"/telegram/link/start", {
588
588
  method: "POST";
589
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
589
+ use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
590
590
  session: {
591
591
  session: Record<string, any> & {
592
592
  id: string;
@@ -616,9 +616,9 @@ declare const telegramPlugin: () => {
616
616
  code: string;
617
617
  ttl: number;
618
618
  }>;
619
- verifyLink: better_auth.StrictEndpoint<"/telegram/link/verify", {
619
+ verifyLink: better_call.StrictEndpoint<"/telegram/link/verify", {
620
620
  method: "GET";
621
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
621
+ use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
622
622
  session: {
623
623
  session: Record<string, any> & {
624
624
  id: string;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _trpc_server from '@trpc/server';
2
- import * as better_auth from 'better-auth';
2
+ import * as better_call from 'better-call';
3
3
  import { z } from 'zod';
4
4
  import { Socket } from 'socket.io-client';
5
5
 
@@ -584,9 +584,9 @@ declare const telegramPlugin: () => {
584
584
  };
585
585
  };
586
586
  endpoints: {
587
- startLink: better_auth.StrictEndpoint<"/telegram/link/start", {
587
+ startLink: better_call.StrictEndpoint<"/telegram/link/start", {
588
588
  method: "POST";
589
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
589
+ use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
590
590
  session: {
591
591
  session: Record<string, any> & {
592
592
  id: string;
@@ -616,9 +616,9 @@ declare const telegramPlugin: () => {
616
616
  code: string;
617
617
  ttl: number;
618
618
  }>;
619
- verifyLink: better_auth.StrictEndpoint<"/telegram/link/verify", {
619
+ verifyLink: better_call.StrictEndpoint<"/telegram/link/verify", {
620
620
  method: "GET";
621
- use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
621
+ use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
622
622
  session: {
623
623
  session: Record<string, any> & {
624
624
  id: string;
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/constants.ts"],"sourcesContent":["export const TRPC_PATH = \"/api/trpc\"\nexport const AUTH_PATH = \"/api/auth\"\nexport const WS_PATH = \"/ws\"\n\nexport const TRUSTED_ORIGINS = [\n \"http://localhost:3001\",\n \"http://localhost:3002\",\n \"http://localhost:3003\",\n \"http://localhost:5173\",\n \"http://localhost:5174\",\n \"http://localhost:5175\",\n]\n\nexport const MESSAGES_RETENTION_DAYS = 7\n"],"mappings":";AAAO,IAAM,YAAY;AAClB,IAAM,YAAY;AAClB,IAAM,UAAU;","names":[]}
1
+ {"version":3,"sources":["../../src/constants.ts"],"sourcesContent":["export const TRPC_PATH = \"/api/trpc\"\nexport const AUTH_PATH = \"/api/auth\"\nexport const WS_PATH = \"/ws\"\n\nexport const TRUSTED_ORIGINS = [\n \"http://localhost:3001\",\n \"http://localhost:3002\",\n \"http://localhost:3003\",\n \"http://localhost:5173\",\n \"http://localhost:5174\",\n \"http://localhost:5175\",\n]\n\nexport const MESSAGES_RETENTION_DAYS = 7\n"],"mappings":";AAAO,IAAM,YAAY;AAClB,IAAM,YAAY;AAClB,IAAM,UAAU;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polinetwork/backend",
3
- "version": "0.14.0",
3
+ "version": "0.15.1",
4
4
  "description": "Utils to interact with the backend.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,17 +27,11 @@
27
27
  "types": "./dist/index.d.ts"
28
28
  }
29
29
  },
30
+ "scripts": {
31
+ "build": "cd .. && bun install && bun run build:npm",
32
+ "prepublishOnly": "bun run build"
33
+ },
30
34
  "devDependencies": {
31
- "copyfiles": "^2.4.1",
32
- "rimraf": "^6.0.1",
33
- "tsup": "^8.5.0",
34
35
  "typescript": "^5.9.2"
35
- },
36
- "engines": {
37
- "pnpm": ">=10.17.1",
38
- "node": ">=24.8.0"
39
- },
40
- "scripts": {
41
- "build": "rimraf ./dist && cd ../backend && pnpm install && pnpm run build:npm && cd ../package && copyfiles -u 3 ../backend/lib/* dist"
42
36
  }
43
- }
37
+ }