@prosopo/detector 2.6.1 → 3.0.3
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/CHANGELOG.md +43 -0
- package/dist/index.d.ts +17 -4
- package/dist/index.js +15 -1114
- package/package.json +19 -15
- package/vite.cjs.config.ts +3 -4
- package/{src/index.d.ts → vite.esm.config.ts} +6 -4
- package/vite.test.config.ts +32 -0
- package/dist/cjs/index.cjs +0 -1784
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/src/index.js +0 -15
package/package.json
CHANGED
|
@@ -1,41 +1,45 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosopo/detector",
|
|
3
|
-
"version": "
|
|
4
|
-
"main": "
|
|
3
|
+
"version": "3.0.3",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"types": "dist/index.d.ts",
|
|
5
6
|
"engines": {
|
|
6
7
|
"node": "20",
|
|
7
8
|
"npm": "10.8.2"
|
|
8
9
|
},
|
|
9
10
|
"exports": {
|
|
10
11
|
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
11
13
|
"import": "./dist/index.js",
|
|
12
14
|
"require": "./dist/cjs/index.cjs"
|
|
13
15
|
}
|
|
14
16
|
},
|
|
15
17
|
"scripts": {
|
|
16
|
-
"
|
|
17
|
-
"build": "
|
|
18
|
-
"build:
|
|
19
|
-
"
|
|
18
|
+
"clean": "del-cli --verbose dist tsconfig.tsbuildinfo",
|
|
19
|
+
"build": "npm run clean && cp -r src dist",
|
|
20
|
+
"build:tsc": "tsc --build --verbose",
|
|
21
|
+
"build:cjs": "npm run build",
|
|
22
|
+
"typecheck": "echo no typecheck"
|
|
20
23
|
},
|
|
21
24
|
"devDependencies": {
|
|
22
25
|
"@vitest/coverage-v8": "3.0.9",
|
|
23
26
|
"concurrently": "9.0.1",
|
|
24
27
|
"del-cli": "6.0.0",
|
|
25
|
-
"npm-run-all": "
|
|
28
|
+
"npm-run-all": "4.1.5",
|
|
26
29
|
"tslib": "2.7.0",
|
|
27
|
-
"tsx": "4.
|
|
30
|
+
"tsx": "4.20.3",
|
|
28
31
|
"typescript": "5.6.2",
|
|
29
|
-
"vite": "6.
|
|
32
|
+
"vite": "6.3.5",
|
|
30
33
|
"vitest": "3.0.9"
|
|
31
34
|
},
|
|
32
35
|
"type": "module",
|
|
33
36
|
"dependencies": {
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
37
|
+
"@typegoose/auto-increment": "4.13.0",
|
|
38
|
+
"axios": "1.10.0",
|
|
39
|
+
"esbuild": "0.25.6",
|
|
40
|
+
"express": "4.21.2",
|
|
41
|
+
"openpgp": "5.11.3",
|
|
42
|
+
"webpack-dev-server": "5.2.2",
|
|
43
|
+
"@prosopo/config": "3.1.3"
|
|
40
44
|
}
|
|
41
45
|
}
|
package/vite.cjs.config.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import path from "node:path";
|
|
1
2
|
// Copyright 2021-2025 Prosopo (UK) Ltd.
|
|
2
3
|
//
|
|
3
4
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -11,13 +12,11 @@
|
|
|
11
12
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
13
|
// See the License for the specific language governing permissions and
|
|
13
14
|
// limitations under the License.
|
|
14
|
-
import path from "node:path";
|
|
15
15
|
import { ViteCommonJSConfig } from "@prosopo/config";
|
|
16
16
|
|
|
17
17
|
export default function () {
|
|
18
18
|
return ViteCommonJSConfig(
|
|
19
|
-
"
|
|
20
|
-
path.resolve("./tsconfig.
|
|
21
|
-
"src/index.js",
|
|
19
|
+
path.basename("."),
|
|
20
|
+
path.resolve("./tsconfig.json"),
|
|
22
21
|
);
|
|
23
22
|
}
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
import path from "node:path";
|
|
16
|
+
import { ViteEsmConfig } from "@prosopo/config";
|
|
17
|
+
|
|
18
|
+
export default function () {
|
|
19
|
+
return ViteEsmConfig(path.basename("."), path.resolve("./tsconfig.json"));
|
|
20
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
// Copyright 2021-2025 Prosopo (UK) Ltd.
|
|
4
|
+
//
|
|
5
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
// you may not use this file except in compliance with the License.
|
|
7
|
+
// You may obtain a copy of the License at
|
|
8
|
+
//
|
|
9
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
//
|
|
11
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
// See the License for the specific language governing permissions and
|
|
15
|
+
// limitations under the License.
|
|
16
|
+
import { ViteTestConfig } from "@prosopo/config";
|
|
17
|
+
import dotenv from "dotenv";
|
|
18
|
+
process.env.NODE_ENV = "test";
|
|
19
|
+
// if .env.test exists at this level, use it, otherwise use the one at the root
|
|
20
|
+
const envFile = `.env.${process.env.NODE_ENV || "development"}`;
|
|
21
|
+
let envPath = envFile;
|
|
22
|
+
if (fs.existsSync(envFile)) {
|
|
23
|
+
envPath = path.resolve(envFile);
|
|
24
|
+
} else if (fs.existsSync(`../../${envFile}`)) {
|
|
25
|
+
envPath = path.resolve(`../../${envFile}`);
|
|
26
|
+
} else {
|
|
27
|
+
throw new Error(`No ${envFile} file found`);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
dotenv.config({ path: envPath });
|
|
31
|
+
|
|
32
|
+
export default ViteTestConfig();
|