Skip to content

Commit

Permalink
Merge pull request #222 from kloudlite/website/refactor
Browse files Browse the repository at this point in the history
Website/refactor
  • Loading branch information
tulsiojha authored Jun 12, 2024
2 parents b3929dd + 21b26f6 commit e842751
Show file tree
Hide file tree
Showing 31 changed files with 4,360 additions and 3,956 deletions.
4 changes: 4 additions & 0 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ tasks:
PORT=4000
;;
"community")
PORT=4002
;;
"console")
PORT=4001
;;
Expand Down
1 change: 1 addition & 0 deletions gql-queries-generator/doc/queries.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -6376,6 +6376,7 @@ query authWhoAmI {
id
email
verified
name
approved
}
}
Expand Down
258 changes: 258 additions & 0 deletions kl.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,258 @@
{
"lockfile_version": "1",
"packages": {
"git@latest": {
"last_modified": "2024-05-26T09:30:02Z",
"resolved": "github:NixOS/nixpkgs/e2dd4e18cc1c7314e24154331bae07df76eb582f#git",
"source": "devbox-search",
"version": "2.44.1",
"systems": {
"aarch64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/1y3m89x5sl3bwag9lk4fdbqmswzjp9is-git-2.44.1",
"default": true
},
{
"name": "doc",
"path": "/nix/store/hhwbgxadc1r7f2vf0f7mf4mlcy3xsxh9-git-2.44.1-doc"
}
],
"store_path": "/nix/store/1y3m89x5sl3bwag9lk4fdbqmswzjp9is-git-2.44.1"
},
"aarch64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/y6si9acv2p32jjyavs5arj8lwk7qq945-git-2.44.1",
"default": true
},
{
"name": "debug",
"path": "/nix/store/vjgwf4vr6dqclvb503fqir13yiqp7bf6-git-2.44.1-debug"
},
{
"name": "doc",
"path": "/nix/store/1c5816l3n7dgbjkbf6fdlw0amq5rvazq-git-2.44.1-doc"
}
],
"store_path": "/nix/store/y6si9acv2p32jjyavs5arj8lwk7qq945-git-2.44.1"
},
"x86_64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/rwkir7nma4hgyg8lydzjisbjgwr9a4xf-git-2.44.1",
"default": true
},
{
"name": "doc",
"path": "/nix/store/y4l5l7k5syy0s3baznixgxbnmn8aiyxq-git-2.44.1-doc"
}
],
"store_path": "/nix/store/rwkir7nma4hgyg8lydzjisbjgwr9a4xf-git-2.44.1"
},
"x86_64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/jxjzgz1p0hdqsg8k17ivw5mgcd6ffx9c-git-2.44.1",
"default": true
},
{
"name": "debug",
"path": "/nix/store/93xf345jmvrcz1wc3va981rp13rn4hyz-git-2.44.1-debug"
},
{
"name": "doc",
"path": "/nix/store/rvgnmd4cwvmy3v77ig977ix40d2mipri-git-2.44.1-doc"
}
],
"store_path": "/nix/store/jxjzgz1p0hdqsg8k17ivw5mgcd6ffx9c-git-2.44.1"
}
}
},
"nodePackages.pnpm@latest": {
"last_modified": "2024-05-22T06:18:38Z",
"resolved": "github:NixOS/nixpkgs/3f316d2a50699a78afe5e77ca486ad553169061e#nodePackages.pnpm",
"source": "devbox-search",
"version": "8.15.5",
"systems": {
"aarch64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/98b2ljlansqmkpkd5pqfgwhcwr5kvsha-pnpm-8.15.5",
"default": true
}
],
"store_path": "/nix/store/98b2ljlansqmkpkd5pqfgwhcwr5kvsha-pnpm-8.15.5"
},
"aarch64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/b0h4xyqwdk2zhyhw42bprjnj2i518sxn-pnpm-8.15.5",
"default": true
}
],
"store_path": "/nix/store/b0h4xyqwdk2zhyhw42bprjnj2i518sxn-pnpm-8.15.5"
},
"x86_64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/7xyc072k4g6430vijvylidqacjxy5dbb-pnpm-8.15.5",
"default": true
}
],
"store_path": "/nix/store/7xyc072k4g6430vijvylidqacjxy5dbb-pnpm-8.15.5"
},
"x86_64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/77wblnm5dnmgnan3695j3mk4r7j75s5j-pnpm-8.15.5",
"default": true
}
],
"store_path": "/nix/store/77wblnm5dnmgnan3695j3mk4r7j75s5j-pnpm-8.15.5"
}
}
},
"nodejs@latest": {
"last_modified": "2024-05-22T06:18:38Z",
"plugin_version": "0.0.2",
"resolved": "github:NixOS/nixpkgs/3f316d2a50699a78afe5e77ca486ad553169061e#nodejs_22",
"source": "devbox-search",
"version": "22.2.0",
"systems": {
"aarch64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/rz5da1id31jgyax1yb6dms0mzpxkywds-nodejs-22.2.0",
"default": true
},
{
"name": "libv8",
"path": "/nix/store/5pa8xjwgg12gh137n51hg90fsh9m0dab-nodejs-22.2.0-libv8"
}
],
"store_path": "/nix/store/rz5da1id31jgyax1yb6dms0mzpxkywds-nodejs-22.2.0"
},
"aarch64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/dkg3sm7j61sfkpvg0bpi0hbjcccbg2wy-nodejs-22.2.0",
"default": true
},
{
"name": "libv8",
"path": "/nix/store/xy685pkgmwsd5wkdzvsd56ip9kb66g68-nodejs-22.2.0-libv8"
}
],
"store_path": "/nix/store/dkg3sm7j61sfkpvg0bpi0hbjcccbg2wy-nodejs-22.2.0"
},
"x86_64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/y8ns070yvn6ffbwzhmvk03lw7lh4ly02-nodejs-22.2.0",
"default": true
},
{
"name": "libv8",
"path": "/nix/store/9z2a94v29m4jmq4b899i9mqgswizb7lx-nodejs-22.2.0-libv8"
}
],
"store_path": "/nix/store/y8ns070yvn6ffbwzhmvk03lw7lh4ly02-nodejs-22.2.0"
},
"x86_64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/72m3szv59j74b12dmicmayvvlikh65qc-nodejs-22.2.0",
"default": true
},
{
"name": "libv8",
"path": "/nix/store/cwmjcfmrp2ry6d7xmm6zxcrc9qhbi22k-nodejs-22.2.0-libv8"
}
],
"store_path": "/nix/store/72m3szv59j74b12dmicmayvvlikh65qc-nodejs-22.2.0"
}
}
},
"vim@latest": {
"last_modified": "2024-05-22T06:18:38Z",
"resolved": "github:NixOS/nixpkgs/3f316d2a50699a78afe5e77ca486ad553169061e#vim",
"source": "devbox-search",
"version": "9.1.0377",
"systems": {
"aarch64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/lmx8m6kzyvipfb0s0jfpmwvrfaakvr16-vim-9.1.0377",
"default": true
},
{
"name": "xxd",
"path": "/nix/store/plkqnw8bx49w9kapywwcqlvid3f24lpy-vim-9.1.0377-xxd",
"default": true
}
],
"store_path": "/nix/store/lmx8m6kzyvipfb0s0jfpmwvrfaakvr16-vim-9.1.0377"
},
"aarch64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/dgi2x0gadhr1h2vzfhab3kj5jbr74g6x-vim-9.1.0377",
"default": true
},
{
"name": "xxd",
"path": "/nix/store/zk521mqyrx0i3nxiwmhpdsz93ia8rb6s-vim-9.1.0377-xxd",
"default": true
}
],
"store_path": "/nix/store/dgi2x0gadhr1h2vzfhab3kj5jbr74g6x-vim-9.1.0377"
},
"x86_64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/l3j2ypqx0mq6kk2s3pgxiybmkawpc7ii-vim-9.1.0377",
"default": true
},
{
"name": "xxd",
"path": "/nix/store/qgd4kpvdj8cx8cqfwh09hysh1yrvmfvj-vim-9.1.0377-xxd",
"default": true
}
],
"store_path": "/nix/store/l3j2ypqx0mq6kk2s3pgxiybmkawpc7ii-vim-9.1.0377"
},
"x86_64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/2126qjwg5cx9aw47bj9b427hazh96sh7-vim-9.1.0377",
"default": true
},
{
"name": "xxd",
"path": "/nix/store/3g9nvidfl7phh7zh03ixymy5nfscianb-vim-9.1.0377-xxd",
"default": true
}
],
"store_path": "/nix/store/2126qjwg5cx9aw47bj9b427hazh96sh7-vim-9.1.0377"
}
}
}
}
}
13 changes: 13 additions & 0 deletions kl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: v1
defaultEnv: test-env
packages:
- nodejs@latest
- nodePackages.pnpm@latest
- git@latest
- vim@latest
initScripts:
- pnpm config set store-dir ~/.pnpm-store
mounts: []
envVars:
- key: HI
configRef: piy-config/hi
15 changes: 7 additions & 8 deletions lib/app-setup/api.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IMiddlewareResponse, withRPC } from '../server/helpers/rpc';
import { IGQLServerProps, IRemixCtx } from '../types/common';
import { IMiddlewareResponse, withRPC } from "../server/helpers/rpc";
import { IGQLServerProps, IRemixCtx } from "../types/common";

export const RootAPIAction =
(
Expand All @@ -8,11 +8,11 @@ export const RootAPIAction =
}
) =>
async (ctx: IRemixCtx) => {
if (ctx.request.method !== 'POST') {
return new Response(JSON.stringify({ message: 'Not Found' }), {
if (ctx.request.method !== "POST") {
return new Response(JSON.stringify({ message: "Not Found" }), {
status: 404,
headers: {
'Content-Type': 'application/json',
"Content-Type": "application/json",
},
});
}
Expand All @@ -38,11 +38,10 @@ export const RootAPIAction =
);
}
);

return new Response(JSON.stringify({ data, errors }), {
headers: {
'Content-Type': 'application/json',
...(cookie ? { 'set-cookie': cookie } : {}),
"Content-Type": "application/json",
...(cookie ? { "set-cookie": cookie } : {}),
},
});
};
Loading

0 comments on commit e842751

Please sign in to comment.