mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
build fixes
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
0b10f24d2b
commit
0b74cf8c6b
300
.eslintrc.js
300
.eslintrc.js
@ -1,300 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const packageJson = require("./package.json");
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
ignorePatterns: [
|
|
||||||
"**/node_modules/**/*",
|
|
||||||
"**/dist/**/*",
|
|
||||||
"**/static/**/*",
|
|
||||||
"**/site/**/*",
|
|
||||||
"build/webpack/**/*",
|
|
||||||
],
|
|
||||||
settings: {
|
|
||||||
react: {
|
|
||||||
version: packageJson.devDependencies.react || "detect",
|
|
||||||
},
|
|
||||||
"import/parsers": {
|
|
||||||
"@typescript-eslint/parser": [".ts", ".tsx"],
|
|
||||||
},
|
|
||||||
"import/resolver": {
|
|
||||||
"typescript": {
|
|
||||||
"alwaysTryTypes": true,
|
|
||||||
"project": "./tsconfig.json",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
overrides: [
|
|
||||||
{
|
|
||||||
files: [
|
|
||||||
"**/*.js",
|
|
||||||
"**/*.mjs",
|
|
||||||
],
|
|
||||||
extends: [
|
|
||||||
"eslint:recommended",
|
|
||||||
],
|
|
||||||
env: {
|
|
||||||
node: true,
|
|
||||||
es2022: true,
|
|
||||||
},
|
|
||||||
parserOptions: {
|
|
||||||
sourceType: "module",
|
|
||||||
},
|
|
||||||
plugins: [
|
|
||||||
"header",
|
|
||||||
"unused-imports",
|
|
||||||
"react-hooks",
|
|
||||||
],
|
|
||||||
rules: {
|
|
||||||
"no-constant-condition": ["error", { "checkLoops": false }],
|
|
||||||
"header/header": [2, "./license-header"],
|
|
||||||
"comma-dangle": ["error", "always-multiline"],
|
|
||||||
"comma-spacing": "error",
|
|
||||||
"indent": ["error", 2, {
|
|
||||||
"SwitchCase": 1,
|
|
||||||
}],
|
|
||||||
"no-unused-vars": "off",
|
|
||||||
"space-before-function-paren": ["error", {
|
|
||||||
"anonymous": "always",
|
|
||||||
"named": "never",
|
|
||||||
"asyncArrow": "always",
|
|
||||||
}],
|
|
||||||
"unused-imports/no-unused-imports": "error",
|
|
||||||
"unused-imports/no-unused-vars": [
|
|
||||||
"warn", {
|
|
||||||
"vars": "all",
|
|
||||||
"args": "after-used",
|
|
||||||
"ignoreRestSiblings": true,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"quotes": ["error", "double", {
|
|
||||||
"avoidEscape": true,
|
|
||||||
"allowTemplateLiterals": true,
|
|
||||||
}],
|
|
||||||
"object-curly-spacing": ["error", "always", {
|
|
||||||
"objectsInObjects": false,
|
|
||||||
"arraysInObjects": true,
|
|
||||||
}],
|
|
||||||
"linebreak-style": ["error", "unix"],
|
|
||||||
"eol-last": ["error", "always"],
|
|
||||||
"semi": ["error", "always"],
|
|
||||||
"object-shorthand": "error",
|
|
||||||
"prefer-template": "error",
|
|
||||||
"template-curly-spacing": "error",
|
|
||||||
"no-unused-expressions": "error",
|
|
||||||
"padding-line-between-statements": [
|
|
||||||
"error",
|
|
||||||
{ "blankLine": "always", "prev": "*", "next": "return" },
|
|
||||||
{ "blankLine": "always", "prev": "*", "next": "block-like" },
|
|
||||||
{ "blankLine": "always", "prev": "*", "next": "function" },
|
|
||||||
{ "blankLine": "always", "prev": "*", "next": "class" },
|
|
||||||
{ "blankLine": "always", "prev": ["const", "let", "var"], "next": "*" },
|
|
||||||
{ "blankLine": "any", "prev": ["const", "let", "var"], "next": ["const", "let", "var"] },
|
|
||||||
],
|
|
||||||
"no-template-curly-in-string": "error",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
files: [
|
|
||||||
"**/*.ts",
|
|
||||||
"**/*.tsx",
|
|
||||||
],
|
|
||||||
parser: "@typescript-eslint/parser",
|
|
||||||
extends: [
|
|
||||||
"eslint:recommended",
|
|
||||||
"plugin:@typescript-eslint/recommended",
|
|
||||||
"plugin:react/recommended",
|
|
||||||
"plugin:import/recommended",
|
|
||||||
"plugin:import/typescript",
|
|
||||||
],
|
|
||||||
plugins: [
|
|
||||||
"header",
|
|
||||||
"unused-imports",
|
|
||||||
"react-hooks",
|
|
||||||
],
|
|
||||||
parserOptions: {
|
|
||||||
ecmaVersion: 2018,
|
|
||||||
sourceType: "module",
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
"no-constant-condition": ["error", {
|
|
||||||
"checkLoops": false,
|
|
||||||
}],
|
|
||||||
"header/header": [2, "./license-header"],
|
|
||||||
"react/prop-types": "off",
|
|
||||||
"no-invalid-this": "off",
|
|
||||||
"@typescript-eslint/no-invalid-this": ["error"],
|
|
||||||
"@typescript-eslint/explicit-function-return-type": "off",
|
|
||||||
"@typescript-eslint/no-explicit-any": "off",
|
|
||||||
"@typescript-eslint/interface-name-prefix": "off",
|
|
||||||
"@typescript-eslint/no-use-before-define": "off",
|
|
||||||
"@typescript-eslint/no-empty-interface": "off",
|
|
||||||
"@typescript-eslint/no-var-requires": "off",
|
|
||||||
"@typescript-eslint/ban-ts-ignore": "off",
|
|
||||||
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
||||||
"@typescript-eslint/ban-types": "off",
|
|
||||||
"@typescript-eslint/ban-ts-comment": "off",
|
|
||||||
"@typescript-eslint/no-empty-function": "off",
|
|
||||||
"@typescript-eslint/no-unused-vars": "off",
|
|
||||||
"no-restricted-imports": ["error", {
|
|
||||||
"paths": [
|
|
||||||
{
|
|
||||||
"name": ".",
|
|
||||||
"message": "No importing from local index.ts(x?) file. A common way to make circular dependencies.",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}],
|
|
||||||
"@typescript-eslint/member-delimiter-style": ["error", {
|
|
||||||
"multiline": {
|
|
||||||
"delimiter": "semi",
|
|
||||||
"requireLast": true,
|
|
||||||
},
|
|
||||||
"singleline": {
|
|
||||||
"delimiter": "semi",
|
|
||||||
"requireLast": false,
|
|
||||||
},
|
|
||||||
}],
|
|
||||||
"react/jsx-max-props-per-line": ["error", {
|
|
||||||
"maximum": {
|
|
||||||
"single": 2,
|
|
||||||
"multi": 1,
|
|
||||||
},
|
|
||||||
}],
|
|
||||||
"react/jsx-first-prop-new-line": ["error", "multiline"],
|
|
||||||
"react/jsx-one-expression-per-line": ["error", {
|
|
||||||
"allow": "single-child",
|
|
||||||
}],
|
|
||||||
"react/jsx-indent": ["error", 2],
|
|
||||||
"react/jsx-indent-props": ["error", 2],
|
|
||||||
"react/jsx-closing-tag-location": "error",
|
|
||||||
"react/jsx-wrap-multilines": ["error", {
|
|
||||||
"declaration": "parens-new-line",
|
|
||||||
"assignment": "parens-new-line",
|
|
||||||
"return": "parens-new-line",
|
|
||||||
"arrow": "parens-new-line",
|
|
||||||
"condition": "parens-new-line",
|
|
||||||
"logical": "parens-new-line",
|
|
||||||
"prop": "parens-new-line",
|
|
||||||
}],
|
|
||||||
"react/display-name": "off",
|
|
||||||
"space-before-function-paren": "off",
|
|
||||||
"@typescript-eslint/space-before-function-paren": ["error", {
|
|
||||||
"anonymous": "always",
|
|
||||||
"named": "never",
|
|
||||||
"asyncArrow": "always",
|
|
||||||
}],
|
|
||||||
"@typescript-eslint/naming-convention": ["error",
|
|
||||||
{
|
|
||||||
"selector": "interface",
|
|
||||||
"format": ["PascalCase"],
|
|
||||||
"leadingUnderscore": "forbid",
|
|
||||||
"trailingUnderscore": "forbid",
|
|
||||||
"custom": {
|
|
||||||
"regex": "^Props$",
|
|
||||||
"match": false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"selector": "typeAlias",
|
|
||||||
"format": ["PascalCase"],
|
|
||||||
"leadingUnderscore": "forbid",
|
|
||||||
"trailingUnderscore": "forbid",
|
|
||||||
"custom": {
|
|
||||||
"regex": "^(Props|State)$",
|
|
||||||
"match": false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
|
|
||||||
"unused-imports/no-unused-imports-ts": process.env.PROD === "true" ? "error" : "warn",
|
|
||||||
"unused-imports/no-unused-vars-ts": [
|
|
||||||
"warn", {
|
|
||||||
"vars": "all",
|
|
||||||
"args": "after-used",
|
|
||||||
"ignoreRestSiblings": true,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"comman-dangle": "off",
|
|
||||||
"@typescript-eslint/comma-dangle": ["error", "always-multiline"],
|
|
||||||
"comma-spacing": "off",
|
|
||||||
"@typescript-eslint/comma-spacing": "error",
|
|
||||||
"indent": ["error", 2, {
|
|
||||||
"SwitchCase": 1,
|
|
||||||
}],
|
|
||||||
"quotes": ["error", "double", {
|
|
||||||
"avoidEscape": true,
|
|
||||||
"allowTemplateLiterals": true,
|
|
||||||
}],
|
|
||||||
"object-curly-spacing": "off",
|
|
||||||
"@typescript-eslint/object-curly-spacing": ["error", "always", {
|
|
||||||
"objectsInObjects": false,
|
|
||||||
"arraysInObjects": true,
|
|
||||||
}],
|
|
||||||
"semi": "off",
|
|
||||||
"@typescript-eslint/semi": ["error"],
|
|
||||||
"linebreak-style": ["error", "unix"],
|
|
||||||
"eol-last": ["error", "always"],
|
|
||||||
"object-shorthand": "error",
|
|
||||||
"prefer-template": "error",
|
|
||||||
"template-curly-spacing": "error",
|
|
||||||
"no-unused-expressions": "off",
|
|
||||||
"@typescript-eslint/no-unused-expressions": "error",
|
|
||||||
"padding-line-between-statements": [
|
|
||||||
"error",
|
|
||||||
{ "blankLine": "always", "prev": "*", "next": "return" },
|
|
||||||
{ "blankLine": "always", "prev": "*", "next": "block-like" },
|
|
||||||
{ "blankLine": "always", "prev": "*", "next": "function" },
|
|
||||||
{ "blankLine": "always", "prev": "*", "next": "class" },
|
|
||||||
{ "blankLine": "always", "prev": ["const", "let", "var"], "next": "*" },
|
|
||||||
{ "blankLine": "any", "prev": ["const", "let", "var"], "next": ["const", "let", "var"] },
|
|
||||||
],
|
|
||||||
"react-hooks/rules-of-hooks": "error",
|
|
||||||
"react-hooks/exhaustive-deps": "off",
|
|
||||||
"no-template-curly-in-string": "error",
|
|
||||||
"@typescript-eslint/consistent-type-imports": "error",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
files: [
|
|
||||||
"src/{common,main,renderer}/**/*.ts",
|
|
||||||
"src/{common,main,renderer}/**/*.tsx",
|
|
||||||
],
|
|
||||||
rules: {
|
|
||||||
"no-restricted-imports": ["error", {
|
|
||||||
"paths": [
|
|
||||||
{
|
|
||||||
"name": ".",
|
|
||||||
"message": "No importing from local index.ts(x?) file. A common way to make circular dependencies.",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "..",
|
|
||||||
"message": "No importing from parent index.ts(x?) file. A common way to make circular dependencies.",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"patterns": [
|
|
||||||
{
|
|
||||||
"group": [
|
|
||||||
"**/extensions/renderer-api/**/*",
|
|
||||||
"**/extensions/main-api/**/*",
|
|
||||||
"**/extensions/common-api/**/*",
|
|
||||||
],
|
|
||||||
message: "No importing from the extension api definitions in application code",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"group": [
|
|
||||||
"**/extensions/as-legacy-globals-for-extension-api/as-legacy-global-function-for-extension-api",
|
|
||||||
"**/extensions/as-legacy-globals-for-extension-api/as-legacy-global-object-for-extension-api-with-modifications",
|
|
||||||
"**/extensions/as-legacy-globals-for-extension-api/as-legacy-global-object-for-extension-api",
|
|
||||||
"**/extensions/as-legacy-globals-for-extension-api/as-legacy-global-singleton-object-for-extension-api",
|
|
||||||
],
|
|
||||||
message: "No importing the legacy global functions in non-ExtensionApi code",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
18
.swcrc
18
.swcrc
@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
"module": {
|
|
||||||
"type": "commonjs"
|
|
||||||
},
|
|
||||||
"jsc": {
|
|
||||||
"parser": {
|
|
||||||
"syntax": "typescript",
|
|
||||||
"tsx": true,
|
|
||||||
"decorators": true,
|
|
||||||
"dynamicImport": false
|
|
||||||
},
|
|
||||||
"transform": {
|
|
||||||
"legacyDecorator": true,
|
|
||||||
"decoratorMetadata": true
|
|
||||||
},
|
|
||||||
"target": "es2019"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
3
.yarnrc
3
.yarnrc
@ -1,3 +0,0 @@
|
|||||||
disturl "https://electronjs.org/headers"
|
|
||||||
target "19.0.4"
|
|
||||||
runtime "electron"
|
|
||||||
@ -8,7 +8,9 @@
|
|||||||
"adr:list": "adr list",
|
"adr:list": "adr list",
|
||||||
"build": "lerna run --stream build",
|
"build": "lerna run --stream build",
|
||||||
"build:docs": "lerna run --stream build:docs",
|
"build:docs": "lerna run --stream build:docs",
|
||||||
|
"clean": "lerna run clean --stream",
|
||||||
"clean:node_modules": "lerna clean -y && rm -rf node_modules",
|
"clean:node_modules": "lerna clean -y && rm -rf node_modules",
|
||||||
|
"lint": "lerna run lint --stream",
|
||||||
"mkdocs:serve-local": "docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -it -p 8000:8000 -v ${PWD}:/docs mkdocs-serve-local:latest",
|
"mkdocs:serve-local": "docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -it -p 8000:8000 -v ${PWD}:/docs mkdocs-serve-local:latest",
|
||||||
"mkdocs:verify": "docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -v ${PWD}:/docs mkdocs-serve-local:latest build --strict",
|
"mkdocs:verify": "docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -v ${PWD}:/docs mkdocs-serve-local:latest build --strict",
|
||||||
"test:unit": "lerna run --stream test:unit",
|
"test:unit": "lerna run --stream test:unit",
|
||||||
|
|||||||
@ -11,7 +11,7 @@ module.exports = {
|
|||||||
"**/dist/**/*",
|
"**/dist/**/*",
|
||||||
"**/static/**/*",
|
"**/static/**/*",
|
||||||
"**/site/**/*",
|
"**/site/**/*",
|
||||||
"build/webpack/**/*",
|
"**/build/webpack/**/*",
|
||||||
],
|
],
|
||||||
settings: {
|
settings: {
|
||||||
react: {
|
react: {
|
||||||
@ -50,7 +50,7 @@ module.exports = {
|
|||||||
],
|
],
|
||||||
rules: {
|
rules: {
|
||||||
"no-constant-condition": ["error", { "checkLoops": false }],
|
"no-constant-condition": ["error", { "checkLoops": false }],
|
||||||
"header/header": [2, "./license-header"],
|
"header/header": [2, "../../license-header"],
|
||||||
"comma-dangle": ["error", "always-multiline"],
|
"comma-dangle": ["error", "always-multiline"],
|
||||||
"comma-spacing": "error",
|
"comma-spacing": "error",
|
||||||
"indent": ["error", 2, {
|
"indent": ["error", 2, {
|
||||||
@ -123,7 +123,7 @@ module.exports = {
|
|||||||
"no-constant-condition": ["error", {
|
"no-constant-condition": ["error", {
|
||||||
"checkLoops": false,
|
"checkLoops": false,
|
||||||
}],
|
}],
|
||||||
"header/header": [2, "./license-header"],
|
"header/header": [2, "../../license-header"],
|
||||||
"react/prop-types": "off",
|
"react/prop-types": "off",
|
||||||
"no-invalid-this": "off",
|
"no-invalid-this": "off",
|
||||||
"@typescript-eslint/no-invalid-this": ["error"],
|
"@typescript-eslint/no-invalid-this": ["error"],
|
||||||
|
|||||||
@ -1,25 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
||||||
*/
|
|
||||||
import * as fs from "fs";
|
|
||||||
import * as path from "path";
|
|
||||||
import packageInfo from "../packages/extensions/package.json";
|
|
||||||
import appInfo from "../package.json";
|
|
||||||
import { SemVer } from "semver";
|
|
||||||
import { execSync } from "child_process";
|
|
||||||
|
|
||||||
const { NPM_RELEASE_TAG = "latest" } = process.env;
|
|
||||||
const version = new SemVer(appInfo.version);
|
|
||||||
|
|
||||||
if (NPM_RELEASE_TAG !== "latest") {
|
|
||||||
const gitRef = execSync("git rev-parse --short HEAD", {
|
|
||||||
encoding: "utf-8",
|
|
||||||
});
|
|
||||||
|
|
||||||
version.inc("prerelease", `git.${gitRef.trim()}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
packageInfo.version = version.format();
|
|
||||||
|
|
||||||
fs.writeFileSync(path.join(__dirname, "../packages/extensions/package.json"), `${JSON.stringify(packageInfo, null, 2)}\n`);
|
|
||||||
@ -12,5 +12,5 @@ export {
|
|||||||
applicationInformationToken,
|
applicationInformationToken,
|
||||||
ApplicationInformation,
|
ApplicationInformation,
|
||||||
bundledExtensionInjectionToken,
|
bundledExtensionInjectionToken,
|
||||||
extensionApi
|
extensionApi,
|
||||||
};
|
};
|
||||||
|
|||||||
@ -48,7 +48,7 @@ const config = [
|
|||||||
declaration: true,
|
declaration: true,
|
||||||
sourceMap: false,
|
sourceMap: false,
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
...iconsAndImagesWebpackRules(),
|
...iconsAndImagesWebpackRules(),
|
||||||
@ -62,12 +62,13 @@ const config = [
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
...rendererConfig,
|
...main(),
|
||||||
name: "lens-app-common",
|
name: "lens-app-common",
|
||||||
entry: {
|
entry: {
|
||||||
common: path.resolve(__dirname, "..", "src", "common", "library.ts"),
|
common: path.resolve(__dirname, "..", "src", "common", "library.ts"),
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
|
publicPath: "",
|
||||||
library: {
|
library: {
|
||||||
type: "commonjs2",
|
type: "commonjs2",
|
||||||
},
|
},
|
||||||
|
|||||||
@ -2685,11 +2685,6 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
webpack-dev-server "*"
|
webpack-dev-server "*"
|
||||||
|
|
||||||
"@types/webpack-env@^1.18.0":
|
|
||||||
version "1.18.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.18.0.tgz#ed6ecaa8e5ed5dfe8b2b3d00181702c9925f13fb"
|
|
||||||
integrity sha512-56/MAlX5WMsPVbOg7tAxnYvNYMMWr/QJiIp6BxVSW3JJXUVzzOn64qW8TzQyMSqSUFM2+PVI4aUHcHOzIz/1tg==
|
|
||||||
|
|
||||||
"@types/webpack-node-externals@^2.5.3":
|
"@types/webpack-node-externals@^2.5.3":
|
||||||
version "2.5.3"
|
version "2.5.3"
|
||||||
resolved "https://registry.yarnpkg.com/@types/webpack-node-externals/-/webpack-node-externals-2.5.3.tgz#921783aadda1fe686db0a70e20e4b9548b5a3cef"
|
resolved "https://registry.yarnpkg.com/@types/webpack-node-externals/-/webpack-node-externals-2.5.3.tgz#921783aadda1fe686db0a70e20e4b9548b5a3cef"
|
||||||
|
|||||||
@ -19,9 +19,9 @@
|
|||||||
"author": "OpenLens Authors <info@k8slens.dev>",
|
"author": "OpenLens Authors <info@k8slens.dev>",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"clean": "rm -rf binaries/ dist/ static/build",
|
"clean": "rm -rf binaries/ dist/ static/build",
|
||||||
"build": "npm run compile && electron-builder",
|
"build": "npm run compile",
|
||||||
"build:app": "electron-builder --publish onTag",
|
"build:app": "electron-builder --publish onTag",
|
||||||
"build:mac": "npm run compile && electron-builder --mac --dir",
|
"build:dir": "npm run compile && electron-builder --dir",
|
||||||
"compile": "env NODE_ENV=production webpack --config webpack/webpack.ts --progress",
|
"compile": "env NODE_ENV=production webpack --config webpack/webpack.ts --progress",
|
||||||
"postcompile": "npm run build:tray-icons && npm run download:binaries",
|
"postcompile": "npm run build:tray-icons && npm run download:binaries",
|
||||||
"predev": "rm -rf static/build/ && npm run build:tray-icons && npm run download:binaries",
|
"predev": "rm -rf static/build/ && npm run build:tray-icons && npm run download:binaries",
|
||||||
@ -74,7 +74,9 @@
|
|||||||
"build": {
|
"build": {
|
||||||
"generateUpdatesFilesForAllChannels": true,
|
"generateUpdatesFilesForAllChannels": true,
|
||||||
"files": [
|
"files": [
|
||||||
"static/**/*"
|
"static/**/*",
|
||||||
|
"!node_modules/@k8slens/open-lens/node_modules/**/*",
|
||||||
|
"!node_modules/@k8slens/open-lens/src"
|
||||||
],
|
],
|
||||||
"afterSign": "../core/build/notarize.js",
|
"afterSign": "../core/build/notarize.js",
|
||||||
"extraResources": [
|
"extraResources": [
|
||||||
|
|||||||
164
packages/open-lens/static/splash.html
Normal file
164
packages/open-lens/static/splash.html
Normal file
@ -0,0 +1,164 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<style>
|
||||||
|
html, body{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
background: #1e2124;
|
||||||
|
color: #6c757d;
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
}
|
||||||
|
.aligner-center-center{
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.aligner-content{
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
padding: 80px;
|
||||||
|
}
|
||||||
|
.icon {
|
||||||
|
position: relative;
|
||||||
|
font-size: 36px;
|
||||||
|
line-height: 54px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.icon svg{
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
width: 54px;
|
||||||
|
height: 54px;
|
||||||
|
top: 14px;
|
||||||
|
}
|
||||||
|
.icon .icon-text{
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
svg{
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.loading{
|
||||||
|
padding-top: 10px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.bar{
|
||||||
|
position: relative;;
|
||||||
|
height: 2px;
|
||||||
|
background: #262b2f;
|
||||||
|
}
|
||||||
|
.progress{
|
||||||
|
position: relative;
|
||||||
|
height: 2px;
|
||||||
|
background: #3d90ce;
|
||||||
|
box-shadow: 0 0 20px #3d90ce;
|
||||||
|
animation-name: loader-animation;
|
||||||
|
animation-duration: 1.6s;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-timing-function: ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes loader-animation{
|
||||||
|
0% {
|
||||||
|
left: 0;
|
||||||
|
width: 0px;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
left: 100%;
|
||||||
|
width: 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.glow-wrapper{
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 2px;
|
||||||
|
top: -2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.glow{
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
transform: translateZ(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.glow div{
|
||||||
|
flex: 1;
|
||||||
|
background: #3d90ce;
|
||||||
|
animation: glow 0.8s infinite alternate ease;
|
||||||
|
box-shadow: 0 0 20px #3d90ce;
|
||||||
|
}
|
||||||
|
|
||||||
|
.glow div.b1{ animation-delay: -0.72s; }
|
||||||
|
.glow div.b2{ animation-delay: -0.64s; }
|
||||||
|
.glow div.b3{ animation-delay: -0.56s; }
|
||||||
|
.glow div.b4{ animation-delay: -0.48s; }
|
||||||
|
.glow div.b5{ animation-delay: -0.40s; }
|
||||||
|
.glow div.b6{ animation-delay: -0.32s; }
|
||||||
|
.glow div.b7{ animation-delay: -0.24s; }
|
||||||
|
.glow div.b8{ animation-delay: -0.16s; }
|
||||||
|
.glow div.b9{ animation-delay: -0.08s; }
|
||||||
|
|
||||||
|
|
||||||
|
@keyframes glow{
|
||||||
|
100% {
|
||||||
|
background: transparent;
|
||||||
|
flex: 10;
|
||||||
|
box-shadow: 0 0 0 transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.text{
|
||||||
|
height: 20px;
|
||||||
|
line-height: 20px;
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="aligner-center-center">
|
||||||
|
<div class="aligner-content">
|
||||||
|
<div class="icon">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#3f90ce"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M14.25 2.26l-.08-.04-.01.02C13.46 2.09 12.74 2 12 2 6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10c0-4.75-3.31-8.72-7.75-9.74zM19.41 9h-7.99l2.71-4.7c2.4.66 4.35 2.42 5.28 4.7zM13.1 4.08L10.27 9l-1.15 2L6.4 6.3C7.84 4.88 9.82 4 12 4c.37 0 .74.03 1.1.08zM5.7 7.09L8.54 12l1.15 2H4.26C4.1 13.36 4 12.69 4 12c0-1.85.64-3.55 1.7-4.91zM4.59 15h7.98l-2.71 4.7c-2.4-.67-4.34-2.42-5.27-4.7zm6.31 4.91L14.89 13l2.72 4.7C16.16 19.12 14.18 20 12 20c-.38 0-.74-.04-1.1-.09zm7.4-3l-4-6.91h5.43c.17.64.27 1.31.27 2 0 1.85-.64 3.55-1.7 4.91z"/></svg>
|
||||||
|
<div class="icon-text">OpenLens</div>
|
||||||
|
</div>
|
||||||
|
<div class="loading">
|
||||||
|
<div class="bar">
|
||||||
|
<div class="progress"></div>
|
||||||
|
</div>
|
||||||
|
<div class="glow-wrapper">
|
||||||
|
<div class="glow">
|
||||||
|
<div class="b1"></div>
|
||||||
|
<div class="b2"></div>
|
||||||
|
<div class="b3"></div>
|
||||||
|
<div class="b4"></div>
|
||||||
|
<div class="b5"></div>
|
||||||
|
<div class="b6"></div>
|
||||||
|
<div class="b7"></div>
|
||||||
|
<div class="b8"></div>
|
||||||
|
<div class="b9"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="text">
|
||||||
|
Loading...
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -20,7 +20,7 @@ const server = new WebpackDevServer({
|
|||||||
headers: {
|
headers: {
|
||||||
"Access-Control-Allow-Origin": "*",
|
"Access-Control-Allow-Origin": "*",
|
||||||
},
|
},
|
||||||
allowedHosts: "127.0.0.1",
|
allowedHosts: ".lens.app",
|
||||||
host: "localhost",
|
host: "localhost",
|
||||||
port: webpackDevServerPort,
|
port: webpackDevServerPort,
|
||||||
static: buildDir, // aka `devServer.contentBase` in webpack@4
|
static: buildDir, // aka `devServer.contentBase` in webpack@4
|
||||||
|
|||||||
@ -49,10 +49,10 @@
|
|||||||
".ts", ".tsx",
|
".ts", ".tsx",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
externals: {
|
externals: [
|
||||||
"node-fetch": "commonjs node-fetch",
|
"node-fetch",
|
||||||
"npm": "commonjs npm",
|
"npm",
|
||||||
},
|
],
|
||||||
optimization: {
|
optimization: {
|
||||||
minimize: false,
|
minimize: false,
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user