Skip to content

Commit

Permalink
Merge pull request #381 from visgl/dt/workers-version-fix
Browse files Browse the repository at this point in the history
chore: prod update
  • Loading branch information
belom88 authored Nov 26, 2024
2 parents 3dead24 + 52589cf commit bc3d4ea
Show file tree
Hide file tree
Showing 311 changed files with 18,540 additions and 10,835 deletions.
1 change: 0 additions & 1 deletion .env

This file was deleted.

1 change: 1 addition & 0 deletions .env-template
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
REACT_APP_ARCGIS_REST_CLIENT_ID=abcd
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
build
coverage
src/index.html
61 changes: 56 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,59 @@
// eslint-disable-next-line no-undef
module.exports = {
root: true,
env: {
browser: true,
es2021: true,
},
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
rules: { "@typescript-eslint/no-explicit-any": "off" },
extends: ["standard-with-typescript", "plugin:react/recommended"],
// ignorePatterns: ["**/*.html"],
overrides: [
{
env: {
node: true,
},
files: [".eslintrc.{js,cjs}", "src/**/*.ts", "src/**/*.tsx"],
parserOptions: {
sourceType: "script",
},
},
],
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
project: ["./tsconfig.eslint.json"],
},
plugins: ["react"],
rules: {
"@typescript-eslint/semi": ["error", "always"],
"@typescript-eslint/strict-boolean-expressions": "off",
"@typescript-eslint/no-unsafe-argument": "warn",
"@typescript-eslint/quotes": ["error", "double"],
"@typescript-eslint/explicit-function-return-type": "warn",
"react/react-in-jsx-scope": "off",
"@typescript-eslint/comma-dangle": [
"error",
{
arrays: "always-multiline",
objects: "always-multiline",
imports: "always-multiline",
exports: "always-multiline",
enums: "always-multiline",
functions: "never",
},
],
"@typescript-eslint/member-delimiter-style": [
"error",
{
multiline: { delimiter: "semi", requireLast: true },
singleline: { delimiter: "semi", requireLast: false },
multilineDetection: "brackets",
},
],
"@typescript-eslint/space-before-function-paren": "off",
},
settings: {
react: {
version: "18.2",
},
},
};
2 changes: 1 addition & 1 deletion .github/workflows/ProjectCI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: yarn build

- name: Run tests
run: yarn test
run: yarn test:ci
Linter:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules/
build/
coverage/
.env
28 changes: 28 additions & 0 deletions __mocks__/@esri/arcgis-rest-portal.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
const mockContent = {
items: [
{
id: "new-york",
name: "NewYork.slpk",
url: "https://123.com",
created: 123456,
type: "Scene Service",
typeKeywords: "This is a Hosted Service",
title: "New York",
token: "token-https://123.com",
},
{
id: "turanga-library",
name: "TurangaLibrary.slpk",
url: "https://456.com",
created: 123457,
type: "Scene Service",
typeKeywords: "This is a Hosted Service",
title: "Turanga Library",
token: "token-https://456.com",
},
],
};

export const getUserContent = async (authentication) => {
return mockContent;
};
31 changes: 31 additions & 0 deletions __mocks__/@esri/arcgis-rest-request.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
const mockEmailExpected = "[email protected]";
const mockSessionExpected = '{"usermail": "usermail"}';
const mockTokenExpectedPrefix = "token-";

const session = {
usermail: mockEmailExpected,
serialize: () => {
return mockSessionExpected;
},
getUser: async () => {
return { email: mockEmailExpected };
},
getToken: async (url: string) => {
return mockTokenExpectedPrefix + url;
},
};

export class ArcGISIdentityManager {
static beginOAuth2 = async () => {
return session;
};
static completeOAuth2 = async () => {
return;
};
static destroy = async () => {
return;
};
static deserialize = () => {
return session;
};
}
8 changes: 5 additions & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ module.exports = {
// globals: {},

// The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
// maxWorkers: "50%",
maxWorkers: "50%",

// An array of directory names to be searched recursively up from the requiring module's location
// moduleDirectories: [
Expand Down Expand Up @@ -141,7 +141,7 @@ module.exports = {
// snapshotSerializers: [],

// The test environment that will be used for testing
testEnvironment: "jsdom",
// testEnvironment: "jsdom",

// Options that will be passed to the testEnvironment
// testEnvironmentOptions: {},
Expand Down Expand Up @@ -195,5 +195,7 @@ module.exports = {

// Whether to use watchman for file crawling
// watchman: true,
testTimeout: 15000,
testTimeout: 10000,

workerIdleMemoryLimit: "50MB",
};
127 changes: 76 additions & 51 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,93 +2,118 @@
"name": "i3s-explorer",
"version": "1.0.0",
"private": false,
"main": "index.js",
"scripts": {
"start": "webpack serve --config ./webpack.dev.config.js",
"start-local-deck": "webpack serve --config ./webpack.dev.config.js --env deck",
"start-local-loaders": "webpack serve --config ./webpack.dev.config.js --env loaders",
"start-local-loaders-deck": "webpack serve --config ./webpack.dev.config.js --env loaders --env deck",
"start-local-luma": "webpack serve --config ./webpack.dev.config.js --env luma",
"build": "webpack --config ./webpack.prod.config.js",
"test:unit": "jest --testPathIgnorePatterns=e2e.*.spec.ts",
"test:unit:debug": "node --inspect-brk node_modules/.bin/jest --runInBand --testPathIgnorePatterns=e2e.*.spec.ts",
"test:unit": "jest --testPathIgnorePatterns=e2e.*.spec.ts$ --env=jsdom",
"test:unit:ci": "jest --testPathIgnorePatterns=e2e.*.spec.ts$ --env=jsdom --ci",
"test:unit:debug": "node --inspect-brk node_modules/.bin/jest --runInBand --testPathIgnorePatterns=e2e.*.spec.ts --env=jsdom",
"test:e2e": "jest --testPathPattern=e2e.*.spec.ts$ --collectCoverage=false",
"test:e2e:ci": "jest --testPathPattern=e2e.*.spec.ts$ --collectCoverage=false --bail=1 --verbose --ci",
"test:e2e:debug": "node --inspect-brk node_modules/.bin/jest --testPathPattern=e2e.*.spec.ts$ --collectCoverage=false",
"test": "yarn test:unit && yarn test:e2e",
"lint": "eslint src"
"test:ci": "yarn test:unit:ci && yarn test:e2e:ci",
"lint": "eslint \"src/**\" && tsc --project tsconfig.eslint.json",
"lint:fix": "eslint \"src/**\" --fix"
},
"author": "",
"license": "ISC",
"dependencies": {
"@arcgis/core": "^4.28.7",
"@deck.gl-community/layers": "0.0.0",
"@deck.gl/arcgis": "^8.9.32",
"@deck.gl/core": "^8.9.32",
"@deck.gl/extensions": "^8.9.32",
"@deck.gl/geo-layers": "^8.9.32",
"@deck.gl/layers": "^8.9.32",
"@deck.gl/mesh-layers": "^8.9.32",
"@deck.gl/react": "^8.9.32",
"@esri/arcgis-rest-auth": "^3.7.0",
"@esri/arcgis-rest-portal": "^4.4.0",
"@esri/arcgis-rest-request": "^4.2.0",
"@esri/react-arcgis": "^5.2.0",
"@fortawesome/fontawesome-svg-core": "^1.2.36",
"@fortawesome/free-solid-svg-icons": "^5.15.4",
"@fortawesome/react-fontawesome": "^0.1.17",
"@hyperjump/json-schema": "^0.23.2",
"@loaders.gl/3d-tiles": "^4.0.0-beta.8",
"@loaders.gl/core": "^4.0.0-beta.8",
"@loaders.gl/i3s": "^4.0.0-beta.8",
"@loaders.gl/tiles": "^4.0.0-beta.8",
"@loaders.gl/3d-tiles": "^4.1.0-alpha.11",
"@loaders.gl/core": "^4.1.0-alpha.11",
"@loaders.gl/i3s": "^4.1.0-alpha.11",
"@loaders.gl/tiles": "^4.1.0-alpha.11",
"@luma.gl/core": "^8.5.14",
"@math.gl/core": "^3.6.0",
"@math.gl/proj4": "^3.6.3",
"@probe.gl/stats": "^4.0.4",
"@reduxjs/toolkit": "^1.9.5",
"@reduxjs/toolkit": "^2.2.1",
"apache-arrow": "^13.0.0",
"deck.gl": "^8.8.3",
"dotenv": "^16.3.1",
"html2canvas": "^1.4.1",
"maplibre-gl": "^3.5.2",
"normalize.css": "^8.0.1",
"prop-types": "^15.8.1",
"react": "^17.0.2",
"react": "^18.2.0",
"react-color": "^2.19.3",
"react-dom": "^17.0.2",
"react-map-gl": "^5.0.0",
"react-redux": "^8.1.1",
"react-responsive": "^9.0.0-beta.8",
"react-router-dom": "^6.2.1",
"react-tiny-popover": "^7.1.0",
"recharts": "^2.1.13",
"react-colorful": "^5.6.1",
"react-dom": "^18.2.0",
"react-map-gl": "^7.1.6",
"react-redux": "^9.1.0",
"react-responsive": "^9.0.2",
"react-router-dom": "^6.22.2",
"react-tiny-popover": "^8.0.4",
"recharts": "^2.12.2",
"regenerator-runtime": "^0.13.9",
"styled-components": "^5.3.3",
"styled-components": "^6.1.8",
"stylis": "^4.0.0",
"uuid": "^9.0.0"
},
"devDependencies": {
"@babel/core": "^7.17.0",
"@babel/preset-env": "^7.16.11",
"@babel/preset-react": "^7.16.7",
"@babel/preset-typescript": "^7.16.7",
"@svgr/webpack": "^6.2.1",
"@testing-library/dom": "^8.11.3",
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/react": "^12.1.4",
"@babel/core": "^7.24.3",
"@babel/preset-env": "^7.24.3",
"@babel/preset-react": "^7.24.1",
"@babel/preset-typescript": "^7.24.1",
"@svgr/webpack": "^8.1.0",
"@testing-library/dom": "^9.3.4",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^14.2.1",
"@testing-library/react-hooks": "^8.0.1",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.4.0",
"@types/react": "^17.0.38",
"@types/react-color": "^3.0.6",
"@types/react-dom": "^17.0.11",
"@testing-library/user-event": "^14.5.2",
"@types/expect-puppeteer": "^5.0.6",
"@types/jest": "^29.5.12",
"@types/react": "^18.2.67",
"@types/react-dom": "^18.2.22",
"@types/recharts": "^1.8.23",
"@types/styled-components": "^5.1.21",
"@typescript-eslint/eslint-plugin": "^5.11.0",
"@typescript-eslint/parser": "^5.11.0",
"babel-loader": "^8.2.3",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"babel-loader": "^9.1.3",
"babel-polyfill": "^6.26.0",
"css-loader": "^6.7.1",
"eslint": "^8.8.0",
"css-loader": "^6.10.0",
"dotenv": "^16.3.1",
"eslint": "^8.57.0",
"eslint-config-standard-with-typescript": "^43.0.1",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-n": "^15.0.0 || ^16.0.0 ",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-react": "^7.34.0",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.5.0",
"jest": "^27.5.1",
"jest-puppeteer": "^6.1.0",
"puppeteer": "^13.2.0",
"serve": "^13.0.2",
"style-loader": "^3.3.1",
"ts-loader": "^9.2.6",
"typescript": "^4.5.5",
"webpack": "^5.68.0",
"webpack-cli": "^4.9.2",
"webpack-dev-server": "^4.7.4"
"html-webpack-plugin": "^5.6.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest-puppeteer": "^10.0.1",
"puppeteer": "^22.4.0",
"serve": "^14.2.1",
"style-loader": "^3.3.4",
"ts-loader": "^9.5.1",
"typescript": "^5.4.2",
"typescript-plugin-styled-components": "^3.0.0",
"webpack": "^5.91.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.0.4"
},
"resolutions": {
"@loaders.gl/tiles": "^4.0.0-beta.8"
"@loaders.gl/tiles": "^4.1.0-alpha.11"
},
"volta": {
"node": "18.18.2",
Expand Down
Binary file added public/icons/basemaps/arcgis-dark-gray.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/basemaps/arcgis-light-gray.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/basemaps/arcgis-streets-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/basemaps/arcgis-streets.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/basemaps/custom-map.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/basemaps/maplibre-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/basemaps/maplibre-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icons/basemaps/terrain.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions public/icons/custom-map.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/icons/import.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/icons/logout.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/icons/terrain-map.png
Binary file not shown.
Loading

0 comments on commit bc3d4ea

Please sign in to comment.