@tripsam/main 1.0.4 → 2.0.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/dist/index.cjs +40 -0
- package/dist/index.d.cts +16 -0
- package/dist/index.d.ts +16 -5
- package/dist/index.js +19 -5
- package/package.json +16 -7
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
Auth: () => auth_exports
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(index_exports);
|
|
26
|
+
|
|
27
|
+
// src/auth.ts
|
|
28
|
+
var auth_exports = {};
|
|
29
|
+
__export(auth_exports, {
|
|
30
|
+
Auth: () => Auth
|
|
31
|
+
});
|
|
32
|
+
var import_zod = require("zod");
|
|
33
|
+
var Auth = import_zod.z.object({
|
|
34
|
+
email: import_zod.z.string().email(),
|
|
35
|
+
password: import_zod.z.string().min(8).max(64)
|
|
36
|
+
}).strict();
|
|
37
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
38
|
+
0 && (module.exports = {
|
|
39
|
+
Auth
|
|
40
|
+
});
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/** Example schema you can extend */
|
|
4
|
+
declare const Auth: z.ZodObject<{
|
|
5
|
+
email: z.ZodString;
|
|
6
|
+
password: z.ZodString;
|
|
7
|
+
}, z.core.$strict>;
|
|
8
|
+
type AuthType = z.infer<typeof Auth>;
|
|
9
|
+
|
|
10
|
+
declare const auth_Auth: typeof Auth;
|
|
11
|
+
type auth_AuthType = AuthType;
|
|
12
|
+
declare namespace auth {
|
|
13
|
+
export { auth_Auth as Auth, type auth_AuthType as AuthType };
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { auth as Auth };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/** Example schema you can extend */
|
|
4
|
+
declare const Auth: z.ZodObject<{
|
|
5
|
+
email: z.ZodString;
|
|
6
|
+
password: z.ZodString;
|
|
7
|
+
}, z.core.$strict>;
|
|
8
|
+
type AuthType = z.infer<typeof Auth>;
|
|
9
|
+
|
|
10
|
+
declare const auth_Auth: typeof Auth;
|
|
11
|
+
type auth_AuthType = AuthType;
|
|
12
|
+
declare namespace auth {
|
|
13
|
+
export { auth_Auth as Auth, type auth_AuthType as AuthType };
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { auth as Auth };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __export = (target, all) => {
|
|
3
|
+
for (var name in all)
|
|
4
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
// src/auth.ts
|
|
8
|
+
var auth_exports = {};
|
|
9
|
+
__export(auth_exports, {
|
|
10
|
+
Auth: () => Auth
|
|
11
|
+
});
|
|
12
|
+
import { z } from "zod";
|
|
13
|
+
var Auth = z.object({
|
|
14
|
+
email: z.string().email(),
|
|
15
|
+
password: z.string().min(8).max(64)
|
|
16
|
+
}).strict();
|
|
17
|
+
export {
|
|
18
|
+
auth_exports as Auth
|
|
19
|
+
};
|
package/package.json
CHANGED
|
@@ -1,22 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tripsam/main",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"type": "module",
|
|
5
|
+
"main": "./dist/index.cjs",
|
|
6
|
+
"module": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
5
8
|
"exports": {
|
|
6
|
-
".": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"require": "./dist/index.cjs"
|
|
13
|
+
}
|
|
7
14
|
},
|
|
8
15
|
"files": ["dist/"],
|
|
9
|
-
"dependencies": {
|
|
10
|
-
"@tripsam/types": "^1.0.0"
|
|
11
|
-
},
|
|
12
16
|
"scripts": {
|
|
13
|
-
"build": "
|
|
17
|
+
"build": "tsup src/index.ts --dts --format esm,cjs --out-dir dist --clean --splitting false",
|
|
14
18
|
"clean": "rimraf dist",
|
|
15
19
|
"prepublishOnly": "npm run clean && npm run build"
|
|
16
20
|
},
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"zod": "^4.0.0"
|
|
23
|
+
},
|
|
17
24
|
"devDependencies": {
|
|
25
|
+
"tsup": "^8.0.0",
|
|
18
26
|
"typescript": "^5.5.4",
|
|
19
|
-
"rimraf": "^5.0.0"
|
|
27
|
+
"rimraf": "^5.0.0",
|
|
28
|
+
"zod": "^4.1.11"
|
|
20
29
|
},
|
|
21
30
|
"publishConfig": { "access": "public" }
|
|
22
31
|
}
|