Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: deleted object v4 #387

Merged
merged 19 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ const SHOP_CONTENTS = [
];
```

Create a service "planesService.php" (in plural) in the [shop content services folder](src/Service/ShopContent/) that implements the [ShopContentServiceInterface.php](src/Service/ShopContent/ShopContentServiceInterface.php) interface. For the method structure, use the existing base on all other shop content services to maintain consistency.
Create a service "planesService.php" (in plural) in the [shop content services folder](src/Service/ShopContent/) that extends the [ShopContentAbstractService](src/Service/ShopContent/ShopContentAbstractService.php) and implements the [ShopContentServiceInterface.php](src/Service/ShopContent/ShopContentServiceInterface.php) interface. For the method structure, use the existing base on all other shop content services to maintain consistency.
```PHP
class PlanesService implements ShopContentServiceInterface
class PlanesService extends ShopContentAbstractService implements ShopContentServiceInterface
{
...
}
Expand Down
19 changes: 10 additions & 9 deletions e2e-env/cloudsync-mock/src/lib/collector-api.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
import { Server } from "./server";
import {WsServer} from "./ws-server";
import { WsServer } from "./ws-server";
// @ts-expect-error we don't care about packaging here
import multer from "multer";

const storage = multer.memoryStorage()
const upload = multer({ storage })
const storage = multer.memoryStorage();
const upload = multer({ storage });

export class CollectorApiServer extends Server {
public constructor( probe: WsServer) {
super( probe);
public constructor(probe: WsServer) {
super(probe);

this.api.get("/", (_req, res) => {
res.status(200).end();
});

this.api.post("/upload/:jobid", upload.single('file'), (req, res) => {
this.api.post("/upload/:jobid", upload.single("file"), (req, res) => {
const jobId = req.params.jobid;
if (jobId.startsWith("valid-job-")) {
req.body.file = req.file.buffer.toString()
.split('\n')
.map(line => JSON.parse(line.trim()))
req.body.file = req.file.buffer
.toString()
.split("\n")
.map((line) => JSON.parse(line.trim()));
res.status(201).end();
} else {
res.status(500).end();
Expand Down
1 change: 1 addition & 0 deletions e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"jest-expect-message": "^1.1.3",
"jest-extended": "^4.0.2",
"jest-mock-extended": "^3.0.7",
"object-hash": "3.0.0",
"prettier": "^3.3.3",
"ramda": "^0.30.1",
"rxjs": "^7.8.1",
Expand Down
8 changes: 8 additions & 0 deletions e2e/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions e2e/src/fixtures/1.6/carrier_details.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"id": "2-1-range_weight-1",
"action": "upsert",
"collection": "carrier_details",
"properties": {
"id_reference": "2",
Expand All @@ -16,7 +16,7 @@
}
},
{
"id": "2-2-range_weight-1",
"action": "upsert",
"collection": "carrier_details",
"properties": {
"id_reference": "2",
Expand Down
4 changes: 2 additions & 2 deletions e2e/src/fixtures/1.6/carriers.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"action": "upsert",
"collection": "carriers",
"id": "1",
"properties": {
"id_carrier": "1",
"id_reference": "1",
Expand Down Expand Up @@ -30,8 +30,8 @@
}
},
{
"action": "upsert",
"collection": "carriers",
"id": "2",
"properties": {
"id_carrier": "2",
"id_reference": "2",
Expand Down
30 changes: 15 additions & 15 deletions e2e/src/fixtures/1.6/cart_products.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"id": "1-2-10",
"action": "upsert",
"collection": "cart_products",
"properties": {
"id_cart": "1",
Expand All @@ -12,7 +12,7 @@
}
},
{
"id": "1-3-13",
"action": "upsert",
"collection": "cart_products",
"properties": {
"id_cart": "1",
Expand All @@ -24,7 +24,7 @@
}
},
{
"id": "2-2-10",
"action": "upsert",
"collection": "cart_products",
"properties": {
"id_cart": "2",
Expand All @@ -36,7 +36,7 @@
}
},
{
"id": "2-6-32",
"action": "upsert",
"collection": "cart_products",
"properties": {
"id_cart": "2",
Expand All @@ -48,7 +48,7 @@
}
},
{
"id": "2-7-34",
"action": "upsert",
"collection": "cart_products",
"properties": {
"id_cart": "2",
Expand All @@ -60,7 +60,7 @@
}
},
{
"id": "3-1-1",
"action": "upsert",
"collection": "cart_products",
"properties": {
"id_cart": "3",
Expand All @@ -72,7 +72,7 @@
}
},
{
"id": "3-2-10",
"action": "upsert",
"collection": "cart_products",
"properties": {
"id_cart": "3",
Expand All @@ -84,7 +84,7 @@
}
},
{
"id": "3-6-32",
"action": "upsert",
"collection": "cart_products",
"properties": {
"id_cart": "3",
Expand All @@ -96,7 +96,7 @@
}
},
{
"id": "4-1-1",
"action": "upsert",
"collection": "cart_products",
"properties": {
"id_cart": "4",
Expand All @@ -108,7 +108,7 @@
}
},
{
"id": "4-3-13",
"action": "upsert",
"collection": "cart_products",
"properties": {
"id_cart": "4",
Expand All @@ -120,7 +120,7 @@
}
},
{
"id": "4-5-19",
"action": "upsert",
"collection": "cart_products",
"properties": {
"id_cart": "4",
Expand All @@ -132,7 +132,7 @@
}
},
{
"id": "4-7-34",
"action": "upsert",
"collection": "cart_products",
"properties": {
"id_cart": "4",
Expand All @@ -144,7 +144,7 @@
}
},
{
"id": "5-1-1",
"action": "upsert",
"collection": "cart_products",
"properties": {
"id_cart": "5",
Expand All @@ -156,7 +156,7 @@
}
},
{
"id": "5-2-7",
"action": "upsert",
"collection": "cart_products",
"properties": {
"id_cart": "5",
Expand All @@ -168,7 +168,7 @@
}
},
{
"id": "5-3-13",
"action": "upsert",
"collection": "cart_products",
"properties": {
"id_cart": "5",
Expand Down
10 changes: 5 additions & 5 deletions e2e/src/fixtures/1.6/carts.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"id": "1",
"action": "upsert",
"collection": "carts",
"properties": {
"id_cart": "1",
Expand All @@ -9,7 +9,7 @@
}
},
{
"id": "2",
"action": "upsert",
"collection": "carts",
"properties": {
"id_cart": "2",
Expand All @@ -18,7 +18,7 @@
}
},
{
"id": "3",
"action": "upsert",
"collection": "carts",
"properties": {
"id_cart": "3",
Expand All @@ -27,7 +27,7 @@
}
},
{
"id": "4",
"action": "upsert",
"collection": "carts",
"properties": {
"id_cart": "4",
Expand All @@ -36,7 +36,7 @@
}
},
{
"id": "5",
"action": "upsert",
"collection": "carts",
"properties": {
"id_cart": "5",
Expand Down
22 changes: 11 additions & 11 deletions e2e/src/fixtures/1.6/categories.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"id": "1-en",
"action": "upsert",
"collection": "categories",
"properties": {
"unique_category_id": "1-en",
Expand All @@ -18,7 +18,7 @@
}
},
{
"id": "2-en",
"action": "upsert",
"collection": "categories",
"properties": {
"unique_category_id": "2-en",
Expand All @@ -36,7 +36,7 @@
}
},
{
"id": "3-en",
"action": "upsert",
"collection": "categories",
"properties": {
"unique_category_id": "3-en",
Expand All @@ -54,7 +54,7 @@
}
},
{
"id": "4-en",
"action": "upsert",
"collection": "categories",
"properties": {
"unique_category_id": "4-en",
Expand All @@ -72,7 +72,7 @@
}
},
{
"id": "5-en",
"action": "upsert",
"collection": "categories",
"properties": {
"unique_category_id": "5-en",
Expand All @@ -90,7 +90,7 @@
}
},
{
"id": "6-en",
"action": "upsert",
"collection": "categories",
"properties": {
"unique_category_id": "6-en",
Expand All @@ -108,7 +108,7 @@
}
},
{
"id": "7-en",
"action": "upsert",
"collection": "categories",
"properties": {
"unique_category_id": "7-en",
Expand All @@ -126,7 +126,7 @@
}
},
{
"id": "8-en",
"action": "upsert",
"collection": "categories",
"properties": {
"unique_category_id": "8-en",
Expand All @@ -144,7 +144,7 @@
}
},
{
"id": "9-en",
"action": "upsert",
"collection": "categories",
"properties": {
"unique_category_id": "9-en",
Expand All @@ -162,7 +162,7 @@
}
},
{
"id": "10-en",
"action": "upsert",
"collection": "categories",
"properties": {
"unique_category_id": "10-en",
Expand All @@ -180,7 +180,7 @@
}
},
{
"id": "11-en",
"action": "upsert",
"collection": "categories",
"properties": {
"unique_category_id": "11-en",
Expand Down
Loading
Loading