optimize for npm

pull/46/head
Vladimir Mandic 2021-03-08 14:17:39 -05:00
parent 40e6d5d9cd
commit 7a93246163
4 changed files with 4122 additions and 16 deletions

274
CHANGELOG.md Normal file
View File

@ -0,0 +1,274 @@
# @vladmandic/face-api
Version: **1.0.0**
Description: **FaceAPI: AI-powered Face Detection, Face Embedding & Recognition Using Tensorflow/JS**
Author: **Vladimir Mandic <mandic00@live.com>**
License: **MIT** </LICENSE>
Repository: **<git+https://github.com/vladmandic/face-api.git>**
## Changelog
### **HEAD -> master** 2021/03/08 mandic00@live.com
- added typings for face angle
- disable landmark printing
### **0.30.5** 2021/03/07 mandic00@live.com
- enabled live demo on gitpages
### **0.30.4** 2021/03/07 mandic00@live.com
- added face angle calculations
- added documentation
- package update
### **0.30.3** 2021/03/04 mandic00@live.com
### **0.30.2** 2021/02/26 mandic00@live.com
### **0.30.1** 2021/02/25 mandic00@live.com
### **0.13.3** 2021/02/21 mandic00@live.com
- added note-cpu target
- merge pull request #39 from xemle/feature/node-cpu
- add node-cpu build for non supported systems of libtensorflow
### **0.13.2** 2021/02/20 mandic00@live.com
### **0.13.1** 2021/02/20 mandic00@live.com
### **0.12.10** 2021/02/20 mandic00@live.com
- exception handling
### **0.12.9** 2021/02/20 mandic00@live.com
### **0.12.8** 2021/02/20 mandic00@live.com
### **0.12.7** 2021/02/17 mandic00@live.com
- 0.12.7
### **0.12.6** 2021/02/13 mandic00@live.com
### **0.12.5** 2021/02/12 mandic00@live.com
### **0.12.4** 2021/02/06 mandic00@live.com
### **0.12.3** 2021/02/06 mandic00@live.com
### **0.12.2** 2021/02/02 mandic00@live.com
### **update for tfjs 3.0.0** 2021/01/29 mandic00@live.com
### **0.12.1** 2021/01/29 mandic00@live.com
- rebuild
### **0.11.6** 2021/01/24 mandic00@live.com
- add check for null face descriptor
- merge pull request #34 from patrickhulce/patch-1
- fix: return empty descriptor for zero-sized faces
### **0.11.5** 2021/01/22 mandic00@live.com
### **0.11.4** 2021/01/22 mandic00@live.com
### **0.11.3** 2021/01/20 mandic00@live.com
- fix typo
- enable full minification
### **0.11.2** 2021/01/12 mandic00@live.com
- full rebuild
### **0.11.1** 2021/01/10 mandic00@live.com
- added live webcam demo
### **0.10.2** 2021/01/03 mandic00@live.com
- ts linting
- version bump
### **0.10.1** 2020/12/23 mandic00@live.com
- full re-lint and typings generation
- rebuild
### **0.9.5** 2020/12/19 mandic00@live.com
- added tsc build typings
### **0.9.4** 2020/12/15 mandic00@live.com
- package update
### **0.9.3** 2020/12/12 mandic00@live.com
- remove old demo
- merge branch 'master' of https://github.com/vladmandic/face-api
### **0.9.2** 2020/12/08 mandic00@live.com
- merge pull request #19 from meeki007/patch-3
- remove http reff
- fixed typos
### **0.9.1** 2020/12/02 mandic00@live.com
- redesigned tfjs bundling and build process
- push
- merge pull request #17 from meeki007/patch-2
- merge pull request #16 from meeki007/patch-1
- added link to documentation for js.tensorflow 2.7.0
- add comments and fix typo
### **0.8.9** 2020/11/25 mandic00@live.com
- removed node-fetch dependency
### **0.8.8** 2020/11/03 mandic00@live.com
### **0.8.7** 2020/11/03 mandic00@live.com
- removed type from package.json and added nodejs example
### **0.8.6** 2020/10/29 mandic00@live.com
### **0.8.5** 2020/10/27 mandic00@live.com
### **0.8.4** 2020/10/27 mandic00@live.com
- fix webpack compatibility issue
### **0.8.3** 2020/10/25 mandic00@live.com
### **0.8.2** 2020/10/25 mandic00@live.com
- fix for wasm compatibility
### **0.8.1** 2020/10/15 mandic00@live.com
- added cjs builds
### **0.7.4** 2020/10/14 mandic00@live.com
- added nobundle
### **0.7.3** 2020/10/13 mandic00@live.com
### **0.7.2** 2020/10/13 mandic00@live.com
### **0.7.1** 2020/10/13 mandic00@live.com
- switched to monolithic build
### **0.6.3** 2020/10/12 mandic00@live.com
### **0.6.2** 2020/10/11 mandic00@live.com
### **0.6.1** 2020/10/11 mandic00@live.com
- major update
- tfjs 2.6.0
### **0.5.3** 2020/09/18 cyan00@gmail.com
### **0.5.2** 2020/09/16 cyan00@gmail.com
- added build for node
- upgrade to tfjs@2.4.0 and ts-node@9.0.0
- create issue.md
- added issue template
- added faceapi.version object
### **0.5.1** 2020/09/08 cyan00@gmail.com
### **0.4.6** 2020/09/08 cyan00@gmail.com
- added test fot @tfjs and backends loaded
### **0.4.5** 2020/08/31 cyan00@gmail.com
- adding build
### **0.4.4** 2020/08/30 cyan00@gmail.com
- change build process
### **0.4.3** 2020/08/29 cyan00@gmail.com
- fix node build error
### **0.4.2** 2020/08/29 cyan00@gmail.com
### **0.4.1** 2020/08/27 cyan00@gmail.com
### **0.3.9** 2020/08/27 cyan00@gmail.com
- added example
### **0.3.8** 2020/08/26 cyan00@gmail.com
- re-added ssd_mobilenet
### **0.3.7** 2020/08/22 cyan00@gmail.com
### **0.3.6** 2020/08/21 cyan00@gmail.com
### **0.3.5** 2020/08/19 cyan00@gmail.com
### **0.3.4** 2020/08/19 cyan00@gmail.com
- switch to commonjs and es2018 for compatibility
### **0.3.3** 2020/08/19 cyan00@gmail.com
### **0.3.2** 2020/08/18 cyan00@gmail.com
### **0.3.1** 2020/08/18 cyan00@gmail.com
- uodated build script
- npm publish
- added pre-compiled build
- added pre-bundled dist
- removed unnecessary weights
- initial commit

3793
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "@vladmandic/face-api",
"version": "0.30.6",
"version": "1.0.0",
"description": "FaceAPI: AI-powered Face Detection, Face Embedding & Recognition Using Tensorflow/JS",
"main": "dist/face-api.node.js",
"module": "dist/face-api.esm.js",
@ -12,8 +12,9 @@
"scripts": {
"start": "node --trace-warnings example/node-singleprocess.js",
"dev": "npm install && node server/serve.js",
"build": "rimraf dist/* types/* && node server/build.js",
"lint": "eslint src/**/* example/*.js server/*.js"
"build": "rimraf dist/* types/* && node server/build.js && node server/changelog.js",
"lint": "eslint src/**/* example/*.js server/*.js",
"test": "eslint src/**/* example/*.js server/*.js"
},
"keywords": [
"tensorflow",
@ -38,8 +39,7 @@
"bugs": {
"url": "https://github.com/vladmandic/face-api/issues"
},
"homepage": "https://github.com/vladmandic/face-api#readme",
"dependencies": {},
"homepage": "https://vladmandic.github.io/face-api/example/webcam.html",
"peerDependencies": {},
"devDependencies": {
"@tensorflow/tfjs": "^3.2.0",
@ -51,6 +51,7 @@
"@typescript-eslint/parser": "^4.16.1",
"@vladmandic/pilogger": "^0.2.14",
"chokidar": "^3.5.1",
"dayjs": "^1.10.4",
"esbuild": "^0.8.56",
"eslint": "^7.21.0",
"eslint-config-airbnb-base": "^14.2.1",
@ -59,6 +60,7 @@
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.3.1",
"rimraf": "^3.0.2",
"simple-git": "^2.36.1",
"tslib": "^2.1.0",
"typescript": "^4.2.3"
}

59
server/changelog.js Normal file
View File

@ -0,0 +1,59 @@
const fs = require('fs');
const path = require('path');
const dayjs = require('dayjs');
const simpleGit = require('simple-git/promise');
const logger = require('@vladmandic/pilogger');
const app = require('../package.json');
const git = simpleGit();
let text = `# ${app.name}
Version: **${app.version}**
Description: **${app.description}**
Author: **${app.author}**
License: **${app.license}** </LICENSE>
Repository: **<${app.repository.url}>**
## Changelog
`;
async function update(f) {
const gitLog = await git.log();
// @ts-ignore
const log = gitLog.all.sort((a, b) => (new Date(b.date).getTime() - new Date(a.date).getTime()));
let previous = '';
const headings = [];
for (const l of log) {
const msg = l.message.toLowerCase();
if ((l.refs !== '') || msg.match(/^[0-99].[0-99].[0-99]/)) {
const dt = dayjs(l.date).format('YYYY/MM/DD');
let ver = msg.match(/[0-99].[0-99].[0-99]/) ? msg : l.refs;
ver = ver.replace('tag: v', '').replace('tag: ', 'release: ').split(',')[0];
const heading = `\n### **${ver}** ${dt} ${l.author_email}\n\n`;
if (!headings.includes(heading) && !ver.startsWith('tag')) {
headings.push(heading);
text += heading;
}
} else if ((msg.length > 2) && !msg.startsWith('update') && (previous !== msg)) {
previous = msg;
text += `- ${msg}\n`;
}
}
const name = path.join(__dirname, f);
fs.writeFileSync(name, text);
logger.state('Change log updated:', name);
}
exports.update = update;
try {
if (require.main === module) {
update('../CHANGELOG.md');
}
} catch {
//
}