Skip to content

Commit

Permalink
feature: make envs replaceable with envsubt for search and chat builds
Browse files Browse the repository at this point in the history
  • Loading branch information
skeptrunedev committed Mar 21, 2024
1 parent 492b835 commit 126b4f2
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 6 deletions.
1 change: 1 addition & 0 deletions .env.chat
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# .env.chat
VITE_API_HOST=http://localhost:8090/api
VITE_SEARCH_UI_URL="https://search.trieve.ai"
VITE_FRONTMATTER_VALS="link,tag_set,time_stamp"
4 changes: 4 additions & 0 deletions chat/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
postcss.config.cjs
prettier.config.cjs
tailwind.config.cjs
vite.config.ts
2 changes: 1 addition & 1 deletion chat/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
"prettier/prettier": ["error", { "endOfLine": "auto" }]
},
"overrides": [],
"ignorePatterns": ["node_modules", "dist", "tailwind.config.cjs", "prettier.config.cjs"]
"ignorePatterns": ["node_modules", "dist", "tailwind.config.cjs", "prettier.config.cjs", "vite.config.ts", "postcss.config.cjs"]
}
1 change: 1 addition & 0 deletions chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"tailwindcss": "^3.3.6",
"typescript": "^5.2.2",
"vite": "^5.0.0",
"vite-plugin-runtime-env": "^0.1.1",
"vite-plugin-solid": "^2.7.2"
}
}
6 changes: 5 additions & 1 deletion chat/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { defineConfig } from "vite";
import solid from "vite-plugin-solid";
import runtimeEnv from 'vite-plugin-runtime-env';

export default defineConfig({
plugins: [solid()],
plugins: [
solid(),
runtimeEnv(),
],
});
16 changes: 15 additions & 1 deletion chat/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@
resolved "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz"
integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==

"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14":
"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.4.15":
version "1.4.15"
resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz"
integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==
Expand Down Expand Up @@ -2331,6 +2331,13 @@ lru-cache@^6.0.0:
dependencies:
yallist "^4.0.0"

magic-string@^0.30.0:
version "0.30.8"
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.8.tgz#14e8624246d2bedba70d5462aa99ac9681844613"
integrity sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==
dependencies:
"@jridgewell/sourcemap-codec" "^1.4.15"

merge-anything@^5.1.7:
version "5.1.7"
resolved "https://registry.npmjs.org/merge-anything/-/merge-anything-5.1.7.tgz"
Expand Down Expand Up @@ -3228,6 +3235,13 @@ validate-html-nesting@^1.2.1:
resolved "https://registry.npmjs.org/validate-html-nesting/-/validate-html-nesting-1.2.2.tgz"
integrity sha512-hGdgQozCsQJMyfK5urgFcWEqsSSrK63Awe0t/IMR0bZ0QMtnuaiHzThW81guu3qx9abLi99NEuiaN6P9gVYsNg==

vite-plugin-runtime-env@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/vite-plugin-runtime-env/-/vite-plugin-runtime-env-0.1.1.tgz#70f396f915d0859611c5a7a04ccfcdbd53aa76ba"
integrity sha512-xm7aw/BV2o6avLi1UCR9mIG+KZVv2UQhoqb4gUIxhiP7hkiLCYnG3aTFLYrHb8CmAzXkTvBRb63yOnAgJWYbgA==
dependencies:
magic-string "^0.30.0"

vite-plugin-solid@^2.7.2:
version "2.8.0"
resolved "https://registry.npmjs.org/vite-plugin-solid/-/vite-plugin-solid-2.8.0.tgz"
Expand Down
3 changes: 2 additions & 1 deletion search/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
postcss.config.cjs
prettier.config.cjs
tailwind.config.cjs
tailwind.config.cjs
vite.config.ts
1 change: 1 addition & 0 deletions search/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"tailwindcss": "^3.3.6",
"typescript": "^5.2.2",
"vite": "^5.0.0",
"vite-plugin-runtime-env": "^0.1.1",
"vite-plugin-solid": "^2.7.2"
}
}
6 changes: 5 additions & 1 deletion search/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { defineConfig } from "vite";
import solid from "vite-plugin-solid";
import runtimeEnv from 'vite-plugin-runtime-env';

export default defineConfig({
plugins: [solid()],
plugins: [
solid(),
runtimeEnv(),
],
});
16 changes: 15 additions & 1 deletion search/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@
resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72"
integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==

"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14":
"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.4.15":
version "1.4.15"
resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32"
integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==
Expand Down Expand Up @@ -2206,6 +2206,13 @@ lru-cache@^6.0.0:
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.1.0.tgz#2098d41c2dc56500e6c88584aa656c84de7d0484"
integrity sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==

magic-string@^0.30.0:
version "0.30.8"
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.8.tgz#14e8624246d2bedba70d5462aa99ac9681844613"
integrity sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==
dependencies:
"@jridgewell/sourcemap-codec" "^1.4.15"

merge-anything@^5.1.7:
version "5.1.7"
resolved "https://registry.yarnpkg.com/merge-anything/-/merge-anything-5.1.7.tgz#94f364d2b0cf21ac76067b5120e429353b3525d7"
Expand Down Expand Up @@ -3073,6 +3080,13 @@ validate-html-nesting@^1.2.1:
resolved "https://registry.yarnpkg.com/validate-html-nesting/-/validate-html-nesting-1.2.2.tgz#2d74de14b598a0de671fad01bd71deabb93b8aca"
integrity sha512-hGdgQozCsQJMyfK5urgFcWEqsSSrK63Awe0t/IMR0bZ0QMtnuaiHzThW81guu3qx9abLi99NEuiaN6P9gVYsNg==

vite-plugin-runtime-env@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/vite-plugin-runtime-env/-/vite-plugin-runtime-env-0.1.1.tgz#70f396f915d0859611c5a7a04ccfcdbd53aa76ba"
integrity sha512-xm7aw/BV2o6avLi1UCR9mIG+KZVv2UQhoqb4gUIxhiP7hkiLCYnG3aTFLYrHb8CmAzXkTvBRb63yOnAgJWYbgA==
dependencies:
magic-string "^0.30.0"

vite-plugin-solid@^2.7.2:
version "2.8.0"
resolved "https://registry.yarnpkg.com/vite-plugin-solid/-/vite-plugin-solid-2.8.0.tgz#894bafdaac00b81f9cd3892b9eab314069e181ce"
Expand Down

0 comments on commit 126b4f2

Please sign in to comment.