@haatlabs-core/provider-image-search 0.11.3 → 0.12.1

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/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # @haatlabs-core/provider-image-search
2
2
 
3
+ **`@haatlabs-core/provider-image-search/contracts`** (0.12.1): `IMAGE_SEARCH_ERRORS`,
4
+ `SearchErrorCode`, `createSearchError` and the `SearchError` type, with nothing of Node:
5
+ a project's contracts, which its pages load, import from here and never the root, which is for Node.
6
+
3
7
  ## Install
4
8
 
5
9
  pnpm add @haatlabs-core/provider-image-search
@@ -0,0 +1 @@
1
+ export * from './errors.js';
@@ -0,0 +1,21 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var contracts_exports = {};
16
+ module.exports = __toCommonJS(contracts_exports);
17
+ __reExport(contracts_exports, require("./errors.js"), module.exports);
18
+ // Annotate the CommonJS export names for ESM import in node:
19
+ 0 && (module.exports = {
20
+ ...require("./errors.js")
21
+ });
@@ -0,0 +1 @@
1
+ export * from './errors.js';
@@ -0,0 +1,6 @@
1
+ // What a project's contracts, which its browser code also loads, may take from this package:
2
+ // its error code.
3
+ // Nothing here loads a Node built-in or a server client: scripts/check-browser.mjs bundles
4
+ // it for a browser and runs it.
5
+ export * from './errors.js';
6
+ //# sourceMappingURL=contracts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contracts.js","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,kBAAkB;AAClB,2FAA2F;AAC3F,gCAAgC;AAChC,cAAc,aAAa,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haatlabs-core/provider-image-search",
3
- "version": "0.11.3",
3
+ "version": "0.12.1",
4
4
  "description": "Image and web search through SearXNG, Brave or SerpApi behind one SearchProvider.",
5
5
  "keywords": [
6
6
  "haatlabs",
@@ -35,6 +35,16 @@
35
35
  "default": "./dist/cjs/index.js"
36
36
  }
37
37
  },
38
+ "./contracts": {
39
+ "import": {
40
+ "types": "./dist/contracts.d.ts",
41
+ "default": "./dist/contracts.js"
42
+ },
43
+ "require": {
44
+ "types": "./dist/cjs/contracts.d.ts",
45
+ "default": "./dist/cjs/contracts.js"
46
+ }
47
+ },
38
48
  "./fixtures": {
39
49
  "import": {
40
50
  "types": "./dist/fixtures/index.d.ts",
@@ -46,17 +56,22 @@
46
56
  }
47
57
  }
48
58
  },
59
+ "haatlabs": {
60
+ "browser": [
61
+ "./contracts"
62
+ ]
63
+ },
49
64
  "dependencies": {
50
- "@haatlabs-core/errors": "0.11.3",
51
- "@haatlabs-core/providers": "0.11.3",
52
- "@haatlabs-core/services": "0.11.3"
65
+ "@haatlabs-core/errors": "0.12.1",
66
+ "@haatlabs-core/services": "0.12.1",
67
+ "@haatlabs-core/providers": "0.12.1"
53
68
  },
54
69
  "devDependencies": {
55
70
  "@opentelemetry/sdk-trace-node": "^2.11.0",
56
71
  "testcontainers": "^12.2.0",
57
- "@haatlabs-core/tsconfig": "0.11.3",
58
- "@haatlabs-core/vitest-config": "0.11.3",
59
- "@haatlabs-core/observability": "0.11.3"
72
+ "@haatlabs-core/tsconfig": "0.12.1",
73
+ "@haatlabs-core/observability": "0.12.1",
74
+ "@haatlabs-core/vitest-config": "0.12.1"
60
75
  },
61
76
  "scripts": {
62
77
  "build": "rm -rf dist && tsc -p tsconfig.build.json && node ../../scripts/build-cjs.mjs",