@vulog/aima-search 1.2.30 → 1.2.32

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/dist/index.cjs ADDED
@@ -0,0 +1,7 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region src/search.ts
3
+ const search = async (client, query) => {
4
+ return client.get(`/boapi/proxy/search/fleets/${client.clientOptions.fleetId}/search/${encodeURIComponent(query)}`).then(({ data }) => data);
5
+ };
6
+ //#endregion
7
+ exports.search = search;
@@ -0,0 +1,25 @@
1
+ import { Client } from "@vulog/aima-client";
2
+
3
+ //#region src/types.d.ts
4
+ type Search = {
5
+ fleetid: string;
6
+ id: string;
7
+ } & ({
8
+ type: 'user';
9
+ email: string;
10
+ firstname: string;
11
+ lastname: string;
12
+ phone: string;
13
+ username: string;
14
+ } | {
15
+ type: 'vehicules';
16
+ modelname: string;
17
+ plate: string;
18
+ vehiculename: string;
19
+ vuboxid: string;
20
+ });
21
+ //#endregion
22
+ //#region src/search.d.ts
23
+ declare const search: (client: Client, query: string) => Promise<Search[]>;
24
+ //#endregion
25
+ export { Search, search };
package/dist/index.d.mts CHANGED
@@ -1,23 +1,25 @@
1
- import { Client } from '@vulog/aima-client';
1
+ import { Client } from "@vulog/aima-client";
2
2
 
3
+ //#region src/types.d.ts
3
4
  type Search = {
4
- fleetid: string;
5
- id: string;
5
+ fleetid: string;
6
+ id: string;
6
7
  } & ({
7
- type: 'user';
8
- email: string;
9
- firstname: string;
10
- lastname: string;
11
- phone: string;
12
- username: string;
8
+ type: 'user';
9
+ email: string;
10
+ firstname: string;
11
+ lastname: string;
12
+ phone: string;
13
+ username: string;
13
14
  } | {
14
- type: 'vehicules';
15
- modelname: string;
16
- plate: string;
17
- vehiculename: string;
18
- vuboxid: string;
15
+ type: 'vehicules';
16
+ modelname: string;
17
+ plate: string;
18
+ vehiculename: string;
19
+ vuboxid: string;
19
20
  });
20
-
21
+ //#endregion
22
+ //#region src/search.d.ts
21
23
  declare const search: (client: Client, query: string) => Promise<Search[]>;
22
-
23
- export { type Search, search };
24
+ //#endregion
25
+ export { Search, search };
package/dist/index.mjs CHANGED
@@ -1,7 +1,6 @@
1
- // src/search.ts
2
- var search = async (client, query) => {
3
- return client.get(`/boapi/proxy/search/fleets/${client.clientOptions.fleetId}/search/${encodeURIComponent(query)}`).then(({ data }) => data);
4
- };
5
- export {
6
- search
1
+ //#region src/search.ts
2
+ const search = async (client, query) => {
3
+ return client.get(`/boapi/proxy/search/fleets/${client.clientOptions.fleetId}/search/${encodeURIComponent(query)}`).then(({ data }) => data);
7
4
  };
5
+ //#endregion
6
+ export { search };
package/package.json CHANGED
@@ -1,13 +1,26 @@
1
1
  {
2
2
  "name": "@vulog/aima-search",
3
- "version": "1.2.30",
4
- "main": "dist/index.js",
3
+ "type": "module",
4
+ "version": "1.2.32",
5
+ "main": "dist/index.cjs",
5
6
  "module": "dist/index.mjs",
6
- "types": "dist/index.d.ts",
7
+ "types": "dist/index.d.cts",
8
+ "exports": {
9
+ ".": {
10
+ "import": {
11
+ "types": "./dist/index.d.mts",
12
+ "default": "./dist/index.mjs"
13
+ },
14
+ "require": {
15
+ "types": "./dist/index.d.cts",
16
+ "default": "./dist/index.cjs"
17
+ }
18
+ }
19
+ },
7
20
  "scripts": {
8
- "build": "tsup",
9
- "dev": "tsup --watch",
10
- "test": "vitest run",
21
+ "build": "tsdown",
22
+ "dev": "tsdown --watch",
23
+ "test": "vitest run --passWithNoTests",
11
24
  "test:watch": "vitest",
12
25
  "lint": "eslint src/**/* --ext .ts"
13
26
  },
@@ -19,8 +32,8 @@
19
32
  "author": "Vulog",
20
33
  "license": "MIT",
21
34
  "dependencies": {
22
- "@vulog/aima-client": "1.2.30",
23
- "@vulog/aima-core": "1.2.30"
35
+ "@vulog/aima-client": "1.2.32",
36
+ "@vulog/aima-core": "1.2.32"
24
37
  },
25
38
  "peerDependencies": {
26
39
  "zod": "^3.25.76"
@@ -1,4 +1,4 @@
1
- import { defineConfig } from 'tsup';
1
+ import { defineConfig } from 'tsdown';
2
2
 
3
3
  export default defineConfig({
4
4
  entry: ['src/index.ts'],
package/dist/index.d.ts DELETED
@@ -1,23 +0,0 @@
1
- import { Client } from '@vulog/aima-client';
2
-
3
- type Search = {
4
- fleetid: string;
5
- id: string;
6
- } & ({
7
- type: 'user';
8
- email: string;
9
- firstname: string;
10
- lastname: string;
11
- phone: string;
12
- username: string;
13
- } | {
14
- type: 'vehicules';
15
- modelname: string;
16
- plate: string;
17
- vehiculename: string;
18
- vuboxid: string;
19
- });
20
-
21
- declare const search: (client: Client, query: string) => Promise<Search[]>;
22
-
23
- export { type Search, search };
package/dist/index.js DELETED
@@ -1,34 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/index.ts
21
- var index_exports = {};
22
- __export(index_exports, {
23
- search: () => search
24
- });
25
- module.exports = __toCommonJS(index_exports);
26
-
27
- // src/search.ts
28
- var search = async (client, query) => {
29
- return client.get(`/boapi/proxy/search/fleets/${client.clientOptions.fleetId}/search/${encodeURIComponent(query)}`).then(({ data }) => data);
30
- };
31
- // Annotate the CommonJS export names for ESM import in node:
32
- 0 && (module.exports = {
33
- search
34
- });
File without changes