Skip to content

Commit c68635d

Browse files
committed
Release version 1.0.89
2 parents ec8dd74 + 2e6d996 commit c68635d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+7716
-16332
lines changed

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
*.md
55
!README.md
66
**/node_modules
7-
**/db/demo-db
7+
**/db/demo-db

Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
FROM node:lts-bullseye-slim as clientBuilder
22

3-
ENV NODE_ENV "production"
43
ENV NODE_OPTIONS=--openssl-legacy-provider
54

65
RUN mkdir /app
76
WORKDIR /app
87
COPY client/package.json .
98
COPY client/package-lock.json .
10-
RUN npm ci --legacy-peer-deps
9+
RUN npm ci
1110
COPY client .
12-
11+
ENV NODE_ENV "production"
1312
RUN npm run build
1413
RUN echo package.json
1514

@@ -44,7 +43,7 @@ RUN npm ci --quiet
4443

4544
COPY --from=serverBuilder /usr/src/app/build ./
4645
COPY ./server/uploads ./uploads
47-
COPY --from=clientBuilder /app/build ./client/build
46+
COPY --from=clientBuilder app/dist ./client/build
4847

4948
# we don't want to run as sudo so create group and user
5049
RUN groupadd -r fola && useradd --no-log-init -r -g fola fola

client/.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
REACT_APP_TENANT_ID=1
2-
REACT_APP_MAPBOX_ACCESS_TOKEN=pk.eyJ1IjoibHVjYXNob21lciIsImEiOiJjazFqcnRjcm0wNmZ1M2JwZXg2eDFzMXd3In0.yYpkKLrFCxF-qyBfZH1a8w
1+
VITE_TENANT_ID=1
2+
VITE_MAPBOX_ACCESS_TOKEN=pk.eyJ1IjoibHVjYXNob21lciIsImEiOiJjazFqcnRjcm0wNmZ1M2JwZXg2eDFzMXd3In0.yYpkKLrFCxF-qyBfZH1a8w
33
SKIP_PREFLIGHT_CHECK=true

client/__mocks__/fileMock.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = "test-file-stub";

client/__mocks__/styleMock.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = {};

client/babel.config.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"presets": [
3+
["@babel/preset-env", { "targets": { "node": "current" } }],
4+
["@babel/preset-react", { "runtime": "automatic" }],
5+
[
6+
"babel-preset-vite",
7+
{
8+
"env": true,
9+
"glob": false
10+
}
11+
]
12+
]
13+
}

client/craco.config.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

client/public/index.html renamed to client/index.html

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<!DOCTYPE html>
22
<html lang="en" height="100%">
33
<head>
4-
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
4+
<link rel="shortcut icon" href="/favicon.ico" />
55
<meta name="viewport" content="minimum-scale=1, initial-scale=1" />
66
<!-- <meta
77
name="viewport"
88
content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no"
99
/> -->
1010
<meta name="theme-color" content="#000000" />
11-
<meta property="og:image" content="%PUBLIC_URL%/FoodOasisLogo.png" />
11+
<meta property="og:image" content="/FoodOasisLogo.png" />
1212
<meta property="og:image:type" content="image/png" />
1313
<meta property="og:image:width" content="639" />
1414
<meta property="og:image:height" content="162" />
@@ -17,7 +17,7 @@
1717
content="Food Oasis is a non-profit, volunteer-run directory of free food resources in the Los Angeles area."
1818
/>
1919
<meta property="og:locale" content="en_US" />
20-
<link rel="apple-touch-icon" href="%PUBLIC_URL%/favicon.ico" />
20+
<link rel="apple-touch-icon" href="/favicon.ico" />
2121
<link
2222
href="https://api.tiles.mapbox.com/mapbox-gl-js/v1.4.0/mapbox-gl.css"
2323
rel="stylesheet"
@@ -27,16 +27,7 @@
2727
manifest.json provides metadata used when your web app is installed on a
2828
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
2929
-->
30-
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
31-
<!--
32-
Notice the use of %PUBLIC_URL% in the tags above.
33-
It will be replaced with the URL of the `public` folder during the build.
34-
Only files inside the `public` folder can be referenced from the HTML.
35-
36-
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
37-
work correctly both with client-side routing and a non-root public URL.
38-
Learn how to configure a non-root public URL by running `npm run build`.
39-
-->
30+
<link rel="manifest" href="/manifest.json" />
4031
<style>
4132
html,
4233
#body,
@@ -107,5 +98,6 @@
10798
<div class="spinner"></div>
10899
</div>
109100
</div>
101+
<script type="module" src="/src/index.tsx"></script>
110102
</body>
111103
</html>

client/jest.config.cjs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
const { pathsToModuleNameMapper } = require("ts-jest");
2+
const { compilerOptions } = require("./tsconfig");
3+
4+
/** @type {import('ts-jest').JestConfigWithTsJest} */
5+
module.exports = {
6+
roots: ["<rootDir>"],
7+
preset: "ts-jest",
8+
testEnvironment: "./jest.environment.cjs",
9+
modulePaths: [compilerOptions.baseUrl],
10+
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths ?? {}),
11+
transform: {
12+
".+\\.(css|less|sass|scss|png|jpg|gif|ttf|woff|woff2|svg)$":
13+
"jest-transform-stub",
14+
"^.+\\.[t|j]sx?$": "babel-jest",
15+
},
16+
transformIgnorePatterns: [
17+
'node_modules/(?!' +
18+
[
19+
'debounce-fn',
20+
'mimic-fn',,
21+
].join('|') +
22+
')',
23+
],
24+
moduleFileExtensions: ["ts", "tsx", "js", "jsx"],
25+
setupFilesAfterEnv: ["<rootDir>/setupTests.ts"]
26+
};

client/jest.environment.cjs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const Environment = require("jest-environment-jsdom").default;
2+
3+
module.exports = class CustomTestEnvironment extends Environment {
4+
async setup() {
5+
await super.setup();
6+
this.global.TextEncoder = TextEncoder;
7+
this.global.TextDecoder = TextDecoder;
8+
this.global.Response = Response;
9+
this.global.Request = Request;
10+
11+
}
12+
};

0 commit comments

Comments
 (0)