apify 4.0.0-beta.16 → 4.0.0-beta.17
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/apify_storage_client.d.ts +12 -0
- package/dist/apify_storage_client.js +12 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
|
@@ -31,6 +31,18 @@ export declare const pushDataChargingContext: AsyncLocalStorage<PpeAwarePushData
|
|
|
31
31
|
* first (when one exists on the platform) and fall back to a name otherwise —
|
|
32
32
|
* otherwise crawlee's `resolveStorageIdentifier` treats every string as a name
|
|
33
33
|
* and the SDK would silently create a new storage named like the passed id.
|
|
34
|
+
*
|
|
35
|
+
* `Actor` wires this up automatically; construct it directly only to use Apify
|
|
36
|
+
* platform storage with crawlee's storage classes outside of `Actor` — e.g. to
|
|
37
|
+
* read another run's output with an explicit token:
|
|
38
|
+
*
|
|
39
|
+
* ```ts
|
|
40
|
+
* import { ApifyClient, ApifyStorageClient, Dataset } from 'apify';
|
|
41
|
+
*
|
|
42
|
+
* const client = new ApifyClient({ token });
|
|
43
|
+
* const dataset = await Dataset.open(datasetId, { storageClient: new ApifyStorageClient(client) });
|
|
44
|
+
* const { items } = await dataset.getData();
|
|
45
|
+
* ```
|
|
34
46
|
*/
|
|
35
47
|
export declare class ApifyStorageClient implements StorageClient {
|
|
36
48
|
private readonly client;
|
|
@@ -88,6 +88,18 @@ function adapt(client, renames, overrides = {}) {
|
|
|
88
88
|
* first (when one exists on the platform) and fall back to a name otherwise —
|
|
89
89
|
* otherwise crawlee's `resolveStorageIdentifier` treats every string as a name
|
|
90
90
|
* and the SDK would silently create a new storage named like the passed id.
|
|
91
|
+
*
|
|
92
|
+
* `Actor` wires this up automatically; construct it directly only to use Apify
|
|
93
|
+
* platform storage with crawlee's storage classes outside of `Actor` — e.g. to
|
|
94
|
+
* read another run's output with an explicit token:
|
|
95
|
+
*
|
|
96
|
+
* ```ts
|
|
97
|
+
* import { ApifyClient, ApifyStorageClient, Dataset } from 'apify';
|
|
98
|
+
*
|
|
99
|
+
* const client = new ApifyClient({ token });
|
|
100
|
+
* const dataset = await Dataset.open(datasetId, { storageClient: new ApifyStorageClient(client) });
|
|
101
|
+
* const { items } = await dataset.getData();
|
|
102
|
+
* ```
|
|
91
103
|
*/
|
|
92
104
|
export class ApifyStorageClient {
|
|
93
105
|
client;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './actor.js';
|
|
2
|
+
export { ApifyStorageClient } from './apify_storage_client.js';
|
|
2
3
|
export type { OpenStorageOptions, StorageAlias, StorageId, StorageName, StorageIdentifier, StorageIdentifierWithoutAlias, } from './storage.js';
|
|
3
4
|
export { ChargeOptions, ChargeResult, ActorPricingInfo, ChargingManager } from './charging.js';
|
|
4
5
|
export * from './configuration.js';
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apify",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.17",
|
|
4
4
|
"description": "The scalable web crawling and scraping library for JavaScript/Node.js. Enables development of data extraction and web automation jobs (not only) with headless Chrome and Puppeteer.",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22.0.0"
|