@llun/activities.schema 0.2.0 → 0.2.2

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.
Binary file
package/package.json CHANGED
@@ -1,17 +1,10 @@
1
1
  {
2
2
  "name": "@llun/activities.schema",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Validate ActivityPub and Mastodon with Zod",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
7
- "types": "dist/esm/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "require": "./dist/cjs/index.js",
11
- "import": "./dist/esm/index.mjs",
12
- "types": "./dist/cjs/index.d.ts"
13
- }
14
- },
7
+ "types": "dist/types/index.d.ts",
15
8
  "type": "module",
16
9
  "scripts": {
17
10
  "build": "mkdir -p dist && tsc --module commonjs --outDir dist/cjs && tsc --module node16 --outDir dist/esm && tsc --emitDeclarationOnly --declaration --moduleResolution node16 --module node16 --outDir dist/types",
@@ -23,7 +16,7 @@
23
16
  "zod": "^3.23.8"
24
17
  },
25
18
  "devDependencies": {
26
- "typescript": "^5.4.5"
19
+ "typescript": "^5.5.4"
27
20
  },
28
- "packageManager": "yarn@4.2.2"
21
+ "packageManager": "yarn@4.4.1"
29
22
  }
@@ -0,0 +1,13 @@
1
+ import { z } from "zod";
2
+
3
+ export const Announce = z.object({
4
+ type: z.literal("Announce"),
5
+ id: z.string(),
6
+ actor: z.string(),
7
+
8
+ published: z.string({ description: "Object published datetime" }),
9
+ to: z.union([z.string(), z.string().array()]),
10
+ cc: z.union([z.string(), z.string().array()]),
11
+ object: z.string(),
12
+ });
13
+ export type Announce = z.infer<typeof Announce>;
package/tsconfig.json CHANGED
@@ -7,7 +7,9 @@
7
7
  "noEmitOnError": true,
8
8
  "strict": true,
9
9
  "resolveJsonModule": false,
10
- "isolatedModules": true
10
+ "isolatedModules": true,
11
+ "moduleResolution": "NodeNext",
12
+ "module": "NodeNext"
11
13
  },
12
14
  "include": ["src"]
13
15
  }