Skip to content

Commit

Permalink
feat: bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
Tanyawat-Arsaga committed Mar 4, 2024
1 parent 0ca95cd commit 98b9729
Show file tree
Hide file tree
Showing 19 changed files with 2,168 additions and 3,169 deletions.
10 changes: 7 additions & 3 deletions apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,14 @@
"dotenv": "^16.3.1",
"find-config": "^1.0.0",
"pg": "^8.11.3",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^5.2.0",
"strapi-chatgpt": "^1.0.2",
"strapi-plugin-config-sync": "^1.2.2",
"strapi-plugin-local-image-sharp": "^1.7.0",
"strapi-plugin-slugify": "^2.3.6"
"strapi-plugin-slugify": "^2.3.6",
"styled-components": "^5.2.1"
},
"author": {
"name": "A Strapi developer"
Expand All @@ -41,11 +45,11 @@
},
"license": "MIT",
"devDependencies": {
"@codemirror/theme-one-dark": "^6.1.2",
"@reduxjs/toolkit": "^1.9.7",
"@codemirror/autocomplete": "^6.10.2",
"@codemirror/lint": "^6.4.2",
"@codemirror/search": "^6.5.4",
"@codemirror/theme-one-dark": "^6.1.2",
"@reduxjs/toolkit": "^1.9.7",
"@uiw/codemirror-extensions-basic-setup": "^4.21.20"
}
}
2 changes: 1 addition & 1 deletion apps/astro/src/pages/[lang]/contact/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,4 @@ https://qrcode-monkey.p.rapidapi.com/qr/custom?size=500&config=${encodeURICompon
margin: 0;
size: 91mm 55mm;
}
</style>
</style>
13 changes: 7 additions & 6 deletions apps/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@
"@graphql-codegen/typescript-graphql-request": "^4.5.9",
"@graphql-codegen/typescript-operations": "^3.0.4",
"@playwright/test": "^1.39.0",
"@sveltejs/adapter-auto": "^2.1.0",
"@sveltejs/adapter-node": "^1.3.1",
"@sveltejs/kit": "^1.27.0",
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/adapter-node": "^2.0.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"@types/three": "^0.156.0",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
Expand All @@ -47,9 +48,9 @@
"tailwindcss": "^3.3.3",
"tslib": "^2.6.2",
"typescript": "^5.2.2",
"vite": "^4.5.0",
"vite": "^5.0.0",
"vite-imagetools": "^5.1.2",
"vitest": "^0.34.6"
"vitest": "^1.0.0"
},
"type": "module",
"dependencies": {
Expand All @@ -75,4 +76,4 @@
"three": "^0.157.0",
"vite-plugin-pwa": "^0.16.5"
}
}
}
2 changes: 1 addition & 1 deletion apps/client/src/graphql/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PUBLIC_API_URL } from '$env/static/public';
import { env } from '$env/dynamic/private';
import { PUBLIC_API_URL } from '$env/static/public';
import { GraphQLClient } from 'graphql-request';

export const graphQLClient = new GraphQLClient(
Expand Down
2 changes: 1 addition & 1 deletion apps/client/src/routes/+layout.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const load: LayoutServerLoad = async ({ request, cookies }) => {
const defaultLanguage =
preferredLanguages?.find((lang) => !!lang && LANGUAGES.includes(lang)) || 'en';
if (!cookies.get('language')) {
cookies.set('language', defaultLanguage);
cookies.set('language', defaultLanguage, { path: '/' });
}
return {
preferredLanguages,
Expand Down
4 changes: 3 additions & 1 deletion apps/client/src/routes/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ export const actions: Actions = {
['set-language']: async ({ cookies, request }) => {
const language = (await request.formData()).get('language');
if (language) {
cookies.set('language', language as string);
/* @migration task: add path argument */ cookies.set('language', language as string, {
path: '/'
});
}
}
};
2 changes: 1 addition & 1 deletion apps/client/src/routes/about/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ export const load: PageServerLoad = async () => {
};
}

throw error(404, 'Project Not found');
error(404, 'Project Not found');
};
6 changes: 3 additions & 3 deletions apps/client/src/routes/api/attachments.redirect/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ export async function GET({ url }) {
const query = url.searchParams;
const id = query.get('id');

if (!id) throw error(400, 'No query id supplied');
if (!id) error(400, 'No query id supplied');

const res = await outlineClient['/attachments.redirect'].post(
{ json: { id } },
{ redirect: 'error' }
);
const redirectLocation = res.headers.get('location');
if (redirectLocation) {
throw redirect(302, redirectLocation);
redirect(302, redirectLocation);
}

throw error(500, 'Something went wrong');
error(500, 'Something went wrong');
}
2 changes: 1 addition & 1 deletion apps/client/src/routes/blog/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ export const load: PageServerLoad = async ({ cookies }) => {
};
}

throw error(404, 'Blog Posts Not found');
error(404, 'Blog Posts Not found');
};
2 changes: 1 addition & 1 deletion apps/client/src/routes/blog/[slug]/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ export const load: PageServerLoad = async ({ params }) => {
};
}

throw error(404, 'Post Not found');
error(404, 'Post Not found');
};
2 changes: 1 addition & 1 deletion apps/client/src/routes/namecard/+page.server.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { redirect } from '@sveltejs/kit';

export function load() {
throw redirect(302, '/contact');
redirect(302, '/contact');
}
4 changes: 2 additions & 2 deletions apps/client/src/routes/notes/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ export const load: PageServerLoad = async () => {

if (!res.ok) {
console.log(await res.json());
throw error(500, 'Something went wrong');
error(500, 'Something went wrong');
}
const data = await res.json();
if (data?.data?.length === 0) {
throw error(404, 'No articles found');
error(404, 'No articles found');
}

const collectionInfoRes = await outlineClient['/collections.list'].post();
Expand Down
4 changes: 2 additions & 2 deletions apps/client/src/routes/notes/[slug]/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ export const load: PageServerLoad = async ({ params }) => {

if (!res.ok) {
console.log(params.slug, await res.json());
throw error(500, 'Something went wrong');
error(500, 'Something went wrong');
}
const data = await res.json();
if (!data?.data) {
throw error(404, 'Article not found');
error(404, 'Article not found');
}

const childDocumentsRes = await outlineClient['/documents.list'].post({
Expand Down
4 changes: 2 additions & 2 deletions apps/client/src/routes/notes/[slug]/doc/[id]/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ export const load: PageServerLoad = async ({ params }) => {

if (!res.ok) {
console.log(params.slug, await res.json());
throw error(500, 'Something went wrong');
error(500, 'Something went wrong');
}
const data = await res.json();
if (!data?.data) {
throw error(404, 'Article not found');
error(404, 'Article not found');
}

const childDocumentsRes = await outlineClient['/documents.list'].post({
Expand Down
2 changes: 1 addition & 1 deletion apps/client/src/routes/projects/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ export const load: PageServerLoad = async () => {
};
}

throw error(404, 'Project Not found');
error(404, 'Project Not found');
};
4 changes: 2 additions & 2 deletions apps/client/src/routes/projects/[slug]/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ export const load: PageServerLoad = async ({ params, cookies }) => {
if (data) {
const locale = data.projects?.data?.[0]?.attributes?.locale;
if (locale) {
cookies.set('language', locale);
/* @migration task: add path argument */ cookies.set('language', locale, { path: '/' });
}
return {
data,
currentLanguage: locale
};
}

throw error(404, 'Project Not found');
error(404, 'Project Not found');
};
2 changes: 1 addition & 1 deletion apps/client/src/routes/tags/[slug]/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ export const load: PageServerLoad = async ({ params }) => {
};
}

throw error(404, 'Project Not found');
error(404, 'Project Not found');
};
2 changes: 1 addition & 1 deletion apps/client/svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import adapter from '@sveltejs/adapter-node';
import { vitePreprocess } from '@sveltejs/kit/vite';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
import preprocess from 'svelte-preprocess';

/** @type {import('@sveltejs/kit').Config} */
Expand Down
Loading

0 comments on commit 98b9729

Please sign in to comment.