Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/fastify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"lint:fix": "eslint . --fix",
"sort-package": "npx sort-package-json",
"test": "vitest run --coverage",
"typecheck": "tsc --noEmit -p tsconfig.json --composite false"
"typecheck": "tsc --noEmit -p tsconfig.vitest.json --composite false"
},
"dependencies": {
"@graphql-tools/merge": "9.1.9",
Expand Down
10 changes: 6 additions & 4 deletions packages/fastify/src/lib/__test__/domainSchema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ import { describe, expect, it } from "vitest";

import getSaasConfig from "../../config";
import { accountCreateInputSchema } from "../../schemas";
import createConfig from "./helpers/createConfig";

const saasConfig = getSaasConfig({
saas: {
const saasConfig = getSaasConfig(
createConfig({
rootDomain: "example.test",
subdomains: "optional",
},
});
}),
);

const domainSchema = accountCreateInputSchema(saasConfig).shape.domain;

Expand Down
2 changes: 1 addition & 1 deletion packages/fastify/src/lib/__test__/helpers/createConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { SaasConfig } from "../../../types";

declare module "@prefabs.tech/fastify-config" {
interface ApiConfig {
saas?: SaasConfig;
saas: SaasConfig;
}
}

Expand Down
10 changes: 6 additions & 4 deletions packages/fastify/src/lib/__test__/slugSchema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ import { describe, expect, it } from "vitest";

import getSaasConfig from "../../config";
import { accountCreateInputSchema } from "../../schemas";
import createConfig from "./helpers/createConfig";

const saasConfig = getSaasConfig({
saas: {
const saasConfig = getSaasConfig(
createConfig({
rootDomain: "example.test",
subdomains: "optional",
},
});
}),
);

const slugSchema = accountCreateInputSchema(saasConfig).shape.slug;

Expand Down
11 changes: 11 additions & 0 deletions packages/fastify/tsconfig.vitest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "./tsconfig.json",
"exclude": [],
"compilerOptions": {
"composite": true,
"types": ["vite/client", "node", "vitest/globals"],
"paths": {
"@/*": ["./src/*"]
}
}
}
6 changes: 4 additions & 2 deletions packages/react/tsconfig.vitest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"exclude": [],
"compilerOptions": {
"composite": true,
"lib": [],
"types": ["node", "jsdom", "vitest/globals"],
"types": ["vite/client", "node", "vitest/globals"],
"paths": {
"@/*": ["./src/*"]
}
}
}
7 changes: 6 additions & 1 deletion packages/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,15 @@
"build": "vite build && vue-tsc --emitDeclarationOnly",
"lint": "eslint . --ext .vue",
"lint:fix": "eslint . --ext .vue --fix",
"snapshot:update": "vitest --environment jsdom run --update",
"sort-package": "npx sort-package-json",
"stylelint": "stylelint \"src/**/*.{css,vue}\" --allow-empty-input",
"stylelint:fix": "stylelint \"src/**/*.{css,vue}\" --fix --allow-empty-input",
"typecheck": "vue-tsc --noEmit -p tsconfig.json --composite false"
"test": "vitest --environment jsdom run --coverage --passWithNoTests",
"test:component": "vitest --environment jsdom run component/ --passWithNoTests",
"test:snapshot": "vitest --environment jsdom run snapshot/ --passWithNoTests",
"test:unit": "vitest --environment jsdom run unit/ --passWithNoTests",
"typecheck": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false"
},
"dependencies": {},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/vue/src/api/axios/client.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import axios from "axios";
import { create } from "axios";

import { ACCOUNT_HEADER_NAME } from "../../constant";

export const client = (baseURL: string) => {
const accountId = sessionStorage.getItem(ACCOUNT_HEADER_NAME);

return axios.create({
return create({
baseURL: baseURL,
headers: {
[ACCOUNT_HEADER_NAME]: accountId || "",
Expand Down
11 changes: 11 additions & 0 deletions packages/vue/tsconfig.vitest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "./tsconfig.json",
"exclude": [],
"compilerOptions": {
"composite": true,
"types": ["vite/client", "node", "vitest/globals"],
"paths": {
"@/*": ["./src/*"]
}
}
}
Loading