@xentom/integration-framework 0.0.2 → 0.0.4

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.
Files changed (2) hide show
  1. package/dist/utils.d.ts +2 -1
  2. package/package.json +1 -2
package/dist/utils.d.ts CHANGED
@@ -1,8 +1,9 @@
1
+ import { type StandardSchemaV1 } from '@standard-schema/spec';
1
2
  export type HasRequiredKeys<T> = keyof T extends never ? false : {
2
3
  [K in keyof T]-?: undefined extends T[K] ? false : true;
3
4
  }[keyof T] extends true ? true : false;
4
5
  export type ContainsFunction<T> = [Extract<T, Function>] extends [never] ? false : true;
5
- export type Serialize<T> = ContainsFunction<T> extends true ? SerializeFunction<T> : T extends object ? SerializeObject<T> : T;
6
+ export type Serialize<T> = T extends StandardSchemaV1 ? true : ContainsFunction<T> extends true ? SerializeFunction<T> : T extends object ? SerializeObject<T> : T;
6
7
  export type SerializeFunction<T> = ContainsFunction<T> extends true ? true | Exclude<T, Function> : T;
7
8
  export type SerializeObject<T extends object> = {
8
9
  [K in keyof T]: Serialize<T[K]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xentom/integration-framework",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -12,7 +12,6 @@
12
12
  "format": "prettier --check . --ignore-path ../../.gitignore",
13
13
  "typecheck": "tsc --noEmit",
14
14
  "clean": "git clean -xdf .cache .turbo node_modules dist",
15
- "postinstall": "tsc",
16
15
  "build": "tsc"
17
16
  },
18
17
  "files": [