@fengsoft/storage-core-adapter-filesystem 0.1.0 → 0.1.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 +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +160 -0
- package/dist/index.js.map +1 -0
- package/package.json +2 -2
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type CreatePresignedUploadInput, type DeleteObjectInput, type GetObjectResult, type HeadObjectResult, type ListObjectsInput, type ListObjectsResult, type PresignedUpload, type PutObjectInput, type StorageDriver } from "@fengsoft/storage-core";
|
|
2
|
+
type FilesystemStorageDriverOptions = {
|
|
3
|
+
rootDir: string;
|
|
4
|
+
publicBaseUrl?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare class FilesystemStorageDriver implements StorageDriver {
|
|
7
|
+
#private;
|
|
8
|
+
constructor(options: FilesystemStorageDriverOptions);
|
|
9
|
+
putObject(input: PutObjectInput): Promise<HeadObjectResult>;
|
|
10
|
+
deleteObject(input: DeleteObjectInput): Promise<void>;
|
|
11
|
+
headObject(input: DeleteObjectInput): Promise<HeadObjectResult>;
|
|
12
|
+
getObject(input: DeleteObjectInput): Promise<GetObjectResult>;
|
|
13
|
+
listObjects(input?: ListObjectsInput): Promise<ListObjectsResult>;
|
|
14
|
+
createPresignedUpload(input: CreatePresignedUploadInput): Promise<PresignedUpload>;
|
|
15
|
+
resolvePublicUrl(key: string): string | null;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAEN,KAAK,0BAA0B,EAC/B,KAAK,iBAAiB,EAEtB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,aAAa,EAKlB,MAAM,wBAAwB,CAAC;AAEhC,KAAK,8BAA8B,GAAG;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAWF,qBAAa,uBAAwB,YAAW,aAAa;;gBAIhD,OAAO,EAAE,8BAA8B;IAK7C,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAmB3D,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAOrD,UAAU,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAK/D,SAAS,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,eAAe,CAAC;IAgB7D,WAAW,CAAC,KAAK,GAAE,gBAAqB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IA2BrE,qBAAqB,CAC1B,KAAK,EAAE,0BAA0B,GAC/B,OAAO,CAAC,eAAe,CAAC;IAqB3B,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;CAqE5C"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { mkdir, readdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
2
|
+
import { dirname, join, relative } from "node:path";
|
|
3
|
+
import { pathToFileURL } from "node:url";
|
|
4
|
+
import { buildPublicUrl, decodeCursor, StorageObjectNotFoundError, toBuffer, toCursor, } from "@fengsoft/storage-core";
|
|
5
|
+
export class FilesystemStorageDriver {
|
|
6
|
+
#rootDir;
|
|
7
|
+
#publicBaseUrl;
|
|
8
|
+
constructor(options) {
|
|
9
|
+
this.#rootDir = options.rootDir;
|
|
10
|
+
this.#publicBaseUrl = options.publicBaseUrl ?? null;
|
|
11
|
+
}
|
|
12
|
+
async putObject(input) {
|
|
13
|
+
const body = toBuffer(input.body);
|
|
14
|
+
const dataPath = this.#toDataPath(input.key);
|
|
15
|
+
const metaPath = this.#toMetadataPath(input.key);
|
|
16
|
+
const lastModified = new Date();
|
|
17
|
+
await mkdir(dirname(dataPath), { recursive: true });
|
|
18
|
+
await writeFile(dataPath, body);
|
|
19
|
+
const meta = {
|
|
20
|
+
contentType: input.contentType ?? null,
|
|
21
|
+
cacheControl: input.cacheControl ?? null,
|
|
22
|
+
metadata: { ...(input.metadata ?? {}) },
|
|
23
|
+
etag: `fs-${input.key}-${body.length}-${lastModified.getTime()}`,
|
|
24
|
+
lastModified: lastModified.toISOString(),
|
|
25
|
+
contentLength: body.length,
|
|
26
|
+
};
|
|
27
|
+
await writeFile(metaPath, JSON.stringify(meta, null, 2));
|
|
28
|
+
return this.#toHeadObjectResult(input.key, meta);
|
|
29
|
+
}
|
|
30
|
+
async deleteObject(input) {
|
|
31
|
+
await Promise.all([
|
|
32
|
+
rm(this.#toDataPath(input.key), { force: true }),
|
|
33
|
+
rm(this.#toMetadataPath(input.key), { force: true }),
|
|
34
|
+
]);
|
|
35
|
+
}
|
|
36
|
+
async headObject(input) {
|
|
37
|
+
const meta = await this.#readMetadata(input.key);
|
|
38
|
+
return this.#toHeadObjectResult(input.key, meta);
|
|
39
|
+
}
|
|
40
|
+
async getObject(input) {
|
|
41
|
+
const [meta, body] = await Promise.all([
|
|
42
|
+
this.#readMetadata(input.key),
|
|
43
|
+
readFile(this.#toDataPath(input.key)),
|
|
44
|
+
]).catch((error) => {
|
|
45
|
+
if (this.#isMissing(error)) {
|
|
46
|
+
throw new StorageObjectNotFoundError(input.key);
|
|
47
|
+
}
|
|
48
|
+
throw error;
|
|
49
|
+
});
|
|
50
|
+
return {
|
|
51
|
+
...this.#toHeadObjectResult(input.key, meta),
|
|
52
|
+
body,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
async listObjects(input = {}) {
|
|
56
|
+
const files = await this.#walkDataFiles(this.#rootDir);
|
|
57
|
+
const prefix = input.prefix ?? "";
|
|
58
|
+
const limit = input.limit ?? 1000;
|
|
59
|
+
const offset = decodeCursor(input.cursor);
|
|
60
|
+
const filtered = files
|
|
61
|
+
.map((file) => relative(this.#rootDir, file).split("\\").join("/"))
|
|
62
|
+
.filter((key) => !key.endsWith(".meta.json") && key.startsWith(prefix))
|
|
63
|
+
.sort((left, right) => left.localeCompare(right));
|
|
64
|
+
const page = filtered.slice(offset, offset + limit);
|
|
65
|
+
const items = await Promise.all(page.map(async (key) => {
|
|
66
|
+
const meta = await this.#readMetadata(key);
|
|
67
|
+
return {
|
|
68
|
+
key,
|
|
69
|
+
contentLength: meta.contentLength,
|
|
70
|
+
lastModified: new Date(meta.lastModified),
|
|
71
|
+
etag: meta.etag,
|
|
72
|
+
};
|
|
73
|
+
}));
|
|
74
|
+
return {
|
|
75
|
+
items,
|
|
76
|
+
nextCursor: toCursor(offset + page.length, filtered.length),
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
async createPresignedUpload(input) {
|
|
80
|
+
const expiresInSeconds = input.expiresInSeconds ?? 900;
|
|
81
|
+
const headers = {};
|
|
82
|
+
if (input.contentType) {
|
|
83
|
+
headers["content-type"] = input.contentType;
|
|
84
|
+
}
|
|
85
|
+
if (input.cacheControl) {
|
|
86
|
+
headers["cache-control"] = input.cacheControl;
|
|
87
|
+
}
|
|
88
|
+
for (const [key, value] of Object.entries(input.metadata ?? {})) {
|
|
89
|
+
headers[`x-storage-meta-${key}`] = value;
|
|
90
|
+
}
|
|
91
|
+
return {
|
|
92
|
+
key: input.key,
|
|
93
|
+
method: "PUT",
|
|
94
|
+
url: pathToFileURL(this.#toDataPath(input.key)).toString(),
|
|
95
|
+
headers,
|
|
96
|
+
expiresAt: new Date(Date.now() + expiresInSeconds * 1000),
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
resolvePublicUrl(key) {
|
|
100
|
+
return buildPublicUrl(this.#publicBaseUrl, key);
|
|
101
|
+
}
|
|
102
|
+
#toDataPath(key) {
|
|
103
|
+
return join(this.#rootDir, key);
|
|
104
|
+
}
|
|
105
|
+
#toMetadataPath(key) {
|
|
106
|
+
return join(this.#rootDir, `${key}.meta.json`);
|
|
107
|
+
}
|
|
108
|
+
async #readMetadata(key) {
|
|
109
|
+
try {
|
|
110
|
+
const raw = await readFile(this.#toMetadataPath(key), "utf8");
|
|
111
|
+
return JSON.parse(raw);
|
|
112
|
+
}
|
|
113
|
+
catch (error) {
|
|
114
|
+
if (this.#isMissing(error)) {
|
|
115
|
+
throw new StorageObjectNotFoundError(key);
|
|
116
|
+
}
|
|
117
|
+
throw error;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
#toHeadObjectResult(key, meta) {
|
|
121
|
+
return {
|
|
122
|
+
key,
|
|
123
|
+
contentLength: meta.contentLength,
|
|
124
|
+
contentType: meta.contentType,
|
|
125
|
+
cacheControl: meta.cacheControl,
|
|
126
|
+
etag: meta.etag,
|
|
127
|
+
lastModified: new Date(meta.lastModified),
|
|
128
|
+
metadata: { ...meta.metadata },
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
async #walkDataFiles(currentDir) {
|
|
132
|
+
try {
|
|
133
|
+
const entries = await readdir(currentDir, {
|
|
134
|
+
withFileTypes: true,
|
|
135
|
+
encoding: "utf8",
|
|
136
|
+
});
|
|
137
|
+
const files = await Promise.all(entries.map(async (entry) => {
|
|
138
|
+
const entryPath = join(currentDir, entry.name);
|
|
139
|
+
if (entry.isDirectory()) {
|
|
140
|
+
return this.#walkDataFiles(entryPath);
|
|
141
|
+
}
|
|
142
|
+
return entryPath;
|
|
143
|
+
}));
|
|
144
|
+
return files.flat();
|
|
145
|
+
}
|
|
146
|
+
catch (error) {
|
|
147
|
+
if (this.#isMissing(error)) {
|
|
148
|
+
return [];
|
|
149
|
+
}
|
|
150
|
+
throw error;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
#isMissing(error) {
|
|
154
|
+
return (typeof error === "object" &&
|
|
155
|
+
error !== null &&
|
|
156
|
+
"code" in error &&
|
|
157
|
+
error.code === "ENOENT");
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EACN,cAAc,EAGd,YAAY,EASZ,0BAA0B,EAC1B,QAAQ,EACR,QAAQ,GACR,MAAM,wBAAwB,CAAC;AAgBhC,MAAM,OAAO,uBAAuB;IAC1B,QAAQ,CAAS;IACjB,cAAc,CAAgB;IAEvC,YAAY,OAAuC;QAClD,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC;QAChC,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,aAAa,IAAI,IAAI,CAAC;IACrD,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,KAAqB;QACpC,MAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAClC,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC7C,MAAM,QAAQ,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACjD,MAAM,YAAY,GAAG,IAAI,IAAI,EAAE,CAAC;QAChC,MAAM,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACpD,MAAM,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QAChC,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|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"development"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@fengsoft/storage-core": "0.1.
|
|
34
|
+
"@fengsoft/storage-core": "0.1.1"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|