-
Notifications
You must be signed in to change notification settings - Fork 0
Enable displaying FalkorDB version to customers in sas builder #130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 250 commits
bcaff40
f258012
b3d3c86
97df4af
677db72
c9bb0f9
57d9505
ab2d24e
b00eb5d
9881dc0
5b2148f
7edf8b8
1353429
2629cf6
9d2290d
5ce5039
b2041c4
9a2d4cf
31cf638
b030de7
88c8df7
6e62791
70d380b
f77f9e4
e485f26
1f7506e
b5e55d4
8c83813
9c9199b
257b48a
e2074d6
ebca983
df0574c
b800df6
a9bb831
257b443
d54d510
7569236
99abb81
7b0944f
434f4d1
41b3afa
1a5e37b
03bb6e3
df91c21
dce46ac
75f0e6c
9d66c9e
fd15a0f
13a7e43
e5fd155
a2978b1
21cb852
f8a106a
4bb2781
ea8789f
caa1203
b4fbf6c
e04250f
6bf8c42
c3fe1ef
e37b2ce
83a1c03
ef913e4
74ae4fd
b3ed8d1
1e381a6
cbe6cfc
4a6e7b6
ba796aa
47b19d0
88ea84e
74b9d18
9d35d66
42fe1af
a63ed58
63d29c1
a7c5661
e75b346
f23e181
8b4a5ee
968e7bc
17934c7
8e8767a
5f732fe
70165cf
839ad8e
269a9c6
b2ade92
1c98c03
f76a1d4
e8b50d6
7ff7bfd
639c131
ee40811
ea3da89
a61eaf3
182027b
0866cf2
6f37054
5271b89
439b664
696266b
4608440
708b61a
d6edc44
1a78d56
d886e2b
ac7e8ef
733832e
0d3a816
e10097e
4d8bdb8
db04a15
3cee7c8
c29e1cc
6eaf4d8
6b189ff
b39068c
e86e58a
b4e4ba1
ea6459e
e7bfe8d
e8dbe0b
7a220cb
b89fc40
7259ca1
1e0639f
2e7b0ab
fc33187
60bb07a
68b678e
6d3a7fc
75cec2b
fc34f06
963a260
26d3d93
a89e5c3
3fb429c
12c1220
b330593
3d6b424
b13873e
74064df
03f364b
9e77a8c
5b2abdf
57b1291
36524bc
a36a125
530e534
bef0957
0890719
a4e426e
69f4cf1
649178a
7dc2e0a
9639257
26fd0f2
d7436a6
62b31f8
d146193
2d91b85
caf7efd
f49cc24
25b2eba
f676c0b
cad656b
55666c1
f7af166
6f8d727
732ab09
2e23474
3fa761d
6f38c6e
6f6ef1e
9278fda
287cb2f
3713024
a9ea107
b638fc5
6176d3f
245a00c
273e3d8
3e5e650
a777eba
f872f80
a774507
38c5e7f
43f2828
9ffb582
8457287
ec6c333
3e45bd4
ab75050
1d87fa2
ddf007e
826723c
6ed6251
b5ad1c6
6f8cff9
96a4879
bf9a5fa
d1a3259
fd91e2d
113f6f4
fe77009
763c6d5
7dfbd26
7c689b7
d32f177
83a69d8
92c70b7
5338735
ab685fa
bcd7f36
e740e32
b97711c
a02f87e
4248577
7fb4132
be2273f
2fabc0d
b1539ed
ea88961
4dc38d0
45644da
46954bd
612b9bc
776ea89
1e56c15
19e997d
c727c00
19d2194
b7f9bf5
ef9b52c
f91bccf
68f831a
133878b
fa07085
27eb700
be0e171
cab8e2a
6fdc90b
0ff681d
2d8f637
8fcdd7b
46424d4
4d5548c
3cd2b23
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,7 @@ | |
|
|
||
| # production | ||
| /build | ||
| /dist | ||
|
|
||
| # misc | ||
| .DS_Store | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,7 +22,16 @@ RUN yarn install --frozen-lockfile --production=false --network-timeout 1000000 | |
| COPY --link . . | ||
|
|
||
| # Build application | ||
| RUN yarn run build | ||
| RUN --mount=type=cache,target=/root/.cache/yarn \ | ||
| yarn run build:frontend | ||
|
|
||
| # Remove development dependencies | ||
| RUN --mount=type=cache,target=/root/.cache/yarn \ | ||
| yarn install --production=true --network-timeout 1000000 | ||
|
|
||
| # Remove development dependencies | ||
| RUN --mount=type=cache,target=/root/.cache/yarn \ | ||
| yarn install --production=true --network-timeout 1000000 | ||
|
Comment on lines
+33
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. performance: Redundant yarn install command. Remove this duplicate command to improve build time and reduce potential inconsistencies. |
||
|
|
||
| # Final stage for app image | ||
| FROM base | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,56 @@ | ||||||
| # syntax = docker/dockerfile:1 | ||||||
|
|
||||||
| # Adjust NODE_VERSION as desired | ||||||
| ARG NODE_VERSION=20.11.1 | ||||||
| FROM node:${NODE_VERSION}-slim as base | ||||||
|
|
||||||
| # App lives here | ||||||
| WORKDIR /app | ||||||
|
|
||||||
| # Set production environment | ||||||
| ENV NODE_ENV="production" | ||||||
| ARG YARN_VERSION=1.22.21 | ||||||
| RUN npm install -g yarn@$YARN_VERSION --force | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. security: Missing --ignore-scripts in npm install. Add --ignore-scripts to prevent execution of arbitrary scripts from dependencies.
Suggested change
|
||||||
|
|
||||||
|
|
||||||
| # Throw-away build stage to reduce size of final image | ||||||
| FROM base as build | ||||||
|
|
||||||
| # Install packages needed to build node modules | ||||||
| RUN apt-get update -qq && \ | ||||||
| apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3 | ||||||
|
|
||||||
| # Install node modules | ||||||
| COPY --link package.json yarn.lock ./ | ||||||
| RUN yarn install --frozen-lockfile --production=false | ||||||
|
|
||||||
| # Copy application code | ||||||
| COPY --link . . | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. security: Unrestricted |
||||||
|
|
||||||
| # Build application | ||||||
| RUN yarn run build:mail | ||||||
|
|
||||||
| # Remove development dependencies | ||||||
| RUN yarn install --production=true | ||||||
|
|
||||||
|
|
||||||
| # Final stage for app image | ||||||
| FROM base | ||||||
|
|
||||||
| ENV NODE_ENV production | ||||||
| RUN addgroup --system --gid 1001 nodejs | ||||||
| RUN adduser --system --uid 1001 nextjs | ||||||
|
|
||||||
| # Copy built application | ||||||
| COPY --from=build /app /app | ||||||
| COPY --from=build /app/src/server/mail-service/ejsTemplates /app/dist/ejsTemplates | ||||||
|
|
||||||
| RUN chown -R nextjs:nodejs /app | ||||||
|
|
||||||
| # Start the server by default, this can be overwritten at runtime | ||||||
| EXPOSE 3000 | ||||||
|
|
||||||
| USER nextjs | ||||||
|
|
||||||
|
|
||||||
| CMD [ "node", "dist/mail-server/index.js" ] | ||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -142,7 +142,7 @@ type Overlay = "plan-details" | "documentation" | "pricing" | "support" | "api-d | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const Sidebar = () => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const currentPath = usePathname(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const { serviceOfferings } = useGlobalData(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const { serviceOfferings, subscriptions } = useGlobalData(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const [isOverlayOpen, setIsOverlayOpen] = useState(false); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const [overlayType, setOverlayType] = useState<Overlay>("plan-details"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const [expandedMenus, setExpandedMenus] = useState({ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -171,17 +171,21 @@ const Sidebar = () => { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const showCloudProvidersPage = useMemo(() => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return Boolean( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| serviceOfferings.find( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| (offering) => offering.serviceModelType === "BYOA" || offering.serviceModelType === "ON_PREM_COPILOT" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| subscriptions.find(s => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const offering = serviceOfferings.find(o => s.productTierId === o.productTierID); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return offering?.serviceModelType === "BYOA" || offering?.serviceModelType === "ON_PREM_COPILOT" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, [serviceOfferings]); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, [serviceOfferings, subscriptions]); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const showCustomNetworksPage = useMemo(() => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return Boolean( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| serviceOfferings.some((offering) => offering.serviceModelFeatures?.find((el) => el.feature === "CUSTOM_NETWORKS")) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| subscriptions.find(s => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const offering = serviceOfferings.find(o => s.productTierId === o.productTierID) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return offering?.serviceModelFeatures?.find((el) => el.feature === "CUSTOM_NETWORKS"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, [serviceOfferings]); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, [serviceOfferings, subscriptions]); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
175
to
+191
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. performance: Inefficient nested find on arrays. Use 'serviceOfferingsObj' for O(1) lookup to improve performance.
Comment on lines
175
to
+191
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Guard against undefined global data before calling If ✅ Proposed fix const showCloudProvidersPage = useMemo(() => {
- return Boolean(
- subscriptions.find(s => {
- const offering = serviceOfferings.find(o => s.productTierId === o.productTierID);
- return offering?.serviceModelType === "BYOA" || offering?.serviceModelType === "ON_PREM_COPILOT"
- })
- );
+ const subs = subscriptions ?? [];
+ const offerings = serviceOfferings ?? [];
+ return subs.some((s) => {
+ const offering = offerings.find((o) => s.productTierId === o.productTierID);
+ return (
+ offering?.serviceModelType === "BYOA" ||
+ offering?.serviceModelType === "ON_PREM_COPILOT"
+ );
+ });
}, [serviceOfferings, subscriptions]);
const showCustomNetworksPage = useMemo(() => {
- return Boolean(
- subscriptions.find(s => {
- const offering = serviceOfferings.find(o => s.productTierId === o.productTierID)
- return offering?.serviceModelFeatures?.find((el) => el.feature === "CUSTOM_NETWORKS");
- })
- );
+ const subs = subscriptions ?? [];
+ const offerings = serviceOfferings ?? [];
+ return subs.some((s) => {
+ const offering = offerings.find((o) => s.productTierId === o.productTierID);
+ return offering?.serviceModelFeatures?.some(
+ (el) => el.feature === "CUSTOM_NETWORKS"
+ );
+ });
}, [serviceOfferings, subscriptions]);📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Prefetch Billing Data | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const billingStatusQuery = useBillingStatus(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
security: Missing --ignore-scripts in yarn install. Add --ignore-scripts to prevent execution of arbitrary scripts from dependencies.