npm install breaks because it does not find entrypoint file
parent
a84efdb8be
commit
1a6f3137eb
|
@ -2,9 +2,9 @@
|
||||||
"name": "authelia",
|
"name": "authelia",
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"description": "2FA Single Sign-On server for nginx using LDAP, TOTP and U2F",
|
"description": "2FA Single Sign-On server for nginx using LDAP, TOTP and U2F",
|
||||||
"main": "src/index.js",
|
"main": "dist/src/server/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
"authelia": "src/index.js"
|
"authelia": "dist/src/server/index.js"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "./node_modules/.bin/mocha --compilers ts:ts-node/register --recursive test/client test/server",
|
"test": "./node_modules/.bin/mocha --compilers ts:ts-node/register --recursive test/client test/server",
|
||||||
|
|
|
@ -1,33 +1,37 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
NPM_UNPACK_DIR=/tmp/npm-unpack/test
|
NPM_UNPACK_DIR=/tmp/npm-unpack
|
||||||
|
|
||||||
echo "Packing npm package into a tarball"
|
echo "--- Packing npm package into a tarball"
|
||||||
npm pack
|
npm pack
|
||||||
|
|
||||||
AUTHELIA_PACKAGE=`ls | grep "authelia-\([0-9]\+.\)\{2\}[0-9]\+.tgz"`
|
AUTHELIA_PACKAGE=`ls | grep "authelia-\([0-9]\+.\)\{2\}[0-9]\+.tgz"`
|
||||||
echo "Authelia package is ${AUTHELIA_PACKAGE}"
|
echo "--- Authelia package is ${AUTHELIA_PACKAGE}"
|
||||||
|
|
||||||
echo "Copy package into "${NPM_UNPACK_DIR}" to test unpacking"
|
echo "--- Copy package into "${NPM_UNPACK_DIR}" to test unpacking"
|
||||||
mkdir -p ${NPM_UNPACK_DIR}
|
mkdir -p ${NPM_UNPACK_DIR}
|
||||||
cp ${AUTHELIA_PACKAGE} ${NPM_UNPACK_DIR}
|
cp ${AUTHELIA_PACKAGE} ${NPM_UNPACK_DIR}
|
||||||
|
|
||||||
pushd ${NPM_UNPACK_DIR}
|
pushd ${NPM_UNPACK_DIR}
|
||||||
|
|
||||||
echo "Test unpacking..."
|
echo "--- Test unpacking..."
|
||||||
npm install ${AUTHELIA_PACKAGE}
|
npm install ${AUTHELIA_PACKAGE}
|
||||||
|
|
||||||
RET_CODE=$?
|
RET_CODE_INSTALL=$?
|
||||||
# echo ${RET_CODE}
|
# echo ${RET_CODE}
|
||||||
|
|
||||||
|
# The binary must start and display the help menu
|
||||||
|
./node_modules/.bin/authelia | grep "No config file has been provided."
|
||||||
|
RET_CODE_RUN=$?
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
if [ "$RET_CODE" != "0" ]
|
if [ "$RET_CODE_INSTALL" != "0" ] || [ "$RET_CODE_RUN" != "0" ]
|
||||||
then
|
then
|
||||||
echo "Unpacking failed..."
|
echo "--- Unpacking failed..."
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo "Unpacking succeeded"
|
echo "+++ Unpacking succeeded"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue