@codingwith/common-app 1.0.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.
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/package.json +16 -0
- package/tsconfig.json +44 -0
- package/tsconfig.tsbuildinfo +1 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
declare const check: z.ZodObject<{
|
|
3
|
+
email: z.ZodString;
|
|
4
|
+
password: z.ZodString;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
declare const transcheck: z.ZodObject<{
|
|
7
|
+
amount: z.ZodNumber;
|
|
8
|
+
type: z.ZodEnum<{
|
|
9
|
+
income: "income";
|
|
10
|
+
expense: "expense";
|
|
11
|
+
}>;
|
|
12
|
+
categoryId: z.ZodString;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
declare const categorycheck: z.ZodObject<{
|
|
15
|
+
name: z.ZodString;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
export type Check = z.infer<typeof check>;
|
|
18
|
+
export type Trancheck = z.infer<typeof transcheck>;
|
|
19
|
+
export type Categorycheck = z.infer<typeof categorycheck>;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,CAAC,EAAC,MAAM,KAAK,CAAC;AAE9B,QAAA,MAAO,KAAK;;;iBAGV,CAAA;AAEF,QAAA,MAAM,UAAU;;;;;;;iBAId,CAAA;AACF,QAAA,MAAM,aAAa;;iBAEjB,CAAA;AAGF,MAAM,MAAM,KAAK,GAAC,CAAC,CAAC,KAAK,CAAC,OAAO,KAAK,CAAC,CAAA;AACvC,MAAM,MAAM,SAAS,GAAC,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAA;AAChD,MAAM,MAAM,aAAa,GAAC,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { number, z } from "zod";
|
|
2
|
+
const check = z.object({
|
|
3
|
+
email: z.string().email(),
|
|
4
|
+
password: z.string().min(6)
|
|
5
|
+
});
|
|
6
|
+
const transcheck = z.object({
|
|
7
|
+
amount: z.number().positive("Amount must be greater than 0"),
|
|
8
|
+
type: z.enum(["income", "expense"]),
|
|
9
|
+
categoryId: z.string().min(1, "category is required")
|
|
10
|
+
});
|
|
11
|
+
const categorycheck = z.object({
|
|
12
|
+
name: z.string().min(1, "category name is required").max(50, "too long")
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,CAAC,EAAC,MAAM,KAAK,CAAC;AAE9B,MAAO,KAAK,GAAC,CAAC,CAAC,MAAM,CAAC;IACpB,KAAK,EAAC,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE;IACxB,QAAQ,EAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC3B,CAAC,CAAA;AAEF,MAAM,UAAU,GAAC,CAAC,CAAC,MAAM,CAAC;IACvB,MAAM,EAAC,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;IAC3D,IAAI,EAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAC,SAAS,CAAC,CAAC;IACjC,UAAU,EAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAC,sBAAsB,CAAC;CACrD,CAAC,CAAA;AACF,MAAM,aAAa,GAAC,CAAC,CAAC,MAAM,CAAC;IACzB,IAAI,EAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAC,2BAA2B,CAAC,CAAC,GAAG,CAAC,EAAE,EAAC,UAAU,CAAC;CACxE,CAAC,CAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@codingwith/common-app",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [],
|
|
10
|
+
"author": "",
|
|
11
|
+
"license": "ISC",
|
|
12
|
+
"description": "",
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"zod": "^4.3.6"
|
|
15
|
+
}
|
|
16
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
// Visit https://aka.ms/tsconfig to read more about this file
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
// File Layout
|
|
5
|
+
"rootDir": "./src",
|
|
6
|
+
"outDir": "./dist",
|
|
7
|
+
|
|
8
|
+
// Environment Settings
|
|
9
|
+
// See also https://aka.ms/tsconfig/module
|
|
10
|
+
"module": "nodenext",
|
|
11
|
+
"target": "esnext",
|
|
12
|
+
"types": [],
|
|
13
|
+
// For nodejs:
|
|
14
|
+
// "lib": ["esnext"],
|
|
15
|
+
// "types": ["node"],
|
|
16
|
+
// and npm install -D @types/node
|
|
17
|
+
|
|
18
|
+
// Other Outputs
|
|
19
|
+
"sourceMap": true,
|
|
20
|
+
"declaration": true,
|
|
21
|
+
"declarationMap": true,
|
|
22
|
+
|
|
23
|
+
// Stricter Typechecking Options
|
|
24
|
+
"noUncheckedIndexedAccess": true,
|
|
25
|
+
"exactOptionalPropertyTypes": true,
|
|
26
|
+
|
|
27
|
+
// Style Options
|
|
28
|
+
// "noImplicitReturns": true,
|
|
29
|
+
// "noImplicitOverride": true,
|
|
30
|
+
// "noUnusedLocals": true,
|
|
31
|
+
// "noUnusedParameters": true,
|
|
32
|
+
// "noFallthroughCasesInSwitch": true,
|
|
33
|
+
// "noPropertyAccessFromIndexSignature": true,
|
|
34
|
+
|
|
35
|
+
// Recommended Options
|
|
36
|
+
"strict": true,
|
|
37
|
+
"jsx": "react-jsx",
|
|
38
|
+
"verbatimModuleSyntax": true,
|
|
39
|
+
"isolatedModules": true,
|
|
40
|
+
"noUncheckedSideEffectImports": true,
|
|
41
|
+
"moduleDetection": "force",
|
|
42
|
+
"skipLibCheck": true,
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"root":["./src/index.ts"],"version":"5.9.3"}
|