Compare commits
6 Commits
release/20
...
refactor/t
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ca6522f370 | ||
|
|
872623231f | ||
|
|
20ac35becb | ||
|
|
5eed5ce176 | ||
|
|
9694c0d373 | ||
|
|
293c93cc79 |
@@ -3,7 +3,9 @@
|
|||||||
"collection": "@nestjs/schematics",
|
"collection": "@nestjs/schematics",
|
||||||
"sourceRoot": "src",
|
"sourceRoot": "src",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"assets": [{ "include": "mailer/templates/**/*", "outDir": "dist" }],
|
"assets": [
|
||||||
|
"**/*.hbs"
|
||||||
|
],
|
||||||
"watchAssets": true
|
"watchAssets": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hoppscotch-backend",
|
"name": "hoppscotch-backend",
|
||||||
"version": "2024.3.2",
|
"version": "2024.3.1",
|
||||||
"description": "",
|
"description": "",
|
||||||
"author": "",
|
"author": "",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import {
|
|||||||
EMAIL_FAILED,
|
EMAIL_FAILED,
|
||||||
INVALID_EMAIL,
|
INVALID_EMAIL,
|
||||||
ONLY_ONE_ADMIN_ACCOUNT,
|
ONLY_ONE_ADMIN_ACCOUNT,
|
||||||
|
TEAM_INVALID_ID,
|
||||||
TEAM_INVITE_ALREADY_MEMBER,
|
TEAM_INVITE_ALREADY_MEMBER,
|
||||||
TEAM_INVITE_NO_INVITE_FOUND,
|
TEAM_INVITE_NO_INVITE_FOUND,
|
||||||
USERS_NOT_FOUND,
|
USERS_NOT_FOUND,
|
||||||
@@ -318,11 +319,11 @@ export class AdminService {
|
|||||||
const user = await this.userService.findUserByEmail(userEmail);
|
const user = await this.userService.findUserByEmail(userEmail);
|
||||||
if (O.isNone(user)) return E.left(USER_NOT_FOUND);
|
if (O.isNone(user)) return E.left(USER_NOT_FOUND);
|
||||||
|
|
||||||
const teamMember = await this.teamService.getTeamMemberTE(
|
const teamMember = await this.teamService.getTeamMember(
|
||||||
teamID,
|
teamID,
|
||||||
user.value.uid,
|
user.value.uid,
|
||||||
)();
|
);
|
||||||
if (E.isLeft(teamMember)) {
|
if (!teamMember) {
|
||||||
const addedUser = await this.teamService.addMemberToTeamWithEmail(
|
const addedUser = await this.teamService.addMemberToTeamWithEmail(
|
||||||
teamID,
|
teamID,
|
||||||
userEmail,
|
userEmail,
|
||||||
@@ -590,9 +591,9 @@ export class AdminService {
|
|||||||
* @returns an Either of `Team` or error
|
* @returns an Either of `Team` or error
|
||||||
*/
|
*/
|
||||||
async getTeamInfo(teamID: string) {
|
async getTeamInfo(teamID: string) {
|
||||||
const team = await this.teamService.getTeamWithIDTE(teamID)();
|
const team = await this.teamService.getTeamWithID(teamID);
|
||||||
if (E.isLeft(team)) return E.left(team.left);
|
if (!team) return E.left(TEAM_INVALID_ID);
|
||||||
return E.right(team.right);
|
return E.right(team);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -15,7 +15,11 @@ import * as TE from 'fp-ts/TaskEither';
|
|||||||
import * as E from 'fp-ts/Either';
|
import * as E from 'fp-ts/Either';
|
||||||
import * as O from 'fp-ts/Option';
|
import * as O from 'fp-ts/Option';
|
||||||
import { Team, TeamMember, TeamMemberRole } from 'src/team/team.model';
|
import { Team, TeamMember, TeamMemberRole } from 'src/team/team.model';
|
||||||
import { TEAM_INVITE_NO_INVITE_FOUND, USER_NOT_FOUND } from 'src/errors';
|
import {
|
||||||
|
TEAM_INVALID_ID,
|
||||||
|
TEAM_INVITE_NO_INVITE_FOUND,
|
||||||
|
USER_NOT_FOUND,
|
||||||
|
} from 'src/errors';
|
||||||
import { GqlUser } from 'src/decorators/gql-user.decorator';
|
import { GqlUser } from 'src/decorators/gql-user.decorator';
|
||||||
import { User } from 'src/user/user.model';
|
import { User } from 'src/user/user.model';
|
||||||
import { UseGuards } from '@nestjs/common';
|
import { UseGuards } from '@nestjs/common';
|
||||||
@@ -50,10 +54,9 @@ export class TeamInvitationResolver {
|
|||||||
description: 'Get the team associated to the invite',
|
description: 'Get the team associated to the invite',
|
||||||
})
|
})
|
||||||
async team(@Parent() teamInvitation: TeamInvitation): Promise<Team> {
|
async team(@Parent() teamInvitation: TeamInvitation): Promise<Team> {
|
||||||
return pipe(
|
const team = await this.teamService.getTeamWithID(teamInvitation.teamID);
|
||||||
this.teamService.getTeamWithIDTE(teamInvitation.teamID),
|
if (!team) throwErr(TEAM_INVALID_ID);
|
||||||
TE.getOrElse(throwErr),
|
return team;
|
||||||
)();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ResolveField(() => User, {
|
@ResolveField(() => User, {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import {
|
|||||||
} from '../errors';
|
} from '../errors';
|
||||||
import { mockDeep, mockReset } from 'jest-mock-extended';
|
import { mockDeep, mockReset } from 'jest-mock-extended';
|
||||||
import * as O from 'fp-ts/Option';
|
import * as O from 'fp-ts/Option';
|
||||||
|
import { skip } from 'rxjs';
|
||||||
|
|
||||||
const mockPrisma = mockDeep<PrismaService>();
|
const mockPrisma = mockDeep<PrismaService>();
|
||||||
|
|
||||||
@@ -755,6 +756,8 @@ describe('getMembersOfTeam', () => {
|
|||||||
|
|
||||||
expect(mockPrisma.teamMember.findMany).toHaveBeenCalledWith({
|
expect(mockPrisma.teamMember.findMany).toHaveBeenCalledWith({
|
||||||
take: 10,
|
take: 10,
|
||||||
|
skip: 0,
|
||||||
|
cursor: undefined,
|
||||||
where: {
|
where: {
|
||||||
teamID: team.id,
|
teamID: team.id,
|
||||||
},
|
},
|
||||||
@@ -806,6 +809,8 @@ describe('getTeamsOfUser', () => {
|
|||||||
|
|
||||||
expect(mockPrisma.teamMember.findMany).toHaveBeenCalledWith({
|
expect(mockPrisma.teamMember.findMany).toHaveBeenCalledWith({
|
||||||
take: 10,
|
take: 10,
|
||||||
|
skip: 0,
|
||||||
|
cursor: undefined,
|
||||||
where: {
|
where: {
|
||||||
userUid: dbTeamMember.userUid,
|
userUid: dbTeamMember.userUid,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import {
|
|||||||
} from '../errors';
|
} from '../errors';
|
||||||
import { PubSubService } from '../pubsub/pubsub.service';
|
import { PubSubService } from '../pubsub/pubsub.service';
|
||||||
import { flow, pipe } from 'fp-ts/function';
|
import { flow, pipe } from 'fp-ts/function';
|
||||||
import * as TE from 'fp-ts/TaskEither';
|
|
||||||
import * as TO from 'fp-ts/TaskOption';
|
import * as TO from 'fp-ts/TaskOption';
|
||||||
import * as O from 'fp-ts/Option';
|
import * as O from 'fp-ts/Option';
|
||||||
import * as E from 'fp-ts/Either';
|
import * as E from 'fp-ts/Either';
|
||||||
@@ -264,37 +263,25 @@ export class TeamService implements UserDataHandler, OnModuleInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getTeamsOfUser(uid: string, cursor: string | null): Promise<Team[]> {
|
async getTeamsOfUser(uid: string, cursor: string | null): Promise<Team[]> {
|
||||||
if (!cursor) {
|
const entries = await this.prisma.teamMember.findMany({
|
||||||
const entries = await this.prisma.teamMember.findMany({
|
take: 10,
|
||||||
take: 10,
|
skip: cursor ? 1 : 0,
|
||||||
where: {
|
cursor: cursor
|
||||||
userUid: uid,
|
? {
|
||||||
},
|
teamID_userUid: {
|
||||||
include: {
|
teamID: cursor,
|
||||||
team: true,
|
userUid: uid,
|
||||||
},
|
},
|
||||||
});
|
}
|
||||||
|
: undefined,
|
||||||
return entries.map((entry) => entry.team);
|
where: {
|
||||||
} else {
|
userUid: uid,
|
||||||
const entries = await this.prisma.teamMember.findMany({
|
},
|
||||||
take: 10,
|
include: {
|
||||||
skip: 1,
|
team: true,
|
||||||
cursor: {
|
},
|
||||||
teamID_userUid: {
|
});
|
||||||
teamID: cursor,
|
return entries.map((entry) => entry.team);
|
||||||
userUid: uid,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
where: {
|
|
||||||
userUid: uid,
|
|
||||||
},
|
|
||||||
include: {
|
|
||||||
team: true,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
return entries.map((entry) => entry.team);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getTeamWithID(teamID: string): Promise<Team | null> {
|
async getTeamWithID(teamID: string): Promise<Team | null> {
|
||||||
@@ -311,19 +298,6 @@ export class TeamService implements UserDataHandler, OnModuleInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getTeamWithIDTE(teamID: string): TE.TaskEither<'team/invalid_id', Team> {
|
|
||||||
return pipe(
|
|
||||||
() => this.getTeamWithID(teamID),
|
|
||||||
TE.fromTask,
|
|
||||||
TE.chain(
|
|
||||||
TE.fromPredicate(
|
|
||||||
(x): x is Team => !!x,
|
|
||||||
() => TEAM_INVALID_ID,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filters out team members that we weren't able to match
|
* Filters out team members that we weren't able to match
|
||||||
* (also deletes the membership)
|
* (also deletes the membership)
|
||||||
@@ -375,19 +349,6 @@ export class TeamService implements UserDataHandler, OnModuleInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getTeamMemberTE(teamID: string, userUid: string) {
|
|
||||||
return pipe(
|
|
||||||
() => this.getTeamMember(teamID, userUid),
|
|
||||||
TE.fromTask,
|
|
||||||
TE.chain(
|
|
||||||
TE.fromPredicate(
|
|
||||||
(x): x is TeamMember => !!x,
|
|
||||||
() => TEAM_MEMBER_NOT_FOUND,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
async getRoleOfUserInTeam(
|
async getRoleOfUserInTeam(
|
||||||
teamID: string,
|
teamID: string,
|
||||||
userUid: string,
|
userUid: string,
|
||||||
@@ -472,25 +433,12 @@ export class TeamService implements UserDataHandler, OnModuleInit {
|
|||||||
): Promise<TeamMember[]> {
|
): Promise<TeamMember[]> {
|
||||||
let teamMembers: DbTeamMember[];
|
let teamMembers: DbTeamMember[];
|
||||||
|
|
||||||
if (!cursor) {
|
teamMembers = await this.prisma.teamMember.findMany({
|
||||||
teamMembers = await this.prisma.teamMember.findMany({
|
take: 10,
|
||||||
take: 10,
|
skip: cursor ? 1 : 0,
|
||||||
where: {
|
cursor: cursor ? { id: cursor } : undefined,
|
||||||
teamID,
|
where: { teamID },
|
||||||
},
|
});
|
||||||
});
|
|
||||||
} else {
|
|
||||||
teamMembers = await this.prisma.teamMember.findMany({
|
|
||||||
take: 10,
|
|
||||||
skip: 1,
|
|
||||||
cursor: {
|
|
||||||
id: cursor,
|
|
||||||
},
|
|
||||||
where: {
|
|
||||||
teamID,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
const members = teamMembers.map(
|
const members = teamMembers.map(
|
||||||
(entry) =>
|
(entry) =>
|
||||||
|
|||||||
@@ -374,8 +374,7 @@
|
|||||||
"mutations": "Mutations",
|
"mutations": "Mutations",
|
||||||
"schema": "Schema",
|
"schema": "Schema",
|
||||||
"subscriptions": "Subscriptions",
|
"subscriptions": "Subscriptions",
|
||||||
"switch_connection": "Switch connection",
|
"switch_connection": "Switch connection"
|
||||||
"url_placeholder": "Enter a GraphQL endpoint URL"
|
|
||||||
},
|
},
|
||||||
"graphql_collections": {
|
"graphql_collections": {
|
||||||
"title": "GraphQL Collections"
|
"title": "GraphQL Collections"
|
||||||
@@ -599,7 +598,6 @@
|
|||||||
"title": "Request",
|
"title": "Request",
|
||||||
"type": "Request type",
|
"type": "Request type",
|
||||||
"url": "URL",
|
"url": "URL",
|
||||||
"url_placeholder": "Enter a URL or paste a cURL command",
|
|
||||||
"variables": "Variables",
|
"variables": "Variables",
|
||||||
"view_my_links": "View my links"
|
"view_my_links": "View my links"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -58,6 +58,24 @@
|
|||||||
"new": "Ajouter un nouveau",
|
"new": "Ajouter un nouveau",
|
||||||
"star": "Ajouter une étoile"
|
"star": "Ajouter une étoile"
|
||||||
},
|
},
|
||||||
|
"cookies": {
|
||||||
|
"modal": {
|
||||||
|
"new_domain_name": "Nouveau nom de domaine",
|
||||||
|
"set": "Définir un cookie",
|
||||||
|
"cookie_string": "Chaîne de caractères de cookie",
|
||||||
|
"enter_cookie_string": "Saisir la chaîne de caractères du cookie",
|
||||||
|
"cookie_name": "Nom",
|
||||||
|
"cookie_value": "Valeur",
|
||||||
|
"cookie_path": "Chemin d'accès",
|
||||||
|
"cookie_expires": "Expiration",
|
||||||
|
"managed_tab": "Gestion",
|
||||||
|
"raw_tab": "Brut",
|
||||||
|
"interceptor_no_support": "L'intercepteur que vous avez sélectionné ne prend pas en charge les cookies. Sélectionnez un autre intercepteur et réessayez.",
|
||||||
|
"empty_domains": "La liste des domaines est vide",
|
||||||
|
"empty_domain": "Le domaine est vide",
|
||||||
|
"no_cookies_in_domain": "Aucun cookie n'est défini pour ce domaine"
|
||||||
|
}
|
||||||
|
},
|
||||||
"app": {
|
"app": {
|
||||||
"chat_with_us": "Discuter avec nous",
|
"chat_with_us": "Discuter avec nous",
|
||||||
"contact_us": "Nous contacter",
|
"contact_us": "Nous contacter",
|
||||||
@@ -169,7 +187,7 @@
|
|||||||
},
|
},
|
||||||
"confirm": {
|
"confirm": {
|
||||||
"close_unsaved_tab": "Êtes-vous sûr de vouloir fermer cet onglet ?",
|
"close_unsaved_tab": "Êtes-vous sûr de vouloir fermer cet onglet ?",
|
||||||
"close_unsaved_tabs": "Êtes-vous sûr de vouloir fermer tous les onglets ? {count} onglets non enregistrés seront perdus",
|
"close_unsaved_tabs": "Êtes-vous sûr de vouloir fermer tous les onglets ? {Les onglets non enregistrés seront perdus.",
|
||||||
"exit_team": "Êtes-vous sûr de vouloir quitter cette équipe ?",
|
"exit_team": "Êtes-vous sûr de vouloir quitter cette équipe ?",
|
||||||
"logout": "Êtes-vous sûr de vouloir vous déconnecter?",
|
"logout": "Êtes-vous sûr de vouloir vous déconnecter?",
|
||||||
"remove_collection": "Voulez-vous vraiment supprimer définitivement cette collection ?",
|
"remove_collection": "Voulez-vous vraiment supprimer définitivement cette collection ?",
|
||||||
@@ -189,24 +207,6 @@
|
|||||||
"open_request_in_new_tab": "Ouvrir la demande dans un nouvel onglet",
|
"open_request_in_new_tab": "Ouvrir la demande dans un nouvel onglet",
|
||||||
"set_environment_variable": "Définir comme variable"
|
"set_environment_variable": "Définir comme variable"
|
||||||
},
|
},
|
||||||
"cookies": {
|
|
||||||
"modal": {
|
|
||||||
"new_domain_name": "Nouveau nom de domaine",
|
|
||||||
"set": "Définir un cookie",
|
|
||||||
"cookie_string": "Chaîne de caractères de cookie",
|
|
||||||
"enter_cookie_string": "Saisir la chaîne de caractères du cookie",
|
|
||||||
"cookie_name": "Nom",
|
|
||||||
"cookie_value": "Valeur",
|
|
||||||
"cookie_path": "Chemin d'accès",
|
|
||||||
"cookie_expires": "Expiration",
|
|
||||||
"managed_tab": "Gestion",
|
|
||||||
"raw_tab": "Brut",
|
|
||||||
"interceptor_no_support": "L'intercepteur que vous avez sélectionné ne prend pas en charge les cookies. Sélectionnez un autre intercepteur et réessayez.",
|
|
||||||
"empty_domains": "La liste des domaines est vide",
|
|
||||||
"empty_domain": "Le domaine est vide",
|
|
||||||
"no_cookies_in_domain": "Aucun cookie n'est défini pour ce domaine"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"count": {
|
"count": {
|
||||||
"header": "En-tête {count}",
|
"header": "En-tête {count}",
|
||||||
"message": "Message {compte}",
|
"message": "Message {compte}",
|
||||||
@@ -410,7 +410,7 @@
|
|||||||
"description": "Inspecter les erreurs possibles",
|
"description": "Inspecter les erreurs possibles",
|
||||||
"environment": {
|
"environment": {
|
||||||
"add_environment": "Ajouter à l'environnement",
|
"add_environment": "Ajouter à l'environnement",
|
||||||
"not_found": "La variable d'environnement “{environment}“ n'a pas été trouvée."
|
"not_found": "La variable d'environnement “{environnement}“ n'a pas été trouvée."
|
||||||
},
|
},
|
||||||
"header": {
|
"header": {
|
||||||
"cookie": "Le navigateur ne permet pas à Hoppscotch de définir l'en-tête Cookie. Pendant que nous travaillons sur l'application de bureau Hoppscotch (bientôt disponible), veuillez utiliser l'en-tête d'autorisation à la place."
|
"cookie": "Le navigateur ne permet pas à Hoppscotch de définir l'en-tête Cookie. Pendant que nous travaillons sur l'application de bureau Hoppscotch (bientôt disponible), veuillez utiliser l'en-tête d'autorisation à la place."
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@hoppscotch/common",
|
"name": "@hoppscotch/common",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "2024.3.2",
|
"version": "2024.3.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "pnpm exec npm-run-all -p -l dev:*",
|
"dev": "pnpm exec npm-run-all -p -l dev:*",
|
||||||
"test": "vitest --run",
|
"test": "vitest --run",
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
"axios": "1.6.2",
|
"axios": "1.6.2",
|
||||||
"buffer": "6.0.3",
|
"buffer": "6.0.3",
|
||||||
"cookie-es": "1.0.0",
|
"cookie-es": "1.0.0",
|
||||||
"dioc": "3.0.1",
|
"dioc": "1.0.1",
|
||||||
"esprima": "4.0.1",
|
"esprima": "4.0.1",
|
||||||
"events": "3.3.0",
|
"events": "3.3.0",
|
||||||
"fp-ts": "2.16.1",
|
"fp-ts": "2.16.1",
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ declare module 'vue' {
|
|||||||
AppSpotlightEntryRESTHistory: typeof import('./components/app/spotlight/entry/RESTHistory.vue')['default']
|
AppSpotlightEntryRESTHistory: typeof import('./components/app/spotlight/entry/RESTHistory.vue')['default']
|
||||||
AppSpotlightEntryRESTRequest: typeof import('./components/app/spotlight/entry/RESTRequest.vue')['default']
|
AppSpotlightEntryRESTRequest: typeof import('./components/app/spotlight/entry/RESTRequest.vue')['default']
|
||||||
AppSpotlightEntryRESTTeamRequestEntry: typeof import('./components/app/spotlight/entry/RESTTeamRequestEntry.vue')['default']
|
AppSpotlightEntryRESTTeamRequestEntry: typeof import('./components/app/spotlight/entry/RESTTeamRequestEntry.vue')['default']
|
||||||
AppSpotlightSearch: typeof import('./components/app/SpotlightSearch.vue')['default']
|
|
||||||
AppSupport: typeof import('./components/app/Support.vue')['default']
|
AppSupport: typeof import('./components/app/Support.vue')['default']
|
||||||
Collections: typeof import('./components/collections/index.vue')['default']
|
Collections: typeof import('./components/collections/index.vue')['default']
|
||||||
CollectionsAdd: typeof import('./components/collections/Add.vue')['default']
|
CollectionsAdd: typeof import('./components/collections/Add.vue')['default']
|
||||||
|
|||||||
@@ -54,7 +54,9 @@
|
|||||||
:key="tab.id"
|
:key="tab.id"
|
||||||
:label="tab.label"
|
:label="tab.label"
|
||||||
>
|
>
|
||||||
<div class="divide-y divide-dividerLight">
|
<div
|
||||||
|
class="divide-y divide-dividerLight rounded border border-divider"
|
||||||
|
>
|
||||||
<HoppSmartPlaceholder
|
<HoppSmartPlaceholder
|
||||||
v-if="tab.variables.length === 0"
|
v-if="tab.variables.length === 0"
|
||||||
:src="`/images/states/${colorMode.value}/blockchain.svg`"
|
:src="`/images/states/${colorMode.value}/blockchain.svg`"
|
||||||
|
|||||||
@@ -56,7 +56,9 @@
|
|||||||
:key="tab.id"
|
:key="tab.id"
|
||||||
:label="tab.label"
|
:label="tab.label"
|
||||||
>
|
>
|
||||||
<div class="divide-y divide-dividerLight">
|
<div
|
||||||
|
class="divide-y divide-dividerLight rounded border border-divider"
|
||||||
|
>
|
||||||
<HoppSmartPlaceholder
|
<HoppSmartPlaceholder
|
||||||
v-if="tab.variables.length === 0"
|
v-if="tab.variables.length === 0"
|
||||||
:src="`/images/states/${colorMode.value}/blockchain.svg`"
|
:src="`/images/states/${colorMode.value}/blockchain.svg`"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
class="w-full rounded border border-divider bg-primaryLight px-4 py-2 text-secondaryDark"
|
class="w-full rounded border border-divider bg-primaryLight px-4 py-2 text-secondaryDark"
|
||||||
:placeholder="`${t('graphql.url_placeholder')}`"
|
:placeholder="`${t('request.url')}`"
|
||||||
:disabled="connected"
|
:disabled="connected"
|
||||||
@keyup.enter="onConnectClick"
|
@keyup.enter="onConnectClick"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
>
|
>
|
||||||
<SmartEnvInput
|
<SmartEnvInput
|
||||||
v-model="tab.document.request.endpoint"
|
v-model="tab.document.request.endpoint"
|
||||||
:placeholder="`${t('request.url_placeholder')}`"
|
:placeholder="`${t('request.url')}`"
|
||||||
:auto-complete-source="userHistories"
|
:auto-complete-source="userHistories"
|
||||||
:auto-complete-env="true"
|
:auto-complete-env="true"
|
||||||
:inspection-results="tabResults"
|
:inspection-results="tabResults"
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ export class TeamSearchService extends Service {
|
|||||||
expandingCollections: Ref<string[]> = ref([])
|
expandingCollections: Ref<string[]> = ref([])
|
||||||
expandedCollections: Ref<string[]> = ref([])
|
expandedCollections: Ref<string[]> = ref([])
|
||||||
|
|
||||||
// TODO: ideally this should return the search results / formatted results instead of directly manipulating the result set
|
// FUTURE-TODO: ideally this should return the search results / formatted results instead of directly manipulating the result set
|
||||||
// eg: do the spotlight formatting in the spotlight searcher and not here
|
// eg: do the spotlight formatting in the spotlight searcher and not here
|
||||||
searchTeams = async (query: string, teamID: string) => {
|
searchTeams = async (query: string, teamID: string) => {
|
||||||
if (!query.length) {
|
if (!query.length) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { HoppModule } from "."
|
import { HoppModule } from "."
|
||||||
import { Container, ServiceClassInstance } from "dioc"
|
import { Container, Service } from "dioc"
|
||||||
import { diocPlugin } from "dioc/vue"
|
import { diocPlugin } from "dioc/vue"
|
||||||
import { DebugService } from "~/services/debug.service"
|
import { DebugService } from "~/services/debug.service"
|
||||||
import { platform } from "~/platform"
|
import { platform } from "~/platform"
|
||||||
@@ -22,7 +22,7 @@ if (import.meta.env.DEV) {
|
|||||||
* services. Please use `useService` if within components or try to convert your
|
* services. Please use `useService` if within components or try to convert your
|
||||||
* legacy subsystem into a service if possible.
|
* legacy subsystem into a service if possible.
|
||||||
*/
|
*/
|
||||||
export function getService<T extends ServiceClassInstance<any>>(
|
export function getService<T extends typeof Service<any> & { ID: string }>(
|
||||||
service: T
|
service: T
|
||||||
): InstanceType<T> {
|
): InstanceType<T> {
|
||||||
return serviceContainer.bind(service)
|
return serviceContainer.bind(service)
|
||||||
@@ -30,10 +30,11 @@ export function getService<T extends ServiceClassInstance<any>>(
|
|||||||
|
|
||||||
export default <HoppModule>{
|
export default <HoppModule>{
|
||||||
onVueAppInit(app) {
|
onVueAppInit(app) {
|
||||||
|
// TODO: look into this
|
||||||
|
// @ts-expect-error Something weird with Vue versions
|
||||||
app.use(diocPlugin, {
|
app.use(diocPlugin, {
|
||||||
container: serviceContainer,
|
container: serviceContainer,
|
||||||
})
|
})
|
||||||
|
|
||||||
for (const service of platform.addedServices ?? []) {
|
for (const service of platform.addedServices ?? []) {
|
||||||
serviceContainer.bind(service)
|
serviceContainer.bind(service)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,14 +8,14 @@ import { AnalyticsPlatformDef } from "./analytics"
|
|||||||
import { InterceptorsPlatformDef } from "./interceptors"
|
import { InterceptorsPlatformDef } from "./interceptors"
|
||||||
import { HoppModule } from "~/modules"
|
import { HoppModule } from "~/modules"
|
||||||
import { InspectorsPlatformDef } from "./inspectors"
|
import { InspectorsPlatformDef } from "./inspectors"
|
||||||
import { ServiceClassInstance } from "dioc"
|
import { Service } from "dioc"
|
||||||
import { IOPlatformDef } from "./io"
|
import { IOPlatformDef } from "./io"
|
||||||
import { SpotlightPlatformDef } from "./spotlight"
|
import { SpotlightPlatformDef } from "./spotlight"
|
||||||
|
|
||||||
export type PlatformDef = {
|
export type PlatformDef = {
|
||||||
ui?: UIPlatformDef
|
ui?: UIPlatformDef
|
||||||
addedHoppModules?: HoppModule[]
|
addedHoppModules?: HoppModule[]
|
||||||
addedServices?: Array<ServiceClassInstance<unknown>>
|
addedServices?: Array<typeof Service<unknown> & { ID: string }>
|
||||||
auth: AuthPlatformDef
|
auth: AuthPlatformDef
|
||||||
analytics?: AnalyticsPlatformDef
|
analytics?: AnalyticsPlatformDef
|
||||||
io: IOPlatformDef
|
io: IOPlatformDef
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Container, ServiceClassInstance } from "dioc"
|
import { Service } from "dioc"
|
||||||
import { Inspector } from "~/services/inspection"
|
import { Inspector } from "~/services/inspection"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -8,9 +8,8 @@ export type PlatformInspectorsDef = {
|
|||||||
// We are keeping this as the only mode for now
|
// We are keeping this as the only mode for now
|
||||||
// So that if we choose to add other modes, we can do without breaking
|
// So that if we choose to add other modes, we can do without breaking
|
||||||
type: "service"
|
type: "service"
|
||||||
// TODO: I don't think this type is effective, we have to come up with a better impl
|
service: typeof Service<unknown> & { ID: string } & {
|
||||||
service: ServiceClassInstance<unknown> & {
|
new (): Service & Inspector
|
||||||
new (c: Container): Inspector
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
import { Container, ServiceClassInstance } from "dioc"
|
import { Service } from "dioc"
|
||||||
import { Interceptor } from "~/services/interceptor.service"
|
import { Interceptor } from "~/services/interceptor.service"
|
||||||
|
|
||||||
export type PlatformInterceptorDef =
|
export type PlatformInterceptorDef =
|
||||||
| { type: "standalone"; interceptor: Interceptor }
|
| { type: "standalone"; interceptor: Interceptor }
|
||||||
| {
|
| {
|
||||||
type: "service"
|
type: "service"
|
||||||
// TODO: I don't think this type is effective, we have to come up with a better impl
|
service: typeof Service<unknown> & { ID: string } & {
|
||||||
service: ServiceClassInstance<unknown> & {
|
new (): Service & Interceptor
|
||||||
new (c: Container): Interceptor
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { Container, ServiceClassInstance } from "dioc"
|
import { Service } from "dioc"
|
||||||
import { SpotlightSearcher } from "~/services/spotlight"
|
import { SpotlightSearcher } from "~/services/spotlight"
|
||||||
|
|
||||||
export type SpotlightPlatformDef = {
|
export type SpotlightPlatformDef = {
|
||||||
additionalSearchers?: Array<
|
additionalSearchers?: Array<
|
||||||
ServiceClassInstance<unknown> & {
|
typeof Service<unknown> & { ID: string } & {
|
||||||
new (c: Container): SpotlightSearcher
|
new (): Service & SpotlightSearcher
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ export class ExtensionInspectorService extends Service implements Inspector {
|
|||||||
|
|
||||||
private readonly inspection = this.bind(InspectionService)
|
private readonly inspection = this.bind(InspectionService)
|
||||||
|
|
||||||
override onServiceInit() {
|
constructor() {
|
||||||
|
super()
|
||||||
|
|
||||||
this.inspection.registerInspector(this)
|
this.inspection.registerInspector(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -133,7 +133,9 @@ export class ExtensionInterceptorService
|
|||||||
|
|
||||||
public selectable = { type: "selectable" as const }
|
public selectable = { type: "selectable" as const }
|
||||||
|
|
||||||
override onServiceInit() {
|
constructor() {
|
||||||
|
super()
|
||||||
|
|
||||||
this.listenForExtensionStatus()
|
this.listenForExtensionStatus()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,9 @@ export class EnvironmentMenuService extends Service implements ContextMenu {
|
|||||||
|
|
||||||
private readonly contextMenu = this.bind(ContextMenuService)
|
private readonly contextMenu = this.bind(ContextMenuService)
|
||||||
|
|
||||||
override onServiceInit() {
|
constructor() {
|
||||||
|
super()
|
||||||
|
|
||||||
this.contextMenu.registerMenu(this)
|
this.contextMenu.registerMenu(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,9 @@ export class ParameterMenuService extends Service implements ContextMenu {
|
|||||||
|
|
||||||
private readonly contextMenu = this.bind(ContextMenuService)
|
private readonly contextMenu = this.bind(ContextMenuService)
|
||||||
|
|
||||||
override onServiceInit() {
|
constructor() {
|
||||||
|
super()
|
||||||
|
|
||||||
this.contextMenu.registerMenu(this)
|
this.contextMenu.registerMenu(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,9 @@ export class URLMenuService extends Service implements ContextMenu {
|
|||||||
private readonly contextMenu = this.bind(ContextMenuService)
|
private readonly contextMenu = this.bind(ContextMenuService)
|
||||||
private readonly restTab = this.bind(RESTTabService)
|
private readonly restTab = this.bind(RESTTabService)
|
||||||
|
|
||||||
override onServiceInit() {
|
constructor() {
|
||||||
|
super()
|
||||||
|
|
||||||
this.contextMenu.registerMenu(this)
|
this.contextMenu.registerMenu(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,10 @@ export class CookieJarService extends Service {
|
|||||||
*/
|
*/
|
||||||
public cookieJar = ref(new Map<string, string[]>())
|
public cookieJar = ref(new Map<string, string[]>())
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super()
|
||||||
|
}
|
||||||
|
|
||||||
public parseSetCookieString(setCookieString: string) {
|
public parseSetCookieString(setCookieString: string) {
|
||||||
return setCookieParse(setCookieString)
|
return setCookieParse(setCookieString)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,9 @@ import { Service } from "dioc"
|
|||||||
export class DebugService extends Service {
|
export class DebugService extends Service {
|
||||||
public static readonly ID = "DEBUG_SERVICE"
|
public static readonly ID = "DEBUG_SERVICE"
|
||||||
|
|
||||||
override onServiceInit() {
|
constructor() {
|
||||||
|
super()
|
||||||
|
|
||||||
console.log("DebugService is initialized...")
|
console.log("DebugService is initialized...")
|
||||||
|
|
||||||
const container = this.getContainer()
|
const container = this.getContainer()
|
||||||
|
|||||||
@@ -107,7 +107,9 @@ export class InspectionService extends Service {
|
|||||||
|
|
||||||
private readonly restTab = this.bind(RESTTabService)
|
private readonly restTab = this.bind(RESTTabService)
|
||||||
|
|
||||||
override onServiceInit() {
|
constructor() {
|
||||||
|
super()
|
||||||
|
|
||||||
this.initializeListeners()
|
this.initializeListeners()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,9 @@ export class EnvironmentInspectorService extends Service implements Inspector {
|
|||||||
}
|
}
|
||||||
)[0]
|
)[0]
|
||||||
|
|
||||||
override onServiceInit() {
|
constructor() {
|
||||||
|
super()
|
||||||
|
|
||||||
this.inspection.registerInspector(this)
|
this.inspection.registerInspector(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,9 @@ export class HeaderInspectorService extends Service implements Inspector {
|
|||||||
private readonly inspection = this.bind(InspectionService)
|
private readonly inspection = this.bind(InspectionService)
|
||||||
private readonly interceptorService = this.bind(InterceptorService)
|
private readonly interceptorService = this.bind(InterceptorService)
|
||||||
|
|
||||||
override onServiceInit() {
|
constructor() {
|
||||||
|
super()
|
||||||
|
|
||||||
this.inspection.registerInspector(this)
|
this.inspection.registerInspector(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,9 @@ export class ResponseInspectorService extends Service implements Inspector {
|
|||||||
|
|
||||||
private readonly inspection = this.bind(InspectionService)
|
private readonly inspection = this.bind(InspectionService)
|
||||||
|
|
||||||
override onServiceInit() {
|
constructor() {
|
||||||
|
super()
|
||||||
|
|
||||||
this.inspection.registerInspector(this)
|
this.inspection.registerInspector(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -178,7 +178,9 @@ export class InterceptorService extends Service {
|
|||||||
return this.interceptors.get(this.currentInterceptorID.value)
|
return this.interceptors.get(this.currentInterceptorID.value)
|
||||||
})
|
})
|
||||||
|
|
||||||
override onServiceInit() {
|
constructor() {
|
||||||
|
super()
|
||||||
|
|
||||||
// If the current interceptor is unselectable, select the first selectable one, else null
|
// If the current interceptor is unselectable, select the first selectable one, else null
|
||||||
watch([() => this.interceptors, this.currentInterceptorID], () => {
|
watch([() => this.interceptors, this.currentInterceptorID], () => {
|
||||||
if (!this.currentInterceptorID.value) return
|
if (!this.currentInterceptorID.value) return
|
||||||
|
|||||||
@@ -109,6 +109,10 @@ export class OauthAuthService extends Service {
|
|||||||
public static readonly ID = "OAUTH_AUTH_SERVICE"
|
public static readonly ID = "OAUTH_AUTH_SERVICE"
|
||||||
|
|
||||||
static redirectURI = `${window.location.origin}/oauth`
|
static redirectURI = `${window.location.origin}/oauth`
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const generateRandomString = () => {
|
export const generateRandomString = () => {
|
||||||
|
|||||||
@@ -89,6 +89,10 @@ export class PersistenceService extends Service {
|
|||||||
|
|
||||||
public hoppLocalConfigStorage: StorageLike = localStorage
|
public hoppLocalConfigStorage: StorageLike = localStorage
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super()
|
||||||
|
}
|
||||||
|
|
||||||
private showErrorToast(localStorageKey: string) {
|
private showErrorToast(localStorageKey: string) {
|
||||||
const toast = useToast()
|
const toast = useToast()
|
||||||
toast.error(
|
toast.error(
|
||||||
|
|||||||
@@ -27,6 +27,10 @@ export class SecretEnvironmentService extends Service {
|
|||||||
*/
|
*/
|
||||||
public secretEnvironments = reactive(new Map<string, SecretVariable[]>())
|
public secretEnvironments = reactive(new Map<string, SecretVariable[]>())
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super()
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a new secret environment.
|
* Add a new secret environment.
|
||||||
* @param id ID of the environment
|
* @param id ID of the environment
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import {
|
|||||||
import { nextTick, reactive, ref } from "vue"
|
import { nextTick, reactive, ref } from "vue"
|
||||||
import { SpotlightSearcherResult } from "../../.."
|
import { SpotlightSearcherResult } from "../../.."
|
||||||
import { TestContainer } from "dioc/testing"
|
import { TestContainer } from "dioc/testing"
|
||||||
import { Container } from "dioc"
|
|
||||||
|
|
||||||
async function flushPromises() {
|
async function flushPromises() {
|
||||||
return await new Promise((r) => setTimeout(r))
|
return await new Promise((r) => setTimeout(r))
|
||||||
@@ -33,15 +32,12 @@ describe("StaticSpotlightSearcherService", () => {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
// TODO: dioc > v3 does not recommend using constructors, move to onServiceInit
|
constructor() {
|
||||||
constructor(c: Container) {
|
super({
|
||||||
super(c, {
|
|
||||||
searchFields: ["text"],
|
searchFields: ["text"],
|
||||||
fieldWeights: {},
|
fieldWeights: {},
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
|
||||||
override onServiceInit() {
|
|
||||||
this.setDocuments(this.documents)
|
this.setDocuments(this.documents)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,15 +94,12 @@ describe("StaticSpotlightSearcherService", () => {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
// TODO: dioc > v3 does not recommend using constructors, move to onServiceInit
|
constructor() {
|
||||||
constructor(c: Container) {
|
super({
|
||||||
super(c, {
|
|
||||||
searchFields: ["text"],
|
searchFields: ["text"],
|
||||||
fieldWeights: {},
|
fieldWeights: {},
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
|
||||||
override onServiceInit() {
|
|
||||||
this.setDocuments(this.documents)
|
this.setDocuments(this.documents)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -166,15 +159,12 @@ describe("StaticSpotlightSearcherService", () => {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
// TODO: dioc > v3 does not recommend using constructors, move to onServiceInit
|
constructor() {
|
||||||
constructor(c: Container) {
|
super({
|
||||||
super(c, {
|
|
||||||
searchFields: ["text"],
|
searchFields: ["text"],
|
||||||
fieldWeights: {},
|
fieldWeights: {},
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
|
||||||
override onServiceInit() {
|
|
||||||
this.setDocuments(this.documents)
|
this.setDocuments(this.documents)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -234,15 +224,12 @@ describe("StaticSpotlightSearcherService", () => {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
// TODO: dioc > v3 does not recommend using constructors, move to onServiceInit
|
constructor() {
|
||||||
constructor(c: Container) {
|
super({
|
||||||
super(c, {
|
|
||||||
searchFields: ["text"],
|
searchFields: ["text"],
|
||||||
fieldWeights: {},
|
fieldWeights: {},
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
|
||||||
override onServiceInit() {
|
|
||||||
this.setDocuments(this.documents)
|
this.setDocuments(this.documents)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -298,15 +285,12 @@ describe("StaticSpotlightSearcherService", () => {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
// TODO: dioc > v3 does not recommend using constructors, move to onServiceInit
|
constructor() {
|
||||||
constructor(c: Container) {
|
super({
|
||||||
super(c, {
|
|
||||||
searchFields: ["text"],
|
searchFields: ["text"],
|
||||||
fieldWeights: {},
|
fieldWeights: {},
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
|
||||||
override onServiceInit() {
|
|
||||||
this.setDocuments(this.documents)
|
this.setDocuments(this.documents)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -370,15 +354,12 @@ describe("StaticSpotlightSearcherService", () => {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
// TODO: dioc > v3 does not recommend using constructors, move to onServiceInit
|
constructor() {
|
||||||
constructor(c: Container) {
|
super({
|
||||||
super(c, {
|
|
||||||
searchFields: ["text", "alternate"],
|
searchFields: ["text", "alternate"],
|
||||||
fieldWeights: {},
|
fieldWeights: {},
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
|
||||||
override onServiceInit() {
|
|
||||||
this.setDocuments(this.documents)
|
this.setDocuments(this.documents)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Container, Service } from "dioc"
|
import { Service } from "dioc"
|
||||||
import {
|
import {
|
||||||
type SpotlightSearcher,
|
type SpotlightSearcher,
|
||||||
type SpotlightSearcherResult,
|
type SpotlightSearcherResult,
|
||||||
@@ -67,12 +67,8 @@ export abstract class StaticSpotlightSearcherService<
|
|||||||
|
|
||||||
private _documents: Record<string, Doc> = {}
|
private _documents: Record<string, Doc> = {}
|
||||||
|
|
||||||
// TODO: This pattern is no longer recommended in dioc > 3, move to something else
|
constructor(private opts: StaticSpotlightSearcherOptions<Doc>) {
|
||||||
constructor(
|
super()
|
||||||
c: Container,
|
|
||||||
private opts: StaticSpotlightSearcherOptions<Doc>
|
|
||||||
) {
|
|
||||||
super(c)
|
|
||||||
|
|
||||||
this.minisearch = new MiniSearch({
|
this.minisearch = new MiniSearch({
|
||||||
fields: opts.searchFields as string[],
|
fields: opts.searchFields as string[],
|
||||||
|
|||||||
@@ -50,7 +50,9 @@ export class CollectionsSpotlightSearcherService
|
|||||||
private readonly spotlight = this.bind(SpotlightService)
|
private readonly spotlight = this.bind(SpotlightService)
|
||||||
private readonly workspaceService = this.bind(WorkspaceService)
|
private readonly workspaceService = this.bind(WorkspaceService)
|
||||||
|
|
||||||
override onServiceInit() {
|
constructor() {
|
||||||
|
super()
|
||||||
|
|
||||||
this.spotlight.registerSearcher(this)
|
this.spotlight.registerSearcher(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import IconEdit from "~icons/lucide/edit"
|
|||||||
import IconLayers from "~icons/lucide/layers"
|
import IconLayers from "~icons/lucide/layers"
|
||||||
import IconTrash2 from "~icons/lucide/trash-2"
|
import IconTrash2 from "~icons/lucide/trash-2"
|
||||||
|
|
||||||
import { Container, Service } from "dioc"
|
import { Service } from "dioc"
|
||||||
import * as TE from "fp-ts/TaskEither"
|
import * as TE from "fp-ts/TaskEither"
|
||||||
import { pipe } from "fp-ts/function"
|
import { pipe } from "fp-ts/function"
|
||||||
import { cloneDeep } from "lodash-es"
|
import { cloneDeep } from "lodash-es"
|
||||||
@@ -164,18 +164,15 @@ export class EnvironmentsSpotlightSearcherService extends StaticSpotlightSearche
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
// TODO: This pattern is no longer recommended in dioc > 3, move to something else
|
constructor() {
|
||||||
constructor(c: Container) {
|
super({
|
||||||
super(c, {
|
|
||||||
searchFields: ["text", "alternates"],
|
searchFields: ["text", "alternates"],
|
||||||
fieldWeights: {
|
fieldWeights: {
|
||||||
text: 2,
|
text: 2,
|
||||||
alternates: 1,
|
alternates: 1,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
|
||||||
override onServiceInit() {
|
|
||||||
this.setDocuments(this.documents)
|
this.setDocuments(this.documents)
|
||||||
this.spotlight.registerSearcher(this)
|
this.spotlight.registerSearcher(this)
|
||||||
}
|
}
|
||||||
@@ -280,7 +277,9 @@ export class SwitchEnvSpotlightSearcherService
|
|||||||
private readonly workspaceService = this.bind(WorkspaceService)
|
private readonly workspaceService = this.bind(WorkspaceService)
|
||||||
private teamEnvironmentList: TeamEnvironment[] = []
|
private teamEnvironmentList: TeamEnvironment[] = []
|
||||||
|
|
||||||
override onServiceInit() {
|
constructor() {
|
||||||
|
super()
|
||||||
|
|
||||||
this.spotlight.registerSearcher(this)
|
this.spotlight.registerSearcher(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import IconBook from "~icons/lucide/book"
|
|||||||
import IconLifeBuoy from "~icons/lucide/life-buoy"
|
import IconLifeBuoy from "~icons/lucide/life-buoy"
|
||||||
import IconZap from "~icons/lucide/zap"
|
import IconZap from "~icons/lucide/zap"
|
||||||
import { platform } from "~/platform"
|
import { platform } from "~/platform"
|
||||||
import { Container } from "dioc"
|
|
||||||
|
|
||||||
type Doc = {
|
type Doc = {
|
||||||
text: string | string[]
|
text: string | string[]
|
||||||
@@ -90,18 +89,15 @@ export class GeneralSpotlightSearcherService extends StaticSpotlightSearcherServ
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
// TODO: This is not recommended as of dioc > 3. Move to onServiceInit instead
|
constructor() {
|
||||||
constructor(c: Container) {
|
super({
|
||||||
super(c, {
|
|
||||||
searchFields: ["text", "alternates"],
|
searchFields: ["text", "alternates"],
|
||||||
fieldWeights: {
|
fieldWeights: {
|
||||||
text: 2,
|
text: 2,
|
||||||
alternates: 1,
|
alternates: 1,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
|
||||||
override onServiceInit() {
|
|
||||||
this.setDocuments(this.documents)
|
this.setDocuments(this.documents)
|
||||||
this.spotlight.registerSearcher(this)
|
this.spotlight.registerSearcher(this)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,7 +66,9 @@ export class HistorySpotlightSearcherService
|
|||||||
}
|
}
|
||||||
)[0]
|
)[0]
|
||||||
|
|
||||||
override onServiceInit() {
|
constructor() {
|
||||||
|
super()
|
||||||
|
|
||||||
this.spotlight.registerSearcher(this)
|
this.spotlight.registerSearcher(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ export class InterceptorSpotlightSearcherService
|
|||||||
private readonly spotlight = this.bind(SpotlightService)
|
private readonly spotlight = this.bind(SpotlightService)
|
||||||
private interceptorService = this.bind(InterceptorService)
|
private interceptorService = this.bind(InterceptorService)
|
||||||
|
|
||||||
override onServiceInit() {
|
constructor() {
|
||||||
|
super()
|
||||||
|
|
||||||
this.spotlight.registerSearcher(this)
|
this.spotlight.registerSearcher(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import {
|
|||||||
} from "./base/static.searcher"
|
} from "./base/static.searcher"
|
||||||
|
|
||||||
import IconShare from "~icons/lucide/share"
|
import IconShare from "~icons/lucide/share"
|
||||||
import { Container } from "dioc"
|
|
||||||
|
|
||||||
type Doc = {
|
type Doc = {
|
||||||
text: string
|
text: string
|
||||||
@@ -40,18 +39,15 @@ export class MiscellaneousSpotlightSearcherService extends StaticSpotlightSearch
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
// TODO: Constructors are no longer recommended as of dioc > 3, move to onServiceInit
|
constructor() {
|
||||||
constructor(c: Container) {
|
super({
|
||||||
super(c, {
|
|
||||||
searchFields: ["text", "alternates"],
|
searchFields: ["text", "alternates"],
|
||||||
fieldWeights: {
|
fieldWeights: {
|
||||||
text: 2,
|
text: 2,
|
||||||
alternates: 1,
|
alternates: 1,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
|
||||||
override onServiceInit() {
|
|
||||||
this.setDocuments(this.documents)
|
this.setDocuments(this.documents)
|
||||||
this.spotlight.registerSearcher(this)
|
this.spotlight.registerSearcher(this)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import {
|
|||||||
} from "./base/static.searcher"
|
} from "./base/static.searcher"
|
||||||
|
|
||||||
import IconArrowRight from "~icons/lucide/arrow-right"
|
import IconArrowRight from "~icons/lucide/arrow-right"
|
||||||
import { Container } from "dioc"
|
|
||||||
|
|
||||||
type Doc = {
|
type Doc = {
|
||||||
text: string
|
text: string
|
||||||
@@ -62,18 +61,15 @@ export class NavigationSpotlightSearcherService extends StaticSpotlightSearcherS
|
|||||||
|
|
||||||
private docKeys = Object.keys(this.documents)
|
private docKeys = Object.keys(this.documents)
|
||||||
|
|
||||||
// TODO: Constructors are no longer recommended as of dioc > 3, use onServiceInit instead
|
constructor() {
|
||||||
constructor(c: Container) {
|
super({
|
||||||
super(c, {
|
|
||||||
searchFields: ["text", "alternates"],
|
searchFields: ["text", "alternates"],
|
||||||
fieldWeights: {
|
fieldWeights: {
|
||||||
text: 2,
|
text: 2,
|
||||||
alternates: 1,
|
alternates: 1,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
|
||||||
override onServiceInit() {
|
|
||||||
this.setDocuments(this.documents)
|
this.setDocuments(this.documents)
|
||||||
this.spotlight.registerSearcher(this)
|
this.spotlight.registerSearcher(this)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ import IconRotateCCW from "~icons/lucide/rotate-ccw"
|
|||||||
import IconSave from "~icons/lucide/save"
|
import IconSave from "~icons/lucide/save"
|
||||||
import { GQLOptionTabs } from "~/components/graphql/RequestOptions.vue"
|
import { GQLOptionTabs } from "~/components/graphql/RequestOptions.vue"
|
||||||
import { RESTTabService } from "~/services/tab/rest"
|
import { RESTTabService } from "~/services/tab/rest"
|
||||||
import { Container } from "dioc"
|
|
||||||
|
|
||||||
type Doc = {
|
type Doc = {
|
||||||
text: string | string[]
|
text: string | string[]
|
||||||
@@ -225,18 +224,15 @@ export class RequestSpotlightSearcherService extends StaticSpotlightSearcherServ
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
// TODO: Constructors are no longer recommended as of dioc > 3, use onServiceInit instead
|
constructor() {
|
||||||
constructor(c: Container) {
|
super({
|
||||||
super(c, {
|
|
||||||
searchFields: ["text", "alternates"],
|
searchFields: ["text", "alternates"],
|
||||||
fieldWeights: {
|
fieldWeights: {
|
||||||
text: 2,
|
text: 2,
|
||||||
alternates: 1,
|
alternates: 1,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
|
||||||
override onServiceInit() {
|
|
||||||
this.setDocuments(this.documents)
|
this.setDocuments(this.documents)
|
||||||
this.spotlight.registerSearcher(this)
|
this.spotlight.registerSearcher(this)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import {
|
|||||||
|
|
||||||
import IconDownload from "~icons/lucide/download"
|
import IconDownload from "~icons/lucide/download"
|
||||||
import IconCopy from "~icons/lucide/copy"
|
import IconCopy from "~icons/lucide/copy"
|
||||||
import { Container } from "dioc"
|
|
||||||
|
|
||||||
type Doc = {
|
type Doc = {
|
||||||
text: string
|
text: string
|
||||||
@@ -57,18 +56,15 @@ export class ResponseSpotlightSearcherService extends StaticSpotlightSearcherSer
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
// TODO: Constructors are no longer recommended as of dioc > 3, move to onServiceInit
|
constructor() {
|
||||||
constructor(c: Container) {
|
super({
|
||||||
super(c, {
|
|
||||||
searchFields: ["text", "alternates"],
|
searchFields: ["text", "alternates"],
|
||||||
fieldWeights: {
|
fieldWeights: {
|
||||||
text: 2,
|
text: 2,
|
||||||
alternates: 1,
|
alternates: 1,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
|
||||||
override onServiceInit() {
|
|
||||||
this.setDocuments(this.documents)
|
this.setDocuments(this.documents)
|
||||||
this.spotlight.registerSearcher(this)
|
this.spotlight.registerSearcher(this)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import IconMonitor from "~icons/lucide/monitor"
|
|||||||
import IconMoon from "~icons/lucide/moon"
|
import IconMoon from "~icons/lucide/moon"
|
||||||
import IconSun from "~icons/lucide/sun"
|
import IconSun from "~icons/lucide/sun"
|
||||||
import IconCheckCircle from "~icons/lucide/check-circle"
|
import IconCheckCircle from "~icons/lucide/check-circle"
|
||||||
import { Container } from "dioc"
|
|
||||||
|
|
||||||
type Doc = {
|
type Doc = {
|
||||||
text: string | string[]
|
text: string | string[]
|
||||||
@@ -101,18 +100,15 @@ export class SettingsSpotlightSearcherService extends StaticSpotlightSearcherSer
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
// TODO: Constuctors are no longer recommended as of dioc > 3, move to onServiceInit
|
constructor() {
|
||||||
constructor(c: Container) {
|
super({
|
||||||
super(c, {
|
|
||||||
searchFields: ["text", "alternates"],
|
searchFields: ["text", "alternates"],
|
||||||
fieldWeights: {
|
fieldWeights: {
|
||||||
text: 2,
|
text: 2,
|
||||||
alternates: 1,
|
alternates: 1,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
|
||||||
override onServiceInit() {
|
|
||||||
this.setDocuments(this.documents)
|
this.setDocuments(this.documents)
|
||||||
this.spotlight.registerSearcher(this)
|
this.spotlight.registerSearcher(this)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import IconXSquare from "~icons/lucide/x-square"
|
|||||||
import { invokeAction } from "~/helpers/actions"
|
import { invokeAction } from "~/helpers/actions"
|
||||||
import { RESTTabService } from "~/services/tab/rest"
|
import { RESTTabService } from "~/services/tab/rest"
|
||||||
import { GQLTabService } from "~/services/tab/graphql"
|
import { GQLTabService } from "~/services/tab/graphql"
|
||||||
import { Container } from "dioc"
|
|
||||||
|
|
||||||
type Doc = {
|
type Doc = {
|
||||||
text: string | string[]
|
text: string | string[]
|
||||||
@@ -90,18 +89,15 @@ export class TabSpotlightSearcherService extends StaticSpotlightSearcherService<
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
// TODO: Constructors are no longer recommended as of dioc > 3, use onServiceInit instead
|
constructor() {
|
||||||
constructor(c: Container) {
|
super({
|
||||||
super(c, {
|
|
||||||
searchFields: ["text", "alternates"],
|
searchFields: ["text", "alternates"],
|
||||||
fieldWeights: {
|
fieldWeights: {
|
||||||
text: 2,
|
text: 2,
|
||||||
alternates: 1,
|
alternates: 1,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
|
||||||
override onServiceInit() {
|
|
||||||
this.setDocuments(this.documents)
|
this.setDocuments(this.documents)
|
||||||
this.spotlight.registerSearcher(this)
|
this.spotlight.registerSearcher(this)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,9 @@ export class TeamsSpotlightSearcherService
|
|||||||
|
|
||||||
private readonly tabs = this.bind(RESTTabService)
|
private readonly tabs = this.bind(RESTTabService)
|
||||||
|
|
||||||
override onServiceInit() {
|
constructor() {
|
||||||
|
super()
|
||||||
|
|
||||||
this.spotlight.registerSearcher(this)
|
this.spotlight.registerSearcher(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import { useStreamStatic } from "~/composables/stream"
|
|||||||
import IconLogin from "~icons/lucide/log-in"
|
import IconLogin from "~icons/lucide/log-in"
|
||||||
import IconLogOut from "~icons/lucide/log-out"
|
import IconLogOut from "~icons/lucide/log-out"
|
||||||
import { activeActions$, invokeAction } from "~/helpers/actions"
|
import { activeActions$, invokeAction } from "~/helpers/actions"
|
||||||
import { Container } from "dioc"
|
|
||||||
|
|
||||||
type Doc = {
|
type Doc = {
|
||||||
text: string
|
text: string
|
||||||
@@ -60,18 +59,15 @@ export class UserSpotlightSearcherService extends StaticSpotlightSearcherService
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
// TODO: Constructors are no longer recommended as of dioc > 3, move to onServiceInit
|
constructor() {
|
||||||
constructor(c: Container) {
|
super({
|
||||||
super(c, {
|
|
||||||
searchFields: ["text", "alternates"],
|
searchFields: ["text", "alternates"],
|
||||||
fieldWeights: {
|
fieldWeights: {
|
||||||
text: 2,
|
text: 2,
|
||||||
alternates: 1,
|
alternates: 1,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
|
||||||
override onServiceInit(): void {
|
|
||||||
this.setDocuments(this.documents)
|
this.setDocuments(this.documents)
|
||||||
this.spotlight.registerSearcher(this)
|
this.spotlight.registerSearcher(this)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import {
|
|||||||
StaticSpotlightSearcherService,
|
StaticSpotlightSearcherService,
|
||||||
} from "./base/static.searcher"
|
} from "./base/static.searcher"
|
||||||
|
|
||||||
import { Container, Service } from "dioc"
|
import { Service } from "dioc"
|
||||||
import * as E from "fp-ts/Either"
|
import * as E from "fp-ts/Either"
|
||||||
import MiniSearch from "minisearch"
|
import MiniSearch from "minisearch"
|
||||||
import IconCheckCircle from "~/components/app/spotlight/entry/IconSelected.vue"
|
import IconCheckCircle from "~/components/app/spotlight/entry/IconSelected.vue"
|
||||||
@@ -102,18 +102,15 @@ export class WorkspaceSpotlightSearcherService extends StaticSpotlightSearcherSe
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
// TODO: Constructors are no longer recommended as of dioc > 3, move to onServiceInit
|
constructor() {
|
||||||
constructor(c: Container) {
|
super({
|
||||||
super(c, {
|
|
||||||
searchFields: ["text", "alternates"],
|
searchFields: ["text", "alternates"],
|
||||||
fieldWeights: {
|
fieldWeights: {
|
||||||
text: 2,
|
text: 2,
|
||||||
alternates: 1,
|
alternates: 1,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
|
||||||
override onServiceInit() {
|
|
||||||
this.setDocuments(this.documents)
|
this.setDocuments(this.documents)
|
||||||
this.spotlight.registerSearcher(this)
|
this.spotlight.registerSearcher(this)
|
||||||
}
|
}
|
||||||
@@ -169,7 +166,9 @@ export class SwitchWorkspaceSpotlightSearcherService
|
|||||||
private readonly spotlight = this.bind(SpotlightService)
|
private readonly spotlight = this.bind(SpotlightService)
|
||||||
private readonly workspaceService = this.bind(WorkspaceService)
|
private readonly workspaceService = this.bind(WorkspaceService)
|
||||||
|
|
||||||
override onServiceInit() {
|
constructor() {
|
||||||
|
super()
|
||||||
|
|
||||||
this.spotlight.registerSearcher(this)
|
this.spotlight.registerSearcher(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,9 @@ import { reactive } from "vue"
|
|||||||
class MockTabService extends TabService<{ request: string }> {
|
class MockTabService extends TabService<{ request: string }> {
|
||||||
public static readonly ID = "MOCK_TAB_SERVICE"
|
public static readonly ID = "MOCK_TAB_SERVICE"
|
||||||
|
|
||||||
override onServiceInit() {
|
constructor() {
|
||||||
|
super()
|
||||||
|
|
||||||
this.tabMap = reactive(
|
this.tabMap = reactive(
|
||||||
new Map([
|
new Map([
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -3,15 +3,12 @@ import { getDefaultGQLRequest } from "~/helpers/graphql/default"
|
|||||||
import { HoppGQLDocument, HoppGQLSaveContext } from "~/helpers/graphql/document"
|
import { HoppGQLDocument, HoppGQLSaveContext } from "~/helpers/graphql/document"
|
||||||
import { TabService } from "./tab"
|
import { TabService } from "./tab"
|
||||||
import { computed } from "vue"
|
import { computed } from "vue"
|
||||||
import { Container } from "dioc"
|
|
||||||
|
|
||||||
export class GQLTabService extends TabService<HoppGQLDocument> {
|
export class GQLTabService extends TabService<HoppGQLDocument> {
|
||||||
public static readonly ID = "GQL_TAB_SERVICE"
|
public static readonly ID = "GQL_TAB_SERVICE"
|
||||||
|
|
||||||
// TODO: Moving this to `onServiceInit` breaks `persistableTabState`
|
constructor() {
|
||||||
// Figure out how to fix this
|
super()
|
||||||
constructor(c: Container) {
|
|
||||||
super(c)
|
|
||||||
|
|
||||||
this.tabMap.set("test", {
|
this.tabMap.set("test", {
|
||||||
id: "test",
|
id: "test",
|
||||||
|
|||||||
@@ -3,15 +3,12 @@ import { computed } from "vue"
|
|||||||
import { getDefaultRESTRequest } from "~/helpers/rest/default"
|
import { getDefaultRESTRequest } from "~/helpers/rest/default"
|
||||||
import { HoppRESTDocument, HoppRESTSaveContext } from "~/helpers/rest/document"
|
import { HoppRESTDocument, HoppRESTSaveContext } from "~/helpers/rest/document"
|
||||||
import { TabService } from "./tab"
|
import { TabService } from "./tab"
|
||||||
import { Container } from "dioc"
|
|
||||||
|
|
||||||
export class RESTTabService extends TabService<HoppRESTDocument> {
|
export class RESTTabService extends TabService<HoppRESTDocument> {
|
||||||
public static readonly ID = "REST_TAB_SERVICE"
|
public static readonly ID = "REST_TAB_SERVICE"
|
||||||
|
|
||||||
// TODO: Moving this to `onServiceInit` breaks `persistableTabState`
|
constructor() {
|
||||||
// Figure out how to fix this
|
super()
|
||||||
constructor(c: Container) {
|
|
||||||
super(c)
|
|
||||||
|
|
||||||
this.tabMap.set("test", {
|
this.tabMap.set("test", {
|
||||||
id: "test",
|
id: "test",
|
||||||
|
|||||||
@@ -48,7 +48,8 @@ export class WorkspaceService extends Service<WorkspaceServiceEvent> {
|
|||||||
-1
|
-1
|
||||||
)
|
)
|
||||||
|
|
||||||
override onServiceInit() {
|
constructor() {
|
||||||
|
super()
|
||||||
// Dispose the managed team list adapter when the user logs out
|
// Dispose the managed team list adapter when the user logs out
|
||||||
// and initialize it when the user logs in
|
// and initialize it when the user logs in
|
||||||
watch(
|
watch(
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@hoppscotch/selfhost-desktop",
|
"name": "@hoppscotch/selfhost-desktop",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "2024.3.2",
|
"version": "2024.3.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev:vite": "vite",
|
"dev:vite": "vite",
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
"@vueuse/core": "10.5.0",
|
"@vueuse/core": "10.5.0",
|
||||||
"axios": "0.21.4",
|
"axios": "0.21.4",
|
||||||
"buffer": "6.0.3",
|
"buffer": "6.0.3",
|
||||||
"dioc": "3.0.1",
|
"dioc": "1.0.1",
|
||||||
"environments.api": "link:@platform/environments/environments.api",
|
"environments.api": "link:@platform/environments/environments.api",
|
||||||
"event": "link:@tauri-apps/api/event",
|
"event": "link:@tauri-apps/api/event",
|
||||||
"fp-ts": "2.16.1",
|
"fp-ts": "2.16.1",
|
||||||
@@ -78,4 +78,4 @@
|
|||||||
"vite-plugin-vue-layouts": "0.7.0",
|
"vite-plugin-vue-layouts": "0.7.0",
|
||||||
"vue-tsc": "1.8.8"
|
"vue-tsc": "1.8.8"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1260,7 +1260,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hoppscotch-desktop"
|
name = "hoppscotch-desktop"
|
||||||
version = "24.3.2"
|
version = "24.3.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cocoa 0.25.0",
|
"cocoa 0.25.0",
|
||||||
"hex_color",
|
"hex_color",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "hoppscotch-desktop"
|
name = "hoppscotch-desktop"
|
||||||
version = "24.3.2"
|
version = "24.3.0"
|
||||||
description = "A Tauri App"
|
description = "A Tauri App"
|
||||||
authors = ["you"]
|
authors = ["you"]
|
||||||
license = ""
|
license = ""
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
},
|
},
|
||||||
"package": {
|
"package": {
|
||||||
"productName": "Hoppscotch",
|
"productName": "Hoppscotch",
|
||||||
"version": "24.3.2"
|
"version": "24.3.1"
|
||||||
},
|
},
|
||||||
"tauri": {
|
"tauri": {
|
||||||
"allowlist": {
|
"allowlist": {
|
||||||
|
|||||||
@@ -138,6 +138,10 @@ export class NativeInterceptorService extends Service implements Interceptor {
|
|||||||
|
|
||||||
public cookieJarService = this.bind(CookieJarService)
|
public cookieJarService = this.bind(CookieJarService)
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super()
|
||||||
|
}
|
||||||
|
|
||||||
public runRequest(req: any) {
|
public runRequest(req: any) {
|
||||||
const processedReq = preProcessRequest(req)
|
const processedReq = preProcessRequest(req)
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@hoppscotch/selfhost-web",
|
"name": "@hoppscotch/selfhost-web",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "2024.3.2",
|
"version": "2024.3.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev:vite": "vite",
|
"dev:vite": "vite",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "hoppscotch-sh-admin",
|
"name": "hoppscotch-sh-admin",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "2024.3.2",
|
"version": "2024.3.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "pnpm exec npm-run-all -p -l dev:*",
|
"dev": "pnpm exec npm-run-all -p -l dev:*",
|
||||||
|
|||||||
65
pnpm-lock.yaml
generated
65
pnpm-lock.yaml
generated
@@ -455,8 +455,8 @@ importers:
|
|||||||
specifier: 1.0.0
|
specifier: 1.0.0
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
dioc:
|
dioc:
|
||||||
specifier: 3.0.1
|
specifier: 1.0.1
|
||||||
version: 3.0.1(vue@3.3.9(typescript@5.3.2))
|
version: 1.0.1(vue@3.3.9(typescript@5.3.2))
|
||||||
esprima:
|
esprima:
|
||||||
specifier: 4.0.1
|
specifier: 4.0.1
|
||||||
version: 4.0.1
|
version: 4.0.1
|
||||||
@@ -923,8 +923,8 @@ importers:
|
|||||||
specifier: 6.0.3
|
specifier: 6.0.3
|
||||||
version: 6.0.3
|
version: 6.0.3
|
||||||
dioc:
|
dioc:
|
||||||
specifier: 3.0.1
|
specifier: 1.0.1
|
||||||
version: 3.0.1(vue@3.3.9(typescript@4.9.5))
|
version: 1.0.1(vue@3.3.9(typescript@4.9.5))
|
||||||
environments.api:
|
environments.api:
|
||||||
specifier: link:@platform/environments/environments.api
|
specifier: link:@platform/environments/environments.api
|
||||||
version: link:@platform/environments/environments.api
|
version: link:@platform/environments/environments.api
|
||||||
@@ -3511,10 +3511,6 @@ packages:
|
|||||||
resolution: {integrity: sha512-4ttr/FNO29w+kBbU7HZ/U0Lzuh2cRDhP8UlWOtV9ERcjHzuyXVZmjyleESK6eVP60tGC9QtQW9yZE+JeRhDHkg==}
|
resolution: {integrity: sha512-4ttr/FNO29w+kBbU7HZ/U0Lzuh2cRDhP8UlWOtV9ERcjHzuyXVZmjyleESK6eVP60tGC9QtQW9yZE+JeRhDHkg==}
|
||||||
engines: {node: '>= 14'}
|
engines: {node: '>= 14'}
|
||||||
|
|
||||||
'@intlify/message-compiler@10.0.0-alpha.2':
|
|
||||||
resolution: {integrity: sha512-OGwttsMwB2BUzhZLraoAfAqcza5UyLMEU013ort3LbmdE6ke/pFONFyxjNQdmFWzW2K868AIVgwx4zo8lbmhjg==}
|
|
||||||
engines: {node: '>= 16'}
|
|
||||||
|
|
||||||
'@intlify/message-compiler@9.2.2':
|
'@intlify/message-compiler@9.2.2':
|
||||||
resolution: {integrity: sha512-IUrQW7byAKN2fMBe8z6sK6riG1pue95e5jfokn8hA5Q3Bqy4MBJ5lJAofUsawQJYHeoPJ7svMDyBaVJ4d0GTtA==}
|
resolution: {integrity: sha512-IUrQW7byAKN2fMBe8z6sK6riG1pue95e5jfokn8hA5Q3Bqy4MBJ5lJAofUsawQJYHeoPJ7svMDyBaVJ4d0GTtA==}
|
||||||
engines: {node: '>= 14'}
|
engines: {node: '>= 14'}
|
||||||
@@ -3523,12 +3519,12 @@ packages:
|
|||||||
resolution: {integrity: sha512-hwqQXyTnDzAVZ300SU31jO0+3OJbpOdfVU6iBkrmNpS7t2HRnVACo0EwcEXzJa++4EVDreqz5OeqJbt+PeSGGA==}
|
resolution: {integrity: sha512-hwqQXyTnDzAVZ300SU31jO0+3OJbpOdfVU6iBkrmNpS7t2HRnVACo0EwcEXzJa++4EVDreqz5OeqJbt+PeSGGA==}
|
||||||
engines: {node: '>= 16'}
|
engines: {node: '>= 16'}
|
||||||
|
|
||||||
'@intlify/message-compiler@9.8.0':
|
'@intlify/message-compiler@9.4.1':
|
||||||
resolution: {integrity: sha512-McnYWhcoYmDJvssVu6QGR0shqlkJuL1HHdi5lK7fNqvQqRYaQ4lSLjYmZxwc8tRNMdIe9/KUKfyPxU9M6yCtNQ==}
|
resolution: {integrity: sha512-aN2N+dUx320108QhH51Ycd2LEpZ+NKbzyQ2kjjhqMcxhHdxtOnkgdx+MDBhOy/CObwBmhC3Nygzc6hNlfKvPNw==}
|
||||||
engines: {node: '>= 16'}
|
engines: {node: '>= 16'}
|
||||||
|
|
||||||
'@intlify/shared@10.0.0-alpha.2':
|
'@intlify/message-compiler@9.8.0':
|
||||||
resolution: {integrity: sha512-pWlpsC3IqkDuIH/5bNlyyiUbAXYymeNXkznORzPWT3qpAe8MazPOm14wMHGn/wESCdB5b9txQson4+CH0ym1hQ==}
|
resolution: {integrity: sha512-McnYWhcoYmDJvssVu6QGR0shqlkJuL1HHdi5lK7fNqvQqRYaQ4lSLjYmZxwc8tRNMdIe9/KUKfyPxU9M6yCtNQ==}
|
||||||
engines: {node: '>= 16'}
|
engines: {node: '>= 16'}
|
||||||
|
|
||||||
'@intlify/shared@9.2.2':
|
'@intlify/shared@9.2.2':
|
||||||
@@ -3539,6 +3535,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-RucSPqh8O9FFxlYUysQTerSw0b9HIRpyoN1Zjogpm0qLiHK+lBNSa5sh1nCJ4wSsNcjphzgpLQCyR60GZlRV8g==}
|
resolution: {integrity: sha512-RucSPqh8O9FFxlYUysQTerSw0b9HIRpyoN1Zjogpm0qLiHK+lBNSa5sh1nCJ4wSsNcjphzgpLQCyR60GZlRV8g==}
|
||||||
engines: {node: '>= 16'}
|
engines: {node: '>= 16'}
|
||||||
|
|
||||||
|
'@intlify/shared@9.4.1':
|
||||||
|
resolution: {integrity: sha512-A51elBmZWf1FS80inf/32diO9DeXoqg9GR9aUDHFcfHoNDuT46Q+fpPOdj8jiJnSHSBh8E1E+6qWRhAZXdK3Ng==}
|
||||||
|
engines: {node: '>= 16'}
|
||||||
|
|
||||||
'@intlify/shared@9.8.0':
|
'@intlify/shared@9.8.0':
|
||||||
resolution: {integrity: sha512-TmgR0RCLjzrSo+W3wT0ALf9851iFMlVI9EYNGeWvZFUQTAJx0bvfsMlPdgVtV1tDNRiAfhkFsMKu6jtUY1ZLKQ==}
|
resolution: {integrity: sha512-TmgR0RCLjzrSo+W3wT0ALf9851iFMlVI9EYNGeWvZFUQTAJx0bvfsMlPdgVtV1tDNRiAfhkFsMKu6jtUY1ZLKQ==}
|
||||||
engines: {node: '>= 16'}
|
engines: {node: '>= 16'}
|
||||||
@@ -6457,8 +6457,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==}
|
resolution: {integrity: sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==}
|
||||||
engines: {node: '>=0.3.1'}
|
engines: {node: '>=0.3.1'}
|
||||||
|
|
||||||
dioc@3.0.1:
|
dioc@1.0.1:
|
||||||
resolution: {integrity: sha512-LawhI08/B5f5sA6zqrNdtZY9URCjIzmebKVZhmR8lH05HFlx/spAoz4kJ7x1E6pRf/kvWsePSkudv18OR5FT6Q==}
|
resolution: {integrity: sha512-G3T8ThO2WehWJFrKp687wpXU//WLueJA6t5L7yirhWN/jn7BFNRKwskbJn0LEEd6gqI6rwiQE48f2Zqt5jvYVw==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
vue: 3.3.9
|
vue: 3.3.9
|
||||||
peerDependenciesMeta:
|
peerDependenciesMeta:
|
||||||
@@ -9163,8 +9163,8 @@ packages:
|
|||||||
no-case@3.0.4:
|
no-case@3.0.4:
|
||||||
resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==}
|
resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==}
|
||||||
|
|
||||||
node-abi@3.57.0:
|
node-abi@3.60.0:
|
||||||
resolution: {integrity: sha512-Dp+A9JWxRaKuHP35H77I4kCKesDy5HUDEmScia2FyncMTOXASMyg251F5PhFoDA5uqBrDDffiLpbqnrZmNXW+g==}
|
resolution: {integrity: sha512-zcGgwoXbzw9NczqbGzAWL/ToDYAxv1V8gL1D67ClbdkIfeeDBbY0GelZtC25ayLvVjr2q2cloHeQV1R0QAWqRQ==}
|
||||||
engines: {node: '>=10'}
|
engines: {node: '>=10'}
|
||||||
|
|
||||||
node-abort-controller@3.1.1:
|
node-abort-controller@3.1.1:
|
||||||
@@ -12132,7 +12132,6 @@ packages:
|
|||||||
|
|
||||||
workbox-google-analytics@7.0.0:
|
workbox-google-analytics@7.0.0:
|
||||||
resolution: {integrity: sha512-MEYM1JTn/qiC3DbpvP2BVhyIH+dV/5BjHk756u9VbwuAhu0QHyKscTnisQuz21lfRpOwiS9z4XdqeVAKol0bzg==}
|
resolution: {integrity: sha512-MEYM1JTn/qiC3DbpvP2BVhyIH+dV/5BjHk756u9VbwuAhu0QHyKscTnisQuz21lfRpOwiS9z4XdqeVAKol0bzg==}
|
||||||
deprecated: It is not compatible with newer versions of GA starting with v4, as long as you are using GAv3 it should be ok, but the package is not longer being maintained
|
|
||||||
|
|
||||||
workbox-navigation-preload@7.0.0:
|
workbox-navigation-preload@7.0.0:
|
||||||
resolution: {integrity: sha512-juWCSrxo/fiMz3RsvDspeSLGmbgC0U9tKqcUPZBCf35s64wlaLXyn2KdHHXVQrb2cqF7I0Hc9siQalainmnXJA==}
|
resolution: {integrity: sha512-juWCSrxo/fiMz3RsvDspeSLGmbgC0U9tKqcUPZBCf35s64wlaLXyn2KdHHXVQrb2cqF7I0Hc9siQalainmnXJA==}
|
||||||
@@ -15445,8 +15444,8 @@ snapshots:
|
|||||||
|
|
||||||
'@intlify/bundle-utils@3.4.0(vue-i18n@9.8.0(vue@3.3.9(typescript@5.3.2)))':
|
'@intlify/bundle-utils@3.4.0(vue-i18n@9.8.0(vue@3.3.9(typescript@5.3.2)))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@intlify/message-compiler': 10.0.0-alpha.2
|
'@intlify/message-compiler': 9.4.1
|
||||||
'@intlify/shared': 10.0.0-alpha.2
|
'@intlify/shared': 9.4.1
|
||||||
jsonc-eslint-parser: 1.4.1
|
jsonc-eslint-parser: 1.4.1
|
||||||
source-map: 0.6.1
|
source-map: 0.6.1
|
||||||
yaml-eslint-parser: 0.3.2
|
yaml-eslint-parser: 0.3.2
|
||||||
@@ -15499,11 +15498,6 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@intlify/shared': 9.2.2
|
'@intlify/shared': 9.2.2
|
||||||
|
|
||||||
'@intlify/message-compiler@10.0.0-alpha.2':
|
|
||||||
dependencies:
|
|
||||||
'@intlify/shared': 10.0.0-alpha.2
|
|
||||||
source-map-js: 1.0.2
|
|
||||||
|
|
||||||
'@intlify/message-compiler@9.2.2':
|
'@intlify/message-compiler@9.2.2':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@intlify/shared': 9.2.2
|
'@intlify/shared': 9.2.2
|
||||||
@@ -15514,17 +15508,22 @@ snapshots:
|
|||||||
'@intlify/shared': 9.3.0-beta.20
|
'@intlify/shared': 9.3.0-beta.20
|
||||||
source-map-js: 1.0.2
|
source-map-js: 1.0.2
|
||||||
|
|
||||||
|
'@intlify/message-compiler@9.4.1':
|
||||||
|
dependencies:
|
||||||
|
'@intlify/shared': 9.4.1
|
||||||
|
source-map-js: 1.0.2
|
||||||
|
|
||||||
'@intlify/message-compiler@9.8.0':
|
'@intlify/message-compiler@9.8.0':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@intlify/shared': 9.8.0
|
'@intlify/shared': 9.8.0
|
||||||
source-map-js: 1.0.2
|
source-map-js: 1.0.2
|
||||||
|
|
||||||
'@intlify/shared@10.0.0-alpha.2': {}
|
|
||||||
|
|
||||||
'@intlify/shared@9.2.2': {}
|
'@intlify/shared@9.2.2': {}
|
||||||
|
|
||||||
'@intlify/shared@9.3.0-beta.20': {}
|
'@intlify/shared@9.3.0-beta.20': {}
|
||||||
|
|
||||||
|
'@intlify/shared@9.4.1': {}
|
||||||
|
|
||||||
'@intlify/shared@9.8.0': {}
|
'@intlify/shared@9.8.0': {}
|
||||||
|
|
||||||
'@intlify/unplugin-vue-i18n@1.2.0(rollup@3.29.4)(vue-i18n@9.2.2(vue@3.3.9(typescript@4.9.3)))':
|
'@intlify/unplugin-vue-i18n@1.2.0(rollup@3.29.4)(vue-i18n@9.2.2(vue@3.3.9(typescript@4.9.3)))':
|
||||||
@@ -15550,7 +15549,7 @@ snapshots:
|
|||||||
'@intlify/vite-plugin-vue-i18n@6.0.1(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.27.0))(vue-i18n@9.8.0(vue@3.3.9(typescript@4.9.5)))':
|
'@intlify/vite-plugin-vue-i18n@6.0.1(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.27.0))(vue-i18n@9.8.0(vue@3.3.9(typescript@4.9.5)))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@intlify/bundle-utils': 7.0.0(vue-i18n@9.8.0(vue@3.3.9(typescript@4.9.5)))
|
'@intlify/bundle-utils': 7.0.0(vue-i18n@9.8.0(vue@3.3.9(typescript@4.9.5)))
|
||||||
'@intlify/shared': 10.0.0-alpha.2
|
'@intlify/shared': 9.4.1
|
||||||
'@rollup/pluginutils': 4.2.1
|
'@rollup/pluginutils': 4.2.1
|
||||||
debug: 4.3.4(supports-color@9.2.2)
|
debug: 4.3.4(supports-color@9.2.2)
|
||||||
fast-glob: 3.3.2
|
fast-glob: 3.3.2
|
||||||
@@ -15564,7 +15563,7 @@ snapshots:
|
|||||||
'@intlify/vite-plugin-vue-i18n@7.0.0(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.27.0))(vue-i18n@9.8.0(vue@3.3.9(typescript@5.3.2)))':
|
'@intlify/vite-plugin-vue-i18n@7.0.0(vite@4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.27.0))(vue-i18n@9.8.0(vue@3.3.9(typescript@5.3.2)))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@intlify/bundle-utils': 3.4.0(vue-i18n@9.8.0(vue@3.3.9(typescript@5.3.2)))
|
'@intlify/bundle-utils': 3.4.0(vue-i18n@9.8.0(vue@3.3.9(typescript@5.3.2)))
|
||||||
'@intlify/shared': 10.0.0-alpha.2
|
'@intlify/shared': 9.4.1
|
||||||
'@rollup/pluginutils': 4.2.1
|
'@rollup/pluginutils': 4.2.1
|
||||||
debug: 4.3.4(supports-color@9.2.2)
|
debug: 4.3.4(supports-color@9.2.2)
|
||||||
fast-glob: 3.3.2
|
fast-glob: 3.3.2
|
||||||
@@ -16674,7 +16673,7 @@ snapshots:
|
|||||||
|
|
||||||
'@types/graceful-fs@4.1.5':
|
'@types/graceful-fs@4.1.5':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/node': 17.0.45
|
'@types/node': 18.18.8
|
||||||
|
|
||||||
'@types/har-format@1.2.15': {}
|
'@types/har-format@1.2.15': {}
|
||||||
|
|
||||||
@@ -19341,13 +19340,13 @@ snapshots:
|
|||||||
|
|
||||||
diff@5.0.0: {}
|
diff@5.0.0: {}
|
||||||
|
|
||||||
dioc@3.0.1(vue@3.3.9(typescript@4.9.5)):
|
dioc@1.0.1(vue@3.3.9(typescript@4.9.5)):
|
||||||
dependencies:
|
dependencies:
|
||||||
rxjs: 7.8.1
|
rxjs: 7.8.1
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
vue: 3.3.9(typescript@4.9.5)
|
vue: 3.3.9(typescript@4.9.5)
|
||||||
|
|
||||||
dioc@3.0.1(vue@3.3.9(typescript@5.3.2)):
|
dioc@1.0.1(vue@3.3.9(typescript@5.3.2)):
|
||||||
dependencies:
|
dependencies:
|
||||||
rxjs: 7.8.1
|
rxjs: 7.8.1
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
@@ -23233,7 +23232,7 @@ snapshots:
|
|||||||
lower-case: 2.0.2
|
lower-case: 2.0.2
|
||||||
tslib: 2.6.2
|
tslib: 2.6.2
|
||||||
|
|
||||||
node-abi@3.57.0:
|
node-abi@3.60.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
semver: 7.6.0
|
semver: 7.6.0
|
||||||
|
|
||||||
@@ -23809,7 +23808,7 @@ snapshots:
|
|||||||
minimist: 1.2.6
|
minimist: 1.2.6
|
||||||
mkdirp-classic: 0.5.3
|
mkdirp-classic: 0.5.3
|
||||||
napi-build-utils: 1.0.2
|
napi-build-utils: 1.0.2
|
||||||
node-abi: 3.57.0
|
node-abi: 3.60.0
|
||||||
pump: 3.0.0
|
pump: 3.0.0
|
||||||
rc: 1.2.8
|
rc: 1.2.8
|
||||||
simple-get: 4.0.1
|
simple-get: 4.0.1
|
||||||
|
|||||||
Reference in New Issue
Block a user