Restructure to monorepo (#6907)

* wip: restructure to monorepo

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* refactor create-release-pr to a package

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* build fixes

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* github workflow fixes

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix typo

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* add webpack-env types to core

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix github workflows

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* refactor/fix integration tests

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* lint fix

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* yarn run dev

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* eslint settings for vscode

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* move templates to right package

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* open-lens build fixes

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* integration test fix

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix nx task dependencies

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* use bash shell for unit tests in test workflow

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix test:unit for windows

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix win-ca webpack error in open-lens

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix win-ca webpack error in open-lens

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix build:app on windows

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* remove ELECTRON_BUILDER_EXTRA_ARGS

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* sync src/ from master

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* remove Makefile from core

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen authored and GitHub committed 2023-01-24 10:46:26 -08:00
1 parent 0066ca4ea2
commit 2657df2293
3321 files changed
+28699 -11447

No files matched your search

@@ -0,0 +1,19 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { createInitializableState } from "../../../common/initializable-state/create";
import { buildVersionInjectionToken } from "../../../common/vars/build-semantic-version.injectable";
import getBuildVersionInjectable from "./get-build-version.injectable";
const buildVersionInjectable = createInitializableState({
id: "build-version",
init: (di) => {
const getBuildVersion = di.inject(getBuildVersionInjectable);
return getBuildVersion();
},
injectionToken: buildVersionInjectionToken,
});
export default buildVersionInjectable;
@@ -0,0 +1,17 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import electronAppInjectable from "../../electron-app/electron-app.injectable";
const getBuildVersionInjectable = getInjectable({
id: "get-build-version",
instantiate: (di) => {
const electronApp = di.inject(electronAppInjectable);
return () => electronApp.getVersion();
},
});
export default getBuildVersionInjectable;
@@ -0,0 +1,22 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import { beforeApplicationIsLoadingInjectionToken } from "../../start-main-application/runnable-tokens/before-application-is-loading-injection-token";
import buildVersionInjectable from "./build-version.injectable";
const initializeBuildVersionInjectable = getInjectable({
id: "initialize-build-version",
instantiate: (di) => {
const buildVersion = di.inject(buildVersionInjectable);
return {
id: "initialize-build-version",
run: () => buildVersion.init(),
};
},
injectionToken: beforeApplicationIsLoadingInjectionToken,
});
export default initializeBuildVersionInjectable;
@@ -0,0 +1,24 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import { beforeApplicationIsLoadingInjectionToken } from "../../start-main-application/runnable-tokens/before-application-is-loading-injection-token";
import initReleaseChannelInjectable from "../release-channel/init.injectable";
import defaultUpdateChannelInjectable from "../../../features/application-update/common/selected-update-channel/default-update-channel.injectable";
const initDefaultUpdateChannelInjectable = getInjectable({
id: "init-default-update-channel",
instantiate: (di) => {
const defaultUpdateChannel = di.inject(defaultUpdateChannelInjectable);
return {
id: "init-default-update-channel",
run: () => defaultUpdateChannel.init(),
runAfter: di.inject(initReleaseChannelInjectable),
};
},
injectionToken: beforeApplicationIsLoadingInjectionToken,
});
export default initDefaultUpdateChannelInjectable;
@@ -0,0 +1,9 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getGlobalOverride } from "../../common/test-utils/get-global-override";
import hardwareAccelerationShouldBeDisabledInjectable from "./hardware-acceleration-should-be-disabled.injectable";
export default getGlobalOverride(hardwareAccelerationShouldBeDisabledInjectable, () => false);
@@ -0,0 +1,13 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
const hardwareAccelerationShouldBeDisabledInjectable = getInjectable({
id: "hardware-acceleration-should-be-disabled",
instantiate: () => Boolean(process.env.LENS_DISABLE_GPU),
causesSideEffects: true,
});
export default hardwareAccelerationShouldBeDisabledInjectable;
@@ -0,0 +1,24 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import releaseChannelInjectable from "../../../common/vars/release-channel.injectable";
import { beforeApplicationIsLoadingInjectionToken } from "../../start-main-application/runnable-tokens/before-application-is-loading-injection-token";
import initSemanticBuildVersionInjectable from "../semantic-build-version/init.injectable";
const initReleaseChannelInjectable = getInjectable({
id: "init-release-channel",
instantiate: (di) => {
const releaseChannel = di.inject(releaseChannelInjectable);
return {
id: "init-release-channel",
run: () => releaseChannel.init(),
runAfter: di.inject(initSemanticBuildVersionInjectable),
};
},
injectionToken: beforeApplicationIsLoadingInjectionToken,
});
export default initReleaseChannelInjectable;
@@ -0,0 +1,24 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import buildSemanticVersionInjectable from "../../../common/vars/build-semantic-version.injectable";
import { beforeApplicationIsLoadingInjectionToken } from "../../start-main-application/runnable-tokens/before-application-is-loading-injection-token";
import initializeBuildVersionInjectable from "../build-version/init.injectable";
const initSemanticBuildVersionInjectable = getInjectable({
id: "init-semantic-build-version",
instantiate: (di) => {
const buildSemanticVersion = di.inject(buildSemanticVersionInjectable);
return {
id: "init-semantic-build-version",
run: () => buildSemanticVersion.init(),
runAfter: di.inject(initializeBuildVersionInjectable),
};
},
injectionToken: beforeApplicationIsLoadingInjectionToken,
});
export default initSemanticBuildVersionInjectable;