@inneranimalmedia/agentsam-image-delivery 0.0.0-stage → 2.6.10
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/LICENSE +21 -0
- package/dist/index.d.ts +83 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +142 -0
- package/dist/index.js.map +1 -0
- package/package.json +33 -4
- package/README.md +0 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Inner Animal Media
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export type FetchLike = (input: string, init?: RequestInit) => Promise<Response>;
|
|
2
|
+
export interface CloudflareImagesCredentials {
|
|
3
|
+
accountId: string;
|
|
4
|
+
accountHash: string;
|
|
5
|
+
apiToken: string;
|
|
6
|
+
tokenEnv: string | null;
|
|
7
|
+
tokenConfigured: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface CloudflareImagesEnv {
|
|
10
|
+
CLOUDFLARE_ACCOUNT_ID?: string;
|
|
11
|
+
CLOUDFLARE_IMAGES_ACCOUNT_HASH?: string;
|
|
12
|
+
CLOUDFLARE_IMAGES_API_TOKEN?: string;
|
|
13
|
+
CLOUDFLARE_API_TOKEN?: string;
|
|
14
|
+
CLOUDFLARE_IMAGES_TOKEN?: string;
|
|
15
|
+
[key: string]: string | undefined;
|
|
16
|
+
}
|
|
17
|
+
/** Resolve CF Images credentials from an env-like bag. Never validate token shape. */
|
|
18
|
+
export declare function resolveCloudflareImagesCredentials(env?: CloudflareImagesEnv): CloudflareImagesCredentials;
|
|
19
|
+
export declare function cloudflareImagesDeliveryBase(accountHash: string): string | null;
|
|
20
|
+
export declare function cloudflareImageUrl(opts: {
|
|
21
|
+
accountHash: string;
|
|
22
|
+
imageId: string;
|
|
23
|
+
variant?: string;
|
|
24
|
+
}): string | null;
|
|
25
|
+
export declare function cloudflareImagesApiBase(accountId: string, baseUrl?: string): string;
|
|
26
|
+
export interface CloudflareImagesTransportConfig {
|
|
27
|
+
accountId: string;
|
|
28
|
+
apiToken: string;
|
|
29
|
+
deliveryHash: string;
|
|
30
|
+
fetch?: FetchLike;
|
|
31
|
+
baseUrl?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface CfImageRecord {
|
|
34
|
+
id: string;
|
|
35
|
+
filename?: string;
|
|
36
|
+
uploaded?: string;
|
|
37
|
+
meta?: Record<string, unknown>;
|
|
38
|
+
variants?: string[];
|
|
39
|
+
}
|
|
40
|
+
export interface DeliveryOptions {
|
|
41
|
+
variant?: string;
|
|
42
|
+
width?: number;
|
|
43
|
+
height?: number;
|
|
44
|
+
format?: string;
|
|
45
|
+
quality?: number;
|
|
46
|
+
dpr?: number;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Shared HTTP transport for Cloudflare Images.
|
|
50
|
+
* Content providers and Brand delivery adapters should wrap this — not duplicate it.
|
|
51
|
+
*/
|
|
52
|
+
export declare class CloudflareImagesTransport {
|
|
53
|
+
readonly accountId: string;
|
|
54
|
+
readonly deliveryHash: string;
|
|
55
|
+
readonly apiToken: string;
|
|
56
|
+
private readonly fetchImpl;
|
|
57
|
+
private readonly base;
|
|
58
|
+
constructor(config: CloudflareImagesTransportConfig);
|
|
59
|
+
authHeaders(): Record<string, string>;
|
|
60
|
+
deliveryUrl(ref: string, opts?: DeliveryOptions): string;
|
|
61
|
+
list(opts?: {
|
|
62
|
+
cursor?: string;
|
|
63
|
+
limit?: number;
|
|
64
|
+
}): Promise<{
|
|
65
|
+
images: CfImageRecord[];
|
|
66
|
+
nextCursor?: string;
|
|
67
|
+
}>;
|
|
68
|
+
head(ref: string): Promise<CfImageRecord | null>;
|
|
69
|
+
upload(input: {
|
|
70
|
+
name: string;
|
|
71
|
+
mime?: string;
|
|
72
|
+
bytes?: Uint8Array;
|
|
73
|
+
fromUrl?: string;
|
|
74
|
+
meta?: Record<string, unknown>;
|
|
75
|
+
}): Promise<CfImageRecord>;
|
|
76
|
+
delete(ref: string): Promise<void>;
|
|
77
|
+
stats(): Promise<{
|
|
78
|
+
ok: boolean;
|
|
79
|
+
status: number;
|
|
80
|
+
body: unknown;
|
|
81
|
+
}>;
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAA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AAC,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAChC,GAAG,OAAO,CAAC,aAAa,CAAC;IAyBpB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAUlC,KAAK,IAAI,OAAO,CAAC;QAAE,EAAE,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,OAAO,CAAA;KAAE,CAAC;CAKvE"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/** Resolve CF Images credentials from an env-like bag. Never validate token shape. */
|
|
2
|
+
export function resolveCloudflareImagesCredentials(env = {}) {
|
|
3
|
+
const accountId = String(env.CLOUDFLARE_ACCOUNT_ID || "").trim();
|
|
4
|
+
const accountHash = String(env.CLOUDFLARE_IMAGES_ACCOUNT_HASH || "").trim();
|
|
5
|
+
const tokenSource = env.CLOUDFLARE_IMAGES_API_TOKEN
|
|
6
|
+
? "CLOUDFLARE_IMAGES_API_TOKEN"
|
|
7
|
+
: env.CLOUDFLARE_API_TOKEN
|
|
8
|
+
? "CLOUDFLARE_API_TOKEN"
|
|
9
|
+
: env.CLOUDFLARE_IMAGES_TOKEN
|
|
10
|
+
? "CLOUDFLARE_IMAGES_TOKEN"
|
|
11
|
+
: null;
|
|
12
|
+
const apiToken = tokenSource ? String(env[tokenSource] || "").trim() : "";
|
|
13
|
+
return {
|
|
14
|
+
accountId,
|
|
15
|
+
accountHash,
|
|
16
|
+
apiToken,
|
|
17
|
+
tokenEnv: tokenSource,
|
|
18
|
+
tokenConfigured: Boolean(apiToken),
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export function cloudflareImagesDeliveryBase(accountHash) {
|
|
22
|
+
const hash = String(accountHash || "").trim();
|
|
23
|
+
if (!hash)
|
|
24
|
+
return null;
|
|
25
|
+
return `https://imagedelivery.net/${hash}`;
|
|
26
|
+
}
|
|
27
|
+
export function cloudflareImageUrl(opts) {
|
|
28
|
+
const hash = String(opts.accountHash || "").trim();
|
|
29
|
+
const id = String(opts.imageId || "").trim();
|
|
30
|
+
const v = String(opts.variant || "public").trim() || "public";
|
|
31
|
+
if (!hash || !id)
|
|
32
|
+
return null;
|
|
33
|
+
return `https://imagedelivery.net/${hash}/${id}/${v}`;
|
|
34
|
+
}
|
|
35
|
+
export function cloudflareImagesApiBase(accountId, baseUrl) {
|
|
36
|
+
if (baseUrl)
|
|
37
|
+
return baseUrl.replace(/\/$/, "");
|
|
38
|
+
return `https://api.cloudflare.com/client/v4/accounts/${accountId}/images/v1`;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Shared HTTP transport for Cloudflare Images.
|
|
42
|
+
* Content providers and Brand delivery adapters should wrap this — not duplicate it.
|
|
43
|
+
*/
|
|
44
|
+
export class CloudflareImagesTransport {
|
|
45
|
+
accountId;
|
|
46
|
+
deliveryHash;
|
|
47
|
+
apiToken;
|
|
48
|
+
fetchImpl;
|
|
49
|
+
base;
|
|
50
|
+
constructor(config) {
|
|
51
|
+
this.accountId = config.accountId;
|
|
52
|
+
this.deliveryHash = config.deliveryHash;
|
|
53
|
+
this.apiToken = config.apiToken;
|
|
54
|
+
this.fetchImpl = config.fetch ?? ((url, init) => fetch(url, init));
|
|
55
|
+
this.base = cloudflareImagesApiBase(config.accountId, config.baseUrl);
|
|
56
|
+
}
|
|
57
|
+
authHeaders() {
|
|
58
|
+
return { Authorization: `Bearer ${this.apiToken}` };
|
|
59
|
+
}
|
|
60
|
+
deliveryUrl(ref, opts) {
|
|
61
|
+
if (opts?.variant) {
|
|
62
|
+
return `https://imagedelivery.net/${this.deliveryHash}/${ref}/${opts.variant}`;
|
|
63
|
+
}
|
|
64
|
+
const params = [];
|
|
65
|
+
if (opts?.width)
|
|
66
|
+
params.push(`w=${opts.width}`);
|
|
67
|
+
if (opts?.height)
|
|
68
|
+
params.push(`h=${opts.height}`);
|
|
69
|
+
if (opts?.format)
|
|
70
|
+
params.push(`f=${opts.format}`);
|
|
71
|
+
if (opts?.quality)
|
|
72
|
+
params.push(`q=${opts.quality}`);
|
|
73
|
+
if (opts?.dpr)
|
|
74
|
+
params.push(`dpr=${opts.dpr}`);
|
|
75
|
+
const flex = params.length > 0 ? params.join(",") : "public";
|
|
76
|
+
return `https://imagedelivery.net/${this.deliveryHash}/${ref}/${flex}`;
|
|
77
|
+
}
|
|
78
|
+
async list(opts) {
|
|
79
|
+
const page = opts?.cursor ?? "1";
|
|
80
|
+
const perPage = opts?.limit ?? 100;
|
|
81
|
+
const res = await this.fetchImpl(`${this.base}?page=${page}&per_page=${perPage}`, {
|
|
82
|
+
headers: this.authHeaders(),
|
|
83
|
+
});
|
|
84
|
+
if (!res.ok)
|
|
85
|
+
throw new Error(`cloudflare-images list failed: ${res.status}`);
|
|
86
|
+
const body = (await res.json());
|
|
87
|
+
const images = body.result?.images ?? [];
|
|
88
|
+
return {
|
|
89
|
+
images,
|
|
90
|
+
nextCursor: images.length === perPage ? String(Number(page) + 1) : undefined,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
async head(ref) {
|
|
94
|
+
const res = await this.fetchImpl(`${this.base}/${ref}`, { headers: this.authHeaders() });
|
|
95
|
+
if (res.status === 404)
|
|
96
|
+
return null;
|
|
97
|
+
if (!res.ok)
|
|
98
|
+
throw new Error(`cloudflare-images head failed: ${res.status}`);
|
|
99
|
+
const body = (await res.json());
|
|
100
|
+
return body.result ?? null;
|
|
101
|
+
}
|
|
102
|
+
async upload(input) {
|
|
103
|
+
const form = new FormData();
|
|
104
|
+
if (input.fromUrl) {
|
|
105
|
+
form.append("url", input.fromUrl);
|
|
106
|
+
}
|
|
107
|
+
else if (input.bytes) {
|
|
108
|
+
form.append("file", new Blob([input.bytes], { type: input.mime ?? "application/octet-stream" }), input.name);
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
throw new Error("cloudflare-images upload requires bytes or fromUrl");
|
|
112
|
+
}
|
|
113
|
+
if (input.meta)
|
|
114
|
+
form.append("metadata", JSON.stringify(input.meta));
|
|
115
|
+
const res = await this.fetchImpl(this.base, {
|
|
116
|
+
method: "POST",
|
|
117
|
+
headers: this.authHeaders(),
|
|
118
|
+
body: form,
|
|
119
|
+
});
|
|
120
|
+
if (!res.ok)
|
|
121
|
+
throw new Error(`cloudflare-images upload failed: ${res.status}`);
|
|
122
|
+
const body = (await res.json());
|
|
123
|
+
if (!body.result?.id)
|
|
124
|
+
throw new Error("cloudflare-images upload returned no id");
|
|
125
|
+
return body.result;
|
|
126
|
+
}
|
|
127
|
+
async delete(ref) {
|
|
128
|
+
const res = await this.fetchImpl(`${this.base}/${ref}`, {
|
|
129
|
+
method: "DELETE",
|
|
130
|
+
headers: this.authHeaders(),
|
|
131
|
+
});
|
|
132
|
+
if (!res.ok && res.status !== 404) {
|
|
133
|
+
throw new Error(`cloudflare-images delete failed: ${res.status}`);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
async stats() {
|
|
137
|
+
const res = await this.fetchImpl(`${this.base}/stats`, { headers: this.authHeaders() });
|
|
138
|
+
const body = await res.json().catch(() => ({}));
|
|
139
|
+
return { ok: res.ok, status: res.status, body };
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAmBA,sFAAsF;AACtF,MAAM,UAAU,kCAAkC,CAChD,MAA2B,EAAE;IAE7B,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,qBAAqB,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACjE,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAC,8BAA8B,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAC5E,MAAM,WAAW,GAAG,GAAG,CAAC,2BAA2B;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CAAC,CAAC,CAAC;QAChD,OAAO,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC;IAClD,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inneranimalmedia/agentsam-image-delivery",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "2.6.10",
|
|
4
|
+
"description": "Shared Cloudflare Images transport: credentials, delivery URLs, and HTTP client. Content and Brand consume this — duplicate clients are not allowed. Independent project; not affiliated with Cloudflare, Inc.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "tsc -p tsconfig.json",
|
|
19
|
+
"test": "vitest run"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@types/node": "^22.10.0",
|
|
23
|
+
"typescript": "^5.9.3",
|
|
24
|
+
"vitest": "^4.1.11"
|
|
25
|
+
},
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public"
|
|
29
|
+
},
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "git+https://github.com/SamPrimeaux/agentsam-sdk.git",
|
|
33
|
+
"directory": "packages/agentsam-image-delivery"
|
|
34
|
+
}
|
|
35
|
+
}
|
package/README.md
DELETED