@apify/actor-utils 0.1.9 → 0.1.10-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.
@@ -0,0 +1,17 @@
1
+ /**
2
+ * A `Type` distinguished from other values of the same type by a compile-time
3
+ * string label. The brand does not add a property to the value at runtime.
4
+ *
5
+ * @example
6
+ * ```ts
7
+ * type UserId = Branded<string, 'UserId'>;
8
+ *
9
+ * function isUserId(value: string): value is UserId {
10
+ * return value.startsWith('user-');
11
+ * }
12
+ * ```
13
+ */
14
+ export type Branded<Type, Brand extends string> = Type & {
15
+ __brand: Brand;
16
+ };
17
+ //# sourceMappingURL=branded.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"branded.d.ts","sourceRoot":"","sources":["../../../src/type-utils/branded.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,OAAO,CAAC,IAAI,EAAE,KAAK,SAAS,MAAM,IAAI,IAAI,GAAG;IAAE,OAAO,EAAE,KAAK,CAAA;CAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=branded.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"branded.js","sourceRoot":"","sources":["../../../src/type-utils/branded.ts"],"names":[],"mappings":""}
@@ -1,4 +1,5 @@
1
1
  export { unreachable } from './unreachable.js';
2
2
  export type { Falsy, Nullish, Truthy, Defined } from './types.js';
3
3
  export { type NonEmptyList, isNonEmptyList } from './non-empty.js';
4
+ export type { Branded } from './branded.js';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/type-utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,EAAE,KAAK,YAAY,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/type-utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,EAAE,KAAK,YAAY,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACnE,YAAY,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
package/package.json CHANGED
@@ -1,120 +1,120 @@
1
1
  {
2
- "name": "@apify/actor-utils",
3
- "version": "0.1.9",
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.10-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
- },
36
- "./zod": {
37
- "types": "./dist/src/zod/index.d.ts",
38
- "default": "./dist/src/zod/index.js"
39
- }
24
+ "./qc-logger": {
25
+ "types": "./dist/src/qc-logger/index.d.ts",
26
+ "default": "./dist/src/qc-logger/index.js"
40
27
  },
41
- "files": [
42
- "dist/index.js",
43
- "dist/index.js.map",
44
- "dist/index.d.ts",
45
- "dist/index.d.ts.map",
46
- "dist/src"
47
- ],
48
- "typesVersions": {
49
- "*": {
50
- "qc-logger": [
51
- "dist/src/qc-logger/index.d.ts"
52
- ],
53
- "type-utils": [
54
- "dist/src/type-utils/index.d.ts"
55
- ],
56
- "gteam-internal": [
57
- "dist/src/gteam-internal/index.d.ts"
58
- ],
59
- "zod": [
60
- "dist/src/zod/index.d.ts"
61
- ]
62
- }
28
+ "./type-utils": {
29
+ "types": "./dist/src/type-utils/index.d.ts",
30
+ "default": "./dist/src/type-utils/index.js"
63
31
  },
64
- "scripts": {
65
- "build": "tsc",
66
- "typecheck": "tsc --noEmit",
67
- "lint": "eslint",
68
- "lint:fix": "eslint --fix",
69
- "format": "prettier --write .",
70
- "format:check": "prettier --check .",
71
- "test": "vitest run --coverage",
72
- "check:pushdata": "node scripts/check-pushdata.mjs",
73
- "check-unused": "knip",
74
- "ci": "npm run typecheck && npm run lint && npm run format:check && npm run check:pushdata && npm test",
75
- "probe": "node scripts/probe-errors.mjs",
76
- "prepare": "husky .husky || true"
32
+ "./gteam-internal": {
33
+ "types": "./dist/src/gteam-internal/index.d.ts",
34
+ "default": "./dist/src/gteam-internal/index.js"
77
35
  },
78
- "lint-staged": {
79
- "*.js": "eslint",
80
- "*.ts": "eslint",
81
- "*.mjs": "eslint"
82
- },
83
- "devDependencies": {
84
- "@apify/eslint-config": "^1.2.0",
85
- "@apify/tsconfig": "^0.1.2",
86
- "@types/node": "^25.9.1",
87
- "@vitest/coverage-v8": "^4.0.18",
88
- "apify": "3.7.2",
89
- "apify-client": "^2.17.0",
90
- "eslint": "^9.39.4",
91
- "eslint-config-prettier": "^10.1.8",
92
- "globals": "^17.7.0",
93
- "husky": "^9.1.7",
94
- "knip": "^5.88.1",
95
- "lint-staged": "^15.5.2",
96
- "prettier": "^3.9.4",
97
- "typescript": "^6.0.3",
98
- "typescript-eslint": "^8.62.1",
99
- "vitest": "^4.0.18",
100
- "zod": "^4.6.2"
36
+ "./zod": {
37
+ "types": "./dist/src/zod/index.d.ts",
38
+ "default": "./dist/src/zod/index.js"
39
+ }
40
+ },
41
+ "files": [
42
+ "dist/index.js",
43
+ "dist/index.js.map",
44
+ "dist/index.d.ts",
45
+ "dist/index.d.ts.map",
46
+ "dist/src"
47
+ ],
48
+ "typesVersions": {
49
+ "*": {
50
+ "qc-logger": [
51
+ "dist/src/qc-logger/index.d.ts"
52
+ ],
53
+ "type-utils": [
54
+ "dist/src/type-utils/index.d.ts"
55
+ ],
56
+ "gteam-internal": [
57
+ "dist/src/gteam-internal/index.d.ts"
58
+ ],
59
+ "zod": [
60
+ "dist/src/zod/index.d.ts"
61
+ ]
62
+ }
63
+ },
64
+ "scripts": {
65
+ "build": "tsc",
66
+ "typecheck": "tsc --noEmit",
67
+ "lint": "eslint",
68
+ "lint:fix": "eslint --fix",
69
+ "format": "prettier --write .",
70
+ "format:check": "prettier --check .",
71
+ "test": "vitest run --coverage",
72
+ "check:pushdata": "node scripts/check-pushdata.mjs",
73
+ "check-unused": "knip",
74
+ "ci": "npm run typecheck && npm run lint && npm run format:check && npm run check:pushdata && npm test",
75
+ "probe": "node scripts/probe-errors.mjs",
76
+ "prepare": "husky .husky || true"
77
+ },
78
+ "lint-staged": {
79
+ "*.js": "eslint",
80
+ "*.ts": "eslint",
81
+ "*.mjs": "eslint"
82
+ },
83
+ "devDependencies": {
84
+ "@apify/eslint-config": "^1.2.0",
85
+ "@apify/tsconfig": "^0.1.2",
86
+ "@types/node": "^25.9.1",
87
+ "@vitest/coverage-v8": "^4.0.18",
88
+ "apify": "3.7.2",
89
+ "apify-client": "^2.17.0",
90
+ "eslint": "^9.39.4",
91
+ "eslint-config-prettier": "^10.1.8",
92
+ "globals": "^17.7.0",
93
+ "husky": "^9.1.7",
94
+ "knip": "^5.88.1",
95
+ "lint-staged": "^15.5.2",
96
+ "prettier": "^3.9.4",
97
+ "typescript": "^6.0.3",
98
+ "typescript-eslint": "^8.62.1",
99
+ "vitest": "^4.0.18",
100
+ "zod": "^4.6.2"
101
+ },
102
+ "license": "ISC",
103
+ "peerDependencies": {
104
+ "@apify/log": "^2",
105
+ "apify": "^3",
106
+ "apify-client": "^2",
107
+ "zod": "^4"
108
+ },
109
+ "peerDependenciesMeta": {
110
+ "apify": {
111
+ "optional": true
101
112
  },
102
- "license": "ISC",
103
- "peerDependencies": {
104
- "@apify/log": "^2",
105
- "apify": "^3",
106
- "apify-client": "^2",
107
- "zod": "^4"
113
+ "apify-client": {
114
+ "optional": true
108
115
  },
109
- "peerDependenciesMeta": {
110
- "apify": {
111
- "optional": true
112
- },
113
- "apify-client": {
114
- "optional": true
115
- },
116
- "zod": {
117
- "optional": true
118
- }
116
+ "zod": {
117
+ "optional": true
119
118
  }
119
+ }
120
120
  }