From 62c1be32a1aba0f2c0b984b3766dc0d653e1ad6e Mon Sep 17 00:00:00 2001 From: Michael Auerswald Date: Fri, 21 Apr 2023 12:27:23 +0200 Subject: [PATCH] sort variables files under variables folder --- packages/cli/src/Server.ts | 4 ++-- .../versionControl/versionControlHelper.ee.ts | 18 ------------------ .../{ => variables}/enviromentHelpers.ts | 0 .../{ => variables}/variables.controller.ee.ts | 0 .../{ => variables}/variables.controller.ts | 0 .../{ => variables}/variables.service.ee.ts | 0 .../{ => variables}/variables.service.ts | 0 packages/cli/test/integration/shared/utils.ts | 2 +- 8 files changed, 3 insertions(+), 21 deletions(-) delete mode 100644 packages/cli/src/environment/versionControl/versionControlHelper.ee.ts rename packages/cli/src/environments/{ => variables}/enviromentHelpers.ts (100%) rename packages/cli/src/environments/{ => variables}/variables.controller.ee.ts (100%) rename packages/cli/src/environments/{ => variables}/variables.controller.ts (100%) rename packages/cli/src/environments/{ => variables}/variables.service.ee.ts (100%) rename packages/cli/src/environments/{ => variables}/variables.service.ts (100%) diff --git a/packages/cli/src/Server.ts b/packages/cli/src/Server.ts index bdce01787f3bd..49320cfbc2537 100644 --- a/packages/cli/src/Server.ts +++ b/packages/cli/src/Server.ts @@ -156,9 +156,9 @@ import { import { getSamlLoginLabel, isSamlLoginEnabled, isSamlLicensed } from './sso/saml/samlHelpers'; import { SamlController } from './sso/saml/routes/saml.controller.ee'; import { SamlService } from './sso/saml/saml.service.ee'; -import { variablesController } from './environments/variables.controller'; +import { variablesController } from './environments/variables/variables.controller'; import { LdapManager } from './Ldap/LdapManager.ee'; -import { getVariablesLimit, isVariablesEnabled } from '@/environments/enviromentHelpers'; +import { getVariablesLimit, isVariablesEnabled } from '@/environments/variables/enviromentHelpers'; import { getCurrentAuthenticationMethod } from './sso/ssoHelpers'; import { isVersionControlLicensed } from '@/environments/versionControl/versionControlHelper'; import { VersionControlService } from '@/environments/versionControl/versionControl.service.ee'; diff --git a/packages/cli/src/environment/versionControl/versionControlHelper.ee.ts b/packages/cli/src/environment/versionControl/versionControlHelper.ee.ts deleted file mode 100644 index b3857120db144..0000000000000 --- a/packages/cli/src/environment/versionControl/versionControlHelper.ee.ts +++ /dev/null @@ -1,18 +0,0 @@ -import Container from 'typedi'; -import { License } from '../../License'; -import { generateKeyPairSync } from 'crypto'; - -export function isVersionControlEnabled() { - const license = Container.get(License); - return license.isVersionControlLicensed(); -} - -export async function generateSshKeyPair() { - const keyPair = generateKeyPairSync('ed25519', { - privateKeyEncoding: { format: 'pem', type: 'pkcs8' }, - publicKeyEncoding: { format: 'pem', type: 'spki' }, - }); - - console.log(keyPair.privateKey); - console.log(keyPair.publicKey); -} diff --git a/packages/cli/src/environments/enviromentHelpers.ts b/packages/cli/src/environments/variables/enviromentHelpers.ts similarity index 100% rename from packages/cli/src/environments/enviromentHelpers.ts rename to packages/cli/src/environments/variables/enviromentHelpers.ts diff --git a/packages/cli/src/environments/variables.controller.ee.ts b/packages/cli/src/environments/variables/variables.controller.ee.ts similarity index 100% rename from packages/cli/src/environments/variables.controller.ee.ts rename to packages/cli/src/environments/variables/variables.controller.ee.ts diff --git a/packages/cli/src/environments/variables.controller.ts b/packages/cli/src/environments/variables/variables.controller.ts similarity index 100% rename from packages/cli/src/environments/variables.controller.ts rename to packages/cli/src/environments/variables/variables.controller.ts diff --git a/packages/cli/src/environments/variables.service.ee.ts b/packages/cli/src/environments/variables/variables.service.ee.ts similarity index 100% rename from packages/cli/src/environments/variables.service.ee.ts rename to packages/cli/src/environments/variables/variables.service.ee.ts diff --git a/packages/cli/src/environments/variables.service.ts b/packages/cli/src/environments/variables/variables.service.ts similarity index 100% rename from packages/cli/src/environments/variables.service.ts rename to packages/cli/src/environments/variables/variables.service.ts diff --git a/packages/cli/test/integration/shared/utils.ts b/packages/cli/test/integration/shared/utils.ts index b3dcd3d2f0ab8..3625caf661a84 100644 --- a/packages/cli/test/integration/shared/utils.ts +++ b/packages/cli/test/integration/shared/utils.ts @@ -73,7 +73,7 @@ import { v4 as uuid } from 'uuid'; import { InternalHooks } from '@/InternalHooks'; import { LoadNodesAndCredentials } from '@/LoadNodesAndCredentials'; import { PostHogClient } from '@/posthog'; -import { variablesController } from '@/environments/variables.controller'; +import { variablesController } from '@/environments/variables/variables.controller'; import { LdapManager } from '@/Ldap/LdapManager.ee'; import { handleLdapInit } from '@/Ldap/helpers'; import { Push } from '@/push';