Skip to content

Commit

Permalink
vo
Browse files Browse the repository at this point in the history
  • Loading branch information
MauricioUyaguari committed Dec 11, 2024
1 parent 464b3cd commit c06aead
Show file tree
Hide file tree
Showing 76 changed files with 5,104 additions and 17 deletions.
3 changes: 3 additions & 0 deletions .changeset/clever-planets-hunt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
'@finos/legend-graph': patch
---
2 changes: 2 additions & 0 deletions .github/workflows/check-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:
os: windows-latest
- application: '@finos/legend-application-query-deployment'
os: ubuntu-latest
- application: '@finos/legend-application-data-cube-deployment'
os: ubuntu-latest
- application: '@finos/legend-application-pure-ide-deployment'
os: ubuntu-latest
- application: '@finos/legend-application-repl-deployment'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/check-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ jobs:
package: '@finos/legend-application-studio-deployment'
- image: local/legend-query
package: '@finos/legend-application-query-deployment'
- image: local/legend-data-cube
package: '@finos/legend-application-data-cube-deployment'
- image: local/legend-showcase-server
package: '@finos/legend-server-showcase-deployment'
steps:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/manual__publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
package: '@finos/legend-application-studio-deployment'
- image: finos/legend-query
package: '@finos/legend-application-query-deployment'
- image: finos/legend-data-cube
package: '@finos/legend-application-data-cube-deployment'
- image: local/legend-showcase-server
package: '@finos/legend-server-showcase-deployment'
steps:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/publish-docker-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
package: '@finos/legend-application-studio-deployment'
- image: finos/legend-query
package: '@finos/legend-application-query-deployment'
- image: finos/legend-data-cube
package: '@finos/legend-application-data-cube-deployment'
- image: local/legend-showcase-server
package: '@finos/legend-server-showcase-deployment'
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ jobs:
run: |
yarn workspace @finos/legend-application-studio-deployment publish:docker
yarn workspace @finos/legend-application-query-deployment publish:docker
yarn workspace @finos/legend-application-data-cube-deployment publish:docker
yarn workspace @finos/legend-server-showcase-deployment publish:docker
env:
# TODO: After https://github.com/finos/legend-studio/pull/227 it seems like due to either
Expand Down
2 changes: 2 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ nodeLinker: node-modules

npmPublishAccess: public

npmRegistryServer: "https://nexus.aws.site.gs.com/repository/npm-group/"

packageExtensions:
postcss-loader@*:
peerDependenciesMeta:
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"dev:pure": "yarn workspace @finos/legend-application-pure-ide-deployment dev",
"dev:repl": "yarn workspace @finos/legend-application-repl-deployment dev",
"dev:query": "yarn workspace @finos/legend-application-query-deployment dev",
"dev:datacube": "yarn workspace @finos/legend-application-data-cube-deployment dev",
"dev:sass": "node ./scripts/workflow/buildSassAll.js --watch",
"dev:showcase-server": "yarn workspace @finos/legend-server-showcase-deployment dev",
"dev:studio": "yarn workspace @finos/legend-application-studio-deployment dev",
Expand Down Expand Up @@ -125,7 +126,7 @@
},
"packageManager": "[email protected]",
"engines": {
"node": ">=20.0.0",
"node": ">=18.18.2",
"yarn": ">=1.22.10"
}
}
6 changes: 6 additions & 0 deletions packages/legend-application-data-cube-bootstrap/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/build
/style
**/__mocks__/**
**/__tests__/**
/*.*
!tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# @finos/legend-application-data-cube-bootstrap
3 changes: 3 additions & 0 deletions packages/legend-application-data-cube-bootstrap/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# @finos/legend-application-data-cube-bootstrap

Legend Data Cube application bootstrap
23 changes: 23 additions & 0 deletions packages/legend-application-data-cube-bootstrap/_package.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* 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',
},
},
};
65 changes: 65 additions & 0 deletions packages/legend-application-data-cube-bootstrap/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"name": "@finos/legend-application-data-cube-bootstrap",
"version": "12.52.0",
"description": "Legend Data Cube application bootstrap",
"keywords": [
"legend",
"legend-application",
"bootstrap",
"app",
"webapp"
],
"homepage": "https://github.com/finos/legend-studio/tree/master/packages/legend-application-data-cube-bootstrap",
"bugs": {
"url": "https://github.com/finos/legend-studio/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/finos/legend-studio.git",
"directory": "packages/legend-application-data-cube-bootstrap"
},
"license": "Apache-2.0",
"sideEffects": false,
"type": "module",
"exports": {
".": "./lib/index.js",
"./lib/index.css": "./lib/index.css",
"./scripts/setup.js": "./scripts/setup.js"
},
"module": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
"build": "yarn clean && yarn build:sass && yarn build:ts",
"build:sass": "cross-env INIT_CWD=$INIT_CWD node ../../scripts/workflow/buildSass.js",
"build:ts": "tsc --project ./tsconfig.build.json",
"clean": "npm-run-all clean:cache clean:lib",
"clean:cache": "rimraf \"build\"",
"clean:lib": "rimraf \"lib\"",
"dev": "npm-run-all --parallel dev:sass dev:ts",
"dev:sass": "sass style:lib --watch --load-path=../../node_modules/@finos/legend-art/scss",
"dev:ts": "tsc --watch --preserveWatchOutput",
"lint:js": "cross-env NODE_ENV=production eslint --cache --cache-location ./build/.eslintcache --report-unused-disable-directives --parser-options=project:\"./tsconfig.json\" \"./src/**/*.{js,ts,tsx}\"",
"publish:prepare": "node ../../scripts/release/preparePublishContent.js",
"publish:snapshot": "node ../../scripts/release/publishDevSnapshot.js"
},
"dependencies": {
"@finos/legend-application": "workspace:*",
"@finos/legend-application-data-cube": "workspace:*",
"@finos/legend-extension-dsl-data-space": "workspace:*",
"@finos/legend-shared": "workspace:*",
"@types/react": "18.3.12",
"react": "18.3.1"
},
"devDependencies": {
"@finos/legend-dev-utils": "workspace:*",
"cross-env": "7.0.3",
"eslint": "9.15.0",
"npm-run-all": "4.1.5",
"rimraf": "6.0.1",
"sass": "1.81.0",
"typescript": "5.6.3"
},
"publishConfig": {
"directory": "build/publishContent"
}
}
56 changes: 56 additions & 0 deletions packages/legend-application-data-cube-bootstrap/scripts/setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/**
* 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 { existsSync, mkdirSync, writeFileSync } from 'fs';
import { resolve } from 'path';

export 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: 'query',
env: 'local',
engine: {
url: 'http://localhost:6300/api',
queryUrl: 'http://localhost:6300/query-server/api',
},
depot: {
url: 'http://localhost:6200/depot/api',
},
},
undefined,
2,
),
);
};
48 changes: 48 additions & 0 deletions packages/legend-application-data-cube-bootstrap/src/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/**
* 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 { LegendDataCube } from '@finos/legend-application-data-cube';
import { DSL_DataSpace_GraphManagerPreset } from '@finos/legend-extension-dsl-data-space/graph';
import {
type AbstractPreset,
type AbstractPlugin,
WebConsole,
} from '@finos/legend-shared';

export class LegendDataCubeWebApplication {
static getPresetCollection(): AbstractPreset[] {
return [new DSL_DataSpace_GraphManagerPreset()];
}

static getPluginCollection(): AbstractPlugin[] {
return [
// loggers
new WebConsole(),
];
}

static run(baseUrl: string): void {
LegendDataCube.create()
.setup({ baseAddress: baseUrl })
.withPresets(LegendDataCubeWebApplication.getPresetCollection())
.withPlugins(LegendDataCubeWebApplication.getPluginCollection())
.withDownloadHelper()
.start()
.catch((e: unknown) => {
throw e;
});
}
}
48 changes: 48 additions & 0 deletions packages/legend-application-data-cube-bootstrap/style/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/**
* 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/normalize.css');
@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-data-cube/lib/index.css');
@import url('@finos/legend-application-data-cube/lib/index.css');

// NOTE: the following styles are temporary so we can have a poor-man version of
// theming for Legend Query. The reason why we put the code here is that this is
// where we essentially do all the overriding for everything from every extensions.
// In other words, this is the only place where we can exhaustively and correctly
// override native dark theme with light them colors.
:root {
--color-legacylight-light-grey-100: #edf0f1;
--color-legacylight-light-grey-200: #dce2e4;
--color-legacylight-light-grey-300: #b5bec4;
--color-legacylight-light-grey-400: #95a0a8;
--color-legacylight-dark-grey-200: #29323a;
--color-legacylight-dark-grey-400: #4e5364;
--color-legacylight-light-blue-50: #def3ff;
--color-legacylight-light-blue-100: #7399c6;
--color-legacylight-light-blue-200: #6a8db6;
--color-legacylight-light-blue-250: #687b93;
--color-legacylight-light-blue-270: #597089;
--color-legacylight-light-blue-300: #4d6f9c;
--color-legacylight-light-blue-350: #475b72;
--color-legacylight-light-blue-400: #1b4c8c;
--color-legacylight-light-blue-600: #2d3d51;
--color-legacylight-green-100: #5cb65c;
--color-legacylight-orange-100: #f68f1e;
--color-legacylight-orange-150: #ea8212;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"tsBuildInfoFile": "build/prod.tsbuildinfo",
"jsx": "react-jsx"
},
"exclude": ["src/**/__tests__/**/*.*", "src/**/__mocks__/**/*.*"],
"references": [
{ "path": "../legend-shared/tsconfig.build.json" },
{ "path": "../legend-application/tsconfig.build.json" },
{ "path": "../legend-application-data-cube/tsconfig.build.json" },
{ "path": "../legend-extension-dsl-data-space/tsconfig.build.json" }
]
}
16 changes: 16 additions & 0 deletions packages/legend-application-data-cube-bootstrap/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"extends": "@finos/legend-dev-utils/tsconfig.base.json",
"compilerOptions": {
"outDir": "lib",
"tsBuildInfoFile": "build/dev.tsbuildinfo",
"rootDir": "src",
"jsx": "react-jsxdev"
},
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.json"],
"references": [
{ "path": "../legend-shared" },
{ "path": "../legend-application" },
{ "path": "../legend-application-data-cube" },
{ "path": "../legend-extension-dsl-data-space" }
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "./tsconfig.build.json"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# @finos/legend-application-data-cube-deployment
9 changes: 9 additions & 0 deletions packages/legend-application-data-cube-deployment/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM finos/legend-shared-server:0.23.5
COPY dist/query /app/bin/webapp-content/web/query/

RUN mkdir -p /config
COPY docker/server-config.json /config/server-config.json
COPY docker/config.json /config/config.json
COPY docker/entrypoint.sh /entrypoint.sh

CMD /entrypoint.sh
17 changes: 17 additions & 0 deletions packages/legend-application-data-cube-deployment/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# @finos/legend-application-data-cube-deployment

This is the `Legend Data Cube` web application deployment. This is used for development locally and publishing of image [finos/legend-data-cube](https://hub.docker.com/r/finos/legend-data-cube) on [Docker Hub](https://hub.docker.com/).

## Getting started

To quickly setup the backend, use our development [Docker compose](./fixtures/legend-docker-setup/studio-dev-setup/README.md). If you need to debug and develop the backend, [setup with Maven](https://legend.finos.org/docs/getting-started/installation-guide#maven-install) instead.

Last but not least, make sure you have `Yarn` installed. Run the following commands in order.

```bash
yarn install
yarn setup
yarn dev:datacube
```

After setting up, visit http://localhost:9001/data-cube and the application should be up and running.
Binary file not shown.
Loading

0 comments on commit c06aead

Please sign in to comment.