@stacksjs/types 0.39.1 → 0.41.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.
@@ -0,0 +1,2 @@
1
+ import type { PrismaClient } from '@prisma/client';
2
+ export declare type DatabaseClient = PrismaClient;
File without changes
package/dist/index.d.ts CHANGED
@@ -3,6 +3,7 @@ export * from './auto-imports';
3
3
  export * from './build';
4
4
  export * from './components';
5
5
  export * from './cli';
6
+ export * from './database';
6
7
  export * from './deploy';
7
8
  export * from './docs';
8
9
  export * from './errors';
@@ -20,3 +21,4 @@ export * from './pages';
20
21
  export * from './pwa';
21
22
  export * from './ssg';
22
23
  export * from './ui';
24
+ export * from './utils';
package/dist/index.mjs CHANGED
@@ -3,6 +3,7 @@ export * from "./auto-imports.mjs";
3
3
  export * from "./build.mjs";
4
4
  export * from "./components.mjs";
5
5
  export * from "./cli.mjs";
6
+ export * from "./database.mjs";
6
7
  export * from "./deploy.mjs";
7
8
  export * from "./docs.mjs";
8
9
  export * from "./errors.mjs";
@@ -20,3 +21,4 @@ export * from "./pages.mjs";
20
21
  export * from "./pwa.mjs";
21
22
  export * from "./ssg.mjs";
22
23
  export * from "./ui.mjs";
24
+ export * from "./utils.mjs";
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Promise, or maybe not
3
+ */
4
+ export declare type Awaitable<T> = T | PromiseLike<T>;
5
+ /**
6
+ * Null or whatever
7
+ */
8
+ export declare type Nullable<T> = T | null | undefined;
9
+ /**
10
+ * Array, or not yet
11
+ */
12
+ export declare type Arrayable<T> = T | Array<T>;
13
+ /**
14
+ * Function
15
+ */
16
+ export declare type Fn<T = void> = () => T;
17
+ /**
18
+ * Constructor
19
+ */
20
+ export declare type Constructor<T = void> = new (...args: any[]) => T;
21
+ /**
22
+ * Infers the element type of an array
23
+ */
24
+ export declare type ElementOf<T> = T extends (infer E)[] ? E : never;
25
+ /**
26
+ * Defines an intersection type of all union items.
27
+ *
28
+ * @param U Union of any types that will be intersected.
29
+ * @returns U items intersected
30
+ * @see https://stackoverflow.com/a/50375286/9259330
31
+ */
32
+ export declare type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
33
+ /**
34
+ * Infers the arguments type of a function
35
+ */
36
+ export declare type ArgumentsType<T> = T extends ((...args: infer A) => any) ? A : never;
37
+ export declare type MergeInsertions<T> = T extends object ? {
38
+ [K in keyof T]: MergeInsertions<T[K]>;
39
+ } : T;
40
+ export declare type DeepMerge<F, S> = MergeInsertions<{
41
+ [K in keyof F | keyof S]: K extends keyof S & keyof F ? DeepMerge<F[K], S[K]> : K extends keyof S ? S[K] : K extends keyof F ? F[K] : never;
42
+ }>;
package/dist/utils.mjs ADDED
File without changes
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@stacksjs/types",
3
3
  "type": "module",
4
- "version": "0.39.1",
5
- "packageManager": "pnpm@7.15.0",
4
+ "version": "0.41.0",
5
+ "packageManager": "pnpm@7.16.0",
6
6
  "description": "The Stacks framework types.",
7
7
  "author": "Chris Breuer",
8
8
  "license": "MIT",
@@ -34,7 +34,7 @@
34
34
  ],
35
35
  "engines": {
36
36
  "node": ">=v18.12.1",
37
- "pnpm": ">=7.15.0"
37
+ "pnpm": ">=7.16.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@mdit-vue/plugin-component": "^0.11.1",
@@ -53,14 +53,14 @@
53
53
  "@types/prompts": "^2.4.1",
54
54
  "cac": "^6.7.14",
55
55
  "markdown-it": "^13.0.1",
56
- "mkdist": "^0.4.0",
56
+ "mkdist": "^1.0.0",
57
57
  "typescript": "^4.8.4",
58
58
  "unplugin-auto-import": "^0.11.4",
59
59
  "unplugin-vue-components": "^0.22.9",
60
- "vite-plugin-inspect": "^0.7.7",
60
+ "vite-plugin-inspect": "^0.7.8",
61
61
  "vite-plugin-vue-layouts": "^0.7.0",
62
62
  "vite-ssg": "^0.21.2",
63
- "vitepress": "1.0.0-alpha.28"
63
+ "vitepress": "1.0.0-alpha.29"
64
64
  },
65
65
  "scripts": {
66
66
  "build": "mkdist -d",