@liria24/og-image 1.0.1 → 1.1.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/client.d.mts CHANGED
@@ -1,8 +1,6 @@
1
+ type Preset = 'avatio' | 'liria';
2
+
1
3
  //#region src/client.d.ts
2
- type Presets = 'avatio';
3
- interface PresetVersions {
4
- avatio: 'v1';
5
- }
6
4
  interface RequestOgImageOptions<TProps = unknown> {
7
5
  /**
8
6
  * @default https://og.liria.me
@@ -12,19 +10,17 @@ interface RequestOgImageOptions<TProps = unknown> {
12
10
  * @default process.env.OG_IMAGE_SECRET
13
11
  */
14
12
  secret?: string;
15
- preset: Presets;
16
- version: PresetVersions[Presets];
13
+ preset: Preset;
17
14
  props: TProps;
18
15
  }
19
16
  interface IssueImageResponse {
20
17
  url: string;
21
18
  }
22
- declare const requestOgImage: ({
19
+ declare const requestOgImage: <TProps = unknown>({
23
20
  preset,
24
- version,
25
21
  props,
26
22
  endpoint,
27
23
  secret
28
- }: RequestOgImageOptions) => Promise<IssueImageResponse>;
24
+ }: RequestOgImageOptions<TProps>) => Promise<IssueImageResponse>;
29
25
  //#endregion
30
26
  export { IssueImageResponse, RequestOgImageOptions, requestOgImage };
package/dist/client.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ofetch } from "ofetch";
2
2
  //#region src/client.ts
3
- const requestOgImage = async ({ preset, version, props, endpoint = "https://og.liria.me", secret = process.env.OG_IMAGE_SECRET || "" }) => ofetch(`/images/${encodeURIComponent(preset)}/${encodeURIComponent(version)}`, {
3
+ const requestOgImage = async ({ preset, props, endpoint = "https://og.liria.me", secret = process.env.OG_IMAGE_SECRET || "" }) => ofetch(`/images/${encodeURIComponent(preset)}`, {
4
4
  baseURL: endpoint,
5
5
  method: "POST",
6
6
  headers: { "content-type": "application/json" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liria24/og-image",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "OG image generation server",
5
5
  "bugs": {
6
6
  "url": "https://github.com/liria24/og-image/issues"
@@ -45,20 +45,20 @@
45
45
  "ofetch": "^2.0.0-alpha.3"
46
46
  },
47
47
  "devDependencies": {
48
- "@cloudflare/workers-types": "^4.20260608.1",
49
- "@types/node": "^25.9.2",
48
+ "@cloudflare/workers-types": "^4.20260610.1",
49
+ "@types/node": "^25.9.3",
50
50
  "bumpp": "^11.1.0",
51
51
  "http-status-codes": "^2.3.0",
52
- "nitro": "3.0.260603-beta",
52
+ "nitro": "3.0.260610-beta",
53
53
  "oxfmt": "^0.54.0",
54
54
  "oxlint": "^1.69.0",
55
55
  "oxlint-tsgolint": "^0.23.0",
56
- "takumi-js": "^1.7.0",
56
+ "takumi-js": "^1.8.1",
57
57
  "taze": "^19.14.1",
58
58
  "tsdown": "^0.22.2",
59
59
  "typescript": "6.0.3",
60
60
  "valibot": "^1.4.1",
61
61
  "vitest": "^4.1.8",
62
- "wrangler": "^4.98.0"
62
+ "wrangler": "^4.99.0"
63
63
  }
64
64
  }