This commit is contained in:
Benjamin Toby 2026-01-30 07:55:55 +01:00
parent 7169e467cc
commit b6fa30a3f2
10 changed files with 80 additions and 71 deletions

1
dist/index.d.ts vendored
View File

@ -54,6 +54,7 @@ declare const datasquirel: {
update: typeof import("./package-shared/actions/users/update-user").default;
resetPassword: typeof import("./package-shared/actions/users/reset-password").default;
googleLogin: typeof import("./package-shared/actions/users/social/google-auth").default;
githubLoginFn: typeof import("./package-shared/functions/api/social-login/githubLogin").default;
logout: typeof import("./package-shared/actions/users/logout-user").default;
auth: typeof import("./package-shared/actions/users/user-auth").default;
validateTempEmailCode: typeof import("./package-shared/actions/users/validate-temp-email-code").default;

View File

@ -8,6 +8,7 @@ import googleAuth from "../../actions/users/social/google-auth";
import updateUser from "../../actions/users/update-user";
import userAuth from "../../actions/users/user-auth";
import validateTempEmailCode from "../../actions/users/validate-temp-email-code";
import githubLogin from "../../functions/api/social-login/githubLogin";
declare const user: {
auth: {
login: typeof loginUser;
@ -17,6 +18,7 @@ declare const user: {
update: typeof updateUser;
resetPassword: typeof resetPassword;
googleLogin: typeof googleAuth;
githubLoginFn: typeof githubLogin;
logout: typeof logoutUser;
auth: typeof userAuth;
validateTempEmailCode: typeof validateTempEmailCode;

View File

@ -13,6 +13,7 @@ const google_auth_1 = __importDefault(require("../../actions/users/social/google
const update_user_1 = __importDefault(require("../../actions/users/update-user"));
const user_auth_1 = __importDefault(require("../../actions/users/user-auth"));
const validate_temp_email_code_1 = __importDefault(require("../../actions/users/validate-temp-email-code"));
const githubLogin_1 = __importDefault(require("../../functions/api/social-login/githubLogin"));
const user = {
auth: {
login: login_user_1.default,
@ -22,6 +23,7 @@ const user = {
update: update_user_1.default,
resetPassword: reset_password_1.default,
googleLogin: google_auth_1.default,
githubLoginFn: githubLogin_1.default,
logout: logout_user_1.default,
auth: user_auth_1.default,
validateTempEmailCode: validate_temp_email_code_1.default,

View File

@ -1,36 +1,4 @@
export interface GithubUserPayload {
login: string;
id: number;
node_id: string;
avatar_url: string;
gravatar_id: string;
url: string;
html_url: string;
followers_url: string;
following_url: string;
gists_url: string;
starred_url: string;
subscriptions_url: string;
organizations_url: string;
repos_url: string;
received_events_url: string;
type: string;
site_admin: boolean;
name: string;
company: string;
blog: string;
location: string;
email: string;
hireable: string;
bio: string;
twitter_username: string;
public_repos: number;
public_gists: number;
followers: number;
following: number;
created_at: string;
updated_at: string;
}
import { GithubUserPayload } from "../../../types";
type Param = {
code: string;
clientId: string;

View File

@ -57,7 +57,7 @@ function githubLogin(_a) {
}
}
}
catch ( /** @type {any} */error) {
catch (error) {
console.log("ERROR in githubLogin.ts backend function =>", error.message);
}
return gitHubUser;

View File

@ -2410,3 +2410,36 @@ export type AddDbEntryParamOnDuplicate = {
sql: string;
values?: string[];
};
export interface GithubUserPayload {
login: string;
id: number;
node_id: string;
avatar_url: string;
gravatar_id: string;
url: string;
html_url: string;
followers_url: string;
following_url: string;
gists_url: string;
starred_url: string;
subscriptions_url: string;
organizations_url: string;
repos_url: string;
received_events_url: string;
type: string;
site_admin: boolean;
name: string;
company: string;
blog: string;
location: string;
email: string;
hireable: string;
bio: string;
twitter_username: string;
public_repos: number;
public_gists: number;
followers: number;
following: number;
created_at: string;
updated_at: string;
}

View File

@ -8,6 +8,7 @@ import googleAuth from "../../actions/users/social/google-auth";
import updateUser from "../../actions/users/update-user";
import userAuth from "../../actions/users/user-auth";
import validateTempEmailCode from "../../actions/users/validate-temp-email-code";
import githubLogin from "../../functions/api/social-login/githubLogin";
const user = {
auth: {
@ -18,6 +19,7 @@ const user = {
update: updateUser,
resetPassword: resetPassword,
googleLogin: googleAuth,
githubLoginFn: githubLogin,
logout: logoutUser,
auth: userAuth,
validateTempEmailCode,

View File

@ -1,40 +1,7 @@
import { GithubUserPayload } from "../../../types";
import dbHandler from "../../backend/dbHandler";
import httpsRequest from "../../backend/httpsRequest";
export interface GithubUserPayload {
login: string;
id: number;
node_id: string;
avatar_url: string;
gravatar_id: string;
url: string;
html_url: string;
followers_url: string;
following_url: string;
gists_url: string;
starred_url: string;
subscriptions_url: string;
organizations_url: string;
repos_url: string;
received_events_url: string;
type: string;
site_admin: boolean;
name: string;
company: string;
blog: string;
location: string;
email: string;
hireable: string;
bio: string;
twitter_username: string;
public_repos: number;
public_gists: number;
followers: number;
following: number;
created_at: string;
updated_at: string;
}
type Param = {
code: string;
clientId: string;
@ -92,10 +59,10 @@ export default async function githubLogin({
gitHubUser.email = existingGithubUser[0].email;
}
}
} catch (/** @type {any} */ error: any) {
} catch (error: any) {
console.log(
"ERROR in githubLogin.ts backend function =>",
error.message
error.message,
);
}

View File

@ -3101,3 +3101,37 @@ export type AddDbEntryParamOnDuplicate = {
sql: string;
values?: string[];
};
export interface GithubUserPayload {
login: string;
id: number;
node_id: string;
avatar_url: string;
gravatar_id: string;
url: string;
html_url: string;
followers_url: string;
following_url: string;
gists_url: string;
starred_url: string;
subscriptions_url: string;
organizations_url: string;
repos_url: string;
received_events_url: string;
type: string;
site_admin: boolean;
name: string;
company: string;
blog: string;
location: string;
email: string;
hireable: string;
bio: string;
twitter_username: string;
public_repos: number;
public_gists: number;
followers: number;
following: number;
created_at: string;
updated_at: string;
}

View File

@ -1,6 +1,6 @@
{
"name": "@moduletrace/datasquirel",
"version": "5.7.32",
"version": "5.7.33",
"description": "Cloud-based SQL data management tool",
"main": "dist/index.js",
"bin": {