Skip to content

Commit

Permalink
Merge pull request #2195 from EclipseFdn/main
Browse files Browse the repository at this point in the history
Release 0.14.0
  • Loading branch information
amvanbaren authored Nov 16, 2023
2 parents b069e04 + bd4972c commit ecf83cc
Show file tree
Hide file tree
Showing 28 changed files with 5,204 additions and 2,739 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Build
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.project
3 changes: 3 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ ports:

tasks:
- init: |
corepack enable
corepack prepare yarn@stable --activate
yarn --cwd website
yarn --cwd website compile
yarn --cwd website build
yarn --cwd website build:dev
command: |
Expand Down
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,22 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/*

# See https://github.com/nodesource/distributions/blob/main/README.md#debinstall
RUN curl -sSL https://deb.nodesource.com/setup_14.x | bash - \
RUN curl -sSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs

RUN npm install --global yarn@1.*
RUN corepack enable
RUN corepack prepare yarn@stable --activate

# bump to update website
ENV WEBSITE_VERSION 0.10.0
ENV WEBSITE_VERSION 0.11.1
COPY . /workdir

RUN /usr/bin/yarn --cwd website \
&& /usr/bin/yarn --cwd website compile \
&& /usr/bin/yarn --cwd website build

# Main image derived from openvsx-server
FROM ghcr.io/eclipse/openvsx-server:v0.13.4
FROM ghcr.io/eclipse/openvsx-server:v0.14.0

COPY --from=builder --chown=openvsx:openvsx /workdir/website/static/ BOOT-INF/classes/static/
COPY --from=builder --chown=openvsx:openvsx /workdir/configuration/ config/
6 changes: 3 additions & 3 deletions configuration/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,16 @@ ovsx:
storage:
primary-service: azure-blob
webui:
frontendRoutes: "/extension/**,/namespace/**,/user-settings/**,/admin-dashboard/**,/about,/publisher-agreement-*,/terms-of-use"
frontendRoutes: "/extension/**,/namespace/**,/user-settings/**,/admin-dashboard/**,/about,/publisher-agreement-*,/terms-of-use,/members,/adopters"
eclipse:
# TODO change back to https://api-staging.eclipse.org/ for testing.
base-url: https://api.eclipse.org/
publisher-agreement:
version: 1
timezone: US/Eastern
publishing:
require-license: true
elasticsearch:
clear-on-start: true
enabled: true
clear-on-start: true
ssl: true
Expand All @@ -150,4 +150,4 @@ ovsx:
delay:
seconds: 300
integrity:
key-pair: create
key-pair: create
4 changes: 2 additions & 2 deletions kubernetes/open-vsx.org.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,11 @@ local newElasticSearchCluster(env) = {
},
resources: {
requests: {
memory: if (env.envName == "staging") then "2Gi" else "6Gi",
memory: if (env.envName == "staging") then "2Gi" else "8Gi",
cpu: 1
},
limits: {
memory: if (env.envName == "staging") then "2Gi" else "6Gi",
memory: if (env.envName == "staging") then "2Gi" else "8Gi",
cpu: if (env.envName == "staging") then 1 else 4,
}
}
Expand Down
13 changes: 13 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
sonar.projectKey=open-vsx_open-vsx-org
sonar.organization=open-vsx

# This is the name and version displayed in the SonarCloud UI.
#sonar.projectName=open-vsx.org
#sonar.projectVersion=1.0

# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
#sonar.sources=.

# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8

10 changes: 10 additions & 0 deletions website/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true

[*.{js,json,yml}]
charset = utf-8
indent_style = space
indent_size = 2
4 changes: 4 additions & 0 deletions website/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/.yarn/** linguist-vendored
/.yarn/releases/* binary
/.yarn/plugins/**/* binary
/.pnp.* binary linguist-generated
7 changes: 7 additions & 0 deletions website/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
node_modules/
/lib/
/static/bundle.*
Expand Down
874 changes: 874 additions & 0 deletions website/.yarn/releases/yarn-3.6.1.cjs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions website/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.6.1.cjs
36 changes: 20 additions & 16 deletions website/dev/main-dev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,38 @@
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/

import * as ReactDOM from 'react-dom';
import * as React from 'react';
import { createRoot } from 'react-dom/client';
import React, { FunctionComponent, useMemo } from 'react';
import { HelmetProvider } from 'react-helmet-async';
import { BrowserRouter } from 'react-router-dom';
import { ThemeProvider } from '@material-ui/styles';
import { useMediaQuery } from '@material-ui/core';
import { ThemeProvider } from '@mui/material/styles';
import { useMediaQuery } from '@mui/material';
import { Main } from 'openvsx-webui';
import createPageSettings from '../src/page-settings';
import createDefaultTheme from 'openvsx-webui/lib/default/theme';
import { MockRegistryService } from './mock-service';

const App: React.FunctionComponent = () => {
const App: FunctionComponent = () => {
const prefersDarkScheme = useMediaQuery('(prefers-color-scheme: dark)');
const themeType = prefersDarkScheme ? 'dark' : 'light';
const theme = React.useMemo(() => createDefaultTheme(themeType), [themeType]);
const theme = useMemo(() => createDefaultTheme(themeType), [themeType]);
const service = new MockRegistryService();
const pageSettings = createPageSettings(theme, themeType);
const pageSettings = createPageSettings(theme, prefersDarkScheme);

return (
<ThemeProvider theme={theme}>
<Main
service={service}
pageSettings={pageSettings}
/>
</ThemeProvider>
<HelmetProvider>
<ThemeProvider theme={theme}>
<Main
service={service}
pageSettings={pageSettings}
/>
</ThemeProvider>
</HelmetProvider>
);
}

const node = document.getElementById('main');
ReactDOM.render(<BrowserRouter>
const node = document.getElementById('main') as HTMLElement;
const root = createRoot(node);
root.render(<BrowserRouter>
<App />
</BrowserRouter>, node);
</BrowserRouter>);
2 changes: 1 addition & 1 deletion website/dev/mock-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
NamespaceMembershipList, AdminService, PublisherInfo, NewReview, ExtensionFilter, UrlString, MembershipRole
} from "openvsx-webui";

const avatarUrl = 'https://upload.wikimedia.org/wikipedia/commons/1/19/Spongebob_Squarepants_as_a_balloon.jpg';
const avatarUrl = 'https://upload.wikimedia.org/wikipedia/commons/9/99/Avatar_cupcake.png';

export class MockRegistryService extends ExtensionRegistryService {

Expand Down
28 changes: 14 additions & 14 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,21 @@
"repository": "https://github.com/eclipse/open-vsx.org",
"license": "EPL-2.0",
"dependencies": {
"openvsx-webui": "0.10.0"
"openvsx-webui": "0.11.1"
},
"devDependencies": {
"@types/markdown-it": "^12.2.3",
"@types/react": "~16.9.46",
"@types/react-dom": "~16.9.8",
"@types/react-helmet": "^6.1.6",
"@types/react-router-dom": "~5.1.5",
"css-loader": "^5.0.1",
"express": "^4.17.3",
"source-map-loader": "^1.1.2",
"style-loader": "^2.0.0",
"typescript": "~4.1.2",
"webpack": "^5.76.0",
"webpack-bundle-analyzer": "^4.2.0",
"webpack-cli": "^4.2.0"
"@types/react": "^18.2.14",
"@types/react-dom": "^18.2.6",
"@types/react-router-dom": "^5.3.3",
"css-loader": "^6.8.1",
"express": "^4.18.2",
"source-map-loader": "^4.0.1",
"style-loader": "^3.3.3",
"typescript": "~5.1.6",
"webpack": "^5.88.1",
"webpack-bundle-analyzer": "^4.9.0",
"webpack-cli": "^5.1.4"
},
"scripts": {
"prepare": "yarn compile",
Expand All @@ -32,5 +31,6 @@
"build:dev": "webpack --config dev/webpack.config.js --mode=development",
"watch:dev": "webpack --config dev/webpack.config.js --mode=development --watch",
"start:dev": "node dev/server"
}
},
"packageManager": "yarn@3.6.1"
}
85 changes: 49 additions & 36 deletions website/src/about.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,60 +9,73 @@
********************************************************************************/

import * as React from 'react';
import { Link, Typography, Container, useTheme, makeStyles } from '@material-ui/core';
import { Link, Typography, Container, List, ListItem, ListItemText } from '@mui/material';
import { styled, Theme } from '@mui/material/styles';

const Heading = styled(Typography)(({ theme }: { theme: Theme }) => ({
marginTop: theme.spacing(4)
}));

const Paragraph = styled(Typography)(({ theme }: { theme: Theme }) => ({
marginTop: theme.spacing(2)
}));

const RepositoryList = styled('ul')(({ theme }: { theme: Theme }) => ({
fontSize: theme.typography.body1.fontSize,
fontFamily: theme.typography.body1.fontFamily,
fontWeight: theme.typography.body1.fontWeight,
lineHeight: theme.typography.body1.lineHeight
}));

const About = () => {
const theme = useTheme();
const body1 = theme.typography.body1;
const classes = makeStyles({
heading: {
marginTop: theme.spacing(4)
},
paragraph: {
marginTop: theme.spacing(2)
},
adaptFont: {
fontSize: body1.fontSize,
fontFamily: body1.fontFamily,
fontWeight: body1.fontWeight,
lineHeight: body1.lineHeight
}
})();
return <Container maxWidth='md'>
<Typography variant='h4' className={classes.heading}>About This Service</Typography>
<Typography variant='body1' className={classes.paragraph}>
<Heading variant='h4'>About This Service</Heading>
<Paragraph variant='body1'>
Open VSX is an open-source registry for VS Code extensions.
It can be used by any development environment that supports such extensions.
See <Link color='secondary' href='https://www.eclipse.org/community/eclipse_newsletter/2020/march/1.php'>this article</Link> for
See <Link color='secondary' underline='hover' href='https://www.eclipse.org/community/eclipse_newsletter/2020/march/1.php'>this article</Link> for
more information.
</Typography>
<Typography variant='body1' className={classes.paragraph}>
</Paragraph>
<Paragraph variant='body1'>
This service is operated by the <Link color='secondary' href='https://www.eclipse.org/'>Eclipse Foundation</Link>.
</Typography>
<Typography variant='body1' className={classes.paragraph}>
</Paragraph>
<Paragraph variant='body1'>
The source code of Open VSX is managed by
the <Link color='secondary' href='https://projects.eclipse.org/projects/ecd.openvsx'>Eclipse Open VSX</Link> project
the <Link color='secondary' underline='hover' href='https://projects.eclipse.org/projects/ecd.openvsx'>Eclipse Open VSX</Link> project
and is licensed under
the <Link color='secondary' href='https://www.eclipse.org/legal/epl-2.0/'>Eclipse Public License v2.0</Link>.
the <Link color='secondary' underline='hover' href='https://www.eclipse.org/legal/epl-2.0/'>Eclipse Public License v2.0</Link>.
The code is split in two repositories:
</Typography>
<ul className={classes.adaptFont}>
</Paragraph>
<RepositoryList>
<li>
<Link color='secondary' href='https://github.com/eclipse/openvsx'>eclipse/openvsx</Link> &ndash;
<Link color='secondary' underline='hover' href='https://github.com/eclipse/openvsx'>eclipse/openvsx</Link> &ndash;
main code with server, web UI and CLI. These components can be reused to deploy other registry instances
(both public and private).
</li>
<li>
<Link color='secondary' href='https://github.com/EclipseFdn/open-vsx.org'>EclipseFdn/open-vsx.org</Link> &ndash;
<Link color='secondary' underline='hover' href='https://github.com/EclipseFdn/open-vsx.org'>EclipseFdn/open-vsx.org</Link> &ndash;
additional code for this website.
</li>
</ul>
</RepositoryList>

<Typography variant='h5' className={classes.heading}>Publishing Extensions</Typography>
<Typography variant='body1' className={classes.paragraph}>
The publishing process is described in
the <Link color='secondary' href='https://github.com/eclipse/openvsx/wiki/Publishing-Extensions#how-to-publish-an-extension'>openvsx Wiki</Link>.
</Typography>
<Heading variant='h5'>Resources</Heading>
<List>
<ListItem>
<ListItemText>
The publishing process is described in the <Link color='secondary' underline='hover' href='https://github.com/eclipse/openvsx/wiki/Publishing-Extensions#how-to-publish-an-extension'>openvsx Wiki</Link>.
</ListItemText>
</ListItem>
<ListItem>
<ListItemText>
The <Link color='secondary' underline='hover' href='https://www.eclipse.org/legal/open-vsx-registry-faq/'>FAQ</Link> section explains what you can and cannot do as a user of our service.
</ListItemText>
</ListItem>
<ListItem>
<ListItemText>
Get involved in the <Link color='secondary' underline='hover' href='https://gitter.im/eclipse/openvsx'>community</Link>.
</ListItemText>
</ListItem>
</List>
</Container>;
}

Expand Down
34 changes: 34 additions & 0 deletions website/src/adopters.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import React from "react";
import { Container, Typography, Box, Button } from "@mui/material";
import { styled, Theme } from '@mui/material/styles';
import AdoptersList from "./components/adopters-list";

const Heading = styled(Typography)(({ theme }: { theme: Theme }) => ({
marginTop: theme.spacing(4),
marginBottom: theme.spacing(2)
}));

const Adopters = () => {
return (
<Container maxWidth='md'>
<Heading variant='h4'>
Adopters
</Heading>
<Typography>
Our open source projects drive innovation across a broad spectrum of industries and on both private and public clouds — enabling organizations of all shapes and sizes to accelerate cloud native development with world-class tools.
</Typography>
<Box mt={4} textAlign='center'>
<Button
variant='contained'
color='secondary'
href='https://ecdtools.eclipse.org/adopters/get-listed/'
>
Get Listed
</Button>
</Box>
<AdoptersList/>
</Container>
);
}

export default Adopters;
Loading

0 comments on commit ecf83cc

Please sign in to comment.