fix node build error

pull/13/head
Vladimir Mandic 2020-08-29 14:56:29 -04:00
parent bf4a554722
commit d030485f60
12 changed files with 24408 additions and 27 deletions

3
build/index.d.ts vendored
View File

@ -1,7 +1,8 @@
declare const test = "test";
import * as tf from '@tensorflow/tfjs-core'; import * as tf from '@tensorflow/tfjs-core';
import * as draw from './draw'; import * as draw from './draw';
import * as utils from './utils'; import * as utils from './utils';
export { draw, utils, tf }; export { draw, utils, tf, test };
export * from './ageGenderNet/index'; export * from './ageGenderNet/index';
export * from './classes/index'; export * from './classes/index';
export * from './dom/index'; export * from './dom/index';

View File

@ -1 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC,OAAO,EACL,IAAI,EACJ,KAAK,EACL,EAAE,EACH,CAAA;AAED,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AAEnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC"} {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,IAAI,SAAS,CAAC;AACpB,OAAO,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC"}

View File

@ -1,7 +1,8 @@
const test = 'test';
import * as tf from '@tensorflow/tfjs-core'; import * as tf from '@tensorflow/tfjs-core';
import * as draw from './draw'; import * as draw from './draw';
import * as utils from './utils'; import * as utils from './utils';
export { draw, utils, tf }; export { draw, utils, tf, test };
export * from './ageGenderNet/index'; export * from './ageGenderNet/index';
export * from './classes/index'; export * from './classes/index';
export * from './dom/index'; export * from './dom/index';

View File

@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC,OAAO,EACL,IAAI,EACJ,KAAK,EACL,EAAE,EACH,CAAA;AAED,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AAEnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC"} {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,IAAI,GAAG,MAAM,CAAC;AACpB,OAAO,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC"}

2
dist/face-api.js vendored
View File

@ -798,6 +798,7 @@ var faceapi = (() => {
shuffleArray: () => shuffleArray, shuffleArray: () => shuffleArray,
sigmoid: () => sigmoid6, sigmoid: () => sigmoid6,
ssdMobilenetv1: () => ssdMobilenetv1, ssdMobilenetv1: () => ssdMobilenetv1,
test: () => test,
tf: () => dist_exports, tf: () => dist_exports,
tinyFaceDetector: () => tinyFaceDetector, tinyFaceDetector: () => tinyFaceDetector,
tinyYolov2: () => tinyYolov23, tinyYolov2: () => tinyYolov23,
@ -805,6 +806,7 @@ var faceapi = (() => {
utils: () => utils_exports, utils: () => utils_exports,
validateConfig: () => validateConfig validateConfig: () => validateConfig
}); });
const test = "test";
}); });
// node_modules/@tensorflow/tfjs-core/dist/environment.js // node_modules/@tensorflow/tfjs-core/dist/environment.js

File diff suppressed because one or more lines are too long

18
dist/face-api.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

24376
dist/face-api.node.js vendored Normal file

File diff suppressed because it is too large Load Diff

7
dist/face-api.node.js.map vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -2,7 +2,7 @@
"name": "@vladmandic/face-api", "name": "@vladmandic/face-api",
"version": "0.4.2", "version": "0.4.2",
"description": "JavaScript module for Face Detection and Face Recognition Using Tensorflow/JS", "description": "JavaScript module for Face Detection and Face Recognition Using Tensorflow/JS",
"main": "./build/index.js", "main": "./dist/face-api.node.js",
"typings": "./build/index.d.ts", "typings": "./build/index.d.ts",
"engines": { "engines": {
"node": ">=12.0.0" "node": ">=12.0.0"
@ -10,9 +10,10 @@
"type": "module", "type": "module",
"scripts": { "scripts": {
"compile": "tsc", "compile": "tsc",
"module": "esbuild --bundle --outfile=./dist/face-api.node.js --target=es2018 --platform=node --format=esm --global-name=faceapi --sourcemap --log-level=error --tsconfig=./tsconfig.json build/index.js",
"bundle": "esbuild --bundle --outfile=./dist/face-api.js --target=es2018 --platform=browser --format=iife --global-name=faceapi --sourcemap --log-level=error --tsconfig=./tsconfig.json build/index.js", "bundle": "esbuild --bundle --outfile=./dist/face-api.js --target=es2018 --platform=browser --format=iife --global-name=faceapi --sourcemap --log-level=error --tsconfig=./tsconfig.json build/index.js",
"minify": "esbuild --bundle --outfile=./dist/face-api.min.js --target=es2018 --platform=browser --sourcemap --format=iife --global-name=faceapi --log-level=error --minify --tsconfig=./tsconfig.json build/index.js", "minify": "esbuild --bundle --outfile=./dist/face-api.min.js --target=es2018 --platform=browser --sourcemap --format=iife --global-name=faceapi --log-level=error --minify --tsconfig=./tsconfig.json build/index.js",
"build": "npm run compile && npm run bundle && npm run minify" "build": "npm run compile && npm run bundle && npm run module && npm run minify"
}, },
"keywords": [ "keywords": [
"tensorflow", "tensorflow",

View File

@ -1,14 +1,8 @@
const test = 'test';
import * as tf from '@tensorflow/tfjs-core'; import * as tf from '@tensorflow/tfjs-core';
import * as draw from './draw'; import * as draw from './draw';
import * as utils from './utils'; import * as utils from './utils';
export { draw, utils, tf, test };
export {
draw,
utils,
tf
}
export * from './ageGenderNet/index'; export * from './ageGenderNet/index';
export * from './classes/index'; export * from './classes/index';
export * from './dom/index' export * from './dom/index'
@ -22,7 +16,6 @@ export * from './ops/index';
export * from './ssdMobilenetv1/index'; export * from './ssdMobilenetv1/index';
export * from './tinyFaceDetector/index'; export * from './tinyFaceDetector/index';
export * from './tinyYolov2/index'; export * from './tinyYolov2/index';
export * from './euclideanDistance'; export * from './euclideanDistance';
export * from './NeuralNetwork'; export * from './NeuralNetwork';
export * from './resizeResults'; export * from './resizeResults';