@charamza/next-password-protect 1.6.1
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/LICENSE +21 -0
- package/README.md +157 -0
- package/dist/cjs/_virtual/JsonWebTokenError.js_commonjs-proxy +2 -0
- package/dist/cjs/_virtual/JsonWebTokenError.js_commonjs-proxy.map +1 -0
- package/dist/cjs/_virtual/NotBeforeError.js_commonjs-proxy +2 -0
- package/dist/cjs/_virtual/NotBeforeError.js_commonjs-proxy.map +1 -0
- package/dist/cjs/_virtual/TokenExpiredError.js_commonjs-proxy +2 -0
- package/dist/cjs/_virtual/TokenExpiredError.js_commonjs-proxy.map +1 -0
- package/dist/cjs/_virtual/_commonjsHelpers.js +2 -0
- package/dist/cjs/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/cjs/_virtual/data-stream.js_commonjs-proxy +2 -0
- package/dist/cjs/_virtual/data-stream.js_commonjs-proxy.map +1 -0
- package/dist/cjs/_virtual/decode.js_commonjs-proxy +2 -0
- package/dist/cjs/_virtual/decode.js_commonjs-proxy.map +1 -0
- package/dist/cjs/_virtual/ecdsa-sig-formatter.js_commonjs-proxy +2 -0
- package/dist/cjs/_virtual/ecdsa-sig-formatter.js_commonjs-proxy.map +1 -0
- package/dist/cjs/_virtual/index.js_commonjs-proxy +2 -0
- package/dist/cjs/_virtual/index.js_commonjs-proxy.map +1 -0
- package/dist/cjs/_virtual/index10.js_commonjs-proxy +2 -0
- package/dist/cjs/_virtual/index10.js_commonjs-proxy.map +1 -0
- package/dist/cjs/_virtual/index11.js_commonjs-proxy +2 -0
- package/dist/cjs/_virtual/index11.js_commonjs-proxy.map +1 -0
- package/dist/cjs/_virtual/index12.js_commonjs-proxy +2 -0
- package/dist/cjs/_virtual/index12.js_commonjs-proxy.map +1 -0
- package/dist/cjs/_virtual/index13.js_commonjs-proxy +2 -0
- package/dist/cjs/_virtual/index13.js_commonjs-proxy.map +1 -0
- package/dist/cjs/_virtual/index14.js_commonjs-proxy +2 -0
- package/dist/cjs/_virtual/index14.js_commonjs-proxy.map +1 -0
- package/dist/cjs/_virtual/index15.js_commonjs-proxy +2 -0
- package/dist/cjs/_virtual/index15.js_commonjs-proxy.map +1 -0
- package/dist/cjs/_virtual/index2.js_commonjs-proxy +2 -0
- package/dist/cjs/_virtual/index2.js_commonjs-proxy.map +1 -0
- package/dist/cjs/_virtual/index3.js_commonjs-proxy +2 -0
- package/dist/cjs/_virtual/index3.js_commonjs-proxy.map +1 -0
- package/dist/cjs/_virtual/index4.js_commonjs-proxy +2 -0
- package/dist/cjs/_virtual/index4.js_commonjs-proxy.map +1 -0
- package/dist/cjs/_virtual/index5.js_commonjs-proxy +2 -0
- package/dist/cjs/_virtual/index5.js_commonjs-proxy.map +1 -0
- package/dist/cjs/_virtual/index6.js_commonjs-proxy +2 -0
- package/dist/cjs/_virtual/index6.js_commonjs-proxy.map +1 -0
- package/dist/cjs/_virtual/index7.js_commonjs-proxy +2 -0
- package/dist/cjs/_virtual/index7.js_commonjs-proxy.map +1 -0
- package/dist/cjs/_virtual/index8.js_commonjs-proxy +2 -0
- package/dist/cjs/_virtual/index8.js_commonjs-proxy.map +1 -0
- package/dist/cjs/_virtual/index9.js_commonjs-proxy +2 -0
- package/dist/cjs/_virtual/index9.js_commonjs-proxy.map +1 -0
- package/dist/cjs/_virtual/param-bytes-for-alg.js_commonjs-proxy +2 -0
- package/dist/cjs/_virtual/param-bytes-for-alg.js_commonjs-proxy.map +1 -0
- package/dist/cjs/_virtual/psSupported.js_commonjs-proxy +2 -0
- package/dist/cjs/_virtual/psSupported.js_commonjs-proxy.map +1 -0
- package/dist/cjs/_virtual/semver.js_commonjs-proxy +2 -0
- package/dist/cjs/_virtual/semver.js_commonjs-proxy.map +1 -0
- package/dist/cjs/_virtual/sign-stream.js_commonjs-proxy +2 -0
- package/dist/cjs/_virtual/sign-stream.js_commonjs-proxy.map +1 -0
- package/dist/cjs/_virtual/sign.js_commonjs-proxy +2 -0
- package/dist/cjs/_virtual/sign.js_commonjs-proxy.map +1 -0
- package/dist/cjs/_virtual/timespan.js_commonjs-proxy +2 -0
- package/dist/cjs/_virtual/timespan.js_commonjs-proxy.map +1 -0
- package/dist/cjs/_virtual/tostring.js_commonjs-proxy +2 -0
- package/dist/cjs/_virtual/tostring.js_commonjs-proxy.map +1 -0
- package/dist/cjs/_virtual/verify-stream.js_commonjs-proxy +2 -0
- package/dist/cjs/_virtual/verify-stream.js_commonjs-proxy.map +1 -0
- package/dist/cjs/_virtual/verify.js_commonjs-proxy +2 -0
- package/dist/cjs/_virtual/verify.js_commonjs-proxy.map +1 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/jest.config.d.ts +117 -0
- package/dist/cjs/node_modules/@babel/runtime/helpers/esm/extends.js +2 -0
- package/dist/cjs/node_modules/@babel/runtime/helpers/esm/extends.js.map +1 -0
- package/dist/cjs/node_modules/buffer-alloc/index.js +2 -0
- package/dist/cjs/node_modules/buffer-alloc/index.js.map +1 -0
- package/dist/cjs/node_modules/buffer-alloc-unsafe/index.js +2 -0
- package/dist/cjs/node_modules/buffer-alloc-unsafe/index.js.map +1 -0
- package/dist/cjs/node_modules/buffer-equal-constant-time/index.js +2 -0
- package/dist/cjs/node_modules/buffer-equal-constant-time/index.js.map +1 -0
- package/dist/cjs/node_modules/buffer-fill/index.js +2 -0
- package/dist/cjs/node_modules/buffer-fill/index.js.map +1 -0
- package/dist/cjs/node_modules/cookie/index.js +9 -0
- package/dist/cjs/node_modules/cookie/index.js.map +1 -0
- package/dist/cjs/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js +2 -0
- package/dist/cjs/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js.map +1 -0
- package/dist/cjs/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js +2 -0
- package/dist/cjs/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js.map +1 -0
- package/dist/cjs/node_modules/jsonwebtoken/decode.js +2 -0
- package/dist/cjs/node_modules/jsonwebtoken/decode.js.map +1 -0
- package/dist/cjs/node_modules/jsonwebtoken/index.js +2 -0
- package/dist/cjs/node_modules/jsonwebtoken/index.js.map +1 -0
- package/dist/cjs/node_modules/jsonwebtoken/lib/JsonWebTokenError.js +2 -0
- package/dist/cjs/node_modules/jsonwebtoken/lib/JsonWebTokenError.js.map +1 -0
- package/dist/cjs/node_modules/jsonwebtoken/lib/NotBeforeError.js +2 -0
- package/dist/cjs/node_modules/jsonwebtoken/lib/NotBeforeError.js.map +1 -0
- package/dist/cjs/node_modules/jsonwebtoken/lib/TokenExpiredError.js +2 -0
- package/dist/cjs/node_modules/jsonwebtoken/lib/TokenExpiredError.js.map +1 -0
- package/dist/cjs/node_modules/jsonwebtoken/lib/psSupported.js +2 -0
- package/dist/cjs/node_modules/jsonwebtoken/lib/psSupported.js.map +1 -0
- package/dist/cjs/node_modules/jsonwebtoken/lib/timespan.js +2 -0
- package/dist/cjs/node_modules/jsonwebtoken/lib/timespan.js.map +1 -0
- package/dist/cjs/node_modules/jsonwebtoken/sign.js +2 -0
- package/dist/cjs/node_modules/jsonwebtoken/sign.js.map +1 -0
- package/dist/cjs/node_modules/jsonwebtoken/verify.js +2 -0
- package/dist/cjs/node_modules/jsonwebtoken/verify.js.map +1 -0
- package/dist/cjs/node_modules/jwa/index.js +2 -0
- package/dist/cjs/node_modules/jwa/index.js.map +1 -0
- package/dist/cjs/node_modules/jws/index.js +2 -0
- package/dist/cjs/node_modules/jws/index.js.map +1 -0
- package/dist/cjs/node_modules/jws/lib/data-stream.js +2 -0
- package/dist/cjs/node_modules/jws/lib/data-stream.js.map +1 -0
- package/dist/cjs/node_modules/jws/lib/sign-stream.js +2 -0
- package/dist/cjs/node_modules/jws/lib/sign-stream.js.map +1 -0
- package/dist/cjs/node_modules/jws/lib/tostring.js +2 -0
- package/dist/cjs/node_modules/jws/lib/tostring.js.map +1 -0
- package/dist/cjs/node_modules/jws/lib/verify-stream.js +2 -0
- package/dist/cjs/node_modules/jws/lib/verify-stream.js.map +1 -0
- package/dist/cjs/node_modules/lodash.includes/index.js +2 -0
- package/dist/cjs/node_modules/lodash.includes/index.js.map +1 -0
- package/dist/cjs/node_modules/lodash.isboolean/index.js +2 -0
- package/dist/cjs/node_modules/lodash.isboolean/index.js.map +1 -0
- package/dist/cjs/node_modules/lodash.isinteger/index.js +2 -0
- package/dist/cjs/node_modules/lodash.isinteger/index.js.map +1 -0
- package/dist/cjs/node_modules/lodash.isnumber/index.js +2 -0
- package/dist/cjs/node_modules/lodash.isnumber/index.js.map +1 -0
- package/dist/cjs/node_modules/lodash.isplainobject/index.js +2 -0
- package/dist/cjs/node_modules/lodash.isplainobject/index.js.map +1 -0
- package/dist/cjs/node_modules/lodash.isstring/index.js +2 -0
- package/dist/cjs/node_modules/lodash.isstring/index.js.map +1 -0
- package/dist/cjs/node_modules/lodash.once/index.js +2 -0
- package/dist/cjs/node_modules/lodash.once/index.js.map +1 -0
- package/dist/cjs/node_modules/ms/index.js +2 -0
- package/dist/cjs/node_modules/ms/index.js.map +1 -0
- package/dist/cjs/node_modules/safe-buffer/index.js +3 -0
- package/dist/cjs/node_modules/safe-buffer/index.js.map +1 -0
- package/dist/cjs/node_modules/safe-compare/index.js +2 -0
- package/dist/cjs/node_modules/safe-compare/index.js.map +1 -0
- package/dist/cjs/node_modules/semver/semver.js +2 -0
- package/dist/cjs/node_modules/semver/semver.js.map +1 -0
- package/dist/cjs/node_modules/tslib/tslib.es6.js +17 -0
- package/dist/cjs/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/cjs/src/api/index.d.ts +3 -0
- package/dist/cjs/src/api/loginHandler.d.ts +10 -0
- package/dist/cjs/src/api/loginHandler.js +2 -0
- package/dist/cjs/src/api/loginHandler.js.map +1 -0
- package/dist/cjs/src/api/logoutHandler.d.ts +8 -0
- package/dist/cjs/src/api/logoutHandler.js +2 -0
- package/dist/cjs/src/api/logoutHandler.js.map +1 -0
- package/dist/cjs/src/api/passwordCheckHandler.d.ts +6 -0
- package/dist/cjs/src/api/passwordCheckHandler.js +2 -0
- package/dist/cjs/src/api/passwordCheckHandler.js.map +1 -0
- package/dist/cjs/src/api/sendJson.d.ts +2 -0
- package/dist/cjs/src/api/sendJson.js +2 -0
- package/dist/cjs/src/api/sendJson.js.map +1 -0
- package/dist/cjs/src/api/setCookie.d.ts +2 -0
- package/dist/cjs/src/api/setCookie.js +2 -0
- package/dist/cjs/src/api/setCookie.js.map +1 -0
- package/dist/cjs/src/hoc/LoginComponent.d.ts +8 -0
- package/dist/cjs/src/hoc/LoginComponent.js +2 -0
- package/dist/cjs/src/hoc/LoginComponent.js.map +1 -0
- package/dist/cjs/src/hoc/index.d.ts +1 -0
- package/dist/cjs/src/hoc/withPasswordProtect.d.ts +13 -0
- package/dist/cjs/src/hoc/withPasswordProtect.js +2 -0
- package/dist/cjs/src/hoc/withPasswordProtect.js.map +1 -0
- package/dist/cjs/src/index.d.ts +2 -0
- package/dist/cjs/src/index.js +2 -0
- package/dist/cjs/src/index.js.map +1 -0
- package/dist/esm/_virtual/JsonWebTokenError.js_commonjs-proxy +2 -0
- package/dist/esm/_virtual/JsonWebTokenError.js_commonjs-proxy.map +1 -0
- package/dist/esm/_virtual/NotBeforeError.js_commonjs-proxy +2 -0
- package/dist/esm/_virtual/NotBeforeError.js_commonjs-proxy.map +1 -0
- package/dist/esm/_virtual/TokenExpiredError.js_commonjs-proxy +2 -0
- package/dist/esm/_virtual/TokenExpiredError.js_commonjs-proxy.map +1 -0
- package/dist/esm/_virtual/_commonjsHelpers.js +2 -0
- package/dist/esm/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/esm/_virtual/data-stream.js_commonjs-proxy +2 -0
- package/dist/esm/_virtual/data-stream.js_commonjs-proxy.map +1 -0
- package/dist/esm/_virtual/decode.js_commonjs-proxy +2 -0
- package/dist/esm/_virtual/decode.js_commonjs-proxy.map +1 -0
- package/dist/esm/_virtual/ecdsa-sig-formatter.js_commonjs-proxy +2 -0
- package/dist/esm/_virtual/ecdsa-sig-formatter.js_commonjs-proxy.map +1 -0
- package/dist/esm/_virtual/index.js_commonjs-proxy +2 -0
- package/dist/esm/_virtual/index.js_commonjs-proxy.map +1 -0
- package/dist/esm/_virtual/index10.js_commonjs-proxy +2 -0
- package/dist/esm/_virtual/index10.js_commonjs-proxy.map +1 -0
- package/dist/esm/_virtual/index11.js_commonjs-proxy +2 -0
- package/dist/esm/_virtual/index11.js_commonjs-proxy.map +1 -0
- package/dist/esm/_virtual/index12.js_commonjs-proxy +2 -0
- package/dist/esm/_virtual/index12.js_commonjs-proxy.map +1 -0
- package/dist/esm/_virtual/index13.js_commonjs-proxy +2 -0
- package/dist/esm/_virtual/index13.js_commonjs-proxy.map +1 -0
- package/dist/esm/_virtual/index14.js_commonjs-proxy +2 -0
- package/dist/esm/_virtual/index14.js_commonjs-proxy.map +1 -0
- package/dist/esm/_virtual/index15.js_commonjs-proxy +2 -0
- package/dist/esm/_virtual/index15.js_commonjs-proxy.map +1 -0
- package/dist/esm/_virtual/index2.js_commonjs-proxy +2 -0
- package/dist/esm/_virtual/index2.js_commonjs-proxy.map +1 -0
- package/dist/esm/_virtual/index3.js_commonjs-proxy +2 -0
- package/dist/esm/_virtual/index3.js_commonjs-proxy.map +1 -0
- package/dist/esm/_virtual/index4.js_commonjs-proxy +2 -0
- package/dist/esm/_virtual/index4.js_commonjs-proxy.map +1 -0
- package/dist/esm/_virtual/index5.js_commonjs-proxy +2 -0
- package/dist/esm/_virtual/index5.js_commonjs-proxy.map +1 -0
- package/dist/esm/_virtual/index6.js_commonjs-proxy +2 -0
- package/dist/esm/_virtual/index6.js_commonjs-proxy.map +1 -0
- package/dist/esm/_virtual/index7.js_commonjs-proxy +2 -0
- package/dist/esm/_virtual/index7.js_commonjs-proxy.map +1 -0
- package/dist/esm/_virtual/index8.js_commonjs-proxy +2 -0
- package/dist/esm/_virtual/index8.js_commonjs-proxy.map +1 -0
- package/dist/esm/_virtual/index9.js_commonjs-proxy +2 -0
- package/dist/esm/_virtual/index9.js_commonjs-proxy.map +1 -0
- package/dist/esm/_virtual/param-bytes-for-alg.js_commonjs-proxy +2 -0
- package/dist/esm/_virtual/param-bytes-for-alg.js_commonjs-proxy.map +1 -0
- package/dist/esm/_virtual/psSupported.js_commonjs-proxy +2 -0
- package/dist/esm/_virtual/psSupported.js_commonjs-proxy.map +1 -0
- package/dist/esm/_virtual/semver.js_commonjs-proxy +2 -0
- package/dist/esm/_virtual/semver.js_commonjs-proxy.map +1 -0
- package/dist/esm/_virtual/sign-stream.js_commonjs-proxy +2 -0
- package/dist/esm/_virtual/sign-stream.js_commonjs-proxy.map +1 -0
- package/dist/esm/_virtual/sign.js_commonjs-proxy +2 -0
- package/dist/esm/_virtual/sign.js_commonjs-proxy.map +1 -0
- package/dist/esm/_virtual/timespan.js_commonjs-proxy +2 -0
- package/dist/esm/_virtual/timespan.js_commonjs-proxy.map +1 -0
- package/dist/esm/_virtual/tostring.js_commonjs-proxy +2 -0
- package/dist/esm/_virtual/tostring.js_commonjs-proxy.map +1 -0
- package/dist/esm/_virtual/verify-stream.js_commonjs-proxy +2 -0
- package/dist/esm/_virtual/verify-stream.js_commonjs-proxy.map +1 -0
- package/dist/esm/_virtual/verify.js_commonjs-proxy +2 -0
- package/dist/esm/_virtual/verify.js_commonjs-proxy.map +1 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/jest.config.d.ts +117 -0
- package/dist/esm/node_modules/@babel/runtime/helpers/esm/extends.js +2 -0
- package/dist/esm/node_modules/@babel/runtime/helpers/esm/extends.js.map +1 -0
- package/dist/esm/node_modules/buffer-alloc/index.js +2 -0
- package/dist/esm/node_modules/buffer-alloc/index.js.map +1 -0
- package/dist/esm/node_modules/buffer-alloc-unsafe/index.js +2 -0
- package/dist/esm/node_modules/buffer-alloc-unsafe/index.js.map +1 -0
- package/dist/esm/node_modules/buffer-equal-constant-time/index.js +2 -0
- package/dist/esm/node_modules/buffer-equal-constant-time/index.js.map +1 -0
- package/dist/esm/node_modules/buffer-fill/index.js +2 -0
- package/dist/esm/node_modules/buffer-fill/index.js.map +1 -0
- package/dist/esm/node_modules/cookie/index.js +8 -0
- package/dist/esm/node_modules/cookie/index.js.map +1 -0
- package/dist/esm/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js +2 -0
- package/dist/esm/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js.map +1 -0
- package/dist/esm/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js +2 -0
- package/dist/esm/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js.map +1 -0
- package/dist/esm/node_modules/jsonwebtoken/decode.js +2 -0
- package/dist/esm/node_modules/jsonwebtoken/decode.js.map +1 -0
- package/dist/esm/node_modules/jsonwebtoken/index.js +2 -0
- package/dist/esm/node_modules/jsonwebtoken/index.js.map +1 -0
- package/dist/esm/node_modules/jsonwebtoken/lib/JsonWebTokenError.js +2 -0
- package/dist/esm/node_modules/jsonwebtoken/lib/JsonWebTokenError.js.map +1 -0
- package/dist/esm/node_modules/jsonwebtoken/lib/NotBeforeError.js +2 -0
- package/dist/esm/node_modules/jsonwebtoken/lib/NotBeforeError.js.map +1 -0
- package/dist/esm/node_modules/jsonwebtoken/lib/TokenExpiredError.js +2 -0
- package/dist/esm/node_modules/jsonwebtoken/lib/TokenExpiredError.js.map +1 -0
- package/dist/esm/node_modules/jsonwebtoken/lib/psSupported.js +2 -0
- package/dist/esm/node_modules/jsonwebtoken/lib/psSupported.js.map +1 -0
- package/dist/esm/node_modules/jsonwebtoken/lib/timespan.js +2 -0
- package/dist/esm/node_modules/jsonwebtoken/lib/timespan.js.map +1 -0
- package/dist/esm/node_modules/jsonwebtoken/sign.js +2 -0
- package/dist/esm/node_modules/jsonwebtoken/sign.js.map +1 -0
- package/dist/esm/node_modules/jsonwebtoken/verify.js +2 -0
- package/dist/esm/node_modules/jsonwebtoken/verify.js.map +1 -0
- package/dist/esm/node_modules/jwa/index.js +2 -0
- package/dist/esm/node_modules/jwa/index.js.map +1 -0
- package/dist/esm/node_modules/jws/index.js +2 -0
- package/dist/esm/node_modules/jws/index.js.map +1 -0
- package/dist/esm/node_modules/jws/lib/data-stream.js +2 -0
- package/dist/esm/node_modules/jws/lib/data-stream.js.map +1 -0
- package/dist/esm/node_modules/jws/lib/sign-stream.js +2 -0
- package/dist/esm/node_modules/jws/lib/sign-stream.js.map +1 -0
- package/dist/esm/node_modules/jws/lib/tostring.js +2 -0
- package/dist/esm/node_modules/jws/lib/tostring.js.map +1 -0
- package/dist/esm/node_modules/jws/lib/verify-stream.js +2 -0
- package/dist/esm/node_modules/jws/lib/verify-stream.js.map +1 -0
- package/dist/esm/node_modules/lodash.includes/index.js +2 -0
- package/dist/esm/node_modules/lodash.includes/index.js.map +1 -0
- package/dist/esm/node_modules/lodash.isboolean/index.js +2 -0
- package/dist/esm/node_modules/lodash.isboolean/index.js.map +1 -0
- package/dist/esm/node_modules/lodash.isinteger/index.js +2 -0
- package/dist/esm/node_modules/lodash.isinteger/index.js.map +1 -0
- package/dist/esm/node_modules/lodash.isnumber/index.js +2 -0
- package/dist/esm/node_modules/lodash.isnumber/index.js.map +1 -0
- package/dist/esm/node_modules/lodash.isplainobject/index.js +2 -0
- package/dist/esm/node_modules/lodash.isplainobject/index.js.map +1 -0
- package/dist/esm/node_modules/lodash.isstring/index.js +2 -0
- package/dist/esm/node_modules/lodash.isstring/index.js.map +1 -0
- package/dist/esm/node_modules/lodash.once/index.js +2 -0
- package/dist/esm/node_modules/lodash.once/index.js.map +1 -0
- package/dist/esm/node_modules/ms/index.js +2 -0
- package/dist/esm/node_modules/ms/index.js.map +1 -0
- package/dist/esm/node_modules/safe-buffer/index.js +3 -0
- package/dist/esm/node_modules/safe-buffer/index.js.map +1 -0
- package/dist/esm/node_modules/safe-compare/index.js +2 -0
- package/dist/esm/node_modules/safe-compare/index.js.map +1 -0
- package/dist/esm/node_modules/semver/semver.js +2 -0
- package/dist/esm/node_modules/semver/semver.js.map +1 -0
- package/dist/esm/node_modules/tslib/tslib.es6.js +16 -0
- package/dist/esm/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/esm/src/api/index.d.ts +3 -0
- package/dist/esm/src/api/loginHandler.d.ts +10 -0
- package/dist/esm/src/api/loginHandler.js +2 -0
- package/dist/esm/src/api/loginHandler.js.map +1 -0
- package/dist/esm/src/api/logoutHandler.d.ts +8 -0
- package/dist/esm/src/api/logoutHandler.js +2 -0
- package/dist/esm/src/api/logoutHandler.js.map +1 -0
- package/dist/esm/src/api/passwordCheckHandler.d.ts +6 -0
- package/dist/esm/src/api/passwordCheckHandler.js +2 -0
- package/dist/esm/src/api/passwordCheckHandler.js.map +1 -0
- package/dist/esm/src/api/sendJson.d.ts +2 -0
- package/dist/esm/src/api/sendJson.js +2 -0
- package/dist/esm/src/api/sendJson.js.map +1 -0
- package/dist/esm/src/api/setCookie.d.ts +2 -0
- package/dist/esm/src/api/setCookie.js +2 -0
- package/dist/esm/src/api/setCookie.js.map +1 -0
- package/dist/esm/src/hoc/LoginComponent.d.ts +8 -0
- package/dist/esm/src/hoc/LoginComponent.js +2 -0
- package/dist/esm/src/hoc/LoginComponent.js.map +1 -0
- package/dist/esm/src/hoc/index.d.ts +1 -0
- package/dist/esm/src/hoc/withPasswordProtect.d.ts +13 -0
- package/dist/esm/src/hoc/withPasswordProtect.js +2 -0
- package/dist/esm/src/hoc/withPasswordProtect.js.map +1 -0
- package/dist/esm/src/index.d.ts +2 -0
- package/dist/esm/src/index.js +2 -0
- package/dist/esm/src/index.js.map +1 -0
- package/package.json +145 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Story of AMS
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a aria-label="Story of AMS logo" href="https://storyofams.com/" target="_blank" align="center">
|
|
3
|
+
<img src="https://avatars.githubusercontent.com/u/19343504" alt="Story of AMS" width="100">
|
|
4
|
+
</a>
|
|
5
|
+
<h1 align="center">@storyofams/next-password-protect</h1>
|
|
6
|
+
<p align="center">
|
|
7
|
+
<a aria-label="releases" href="https://GitHub.com/storyofams/next-password-protect/releases/" target="_blank">
|
|
8
|
+
<img src="https://github.com/storyofams/next-password-protect/workflows/Release/badge.svg">
|
|
9
|
+
</a>
|
|
10
|
+
<a aria-label="npm" href="https://www.npmjs.com/package/@storyofams/next-password-protect" target="_blank">
|
|
11
|
+
<img src="https://img.shields.io/npm/v/@storyofams/next-password-protect">
|
|
12
|
+
</a>
|
|
13
|
+
<a aria-label="codecov" href="https://codecov.io/gh/storyofams/next-password-protect" target="_blank">
|
|
14
|
+
<img src="https://codecov.io/gh/storyofams/next-password-protect/branch/master/graph/badge.svg?token=ZV0YT4HU5H">
|
|
15
|
+
</a>
|
|
16
|
+
<a aria-label="stars" href="https://github.com/storyofams/next-password-protect/stargazers/" target="_blank">
|
|
17
|
+
<img src="https://img.shields.io/github/stars/storyofams/next-password-protect.svg?style=social&label=Star&maxAge=86400" />
|
|
18
|
+
</a>
|
|
19
|
+
</p>
|
|
20
|
+
<p align="center">Password protect your Next.js deployments. <a href="http://next-password-protect.vercel.app/" target="_blank">View demo</a> (Password is <b>secret</b>)</p>
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
[](https://user-images.githubusercontent.com/19343479/114987129-1a179180-9e95-11eb-9508-6c514f671ca9.mov)
|
|
26
|
+
|
|
27
|
+
## How it works
|
|
28
|
+
|
|
29
|
+
This library adds a password prompt to your Next.js deployment. It consists of two main parts:
|
|
30
|
+
1. Two serverless API routes:
|
|
31
|
+
- A login route that checks if a password is correct and sets a cookie with a JWT in case it is.
|
|
32
|
+
- A check route that validates if you have the authorization cookie with a valid JWT.
|
|
33
|
+
2. A HOC ([Higher-Order Component](https://reactjs.org/docs/higher-order-components.html)) that wraps Next.js App and adds a check that validates if you are logged in. If you do, then you can view the app normally; otherwise, you are presented with a password prompt.
|
|
34
|
+
|
|
35
|
+
**Important**: The recommended use case for this library is in a staging or preview environment. By taking advantage of webpack's `DefinePlugin`, we can make sure this library is only included in certain environments, keeping the production bundle size small.
|
|
36
|
+
|
|
37
|
+
**This library is NOT meant as a secure password authentication wrapper, but rather as a way to keep nosey people out.**
|
|
38
|
+
|
|
39
|
+
## Installation
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
yarn add @storyofams/next-password-protect
|
|
43
|
+
# or
|
|
44
|
+
npm install @storyofams/next-password-protect
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Usage
|
|
48
|
+
|
|
49
|
+
There are 3 steps to enabling password protect: setting a global variable, adding the API routes, and adding the HOC to \_app.
|
|
50
|
+
|
|
51
|
+
### Step 1
|
|
52
|
+
|
|
53
|
+
In order to be able to take advantage of dead code elimination, it is recommended to add an environment variable like `process.env.PASSWORD_PROTECT`, and enable the library based on that variable. To set this variable, add the following to `next.config.js`:
|
|
54
|
+
|
|
55
|
+
```javascript
|
|
56
|
+
module.exports = {
|
|
57
|
+
env: {
|
|
58
|
+
// Add any logic you want here, returning `true` to enable password protect.
|
|
59
|
+
PASSWORD_PROTECT: process.env.ENVIRONMENT === 'staging',
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Step 2
|
|
65
|
+
|
|
66
|
+
Add two api routes, one with the `loginHandler` and one with the `passwordCheckHandler` api function. You can name them anything, as long as you pass the names to `loginApiUrl` and `checkApiUrl` respectively, in the next step. By default it expects `/login` and `/passwordCheck`.
|
|
67
|
+
|
|
68
|
+
```javascript
|
|
69
|
+
import { loginHandler } from "@storyofams/next-password-protect";
|
|
70
|
+
|
|
71
|
+
export default loginHandler("YOUR_SECRET_PASSWORD", {
|
|
72
|
+
// Options go here (optional)
|
|
73
|
+
cookieName: "next-password-protect",
|
|
74
|
+
});
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
```javascript
|
|
78
|
+
import { passwordCheckHandler } from "@storyofams/next-password-protect";
|
|
79
|
+
|
|
80
|
+
export default passwordCheckHandler("YOUR_SECRET_PASSWORD", {
|
|
81
|
+
// Options go here (optional)
|
|
82
|
+
cookieName: "next-password-protect",
|
|
83
|
+
});
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Step 3
|
|
87
|
+
|
|
88
|
+
Add the `withPasswordProtect` HOC to the default export of `App` in `pages/_app.tsx`:
|
|
89
|
+
|
|
90
|
+
```javascript
|
|
91
|
+
import { withPasswordProtect } from "@storyofams/next-password-protect";
|
|
92
|
+
|
|
93
|
+
// Before: export default App;
|
|
94
|
+
export default process.env.PASSWORD_PROTECT
|
|
95
|
+
? withPasswordProtect(App, {
|
|
96
|
+
// Options go here (optional)
|
|
97
|
+
loginApiUrl: "/login",
|
|
98
|
+
})
|
|
99
|
+
: App;
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Note**: make sure to specify `loginApiUrl` and/or `checkApiUrl` if the api route(s) are not default.
|
|
103
|
+
|
|
104
|
+
## API
|
|
105
|
+
|
|
106
|
+
### API routes handlers
|
|
107
|
+
```loginHandler(password: string, options)```
|
|
108
|
+
|
|
109
|
+
The options object can contain any of the following options:
|
|
110
|
+
|
|
111
|
+
Option | Description | Default value
|
|
112
|
+
------ | ----------- | -------------
|
|
113
|
+
`cookieMaxAge`| Cookie Max-Age attribute | `undefined`
|
|
114
|
+
`cookieName`| The name of the authorization cookie | `'next-password-protect'`
|
|
115
|
+
`cookieSameSite`| SameSite cookie attribute | `false`
|
|
116
|
+
`cookieSecure`| Secure flag on the cookie | `process.env.NODE_ENV === 'production'`
|
|
117
|
+
|
|
118
|
+
```passwordCheckHandler(password: string, options)```
|
|
119
|
+
|
|
120
|
+
The options object can contain any of the following options:
|
|
121
|
+
|
|
122
|
+
Option | Description | Default value
|
|
123
|
+
------ | ----------- | -------------
|
|
124
|
+
`cookieName`| The name of the authorization cookie | `'next-password-protect'`
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
### Next App HOC
|
|
128
|
+
```withPasswordProtect(App: NextApp, options)```
|
|
129
|
+
|
|
130
|
+
The options object can contain any of the following options:
|
|
131
|
+
|
|
132
|
+
Option | Description | Default value
|
|
133
|
+
------ | ----------- | -------------
|
|
134
|
+
`checkApiUrl`| Relative path of the api route handled by `passwordCheckHandler` | `'/api/passwordCheck'`
|
|
135
|
+
`loginApiUrl`| Relative path of the api route handled by `loginHandler` | `'/api/login'`
|
|
136
|
+
`loginComponent`| Supply your own React component to show as login prompt | `LoginComponent`
|
|
137
|
+
`loginComponentProps`| Properties object to customize the login prompt, without overriding the entire component (see below) | `{}`
|
|
138
|
+
|
|
139
|
+
The `loginComponentProps` object can contain any of the following options:
|
|
140
|
+
|
|
141
|
+
Option | Description | Default value
|
|
142
|
+
------ | ----------- | -------------
|
|
143
|
+
`backUrl`| Show a link with this URL to go back to main website | `undefined`
|
|
144
|
+
`buttonBackgroundColor`| Login button background color | `'#01EDBC'`
|
|
145
|
+
`buttonColor`| Login button color | `'#111'`
|
|
146
|
+
`logo` | Show a logo above the prompt (img src) | `undefined`
|
|
147
|
+
|
|
148
|
+
## Advanced
|
|
149
|
+
|
|
150
|
+
### Custom login component
|
|
151
|
+
|
|
152
|
+
To change the default login component, a React component can be supplied to the `withPasswordProtect` HOC. In order for the library to function properly, make sure your login component has password input that is validated by the the api route.
|
|
153
|
+
You can use `src/hoc/LoginComponent.tsx` as a starting point.
|
|
154
|
+
|
|
155
|
+
## Caveats
|
|
156
|
+
|
|
157
|
+
AMP is not yet supported, because the LoginComponent failed AMP validation. On an AMP page, nothing is rendered. This could be fixed by changing LoginComponent to valid AMP.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JsonWebTokenError.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotBeforeError.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TokenExpiredError.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_commonjsHelpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-stream.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decode.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ecdsa-sig-formatter.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index10.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index11.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index12.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index13.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index14.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index15.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index2.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index3.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index4.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index5.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index6.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index7.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index8.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index9.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"param-bytes-for-alg.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"psSupported.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semver.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sign-stream.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sign.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timespan.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tostring.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-stream.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src';
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { Config } from '@jest/types';
|
|
3
|
+
declare const _default: Partial<{
|
|
4
|
+
automock: boolean;
|
|
5
|
+
bail: number | boolean;
|
|
6
|
+
cache: boolean;
|
|
7
|
+
cacheDirectory: string;
|
|
8
|
+
clearMocks: boolean;
|
|
9
|
+
changedFilesWithAncestor: boolean;
|
|
10
|
+
changedSince: string;
|
|
11
|
+
collectCoverage: boolean;
|
|
12
|
+
collectCoverageFrom: string[];
|
|
13
|
+
collectCoverageOnlyFrom: {
|
|
14
|
+
[key: string]: boolean;
|
|
15
|
+
};
|
|
16
|
+
coverageDirectory: string;
|
|
17
|
+
coveragePathIgnorePatterns: string[];
|
|
18
|
+
coverageProvider: "babel" | "v8";
|
|
19
|
+
coverageReporters: Config.CoverageReporters;
|
|
20
|
+
coverageThreshold: {
|
|
21
|
+
global: {
|
|
22
|
+
[key: string]: number;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
dependencyExtractor: string;
|
|
26
|
+
detectLeaks: boolean;
|
|
27
|
+
detectOpenHandles: boolean;
|
|
28
|
+
displayName: string | Config.DisplayName;
|
|
29
|
+
expand: boolean;
|
|
30
|
+
extraGlobals: string[];
|
|
31
|
+
filter: string;
|
|
32
|
+
findRelatedTests: boolean;
|
|
33
|
+
forceCoverageMatch: string[];
|
|
34
|
+
forceExit: boolean;
|
|
35
|
+
json: boolean;
|
|
36
|
+
globals: Config.ConfigGlobals;
|
|
37
|
+
globalSetup: string;
|
|
38
|
+
globalTeardown: string;
|
|
39
|
+
haste: Config.HasteConfig;
|
|
40
|
+
injectGlobals: boolean;
|
|
41
|
+
reporters: (string | Config.ReporterConfig)[];
|
|
42
|
+
logHeapUsage: boolean;
|
|
43
|
+
lastCommit: boolean;
|
|
44
|
+
listTests: boolean;
|
|
45
|
+
mapCoverage: boolean;
|
|
46
|
+
maxConcurrency: number;
|
|
47
|
+
maxWorkers: import("react").Key;
|
|
48
|
+
moduleDirectories: string[];
|
|
49
|
+
moduleFileExtensions: string[];
|
|
50
|
+
moduleLoader: string;
|
|
51
|
+
moduleNameMapper: {
|
|
52
|
+
[key: string]: string | string[];
|
|
53
|
+
};
|
|
54
|
+
modulePathIgnorePatterns: string[];
|
|
55
|
+
modulePaths: string[];
|
|
56
|
+
name: string;
|
|
57
|
+
noStackTrace: boolean;
|
|
58
|
+
notify: boolean;
|
|
59
|
+
notifyMode: string;
|
|
60
|
+
onlyChanged: boolean;
|
|
61
|
+
onlyFailures: boolean;
|
|
62
|
+
outputFile: string;
|
|
63
|
+
passWithNoTests: boolean;
|
|
64
|
+
preprocessorIgnorePatterns: string[];
|
|
65
|
+
preset: string;
|
|
66
|
+
prettierPath: string;
|
|
67
|
+
projects: string[];
|
|
68
|
+
replname: string;
|
|
69
|
+
resetMocks: boolean;
|
|
70
|
+
resetModules: boolean;
|
|
71
|
+
resolver: string;
|
|
72
|
+
restoreMocks: boolean;
|
|
73
|
+
rootDir: string;
|
|
74
|
+
roots: string[];
|
|
75
|
+
runner: string;
|
|
76
|
+
runTestsByPath: boolean;
|
|
77
|
+
scriptPreprocessor: string;
|
|
78
|
+
setupFiles: string[];
|
|
79
|
+
setupTestFrameworkScriptFile: string;
|
|
80
|
+
setupFilesAfterEnv: string[];
|
|
81
|
+
silent: boolean;
|
|
82
|
+
skipFilter: boolean;
|
|
83
|
+
skipNodeResolution: boolean;
|
|
84
|
+
slowTestThreshold: number;
|
|
85
|
+
snapshotResolver: string;
|
|
86
|
+
snapshotSerializers: string[];
|
|
87
|
+
errorOnDeprecated: boolean;
|
|
88
|
+
testEnvironment: string;
|
|
89
|
+
testEnvironmentOptions: Record<string, unknown>;
|
|
90
|
+
testFailureExitCode: import("react").Key;
|
|
91
|
+
testLocationInResults: boolean;
|
|
92
|
+
testMatch: string[];
|
|
93
|
+
testNamePattern: string;
|
|
94
|
+
testPathDirs: string[];
|
|
95
|
+
testPathIgnorePatterns: string[];
|
|
96
|
+
testRegex: string | string[];
|
|
97
|
+
testResultsProcessor: string;
|
|
98
|
+
testRunner: string;
|
|
99
|
+
testSequencer: string;
|
|
100
|
+
testURL: string;
|
|
101
|
+
testTimeout: number;
|
|
102
|
+
timers: "real" | "fake" | "modern" | "legacy";
|
|
103
|
+
transform: {
|
|
104
|
+
[regex: string]: string | Config.TransformerConfig;
|
|
105
|
+
};
|
|
106
|
+
transformIgnorePatterns: string[];
|
|
107
|
+
watchPathIgnorePatterns: string[];
|
|
108
|
+
unmockedModulePathPatterns: string[];
|
|
109
|
+
updateSnapshot: boolean;
|
|
110
|
+
useStderr: boolean;
|
|
111
|
+
verbose?: boolean;
|
|
112
|
+
watch: boolean;
|
|
113
|
+
watchAll: boolean;
|
|
114
|
+
watchman: boolean;
|
|
115
|
+
watchPlugins: (string | [string, Record<string, unknown>])[];
|
|
116
|
+
}>;
|
|
117
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";function e(){return(e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
|
|
2
|
+
//# sourceMappingURL=extends.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extends.js","sources":["../../../../../../../node_modules/@babel/runtime/helpers/esm/extends.js"],"sourcesContent":["export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}"],"names":["_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this"],"mappings":"aAAe,SAASA,IAetB,OAdAA,EAAWC,OAAOC,QAAU,SAAUC,GACpC,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CACzC,IAAIG,EAASF,UAAUD,GAEvB,IAAK,IAAII,KAAOD,EACVN,OAAOQ,UAAUC,eAAeC,KAAKJ,EAAQC,KAC/CL,EAAOK,GAAOD,EAAOC,IAK3B,OAAOL,IAGOS,MAAMC,KAAMR"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../buffer-fill/index.js"),r=require("../buffer-alloc-unsafe/index.js");exports.default=function(t,u,f){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative');if(Buffer.alloc)return Buffer.alloc(t,u,f);var n=r.default(t);return 0===t?n:void 0===u?e.default(n,0):("string"!=typeof f&&(f=void 0),e.default(n,u,f))};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../node_modules/buffer-alloc/index.js"],"sourcesContent":["var bufferFill = require('buffer-fill')\nvar allocUnsafe = require('buffer-alloc-unsafe')\n\nmodule.exports = function alloc (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n }\n\n if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n\n if (Buffer.alloc) {\n return Buffer.alloc(size, fill, encoding)\n }\n\n var buffer = allocUnsafe(size)\n\n if (size === 0) {\n return buffer\n }\n\n if (fill === undefined) {\n return bufferFill(buffer, 0)\n }\n\n if (typeof encoding !== 'string') {\n encoding = undefined\n }\n\n return bufferFill(buffer, fill, encoding)\n}\n"],"names":["size","fill","encoding","TypeError","RangeError","Buffer","alloc","buffer","allocUnsafe","undefined","bufferFill"],"mappings":"0KAGiB,SAAgBA,EAAMC,EAAMC,GAC3C,GAAoB,iBAATF,EACT,MAAM,IAAIG,UAAU,oCAGtB,GAAIH,EAAO,EACT,MAAM,IAAII,WAAW,wCAGvB,GAAIC,OAAOC,MACT,OAAOD,OAAOC,MAAMN,EAAMC,EAAMC,GAGlC,IAAIK,EAASC,UAAYR,GAEzB,OAAa,IAATA,EACKO,OAGIE,IAATR,EACKS,UAAWH,EAAQ,IAGJ,iBAAbL,IACTA,OAAWO,GAGNC,UAAWH,EAAQN,EAAMC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=function(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative');return Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e)};exports.default=e;
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../node_modules/buffer-alloc-unsafe/index.js"],"sourcesContent":["function allocUnsafe (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n }\n\n if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n\n if (Buffer.allocUnsafe) {\n return Buffer.allocUnsafe(size)\n } else {\n return new Buffer(size)\n }\n}\n\nmodule.exports = allocUnsafe\n"],"names":["size","TypeError","RangeError","Buffer","allocUnsafe"],"mappings":"0EAAA,SAAsBA,GACpB,GAAoB,iBAATA,EACT,MAAM,IAAIC,UAAU,oCAGtB,GAAID,EAAO,EACT,MAAM,IAAIE,WAAW,wCAGvB,OAAIC,OAAOC,YACFD,OAAOC,YAAYJ,GAEnB,IAAIG,OAAOH"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("buffer")),r=t.default.Buffer,u=t.default.SlowBuffer,o=f;function f(e,t){if(!r.isBuffer(e)||!r.isBuffer(t))return!1;if(e.length!==t.length)return!1;for(var u=0,o=0;o<e.length;o++)u|=e[o]^t[o];return 0===u}f.install=function(){r.prototype.equal=u.prototype.equal=function(e){return f(this,e)}};var n=r.prototype.equal,l=u.prototype.equal;f.restore=function(){r.prototype.equal=n,u.prototype.equal=l},exports.default=o;
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../node_modules/buffer-equal-constant-time/index.js"],"sourcesContent":["/*jshint node:true */\n'use strict';\nvar Buffer = require('buffer').Buffer; // browserify\nvar SlowBuffer = require('buffer').SlowBuffer;\n\nmodule.exports = bufferEq;\n\nfunction bufferEq(a, b) {\n\n // shortcutting on type is necessary for correctness\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n return false;\n }\n\n // buffer sizes should be well-known information, so despite this\n // shortcutting, it doesn't leak any information about the *contents* of the\n // buffers.\n if (a.length !== b.length) {\n return false;\n }\n\n var c = 0;\n for (var i = 0; i < a.length; i++) {\n /*jshint bitwise:false */\n c |= a[i] ^ b[i]; // XOR\n }\n return c === 0;\n}\n\nbufferEq.install = function() {\n Buffer.prototype.equal = SlowBuffer.prototype.equal = function equal(that) {\n return bufferEq(this, that);\n };\n};\n\nvar origBufEqual = Buffer.prototype.equal;\nvar origSlowBufEqual = SlowBuffer.prototype.equal;\nbufferEq.restore = function() {\n Buffer.prototype.equal = origBufEqual;\n SlowBuffer.prototype.equal = origSlowBufEqual;\n};\n"],"names":["Buffer","require$$0","SlowBuffer","bufferEq","a","b","isBuffer","length","c","i","install","prototype","equal","that","this","origBufEqual","origSlowBufEqual","restore"],"mappings":"uKAEIA,EAASC,UAAkBD,OAC3BE,EAAaD,UAAkBC,aAElBC,EAEjB,SAASA,EAASC,EAAGC,GAGnB,IAAKL,EAAOM,SAASF,KAAOJ,EAAOM,SAASD,GAC1C,OAAO,EAMT,GAAID,EAAEG,SAAWF,EAAEE,OACjB,OAAO,EAIT,IADA,IAAIC,EAAI,EACCC,EAAI,EAAGA,EAAIL,EAAEG,OAAQE,IAE5BD,GAAKJ,EAAEK,GAAKJ,EAAEI,GAEhB,OAAa,IAAND,EAGTL,EAASO,QAAU,WACjBV,EAAOW,UAAUC,MAAQV,EAAWS,UAAUC,MAAQ,SAAeC,GACnE,OAAOV,EAASW,KAAMD,KAI1B,IAAIE,EAAef,EAAOW,UAAUC,MAChCI,EAAmBd,EAAWS,UAAUC,MAC5CT,EAASc,QAAU,WACjBjB,EAAOW,UAAUC,MAAQG,EACzBb,EAAWS,UAAUC,MAAQI"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=function(){try{if(!Buffer.isEncoding("latin1"))return!1;var r=Buffer.alloc?Buffer.alloc(4):new Buffer(4);return r.fill("ab","ucs2"),"61006200"===r.toString("hex")}catch(r){return!1}}();function e(r,e,n,t){if(n<0||t>r.length)throw new RangeError("Out of range index");return n>>>=0,(t=void 0===t?r.length:t>>>0)>n&&r.fill(e,n,t),r}var n=function(n,t,f,i,o){if(r)return n.fill(t,f,i,o);if("number"==typeof t)return e(n,t,f,i);if("string"==typeof t){if("string"==typeof f?(o=f,f=0,i=n.length):"string"==typeof i&&(o=i,i=n.length),void 0!==o&&"string"!=typeof o)throw new TypeError("encoding must be a string");if("latin1"===o&&(o="binary"),"string"==typeof o&&!Buffer.isEncoding(o))throw new TypeError("Unknown encoding: "+o);if(""===t)return e(n,0,f,i);if(function(r){return 1===r.length&&r.charCodeAt(0)<256}(t))return e(n,t.charCodeAt(0),f,i);t=new Buffer(t,o)}return Buffer.isBuffer(t)?function(r,e,n,t){if(n<0||t>r.length)throw new RangeError("Out of range index");if(t<=n)return r;n>>>=0,t=void 0===t?r.length:t>>>0;for(var f=n,i=e.length;f<=t-i;)e.copy(r,f),f+=i;return f!==t&&e.copy(r,f,0,t-f),r}(n,t,f,i):e(n,0,f,i)};exports.default=n;
|
|
2
|
+
//# sourceMappingURL=index.js.map
|