Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

corrected vanilla-js auth example

awalias6d875722410a
diff --git a/examples/auth-vanilla-js/README.md b/examples/auth-vanilla-js/README.md
new file mode 100644
index 00000000000..9cbf46e04e4
--- /dev/null
+++ b/examples/auth-vanilla-js/README.md
@@ -0,0 +1,23 @@
+### running
+`npm install`
+`npm run dev`
+
+if you want to make changes without restarting the server run this in a different terminal window:
+`npm run watch`
+
+### testing auth endpoint from the command line
+
+you can also do the following to test the auth endpoints manually:
+```bash
+# manual signup from terminal
+ curl --header "Content-Type: application/json" \
+ --request POST \
+ --data '{"email":"[email protected]","password":"password"}' \
+ <your-supabase-url>/auth/v1/signup?apikey=<your-api-key>
+
+# manual login from terminal
+ curl --header "Content-Type: application/json" \
+ --request POST \
+ --data '{"email":"[email protected]","password":"password"}' \
+ "<your-supabase-url>/auth/v1/token?grant_type=password&apikey=<your-api-key>"
+```
diff --git a/examples/auth-vanilla-js/dist/bundle.js b/examples/auth-vanilla-js/dist/bundle.js
index e98e5993f9e..e541ebbc386 100644
--- a/examples/auth-vanilla-js/dist/bundle.js
+++ b/examples/auth-vanilla-js/dist/bundle.js
@@ -94,7 +94,51 @@
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _supabase_supabase_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @supabase/supabase-js */ \"./node_modules/@supabase/supabase-js/lib/index.js\");\n/* harmony import */ var _supabase_supabase_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_supabase_supabase_js__WEBPACK_IMPORTED_MODULE_0__);\nconsole.log('Auth, Auth, Baby')\n\n\n\nvar SUPABASE_URL = 'https://UxtUdvoEHGzXftFJhwwT.supabase.net'\nvar SUPABASE_KEY = 'XbBJdEH2WdymQ0Hq9Huk1JqCCmggPX'\n\nvar supabase = Object(_supabase_supabase_js__WEBPACK_IMPORTED_MODULE_0__[\"createClient\"])(SUPABASE_URL, SUPABASE_KEY)\nwindow.userToken = null\n\nwindow.onload = function () {\n var signUpForm = document.querySelector('#sign-up')\n signUpForm.onsubmit = signUpSubmitted.bind(signUpForm)\n\n var logInForm = document.querySelector('#log-in')\n logInForm.onsubmit = logInSubmitted.bind(logInForm)\n}\n\nconst signUpSubmitted = (event) => {\n event.preventDefault()\n const email = event.target[0].value\n const password = event.target[1].value\n\n var xmlHttp = new XMLHttpRequest()\n xmlHttp.onreadystatechange = function () {\n if (xmlHttp.readyState == 4 && xmlHttp.status == 200) {\n alert(xmlHttp.responseText)\n }\n }\n xmlHttp.open('post', SUPABASE_URL + `/auth/v1/signup?apikey=${SUPABASE_KEY}`)\n xmlHttp.setRequestHeader('Content-Type', 'application/json;charset=UTF-8')\n xmlHttp.send(JSON.stringify({ email: email, password: password }))\n}\n\nconst logInSubmitted = (event) => {\n event.preventDefault()\n console.log(event)\n const email = event.target[0].value\n const password = event.target[1].value\n\n var xmlHttp = new XMLHttpRequest()\n xmlHttp.onreadystatechange = function () {\n if (xmlHttp.readyState == 4 && xmlHttp.status == 200) {\n alert(xmlHttp.responseText)\n let data = JSON.parse(xmlHttp.responseText)\n window.accessToken = data.access_token\n document.querySelector('#access-token').value = window.accessToken\n\n window.refreshToken = data.refresh_token\n document.querySelector('#refresh-token').value = window.refreshToken\n }\n }\n xmlHttp.open('post', SUPABASE_URL + `/auth/v1/token?apikey=${SUPABASE_KEY}&grant_type=password&username=${email}&password=${password}`)\n xmlHttp.send()\n}\n\n// manual signup\n// curl --header \"Content-Type: application/json\" \\\n// --request POST \\\n// --data '{\"email\":\"[email protected]\",\"password\":\"password\"}' \\\n// https://UxtUdvoEHGzXftFJhwwT.supabase.net/auth/v1/signup?apikey=XbBJdEH2WdymQ0Hq9Huk1JqCCmggPX\n\n// manual login\n// curl --header \"Content-Type: application/json\" \\ \n// --request POST \\\n// \"https://UxtUdvoEHGzXftFJhwwT.supabase.net/auth/v1/[email protected]&password=password&grant_type=password&apikey=XbBJdEH2WdymQ0Hq9Huk1JqCCmggPX\"\n\n\n//# sourceURL=webpack:///./index.js?");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _supabase_supabase_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @supabase/supabase-js */ \"./node_modules/@supabase/supabase-js/lib/index.js\");\n/* harmony import */ var _supabase_supabase_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_supabase_supabase_js__WEBPACK_IMPORTED_MODULE_0__);\nconsole.log('Auth, Auth, Baby')\n\n\n\nvar SUPABASE_URL = 'https://qgxofzpdhwflxckfyoyz.supabase.net'\nvar SUPABASE_KEY =\n 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlhdCI6MTU5NTU3OTM1MywiZXhwIjoxOTExMTU1MzUzfQ.zS6U4PuJsHJ0wbBQXANpg2fbvHazUtfCgWonJ_TXlRk'\n\nvar supabase = Object(_supabase_supabase_js__WEBPACK_IMPORTED_MODULE_0__[\"createClient\"])(SUPABASE_URL, SUPABASE_KEY)\nwindow.userToken = null\n\nwindow.onload = function () {\n var signUpForm = document.querySelector('#sign-up')\n signUpForm.onsubmit = signUpSubmitted.bind(signUpForm)\n\n var logInForm = document.querySelector('#log-in')\n logInForm.onsubmit = logInSubmitted.bind(logInForm)\n\n var userDetailsButton = document.querySelector('#user-button')\n userDetailsButton.onclick = fetchUserDetails.bind(userDetailsButton)\n}\n\nconst signUpSubmitted = (event) => {\n event.preventDefault()\n const email = event.target[0].value\n const password = event.target[1].value\n\n supabase.auth\n .signup(email, password)\n .then((response) => {\n alert(JSON.stringify(response.body))\n })\n .catch((err) => {\n alert(err.response.text)\n })\n}\n\nconst logInSubmitted = (event) => {\n event.preventDefault()\n const email = event.target[0].value\n const password = event.target[1].value\n\n supabase.auth\n .login(email, password)\n .then((response) => {\n document.querySelector('#access-token').value = response.body.access_token\n document.querySelector('#refresh-token').value = response.body.refresh_token\n alert(JSON.stringify(response.body))\n })\n .catch((err) => {\n alert(err.response.text)\n })\n}\n\nconst fetchUserDetails = () => {\n supabase.auth\n .user()\n .then((response) => {\n alert(JSON.stringify(response))\n })\n .catch((err) => {\n alert(err.response.text)\n })\n}\n\n\n//# sourceURL=webpack:///./index.js?");
+
+/***/ }),
+
+/***/ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js":
+/*!*****************************************************************!*\
+ !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
+ \*****************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+eval("function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}\n\nmodule.exports = _asyncToGenerator;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/asyncToGenerator.js?");
+
+/***/ }),
+
+/***/ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js":
+/*!**********************************************************************!*\
+ !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
+ \**********************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+eval("function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\n\nmodule.exports = _interopRequireDefault;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/interopRequireDefault.js?");
+
+/***/ }),
+
+/***/ "./node_modules/@babel/runtime/helpers/interopRequireWildcard.js":
+/*!***********************************************************************!*\
+ !*** ./node_modules/@babel/runtime/helpers/interopRequireWildcard.js ***!
+ \***********************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+eval("var _typeof = __webpack_require__(/*! ../helpers/typeof */ \"./node_modules/@babel/runtime/helpers/typeof.js\");\n\nfunction _getRequireWildcardCache() {\n if (typeof WeakMap !== \"function\") return null;\n var cache = new WeakMap();\n\n _getRequireWildcardCache = function _getRequireWildcardCache() {\n return cache;\n };\n\n return cache;\n}\n\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n }\n\n if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") {\n return {\n \"default\": obj\n };\n }\n\n var cache = _getRequireWildcardCache();\n\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n\n newObj[\"default\"] = obj;\n\n if (cache) {\n cache.set(obj, newObj);\n }\n\n return newObj;\n}\n\nmodule.exports = _interopRequireWildcard;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/interopRequireWildcard.js?");
+
+/***/ }),
+
+/***/ "./node_modules/@babel/runtime/helpers/typeof.js":
+/*!*******************************************************!*\
+ !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
+ \*******************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+eval("function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/typeof.js?");
/***/ }),
@@ -235,6 +279,18 @@ eval("\n// Creates a timer that accepts a `timerCalc` function to perform\n// ca
/***/ }),
+/***/ "./node_modules/@supabase/supabase-js/lib/Auth.js":
+/*!********************************************************!*\
+ !*** ./node_modules/@supabase/supabase-js/lib/Auth.js ***!
+ \********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+eval("var _interopRequireDefault=__webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");Object.defineProperty(exports,\"__esModule\",{value:!0}),exports.Auth=void 0;var _asyncToGenerator2=_interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"./node_modules/@babel/runtime/helpers/asyncToGenerator.js\")),_superagent=_interopRequireDefault(__webpack_require__(/*! superagent */ \"./node_modules/superagent/lib/client.js\"));class Auth{constructor(a,b){var c=this,d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:{autoRefreshToken:!0};this.authUrl=a,this.accessToken=b,this.refreshToken=null,this.supabaseKey=b,this.currentUser=null,this.autoRefreshToken=d.autoRefreshToken,this.signup=/*#__PURE__*/function(){var b=(0,_asyncToGenerator2.default)(function*(b,d){var e=yield _superagent.default.post(\"\".concat(a,\"/signup\"),{email:b,password:d}).set(\"accept\",\"json\").set(\"apikey\",c.supabaseKey);return e});return function(){return b.apply(this,arguments)}}(),this.login=/*#__PURE__*/function(){var b=(0,_asyncToGenerator2.default)(function*(b,d){var e=yield _superagent.default.post(\"\".concat(a,\"/token?grant_type=password\"),{email:b,password:d}).set(\"accept\",\"json\").set(\"apikey\",c.supabaseKey);return 200===e.status&&(c.accessToken=e.body.access_token,c.refreshToken=e.body.refresh_token,c.autoRefreshToken&&tokenExpirySeconds&&setTimeout(c.refreshToken,tokenExpirySeconds-60)),e});return function(){return b.apply(this,arguments)}}(),this.refreshToken=/*#__PURE__*/(0,_asyncToGenerator2.default)(function*(){var b=yield _superagent.default.post(\"\".concat(a,\"/token?grant_type=refresh_token\"),{refresh_token:c.refreshToken}).set(\"apikey\",c.supabaseKey);if(200===b.status){c.accessToken=b.body.access_token,c.refreshToken=b.body.refresh_token;var d=b.body.expires_in;c.autoRefreshToken&&d&&setTimeout(c.refreshToken,d-60)}return b}),this.logout=/*#__PURE__*/(0,_asyncToGenerator2.default)(function*(){yield _superagent.default.post(\"\".concat(a,\"/logout\")).set(\"Authorization\",\"Bearer \".concat(c.accessToken)).set(\"apikey\",c.supabaseKey),c.currentUser=null,c.accessToken=null}),this.user=/*#__PURE__*/(0,_asyncToGenerator2.default)(function*(){if(c.currentUser)return c.currentUser;var b=yield _superagent.default.get(\"\".concat(a,\"/user\")).set(\"Authorization\",\"Bearer \".concat(c.accessToken)).set(\"apikey\",c.supabaseKey);return 200===b.status&&(c.currentUser=b.body,c.currentUser.access_token=c.accessToken,c.currentUser.refresh_token=c.refreshToken),c.currentUser})}}exports.Auth=Auth;\n\n//# sourceURL=webpack:///./node_modules/@supabase/supabase-js/lib/Auth.js?");
+
+/***/ }),
+
/***/ "./node_modules/@supabase/supabase-js/lib/Realtime.js":
/*!************************************************************!*\
!*** ./node_modules/@supabase/supabase-js/lib/Realtime.js ***!
@@ -243,7 +299,7 @@ eval("\n// Creates a timer that accepts a `timerCalc` function to perform\n// ca
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-eval("function _typeof(a){\"@babel/helpers - typeof\";return _typeof=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&\"function\"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?\"symbol\":typeof a},_typeof(a)}Object.defineProperty(exports,\"__esModule\",{value:!0}),exports[\"default\"]=void 0;var _realtimeJs=__webpack_require__(/*! @supabase/realtime-js */ \"./node_modules/@supabase/realtime-js/src/index.js\"),ChangeMapper=_interopRequireWildcard(__webpack_require__(/*! ./utils/ChangeMapper */ \"./node_modules/@supabase/supabase-js/lib/utils/ChangeMapper.js\"));function _getRequireWildcardCache(){if(\"function\"!=typeof WeakMap)return null;var a=new WeakMap;return _getRequireWildcardCache=function(){return a},a}function _interopRequireWildcard(a){if(a&&a.__esModule)return a;if(null===a||\"object\"!==_typeof(a)&&\"function\"!=typeof a)return{default:a};var b=_getRequireWildcardCache();if(b&&b.has(a))return b.get(a);var c={},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var e in a)if(Object.prototype.hasOwnProperty.call(a,e)){var f=d?Object.getOwnPropertyDescriptor(a,e):null;f&&(f.get||f.set)?Object.defineProperty(c,e,f):c[e]=a[e]}return c[\"default\"]=a,b&&b.set(a,c),c}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError(\"Cannot call a class as a function\")}function _defineProperties(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,\"value\"in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}function _createClass(a,b,c){return b&&_defineProperties(a.prototype,b),c&&_defineProperties(a,c),a}var Realtime=/*#__PURE__*/function(){function a(b,c,d,e,f,g,h,i){_classCallCheck(this,a),this.tableName=b,this.realtimeUrl=c,this.schema=d,this.apikey=e,this.uuid=f,this.socket=null,this.channel=null,this.listeners={},this.queryFilters=i,this.on(g,h)}/**\n * REALTIME FUNCTIONALITY\n */return _createClass(a,[{key:\"createListener\",value:function createListener(){var a=this,b=\"\".concat(this.realtimeUrl),c=\"\";this.queryFilters.forEach(function(a){switch(a.filter){case\"filter\":\"eq\"===a.operator&&(c=\":\".concat(a.columnName,\"=\").concat(a.operator,\".\").concat(a.criteria));break;default:}});var d=\"*\"==this.tableName?\"realtime:*\":\"realtime:\".concat(this.schema,\":\").concat(this.tableName).concat(c);this.socket=new _realtimeJs.Socket(b,{params:{apikey:this.apikey}}),this.channel=this.socket.channel(d),this.socket.onOpen(function(){console.debug(\"\".concat(a.realtimeUrl,\": REALTIME CONNECTED\"))}),this.socket.onClose(function(){console.debug(\"\".concat(a.realtimeUrl,\": REALTIME DISCONNECTED\"))})}},{key:\"on\",value:function on(a,b){return null==this.socket&&this.createListener(),this.channel.on(a,function(a){var c={schema:a.schema,table:a.table,commit_timestamp:a.commit_timestamp},d={},e={},f={};switch(a.type){case\"INSERT\":d=ChangeMapper.convertChangeData(a.columns,a.record),c.eventType=\"INSERT\",c[\"new\"]=d;break;case\"UPDATE\":e=ChangeMapper.convertChangeData(a.columns,a.old_record),d=ChangeMapper.convertChangeData(a.columns,a.record),Object.keys(e).forEach(function(a){null!=e[a]&&(f[a]=e[a])}),c.eventType=\"UPDATE\",c.old=f,c[\"new\"]=d;break;case\"DELETE\":e=ChangeMapper.convertChangeData(a.columns,a.old_record),Object.keys(e).forEach(function(a){null!=e[a]&&(f[a]=e[a])}),c.eventType=\"DELETE\",c.old=f;break;default:}b(c)}),this.listeners[a]=b,this}},{key:\"subscribe\",value:function subscribe(){var a=this;return null==this.socket&&this.createListener(),this.socket.connect(),\"joined\"!==this.channel.state&&this.channel.join().receive(\"ok\",function(b){return console.debug(\"\".concat(a.realtimeUrl,\": Joined Realtime successfully \"),b)}).receive(\"error\",function(b){return console.debug(\"\".concat(a.realtimeUrl,\": Unable to join \"),b)}).receive(\"timeout\",function(){return console.debug(\"\".concat(a.realtimeUrl,\": Network timeout. Still waiting...\"))}),this}},{key:\"unsubscribe\",value:function unsubscribe(){return this.socket&&this.socket.disconnect(),this}}]),a}(),_default=Realtime;exports[\"default\"]=_default;\n\n//# sourceURL=webpack:///./node_modules/@supabase/supabase-js/lib/Realtime.js?");
+eval("var _interopRequireWildcard=__webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ \"./node_modules/@babel/runtime/helpers/interopRequireWildcard.js\");Object.defineProperty(exports,\"__esModule\",{value:!0}),exports.default=void 0;var _realtimeJs=__webpack_require__(/*! @supabase/realtime-js */ \"./node_modules/@supabase/realtime-js/src/index.js\"),ChangeMapper=_interopRequireWildcard(__webpack_require__(/*! ./utils/ChangeMapper */ \"./node_modules/@supabase/supabase-js/lib/utils/ChangeMapper.js\"));class Realtime{constructor(a,b,c,d,e,f,g,h){this.tableName=a,this.realtimeUrl=b,this.schema=c,this.apikey=d,this.uuid=e,this.socket=null,this.channel=null,this.listeners={},this.queryFilters=h,this.on(f,g)}/**\n * REALTIME FUNCTIONALITY\n */createListener(){var a=\"\".concat(this.realtimeUrl),b=\"\";this.queryFilters.forEach(a=>{switch(a.filter){case\"filter\":\"eq\"===a.operator&&(b=\":\".concat(a.columnName,\"=\").concat(a.operator,\".\").concat(a.criteria));break;default:}});var c=\"*\"==this.tableName?\"realtime:*\":\"realtime:\".concat(this.schema,\":\").concat(this.tableName).concat(b);this.socket=new _realtimeJs.Socket(a,{params:{apikey:this.apikey}}),this.channel=this.socket.channel(c),this.socket.onOpen(()=>{console.debug(\"\".concat(this.realtimeUrl,\": REALTIME CONNECTED\"))}),this.socket.onClose(()=>{console.debug(\"\".concat(this.realtimeUrl,\": REALTIME DISCONNECTED\"))})}on(a,b){return null==this.socket&&this.createListener(),this.channel.on(a,a=>{var c={schema:a.schema,table:a.table,commit_timestamp:a.commit_timestamp},d={},e={},f={};switch(a.type){case\"INSERT\":d=ChangeMapper.convertChangeData(a.columns,a.record),c.eventType=\"INSERT\",c.new=d;break;case\"UPDATE\":e=ChangeMapper.convertChangeData(a.columns,a.old_record),d=ChangeMapper.convertChangeData(a.columns,a.record),Object.keys(e).forEach(a=>{null!=e[a]&&(f[a]=e[a])}),c.eventType=\"UPDATE\",c.old=f,c.new=d;break;case\"DELETE\":e=ChangeMapper.convertChangeData(a.columns,a.old_record),Object.keys(e).forEach(a=>{null!=e[a]&&(f[a]=e[a])}),c.eventType=\"DELETE\",c.old=f;break;default:}b(c)}),this.listeners[a]=b,this}subscribe(){return null==this.socket&&this.createListener(),this.socket.connect(),\"joined\"!==this.channel.state&&this.channel.join().receive(\"ok\",a=>console.debug(\"\".concat(this.realtimeUrl,\": Joined Realtime successfully \"),a)).receive(\"error\",a=>console.debug(\"\".concat(this.realtimeUrl,\": Unable to join \"),a)).receive(\"timeout\",()=>console.debug(\"\".concat(this.realtimeUrl,\": Network timeout. Still waiting...\"))),this}unsubscribe(){return this.socket&&this.socket.disconnect(),this}}var _default=Realtime;exports.default=_default;\n\n//# sourceURL=webpack:///./node_modules/@supabase/supabase-js/lib/Realtime.js?");
/***/ }),
@@ -255,7 +311,7 @@ eval("function _typeof(a){\"@babel/helpers - typeof\";return _typeof=\"function\
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-eval("Object.defineProperty(exports,\"__esModule\",{value:!0}),exports.createClient=void 0;var _Helpers=__webpack_require__(/*! ./utils/Helpers */ \"./node_modules/@supabase/supabase-js/lib/utils/Helpers.js\"),_Realtime=_interopRequireDefault(__webpack_require__(/*! ./Realtime */ \"./node_modules/@supabase/supabase-js/lib/Realtime.js\")),_postgrestJs=__webpack_require__(/*! @supabase/postgrest-js */ \"./node_modules/@supabase/postgrest-js/lib/index.js\");function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError(\"Cannot call a class as a function\")}function _defineProperties(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,\"value\"in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}function _createClass(a,b,c){return b&&_defineProperties(a.prototype,b),c&&_defineProperties(a,c),a}var SupabaseClient=/*#__PURE__*/function(){function a(b,c){var d=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};_classCallCheck(this,a),this.supabaseUrl=null,this.supabaseKey=null,this.restUrl=null,this.realtimeUrl=null,this.schema=\"public\",this.subscriptions={},this.tableName=null,this.queryFilters=[],d.schema&&(this.schema=d.schema),this.authenticate(b,c)}/**\n * General Functionalities\n */return _createClass(a,[{key:\"authenticate\",value:function authenticate(a,b){this.supabaseUrl=a,this.supabaseKey=b,this.restUrl=\"\".concat(a,\"/rest/v1\"),this.realtimeUrl=\"\".concat(a,\"/realtime/v1\").replace(\"http\",\"ws\")}},{key:\"clear\",value:function clear(){this.tableName=null,this.queryFilters=[]}},{key:\"from\",value:function from(a){return this.tableName=a,this}/**\n * Realtime Functionalities\n */},{key:\"on\",value:function on(a,b){var c=(0,_Helpers.uuid)();return this.subscriptions[c]=new _Realtime[\"default\"](this.tableName,this.realtimeUrl,this.schema,this.supabaseKey,c,a,b,this.queryFilters),this.clear(),this.subscriptions[c]}},{key:\"getSubscriptions\",value:function getSubscriptions(){return Object.values(this.subscriptions)}},{key:\"removeSubscription\",value:function removeSubscription(a){a.unsubscribe(),delete this.subscriptions[a.uuid]}/**\n * REST Functionalities\n */},{key:\"rpc\",value:function rpc(a){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,c=new _postgrestJs.PostgrestClient(this.restUrl,{headers:{apikey:this.supabaseKey},schema:this.schema});return c.rpc(a,b)}},{key:\"initClient\",value:function initClient(){var a=new _postgrestJs.PostgrestClient(this.restUrl,{headers:{apikey:this.supabaseKey},schema:this.schema}),b=a.from(this.tableName);return this.queryFilters.forEach(function(a){switch(a.filter){case\"filter\":b.filter(a.columnName,a.operator,a.criteria);break;case\"match\":b.match(a.query);break;case\"order\":b.order(a.property,a.ascending,a.nullsFirst);break;case\"range\":b.range(a.from,a.to);break;case\"single\":b.single();break;default:}}),this.clear(),b}},{key:\"select\",value:function select(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:\"*\",b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},c=this.initClient();return c.select(a,b)}},{key:\"insert\",value:function insert(a){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},c=this.initClient();return c.insert(a,b)}},{key:\"update\",value:function update(a){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},c=this.initClient();return c.update(a,b)}},{key:\"delete\",value:function _delete(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},b=this.initClient();return b[\"delete\"](a)}},{key:\"filter\",value:function filter(a,b,c){return this.queryFilters.push({filter:\"filter\",columnName:a,operator:b,criteria:c}),this}},{key:\"match\",value:function match(a){return this.queryFilters.push({filter:\"match\",query:a}),this}},{key:\"order\",value:function order(a){var b=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1],c=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2];return this.queryFilters.push({filter:\"order\",property:a,ascending:b,nullsFirst:c}),this}},{key:\"range\",value:function range(a,b){return this.queryFilters.push({filter:\"range\",from:a,to:b}),this}},{key:\"single\",value:function single(){return this.queryFilters.push({filter:\"single\"}),this}}]),a}(),advancedFilters=[\"eq\",\"neq\",\"gt\",\"lt\",\"gte\",\"lte\",\"like\",\"ilike\",\"is\",\"in\",\"cs\",\"cd\",\"ova\",\"ovr\",\"sl\",\"sr\",\"nxr\",\"nxl\",\"adj\"];// pre-empts if any of the filters are used before select\nadvancedFilters.forEach(function(a){return SupabaseClient.prototype[a]=function(b,c){return this.filter(b,a,c)}});var createClient=function(a,b){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:{};return new SupabaseClient(a,b,c)};exports.createClient=createClient;\n\n//# sourceURL=webpack:///./node_modules/@supabase/supabase-js/lib/index.js?");
+eval("var _interopRequireDefault=__webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");Object.defineProperty(exports,\"__esModule\",{value:!0}),exports.createClient=void 0;var _Helpers=__webpack_require__(/*! ./utils/Helpers */ \"./node_modules/@supabase/supabase-js/lib/utils/Helpers.js\"),_Realtime=_interopRequireDefault(__webpack_require__(/*! ./Realtime */ \"./node_modules/@supabase/supabase-js/lib/Realtime.js\")),_Auth=__webpack_require__(/*! ./Auth */ \"./node_modules/@supabase/supabase-js/lib/Auth.js\"),_postgrestJs=__webpack_require__(/*! @supabase/postgrest-js */ \"./node_modules/@supabase/postgrest-js/lib/index.js\");class SupabaseClient{constructor(a,b){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:{autoRefreshToken:!0};this.supabaseUrl=null,this.supabaseKey=null,this.restUrl=null,this.realtimeUrl=null,this.authUrl=null,this.schema=\"public\",this.subscriptions={},this.tableName=null,this.queryFilters=[],c.schema&&(this.schema=c.schema),this.authenticate(a,b),this.auth=new _Auth.Auth(this.authUrl,b,{autoRefreshToken:c.autoRefreshToken})}/**\n * General Functionalities\n */authenticate(a,b){this.supabaseUrl=a,this.supabaseKey=b,this.restUrl=\"\".concat(a,\"/rest/v1\"),this.realtimeUrl=\"\".concat(a,\"/realtime/v1\").replace(\"http\",\"ws\"),this.authUrl=\"\".concat(a,\"/auth/v1\")}clear(){this.tableName=null,this.queryFilters=[]}from(a){return this.tableName=a,this}/**\n * Realtime Functionalities\n */on(a,b){var c=(0,_Helpers.uuid)();return this.subscriptions[c]=new _Realtime.default(this.tableName,this.realtimeUrl,this.schema,this.supabaseKey,c,a,b,this.queryFilters),this.clear(),this.subscriptions[c]}getSubscriptions(){return Object.values(this.subscriptions)}removeSubscription(a){a.unsubscribe(),delete this.subscriptions[a.uuid]}/**\n * REST Functionalities\n */rpc(a){var b=1<arguments.length&&arguments[1]!==void 0?arguments[1]:null,c=new _postgrestJs.PostgrestClient(this.restUrl,{headers:{apikey:this.supabaseKey},schema:this.schema});return c.rpc(a,b)}initClient(){var a={apikey:this.supabaseKey};this.auth.accessToken&&(a.Authorization=\"Bearer \".concat(this.auth.accessToken));var b=new _postgrestJs.PostgrestClient(this.restUrl,{headers:a,schema:this.schema}),c=b.from(this.tableName);return this.queryFilters.forEach(a=>{switch(a.filter){case\"filter\":c.filter(a.columnName,a.operator,a.criteria);break;case\"match\":c.match(a.query);break;case\"order\":c.order(a.property,a.ascending,a.nullsFirst);break;case\"range\":c.range(a.from,a.to);break;case\"single\":c.single();break;default:}}),this.clear(),c}select(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:\"*\",b=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},c=this.initClient();return c.select(a,b)}insert(a){var b=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},c=this.initClient();return c.insert(a,b)}update(a){var b=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},c=this.initClient();return c.update(a,b)}delete(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},b=this.initClient();return b.delete(a)}filter(a,b,c){return this.queryFilters.push({filter:\"filter\",columnName:a,operator:b,criteria:c}),this}match(a){return this.queryFilters.push({filter:\"match\",query:a}),this}order(a){var b=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1],c=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2];return this.queryFilters.push({filter:\"order\",property:a,ascending:b,nullsFirst:c}),this}range(a,b){return this.queryFilters.push({filter:\"range\",from:a,to:b}),this}single(){return this.queryFilters.push({filter:\"single\"}),this}}// pre-empts if any of the filters are used before select\nvar advancedFilters=[\"eq\",\"neq\",\"gt\",\"lt\",\"gte\",\"lte\",\"like\",\"ilike\",\"is\",\"in\",\"cs\",\"cd\",\"ova\",\"ovr\",\"sl\",\"sr\",\"nxr\",\"nxl\",\"adj\"];advancedFilters.forEach(a=>SupabaseClient.prototype[a]=function(b,c){return this.filter(b,a,c)});var createClient=function(a,b){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:{};return new SupabaseClient(a,b,c)};exports.createClient=createClient;\n\n//# sourceURL=webpack:///./node_modules/@supabase/supabase-js/lib/index.js?");
/***/ }),
@@ -267,7 +323,7 @@ eval("Object.defineProperty(exports,\"__esModule\",{value:!0}),exports.createCli
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-eval("Object.defineProperty(exports,\"__esModule\",{value:!0}),exports.toTimestampString=exports.toArray=exports.toJson=exports.toIntRange=exports.toInt=exports.toFloat=exports.toDateRange=exports.toDate=exports.toBoolean=exports.noop=exports.convertCell=exports.convertColumn=exports.convertChangeData=void 0;function _slicedToArray(a,b){return _arrayWithHoles(a)||_iterableToArrayLimit(a,b)||_unsupportedIterableToArray(a,b)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}function _unsupportedIterableToArray(a,b){if(a){if(\"string\"==typeof a)return _arrayLikeToArray(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);return\"Object\"===c&&a.constructor&&(c=a.constructor.name),\"Map\"===c||\"Set\"===c?Array.from(a):\"Arguments\"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?_arrayLikeToArray(a,b):void 0}}function _arrayLikeToArray(a,b){(null==b||b>a.length)&&(b=a.length);for(var c=0,d=Array(b);c<b;c++)d[c]=a[c];return d}function _iterableToArrayLimit(a,b){if(\"undefined\"!=typeof Symbol&&Symbol.iterator in Object(a)){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!(b&&c.length===b));d=!0);}catch(a){e=!0,f=a}finally{try{d||null==h[\"return\"]||h[\"return\"]()}finally{if(e)throw f}}return c}}function _arrayWithHoles(a){if(Array.isArray(a))return a}// # Lifted from epgsql (src/epgsql_binary.erl), this module licensed under\n// # 3-clause BSD found here: https://raw.githubusercontent.com/epgsql/epgsql/devel/LICENSE\n/**\n * Takes an array of columns and an object of string values then converts each string value\n * to its mapped type\n * @param {{name: String, type: String}[]} columns\n * @param {Object} records\n * @param {Object} options The map of various options that can be applied to the mapper\n * @param {Array} options.skipTypes The array of types that should not be converted\n *\n * @example convertChangeData([{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], {first_name: 'Paul', age:'33'}, {})\n * //=>{ first_name: 'Paul', age: 33 }\n */var convertChangeData=function(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},d={},e=\"undefined\"==typeof c.skipTypes?[]:c.skipTypes;return Object.entries(b).map(function(c){var f=_slicedToArray(c,2),g=f[0],h=f[1];d[g]=convertColumn(g,a,b,e)}),d};/**\n * Converts the value of an individual column\n * @param {String} columnName The column that you want to convert\n * @param {{name: String, type: String}[]} columns All of the columns\n * @param {Object} records The map of string values\n * @param {Array} skipTypes An array of types that should not be converted\n * @return {object} Useless information\n *\n * @example convertColumn('age', [{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], ['Paul', '33'], [])\n * //=> 33\n * @example convertColumn('age', [{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], ['Paul', '33'], ['int4'])\n * //=> \"33\"\n */exports.convertChangeData=convertChangeData;var convertColumn=function(a,b,c,d){var e=b.find(function(b){return b.name==a});return d.includes(e.type)?noop(c[a]):convertCell(e.type,c[a])};/**\n * If the value of the cell is `null`, returns null.\n * Otherwise converts the string value to the correct type.\n * @param {String} type A postgres column type\n * @param {String} stringValue The cell value\n *\n * @example convertCell('bool', 'true')\n * //=> true\n * @example convertCell('int8', '10')\n * //=> 10\n * @example convertCell('_int4', '{1,2,3,4}')\n * //=> [1,2,3,4]\n */exports.convertColumn=convertColumn;var convertCell=function(a,b){try{if(null===b)return null;// if data type is an array\nif(\"_\"===a.charAt(0)){var c=a.slice(1,a.length);return toArray(b,c)}// If not null, convert to correct type.\nreturn\"abstime\"===a?noop(b):\"bool\"===a?toBoolean(b):\"date\"===a?noop(b):\"daterange\"===a?toDateRange(b):\"float4\"===a?toFloat(b):\"float8\"===a?toFloat(b):\"int2\"===a?toInt(b):\"int4\"===a?toInt(b):\"int4range\"===a?toIntRange(b):\"int8\"===a?toInt(b):\"int8range\"===a?toIntRange(b):\"json\"===a?toJson(b):\"jsonb\"===a?toJson(b):\"money\"===a?toFloat(b):\"numeric\"===a?toFloat(b):\"oid\"===a?toInt(b):\"reltime\"===a?noop(b):\"time\"===a?noop(b):\"timestamp\"===a?toTimestampString(b):\"timestamptz\"===a?noop(b):\"timetz\"===a?noop(b):\"tsrange\"===a?toDateRange(b):\"tstzrange\"===a?toDateRange(b):noop(b)}catch(c){return console.log(\"Could not convert cell of type \".concat(a,\" and value \").concat(b)),console.log(\"This is the error: \".concat(c)),b}};exports.convertCell=convertCell;var noop=function(a){return a};exports.noop=noop;var toBoolean=function(a){return!(\"t\"!==a)||\"f\"!==a&&null};exports.toBoolean=toBoolean;var toDate=function(a){return new Date(a)};exports.toDate=toDate;var toDateRange=function(a){var b=JSON.parse(a);return[new Date(b[0]),new Date(b[1])]};exports.toDateRange=toDateRange;var toFloat=function(a){return parseFloat(a)};exports.toFloat=toFloat;var toInt=function(a){return parseInt(a)};exports.toInt=toInt;var toIntRange=function(a){var b=JSON.parse(a);return[parseInt(b[0]),parseInt(b[1])]};exports.toIntRange=toIntRange;var toJson=function(a){return JSON.parse(a)};/**\n * Converts a Postgres Array into a native JS array\n * @example toArray('{1,2,3,4}', 'int4')\n * //=> [1,2,3,4]\n * @example toArray('{}', 'int4')\n * //=> []\n */exports.toJson=toJson;var toArray=function(a,b){// this takes off the '{' & '}'\nvar c=a.slice(1,a.length-1),d=0<c.length?c.split(\",\"):[],e=d.map(function(a){return convertCell(b,a)});// converts the string into an array\n// if string is empty (meaning the array was empty), an empty array will be immediately returned\nreturn e};/**\n * Fixes timestamp to be ISO-8601. Swaps the space between the date and time for a 'T'\n * See https://github.com/supabase/supabase/issues/18\n * @returns {string}\n * @example toTimestampString('2019-09-10 00:00:00')\n * //=> '2019-09-10T00:00:00'\n */exports.toArray=toArray;var toTimestampString=function(a){return a.replace(\" \",\"T\")};exports.toTimestampString=toTimestampString;\n\n//# sourceURL=webpack:///./node_modules/@supabase/supabase-js/lib/utils/ChangeMapper.js?");
+eval("Object.defineProperty(exports,\"__esModule\",{value:!0}),exports.toTimestampString=exports.toArray=exports.toJson=exports.toIntRange=exports.toInt=exports.toFloat=exports.toDateRange=exports.toDate=exports.toBoolean=exports.noop=exports.convertCell=exports.convertColumn=exports.convertChangeData=void 0;// # Lifted from epgsql (src/epgsql_binary.erl), this module licensed under\n// # 3-clause BSD found here: https://raw.githubusercontent.com/epgsql/epgsql/devel/LICENSE\n/**\n * Takes an array of columns and an object of string values then converts each string value\n * to its mapped type\n * @param {{name: String, type: String}[]} columns\n * @param {Object} records\n * @param {Object} options The map of various options that can be applied to the mapper\n * @param {Array} options.skipTypes The array of types that should not be converted\n *\n * @example convertChangeData([{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], {first_name: 'Paul', age:'33'}, {})\n * //=>{ first_name: 'Paul', age: 33 }\n */var convertChangeData=function(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},d={},e=\"undefined\"==typeof c.skipTypes?[]:c.skipTypes;return Object.entries(b).map((c)=>{var[f,g]=c;d[f]=convertColumn(f,a,b,e)}),d};/**\n * Converts the value of an individual column\n * @param {String} columnName The column that you want to convert\n * @param {{name: String, type: String}[]} columns All of the columns\n * @param {Object} records The map of string values\n * @param {Array} skipTypes An array of types that should not be converted\n * @return {object} Useless information\n *\n * @example convertColumn('age', [{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], ['Paul', '33'], [])\n * //=> 33\n * @example convertColumn('age', [{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], ['Paul', '33'], ['int4'])\n * //=> \"33\"\n */exports.convertChangeData=convertChangeData;var convertColumn=(a,b,c,d)=>{var e=b.find(b=>b.name==a);return d.includes(e.type)?noop(c[a]):convertCell(e.type,c[a])};/**\n * If the value of the cell is `null`, returns null.\n * Otherwise converts the string value to the correct type.\n * @param {String} type A postgres column type\n * @param {String} stringValue The cell value\n *\n * @example convertCell('bool', 'true')\n * //=> true\n * @example convertCell('int8', '10')\n * //=> 10\n * @example convertCell('_int4', '{1,2,3,4}')\n * //=> [1,2,3,4]\n */exports.convertColumn=convertColumn;var convertCell=(a,b)=>{try{if(null===b)return null;// if data type is an array\nif(\"_\"===a.charAt(0)){var c=a.slice(1,a.length);return toArray(b,c)}// If not null, convert to correct type.\nreturn\"abstime\"===a?noop(b):\"bool\"===a?toBoolean(b):\"date\"===a?noop(b):\"daterange\"===a?toDateRange(b):\"float4\"===a?toFloat(b):\"float8\"===a?toFloat(b):\"int2\"===a?toInt(b):\"int4\"===a?toInt(b):\"int4range\"===a?toIntRange(b):\"int8\"===a?toInt(b):\"int8range\"===a?toIntRange(b):\"json\"===a?toJson(b):\"jsonb\"===a?toJson(b):\"money\"===a?toFloat(b):\"numeric\"===a?toFloat(b):\"oid\"===a?toInt(b):\"reltime\"===a?noop(b):\"time\"===a?noop(b):\"timestamp\"===a?toTimestampString(b):\"timestamptz\"===a?noop(b):\"timetz\"===a?noop(b):\"tsrange\"===a?toDateRange(b):\"tstzrange\"===a?toDateRange(b):noop(b)}catch(c){return console.log(\"Could not convert cell of type \".concat(a,\" and value \").concat(b)),console.log(\"This is the error: \".concat(c)),b}};exports.convertCell=convertCell;var noop=a=>a;exports.noop=noop;var toBoolean=a=>\"t\"===a||\"f\"!==a&&null;exports.toBoolean=toBoolean;var toDate=a=>new Date(a);exports.toDate=toDate;var toDateRange=a=>{var b=JSON.parse(a);return[new Date(b[0]),new Date(b[1])]};exports.toDateRange=toDateRange;var toFloat=a=>parseFloat(a);exports.toFloat=toFloat;var toInt=a=>parseInt(a);exports.toInt=toInt;var toIntRange=a=>{var b=JSON.parse(a);return[parseInt(b[0]),parseInt(b[1])]};exports.toIntRange=toIntRange;var toJson=a=>JSON.parse(a);/**\n * Converts a Postgres Array into a native JS array\n * @example toArray('{1,2,3,4}', 'int4')\n * //=> [1,2,3,4]\n * @example toArray('{}', 'int4')\n * //=> []\n */exports.toJson=toJson;var toArray=(a,b)=>{// this takes off the '{' & '}'\nvar c=a.slice(1,a.length-1),d=0<c.length?c.split(\",\"):[],e=d.map(a=>convertCell(b,a));// converts the string into an array\n// if string is empty (meaning the array was empty), an empty array will be immediately returned\nreturn e};/**\n * Fixes timestamp to be ISO-8601. Swaps the space between the date and time for a 'T'\n * See https://github.com/supabase/supabase/issues/18\n * @returns {string}\n * @example toTimestampString('2019-09-10 00:00:00')\n * //=> '2019-09-10T00:00:00'\n */exports.toArray=toArray;var toTimestampString=a=>a.replace(\" \",\"T\");exports.toTimestampString=toTimestampString;\n\n//# sourceURL=webpack:///./node_modules/@supabase/supabase-js/lib/utils/ChangeMapper.js?");
/***/ }),
diff --git a/examples/auth-vanilla-js/index.html b/examples/auth-vanilla-js/index.html
index bfb6d30de3a..efa68a9437e 100644
--- a/examples/auth-vanilla-js/index.html
+++ b/examples/auth-vanilla-js/index.html
@@ -32,6 +32,10 @@
<input readonly=readonly type='text' id='refresh-token' />
</form>
</div>
+ <div class='section'>
+ <h3>Fetch User Details</h3>
+ <button id='user-button'>Fetch</button>
+ </div>
</div>
</body>
diff --git a/examples/auth-vanilla-js/index.js b/examples/auth-vanilla-js/index.js
index b8aa0c4ac4d..283f0b6a37f 100644
--- a/examples/auth-vanilla-js/index.js
+++ b/examples/auth-vanilla-js/index.js
@@ -2,8 +2,9 @@ console.log('Auth, Auth, Baby')
import { createClient } from '@supabase/supabase-js'
-var SUPABASE_URL = 'https://UxtUdvoEHGzXftFJhwwT.supabase.net'
-var SUPABASE_KEY = 'XbBJdEH2WdymQ0Hq9Huk1JqCCmggPX'
+var SUPABASE_URL = 'https://qgxofzpdhwflxckfyoyz.supabase.net'
+var SUPABASE_KEY =
+ 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlhdCI6MTU5NTU3OTM1MywiZXhwIjoxOTExMTU1MzUzfQ.zS6U4PuJsHJ0wbBQXANpg2fbvHazUtfCgWonJ_TXlRk'
var supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
window.userToken = null
@@ -14,6 +15,9 @@ window.onload = function () {
var logInForm = document.querySelector('#log-in')
logInForm.onsubmit = logInSubmitted.bind(logInForm)
+
+ var userDetailsButton = document.querySelector('#user-button')
+ userDetailsButton.onclick = fetchUserDetails.bind(userDetailsButton)
}
const signUpSubmitted = (event) => {
@@ -21,46 +25,40 @@ const signUpSubmitted = (event) => {
const email = event.target[0].value
const password = event.target[1].value
- var xmlHttp = new XMLHttpRequest()
- xmlHttp.onreadystatechange = function () {
- if (xmlHttp.readyState == 4 && xmlHttp.status == 200) {
- alert(xmlHttp.responseText)
- }
- }
- xmlHttp.open('post', SUPABASE_URL + `/auth/v1/signup?apikey=${SUPABASE_KEY}`)
- xmlHttp.setRequestHeader('Content-Type', 'application/json;charset=UTF-8')
- xmlHttp.send(JSON.stringify({ email: email, password: password }))
+ supabase.auth
+ .signup(email, password)
+ .then((response) => {
+ alert(JSON.stringify(response.body))
+ })
+ .catch((err) => {
+ alert(err.response.text)
+ })
}
const logInSubmitted = (event) => {
event.preventDefault()
- console.log(event)
const email = event.target[0].value
const password = event.target[1].value
- var xmlHttp = new XMLHttpRequest()
- xmlHttp.onreadystatechange = function () {
- if (xmlHttp.readyState == 4 && xmlHttp.status == 200) {
- alert(xmlHttp.responseText)
- let data = JSON.parse(xmlHttp.responseText)
- window.accessToken = data.access_token
- document.querySelector('#access-token').value = window.accessToken
-
- window.refreshToken = data.refresh_token
- document.querySelector('#refresh-token').value = window.refreshToken
- }
- }
- xmlHttp.open('post', SUPABASE_URL + `/auth/v1/token?apikey=${SUPABASE_KEY}&grant_type=password&username=${email}&password=${password}`)
- xmlHttp.send()
+ supabase.auth
+ .login(email, password)
+ .then((response) => {
+ document.querySelector('#access-token').value = response.body.access_token
+ document.querySelector('#refresh-token').value = response.body.refresh_token
+ alert(JSON.stringify(response.body))
+ })
+ .catch((err) => {
+ alert(err.response.text)
+ })
}
-// manual signup
-// curl --header "Content-Type: application/json" \
-// --request POST \
-// --data '{"email":"[email protected]","password":"password"}' \
-// https://UxtUdvoEHGzXftFJhwwT.supabase.net/auth/v1/signup?apikey=XbBJdEH2WdymQ0Hq9Huk1JqCCmggPX
-
-// manual login
-// curl --header "Content-Type: application/json" \
-// --request POST \
-// "https://UxtUdvoEHGzXftFJhwwT.supabase.net/auth/v1/[email protected]&password=password&grant_type=password&apikey=XbBJdEH2WdymQ0Hq9Huk1JqCCmggPX"
+const fetchUserDetails = () => {
+ supabase.auth
+ .user()
+ .then((response) => {
+ alert(JSON.stringify(response))
+ })
+ .catch((err) => {
+ alert(err.response.text)
+ })
+}
diff --git a/examples/auth-vanilla-js/package-lock.json b/examples/auth-vanilla-js/package-lock.json
index a3a9ba55963..70beaf8c87a 100644
--- a/examples/auth-vanilla-js/package-lock.json
+++ b/examples/auth-vanilla-js/package-lock.json
@@ -13,23 +13,23 @@
}
},
"@babel/core": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.4.tgz",
- "integrity": "sha512-3A0tS0HWpy4XujGc7QtOIHTeNwUgWaZc/WuS5YQrfhU67jnVmsD6OGPc1AKHH0LJHQICGncy3+YUjIhVlfDdcA==",
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.5.tgz",
+ "integrity": "sha512-O34LQooYVDXPl7QWCdW9p4NR+QlzOr7xShPPJz8GsuCU3/8ua/wqTr7gmnxXv+WBESiGU/G5s16i6tUvHkNb+w==",
"requires": {
"@babel/code-frame": "^7.10.4",
- "@babel/generator": "^7.10.4",
- "@babel/helper-module-transforms": "^7.10.4",
+ "@babel/generator": "^7.10.5",
+ "@babel/helper-module-transforms": "^7.10.5",
"@babel/helpers": "^7.10.4",
- "@babel/parser": "^7.10.4",
+ "@babel/parser": "^7.10.5",
"@babel/template": "^7.10.4",
- "@babel/traverse": "^7.10.4",
- "@babel/types": "^7.10.4",
+ "@babel/traverse": "^7.10.5",
+ "@babel/types": "^7.10.5",
"convert-source-map": "^1.7.0",
"debug": "^4.1.0",
"gensync": "^1.0.0-beta.1",
"json5": "^2.1.2",
- "lodash": "^4.17.13",
+ "lodash": "^4.17.19",
"resolve": "^1.3.2",
"semver": "^5.4.1",
"source-map": "^0.5.0"
@@ -64,13 +64,12 @@
}
},
"@babel/generator": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.10.4.tgz",
- "integrity": "sha512-toLIHUIAgcQygFZRAQcsLQV3CBuX6yOIru1kJk/qqqvcRmZrYe6WavZTSG+bB8MxhnL9YPf+pKQfuiP161q7ng==",
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.10.5.tgz",
+ "integrity": "sha512-3vXxr3FEW7E7lJZiWQ3bM4+v/Vyr9C+hpolQ8BGFr9Y8Ri2tFLWTixmwKBafDujO1WVah4fhZBeU1bieKdghig==",
"requires": {
- "@babel/types": "^7.10.4",
+ "@babel/types": "^7.10.5",
"jsesc": "^2.5.1",
- "lodash": "^4.17.13",
"source-map": "^0.5.0"
},
"dependencies": {
@@ -100,11 +99,11 @@
}
},
"@babel/helper-member-expression-to-functions": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.10.4.tgz",
- "integrity": "sha512-m5j85pK/KZhuSdM/8cHUABQTAslV47OjfIB9Cc7P+PvlAoBzdb79BGNfw8RhT5Mq3p+xGd0ZfAKixbrUZx0C7A==",
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.10.5.tgz",
+ "integrity": "sha512-HiqJpYD5+WopCXIAbQDG0zye5XYVvcO9w/DHp5GsaGkRUaamLj2bEtu6i8rnGGprAhHM3qidCMgp71HF4endhA==",
"requires": {
- "@babel/types": "^7.10.4"
+ "@babel/types": "^7.10.5"
}
},
"@babel/helper-module-imports": {
@@ -116,17 +115,17 @@
}
},
"@babel/helper-module-transforms": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.10.4.tgz",
- "integrity": "sha512-Er2FQX0oa3nV7eM1o0tNCTx7izmQtwAQsIiaLRWtavAAEcskb0XJ5OjJbVrYXWOTr8om921Scabn4/tzlx7j1Q==",
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.10.5.tgz",
+ "integrity": "sha512-4P+CWMJ6/j1W915ITJaUkadLObmCRRSC234uctJfn/vHrsLNxsR8dwlcXv9ZhJWzl77awf+mWXSZEKt5t0OnlA==",
"requires": {
"@babel/helper-module-imports": "^7.10.4",
"@babel/helper-replace-supers": "^7.10.4",
"@babel/helper-simple-access": "^7.10.4",
"@babel/helper-split-export-declaration": "^7.10.4",
"@babel/template": "^7.10.4",
- "@babel/types": "^7.10.4",
- "lodash": "^4.17.13"
+ "@babel/types": "^7.10.5",
+ "lodash": "^4.17.19"
}
},
"@babel/helper-optimise-call-expression": {
@@ -247,9 +246,9 @@
}
},
"@babel/parser": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.4.tgz",
- "integrity": "sha512-8jHII4hf+YVDsskTF6WuMB3X4Eh+PsUkC2ljq22so5rHvH+T8BzyL94VOdyFLNR8tBSVXOTbNHOKpR4TfRxVtA=="
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.5.tgz",
+ "integrity": "sha512-wfryxy4bE1UivvQKSQDU4/X6dr+i8bctjUjj8Zyt3DQy7NtPizJXT8M52nqpNKL+nq2PW8lxk4ZqLj0fD4B4hQ=="
},
"@babel/plugin-syntax-async-generators": {
"version": "7.8.4",
@@ -340,33 +339,17 @@
}
},
"@babel/runtime": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.4.tgz",
- "integrity": "sha512-UpTN5yUJr9b4EX2CnGNWIvER7Ab83ibv0pcvvHc4UOdrBI5jb8bj+32cCwPX6xu0mt2daFNjYhoi+X7beH0RSw==",
- "requires": {
- "regenerator-runtime": "^0.13.4"
- },
- "dependencies": {
- "regenerator-runtime": {
- "version": "0.13.5",
- "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz",
- "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA=="
- }
- }
- },
- "@babel/runtime-corejs3": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.10.4.tgz",
- "integrity": "sha512-BFlgP2SoLO9HJX9WBwN67gHWMBhDX/eDz64Jajd6mR/UAUzqrNMm99d4qHnVaKscAElZoFiPv+JpR/Siud5lXw==",
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.5.tgz",
+ "integrity": "sha512-otddXKhdNn7d0ptoFRHtMLa8LqDxLYwTjB4nYgM1yy5N6gU/MUf8zqyyLltCH3yAVitBzmwK4us+DD0l/MauAg==",
"requires": {
- "core-js-pure": "^3.0.0",
"regenerator-runtime": "^0.13.4"
},
"dependencies": {
"regenerator-runtime": {
- "version": "0.13.5",
- "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz",
- "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA=="
+ "version": "0.13.7",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz",
+ "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew=="
}
}
},
@@ -381,19 +364,19 @@
}
},
"@babel/traverse": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.10.4.tgz",
- "integrity": "sha512-aSy7p5THgSYm4YyxNGz6jZpXf+Ok40QF3aA2LyIONkDHpAcJzDUqlCKXv6peqYUs2gmic849C/t2HKw2a2K20Q==",
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.10.5.tgz",
+ "integrity": "sha512-yc/fyv2gUjPqzTz0WHeRJH2pv7jA9kA7mBX2tXl/x5iOE81uaVPuGPtaYk7wmkx4b67mQ7NqI8rmT2pF47KYKQ==",
"requires": {
"@babel/code-frame": "^7.10.4",
- "@babel/generator": "^7.10.4",
+ "@babel/generator": "^7.10.5",
"@babel/helper-function-name": "^7.10.4",
"@babel/helper-split-export-declaration": "^7.10.4",
- "@babel/parser": "^7.10.4",
- "@babel/types": "^7.10.4",
+ "@babel/parser": "^7.10.5",
+ "@babel/types": "^7.10.5",
"debug": "^4.1.0",
"globals": "^11.1.0",
- "lodash": "^4.17.13"
+ "lodash": "^4.17.19"
},
"dependencies": {
"debug": {
@@ -417,12 +400,12 @@
}
},
"@babel/types": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.4.tgz",
- "integrity": "sha512-UTCFOxC3FsFHb7lkRMVvgLzaRVamXuAs2Tz4wajva4WxtVY82eZeaUBtC2Zt95FU9TiznuC0Zk35tsim8jeVpg==",
+ "version": "7.10.5",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.5.tgz",
+ "integrity": "sha512-ixV66KWfCI6GKoA/2H9v6bQdbfXEwwpOdQ8cRvb4F+eyvhlaHxWFMQB4+3d9QFJXZsiiiqVrewNV0DFEQpyT4Q==",
"requires": {
"@babel/helper-validator-identifier": "^7.10.4",
- "lodash": "^4.17.13",
+ "lodash": "^4.17.19",
"to-fast-properties": "^2.0.0"
},
"dependencies": {
@@ -833,9 +816,9 @@
}
},
"@sinonjs/commons": {
- "version": "1.8.0",
- "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.0.tgz",
- "integrity": "sha512-wEj54PfsZ5jGSwMX68G8ZXFawcSglQSXqCftWX3ec8MDUzQdHgcKvw97awHbY0efQEL5iKUOAmmVtoYgmrSG4Q==",
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.1.tgz",
+ "integrity": "sha512-892K+kWUUi3cl+LlqEWIDrhvLgdL79tECi8JZUyq6IviKy/DNhuzCRlbHUjxK89f4ypPMMaFnFuR9Ie6DoIMsw==",
"requires": {
"type-detect": "4.0.8"
}
@@ -872,13 +855,14 @@
}
},
"@supabase/supabase-js": {
- "version": "0.34.0",
- "resolved": "https://registry.npmjs.org/@supabase/supabase-js/-/supabase-js-0.34.0.tgz",
- "integrity": "sha512-6E5y/dntOQ0h6KQT0xD7pvNhKa6oBXW5MOm0l9qcMT/0PiZkFRHKu4i9rpcdbsXkJ8hnOTzAectdDgxxv6lmMw==",
+ "version": "0.34.5",
+ "resolved": "https://registry.npmjs.org/@supabase/supabase-js/-/supabase-js-0.34.5.tgz",
+ "integrity": "sha512-NNUAbgQzPZHtp03IHlqHZ6dcLFJjHAfOYe69U5L+xIMysJ68ibIxZhmX/0yJ2IJ6SBtuLwbhqYals5aQAeQIFw==",
"requires": {
"@supabase/doctest-js": "^0.1.0",
"@supabase/postgrest-js": "^0.16.1",
"@supabase/realtime-js": "^0.9.0",
+ "dotenv": "^8.2.0",
"superagent": "^5.2.1"
}
},
@@ -955,9 +939,9 @@
}
},
"@types/node": {
- "version": "14.0.18",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.18.tgz",
- "integrity": "sha512-0Z3nS5acM0cIV4JPzrj9g/GH0Et5vmADWtip3YOXOp1NpOLU8V3KoZDc8ny9c1pe/YSYYzQkAWob6dyV/EWg4g=="
+ "version": "14.0.25",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.25.tgz",
+ "integrity": "sha512-okMqUHqrMlGOxfDZliX1yFX5MV6qcd5PpRz96XYtjkM0Ws/hwg23FMUqt6pETrVRZS+EKUB5HY19mmo54EuQbA=="
},
"@types/normalize-package-data": {
"version": "2.4.0",
@@ -2229,11 +2213,6 @@
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz",
"integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg=="
},
- "core-js-pure": {
- "version": "3.6.5",
- "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.6.5.tgz",
- "integrity": "sha512-lacdXOimsiD0QyNf9BC/mxivNJ/ybBGJXQFKzRekp1WTHoVUWsUHEn+2T8GJAzzIhyOuXA+gOxCVN3l+5PLPUA=="
- },
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
@@ -2386,12 +2365,9 @@
}
},
"decamelize": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-3.2.0.tgz",
- "integrity": "sha512-4TgkVUsmmu7oCSyGBm5FvfMoACuoh9EOidm7V5/J2X2djAwwt57qb3F2KMP2ITqODTCSwb+YRV+0Zqrv18k/hw==",
- "requires": {
- "xregexp": "^4.2.4"
- }
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
+ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA="
},
"decode-uri-component": {
"version": "0.2.0",
@@ -2520,6 +2496,11 @@
"webidl-conversions": "^4.0.2"
}
},
+ "dotenv": {
+ "version": "8.2.0",
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz",
+ "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw=="
+ },
"duplexify": {
"version": "3.7.1",
"resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz",
@@ -5078,9 +5059,9 @@
}
},
"lodash": {
- "version": "4.17.15",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
- "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
+ "version": "4.17.19",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
+ "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ=="
},
"lodash.sortby": {
"version": "4.7.0",
@@ -5701,9 +5682,9 @@
}
},
"parse-json": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz",
- "integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==",
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.1.tgz",
+ "integrity": "sha512-ztoZ4/DYeXQq4E21v169sC8qWINGpcosGv9XhTDvg9/hWvx/zrFkc9BiWxR58OJLHGk28j5BL0SDLeV2WmFZlQ==",
"requires": {
"@babel/code-frame": "^7.0.0",
"error-ex": "^1.3.1",
@@ -6116,19 +6097,19 @@
}
},
"request-promise-core": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.3.tgz",
- "integrity": "sha512-QIs2+ArIGQVp5ZYbWD5ZLCY29D5CfWizP8eWnm8FoGD1TX61veauETVQbrV60662V0oFBkrDOuaBI8XgtuyYAQ==",
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz",
+ "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==",
"requires": {
- "lodash": "^4.17.15"
+ "lodash": "^4.17.19"
}
},
"request-promise-native": {
- "version": "1.0.8",
- "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.8.tgz",
- "integrity": "sha512-dapwLGqkHtwL5AEbfenuzjTYg35Jd6KPytsC2/TLkVMz8rm+tNt72MGUWT1RP/aYawMpN6HqbNGBQaRcBtjQMQ==",
+ "version": "1.0.9",
+ "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz",
+ "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==",
"requires": {
- "request-promise-core": "1.1.3",
+ "request-promise-core": "1.1.4",
"stealthy-require": "^1.1.1",
"tough-cookie": "^2.3.3"
},
@@ -8184,14 +8165,6 @@
"resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz",
"integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw=="
},
- "xregexp": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-4.3.0.tgz",
- "integrity": "sha512-7jXDIFXh5yJ/orPn4SXjuVrWWoi4Cr8jfV1eHv9CixKSbU+jY4mxfrBwAuDvupPNKpMUY+FeIqsVw/JLT9+B8g==",
- "requires": {
- "@babel/runtime-corejs3": "^7.8.3"
- }
- },
"xtend": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
@@ -8213,12 +8186,12 @@
"integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
},
"yargs": {
- "version": "15.4.0",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.0.tgz",
- "integrity": "sha512-D3fRFnZwLWp8jVAAhPZBsmeIHY8tTsb8ItV9KaAaopmC6wde2u6Yw29JBIZHXw14kgkRnYmDgmQU4FVMDlIsWw==",
+ "version": "15.4.1",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz",
+ "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==",
"requires": {
"cliui": "^6.0.0",
- "decamelize": "^3.2.0",
+ "decamelize": "^1.2.0",
"find-up": "^4.1.0",
"get-caller-file": "^2.0.1",
"require-directory": "^2.1.1",
@@ -8237,13 +8210,6 @@
"requires": {
"camelcase": "^5.0.0",
"decamelize": "^1.2.0"
- },
- "dependencies": {
- "decamelize": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
- "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA="
- }
}
}
}
diff --git a/examples/auth-vanilla-js/package.json b/examples/auth-vanilla-js/package.json
index 77ac339693d..36da6e6dc78 100644
--- a/examples/auth-vanilla-js/package.json
+++ b/examples/auth-vanilla-js/package.json
@@ -12,7 +12,7 @@
"author": "",
"license": "ISC",
"dependencies": {
- "@supabase/supabase-js": "^0.34.0",
+ "@supabase/supabase-js": "^0.34.5",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.12"
}