Skip to content

Commit 17b5889

Browse files
cdxkerskeptrunedev
authored andcommitted
ci(shopify): fix broken vite config for build
1 parent aed9db4 commit 17b5889

File tree

8 files changed

+59
-66
lines changed

8 files changed

+59
-66
lines changed

.github/workflows/push-shopify-server.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
branches:
1111
- "main"
1212
paths:
13-
- "clients/trieve-shopify-extension/"
13+
- "clients/trieve-shopify-extension/**"
1414

1515
jobs:
1616
shopify-plugin:
Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,30 @@
1-
# # Environment Configuration
2-
# .env
3-
# .env.*
4-
#
5-
# # Dependency directory
6-
# node_modules/*
7-
# node_modules
8-
#
1+
# Environment Configuration
2+
.env
3+
.env.*
4+
5+
# Dependency directory
6+
node_modules/*
7+
node_modules
8+
9+
# Test coverage directory
10+
coverage
11+
12+
# Ignore Apple macOS Desktop Services Store
13+
.DS_Store
14+
15+
# Logs
16+
logs
17+
*.log
18+
19+
# extensions build output
20+
extensions/*/build
21+
extensions/*/dist
22+
23+
# lock files
24+
25+
26+
27+
28+
# Ignore shopify files created during app dev
29+
.shopify/*
30+
.shopify.lock

clients/trieve-shopify-extension/.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,6 @@ extensions/*/dist
3131

3232
shopify.app.densumes-trieve-extension.toml
3333
shopify.app.cdxker-search-extension.toml
34-
shopify.app.vidyoot-testing.toml
34+
shopify.app.vidyoot-testing.toml
35+
36+
build/
Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,18 @@
1-
FROM node:18-alpine
2-
RUN apk add --no-cache openssl curl
1+
FROM node:22-alpine
2+
RUN apk add --no-cache openssl
33

44
EXPOSE 3000
55

66
WORKDIR /app
77

88
ENV NODE_ENV=production
99

10-
COPY package.json package-lock.json* ./
10+
COPY package.json yarn.lock vite.config.ts ./
1111

12-
RUN npm ci --omit=dev && npm cache clean --force
13-
# Remove CLI packages since we don't need them in production by default.
14-
# Remove this line if you want to run CLI commands in your container.
15-
RUN npm remove @shopify/cli
12+
RUN yarn install --frozen-lockfile
1613

1714
COPY . .
1815

19-
RUN npm run build
16+
RUN yarn build
2017

21-
# RUN curl -fsSLO https://github.com/subtrace/subtrace/releases/download/b257/subtrace-linux-amd64 \
22-
# && chmod +x ./subtrace-linux-amd64
23-
24-
# CMD ["./subtrace-linux-amd64", "run", "-tls=true", "--", "npm", "run", "docker-start"]
25-
CMD ["npm", "run", "docker-start"]
18+
CMD ["yarn", "run", "docker-start"]

clients/trieve-shopify-extension/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ services:
1717
- "7432:5432"
1818

1919
shopify-plugin:
20-
image: trieve/shopify-plugin:dens-test
20+
image: trieve/shopify-plugin
2121
build:
2222
context: .
2323
ports:

clients/trieve-shopify-extension/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@
4545
"prisma": "^5.11.0",
4646
"react": "^18.2.0",
4747
"react-dom": "^18.2.0",
48-
"trieve-ts-sdk": "../ts-sdk",
49-
"vite-tsconfig-paths": "^5.0.1"
48+
"trieve-ts-sdk": "*",
49+
"vite-tsconfig-paths": "^5.0.1",
50+
"tailwindcss": "^3.4.17",
51+
"autoprefixer": "^10.4.20"
5052
},
5153
"devDependencies": {
5254
"@remix-run/eslint-config": "^2.7.1",
@@ -58,12 +60,10 @@
5860
"@types/node": "^22.2.0",
5961
"@types/react": "^18.2.31",
6062
"@types/react-dom": "^18.2.14",
61-
"autoprefixer": "^10.4.20",
6263
"eslint": "^8.42.0",
6364
"eslint-config-prettier": "^9.1.0",
6465
"postcss": "^8.5.1",
6566
"prettier": "^3.2.4",
66-
"tailwindcss": "^3.4.17",
6767
"typescript": "^5.2.2",
6868
"vite": "^5.1.3"
6969
},

clients/trieve-shopify-extension/vite.config.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,9 @@ export default defineConfig(({ mode }) => {
4848
// See https://vitejs.dev/config/server-options.html#server-fs-allow for more information
4949
allow: ["app", "node_modules"],
5050
},
51-
allowedHosts: [
52-
(process.env.TRIEVE_AUTH_URL || env.TRIEVE_AUTH_URL)!.replace(
53-
"https://",
54-
""
55-
),
56-
],
51+
allowedHosts: (process.env.TRIEVE_AUTH_URL || env.TRIEVE_AUTH_URL)
52+
? [(process.env.TRIEVE_AUTH_URL || env.TRIEVE_AUTH_URL).replace("https://", "")]
53+
: true,
5754
},
5855
plugins: [
5956
remix({

clients/trieve-shopify-extension/yarn.lock

Lines changed: 11 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2078,9 +2078,9 @@
20782078
integrity sha512-O4QXFFd7xqp6EX7sdvc9tsVO8nm4lpWBqwpgjpVLW5g7IeOY6VnS/xvs/YzbRhBVkKTMaJMOUGU7NhSX+YGoNg==
20792079

20802080
"@tanstack/react-query-devtools@^5.66.9":
2081-
version "5.67.3"
2082-
resolved "https://registry.yarnpkg.com/@tanstack/react-query-devtools/-/react-query-devtools-5.67.3.tgz#a1dc53e1a490697c85d70460930d8f5de810d78a"
2083-
integrity sha512-+PM2UnCyXAQozXB32cnawx38wwnaHPTtFAhX1V5QmHy/FL1u9k7nd8nxn2+GTwf15SGbUaGfxA/vq/9EARUEIQ==
2081+
version "5.69.0"
2082+
resolved "https://registry.yarnpkg.com/@tanstack/react-query-devtools/-/react-query-devtools-5.69.0.tgz#2cb8083028aab591b9a82caf68cd7a383a0c8b1a"
2083+
integrity sha512-sYklnou3IKAemqB5wJeBwjmG5bUGDKAL5/I4pVA+aqSnsNibVLt8/pAU976uuJ5K71w71bHtI/AMxiIs3gtkEA==
20842084
dependencies:
20852085
"@tanstack/query-devtools" "5.67.2"
20862086

@@ -7849,16 +7849,8 @@ string-hash@^1.1.3:
78497849
resolved "https://registry.yarnpkg.com/string-hash/-/string-hash-1.1.3.tgz#e8aafc0ac1855b4666929ed7dd1275df5d6c811b"
78507850
integrity sha512-kJUvRUFK49aub+a7T1nNE66EJbZBMnBgoC1UbCZ5n6bsZKBRga4KgBRTMn/pFkeCZSYtNeSyMxPDM0AXWELk2A==
78517851

7852-
"string-width-cjs@npm:string-width@^4.2.0":
7853-
version "4.2.3"
7854-
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
7855-
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
7856-
dependencies:
7857-
emoji-regex "^8.0.0"
7858-
is-fullwidth-code-point "^3.0.0"
7859-
strip-ansi "^6.0.1"
7860-
7861-
string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
7852+
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
7853+
name string-width-cjs
78627854
version "4.2.3"
78637855
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
78647856
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -7966,14 +7958,7 @@ stringify-entities@^4.0.0:
79667958
character-entities-html4 "^2.0.0"
79677959
character-entities-legacy "^3.0.0"
79687960

7969-
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
7970-
version "6.0.1"
7971-
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
7972-
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
7973-
dependencies:
7974-
ansi-regex "^5.0.1"
7975-
7976-
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
7961+
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
79777962
version "6.0.1"
79787963
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
79797964
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@@ -8197,8 +8182,10 @@ tr46@~0.0.3:
81978182
resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a"
81988183
integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==
81998184

8200-
trieve-ts-sdk@../ts-sdk:
8185+
trieve-ts-sdk@*:
82018186
version "0.0.67"
8187+
resolved "https://registry.yarnpkg.com/trieve-ts-sdk/-/trieve-ts-sdk-0.0.67.tgz#193bee81ff3234bed13259134f91c31def7bebb2"
8188+
integrity sha512-rsC9cBvxjqNarxySJ26YpTiMiO8yVTwF1+vtxCElWeDZ2PhCKB9j+BUYVvb4y8m03JNaxU35i+U+1zxo0QwkCg==
82028189

82038190
trim-lines@^3.0.0:
82048191
version "3.0.1"
@@ -8763,7 +8750,8 @@ word-wrap@^1.2.5:
87638750
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34"
87648751
integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==
87658752

8766-
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
8753+
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
8754+
name wrap-ansi-cjs
87678755
version "7.0.0"
87688756
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
87698757
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
@@ -8781,15 +8769,6 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0:
87818769
string-width "^4.1.0"
87828770
strip-ansi "^6.0.0"
87838771

8784-
wrap-ansi@^7.0.0:
8785-
version "7.0.0"
8786-
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
8787-
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
8788-
dependencies:
8789-
ansi-styles "^4.0.0"
8790-
string-width "^4.1.0"
8791-
strip-ansi "^6.0.0"
8792-
87938772
wrap-ansi@^8.1.0:
87948773
version "8.1.0"
87958774
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"

0 commit comments

Comments
 (0)