@reventlessdev/reventless-aws 3.0.0-alpha.251 → 3.0.0-alpha.253
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/CHANGELOG.md +31 -0
- package/package.json +7 -7
- package/src/Platform.res +83 -69
- package/src/Platform.res.mjs +85 -104
- package/src/adapter/Geocoder/Geocoder_AwsLocation_Ops.res +13 -11
- package/src/adapter/Geocoder/Geocoder_AwsLocation_Ops.res.mjs +16 -21
- package/src/adapter/Task/TaskBucket_S3.res +11 -0
- package/src/adapter/Task/TaskBucket_S3.res.mjs +3 -0
- package/src/adapter/Upload/Upload_Presign_S3.res +179 -92
- package/src/adapter/Upload/Upload_Presign_S3.res.mjs +129 -39
- package/src/adapter/Upload/Upload_Presign_S3_Ops.res +231 -104
- package/src/adapter/Upload/Upload_Presign_S3_Ops.res.mjs +195 -75
- package/src/util/Util_DeadLetterQueue.res +26 -0
- package/src/util/Util_DeadLetterQueue.res.mjs +9 -0
- package/src/util/Util_StoreLayout.res +25 -9
- package/src/util/Util_StoreLayout.res.mjs +2 -2
- package/tests/Upload_ReleaseRuleTest.res +90 -0
- package/tests/Upload_ReleaseRuleTest.res.mjs +110 -0
- package/tests/Util_StoreLayoutTest.res +16 -3
- package/tests/Util_StoreLayoutTest.res.mjs +5 -2
|
@@ -222,8 +222,21 @@ describe("Util_StoreLayout.bucketNameFor", () => {
|
|
|
222
222
|
describe("Util_StoreLayout.keyPrefixFor", () => {
|
|
223
223
|
// The assertion the whole dual-layout scheme rests on: a ref is
|
|
224
224
|
// layout-independent, so the same declaration produces the same stored string
|
|
225
|
-
// on a per-store stack and a shared one.
|
|
226
|
-
|
|
227
|
-
|
|
225
|
+
// on a per-store stack and a shared one. Plugin and store are both
|
|
226
|
+
// stack-invariant, so qualifying by plugin keeps that property.
|
|
227
|
+
testSync("the key prefix qualifies the store with its plugin", () =>
|
|
228
|
+
expect(Util_StoreLayout.keyPrefixFor(~plugin="Catalog", ~store="productImages"))->toBe(
|
|
229
|
+
"Catalog/productImages",
|
|
230
|
+
)
|
|
231
|
+
)
|
|
232
|
+
|
|
233
|
+
// The reason it is qualified: the prefix is a platform-global namespace (one
|
|
234
|
+
// distribution, one cache behavior per prefix), so two plugins declaring one
|
|
235
|
+
// store name were unroutable in EITHER layout until the plugin qualified them.
|
|
236
|
+
testSync("two plugins declaring one store name get distinct prefixes", () =>
|
|
237
|
+
expect(
|
|
238
|
+
Util_StoreLayout.keyPrefixFor(~plugin="Catalog", ~store="productImages") !=
|
|
239
|
+
Util_StoreLayout.keyPrefixFor(~plugin="Ordering", ~store="productImages"),
|
|
240
|
+
)->toBe(true)
|
|
228
241
|
)
|
|
229
242
|
})
|
|
@@ -113,8 +113,11 @@ globalThis.describe("Util_StoreLayout.bucketNameFor", () => {
|
|
|
113
113
|
});
|
|
114
114
|
|
|
115
115
|
globalThis.describe("Util_StoreLayout.keyPrefixFor", () => {
|
|
116
|
-
globalThis.test("the key prefix
|
|
117
|
-
globalThis.expect(Util_StoreLayout$ReventlessAws.keyPrefixFor("productImages")).toBe("productImages");
|
|
116
|
+
globalThis.test("the key prefix qualifies the store with its plugin", () => {
|
|
117
|
+
globalThis.expect(Util_StoreLayout$ReventlessAws.keyPrefixFor("Catalog", "productImages")).toBe("Catalog/productImages");
|
|
118
|
+
});
|
|
119
|
+
globalThis.test("two plugins declaring one store name get distinct prefixes", () => {
|
|
120
|
+
globalThis.expect(Util_StoreLayout$ReventlessAws.keyPrefixFor("Catalog", "productImages") !== Util_StoreLayout$ReventlessAws.keyPrefixFor("Ordering", "productImages")).toBe(true);
|
|
118
121
|
});
|
|
119
122
|
});
|
|
120
123
|
|