@rg-dev/stdlib 1.0.48 → 1.0.50

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/lib/index.cjs ADDED
@@ -0,0 +1,25 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/index.ts
20
+ var index_exports = {};
21
+ __export(index_exports, {
22
+ VERSION: () => VERSION
23
+ });
24
+ module.exports = __toCommonJS(index_exports);
25
+ var VERSION = "1";
package/lib/index.js ADDED
@@ -0,0 +1,5 @@
1
+ // src/index.ts
2
+ var VERSION = "1";
3
+ export {
4
+ VERSION
5
+ };
@@ -1,40 +1,11 @@
1
- import * as express from 'express';
2
- import * as _trpc_server from '@trpc/server';
3
1
  import { initTRPC } from '@trpc/server';
4
- import * as _trpc_server_unstable_core_do_not_import from '@trpc/server/unstable-core-do-not-import';
5
2
  import * as trpcExpress from '@trpc/server/adapters/express';
3
+ import { Handler } from 'express';
6
4
 
7
5
  type TrpcExpressRootType = ReturnType<ReturnType<typeof initTRPC.context<trpcExpress.CreateExpressContextOptions>>['create']>;
8
6
  declare class TrpcServerHelpers {
9
- static createExpressTrpcServer(): {
10
- _config: _trpc_server_unstable_core_do_not_import.RootConfig<{
11
- ctx: trpcExpress.CreateExpressContextOptions;
12
- meta: object;
13
- errorShape: _trpc_server_unstable_core_do_not_import.DefaultErrorShape;
14
- transformer: false;
15
- }>;
16
- procedure: _trpc_server_unstable_core_do_not_import.ProcedureBuilder<trpcExpress.CreateExpressContextOptions, object, object, typeof _trpc_server_unstable_core_do_not_import.unsetMarker, typeof _trpc_server_unstable_core_do_not_import.unsetMarker, typeof _trpc_server_unstable_core_do_not_import.unsetMarker, typeof _trpc_server_unstable_core_do_not_import.unsetMarker, false>;
17
- middleware: <$ContextOverrides>(fn: _trpc_server_unstable_core_do_not_import.MiddlewareFunction<trpcExpress.CreateExpressContextOptions, object, object, $ContextOverrides, unknown>) => _trpc_server_unstable_core_do_not_import.MiddlewareBuilder<trpcExpress.CreateExpressContextOptions, object, $ContextOverrides, unknown>;
18
- router: <TInput extends _trpc_server_unstable_core_do_not_import.CreateRouterOptions>(input: TInput) => _trpc_server_unstable_core_do_not_import.BuiltRouter<{
19
- ctx: trpcExpress.CreateExpressContextOptions;
20
- meta: object;
21
- errorShape: _trpc_server_unstable_core_do_not_import.DefaultErrorShape;
22
- transformer: false;
23
- }, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<TInput>>;
24
- mergeRouters: typeof _trpc_server_unstable_core_do_not_import.mergeRouters;
25
- createCallerFactory: <TRecord extends _trpc_server.RouterRecord>(router: Pick<_trpc_server_unstable_core_do_not_import.Router<{
26
- ctx: trpcExpress.CreateExpressContextOptions;
27
- meta: object;
28
- errorShape: _trpc_server_unstable_core_do_not_import.DefaultErrorShape;
29
- transformer: false;
30
- }, TRecord>, "_def">) => _trpc_server_unstable_core_do_not_import.RouterCaller<{
31
- ctx: trpcExpress.CreateExpressContextOptions;
32
- meta: object;
33
- errorShape: _trpc_server_unstable_core_do_not_import.DefaultErrorShape;
34
- transformer: false;
35
- }, TRecord>;
36
- };
37
- static createTrpcExpressMiddleware(opts: Omit<Parameters<typeof trpcExpress.createExpressMiddleware>[0], 'createContext'>): express.Handler;
7
+ static createExpressTrpcServer(): TrpcExpressRootType;
8
+ static createTrpcExpressMiddleware(opts: Omit<Parameters<typeof trpcExpress.createExpressMiddleware>[0], 'createContext'>): Handler;
38
9
  }
39
10
 
40
11
  export { type TrpcExpressRootType, TrpcServerHelpers };
@@ -1,40 +1,11 @@
1
- import * as express from 'express';
2
- import * as _trpc_server from '@trpc/server';
3
1
  import { initTRPC } from '@trpc/server';
4
- import * as _trpc_server_unstable_core_do_not_import from '@trpc/server/unstable-core-do-not-import';
5
2
  import * as trpcExpress from '@trpc/server/adapters/express';
3
+ import { Handler } from 'express';
6
4
 
7
5
  type TrpcExpressRootType = ReturnType<ReturnType<typeof initTRPC.context<trpcExpress.CreateExpressContextOptions>>['create']>;
8
6
  declare class TrpcServerHelpers {
9
- static createExpressTrpcServer(): {
10
- _config: _trpc_server_unstable_core_do_not_import.RootConfig<{
11
- ctx: trpcExpress.CreateExpressContextOptions;
12
- meta: object;
13
- errorShape: _trpc_server_unstable_core_do_not_import.DefaultErrorShape;
14
- transformer: false;
15
- }>;
16
- procedure: _trpc_server_unstable_core_do_not_import.ProcedureBuilder<trpcExpress.CreateExpressContextOptions, object, object, typeof _trpc_server_unstable_core_do_not_import.unsetMarker, typeof _trpc_server_unstable_core_do_not_import.unsetMarker, typeof _trpc_server_unstable_core_do_not_import.unsetMarker, typeof _trpc_server_unstable_core_do_not_import.unsetMarker, false>;
17
- middleware: <$ContextOverrides>(fn: _trpc_server_unstable_core_do_not_import.MiddlewareFunction<trpcExpress.CreateExpressContextOptions, object, object, $ContextOverrides, unknown>) => _trpc_server_unstable_core_do_not_import.MiddlewareBuilder<trpcExpress.CreateExpressContextOptions, object, $ContextOverrides, unknown>;
18
- router: <TInput extends _trpc_server_unstable_core_do_not_import.CreateRouterOptions>(input: TInput) => _trpc_server_unstable_core_do_not_import.BuiltRouter<{
19
- ctx: trpcExpress.CreateExpressContextOptions;
20
- meta: object;
21
- errorShape: _trpc_server_unstable_core_do_not_import.DefaultErrorShape;
22
- transformer: false;
23
- }, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<TInput>>;
24
- mergeRouters: typeof _trpc_server_unstable_core_do_not_import.mergeRouters;
25
- createCallerFactory: <TRecord extends _trpc_server.RouterRecord>(router: Pick<_trpc_server_unstable_core_do_not_import.Router<{
26
- ctx: trpcExpress.CreateExpressContextOptions;
27
- meta: object;
28
- errorShape: _trpc_server_unstable_core_do_not_import.DefaultErrorShape;
29
- transformer: false;
30
- }, TRecord>, "_def">) => _trpc_server_unstable_core_do_not_import.RouterCaller<{
31
- ctx: trpcExpress.CreateExpressContextOptions;
32
- meta: object;
33
- errorShape: _trpc_server_unstable_core_do_not_import.DefaultErrorShape;
34
- transformer: false;
35
- }, TRecord>;
36
- };
37
- static createTrpcExpressMiddleware(opts: Omit<Parameters<typeof trpcExpress.createExpressMiddleware>[0], 'createContext'>): express.Handler;
7
+ static createExpressTrpcServer(): TrpcExpressRootType;
8
+ static createTrpcExpressMiddleware(opts: Omit<Parameters<typeof trpcExpress.createExpressMiddleware>[0], 'createContext'>): Handler;
38
9
  }
39
10
 
40
11
  export { type TrpcExpressRootType, TrpcServerHelpers };
@@ -19,9 +19,7 @@ var __spreadValues = (a, b) => {
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
 
21
21
  // src/trpc-helpers.ts
22
- import {
23
- initTRPC
24
- } from "@trpc/server";
22
+ import { initTRPC } from "@trpc/server";
25
23
  import * as trpcExpress from "@trpc/server/adapters/express";
26
24
  import superjson from "superjson";
27
25
  var TrpcServerHelpers = class {
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@rg-dev/stdlib",
3
- "version": "1.0.48",
3
+ "version": "1.0.50",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
7
- "build": "tsup && node after-build.mjs"
7
+ "build": "tsup && node after-build.mjs",
8
+ "ts":"tsdown"
8
9
  },
9
10
  "author": "",
10
11
  "license": "ISC",
@@ -30,9 +31,17 @@
30
31
  ]
31
32
  }
32
33
  },
33
- "types": "./lib/index.d.cts",
34
+ "types": "./lib/index.d.ts",
34
35
  "type": "module",
35
36
  "exports": {
37
+
38
+ ".":{
39
+ "import": "./lib/index.js",
40
+ "require": "./lib/index.cjs",
41
+ "types": "./lib/index.d.ts"
42
+ },
43
+
44
+
36
45
  "./lib/trpc-helpers": {
37
46
  "import": "./lib/trpc-helpers.js",
38
47
  "require": "./lib/trpc-helpers.cjs",
@@ -65,6 +74,7 @@
65
74
  "access": "public"
66
75
  },
67
76
  "devDependencies": {
77
+ "tsdown": "^0.19.0",
68
78
  "@trpc/server": "^11.1.1",
69
79
  "@types/command-exists": "^1.2.3",
70
80
  "@types/express": "^5.0.6",