From 4aeb03ef55216cb994079849bea07779c229fee6 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 15 Aug 2024 06:58:05 +0000 Subject: [PATCH] chore(release): prepare 1.0.1 [skip ci] --- CHANGELOG.md | 7 +++++++ extension.yaml | 2 +- functions/lib/index.js | 11 ++++++++--- functions/lib/index.js.map | 2 +- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0990ab9..b64e386 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.0.1](https://github.com/ChatKitty/chatkitty-firebase-extension/compare/1.0.0...1.0.1) (2024-08-15) + + +### Bug Fixes + +* build functions on release ([9797dfa](https://github.com/ChatKitty/chatkitty-firebase-extension/commit/9797dfa23d84189db5fb68602cfa7332fe5adb5c)) + ## Version 1.0.0 (2024-08-15) diff --git a/extension.yaml b/extension.yaml index 77f8745..365c978 100644 --- a/extension.yaml +++ b/extension.yaml @@ -1,5 +1,5 @@ name: chatkitty -version: 1.0.0 +version: 1.0.1 specVersion: v1beta license: Apache-2.0 billingRequired: true diff --git a/functions/lib/index.js b/functions/lib/index.js index 884b8d8..a6c2a6f 100644 --- a/functions/lib/index.js +++ b/functions/lib/index.js @@ -1,13 +1,13 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.handleDeleteUser = exports.handleCreateUser = void 0; -const functions = require("firebase-functions"); +const firebase_functions_1 = require("firebase-functions"); const chatkitty_platform_sdk_1 = require("chatkitty-platform-sdk"); const chatkitty = new chatkitty_platform_sdk_1.ChatKitty({ clientId: process.env.CLIENT_ID, clientSecret: process.env.CLIENT_SECRET, }); -exports.handleCreateUser = functions.auth.user().onCreate(async (user) => { +exports.handleCreateUser = firebase_functions_1.auth.user().onCreate(async (user) => { await chatkitty.Users.checkUserExists(user.uid).catch(async () => { await chatkitty.Users.createUser({ name: user.uid, @@ -15,13 +15,18 @@ exports.handleCreateUser = functions.auth.user().onCreate(async (user) => { isGuest: true, }); }); + firebase_functions_1.logger.info(`Successfully created ChatKitty user: ${user.uid}`); }); -exports.handleDeleteUser = functions.auth.user().onDelete(async (user) => { +exports.handleDeleteUser = firebase_functions_1.auth.user().onDelete(async (user) => { var _a; const result = await chatkitty.Users.listUsers(0, 0, undefined, user.uid); const users = (_a = result.data._embedded) === null || _a === void 0 ? void 0 : _a.users; if (users && users.length > 0) { await chatkitty.Users.deleteUser(users[0].id); + firebase_functions_1.logger.info(`Successfully deleted ChatKitty user: ${user.uid}`); + } + else { + firebase_functions_1.logger.info(`ChatKitty user not found: ${user.uid}`); } }); //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/functions/lib/index.js.map b/functions/lib/index.js.map index 5cb5201..33691a5 100644 --- a/functions/lib/index.js.map +++ b/functions/lib/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,gDAAgD;AAChD,mEAAiD;AAEjD,MAAM,SAAS,GAAG,IAAI,kCAAS,CAAC;IAC9B,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,SAAmB;IACzC,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,aAAuB;CAClD,CAAC,CAAC;AAGU,QAAA,gBAAgB,GACzB,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;IAC5C,MAAM,SAAS,CAAC,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE;QAC/D,MAAM,SAAS,CAAC,KAAK,CAAC,UAAU,CAAC;YAC/B,IAAI,EAAE,IAAI,CAAC,GAAG;YACd,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,WAAW;YAC5C,OAAO,EAAE,IAAI;SACd,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;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