Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
7974ad58
"...text-generation-inference.git" did not exist on "47d7e344587198ded8a6c89e481b35f4d847fbcf"
Commit
7974ad58
authored
Jul 07, 2023
by
Jeffrey Morgan
Browse files
fix env var loading
parent
ad841384
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
7 deletions
+15
-7
app/package-lock.json
app/package-lock.json
+4
-4
app/package.json
app/package.json
+1
-1
app/src/telemetry.ts
app/src/telemetry.ts
+4
-2
app/webpack.main.config.ts
app/webpack.main.config.ts
+2
-0
app/webpack.plugins.ts
app/webpack.plugins.ts
+4
-0
No files found.
app/package-lock.json
View file @
7974ad58
...
...
@@ -29,7 +29,7 @@
"@electron-forge/plugin-webpack"
:
"^6.2.1"
,
"@electron-forge/publisher-github"
:
"^6.2.1"
,
"@types/chmodr"
:
"^1.0.0"
,
"@types/node"
:
"^20.
3.1
"
,
"@types/node"
:
"^20.
4.0
"
,
"@types/react"
:
"^18.2.14"
,
"@types/react-dom"
:
"^18.2.6"
,
"@types/uuid"
:
"^9.0.2"
,
...
...
@@ -2712,9 +2712,9 @@
"optional"
:
true
},
"node_modules/@types/node"
:
{
"version"
:
"20.
3.1
"
,
"resolved"
:
"https://registry.npmjs.org/@types/node/-/node-20.
3.1
.tgz"
,
"integrity"
:
"sha512-
EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEU
g=="
"version"
:
"20.
4.0
"
,
"resolved"
:
"https://registry.npmjs.org/@types/node/-/node-20.
4.0
.tgz"
,
"integrity"
:
"sha512-
jfT7iTf/4kOQ9S7CHV9BIyRaQqHu67mOjsIQBC3BKZvzvUB6zLxEwJ6sBE3ozcvP8kF6Uk5PXN0Q+c0dfhGX0
g=="
},
"node_modules/@types/parse-json"
:
{
"version"
:
"4.0.0"
,
...
...
app/package.json
View file @
7974ad58
...
...
@@ -31,7 +31,7 @@
"@electron-forge/plugin-webpack"
:
"^6.2.1"
,
"@electron-forge/publisher-github"
:
"^6.2.1"
,
"@types/chmodr"
:
"^1.0.0"
,
"@types/node"
:
"^20.
3.1
"
,
"@types/node"
:
"^20.
4.0
"
,
"@types/react"
:
"^18.2.14"
,
"@types/react-dom"
:
"^18.2.6"
,
"@types/uuid"
:
"^9.0.2"
,
...
...
app/src/telemetry.ts
View file @
7974ad58
import
{
Analytics
}
from
'
@segment/analytics-node
'
import
{
v4
as
uuidv4
}
from
'
uuid
'
import
Store
from
'
electron-store
'
const
Store
=
require
(
'
electron-store
'
)
const
store
=
new
Store
()
console
.
log
(
process
.
env
)
export
const
analytics
=
new
Analytics
({
writeKey
:
process
.
env
.
TELEMETRY_WRITE_KEY
||
'
<empty>
'
})
export
function
id
():
string
{
const
id
=
store
.
get
(
'
id
'
)
const
id
=
store
.
get
(
'
id
'
)
as
string
if
(
id
)
{
return
id
...
...
app/webpack.main.config.ts
View file @
7974ad58
import
type
{
Configuration
}
from
'
webpack
'
import
{
rules
}
from
'
./webpack.rules
'
import
{
plugins
}
from
'
./webpack.plugins
'
export
const
mainConfig
:
Configuration
=
{
/**
...
...
@@ -12,6 +13,7 @@ export const mainConfig: Configuration = {
module
:
{
rules
,
},
plugins
,
resolve
:
{
extensions
:
[
'
.js
'
,
'
.ts
'
,
'
.jsx
'
,
'
.tsx
'
,
'
.css
'
,
'
.json
'
],
},
...
...
app/webpack.plugins.ts
View file @
7974ad58
import
type
IForkTsCheckerWebpackPlugin
from
'
fork-ts-checker-webpack-plugin
'
import
{
DefinePlugin
}
from
'
webpack
'
// eslint-disable-next-line @typescript-eslint/no-var-requires
const
ForkTsCheckerWebpackPlugin
:
typeof
IForkTsCheckerWebpackPlugin
=
require
(
'
fork-ts-checker-webpack-plugin
'
)
...
...
@@ -7,4 +8,7 @@ export const plugins = [
new
ForkTsCheckerWebpackPlugin
({
logger
:
'
webpack-infrastructure
'
,
}),
new
DefinePlugin
({
'
process.env.TELEMETRY_WRITE_KEY
'
:
JSON
.
stringify
(
process
.
env
.
TELEMETRY_WRITE_KEY
),
}),
]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment