diff --git a/packages/cli/src/commands/app/build.ts b/packages/cli/src/commands/app/build.ts index d5a01d13a7..601e31a9c1 100644 --- a/packages/cli/src/commands/app/build.ts +++ b/packages/cli/src/commands/app/build.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { run } from 'helpers/run'; +import { run } from 'lib/run'; export default async () => { const args = ['build']; diff --git a/packages/cli/src/commands/app/serve.ts b/packages/cli/src/commands/app/serve.ts index 51806aa9d6..28680aa87d 100644 --- a/packages/cli/src/commands/app/serve.ts +++ b/packages/cli/src/commands/app/serve.ts @@ -15,7 +15,7 @@ */ import { spawn } from 'child_process'; -import { waitForExit } from 'helpers/run'; +import { waitForExit } from 'lib/run'; import { watchDeps } from 'commands/watch-deps'; import { createLogger } from 'commands/watch-deps/logger'; diff --git a/packages/cli/src/commands/build-cache/cache.ts b/packages/cli/src/commands/build-cache/cache.ts index 4dddaedc6f..9c73f904ab 100644 --- a/packages/cli/src/commands/build-cache/cache.ts +++ b/packages/cli/src/commands/build-cache/cache.ts @@ -16,11 +16,11 @@ import fs from 'fs-extra'; import { resolve as resolvePath, relative as relativePath } from 'path'; -import { runPlain, runCheck } from 'helpers/run'; +import { runPlain, runCheck } from 'lib/run'; import { Options } from './options'; import { extractArchive, createArchive } from './archive'; -import { paths } from 'helpers/paths'; -import { version, isDev } from 'helpers/version'; +import { paths } from 'lib/paths'; +import { version, isDev } from 'lib/version'; const INFO_FILE = '.backstage-build-cache'; diff --git a/packages/cli/src/commands/build-cache/index.ts b/packages/cli/src/commands/build-cache/index.ts index a8a1a27e9d..a1007ca528 100644 --- a/packages/cli/src/commands/build-cache/index.ts +++ b/packages/cli/src/commands/build-cache/index.ts @@ -16,7 +16,7 @@ import fs from 'fs-extra'; import { Command } from 'commander'; -import { run } from 'helpers/run'; +import { run } from 'lib/run'; import { Cache } from './cache'; import { parseOptions, Options } from './options'; diff --git a/packages/cli/src/commands/build-cache/options.ts b/packages/cli/src/commands/build-cache/options.ts index 6903c01ddf..380f84fff5 100644 --- a/packages/cli/src/commands/build-cache/options.ts +++ b/packages/cli/src/commands/build-cache/options.ts @@ -16,7 +16,7 @@ import { resolve as resolvePath } from 'path'; import { Command } from 'commander'; -import { paths } from 'helpers/paths'; +import { paths } from 'lib/paths'; const DEFAULT_CACHE_DIR = '/node_modules/.cache/backstage-builds'; const DEFAULT_MAX_ENTRIES = 10; diff --git a/packages/cli/src/commands/clean/clean.ts b/packages/cli/src/commands/clean/clean.ts index f18250d210..f0dd179a98 100644 --- a/packages/cli/src/commands/clean/clean.ts +++ b/packages/cli/src/commands/clean/clean.ts @@ -17,7 +17,7 @@ import fs from 'fs-extra'; import { resolve as resolvePath, relative as relativePath } from 'path'; import { getDefaultCacheOptions } from 'commands/build-cache/options'; -import { paths } from 'helpers/paths'; +import { paths } from 'lib/paths'; export default async function clean() { const cacheOptions = getDefaultCacheOptions(); diff --git a/packages/cli/src/commands/create-app/createApp.ts b/packages/cli/src/commands/create-app/createApp.ts index cb34dc0686..b5c9ba69eb 100644 --- a/packages/cli/src/commands/create-app/createApp.ts +++ b/packages/cli/src/commands/create-app/createApp.ts @@ -21,9 +21,9 @@ import inquirer, { Answers, Question } from 'inquirer'; import { exec as execCb } from 'child_process'; import { resolve as resolvePath } from 'path'; import os from 'os'; -import { Task, templatingTask } from 'helpers/tasks'; -import { paths } from 'helpers/paths'; -import { version } from 'helpers/version'; +import { Task, templatingTask } from 'lib/tasks'; +import { paths } from 'lib/paths'; +import { version } from 'lib/version'; const exec = promisify(execCb); async function checkExists(rootDir: string, name: string) { diff --git a/packages/cli/src/commands/create-plugin/createPlugin.ts b/packages/cli/src/commands/create-plugin/createPlugin.ts index 1af5832818..5d23de4688 100644 --- a/packages/cli/src/commands/create-plugin/createPlugin.ts +++ b/packages/cli/src/commands/create-plugin/createPlugin.ts @@ -26,9 +26,9 @@ import { addCodeownersEntry, getCodeownersFilePath, } from './lib/codeowners'; -import { paths } from 'helpers/paths'; -import { version } from 'helpers/version'; -import { Task, templatingTask } from 'helpers/tasks'; +import { paths } from 'lib/paths'; +import { version } from 'lib/version'; +import { Task, templatingTask } from 'lib/tasks'; const exec = promisify(execCb); async function checkExists(rootDir: string, id: string) { diff --git a/packages/cli/src/commands/lint.ts b/packages/cli/src/commands/lint.ts index d1b5a361a4..2d74b4122f 100644 --- a/packages/cli/src/commands/lint.ts +++ b/packages/cli/src/commands/lint.ts @@ -15,7 +15,7 @@ */ import { Command } from 'commander'; -import { run } from 'helpers/run'; +import { run } from 'lib/run'; export default async (cmd: Command) => { const args = ['lint', '--max-warnings=0', '--format=codeframe']; diff --git a/packages/cli/src/commands/plugin/rollup.config.ts b/packages/cli/src/commands/plugin/rollup.config.ts index c991fa3efb..f2c46d1976 100644 --- a/packages/cli/src/commands/plugin/rollup.config.ts +++ b/packages/cli/src/commands/plugin/rollup.config.ts @@ -22,7 +22,7 @@ import postcss from 'rollup-plugin-postcss'; import imageFiles from 'rollup-plugin-image-files'; import json from '@rollup/plugin-json'; import { RollupWatchOptions } from 'rollup'; -import { paths } from 'helpers/paths'; +import { paths } from 'lib/paths'; export default { input: 'src/index.ts', diff --git a/packages/cli/src/commands/plugin/testCommand.ts b/packages/cli/src/commands/plugin/testCommand.ts index a1c4572422..333af5494e 100644 --- a/packages/cli/src/commands/plugin/testCommand.ts +++ b/packages/cli/src/commands/plugin/testCommand.ts @@ -15,7 +15,7 @@ */ import { Command } from 'commander'; -import { run } from 'helpers/run'; +import { run } from 'lib/run'; export default async (cmd: Command) => { const args = ['test']; diff --git a/packages/cli/src/commands/remove-plugin/removePlugin.test.ts b/packages/cli/src/commands/remove-plugin/removePlugin.test.ts index 1cd47864c6..4fa918c9c6 100644 --- a/packages/cli/src/commands/remove-plugin/removePlugin.test.ts +++ b/packages/cli/src/commands/remove-plugin/removePlugin.test.ts @@ -17,7 +17,7 @@ import fse from 'fs-extra'; import path from 'path'; import os from 'os'; -import { paths } from '../../helpers/paths'; +import { paths } from 'lib/paths'; import { addExportStatement, capitalize, diff --git a/packages/cli/src/commands/remove-plugin/removePlugin.ts b/packages/cli/src/commands/remove-plugin/removePlugin.ts index 76b8606973..cb583caae2 100644 --- a/packages/cli/src/commands/remove-plugin/removePlugin.ts +++ b/packages/cli/src/commands/remove-plugin/removePlugin.ts @@ -18,8 +18,8 @@ import path from 'path'; import chalk from 'chalk'; import inquirer, { Answers, Question } from 'inquirer'; import { getCodeownersFilePath } from '../create-plugin/lib/codeowners'; -import { paths } from 'helpers/paths'; -import { Task } from 'helpers/tasks'; +import { paths } from 'lib/paths'; +import { Task } from 'lib/tasks'; // import os from 'os'; const BACKSTAGE = '@backstage'; diff --git a/packages/cli/src/commands/testCommand.ts b/packages/cli/src/commands/testCommand.ts index 1a1b298b9c..0e180f614e 100644 --- a/packages/cli/src/commands/testCommand.ts +++ b/packages/cli/src/commands/testCommand.ts @@ -15,8 +15,8 @@ */ import { Command } from 'commander'; -import { paths } from 'helpers/paths'; -import { runCheck } from 'helpers/run'; +import { paths } from 'lib/paths'; +import { runCheck } from 'lib/run'; function includesAnyOf(hayStack: string[], ...needles: string[]) { for (const needle of needles) { diff --git a/packages/cli/src/commands/watch-deps/index.ts b/packages/cli/src/commands/watch-deps/index.ts index 68d2417e36..069cab1d4f 100644 --- a/packages/cli/src/commands/watch-deps/index.ts +++ b/packages/cli/src/commands/watch-deps/index.ts @@ -21,8 +21,8 @@ import { findAllDeps } from './packages'; import { startWatcher, startPackageWatcher } from './watcher'; import { startCompiler } from './compiler'; import { startChild } from './child'; -import { waitForExit, run } from 'helpers/run'; -import { paths } from 'helpers/paths'; +import { waitForExit, run } from 'lib/run'; +import { paths } from 'lib/paths'; import { Command } from 'commander'; const PACKAGE_BLACKLIST = [ diff --git a/packages/cli/src/commands/watch-deps/packages.ts b/packages/cli/src/commands/watch-deps/packages.ts index f5744a41d4..4eee0f3069 100644 --- a/packages/cli/src/commands/watch-deps/packages.ts +++ b/packages/cli/src/commands/watch-deps/packages.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { paths } from 'helpers/paths'; +import { paths } from 'lib/paths'; const LernaProject = require('@lerna/project'); const PackageGraph = require('@lerna/package-graph'); diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts index cdca2fa1ed..1c3f66bce7 100644 --- a/packages/cli/src/index.ts +++ b/packages/cli/src/index.ts @@ -16,8 +16,8 @@ import program from 'commander'; import chalk from 'chalk'; -import { exitWithError } from 'helpers/errors'; -import { version } from 'helpers/version'; +import { exitWithError } from 'lib/errors'; +import { version } from 'lib/version'; const main = (argv: string[]) => { program.name('backstage-cli').version(version); diff --git a/packages/cli/src/helpers/errors.ts b/packages/cli/src/lib/errors.ts similarity index 100% rename from packages/cli/src/helpers/errors.ts rename to packages/cli/src/lib/errors.ts diff --git a/packages/cli/src/helpers/paths.ts b/packages/cli/src/lib/paths.ts similarity index 100% rename from packages/cli/src/helpers/paths.ts rename to packages/cli/src/lib/paths.ts diff --git a/packages/cli/src/helpers/run.ts b/packages/cli/src/lib/run.ts similarity index 100% rename from packages/cli/src/helpers/run.ts rename to packages/cli/src/lib/run.ts diff --git a/packages/cli/src/helpers/tasks.test.ts b/packages/cli/src/lib/tasks.test.ts similarity index 100% rename from packages/cli/src/helpers/tasks.test.ts rename to packages/cli/src/lib/tasks.test.ts diff --git a/packages/cli/src/helpers/tasks.ts b/packages/cli/src/lib/tasks.ts similarity index 100% rename from packages/cli/src/helpers/tasks.ts rename to packages/cli/src/lib/tasks.ts diff --git a/packages/cli/src/helpers/version.ts b/packages/cli/src/lib/version.ts similarity index 100% rename from packages/cli/src/helpers/version.ts rename to packages/cli/src/lib/version.ts