Skip to content

Commit

Permalink
Release version 1.0.89
Browse files Browse the repository at this point in the history
  • Loading branch information
entrotech committed Nov 28, 2024
2 parents ec8dd74 + 2e6d996 commit c68635d
Show file tree
Hide file tree
Showing 52 changed files with 7,716 additions and 16,332 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
*.md
!README.md
**/node_modules
**/db/demo-db
**/db/demo-db
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
FROM node:lts-bullseye-slim as clientBuilder

ENV NODE_ENV "production"
ENV NODE_OPTIONS=--openssl-legacy-provider

RUN mkdir /app
WORKDIR /app
COPY client/package.json .
COPY client/package-lock.json .
RUN npm ci --legacy-peer-deps
RUN npm ci
COPY client .

ENV NODE_ENV "production"
RUN npm run build
RUN echo package.json

Expand Down Expand Up @@ -44,7 +43,7 @@ RUN npm ci --quiet

COPY --from=serverBuilder /usr/src/app/build ./
COPY ./server/uploads ./uploads
COPY --from=clientBuilder /app/build ./client/build
COPY --from=clientBuilder app/dist ./client/build

# we don't want to run as sudo so create group and user
RUN groupadd -r fola && useradd --no-log-init -r -g fola fola
Expand Down
4 changes: 2 additions & 2 deletions client/.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
REACT_APP_TENANT_ID=1
REACT_APP_MAPBOX_ACCESS_TOKEN=pk.eyJ1IjoibHVjYXNob21lciIsImEiOiJjazFqcnRjcm0wNmZ1M2JwZXg2eDFzMXd3In0.yYpkKLrFCxF-qyBfZH1a8w
VITE_TENANT_ID=1
VITE_MAPBOX_ACCESS_TOKEN=pk.eyJ1IjoibHVjYXNob21lciIsImEiOiJjazFqcnRjcm0wNmZ1M2JwZXg2eDFzMXd3In0.yYpkKLrFCxF-qyBfZH1a8w
SKIP_PREFLIGHT_CHECK=true
1 change: 1 addition & 0 deletions client/__mocks__/fileMock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = "test-file-stub";
1 change: 1 addition & 0 deletions client/__mocks__/styleMock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {};
13 changes: 13 additions & 0 deletions client/babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"presets": [
["@babel/preset-env", { "targets": { "node": "current" } }],
["@babel/preset-react", { "runtime": "automatic" }],
[
"babel-preset-vite",
{
"env": true,
"glob": false
}
]
]
}
7 changes: 0 additions & 7 deletions client/craco.config.js

This file was deleted.

18 changes: 5 additions & 13 deletions client/public/index.html → client/index.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<!DOCTYPE html>
<html lang="en" height="100%">
<head>
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="shortcut icon" href="/favicon.ico" />
<meta name="viewport" content="minimum-scale=1, initial-scale=1" />
<!-- <meta
name="viewport"
content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no"
/> -->
<meta name="theme-color" content="#000000" />
<meta property="og:image" content="%PUBLIC_URL%/FoodOasisLogo.png" />
<meta property="og:image" content="/FoodOasisLogo.png" />
<meta property="og:image:type" content="image/png" />
<meta property="og:image:width" content="639" />
<meta property="og:image:height" content="162" />
Expand All @@ -17,7 +17,7 @@
content="Food Oasis is a non-profit, volunteer-run directory of free food resources in the Los Angeles area."
/>
<meta property="og:locale" content="en_US" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="apple-touch-icon" href="/favicon.ico" />
<link
href="https://api.tiles.mapbox.com/mapbox-gl-js/v1.4.0/mapbox-gl.css"
rel="stylesheet"
Expand All @@ -27,16 +27,7 @@
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<link rel="manifest" href="/manifest.json" />
<style>
html,
#body,
Expand Down Expand Up @@ -107,5 +98,6 @@
<div class="spinner"></div>
</div>
</div>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>
26 changes: 26 additions & 0 deletions client/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const { pathsToModuleNameMapper } = require("ts-jest");
const { compilerOptions } = require("./tsconfig");

/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
roots: ["<rootDir>"],
preset: "ts-jest",
testEnvironment: "./jest.environment.cjs",
modulePaths: [compilerOptions.baseUrl],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths ?? {}),
transform: {
".+\\.(css|less|sass|scss|png|jpg|gif|ttf|woff|woff2|svg)$":
"jest-transform-stub",
"^.+\\.[t|j]sx?$": "babel-jest",
},
transformIgnorePatterns: [
'node_modules/(?!' +
[
'debounce-fn',
'mimic-fn',,
].join('|') +
')',
],
moduleFileExtensions: ["ts", "tsx", "js", "jsx"],
setupFilesAfterEnv: ["<rootDir>/setupTests.ts"]
};
12 changes: 12 additions & 0 deletions client/jest.environment.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const Environment = require("jest-environment-jsdom").default;

module.exports = class CustomTestEnvironment extends Environment {
async setup() {
await super.setup();
this.global.TextEncoder = TextEncoder;
this.global.TextDecoder = TextDecoder;
this.global.Response = Response;
this.global.Request = Request;

}
};
Loading

0 comments on commit c68635d

Please sign in to comment.