diff --git a/.adr.json b/.adr.json
new file mode 100644
index 0000000000..39e4f9f139
--- /dev/null
+++ b/.adr.json
@@ -0,0 +1,6 @@
+{
+ "language": "en",
+ "path": "docs/architecture/decisions/",
+ "prefix": "",
+ "digits": 4
+}
diff --git a/.azure-pipelines-k8s-matrix.yml b/.azure-pipelines-k8s-matrix.yml
deleted file mode 100644
index cdcc18b740..0000000000
--- a/.azure-pipelines-k8s-matrix.yml
+++ /dev/null
@@ -1,57 +0,0 @@
-variables:
- YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
- node_version: 12.x
-pr:
- branches:
- include:
- - master
- - releases/*
- paths:
- exclude:
- - .github/*
- - docs/*
- - mkdocs/*
-trigger: none
-jobs:
- - job: Linux
- pool:
- vmImage: ubuntu-18.04
- strategy:
- matrix:
- kube_1.16:
- kubernetes_version: v1.16.15
- kube_1.17:
- kubernetes_version: v1.17.15
- kube_1.18:
- kubernetes_version: v1.18.13
- kube_1.19:
- kubernetes_version: v1.19.5
- kube_1.20:
- kubernetes_version: v1.20.0
- steps:
- - task: NodeTool@0
- inputs:
- versionSpec: $(node_version)
- displayName: Install Node.js
- - task: Cache@2
- inputs:
- key: 'yarn | "$(Agent.OS)" | yarn.lock'
- restoreKeys: |
- yarn | "$(Agent.OS)"
- path: $(YARN_CACHE_FOLDER)
- displayName: Cache Yarn packages
- - bash: |
- sudo apt-get update
- sudo apt-get install libgconf-2-4 conntrack -y
- curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
- sudo install minikube-linux-amd64 /usr/local/bin/minikube
- sudo minikube start --driver=none --kubernetes-version $(kubernetes_version)
- sudo mv /root/.kube /root/.minikube $HOME
- sudo chown -R $USER $HOME/.kube $HOME/.minikube
- displayName: Install integration test dependencies
- - script: make node_modules
- displayName: Install dependencies
- - script: make -j2 build
- displayName: Run build
- - script: xvfb-run --auto-servernum --server-args='-screen 0, 1600x900x24' yarn integration
- displayName: Run integration tests for Kubernetes $(kubernetes_version)
diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
deleted file mode 100644
index d5ddc00cac..0000000000
--- a/.azure-pipelines.yml
+++ /dev/null
@@ -1,167 +0,0 @@
-variables:
- YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
-pr: none
-trigger:
- tags:
- include:
- - "*"
- paths:
- exclude:
- - .github/*
- - docs/*
- - mkdocs/*
-jobs:
- - job: Windows
- pool:
- vmImage: windows-2019
- strategy:
- matrix:
- node:
- node_version: 16.x
- steps:
- - powershell: |
- $CI_BUILD_TAG = git describe --tags
- Write-Output ("##vso[task.setvariable variable=CI_BUILD_TAG;]$CI_BUILD_TAG")
- condition: "and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))"
- displayName: Set the tag name as an environment variable
-
- - task: NodeTool@0
- inputs:
- versionSpec: $(node_version)
- displayName: Install Node.js
-
- - task: Cache@2
- inputs:
- key: 'yarn | "$(Agent.OS)"" | yarn.lock'
- restoreKeys: |
- yarn | "$(Agent.OS)"
- path: $(YARN_CACHE_FOLDER)
- displayName: Cache Yarn packages
-
- - bash: |
- set -e
- git clone "https://${GH_TOKEN}@github.com/lensapp/lens-ide.git" .lens-ide-overlay
- rm -rf .lens-ide-overlay/.git
- cp -r .lens-ide-overlay/* ./
- jq -s '.[0] * .[1]' package.json package.ide.json > package.custom.json && mv package.custom.json package.json
- env:
- GH_TOKEN: $(LENS_IDE_GH_TOKEN)
- displayName: Customize config
-
- - script: make build
- condition: "and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))"
- env:
- WIN_CSC_LINK: $(WIN_CSC_LINK)
- WIN_CSC_KEY_PASSWORD: $(WIN_CSC_KEY_PASSWORD)
- AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID)
- AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
- BUILD_NUMBER: $(Build.BuildNumber)
- ELECTRON_BUILDER_EXTRA_ARGS: "--x64 --ia32"
- displayName: Build
-
- - job: macOS
- pool:
- vmImage: macOS-11
- strategy:
- matrix:
- node:
- node_version: 16.x
- steps:
- - script: CI_BUILD_TAG=`git describe --tags` && echo "##vso[task.setvariable variable=CI_BUILD_TAG]$CI_BUILD_TAG"
- condition: "and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))"
- displayName: Set the tag name as an environment variable
-
- - task: NodeTool@0
- inputs:
- versionSpec: $(node_version)
- displayName: Install Node.js
-
- - task: Cache@2
- inputs:
- key: 'yarn | "$(Agent.OS)" | yarn.lock'
- restoreKeys: |
- yarn | "$(Agent.OS)"
- path: $(YARN_CACHE_FOLDER)
- displayName: Cache Yarn packages
-
- - bash: |
- set -e
- git clone "https://${GH_TOKEN}@github.com/lensapp/lens-ide.git" .lens-ide-overlay
- rm -rf .lens-ide-overlay/.git
- cp -r .lens-ide-overlay/* ./
- jq -s '.[0] * .[1]' package.json package.ide.json > package.custom.json && mv package.custom.json package.json
- env:
- GH_TOKEN: $(LENS_IDE_GH_TOKEN)
- displayName: Customize config
-
- - bash: |
- set -e
-
- echo "Importing codesign certificate ..."
- echo $CSC_LINK | base64 -D > certificate.p12
- security create-keychain -p $KEYCHAIN_PASSWORD build.keychain
- security set-keychain-settings -lut 21600 build.keychain
- security default-keychain -s build.keychain
- security unlock-keychain -p $KEYCHAIN_PASSWORD build.keychain
- security import certificate.p12 -k build.keychain -P $CSC_KEY_PASSWORD -T /usr/bin/codesign -T /usr/bin/security -A
- security set-key-partition-list -S apple-tool:,apple: -k $KEYCHAIN_PASSWORD build.keychain
-
- rm certificate.p12
- echo "Codesign certificate imported!"
-
- make build
- condition: "and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))"
- env:
- KEYCHAIN_PASSWORD: secretz
- APPLEID: $(APPLEID)
- APPLEIDPASS: $(APPLEIDPASS)
- CSC_LINK: $(CSC_LINK)
- CSC_KEY_PASSWORD: $(CSC_KEY_PASSWORD)
- AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID)
- AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
- BUILD_NUMBER: $(Build.BuildNumber)
- ELECTRON_BUILDER_EXTRA_ARGS: "--x64 --arm64"
- displayName: Build
-
- - job: Linux
- pool:
- vmImage: ubuntu-18.04
- strategy:
- matrix:
- node:
- node_version: 16.x
- steps:
- - script: CI_BUILD_TAG=`git describe --tags` && echo "##vso[task.setvariable variable=CI_BUILD_TAG]$CI_BUILD_TAG"
- condition: "and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))"
- displayName: Set the tag name as an environment variable
-
- - task: NodeTool@0
- inputs:
- versionSpec: $(node_version)
- displayName: Install Node.js
-
- - task: Cache@2
- inputs:
- key: 'yarn | "$(Agent.OS)" | yarn.lock'
- restoreKeys: |
- yarn | "$(Agent.OS)"
- path: $(YARN_CACHE_FOLDER)
- displayName: Cache Yarn packages
-
- - bash: |
- set -e
- git clone "https://${GH_TOKEN}@github.com/lensapp/lens-ide.git" .lens-ide-overlay
- rm -rf .lens-ide-overlay/.git
- cp -r .lens-ide-overlay/* ./
- jq -s '.[0] * .[1]' package.json package.ide.json > package.custom.json && mv package.custom.json package.json
- env:
- GH_TOKEN: $(LENS_IDE_GH_TOKEN)
- displayName: Customize config
-
- - script: make build
- condition: "and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))"
- env:
- AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID)
- AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
- BUILD_NUMBER: $(Build.BuildNumber)
- displayName: Build
diff --git a/.github/workflows/check-docs.yml b/.github/workflows/check-docs.yml
index 9c942690b0..7418a86269 100644
--- a/.github/workflows/check-docs.yml
+++ b/.github/workflows/check-docs.yml
@@ -23,8 +23,8 @@ jobs:
- name: Generate Extensions API Reference using typedocs
run: |
- yarn install
- yarn typedocs-extensions-api
+ yarn install
+ yarn typedocs-extensions-api
- name: Verify that the markdown is valid
run: |
diff --git a/.github/workflows/electronegativity.yml b/.github/workflows/electronegativity.yml
index 6e634082c4..0cc4340f39 100644
--- a/.github/workflows/electronegativity.yml
+++ b/.github/workflows/electronegativity.yml
@@ -19,7 +19,7 @@ jobs:
- uses: doyensec/electronegativity-action@v1.1
with:
input: src/
- electron-version: "15.5.7"
+ electron-version: "19.0.4"
severity: medium
- name: Upload sarif
diff --git a/.github/workflows/mkdocs-manual.yml b/.github/workflows/mkdocs-manual.yml
index cda83b86c3..56bfd0c831 100644
--- a/.github/workflows/mkdocs-manual.yml
+++ b/.github/workflows/mkdocs-manual.yml
@@ -16,7 +16,7 @@ jobs:
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
- python-version: '3.x'
+ python-version: "3.x"
- name: Install dependencies
run: |
@@ -28,7 +28,7 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
- ref: '${{ github.event.inputs.version }}'
+ ref: "${{ github.event.inputs.version }}"
- name: Using Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
@@ -43,8 +43,8 @@ jobs:
- name: Checkout master branch from lens
uses: actions/checkout@v2
with:
- path: 'master'
- ref: 'master'
+ path: "master"
+ ref: "master"
- name: Bring in latest mkdocs.yml from master
run: |
diff --git a/.github/workflows/publish-release-npm.yml b/.github/workflows/publish-release-npm.yml
index 79a06c000f..becca1f790 100644
--- a/.github/workflows/publish-release-npm.yml
+++ b/.github/workflows/publish-release-npm.yml
@@ -23,11 +23,11 @@ jobs:
- name: Generate NPM package
run: |
- make build-npm
+ make build-npm
- name: publish new release
if: contains(github.ref, 'refs/tags/v')
run: |
- make publish-npm
+ make publish-npm
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index a71fc42771..9aaeec71f6 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -11,8 +11,9 @@ jobs:
name: Test
runs-on: ${{ matrix.os }}
strategy:
+ fail-fast: false
matrix:
- os: [ubuntu-18.04, macos-11, windows-2019]
+ os: [ubuntu-20.04, macos-11, windows-2019]
node-version: [16.x]
steps:
- name: Checkout Release from lens
diff --git a/.yarnrc b/.yarnrc
index 22e66ac2fe..811b4fd7c3 100644
--- a/.yarnrc
+++ b/.yarnrc
@@ -1,3 +1,3 @@
-disturl "https://atom.io/download/electron"
-target "15.5.0"
+disturl "https://electronjs.org/headers"
+target "19.0.4"
runtime "electron"
diff --git a/Makefile b/Makefile
index 9dfb2cf512..d04b3febe1 100644
--- a/Makefile
+++ b/Makefile
@@ -17,8 +17,7 @@ else
endif
node_modules: yarn.lock
- yarn install --frozen-lockfile --network-timeout=100000
- yarn check --verify-tree --integrity
+ yarn install --check-files --frozen-lockfile --network-timeout=100000
binaries/client: node_modules
yarn download:binaries
diff --git a/__mocks__/monaco-editor.ts b/__mocks__/monaco-editor.ts
index cbe02cb296..1623a6f00b 100644
--- a/__mocks__/monaco-editor.ts
+++ b/__mocks__/monaco-editor.ts
@@ -3,3 +3,12 @@
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
export default {};
+
+export const Uri = {
+ file: (path: string) => path,
+};
+
+export const editor = {
+ getModel: () => ({}),
+ create: () => ({}),
+};
diff --git a/__mocks__/react-beautiful-dnd.tsx b/__mocks__/react-beautiful-dnd.tsx
new file mode 100644
index 0000000000..6404bfd450
--- /dev/null
+++ b/__mocks__/react-beautiful-dnd.tsx
@@ -0,0 +1,15 @@
+/**
+ * Copyright (c) OpenLens Authors. All rights reserved.
+ * Licensed under MIT License. See LICENSE in root directory for more information.
+ */
+import React from "react";
+
+import type {
+ DragDropContextProps,
+ DraggableProps,
+ DroppableProps,
+} from "react-beautiful-dnd";
+
+export const DragDropContext = ({ children }: DragDropContextProps) => <>{ children }>;
+export const Draggable = ({ children }: DraggableProps) => <>{ children }>;
+export const Droppable = ({ children }: DroppableProps) => <>{ children }>;
diff --git a/__mocks__/react-virtualized-auto-sizer.tsx b/__mocks__/react-virtualized-auto-sizer.tsx
new file mode 100644
index 0000000000..ede5de41cb
--- /dev/null
+++ b/__mocks__/react-virtualized-auto-sizer.tsx
@@ -0,0 +1,17 @@
+/**
+ * Copyright (c) OpenLens Authors. All rights reserved.
+ * Licensed under MIT License. See LICENSE in root directory for more information.
+ */
+import React from "react";
+import type { Size } from "react-virtualized-auto-sizer";
+
+export default ({ children } : { children: (size: Size) => React.ReactNode }) => {
+ return (
+
+ {children({
+ height: 420000,
+ width: 100,
+ })}
+
+ );
+};
diff --git a/build/download_binaries.ts b/build/download_binaries.ts
index 5b4f960c5e..ff26a8fb2b 100644
--- a/build/download_binaries.ts
+++ b/build/download_binaries.ts
@@ -13,7 +13,6 @@ import { promisify } from "util";
import { pipeline as _pipeline, Transform, Writable } from "stream";
import type { SingleBar } from "cli-progress";
import { MultiBar } from "cli-progress";
-import AbortController from "abort-controller";
import { extract } from "tar-stream";
import gunzip from "gunzip-maybe";
import { getBinaryName, normalizedPlatform } from "../src/common/vars";
diff --git a/build/generate-tray-icons.ts b/build/generate-tray-icons.ts
index ed90d27832..487ba8d348 100644
--- a/build/generate-tray-icons.ts
+++ b/build/generate-tray-icons.ts
@@ -12,6 +12,7 @@ const size = Number(process.env.OUTPUT_SIZE || "16");
const outputFolder = process.env.OUTPUT_DIR || "./build/tray";
const inputFile = process.env.INPUT_SVG_PATH || "./src/renderer/components/icon/logo-lens.svg";
const noticeFile = process.env.NOTICE_SVG_PATH || "./src/renderer/components/icon/notice.svg";
+const spinnerFile = process.env.SPINNER_SVG_PATH || "./src/renderer/components/icon/arrow-spinner.svg";
async function ensureOutputFoler() {
await ensureDir(outputFolder);
@@ -58,8 +59,9 @@ async function generateImages(image: Buffer, size: number, name: string) {
]);
}
-async function generateUpdateAvailableImages(baseImage: Buffer, system: TargetSystems) {
- const noticeIconImage = await getNoticeIconImage(system);
+async function generateImageWithSvg(baseImage: Buffer, system: TargetSystems, filePath: string) {
+ const svgFile = await getIconImage(system, filePath);
+
const circleBuffer = await sharp(Buffer.from(`