Skip to content
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

Adding missing dependencies #1

Open
wants to merge 53 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
b26105d
Adding missing dependencies
dinukadesilva Aug 30, 2023
2b22b50
Adding `node_modules` and `.idea` to `.gitignore`
dinukadesilva Aug 30, 2023
8817d10
Adding the configurations to change the settings
dinukadesilva Oct 19, 2023
9a1429a
1.0.1
dinukadesilva Oct 19, 2023
ffbbdd0
Updated
dinukadesilva Oct 19, 2023
b1b7b69
1.0.2
dinukadesilva Oct 19, 2023
768c715
Eject
dinukadesilva Oct 30, 2023
8d376e7
Removed the build file hash
dinukadesilva Oct 30, 2023
69ea39c
1.0.3
dinukadesilva Oct 30, 2023
0b007a5
Updated
dinukadesilva Oct 30, 2023
f9dff7b
Refactoring
dinukadesilva Nov 3, 2023
42c0505
Remove chunks
dinukadesilva Nov 3, 2023
41f7f96
Fix keys
dinukadesilva Nov 3, 2023
c6896b1
1.0.3
dinukadesilva Nov 3, 2023
cf271b3
1.1.0
dinukadesilva Nov 3, 2023
dfea351
Updated the urls
dinukadesilva Nov 9, 2023
fff8775
Updated
dinukadesilva Nov 9, 2023
f75caac
1.1.1
dinukadesilva Nov 9, 2023
3d275fe
Updated the setup
dinukadesilva Nov 9, 2023
39ad241
0.1.1
dinukadesilva Nov 9, 2023
954ea4d
1.0.0
dinukadesilva Nov 9, 2023
b648ad9
2.0.0
dinukadesilva Nov 9, 2023
1d38ce5
Updated
dinukadesilva Nov 9, 2023
6ce526c
2.0.1
dinukadesilva Nov 9, 2023
085e98e
Minor improvements
dinukadesilva Nov 17, 2023
0843055
Removed the hash from assets
dinukadesilva Nov 17, 2023
e793df1
2.0.2
dinukadesilva Nov 17, 2023
bdee859
Updated
dinukadesilva Dec 4, 2023
3ab7462
2.0.3
dinukadesilva Dec 4, 2023
1839e88
Updated
dinukadesilva Dec 4, 2023
5477e9a
2.0.4
dinukadesilva Dec 4, 2023
52e0d28
Fix relations and removed the description from the search result
dinukadesilva Dec 13, 2023
ca50553
2.0.5
dinukadesilva Dec 13, 2023
8130e46
Updated scripts
dinukadesilva Dec 13, 2023
b78bf2c
2.0.8
dinukadesilva Dec 13, 2023
0edbdbd
Hide the "By Type" when there's no more than 1
dinukadesilva Jan 4, 2024
ac7fef4
2.0.9
dinukadesilva Jan 4, 2024
7dcf32a
Upgrading the styles according to ACCESS styleguide
dinukadesilva Jan 11, 2024
db48023
2.0.10
dinukadesilva Jan 11, 2024
3b03482
Fix the reset button bug
dinukadesilva Feb 1, 2024
1c0d938
2.0.11
dinukadesilva Feb 1, 2024
f8f14f4
Updated
dinukadesilva Feb 1, 2024
3f4cdea
2.0.12
dinukadesilva Feb 1, 2024
f6c89e3
Fix resource view alignments
dinukadesilva Feb 13, 2024
afe72de
Fix overlays
dinukadesilva Feb 13, 2024
4901bf0
Refactor styles
dinukadesilva Feb 13, 2024
0000d6c
2.0.13
dinukadesilva Feb 13, 2024
61eda19
Enable search on enter key press
dinukadesilva Mar 5, 2024
f1872e1
2.0.14
dinukadesilva Mar 5, 2024
68a87fc
Fix the react state management and life cycle methods usage
dinukadesilva Mar 7, 2024
eb5fa58
2.0.15
dinukadesilva Mar 7, 2024
ae3acd9
Enable auto focus on search input
dinukadesilva Mar 7, 2024
c75adfe
2.0.16
dinukadesilva Mar 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

.idea
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,44 @@
# APIDiscovery
Created with CodeSandbox

### Dependancies
```html
<link href="https://cdn.jsdelivr.net/gh/access-ci-org/[email protected]/b5_ac_conect/css/style.css" rel="stylesheet" crossorigin="anonymous">
```

# How to integrate on your website

```html
<script>
window.SETTINGS={
title:"ACCESS Resource Provider Software Discovery",
affiliation:"access-ci.org",
resourceGroup:"Software"
}
</script>
<script defer="defer" src="https://cdn.jsdelivr.net/gh/access-ci-org/[email protected]/build/static/js/main.js"></script>
<link href="https://cdn.jsdelivr.net/gh/access-ci-org/[email protected]/build/static/css/main.css" rel="stylesheet">

<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="Operations_WebApp_SoftwareDiscovery"></div>
```

# Build

## Development server

`npm run start`

[http://localhost:3000/](http://localhost:3000/)

## Release

`npm version patch`

or

`npm version minor`

or

`npm version major`
10 changes: 10 additions & 0 deletions build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"files": {
"main.js": "/static/js/main.js",
"index.html": "/index.html",
"main.js.map": "/static/js/main.js.map"
},
"entrypoints": [
"static/js/main.js"
]
}
Binary file added build/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions build/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link href="https://cdn.jsdelivr.net/gh/access-ci-org/[email protected]/b5_ac_conect/css/style.css" rel="stylesheet" crossorigin="anonymous"><script>window.SETTINGS={title:"ACCESS Resource Provider Software Discovery",affiliation:"access-ci.org",resourceGroup:"Software"}</script><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>React App</title><script defer="defer" src="/static/js/main.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="Operations_WebApp_SoftwareDiscovery"></div></body></html>
3 changes: 3 additions & 0 deletions build/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
3 changes: 3 additions & 0 deletions build/static/js/main.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ object-assign
*/

/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/

/*!
Expand All @@ -16,32 +16,27 @@ object-assign
*/

/**
* A better abstraction over CSS.
*
* @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present
* @website https://github.com/cssinjs/jss
* @license MIT
*/

/** @license React v0.20.2
* scheduler.production.min.js
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v16.13.1
* react-is.production.min.js
/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v16.14.0
/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
Expand All @@ -50,25 +45,26 @@ object-assign
* LICENSE file in the root directory of this source tree.
*/

/** @license React v17.0.0
* react-dom.production.min.js
/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v17.0.0
* react-jsx-runtime.production.min.js
/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v17.0.0
/** @license React v16.14.0
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
Expand Down
1 change: 1 addition & 0 deletions build/static/js/main.js.map

Large diffs are not rendered by default.

104 changes: 104 additions & 0 deletions config/env.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
'use strict';

const fs = require('fs');
const path = require('path');
const paths = require('./paths');

// Make sure that including paths.js after env.js will read .env variables.
delete require.cache[require.resolve('./paths')];

const NODE_ENV = process.env.NODE_ENV;
if (!NODE_ENV) {
throw new Error(
'The NODE_ENV environment variable is required but was not specified.'
);
}

// https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use
const dotenvFiles = [
`${paths.dotenv}.${NODE_ENV}.local`,
// Don't include `.env.local` for `test` environment
// since normally you expect tests to produce the same
// results for everyone
NODE_ENV !== 'test' && `${paths.dotenv}.local`,
`${paths.dotenv}.${NODE_ENV}`,
paths.dotenv,
].filter(Boolean);

// Load environment variables from .env* files. Suppress warnings using silent
// if this file is missing. dotenv will never modify any environment variables
// that have already been set. Variable expansion is supported in .env files.
// https://github.com/motdotla/dotenv
// https://github.com/motdotla/dotenv-expand
dotenvFiles.forEach(dotenvFile => {
if (fs.existsSync(dotenvFile)) {
require('dotenv-expand')(
require('dotenv').config({
path: dotenvFile,
})
);
}
});

// We support resolving modules according to `NODE_PATH`.
// This lets you use absolute paths in imports inside large monorepos:
// https://github.com/facebook/create-react-app/issues/253.
// It works similar to `NODE_PATH` in Node itself:
// https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders
// Note that unlike in Node, only *relative* paths from `NODE_PATH` are honored.
// Otherwise, we risk importing Node.js core modules into an app instead of webpack shims.
// https://github.com/facebook/create-react-app/issues/1023#issuecomment-265344421
// We also resolve them to make sure all tools using them work consistently.
const appDirectory = fs.realpathSync(process.cwd());
process.env.NODE_PATH = (process.env.NODE_PATH || '')
.split(path.delimiter)
.filter(folder => folder && !path.isAbsolute(folder))
.map(folder => path.resolve(appDirectory, folder))
.join(path.delimiter);

// Grab NODE_ENV and REACT_APP_* environment variables and prepare them to be
// injected into the application via DefinePlugin in webpack configuration.
const REACT_APP = /^REACT_APP_/i;

function getClientEnvironment(publicUrl) {
const raw = Object.keys(process.env)
.filter(key => REACT_APP.test(key))
.reduce(
(env, key) => {
env[key] = process.env[key];
return env;
},
{
// Useful for determining whether we’re running in production mode.
// Most importantly, it switches React into the correct mode.
NODE_ENV: process.env.NODE_ENV || 'development',
// Useful for resolving the correct path to static assets in `public`.
// For example, <img src={process.env.PUBLIC_URL + '/img/logo.png'} />.
// This should only be used as an escape hatch. Normally you would put
// images into the `src` and `import` them in code to get their paths.
PUBLIC_URL: publicUrl,
// We support configuring the sockjs pathname during development.
// These settings let a developer run multiple simultaneous projects.
// They are used as the connection `hostname`, `pathname` and `port`
// in webpackHotDevClient. They are used as the `sockHost`, `sockPath`
// and `sockPort` options in webpack-dev-server.
WDS_SOCKET_HOST: process.env.WDS_SOCKET_HOST,
WDS_SOCKET_PATH: process.env.WDS_SOCKET_PATH,
WDS_SOCKET_PORT: process.env.WDS_SOCKET_PORT,
// Whether or not react-refresh is enabled.
// It is defined here so it is available in the webpackHotDevClient.
FAST_REFRESH: process.env.FAST_REFRESH !== 'false',
}
);
// Stringify all values so we can feed into webpack DefinePlugin
const stringified = {
'process.env': Object.keys(raw).reduce((env, key) => {
env[key] = JSON.stringify(raw[key]);
return env;
}, {}),
};

return { raw, stringified };
}

module.exports = getClientEnvironment;
66 changes: 66 additions & 0 deletions config/getHttpsConfig.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
'use strict';

const fs = require('fs');
const path = require('path');
const crypto = require('crypto');
const chalk = require('react-dev-utils/chalk');
const paths = require('./paths');

// Ensure the certificate and key provided are valid and if not
// throw an easy to debug error
function validateKeyAndCerts({ cert, key, keyFile, crtFile }) {
let encrypted;
try {
// publicEncrypt will throw an error with an invalid cert
encrypted = crypto.publicEncrypt(cert, Buffer.from('test'));
} catch (err) {
throw new Error(
`The certificate "${chalk.yellow(crtFile)}" is invalid.\n${err.message}`
);
}

try {
// privateDecrypt will throw an error with an invalid key
crypto.privateDecrypt(key, encrypted);
} catch (err) {
throw new Error(
`The certificate key "${chalk.yellow(keyFile)}" is invalid.\n${
err.message
}`
);
}
}

// Read file and throw an error if it doesn't exist
function readEnvFile(file, type) {
if (!fs.existsSync(file)) {
throw new Error(
`You specified ${chalk.cyan(
type
)} in your env, but the file "${chalk.yellow(file)}" can't be found.`
);
}
return fs.readFileSync(file);
}

// Get the https config
// Return cert files if provided in env, otherwise just true or false
function getHttpsConfig() {
const { SSL_CRT_FILE, SSL_KEY_FILE, HTTPS } = process.env;
const isHttps = HTTPS === 'true';

if (isHttps && SSL_CRT_FILE && SSL_KEY_FILE) {
const crtFile = path.resolve(paths.appPath, SSL_CRT_FILE);
const keyFile = path.resolve(paths.appPath, SSL_KEY_FILE);
const config = {
cert: readEnvFile(crtFile, 'SSL_CRT_FILE'),
key: readEnvFile(keyFile, 'SSL_KEY_FILE'),
};

validateKeyAndCerts({ ...config, keyFile, crtFile });
return config;
}
return isHttps;
}

module.exports = getHttpsConfig;
29 changes: 29 additions & 0 deletions config/jest/babelTransform.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
'use strict';

const babelJest = require('babel-jest').default;

const hasJsxRuntime = (() => {
if (process.env.DISABLE_NEW_JSX_TRANSFORM === 'true') {
return false;
}

try {
require.resolve('react/jsx-runtime');
return true;
} catch (e) {
return false;
}
})();

module.exports = babelJest.createTransformer({
presets: [
[
require.resolve('babel-preset-react-app'),
{
runtime: hasJsxRuntime ? 'automatic' : 'classic',
},
],
],
babelrc: false,
configFile: false,
});
14 changes: 14 additions & 0 deletions config/jest/cssTransform.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'use strict';

// This is a custom Jest transformer turning style imports into empty objects.
// http://facebook.github.io/jest/docs/en/webpack.html

module.exports = {
process() {
return 'module.exports = {};';
},
getCacheKey() {
// The output is always the same.
return 'cssTransform';
},
};
Loading