Compare commits
9 Commits
fix/shared
...
release/20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cd371fc9d4 | ||
|
|
59fef248c0 | ||
|
|
286fcd2bb0 | ||
|
|
b2d98f7b66 | ||
|
|
c6c220091a | ||
|
|
8f503479b6 | ||
|
|
54d8378ccf | ||
|
|
0df194f9c5 | ||
|
|
ddf7eb6ad6 |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hoppscotch-backend",
|
||||
"version": "2023.12.0-1",
|
||||
"version": "2023.12.2",
|
||||
"description": "",
|
||||
"author": "",
|
||||
"private": true,
|
||||
|
||||
@@ -28,6 +28,13 @@ export const JSON_INVALID = 'json_invalid';
|
||||
*/
|
||||
export const AUTH_PROVIDER_NOT_SPECIFIED = 'auth/provider_not_specified';
|
||||
|
||||
/**
|
||||
* Auth Provider not specified
|
||||
* (Auth)
|
||||
*/
|
||||
export const AUTH_PROVIDER_NOT_CONFIGURED =
|
||||
'auth/provider_not_configured_correctly';
|
||||
|
||||
/**
|
||||
* Environment variable "VITE_ALLOWED_AUTH_PROVIDERS" is not present in .env file
|
||||
*/
|
||||
|
||||
@@ -1,10 +1,33 @@
|
||||
import { AuthProvider } from 'src/auth/helper';
|
||||
import { AUTH_PROVIDER_NOT_CONFIGURED } from 'src/errors';
|
||||
import { PrismaService } from 'src/prisma/prisma.service';
|
||||
import { InfraConfigEnum } from 'src/types/InfraConfig';
|
||||
import { throwErr } from 'src/utils';
|
||||
|
||||
export enum ServiceStatus {
|
||||
ENABLE = 'ENABLE',
|
||||
DISABLE = 'DISABLE',
|
||||
}
|
||||
|
||||
const AuthProviderConfigurations = {
|
||||
[AuthProvider.GOOGLE]: [
|
||||
InfraConfigEnum.GOOGLE_CLIENT_ID,
|
||||
InfraConfigEnum.GOOGLE_CLIENT_SECRET,
|
||||
],
|
||||
[AuthProvider.GITHUB]: [
|
||||
InfraConfigEnum.GITHUB_CLIENT_ID,
|
||||
InfraConfigEnum.GITHUB_CLIENT_SECRET,
|
||||
],
|
||||
[AuthProvider.MICROSOFT]: [
|
||||
InfraConfigEnum.MICROSOFT_CLIENT_ID,
|
||||
InfraConfigEnum.MICROSOFT_CLIENT_SECRET,
|
||||
],
|
||||
[AuthProvider.EMAIL]: [
|
||||
InfraConfigEnum.MAILER_SMTP_URL,
|
||||
InfraConfigEnum.MAILER_ADDRESS_FROM,
|
||||
],
|
||||
};
|
||||
|
||||
/**
|
||||
* Load environment variables from the database and set them in the process
|
||||
*
|
||||
@@ -42,3 +65,42 @@ export function stopApp() {
|
||||
process.kill(process.pid, 'SIGTERM');
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the configured SSO providers
|
||||
* @returns Array of configured SSO providers
|
||||
*/
|
||||
export function getConfiguredSSOProviders() {
|
||||
const allowedAuthProviders: string[] =
|
||||
process.env.VITE_ALLOWED_AUTH_PROVIDERS.split(',');
|
||||
let configuredAuthProviders: string[] = [];
|
||||
|
||||
const addProviderIfConfigured = (provider) => {
|
||||
const configParameters: string[] = AuthProviderConfigurations[provider];
|
||||
|
||||
const isConfigured = configParameters.every((configParameter) => {
|
||||
return process.env[configParameter];
|
||||
});
|
||||
|
||||
if (isConfigured) configuredAuthProviders.push(provider);
|
||||
};
|
||||
|
||||
allowedAuthProviders.forEach((provider) => addProviderIfConfigured(provider));
|
||||
|
||||
if (configuredAuthProviders.length === 0) {
|
||||
throwErr(AUTH_PROVIDER_NOT_CONFIGURED);
|
||||
} else if (allowedAuthProviders.length !== configuredAuthProviders.length) {
|
||||
const unConfiguredAuthProviders = allowedAuthProviders.filter(
|
||||
(provider) => {
|
||||
return !configuredAuthProviders.includes(provider);
|
||||
},
|
||||
);
|
||||
console.log(
|
||||
`${unConfiguredAuthProviders.join(
|
||||
',',
|
||||
)} SSO auth provider(s) are not configured properly. Do configure them from Admin Dashboard.`,
|
||||
);
|
||||
}
|
||||
|
||||
return configuredAuthProviders.join(',');
|
||||
}
|
||||
|
||||
@@ -17,9 +17,9 @@ import {
|
||||
INFRA_CONFIG_UPDATE_FAILED,
|
||||
INFRA_CONFIG_SERVICE_NOT_CONFIGURED,
|
||||
} from 'src/errors';
|
||||
import { throwErr, validateEmail, validateSMTPUrl } from 'src/utils';
|
||||
import { throwErr, validateSMTPEmail, validateSMTPUrl } from 'src/utils';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
import { ServiceStatus, stopApp } from './helper';
|
||||
import { ServiceStatus, getConfiguredSSOProviders, stopApp } from './helper';
|
||||
import { EnableAndDisableSSOArgs, InfraConfigArgs } from './input-args';
|
||||
import { AuthProvider } from 'src/auth/helper';
|
||||
|
||||
@@ -71,7 +71,7 @@ export class InfraConfigService implements OnModuleInit {
|
||||
},
|
||||
{
|
||||
name: InfraConfigEnum.VITE_ALLOWED_AUTH_PROVIDERS,
|
||||
value: process.env.VITE_ALLOWED_AUTH_PROVIDERS.toLocaleUpperCase(),
|
||||
value: getConfiguredSSOProviders(),
|
||||
},
|
||||
];
|
||||
|
||||
@@ -130,6 +130,19 @@ export class InfraConfigService implements OnModuleInit {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all the InfraConfigs as map
|
||||
* @returns InfraConfig map
|
||||
*/
|
||||
async getInfraConfigsMap() {
|
||||
const infraConfigs = await this.prisma.infraConfig.findMany();
|
||||
const infraConfigMap: Record<string, string> = {};
|
||||
infraConfigs.forEach((config) => {
|
||||
infraConfigMap[config.name] = config.value;
|
||||
});
|
||||
return infraConfigMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update InfraConfig by name
|
||||
* @param name Name of the InfraConfig
|
||||
@@ -187,30 +200,24 @@ export class InfraConfigService implements OnModuleInit {
|
||||
/**
|
||||
* Check if the service is configured or not
|
||||
* @param service Service can be Auth Provider, Mailer, Audit Log etc.
|
||||
* @param configMap Map of all the infra configs
|
||||
* @returns Either true or false
|
||||
*/
|
||||
isServiceConfigured(service: AuthProvider) {
|
||||
isServiceConfigured(
|
||||
service: AuthProvider,
|
||||
configMap: Record<string, string>,
|
||||
) {
|
||||
switch (service) {
|
||||
case AuthProvider.GOOGLE:
|
||||
return (
|
||||
this.configService.get<string>('INFRA.GOOGLE_CLIENT_ID') &&
|
||||
this.configService.get<string>('INFRA.GOOGLE_CLIENT_SECRET')
|
||||
);
|
||||
return configMap.GOOGLE_CLIENT_ID && configMap.GOOGLE_CLIENT_SECRET;
|
||||
case AuthProvider.GITHUB:
|
||||
return (
|
||||
this.configService.get<string>('INFRA.GITHUB_CLIENT_ID') &&
|
||||
!this.configService.get<string>('INFRA.GITHUB_CLIENT_SECRET')
|
||||
);
|
||||
return configMap.GITHUB_CLIENT_ID && configMap.GITHUB_CLIENT_SECRET;
|
||||
case AuthProvider.MICROSOFT:
|
||||
return (
|
||||
this.configService.get<string>('INFRA.MICROSOFT_CLIENT_ID') &&
|
||||
!this.configService.get<string>('INFRA.MICROSOFT_CLIENT_SECRET')
|
||||
configMap.MICROSOFT_CLIENT_ID && configMap.MICROSOFT_CLIENT_SECRET
|
||||
);
|
||||
case AuthProvider.EMAIL:
|
||||
return (
|
||||
this.configService.get<string>('INFRA.MAILER_SMTP_URL') &&
|
||||
this.configService.get<string>('INFRA.MAILER_ADDRESS_FROM')
|
||||
);
|
||||
return configMap.MAILER_SMTP_URL && configMap.MAILER_ADDRESS_FROM;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
@@ -229,11 +236,11 @@ export class InfraConfigService implements OnModuleInit {
|
||||
|
||||
let updatedAuthProviders = allowedAuthProviders;
|
||||
|
||||
for (let i = 0; i < providerInfo.length; i++) {
|
||||
const { provider, status } = providerInfo[i];
|
||||
const infraConfigMap = await this.getInfraConfigsMap();
|
||||
|
||||
providerInfo.forEach(({ provider, status }) => {
|
||||
if (status === ServiceStatus.ENABLE) {
|
||||
const isConfigured = this.isServiceConfigured(provider);
|
||||
const isConfigured = this.isServiceConfigured(provider, infraConfigMap);
|
||||
if (!isConfigured) {
|
||||
throwErr(INFRA_CONFIG_SERVICE_NOT_CONFIGURED);
|
||||
}
|
||||
@@ -243,7 +250,7 @@ export class InfraConfigService implements OnModuleInit {
|
||||
(p) => p !== provider,
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
updatedAuthProviders = [...new Set(updatedAuthProviders)];
|
||||
|
||||
@@ -342,7 +349,7 @@ export class InfraConfigService implements OnModuleInit {
|
||||
if (!isValidUrl) return E.left(INFRA_CONFIG_INVALID_INPUT);
|
||||
break;
|
||||
case InfraConfigEnumForClient.MAILER_ADDRESS_FROM:
|
||||
const isValidEmail = validateEmail(infraConfigs[i].value);
|
||||
const isValidEmail = validateSMTPEmail(infraConfigs[i].value);
|
||||
if (!isValidEmail) return E.left(INFRA_CONFIG_INVALID_INPUT);
|
||||
break;
|
||||
case InfraConfigEnumForClient.GOOGLE_CLIENT_ID:
|
||||
|
||||
@@ -17,7 +17,8 @@ async function bootstrap() {
|
||||
console.log(`Port: ${configService.get('PORT')}`);
|
||||
|
||||
checkEnvironmentAuthProvider(
|
||||
configService.get('VITE_ALLOWED_AUTH_PROVIDERS'),
|
||||
configService.get('INFRA.VITE_ALLOWED_AUTH_PROVIDERS') ??
|
||||
configService.get('VITE_ALLOWED_AUTH_PROVIDERS'),
|
||||
);
|
||||
|
||||
app.use(
|
||||
|
||||
@@ -131,6 +131,28 @@ export const validateEmail = (email: string) => {
|
||||
).test(email);
|
||||
};
|
||||
|
||||
// Regular expressions for supported address object formats by nodemailer
|
||||
// check out for more info https://nodemailer.com/message/addresses
|
||||
const emailRegex1 = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
||||
const emailRegex2 =
|
||||
/^[\w\s]* <([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})>$/;
|
||||
const emailRegex3 =
|
||||
/^"[\w\s]+" <([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})>$/;
|
||||
|
||||
/**
|
||||
* Checks to see if the SMTP email is valid or not
|
||||
* @param email
|
||||
* @returns A Boolean depending on the format of the email
|
||||
*/
|
||||
export const validateSMTPEmail = (email: string) => {
|
||||
// Check if the input matches any of the formats
|
||||
return (
|
||||
emailRegex1.test(email) ||
|
||||
emailRegex2.test(email) ||
|
||||
emailRegex3.test(email)
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Checks to see if the URL is valid or not
|
||||
* @param url The URL to validate
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hoppscotch/cli",
|
||||
"version": "0.5.0",
|
||||
"version": "0.5.1",
|
||||
"description": "A CLI to run Hoppscotch test scripts in CI environments.",
|
||||
"homepage": "https://hoppscotch.io",
|
||||
"main": "dist/index.js",
|
||||
|
||||
@@ -118,6 +118,15 @@ describe("Test 'hopp test <file> --env <file>' command:", () => {
|
||||
const { error } = await runCLI(args);
|
||||
expect(error).toBeNull();
|
||||
});
|
||||
|
||||
test("Correctly resolves environment variables referenced in the request body", async () => {
|
||||
const COLL_PATH = getTestJsonFilePath("req-body-env-vars-coll.json");
|
||||
const ENVS_PATH = getTestJsonFilePath("req-body-env-vars-envs.json");
|
||||
const args = `test ${COLL_PATH} --env ${ENVS_PATH}`;
|
||||
|
||||
const { error } = await runCLI(args);
|
||||
expect(error).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
describe("Test 'hopp test <file> --delay <delay_in_ms>' command:", () => {
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"v": 2,
|
||||
"name": "Test environment variables in request body",
|
||||
"folders": [],
|
||||
"requests": [
|
||||
{
|
||||
"v": "1",
|
||||
"name": "test-request",
|
||||
"endpoint": "https://echo.hoppscotch.io",
|
||||
"method": "POST",
|
||||
"headers": [],
|
||||
"params": [],
|
||||
"auth": {
|
||||
"authType": "none",
|
||||
"authActive": true
|
||||
},
|
||||
"body": {
|
||||
"contentType": "application/json",
|
||||
"body": "{\n \"firstName\": \"<<firstName>>\",\n \"lastName\": \"<<lastName>>\",\n \"greetText\": \"<<salutation>>, <<fullName>>\",\n \"fullName\": \"<<fullName>>\",\n \"id\": \"<<id>>\"\n}"
|
||||
},
|
||||
"preRequestScript": "",
|
||||
"testScript": "pw.test(\"Status code is 200\", ()=> {\n pw.expect(pw.response.status).toBe(200);\n});\n\npw.test(\"Successfully resolves environments recursively\", ()=> {\n pw.expect(pw.env.getResolve(\"recursiveVarX\")).toBe(\"Hello\")\n pw.expect(pw.env.getResolve(\"recursiveVarY\")).toBe(\"Hello\")\n pw.expect(pw.env.getResolve(\"salutation\")).toBe(\"Hello\")\n});\n\npw.test(\"Successfully resolves environments referenced in the request body\", () => {\n const expectedId = \"7\"\n const expectedFirstName = \"John\"\n const expectedLastName = \"Doe\"\n const expectedFullName = `${expectedFirstName} ${expectedLastName}`\n const expectedGreetText = `Hello, ${expectedFullName}`\n\n pw.expect(pw.env.getResolve(\"recursiveVarX\")).toBe(\"Hello\")\n pw.expect(pw.env.getResolve(\"recursiveVarY\")).toBe(\"Hello\")\n pw.expect(pw.env.getResolve(\"salutation\")).toBe(\"Hello\")\n\n const { id, firstName, lastName, fullName, greetText } = JSON.parse(pw.response.body.data)\n\n pw.expect(id).toBe(expectedId)\n pw.expect(expectedFirstName).toBe(firstName)\n pw.expect(expectedLastName).toBe(lastName)\n pw.expect(fullName).toBe(expectedFullName)\n pw.expect(greetText).toBe(expectedGreetText)\n});"
|
||||
}
|
||||
],
|
||||
"auth": {
|
||||
"authType": "none",
|
||||
"authActive": true
|
||||
},
|
||||
"headers": []
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"name": "Response body sample",
|
||||
"variables": [
|
||||
{
|
||||
"key": "firstName",
|
||||
"value": "John"
|
||||
},
|
||||
{
|
||||
"key": "lastName",
|
||||
"value": "Doe"
|
||||
},
|
||||
{
|
||||
"key": "id",
|
||||
"value": "7"
|
||||
},
|
||||
{
|
||||
"key": "fullName",
|
||||
"value": "<<firstName>> <<lastName>>"
|
||||
},
|
||||
{
|
||||
"key": "recursiveVarX",
|
||||
"value": "<<recursiveVarY>>"
|
||||
},
|
||||
{
|
||||
"key": "recursiveVarY",
|
||||
"value": "<<salutation>>"
|
||||
},
|
||||
{
|
||||
"key": "salutation",
|
||||
"value": "Hello"
|
||||
},
|
||||
{
|
||||
"key": "greetText",
|
||||
"value": "<<salutation>> <<fullName>>"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -22,12 +22,10 @@ export const trimAnsi = (target: string) => {
|
||||
|
||||
export const getErrorCode = (out: string) => {
|
||||
const ansiTrimmedStr = trimAnsi(out);
|
||||
|
||||
return ansiTrimmedStr.split(" ")[0];
|
||||
};
|
||||
|
||||
export const getTestJsonFilePath = (file: string) => {
|
||||
const filePath = `${process.cwd()}/src/__tests__/samples/${file}`;
|
||||
|
||||
const filePath = resolve(__dirname, `../../src/__tests__/samples/${file}`);
|
||||
return filePath;
|
||||
};
|
||||
|
||||
@@ -37,8 +37,7 @@ export async function parseEnvsData(path: string) {
|
||||
envPairs.push({ key, value });
|
||||
}
|
||||
} else if (HoppEnvExportObjectResult.success) {
|
||||
const { key, value } = HoppEnvExportObjectResult.data.variables[0];
|
||||
envPairs.push({ key, value });
|
||||
envPairs.push(...HoppEnvExportObjectResult.data.variables);
|
||||
}
|
||||
|
||||
return <HoppEnvs>{ global: [], selected: envPairs };
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@hoppscotch/common",
|
||||
"private": true,
|
||||
"version": "2023.12.0-1",
|
||||
"version": "2023.12.2",
|
||||
"scripts": {
|
||||
"dev": "pnpm exec npm-run-all -p -l dev:*",
|
||||
"test": "vitest --run",
|
||||
|
||||
@@ -124,6 +124,8 @@
|
||||
E.isRight(pendingInvites.data) &&
|
||||
pendingInvites.data.right.team?.teamInvitations.length === 0
|
||||
"
|
||||
:src="`/images/states/${colorMode.value}/add_group.svg`"
|
||||
:alt="t('empty.pending_invites')"
|
||||
:text="t('empty.pending_invites')"
|
||||
/>
|
||||
<div
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
v-if="props.showCount && props.teamMembers.length > maxMembersSoftLimit"
|
||||
v-tippy="{ theme: 'tooltip', allowHTML: true }"
|
||||
:title="remainingSlicedMembers"
|
||||
class="font- text-8px z-10 inline-flex h-5 w-5 cursor-pointer items-center justify-center rounded-full bg-dividerDark text-secondaryDark ring-2 ring-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-primaryDark"
|
||||
class="text-[8px] z-10 inline-flex h-5 w-5 cursor-pointer items-center justify-center rounded-full bg-dividerDark text-secondaryDark ring-2 ring-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-primaryDark"
|
||||
tabindex="0"
|
||||
@click="handleClick()"
|
||||
>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</HoppSmartPlaceholder>
|
||||
<div v-else-if="!loading" class="flex flex-col">
|
||||
<div
|
||||
class="sticky -top-2 top-0 z-10 mb-2 flex items-center justify-between bg-popover py-2 pl-2"
|
||||
class="sticky top-0 z-10 mb-2 flex items-center justify-between bg-popover py-2 pl-2"
|
||||
>
|
||||
<div class="flex items-center px-2 font-semibold text-secondaryLight">
|
||||
{{ t("team.title") }}
|
||||
|
||||
@@ -1,13 +1,24 @@
|
||||
import * as O from "fp-ts/Option"
|
||||
import { flow } from "fp-ts/function"
|
||||
|
||||
type SafeParseJSON = {
|
||||
(str: string, convertToArray: true): O.Option<Array<unknown>>
|
||||
(str: string, convertToArray?: false): O.Option<Record<string, unknown>>
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks and Parses JSON string
|
||||
* @param str Raw JSON data to be parsed
|
||||
* @returns Option type with some(JSON data) or none
|
||||
*/
|
||||
export const safeParseJSON = (str: string): O.Option<object> =>
|
||||
O.tryCatch(() => JSON.parse(str))
|
||||
export const safeParseJSON: SafeParseJSON = (str, convertToArray = false) =>
|
||||
O.tryCatch(() => {
|
||||
const data = JSON.parse(str)
|
||||
if (convertToArray) {
|
||||
return Array.isArray(data) ? data : [data]
|
||||
}
|
||||
return data
|
||||
})
|
||||
|
||||
/**
|
||||
* Checks if given string is a JSON string
|
||||
|
||||
@@ -18,7 +18,7 @@ const hoppEnvSchema = z.object({
|
||||
})
|
||||
|
||||
export const hoppEnvImporter = (content: string) => {
|
||||
const parsedContent = safeParseJSON(content)
|
||||
const parsedContent = safeParseJSON(content, true)
|
||||
|
||||
// parse json from the environments string
|
||||
if (O.isNone(parsedContent)) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@hoppscotch/selfhost-desktop",
|
||||
"private": true,
|
||||
"version": "2023.12.0-1",
|
||||
"version": "2023.12.2",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev:vite": "vite",
|
||||
@@ -76,8 +76,6 @@
|
||||
"vite-plugin-pwa": "^0.13.1",
|
||||
"vite-plugin-static-copy": "^0.12.0",
|
||||
"vite-plugin-vue-layouts": "^0.7.0",
|
||||
"vite-plugin-windicss": "^1.8.8",
|
||||
"vue-tsc": "^1.0.11",
|
||||
"windicss": "^3.5.6"
|
||||
"vue-tsc": "^1.0.11"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "hoppscotch-desktop"
|
||||
version = "23.12.0-1"
|
||||
version = "23.12.2"
|
||||
description = "A Tauri App"
|
||||
authors = ["you"]
|
||||
license = ""
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
},
|
||||
"package": {
|
||||
"productName": "Hoppscotch",
|
||||
"version": "23.12.0-1"
|
||||
"version": "23.12.2"
|
||||
},
|
||||
"tauri": {
|
||||
"allowlist": {
|
||||
|
||||
@@ -8,7 +8,6 @@ import VueI18n from "@intlify/vite-plugin-vue-i18n"
|
||||
import Components from "unplugin-vue-components/vite"
|
||||
import Icons from "unplugin-icons/vite"
|
||||
import Inspect from "vite-plugin-inspect"
|
||||
import WindiCSS from "vite-plugin-windicss"
|
||||
import { VitePWA } from "vite-plugin-pwa"
|
||||
import Pages from "vite-plugin-pages"
|
||||
import Layouts from "vite-plugin-vue-layouts"
|
||||
@@ -105,9 +104,6 @@ export default defineConfig({
|
||||
compositionOnly: true,
|
||||
include: [path.resolve(__dirname, "locales")],
|
||||
}),
|
||||
WindiCSS({
|
||||
root: path.resolve(__dirname, "../hoppscotch-common"),
|
||||
}),
|
||||
Components({
|
||||
dts: "../hoppscotch-common/src/components.d.ts",
|
||||
dirs: [
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@hoppscotch/selfhost-web",
|
||||
"private": true,
|
||||
"version": "2023.12.0-1",
|
||||
"version": "2023.12.2",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev:vite": "vite",
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
## **Built with**
|
||||
|
||||
- [HTML](https://developer.mozilla.org/en-US/docs/Web/HTML)
|
||||
- [CSS](https://developer.mozilla.org/en-US/docs/Web/CSS), [SCSS](https://sass-lang.com), [Windi CSS](https://windicss.org)
|
||||
- [CSS](https://developer.mozilla.org/en-US/docs/Web/CSS), [SCSS](https://sass-lang.com), [Tailwind CSS](https://tailwindcss.com)
|
||||
- [JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript)
|
||||
- [TypeScript](https://www.typescriptlang.org)
|
||||
- [Vue](https://vuejs.org)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "hoppscotch-sh-admin",
|
||||
"private": true,
|
||||
"version": "2023.12.0-1",
|
||||
"version": "2023.12.2",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "pnpm exec npm-run-all -p -l dev:*",
|
||||
|
||||
114
pnpm-lock.yaml
generated
114
pnpm-lock.yaml
generated
@@ -1063,15 +1063,9 @@ importers:
|
||||
vite-plugin-vue-layouts:
|
||||
specifier: ^0.7.0
|
||||
version: 0.7.0(vite@4.5.0)(vue-router@4.2.5)(vue@3.3.9)
|
||||
vite-plugin-windicss:
|
||||
specifier: ^1.8.8
|
||||
version: 1.9.1(vite@4.5.0)
|
||||
vue-tsc:
|
||||
specifier: ^1.0.11
|
||||
version: 1.8.8(typescript@4.9.5)
|
||||
windicss:
|
||||
specifier: ^3.5.6
|
||||
version: 3.5.6
|
||||
|
||||
packages/hoppscotch-selfhost-web:
|
||||
dependencies:
|
||||
@@ -4237,7 +4231,7 @@ packages:
|
||||
peerDependencies:
|
||||
vue: 3.3.9
|
||||
dependencies:
|
||||
vue: 3.3.9(typescript@4.9.5)
|
||||
vue: 3.3.9(typescript@5.3.2)
|
||||
|
||||
/@codemirror/autocomplete@6.11.1(@codemirror/language@6.9.3)(@codemirror/state@6.3.3)(@codemirror/view@6.22.3)(@lezer/common@1.0.3):
|
||||
resolution: {integrity: sha512-L5UInv8Ffd6BPw0P3EF7JLYAMeEbclY7+6Q11REt8vhih8RuLreKtPy/xk8wPxs4EQgYqzI7cdgpiYwWlbS/ow==}
|
||||
@@ -7059,7 +7053,7 @@ packages:
|
||||
lodash-es: 4.17.21
|
||||
path: 0.12.7
|
||||
vite-plugin-eslint: 1.8.1(eslint@8.55.0)(vite@3.2.4)
|
||||
vue: 3.3.9(typescript@4.9.5)
|
||||
vue: 3.3.9(typescript@4.9.3)
|
||||
vuedraggable-es: 4.1.1(vue@3.3.9)
|
||||
transitivePeerDependencies:
|
||||
- '@vue/composition-api'
|
||||
@@ -7098,7 +7092,7 @@ packages:
|
||||
peerDependencies:
|
||||
vue: 3.3.9
|
||||
dependencies:
|
||||
vue: 3.3.9(typescript@4.9.5)
|
||||
vue: 3.3.9(typescript@5.3.2)
|
||||
|
||||
/@humanwhocodes/config-array@0.11.10:
|
||||
resolution: {integrity: sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==}
|
||||
@@ -7400,7 +7394,7 @@ packages:
|
||||
dependencies:
|
||||
'@intlify/bundle-utils': 7.4.0(vue-i18n@9.2.2)
|
||||
'@intlify/shared': 9.4.1
|
||||
'@rollup/pluginutils': 5.0.3(rollup@3.29.4)
|
||||
'@rollup/pluginutils': 5.0.3(rollup@2.79.1)
|
||||
'@vue/compiler-sfc': 3.3.10
|
||||
debug: 4.3.4(supports-color@9.2.2)
|
||||
fast-glob: 3.3.1
|
||||
@@ -8993,7 +8987,6 @@ packages:
|
||||
estree-walker: 2.0.2
|
||||
picomatch: 2.3.1
|
||||
rollup: 2.79.1
|
||||
dev: true
|
||||
|
||||
/@rollup/pluginutils@5.0.3(rollup@3.29.4):
|
||||
resolution: {integrity: sha512-hfllNN4a80rwNQ9QCxhxuHCGHMAvabXqxNdaChUSSadMre7t4iEUI6fFAhBOn/eIYTgYVhBv7vCLsAJ4u3lf3g==}
|
||||
@@ -9008,6 +9001,7 @@ packages:
|
||||
estree-walker: 2.0.2
|
||||
picomatch: 2.3.1
|
||||
rollup: 3.29.4
|
||||
dev: true
|
||||
|
||||
/@rollup/pluginutils@5.1.0(rollup@2.79.1):
|
||||
resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==}
|
||||
@@ -10625,7 +10619,7 @@ packages:
|
||||
regenerator-runtime: 0.13.11
|
||||
systemjs: 6.14.2
|
||||
terser: 5.24.0
|
||||
vite: 3.2.4(@types/node@17.0.27)(terser@5.24.0)
|
||||
vite: 3.2.4(@types/node@18.18.8)(sass@1.58.0)(terser@5.24.0)
|
||||
|
||||
/@vitejs/plugin-legacy@2.3.0(terser@5.24.0)(vite@4.5.0):
|
||||
resolution: {integrity: sha512-Bh62i0gzQvvT8AeAAb78nOnqSYXypkRmQmOTImdPZ39meHR9e2une3AIFmVo4s1SDmcmJ6qj18Sa/lRc/14KaA==}
|
||||
@@ -11143,7 +11137,7 @@ packages:
|
||||
'@types/web-bluetooth': 0.0.14
|
||||
'@vueuse/metadata': 8.7.5
|
||||
'@vueuse/shared': 8.7.5(vue@3.3.9)
|
||||
vue: 3.3.9(typescript@4.9.5)
|
||||
vue: 3.3.9(typescript@5.3.2)
|
||||
vue-demi: 0.14.6(vue@3.3.9)
|
||||
|
||||
/@vueuse/core@9.12.0(vue@3.3.9):
|
||||
@@ -11202,7 +11196,7 @@ packages:
|
||||
vue:
|
||||
optional: true
|
||||
dependencies:
|
||||
vue: 3.3.9(typescript@4.9.5)
|
||||
vue: 3.3.9(typescript@5.3.2)
|
||||
vue-demi: 0.14.6(vue@3.3.9)
|
||||
|
||||
/@vueuse/shared@9.12.0(vue@3.3.9):
|
||||
@@ -11422,30 +11416,6 @@ packages:
|
||||
tslib: 2.6.2
|
||||
dev: true
|
||||
|
||||
/@windicss/config@1.9.1:
|
||||
resolution: {integrity: sha512-MjutTiS9XIteriwkH9D+que+bILbpulekYzjJGQDg3Sb2H87aOcO30f7N11ZiHF5OYoZn4yJz4lDbB3A6IuXfQ==}
|
||||
dependencies:
|
||||
debug: 4.3.4(supports-color@9.2.2)
|
||||
jiti: 1.19.3
|
||||
windicss: 3.5.6
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@windicss/plugin-utils@1.9.1:
|
||||
resolution: {integrity: sha512-sz/Z2sxUZIkJ2nVeTmtYTtXhWxe/yTTkM5nqU6eKhP0n6waipTCJJdLvWoZcgzQBbBCL/JLRQd/9BYsBqKuLDQ==}
|
||||
dependencies:
|
||||
'@antfu/utils': 0.7.6
|
||||
'@windicss/config': 1.9.1
|
||||
debug: 4.3.4(supports-color@9.2.2)
|
||||
fast-glob: 3.3.1
|
||||
magic-string: 0.30.4
|
||||
micromatch: 4.0.5
|
||||
windicss: 3.5.6
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@xtuc/ieee754@1.2.0:
|
||||
resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==}
|
||||
dev: true
|
||||
@@ -13614,7 +13584,7 @@ packages:
|
||||
optional: true
|
||||
dependencies:
|
||||
rxjs: 7.8.1
|
||||
vue: 3.3.9(typescript@4.9.5)
|
||||
vue: 3.3.9(typescript@5.3.2)
|
||||
dev: false
|
||||
|
||||
/dir-glob@3.0.1:
|
||||
@@ -24162,7 +24132,7 @@ packages:
|
||||
dependencies:
|
||||
fast-glob: 3.3.2
|
||||
unplugin: 1.5.1
|
||||
vite: 4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.24.0)
|
||||
vite: 4.5.0(@types/node@17.0.27)(sass@1.69.5)(terser@5.24.0)
|
||||
dev: true
|
||||
|
||||
/unplugin-icons@0.14.9(@vue/compiler-sfc@3.2.45)(vite@3.2.4):
|
||||
@@ -24772,7 +24742,7 @@ packages:
|
||||
'@types/eslint': 8.44.3
|
||||
eslint: 8.55.0
|
||||
rollup: 2.79.1
|
||||
vite: 3.2.4(@types/node@17.0.27)(terser@5.24.0)
|
||||
vite: 3.2.4(@types/node@18.18.8)(sass@1.58.0)(terser@5.24.0)
|
||||
|
||||
/vite-plugin-eslint@1.8.1(eslint@8.55.0)(vite@4.5.0):
|
||||
resolution: {integrity: sha512-PqdMf3Y2fLO9FsNPmMX+//2BF5SF8nEWspZdgl4kSt7UvHDRHVVfHvxsD7ULYzZrJDGRxR81Nq7TOFgwMnUang==}
|
||||
@@ -24803,7 +24773,7 @@ packages:
|
||||
peerDependencies:
|
||||
vite: '>=2.0.0'
|
||||
dependencies:
|
||||
vite: 4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.24.0)
|
||||
vite: 4.5.0(@types/node@17.0.27)(sass@1.69.5)(terser@5.24.0)
|
||||
dev: true
|
||||
|
||||
/vite-plugin-inspect@0.7.38(rollup@2.79.1)(vite@4.5.0):
|
||||
@@ -25066,54 +25036,6 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/vite-plugin-windicss@1.9.1(vite@4.5.0):
|
||||
resolution: {integrity: sha512-CWm1b/tXVCJTbEGn4oB8B7Gev9xDuY9k4E/KiJqDuLYspBUFQyZKPF2mSZ3DfNdojsfqgzxu9ervqvlb9jJ7fw==}
|
||||
peerDependencies:
|
||||
vite: ^2.0.1 || ^3.0.0 || ^4.0.0
|
||||
dependencies:
|
||||
'@windicss/plugin-utils': 1.9.1
|
||||
debug: 4.3.4(supports-color@9.2.2)
|
||||
kolorist: 1.8.0
|
||||
vite: 4.5.0(@types/node@18.18.8)(sass@1.69.5)(terser@5.24.0)
|
||||
windicss: 3.5.6
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/vite@3.2.4(@types/node@17.0.27)(terser@5.24.0):
|
||||
resolution: {integrity: sha512-Z2X6SRAffOUYTa+sLy3NQ7nlHFU100xwanq1WDwqaiFiCe+25zdxP1TfCS5ojPV2oDDcXudHIoPnI1Z/66B7Yw==}
|
||||
engines: {node: ^14.18.0 || >=16.0.0}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
'@types/node': '>= 14'
|
||||
less: '*'
|
||||
sass: '*'
|
||||
stylus: '*'
|
||||
sugarss: '*'
|
||||
terser: ^5.4.0
|
||||
peerDependenciesMeta:
|
||||
'@types/node':
|
||||
optional: true
|
||||
less:
|
||||
optional: true
|
||||
sass:
|
||||
optional: true
|
||||
stylus:
|
||||
optional: true
|
||||
sugarss:
|
||||
optional: true
|
||||
terser:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@types/node': 17.0.27
|
||||
esbuild: 0.15.15
|
||||
postcss: 8.4.32
|
||||
resolve: 1.22.4
|
||||
rollup: 2.79.1
|
||||
terser: 5.24.0
|
||||
optionalDependencies:
|
||||
fsevents: 2.3.3
|
||||
|
||||
/vite@3.2.4(@types/node@18.18.8)(sass@1.58.0)(terser@5.24.0):
|
||||
resolution: {integrity: sha512-Z2X6SRAffOUYTa+sLy3NQ7nlHFU100xwanq1WDwqaiFiCe+25zdxP1TfCS5ojPV2oDDcXudHIoPnI1Z/66B7Yw==}
|
||||
engines: {node: ^14.18.0 || >=16.0.0}
|
||||
@@ -25536,7 +25458,7 @@ packages:
|
||||
'@vue/composition-api':
|
||||
optional: true
|
||||
dependencies:
|
||||
vue: 3.3.9(typescript@4.9.5)
|
||||
vue: 3.3.9(typescript@5.3.2)
|
||||
|
||||
/vue-eslint-parser@9.3.1(eslint@8.47.0):
|
||||
resolution: {integrity: sha512-Clr85iD2XFZ3lJ52/ppmUDG/spxQu6+MAeHXjjyI4I1NUYZ9xmenQp4N0oaHJhrA8OOxltCVxMRfANGa70vU0g==}
|
||||
@@ -25620,7 +25542,7 @@ packages:
|
||||
vue: 3.3.9
|
||||
dependencies:
|
||||
'@vue/devtools-api': 6.5.1
|
||||
vue: 3.3.9(typescript@4.9.5)
|
||||
vue: 3.3.9(typescript@5.3.2)
|
||||
|
||||
/vue-template-compiler@2.7.14:
|
||||
resolution: {integrity: sha512-zyA5Y3ArvVG0NacJDkkzJuPQDF8RFeRlzV2vLeSnhSpieO6LK2OVbdLPi5MPPs09Ii+gMO8nY4S3iKQxBxDmWQ==}
|
||||
@@ -25732,7 +25654,7 @@ packages:
|
||||
vue: 3.3.9
|
||||
dependencies:
|
||||
sortablejs: 1.14.0
|
||||
vue: 3.3.9(typescript@4.9.5)
|
||||
vue: 3.3.9(typescript@5.3.2)
|
||||
|
||||
/w3c-hr-time@1.0.2:
|
||||
resolution: {integrity: sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==}
|
||||
@@ -26003,12 +25925,6 @@ packages:
|
||||
dependencies:
|
||||
string-width: 4.2.3
|
||||
|
||||
/windicss@3.5.6:
|
||||
resolution: {integrity: sha512-P1mzPEjgFMZLX0ZqfFht4fhV/FX8DTG7ERG1fBLiWvd34pTLVReS5CVsewKn9PApSgXnVfPWwvq+qUsRwpnwFA==}
|
||||
engines: {node: '>= 12'}
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
||||
/windows-release@4.0.0:
|
||||
resolution: {integrity: sha512-OxmV4wzDKB1x7AZaZgXMVsdJ1qER1ed83ZrTYd5Bwq2HfJVg3DJS8nqlAG4sMoJ7mu8cuRmLEYyU13BKwctRAg==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM node:18-alpine3.16 as base_builder
|
||||
FROM node:18-alpine3.19 as base_builder
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
|
||||
Reference in New Issue
Block a user