@apify/actor-utils 0.1.8 → 0.1.9-beta.0

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.
@@ -17,8 +17,8 @@ const NO_CHARGE_RESULT = {
17
17
  async function wrapPushData(data, pushFn) {
18
18
  const msg = 'Dataset validation failed';
19
19
  const { droppedItems, pushResult } = await pushDataWithSchemaRepair(pushFn, data);
20
- for (const { errors } of droppedItems) {
21
- log.error(msg, { msg, validationErrors: errors });
20
+ for (const { item, errors } of droppedItems) {
21
+ log.error(msg, { msg, validationErrors: errors, item: JSON.stringify(item) });
22
22
  }
23
23
  return pushResult;
24
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"push-data.js","sourceRoot":"","sources":["../../../src/gteam-internal/push-data.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AAEpF,wEAAwE;AACxE,0EAA0E;AAC1E,2EAA2E;AAC3E,oBAAoB;AACpB,MAAM,gBAAgB,GAAiB;IACnC,uBAAuB,EAAE,KAAK;IAC9B,YAAY,EAAE,CAAC;IACf,qBAAqB,EAAE,EAAE;CAC5B,CAAC;AAEF;;;;GAIG;AACH,KAAK,UAAU,YAAY,CACvB,IAAa,EACb,MAAkC;IAElC,MAAM,GAAG,GAAG,2BAA2B,CAAC;IACxC,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,GAAG,MAAM,wBAAwB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAClF,KAAK,MAAM,EAAE,MAAM,EAAE,IAAI,YAAY,EAAE,CAAC;QACpC,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,GAAG,EAAE,gBAAgB,EAAE,MAAM,EAAE,CAAC,CAAC;IACtD,CAAC;IACD,OAAO,UAAU,CAAC;AACtB,CAAC;AAyCD,MAAM,CAAC,KAAK,UA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": "@apify/actor-utils",
3
- "version": "0.1.8",
4
- "type": "module",
5
- "description": "Wrapper around Actor.pushData that survives dataset schema-validation failures by stripping offending fields and retrying. Callers pass the actual push function as pushFn.",
6
- "repository": {
7
- "type": "git",
8
- "url": "https://github.com/apify/apify-actor-utils.git"
2
+ "name": "@apify/actor-utils",
3
+ "version": "0.1.9-beta.0",
4
+ "type": "module",
5
+ "description": "Wrapper around Actor.pushData that survives dataset schema-validation failures by stripping offending fields and retrying. Callers pass the actual push function as pushFn.",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/apify/apify-actor-utils.git"
9
+ },
10
+ "engines": {
11
+ "node": ">=22.6.0"
12
+ },
13
+ "types": "./dist/index.d.ts",
14
+ "main": "./dist/index.js",
15
+ "exports": {
16
+ ".": {
17
+ "types": "./dist/index.d.ts",
18
+ "default": "./dist/index.js"
9
19
  },
10
- "engines": {
11
- "node": ">=22.6.0"
20
+ "./push-data-with-schema-repair": {
21
+ "types": "./dist/src/push-data-with-schema-repair/index.d.ts",
22
+ "default": "./dist/src/push-data-with-schema-repair/index.js"
12
23
  },
13
- "types": "./dist/index.d.ts",
14
- "main": "./dist/index.js",
15
- "exports": {
16
- ".": {
17
- "types": "./dist/index.d.ts",
18
- "default": "./dist/index.js"
19
- },
20
- "./push-data-with-schema-repair": {
21
- "types": "./dist/src/push-data-with-schema-repair/index.d.ts",
22
- "default": "./dist/src/push-data-with-schema-repair/index.js"
23
- },
24
- "./qc-logger": {
25
- "types": "./dist/src/qc-logger/index.d.ts",
26
- "default": "./dist/src/qc-logger/index.js"
27
- },
28
- "./type-utils": {
29
- "types": "./dist/src/type-utils/index.d.ts",
30
- "default": "./dist/src/type-utils/index.js"
31
- },
32
- "./gteam-internal": {
33
- "types": "./dist/src/gteam-internal/index.d.ts",
34
- "default": "./dist/src/gteam-internal/index.js"
35
- }
24
+ "./qc-logger": {
25
+ "types": "./dist/src/qc-logger/index.d.ts",
26
+ "default": "./dist/src/qc-logger/index.js"
36
27
  },
37
- "files": [
38
- "dist/index.js",
39
- "dist/index.js.map",
40
- "dist/index.d.ts",
41
- "dist/index.d.ts.map",
42
- "dist/src"
43
- ],
44
- "typesVersions": {
45
- "*": {
46
- "qc-logger": [
47
- "dist/src/qc-logger/index.d.ts"
48
- ],
49
- "type-utils": [
50
- "dist/src/type-utils/index.d.ts"
51
- ],
52
- "gteam-internal": [
53
- "dist/src/gteam-internal/index.d.ts"
54
- ]
55
- }
28
+ "./type-utils": {
29
+ "types": "./dist/src/type-utils/index.d.ts",
30
+ "default": "./dist/src/type-utils/index.js"
56
31
  },
57
- "scripts": {
58
- "build": "tsc",
59
- "typecheck": "tsc --noEmit",
60
- "lint": "eslint",
61
- "lint:fix": "eslint --fix",
62
- "format": "prettier --write .",
63
- "format:check": "prettier --check .",
64
- "test": "vitest run --coverage",
65
- "check:pushdata": "node scripts/check-pushdata.mjs",
66
- "check-unused": "knip",
67
- "ci": "npm run typecheck && npm run lint && npm run format:check && npm run check:pushdata && npm test",
68
- "probe": "node scripts/probe-errors.mjs",
69
- "prepare": "husky .husky || true"
70
- },
71
- "lint-staged": {
72
- "*.js": "eslint",
73
- "*.ts": "eslint",
74
- "*.mjs": "eslint"
75
- },
76
- "devDependencies": {
77
- "@apify/eslint-config": "^1.2.0",
78
- "@apify/tsconfig": "^0.1.2",
79
- "@types/node": "^25.9.1",
80
- "@vitest/coverage-v8": "^4.0.18",
81
- "apify": "3.7.2",
82
- "apify-client": "^2.17.0",
83
- "eslint": "^9.39.4",
84
- "eslint-config-prettier": "^10.1.8",
85
- "globals": "^17.7.0",
86
- "husky": "^9.1.7",
87
- "knip": "^5.88.1",
88
- "lint-staged": "^15.5.2",
89
- "prettier": "^3.9.4",
90
- "typescript": "^6.0.3",
91
- "typescript-eslint": "^8.62.1",
92
- "vitest": "^4.0.18"
93
- },
94
- "license": "ISC",
95
- "peerDependencies": {
96
- "@apify/log": "^2",
97
- "apify": "^3",
98
- "apify-client": "^2"
32
+ "./gteam-internal": {
33
+ "types": "./dist/src/gteam-internal/index.d.ts",
34
+ "default": "./dist/src/gteam-internal/index.js"
35
+ }
36
+ },
37
+ "files": [
38
+ "dist/index.js",
39
+ "dist/index.js.map",
40
+ "dist/index.d.ts",
41
+ "dist/index.d.ts.map",
42
+ "dist/src"
43
+ ],
44
+ "typesVersions": {
45
+ "*": {
46
+ "qc-logger": [
47
+ "dist/src/qc-logger/index.d.ts"
48
+ ],
49
+ "type-utils": [
50
+ "dist/src/type-utils/index.d.ts"
51
+ ],
52
+ "gteam-internal": [
53
+ "dist/src/gteam-internal/index.d.ts"
54
+ ]
55
+ }
56
+ },
57
+ "scripts": {
58
+ "build": "tsc",
59
+ "typecheck": "tsc --noEmit",
60
+ "lint": "eslint",
61
+ "lint:fix": "eslint --fix",
62
+ "format": "prettier --write .",
63
+ "format:check": "prettier --check .",
64
+ "test": "vitest run --coverage",
65
+ "check:pushdata": "node scripts/check-pushdata.mjs",
66
+ "check-unused": "knip",
67
+ "ci": "npm run typecheck && npm run lint && npm run format:check && npm run check:pushdata && npm test",
68
+ "probe": "node scripts/probe-errors.mjs",
69
+ "prepare": "husky .husky || true"
70
+ },
71
+ "lint-staged": {
72
+ "*.js": "eslint",
73
+ "*.ts": "eslint",
74
+ "*.mjs": "eslint"
75
+ },
76
+ "devDependencies": {
77
+ "@apify/eslint-config": "^1.2.0",
78
+ "@apify/tsconfig": "^0.1.2",
79
+ "@types/node": "^25.9.1",
80
+ "@vitest/coverage-v8": "^4.0.18",
81
+ "apify": "3.7.2",
82
+ "apify-client": "^2.17.0",
83
+ "eslint": "^9.39.4",
84
+ "eslint-config-prettier": "^10.1.8",
85
+ "globals": "^17.7.0",
86
+ "husky": "^9.1.7",
87
+ "knip": "^5.88.1",
88
+ "lint-staged": "^15.5.2",
89
+ "prettier": "^3.9.4",
90
+ "typescript": "^6.0.3",
91
+ "typescript-eslint": "^8.62.1",
92
+ "vitest": "^4.0.18"
93
+ },
94
+ "license": "ISC",
95
+ "peerDependencies": {
96
+ "@apify/log": "^2",
97
+ "apify": "^3",
98
+ "apify-client": "^2"
99
+ },
100
+ "peerDependenciesMeta": {
101
+ "apify": {
102
+ "optional": true
99
103
  },
100
- "peerDependenciesMeta": {
101
- "apify": {
102
- "optional": true
103
- },
104
- "apify-client": {
105
- "optional": true
106
- }
104
+ "apify-client": {
105
+ "optional": true
107
106
  }
107
+ }
108
108
  }