apify 4.0.0-beta.83 → 4.0.0-beta.85
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.
|
@@ -130,11 +130,6 @@ export class ApifyStorageBackend {
|
|
|
130
130
|
if (defaultId)
|
|
131
131
|
return defaultId;
|
|
132
132
|
}
|
|
133
|
-
else {
|
|
134
|
-
const declaredId = this.aliasFromActorStorages(alias, type);
|
|
135
|
-
if (declaredId)
|
|
136
|
-
return declaredId;
|
|
137
|
-
}
|
|
138
133
|
return this.resolveAliasId(alias, type);
|
|
139
134
|
}
|
|
140
135
|
/**
|
|
@@ -149,16 +144,14 @@ export class ApifyStorageBackend {
|
|
|
149
144
|
// differently-authenticated backends maps to two storages.
|
|
150
145
|
const key = [type, alias, this.credentialsHash()].join(',');
|
|
151
146
|
return this.#aliasLock.runExclusive(async () => {
|
|
152
|
-
const knownId = this.#aliasIdCache.get(key);
|
|
153
|
-
if (knownId)
|
|
154
|
-
return knownId;
|
|
155
147
|
const store = this.aliasMappingStore();
|
|
156
148
|
this.#persistedAliasIds ??= store ? await readAliasMapping(store) : {};
|
|
157
|
-
// A
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
149
|
+
// A known id can point at a storage deleted since it was resolved. The persisted id wins
|
|
150
|
+
// over the declared one, as it only exists if the declared storage was gone.
|
|
151
|
+
const knownId = this.#aliasIdCache.get(key) ?? this.#persistedAliasIds[key] ?? this.aliasFromActorStorages(alias, type);
|
|
152
|
+
if (knownId && (await this.resourceClient(knownId, type).get())) {
|
|
153
|
+
this.#aliasIdCache.set(key, knownId);
|
|
154
|
+
return knownId;
|
|
162
155
|
}
|
|
163
156
|
const { id } = await this.collectionClient(type).getOrCreate();
|
|
164
157
|
this.#aliasIdCache.set(key, id);
|
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.85",
|
|
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.13.0"
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@crawlee/types": "4.0.0-rc.1",
|
|
67
67
|
"@crawlee/utils": "4.0.0-rc.1",
|
|
68
68
|
"apify-client": "^3.0.0-rc.0",
|
|
69
|
-
"minimatch": "^
|
|
69
|
+
"minimatch": "^11.0.0",
|
|
70
70
|
"tslib": "^2.8.1",
|
|
71
71
|
"ws": "^8.22.0",
|
|
72
72
|
"zod": "^4.6.5"
|