forked from finos/legend-studio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from goldmansachs/review-repl
Support server side push down operations for REPL using Ag-grid
- Loading branch information
Showing
53 changed files
with
2,905 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@finos/legend-application-repl': patch | ||
'@finos/legend-application-repl-deployment': patch | ||
--- | ||
|
||
Support server side push down operations for REPL using Ag-grid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@finos/legend-graph': patch | ||
--- | ||
|
||
Add models for new `ClassInstance` valueSpecification types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/* | ||
/*.* | ||
!/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# @finos/legend-application-repl-deployment | ||
|
||
This is the `Legend REPL` web application deployment. This is used for development locally |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"name": "@finos/legend-application-repl-deployment", | ||
"version": "0.0.0", | ||
"description": "Legend REPL web application deployment", | ||
"keywords": [ | ||
"legend", | ||
"legend-application", | ||
"legend-repl", | ||
"deployment" | ||
], | ||
"homepage": "https://github.com/finos/legend-studio/tree/master/packages/legend-application-repl-deployment", | ||
"bugs": { | ||
"url": "https://github.com/finos/legend-studio/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/finos/legend-studio.git", | ||
"directory": "packages/legend-application-repl-deployment" | ||
}, | ||
"license": "Apache-2.0", | ||
"type": "module", | ||
"scripts": { | ||
"build:webpack": "cross-env NODE_ENV=production webpack --mode production", | ||
"bundle": "yarn clean && yarn build:webpack && node ./scripts/setup.js --dir ./dist/repl", | ||
"bundle:analyze": "cross-env NODE_ENV=production webpack --mode production --analyze", | ||
"bundle:fast": "cross-env NODE_ENV=production PRODUCTION_MODE=fast webpack --mode production && node ./scripts/setup.js --dir ./dist/repl", | ||
"clean": "yarn clean:cache && rimraf \"dist\"", | ||
"clean:cache": "rimraf \"build\"", | ||
"dev": "npm-run-all --parallel dev:ts dev:webpack", | ||
"dev:ts": "tsc --watch --preserveWatchOutput", | ||
"dev:webpack": "cross-env NODE_ENV=development webpack serve --mode development", | ||
"dev:webpack:debug": "cross-env NODE_ENV=development DEVELOPMENT_MODE=debug webpack serve --mode development", | ||
"lint:js": "cross-env NODE_ENV=production eslint --cache --cache-location ./build/.eslintcache --report-unused-disable-directives --parser-options=project:\"./tsconfig.json\",requireConfigFile:false \"./scripts/**/*.{mjs,cjs,js}\" \"./src/**/*.{js,ts,tsx}\"", | ||
"publish:pre-prepare": "yarn clean && yarn build:webpack && node ./scripts/setup.js --dir ./dist/repl --use-dynamic-repl-server", | ||
"publish:prepare": "node ../../scripts/release/preparePublishContent.js", | ||
"publish:snapshot": "node ../../scripts/release/publishDevSnapshot.js", | ||
"serve": "npx http-server ./dist -p 3000 -a localhost -g --cors -o /repl", | ||
"setup": "rimraf \"dev\" && yarn node ./scripts/setup.js --dir ./dev" | ||
}, | ||
"dependencies": { | ||
"@finos/legend-application": "workspace:*", | ||
"@finos/legend-application-repl": "workspace:*", | ||
"@finos/legend-art": "workspace:*", | ||
"@finos/legend-lego": "workspace:*" | ||
}, | ||
"devDependencies": { | ||
"@finos/legend-dev-utils": "workspace:*", | ||
"copy-webpack-plugin": "11.0.0", | ||
"cross-env": "7.0.3", | ||
"eslint": "8.52.0", | ||
"npm-run-all": "4.1.5", | ||
"rimraf": "5.0.5", | ||
"typescript": "5.2.2", | ||
"webpack": "5.89.0", | ||
"webpack-bundle-analyzer": "4.9.1", | ||
"webpack-cli": "5.1.4", | ||
"webpack-dev-server": "4.15.1" | ||
}, | ||
"publishConfig": { | ||
"directory": "build/publishContent" | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
packages/legend-application-repl-deployemnt/repl.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/** | ||
* Copyright (c) 2020-present, Goldman Sachs | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
export default { | ||
/** | ||
* `favicon` [string, optional] | ||
* Relative path to the favicon file | ||
* e.g. './assets/favicon.ico' | ||
*/ | ||
faviconPath: './assets/favicon.ico', | ||
/** | ||
* `baseUrl` [string, required] | ||
* Base URL for your site. This can also be considered the path after the host. | ||
* e.g. `/something/` is the `baseUrl` of https://www.example.org/something/ | ||
* For URLs that have no path, use '/'. | ||
*/ | ||
baseUrl: '/repl/', | ||
/** | ||
* `devServerOptions` [object, optional] | ||
* Options to override `webpack-dev-server` configs. | ||
* See https://webpack.js.org/configuration/dev-server/ | ||
*/ | ||
devServerOptions: { | ||
// NOTE: for development from within a Docker container, it's best to update this to 0.0.0.0 | ||
host: 'localhost', | ||
port: 9005, | ||
}, | ||
}; |
66 changes: 66 additions & 0 deletions
66
packages/legend-application-repl-deployemnt/scripts/setup.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/** | ||
* Copyright (c) 2020-present, Goldman Sachs | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import * as yargs from 'yargs'; | ||
import { hideBin } from 'yargs/helpers'; | ||
import { resolve, dirname } from 'path'; | ||
import { fileURLToPath } from 'url'; | ||
import { existsSync, mkdirSync, writeFileSync } from 'fs'; | ||
|
||
const __dirname = dirname(fileURLToPath(import.meta.url)); | ||
|
||
const argv = yargs.default(hideBin(process.argv)).argv; | ||
|
||
const setup = (outputDir) => { | ||
if (!existsSync(outputDir)) { | ||
mkdirSync(outputDir); | ||
} | ||
|
||
writeFileSync( | ||
resolve(outputDir, 'version.json'), | ||
JSON.stringify( | ||
{ | ||
buildTime: new Date().toISOString(), | ||
version: '0.0.0-local', | ||
commitSHA: 'local', | ||
}, | ||
null, | ||
2, | ||
), | ||
); | ||
|
||
writeFileSync( | ||
resolve(outputDir, 'config.json'), | ||
JSON.stringify( | ||
{ | ||
appName: 'REPL', | ||
env: 'local', | ||
repl: { | ||
url: 'http://localhost:8080', | ||
dynamic: argv['use-dynamic-repl-server'] ? true : undefined, | ||
}, | ||
documentation: { | ||
url: 'https://legend.finos.org', | ||
registry: [], | ||
}, | ||
}, | ||
undefined, | ||
2, | ||
), | ||
); | ||
}; | ||
|
||
setup(resolve(__dirname, `../${argv.dir}`)); |
13 changes: 13 additions & 0 deletions
13
packages/legend-application-repl-deployemnt/src/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<title>REPL</title> | ||
<meta charset="UTF-8" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" | ||
/> | ||
</head> | ||
|
||
<body style="width: 100%; height: 100vh; overflow: hidden"></body> | ||
</html> |
21 changes: 21 additions & 0 deletions
21
packages/legend-application-repl-deployemnt/src/index.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* Copyright (c) 2020-present, Goldman Sachs | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
@import url('@finos/legend-art/lib/index.css'); | ||
@import url('@finos/legend-application/lib/index.css'); | ||
@import url('@finos/legend-lego/lib/index.css'); | ||
|
||
@import url('@finos/legend-application-repl/lib/index.css'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* Copyright (c) 2020-present, Goldman Sachs | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import { LegendREPLGridClientWebApplication } from '@finos/legend-application-repl'; | ||
import config from '../repl.config.js'; | ||
import './index.scss'; | ||
|
||
LegendREPLGridClientWebApplication.run(config.baseUrl); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"extends": "@finos/legend-dev-utils/tsconfig.base.json", | ||
"compilerOptions": { | ||
"tsBuildInfoFile": "build/dev.tsbuildinfo", | ||
"noEmit": true, | ||
"jsx": "react-jsxdev", | ||
"allowJs": true | ||
}, | ||
"include": [ | ||
"src/**/*.ts", | ||
"src/**/*.tsx", | ||
"src/**/*.json", | ||
"repl.config.js" | ||
], | ||
"references": [ | ||
{ "path": "../legend-application" }, | ||
{ "path": "../legend-art" }, | ||
{ "path": "../legend-shared" }, | ||
{ "path": "../legend-application-repl" }, | ||
{ "path": "../legend-lego" } | ||
] | ||
} |
71 changes: 71 additions & 0 deletions
71
packages/legend-application-repl-deployemnt/webpack.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
/** | ||
* Copyright (c) 2020-present, Goldman Sachs | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import { resolve, dirname } from 'path'; | ||
import CopyWebpackPlugin from 'copy-webpack-plugin'; | ||
import appConfig from './repl.config.js'; | ||
import { | ||
getEnvInfo, | ||
getWebAppBaseWebpackConfig, | ||
} from '@finos/legend-dev-utils/WebpackConfigUtils'; | ||
import { fileURLToPath } from 'url'; | ||
|
||
const __dirname = dirname(fileURLToPath(import.meta.url)); | ||
|
||
export default (env, arg) => { | ||
const { isEnvDevelopment } = getEnvInfo(env, arg); | ||
|
||
const baseConfig = getWebAppBaseWebpackConfig(env, arg, __dirname, { | ||
mainEntryPath: resolve(__dirname, './src/index.tsx'), | ||
indexHtmlPath: resolve(__dirname, './src/index.html'), | ||
appConfig, | ||
babelConfigPath: resolve(__dirname, '../../babel.config.cjs'), | ||
enableReactFastRefresh: isEnvDevelopment, | ||
}); | ||
const config = { | ||
...baseConfig, | ||
devServer: { | ||
...baseConfig.devServer, | ||
...appConfig.devServerOptions, | ||
}, | ||
plugins: [ | ||
...baseConfig.plugins, | ||
// For development, we want to serve the `config.json` and `version.json` files at the `/baseUrl` | ||
isEnvDevelopment && | ||
new CopyWebpackPlugin({ | ||
patterns: [ | ||
{ | ||
from: resolve(__dirname, './dev/config.json'), | ||
// trim the leading and trailing slash | ||
to: | ||
appConfig.baseUrl.length === 1 | ||
? undefined | ||
: appConfig.baseUrl.slice(1, -1), | ||
}, | ||
{ | ||
from: resolve(__dirname, './dev/version.json'), | ||
// trim the leading and trailing slash | ||
to: | ||
appConfig.baseUrl.length === 1 | ||
? undefined | ||
: appConfig.baseUrl.slice(1, -1), | ||
}, | ||
], | ||
}), | ||
].filter(Boolean), | ||
}; | ||
return config; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/build | ||
/style | ||
**/__mocks__/** | ||
**/__tests__/** | ||
/*.* | ||
!tsconfig.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# @finos/legend-application-repl | ||
|
||
Legend REPL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* Copyright (c) 2020-present, Goldman Sachs | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
export default { | ||
publish: { | ||
typescript: { | ||
main: './tsconfig.publish.json', | ||
others: ['./tsconfig.package.json'], | ||
}, | ||
}, | ||
}; |
Oops, something went wrong.