@crawlee/fs-storage 4.0.0-beta.153 → 4.0.0-beta.155
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crawlee/fs-storage",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.155",
|
|
4
4
|
"description": "A file-system storage implementation of the Apify API",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22.0.0"
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@crawlee/fs-storage-native": "0.2.0",
|
|
46
|
-
"@crawlee/types": "4.0.0-beta.
|
|
47
|
-
"@crawlee/utils": "4.0.0-beta.
|
|
45
|
+
"@crawlee/fs-storage-native": ">=0.2.1-beta.0 <0.3",
|
|
46
|
+
"@crawlee/types": "4.0.0-beta.155",
|
|
47
|
+
"@crawlee/utils": "4.0.0-beta.155",
|
|
48
48
|
"zod": "^4.4.3"
|
|
49
49
|
},
|
|
50
50
|
"lerna": {
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "e7c221dfb88342e0738aa7b0e160c05f976fcf6c"
|
|
58
58
|
}
|
|
@@ -44,7 +44,10 @@ export declare class KeyValueStoreBackend extends CachedIdClient implements stor
|
|
|
44
44
|
/**
|
|
45
45
|
* Generates a public `file://` URL for accessing a specific record in the key-value store.
|
|
46
46
|
*
|
|
47
|
-
*
|
|
47
|
+
* The native `getPublicUrl` derives the URL from the key without probing bare-file extensions, so
|
|
48
|
+
* an `INPUT` that lives on disk as a hand-placed `INPUT.json` is resolved first. Nothing on disk
|
|
49
|
+
* means nothing to resolve — the requested key is used as-is, and the URL is the one the record will
|
|
50
|
+
* have once written.
|
|
48
51
|
* @param key The key of the record to generate the public URL for.
|
|
49
52
|
*/
|
|
50
53
|
getPublicUrl(key: string): Promise<string | undefined>;
|
|
@@ -127,19 +127,16 @@ export class KeyValueStoreBackend extends CachedIdClient {
|
|
|
127
127
|
/**
|
|
128
128
|
* Generates a public `file://` URL for accessing a specific record in the key-value store.
|
|
129
129
|
*
|
|
130
|
-
*
|
|
130
|
+
* The native `getPublicUrl` derives the URL from the key without probing bare-file extensions, so
|
|
131
|
+
* an `INPUT` that lives on disk as a hand-placed `INPUT.json` is resolved first. Nothing on disk
|
|
132
|
+
* means nothing to resolve — the requested key is used as-is, and the URL is the one the record will
|
|
133
|
+
* have once written.
|
|
131
134
|
* @param key The key of the record to generate the public URL for.
|
|
132
135
|
*/
|
|
133
136
|
async getPublicUrl(key) {
|
|
134
137
|
parseArgument(key, keySchema);
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
// the native `null`-for-missing result to the historical `undefined` contract.
|
|
138
|
-
const resolvedKey = await this.resolveExistingKey(key);
|
|
139
|
-
if (resolvedKey === undefined) {
|
|
140
|
-
return undefined;
|
|
141
|
-
}
|
|
142
|
-
return (await this.#nativeBackend.getPublicUrl(resolvedKey)) ?? undefined;
|
|
138
|
+
const resolvedKey = (await this.resolveExistingKey(key)) ?? key;
|
|
139
|
+
return this.#nativeBackend.getPublicUrl(resolvedKey);
|
|
143
140
|
}
|
|
144
141
|
/**
|
|
145
142
|
* Tests whether a record with the given key exists without retrieving its value.
|