Skip to content

Commit 4d0598b

Browse files
committed
chore: resolve conflicts
Signed-off-by: Robert Goniszewski <[email protected]>
2 parents 75bc4c4 + 42f777f commit 4d0598b

File tree

14 files changed

+258
-214
lines changed

14 files changed

+258
-214
lines changed

CONTRIBUTING.md

+19-10
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,35 @@
22

33
Thank you for considering contributing to this project! All contributors, big or small, are welcomed. To make the contribution process as smooth as possible, please follow the guidelines below.
44

5-
1. Fork the repository: Start by forking the repository to your own GitHub account. This will create a copy of the repository under your username.
6-
2. Create a new branch: Clone the forked repository to your local machine and create a new branch for your feature or bug fix.
5+
## Prerequisites
6+
7+
- Bun
8+
9+
## Steps
10+
11+
1. **Fork the repository:** Start by forking the repository to your own GitHub account. This will create a copy of the repository under your username.
12+
2. **Create a new branch:** Clone the forked repository to your local machine and create a new branch for your feature or bug fix.
713
```bash
8-
git clone https://github.com/goniszewski/grimoire/repository.git
14+
git clone https://github.com/your-username/grimoire.git
915
cd grimoire
1016
git checkout -b your-branch-name
1117
```
12-
3. Make the changes: Make the necessary changes to the codebase, ensuring that you follow any coding style guidelines mentioned in the project documentation or README file.
13-
4. Test your changes: Thoroughly test your changes to ensure that they do not break existing functionality and introduce new bugs.
14-
5. Commit your changes: Once you are satisfied with your modifications, commit them using a descriptive commit message following the rules of [Semantic Commit Messages](https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716).
18+
3. **Install Deps** run `bun install` to install the deps
19+
4. **Start the server:** if you are on \*nix systems run `./run-dev.sh`. Might need to chmod it before. On windows just `bun --bun run dev` should work.
20+
5. **Run migrations:** `bun run-migrations` to run migrations and have base DB setup.
21+
6. **Make the changes:** Make the necessary changes to the codebase, ensuring that you follow any coding style guidelines mentioned in the project documentation or README file.
22+
7. **Test your changes:** Thoroughly test your changes to ensure that they do not break existing functionality and introduce new bugs.
23+
8. **Commit your changes:** Once you are satisfied with your modifications, commit them using a descriptive commit message following the rules of [Semantic Commit Messages](https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716).
1524
```bash
1625
git add .
1726
git commit -m "fix: Your detailed description of your changes."
1827
```
19-
6. Push to your branch: Push your changes to your forked repository on GitHub.
28+
9. **Push to your branch:** Push your changes to your forked repository on GitHub.
2029
```bash
2130
git push origin your-branch-name
2231
```
23-
7. Submit a Pull Request: Navigate to the GitHub page of the original project and submit a pull request with a clear description of your changes.
24-
8. Wait for review: Patiently wait for the maintainers to review your pull request. They might ask for additional information or changes, which you can address by updating your branch and submitting an updated pull request.
25-
9. Let it spark ✨ Yay, your contribution has been accepted and merged into the project! Thank you for making this project better 🤝
32+
10. **Submit a Pull Request:** Navigate to the GitHub page of the original project and submit a pull request with a clear description of your changes.
33+
11. **Wait for review:** Patiently wait for the maintainers to review your pull request. They might ask for additional information or changes, which you can address by updating your branch and submitting an updated pull request.
34+
12. **Let it spark** ✨ Yay, your contribution has been accepted and merged into the project! Thank you for making this project better 🤝
2635

2736
Thank you for contributing to this project! We appreciate your efforts in making it even better. If you have any questions or need further clarification, feel free to reach out to us.

Dockerfile

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ RUN apt-get update && apt-get install -y python3 python3-pip wget build-essentia
88
bun i -g svelte-kit@latest
99

1010
RUN adduser --disabled-password --gecos '' grimoire
11-
RUN mkdir -p /app/data && chown -R grimoire:grimoire /app/data && chmod 755 /app/data
11+
RUN mkdir -p /app/data && chown -R grimoire:grimoire /app/data && chmod 766 /app/data
1212
WORKDIR /app
1313

1414
FROM base AS dependencies
@@ -35,6 +35,7 @@ COPY --from=build /app/build ./build
3535
COPY --from=build /app/migrations ./migrations
3636
COPY --from=build /app/migrate.js ./migrate.js
3737
COPY --from=build /app/package.json ./package.json
38+
COPY docker-entrypoint.sh /
3839
ENV NODE_ENV=production \
3940
PUBLIC_ORIGIN=${PUBLIC_ORIGIN:-http://localhost:5173} \
4041
ORIGIN=${PUBLIC_ORIGIN:-http://localhost:5173} \
@@ -43,8 +44,9 @@ ENV NODE_ENV=production \
4344
PUBLIC_SIGNUP_DISABLED=${PUBLIC_SIGNUP_DISABLED:-false} \
4445
BODY_SIZE_LIMIT=${BODY_SIZE_LIMIT:-5000000}
4546

47+
RUN chmod +x /docker-entrypoint.sh
4648
USER grimoire
4749
EXPOSE ${PORT}
4850
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
4951
CMD wget --no-verbose --tries=1 --spider http://localhost:$PORT/api/health || exit 1
50-
ENTRYPOINT ["sh", "-c", "bun --bun run run-migrations && bun ./build/index.js"]
52+
ENTRYPOINT ["/docker-entrypoint.sh"]

docker-entrypoint.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
chown -R grimoire:grimoire /app/data
3+
chmod 755 /app/data
4+
bun --bun run run-migrations && bun ./build/index.js

package.json

+100-100
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,102 @@
11
{
2-
"name": "grimoire",
3-
"version": "0.4.1-hotfix.3",
4-
"description": "Bookmark manager for the wizards 🧙",
5-
"author": "Robert Goniszewski <[email protected]>",
6-
"main": "./build/index.js",
7-
"website": "https://grimoire.pro",
8-
"license": "MIT",
9-
"private": false,
10-
"keywords": [
11-
"bookmarks",
12-
"bookmarks-manager",
13-
"svelte",
14-
"sveltekit",
15-
"tailwindcss"
16-
],
17-
"trustedDependencies": [
18-
"@sveltejs/kit",
19-
"core-js-pure",
20-
"esbuild",
21-
"install-from-cache",
22-
"postinstall",
23-
"prebuild-install",
24-
"svelte-preprocess"
25-
],
26-
"scripts": {
27-
"dev": "vite dev",
28-
"build": "vite build",
29-
"preview": "vite preview",
30-
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
31-
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
32-
"test:unit": "vitest --coverage",
33-
"lint": "prettier --plugin-search-dir . --check . && eslint .",
34-
"format": "prettier --plugin-search-dir . --write .",
35-
"generate-migration": "drizzle-kit generate --name",
36-
"run-migrations": "bun run ./migrate",
37-
"release": "release-it"
38-
},
39-
"type": "module",
40-
"devDependencies": {
41-
"@libsql/client": "^0.11.0",
42-
"@sveltejs/adapter-auto": "^3.2.4",
43-
"@sveltejs/kit": "^2.5.27",
44-
"@tailwindcss/typography": "^0.5.14",
45-
"@types/adm-zip": "^0.5.5",
46-
"@types/bun": "^1.1.9",
47-
"@types/express": "^4.17.21",
48-
"@types/express-http-proxy": "^1.6.6",
49-
"@types/swagger-ui": "^3.52.4",
50-
"@typescript-eslint/eslint-plugin": "^8.5.0",
51-
"@typescript-eslint/parser": "^8.5.0",
52-
"@vitest/coverage-v8": "^2.1.1",
53-
"autoprefixer": "^10.4.20",
54-
"drizzle-kit": "^0.24.2",
55-
"eslint": "^9.10.0",
56-
"eslint-config-prettier": "^9.1.0",
57-
"eslint-plugin-perfectionist": "^3.6.0",
58-
"eslint-plugin-svelte": "^2.44.0",
59-
"postcss": "^8.4.47",
60-
"prettier": "^3.3.3",
61-
"prettier-plugin-svelte": "^3.2.6",
62-
"prettier-plugin-tailwindcss": "^0.6.6",
63-
"release-it": "^17.6.0",
64-
"svelte": "^4.2.19",
65-
"svelte-adapter-bun": "^0.5.2",
66-
"svelte-check": "^4.0.2",
67-
"tailwindcss": "^3.4.11",
68-
"tslib": "^2.7.0",
69-
"typescript": "^5.6.2",
70-
"vite": "^5.4.5",
71-
"vitest": "^2.1.1"
72-
},
73-
"dependencies": {
74-
"@extractus/article-extractor": "^8.0.10",
75-
"@lucia-auth/adapter-drizzle": "^1.1.0",
76-
"@sveltejs/vite-plugin-svelte": "^3.1.2",
77-
"@tabler/icons": "^3.16.0",
78-
"@tabler/icons-svelte": "^3.16.0",
79-
"@tailwindcss/line-clamp": "^0.4.4",
80-
"@types/html-to-text": "^9.0.4",
81-
"@types/lodash": "^4.17.7",
82-
"@types/sanitize-html": "^2.13.0",
83-
"adm-zip": "^0.5.16",
84-
"chalk": "^5.3.0",
85-
"daisyui": "^4.12.10",
86-
"dotenv": "^16.4.5",
87-
"drizzle-orm": "^0.33.0",
88-
"eslint-plugin-drizzle": "^0.2.3",
89-
"express": "^4.21.0",
90-
"fuse.js": "^7.0.0",
91-
"html-to-text": "^9.0.5",
92-
"joi": "^17.13.3",
93-
"lodash": "^4.17.21",
94-
"lucia": "^3.2.0",
95-
"node-parse-bookmarks": "^1.0.3",
96-
"sanitize-html": "^2.13.0",
97-
"svelte-french-toast": "^1.2.0",
98-
"svelte-select": "^5.8.3",
99-
"swagger-ui": "^5.17.14",
100-
"url-metadata": "^4.1.1"
101-
}
2+
"name": "grimoire",
3+
"version": "0.4.4",
4+
"description": "Bookmark manager for the wizards 🧙",
5+
"author": "Robert Goniszewski <[email protected]>",
6+
"main": "./build/index.js",
7+
"website": "https://grimoire.pro",
8+
"license": "MIT",
9+
"private": false,
10+
"keywords": [
11+
"bookmarks",
12+
"bookmarks-manager",
13+
"svelte",
14+
"sveltekit",
15+
"tailwindcss"
16+
],
17+
"trustedDependencies": [
18+
"@sveltejs/kit",
19+
"core-js-pure",
20+
"esbuild",
21+
"install-from-cache",
22+
"postinstall",
23+
"prebuild-install",
24+
"svelte-preprocess"
25+
],
26+
"scripts": {
27+
"dev": "vite dev",
28+
"build": "vite build",
29+
"preview": "vite preview",
30+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
31+
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
32+
"test:unit": "vitest --coverage",
33+
"lint": "prettier --plugin-search-dir . --check . && eslint .",
34+
"format": "prettier --plugin-search-dir . --write .",
35+
"generate-migration": "drizzle-kit generate --name",
36+
"run-migrations": "bun run ./migrate",
37+
"release": "release-it"
38+
},
39+
"type": "module",
40+
"devDependencies": {
41+
"@libsql/client": "^0.11.0",
42+
"@sveltejs/adapter-auto": "^3.2.4",
43+
"@sveltejs/kit": "^2.5.27",
44+
"@tailwindcss/typography": "^0.5.14",
45+
"@types/adm-zip": "^0.5.5",
46+
"@types/bun": "^1.1.9",
47+
"@types/express": "^4.17.21",
48+
"@types/express-http-proxy": "^1.6.6",
49+
"@types/swagger-ui": "^3.52.4",
50+
"@typescript-eslint/eslint-plugin": "^8.5.0",
51+
"@typescript-eslint/parser": "^8.5.0",
52+
"@vitest/coverage-v8": "^2.1.1",
53+
"autoprefixer": "^10.4.20",
54+
"drizzle-kit": "^0.24.2",
55+
"eslint": "^9.10.0",
56+
"eslint-config-prettier": "^9.1.0",
57+
"eslint-plugin-perfectionist": "^3.6.0",
58+
"eslint-plugin-svelte": "^2.44.0",
59+
"postcss": "^8.4.47",
60+
"prettier": "^3.3.3",
61+
"prettier-plugin-svelte": "^3.2.6",
62+
"prettier-plugin-tailwindcss": "^0.6.6",
63+
"release-it": "^17.6.0",
64+
"svelte": "^4.2.19",
65+
"svelte-adapter-bun": "^0.5.2",
66+
"svelte-check": "^4.0.2",
67+
"tailwindcss": "^3.4.11",
68+
"tslib": "^2.7.0",
69+
"typescript": "^5.6.2",
70+
"vite": "^5.4.5",
71+
"vitest": "^2.1.1"
72+
},
73+
"dependencies": {
74+
"@extractus/article-extractor": "^8.0.10",
75+
"@lucia-auth/adapter-drizzle": "^1.1.0",
76+
"@sveltejs/vite-plugin-svelte": "^3.1.2",
77+
"@tabler/icons": "^3.16.0",
78+
"@tabler/icons-svelte": "^3.16.0",
79+
"@tailwindcss/line-clamp": "^0.4.4",
80+
"@types/html-to-text": "^9.0.4",
81+
"@types/lodash": "^4.17.7",
82+
"@types/sanitize-html": "^2.13.0",
83+
"adm-zip": "^0.5.16",
84+
"chalk": "^5.3.0",
85+
"daisyui": "^4.12.10",
86+
"dotenv": "^16.4.5",
87+
"drizzle-orm": "^0.33.0",
88+
"eslint-plugin-drizzle": "^0.2.3",
89+
"express": "^4.21.0",
90+
"fuse.js": "^7.0.0",
91+
"html-to-text": "^9.0.5",
92+
"joi": "^17.13.3",
93+
"lodash": "^4.17.21",
94+
"lucia": "^3.2.0",
95+
"node-parse-bookmarks": "^1.0.3",
96+
"sanitize-html": "^2.13.0",
97+
"svelte-french-toast": "^1.2.0",
98+
"svelte-select": "^5.8.3",
99+
"swagger-ui": "^5.17.14",
100+
"url-metadata": "^4.1.1"
101+
}
102102
}

src/lib/components/AddCategoryForm/AddCategoryForm.svelte

+6-7
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,25 @@
2828
let form: HTMLFormElement;
2929
export let closeModal: () => void;
3030
31-
const categoriesOptions = writable<{ value: string; label: string }[]>([
31+
const categoriesOptions = writable<{ value: string | null; label: string }[]>([
3232
{
33-
value: 'null',
33+
value: null,
3434
label: 'No parent'
3535
}
3636
]);
3737
3838
$: {
3939
$categoriesOptions = [
4040
{
41-
value: 'null',
41+
value: null,
4242
label: 'No parent'
4343
},
4444
...$page.data.categories
4545
.filter((c) => {
4646
return c.id !== $category.id;
4747
})
4848
.map((c) => ({
49-
value: c.id,
49+
value: c.id.toString(),
5050
label: c.name
5151
}))
5252
];
@@ -224,13 +224,12 @@
224224
name="parent"
225225
searchable
226226
placeholder="Select parent category..."
227-
required
228-
value={$category.parent?.id || $categoriesOptions[0].value}
227+
value={$category.parent?.id?.toString() || $categoriesOptions[0].value}
229228
items={$categoriesOptions}
230229
class="this-select input input-bordered w-max"
231230
on:change={(event) => {
232231
// @ts-ignore-next-line
233-
$category.parent = $page.data.categories.find((c) => c.id === event.detail.value);
232+
$category.parent = $page.data.categories.find((c) => c.id.toString() === event.detail.value);
234233
}}
235234
/>
236235
</div>

src/lib/components/EditCategoryForm/EditCategoryForm.svelte

+6-7
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,25 @@
1616
let form: HTMLFormElement;
1717
export let closeModal: () => void;
1818
19-
const categoriesOptions = writable<{ value: number; label: string }[]>([
19+
const categoriesOptions = writable<{ value: string | null; label: string }[]>([
2020
{
21-
value: 0,
21+
value: null,
2222
label: 'No parent'
2323
}
2424
]);
2525
2626
$: {
2727
$categoriesOptions = [
2828
{
29-
value: 0,
29+
value: null,
3030
label: 'No parent'
3131
},
3232
...$page.data.categories
3333
.filter((c) => {
3434
return c.id !== $category.id;
3535
})
3636
.map((c) => ({
37-
value: c.id,
37+
value: c.id.toString(),
3838
label: c.name
3939
}))
4040
];
@@ -214,13 +214,12 @@
214214
name="parent"
215215
searchable
216216
placeholder="Select parent category..."
217-
required
218-
value={$category.parent?.id || $categoriesOptions[0].value}
217+
value={$category.parent?.id?.toString() || $categoriesOptions[0].value}
219218
items={$categoriesOptions}
220219
class="this-select input input-bordered w-max"
221220
on:change={(event) => {
222221
// @ts-ignore-next-line
223-
$category.parent = $page.data.categories.find((c) => c.id === event.detail.value);
222+
$category.parent = $page.data.categories.find((c) => c.id.toString() === event.detail.value);
224223
}}
225224
/>
226225
</div>

0 commit comments

Comments
 (0)