@polinetwork/backend 0.1.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/README.md +8 -0
- package/lib/index.d.mts +28 -0
- package/lib/index.d.ts +28 -0
- package/lib/index.global.js +6 -0
- package/lib/index.global.js.map +1 -0
- package/lib/index.js +33 -0
- package/lib/index.js.map +1 -0
- package/lib/index.mjs +6 -0
- package/lib/index.mjs.map +1 -0
- package/package.json +33 -0
package/README.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Backend
|
|
2
|
+
|
|
3
|
+
> [!NOTE]
|
|
4
|
+
> ### WIP
|
|
5
|
+
> This is a rewrite currently WIP that will take time. Drink a coffee and join us if you would like to contribute.
|
|
6
|
+
|
|
7
|
+
Currently we are building a backend which can be reached by other services/repos with a tRPC client.
|
|
8
|
+
If you are using another language than TS... then you might fullfil a PR and implement gRPC (are you sure u want pain?).
|
package/lib/index.d.mts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as _trpc_server from '@trpc/server';
|
|
2
|
+
|
|
3
|
+
declare const TRPC_PATH = "/api/trpc";
|
|
4
|
+
|
|
5
|
+
declare const appRouter: _trpc_server.CreateRouterInner<_trpc_server.RootConfig<{
|
|
6
|
+
ctx: object;
|
|
7
|
+
meta: object;
|
|
8
|
+
errorShape: _trpc_server.DefaultErrorShape;
|
|
9
|
+
transformer: _trpc_server.DefaultDataTransformer;
|
|
10
|
+
}>, {
|
|
11
|
+
add: _trpc_server.BuildProcedure<"query", {
|
|
12
|
+
_config: _trpc_server.RootConfig<{
|
|
13
|
+
ctx: object;
|
|
14
|
+
meta: object;
|
|
15
|
+
errorShape: _trpc_server.DefaultErrorShape;
|
|
16
|
+
transformer: _trpc_server.DefaultDataTransformer;
|
|
17
|
+
}>;
|
|
18
|
+
_meta: object;
|
|
19
|
+
_ctx_out: object;
|
|
20
|
+
_input_in: number[];
|
|
21
|
+
_input_out: number[];
|
|
22
|
+
_output_in: typeof _trpc_server.unsetMarker;
|
|
23
|
+
_output_out: typeof _trpc_server.unsetMarker;
|
|
24
|
+
}, number>;
|
|
25
|
+
}>;
|
|
26
|
+
type AppRouter = typeof appRouter;
|
|
27
|
+
|
|
28
|
+
export { type AppRouter, TRPC_PATH };
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as _trpc_server from '@trpc/server';
|
|
2
|
+
|
|
3
|
+
declare const TRPC_PATH = "/api/trpc";
|
|
4
|
+
|
|
5
|
+
declare const appRouter: _trpc_server.CreateRouterInner<_trpc_server.RootConfig<{
|
|
6
|
+
ctx: object;
|
|
7
|
+
meta: object;
|
|
8
|
+
errorShape: _trpc_server.DefaultErrorShape;
|
|
9
|
+
transformer: _trpc_server.DefaultDataTransformer;
|
|
10
|
+
}>, {
|
|
11
|
+
add: _trpc_server.BuildProcedure<"query", {
|
|
12
|
+
_config: _trpc_server.RootConfig<{
|
|
13
|
+
ctx: object;
|
|
14
|
+
meta: object;
|
|
15
|
+
errorShape: _trpc_server.DefaultErrorShape;
|
|
16
|
+
transformer: _trpc_server.DefaultDataTransformer;
|
|
17
|
+
}>;
|
|
18
|
+
_meta: object;
|
|
19
|
+
_ctx_out: object;
|
|
20
|
+
_input_in: number[];
|
|
21
|
+
_input_out: number[];
|
|
22
|
+
_output_in: typeof _trpc_server.unsetMarker;
|
|
23
|
+
_output_out: typeof _trpc_server.unsetMarker;
|
|
24
|
+
}, number>;
|
|
25
|
+
}>;
|
|
26
|
+
type AppRouter = typeof appRouter;
|
|
27
|
+
|
|
28
|
+
export { type AppRouter, TRPC_PATH };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/constants.ts"],"sourcesContent":["export const TRPC_PATH = \"/api/trpc\";\n"],"mappings":";;;AAAO,MAAM,YAAY;","names":[]}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
TRPC_PATH: () => TRPC_PATH
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(index_exports);
|
|
26
|
+
|
|
27
|
+
// src/constants.ts
|
|
28
|
+
var TRPC_PATH = "/api/trpc";
|
|
29
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
+
0 && (module.exports = {
|
|
31
|
+
TRPC_PATH
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/constants.ts"],"sourcesContent":["export { TRPC_PATH } from \"./constants\"\nexport { type AppRouter } from \"./router\"\n","export const TRPC_PATH = \"/api/trpc\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,YAAY;","names":[]}
|
package/lib/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/constants.ts"],"sourcesContent":["export const TRPC_PATH = \"/api/trpc\";\n"],"mappings":";AAAO,IAAM,YAAY;","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@polinetwork/backend",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "PoliNetwork backend server",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"types": "lib/index.d.ts",
|
|
7
|
+
"module": "lib/index.esm.js",
|
|
8
|
+
"files": [
|
|
9
|
+
"lib"
|
|
10
|
+
],
|
|
11
|
+
"private": false,
|
|
12
|
+
"keywords": [],
|
|
13
|
+
"author": "PoliNetwork APS",
|
|
14
|
+
"license": "ISC",
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@types/node": "^22.13.1",
|
|
17
|
+
"tsc-alias": "^1.8.10",
|
|
18
|
+
"tsup": "^8.3.6",
|
|
19
|
+
"tsx": "^4.19.2",
|
|
20
|
+
"typescript": "^5.7.3"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@trpc/server": "^10.45.2",
|
|
24
|
+
"fastify": "^5.2.1",
|
|
25
|
+
"zod": "^3.24.1"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build:server": "NODE_ENV=production tsc",
|
|
29
|
+
"build:npm": "NODE_ENV=production tsup",
|
|
30
|
+
"dev": "NODE_ENV=development tsx watch src/server.ts",
|
|
31
|
+
"start": "NODE_ENV=production node dist/index.js"
|
|
32
|
+
}
|
|
33
|
+
}
|