@backstage/create-app 0.5.11-next.1 → 0.5.11-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @backstage/create-app
2
2
 
3
+ ## 0.5.11-next.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 03e55b1: Updated the default app index template at `packages/app/public/index.html` to have a fallback value for the `app.title` config.
8
+ - Updated dependencies
9
+ - @backstage/cli-common@0.1.13
10
+
11
+ ## 0.5.11-next.2
12
+
13
+ ### Patch Changes
14
+
15
+ - c420081: Add a seed file for `yarn.lock` in newly created apps. This file is downloaded directly from `https://github.com/backstage/backstage` at the time of creating a new project, ensuring that users always receive the latest version. The purpose of the seed file is to initialize the lock file with known good versions of individual dependencies that have had bad new releases published. The seed file will have no effect if the dependency is not present, it can not be used to install additional packages.
16
+ - f71352c: Bumped TypeScript to version `5.3`.
17
+ - Updated dependencies
18
+ - @backstage/cli-common@0.1.13
19
+
3
20
  ## 0.5.11-next.1
4
21
 
5
22
  ### Patch Changes
package/dist/index.cjs.js CHANGED
@@ -10,6 +10,7 @@ var fs = require('fs-extra');
10
10
  var handlebars = require('handlebars');
11
11
  var ora = require('ora');
12
12
  var recursive = require('recursive-readdir');
13
+ var fetch = require('node-fetch');
13
14
  var child_process = require('child_process');
14
15
  var util = require('util');
15
16
 
@@ -22,6 +23,7 @@ var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
22
23
  var handlebars__default = /*#__PURE__*/_interopDefaultLegacy(handlebars);
23
24
  var ora__default = /*#__PURE__*/_interopDefaultLegacy(ora);
24
25
  var recursive__default = /*#__PURE__*/_interopDefaultLegacy(recursive);
26
+ var fetch__default = /*#__PURE__*/_interopDefaultLegacy(fetch);
25
27
 
26
28
  var __defProp = Object.defineProperty;
27
29
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
@@ -65,107 +67,107 @@ ${chalk__default["default"].red(`${error}`)}
65
67
  }
66
68
  }
67
69
 
68
- var version$O = "1.23.0-next.1";
70
+ var version$O = "1.23.0-next.3";
69
71
 
70
- var version$N = "1.4.8-next.1";
72
+ var version$N = "1.5.0-next.3";
71
73
 
72
- var version$M = "0.21.0-next.1";
74
+ var version$M = "0.21.0-next.3";
73
75
 
74
- var version$L = "0.5.15-next.1";
76
+ var version$L = "0.5.15-next.3";
75
77
 
76
78
  var version$K = "1.6.0-next.1";
77
79
 
78
80
  var version$J = "1.4.4-next.0";
79
81
 
80
- var version$I = "0.25.2-next.1";
82
+ var version$I = "0.25.2-next.3";
81
83
 
82
84
  var version$H = "1.1.1";
83
85
 
84
- var version$G = "1.11.4-next.0";
86
+ var version$G = "1.12.0-next.1";
85
87
 
86
- var version$F = "0.14.0-next.0";
88
+ var version$F = "0.14.0-next.2";
87
89
 
88
- var version$E = "1.8.3-next.0";
90
+ var version$E = "1.9.0-next.1";
89
91
 
90
- var version$D = "0.1.0";
92
+ var version$D = "0.1.1-next.0";
91
93
 
92
94
  var version$C = "1.2.3";
93
95
 
94
- var version$B = "1.1.24-next.0";
96
+ var version$B = "1.1.24-next.2";
95
97
 
96
- var version$A = "1.5.0-next.1";
98
+ var version$A = "1.5.0-next.3";
97
99
 
98
- var version$z = "0.5.0";
100
+ var version$z = "0.5.1-next.1";
99
101
 
100
- var version$y = "0.10.4-next.1";
102
+ var version$y = "0.11.0-next.3";
101
103
 
102
- var version$x = "0.3.58-next.1";
104
+ var version$x = "0.3.58-next.3";
103
105
 
104
- var version$w = "0.20.4-next.1";
106
+ var version$w = "0.21.0-next.3";
105
107
 
106
- var version$v = "0.4.4-next.1";
108
+ var version$v = "0.4.4-next.3";
107
109
 
108
- var version$u = "1.17.0-next.1";
110
+ var version$u = "1.17.0-next.3";
109
111
 
110
112
  var version$t = "1.0.21-next.0";
111
113
 
112
- var version$s = "1.9.4-next.1";
114
+ var version$s = "1.10.0-next.3";
113
115
 
114
- var version$r = "1.17.0-next.1";
116
+ var version$r = "1.17.0-next.3";
115
117
 
116
- var version$q = "0.1.7-next.1";
118
+ var version$q = "0.1.7-next.3";
117
119
 
118
- var version$p = "0.3.4-next.1";
120
+ var version$p = "0.4.0-next.3";
119
121
 
120
- var version$o = "0.10.6-next.1";
122
+ var version$o = "0.10.6-next.3";
121
123
 
122
- var version$n = "0.4.16-next.1";
124
+ var version$n = "0.4.16-next.3";
123
125
 
124
- var version$m = "0.6.11-next.1";
126
+ var version$m = "0.6.11-next.3";
125
127
 
126
- var version$l = "0.4.15-next.1";
128
+ var version$l = "0.4.15-next.3";
127
129
 
128
- var version$k = "0.6.20-next.1";
130
+ var version$k = "0.6.20-next.3";
129
131
 
130
132
  var version$j = "0.7.12";
131
133
 
132
- var version$i = "0.4.20-next.0";
134
+ var version$i = "0.4.20-next.1";
133
135
 
134
- var version$h = "0.7.21-next.1";
136
+ var version$h = "0.7.21-next.3";
135
137
 
136
- var version$g = "0.4.8-next.1";
138
+ var version$g = "0.4.8-next.3";
137
139
 
138
- var version$f = "0.1.55-next.1";
140
+ var version$f = "0.1.55-next.3";
139
141
 
140
- var version$e = "1.18.0-next.1";
142
+ var version$e = "1.18.0-next.3";
141
143
 
142
- var version$d = "1.21.0-next.1";
144
+ var version$d = "1.21.0-next.3";
143
145
 
144
- var version$c = "1.4.6-next.1";
146
+ var version$c = "1.4.6-next.3";
145
147
 
146
- var version$b = "1.7.6-next.1";
148
+ var version$b = "1.7.6-next.3";
147
149
 
148
- var version$a = "1.5.0-next.1";
150
+ var version$a = "1.5.0-next.3";
149
151
 
150
- var version$9 = "0.1.14-next.1";
152
+ var version$9 = "0.1.14-next.3";
151
153
 
152
- var version$8 = "0.5.19-next.1";
154
+ var version$8 = "0.5.19-next.3";
153
155
 
154
- var version$7 = "0.1.14-next.1";
156
+ var version$7 = "0.1.14-next.3";
155
157
 
156
- var version$6 = "1.2.14-next.1";
158
+ var version$6 = "1.2.14-next.3";
157
159
 
158
- var version$5 = "0.6.13-next.1";
160
+ var version$5 = "0.6.13-next.3";
159
161
 
160
- var version$4 = "1.10.0-next.1";
162
+ var version$4 = "1.10.0-next.3";
161
163
 
162
- var version$3 = "1.1.16-next.0";
164
+ var version$3 = "1.1.16-next.2";
163
165
 
164
- var version$2 = "1.1.5-next.1";
166
+ var version$2 = "1.1.5-next.3";
165
167
 
166
- var version$1 = "1.9.3-next.1";
168
+ var version$1 = "1.9.3-next.3";
167
169
 
168
- var version = "0.8.1-next.1";
170
+ var version = "0.8.1-next.3";
169
171
 
170
172
  const packageVersions = {
171
173
  root: version$O,
@@ -408,6 +410,35 @@ async function tryInitGitRepository(dir) {
408
410
  return false;
409
411
  }
410
412
  }
413
+ async function fetchYarnLockSeedTask(dir) {
414
+ try {
415
+ await Task.forItem("fetching", "yarn.lock seed", async () => {
416
+ const controller = new AbortController();
417
+ const timeout = setTimeout(() => controller.abort(), 3e3);
418
+ const res = await fetch__default["default"](
419
+ "https://raw.githubusercontent.com/backstage/backstage/master/packages/create-app/seed-yarn.lock",
420
+ {
421
+ signal: controller.signal
422
+ }
423
+ );
424
+ clearTimeout(timeout);
425
+ if (!res.ok) {
426
+ throw new Error(
427
+ `Request failed with status ${res.status} ${res.statusText}`
428
+ );
429
+ }
430
+ const initialYarnLockContent = await res.text();
431
+ await fs__default["default"].writeFile(
432
+ path.resolve(dir, "yarn.lock"),
433
+ initialYarnLockContent.split("\n").filter((l) => !l.startsWith("//")).join("\n"),
434
+ "utf8"
435
+ );
436
+ });
437
+ return true;
438
+ } catch {
439
+ return false;
440
+ }
441
+ }
411
442
 
412
443
  const DEFAULT_BRANCH = "master";
413
444
  var createApp = async (opts) => {
@@ -466,6 +497,7 @@ var createApp = async (opts) => {
466
497
  Task.section("Moving to final location");
467
498
  await moveAppTask(tempDir, appDir, answers.name);
468
499
  }
500
+ const fetchedYarnLockSeed = await fetchYarnLockSeedTask(appDir);
469
501
  if (gitConfig) {
470
502
  if (await tryInitGitRepository(appDir)) {
471
503
  Task.forItem("init", "git repository", async () => {
@@ -481,6 +513,18 @@ var createApp = async (opts) => {
481
513
  chalk__default["default"].green(`\u{1F947} Successfully created ${chalk__default["default"].cyan(answers.name)}`)
482
514
  );
483
515
  Task.log();
516
+ if (!fetchedYarnLockSeed) {
517
+ Task.log(
518
+ chalk__default["default"].yellow(
519
+ [
520
+ "Warning: Failed to fetch the yarn.lock seed file.",
521
+ " You may end up with incompatible dependencies that break the app.",
522
+ " If you run into any errors, please search the issues at",
523
+ " https://github.com/backstage/backstage/issues for potential solutions"
524
+ ].join("\n")
525
+ )
526
+ );
527
+ }
484
528
  Task.section("All set! Now you might want to");
485
529
  if (opts.skipInstall) {
486
530
  Task.log(
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../src/lib/errors.ts","../src/lib/versions.ts","../src/lib/tasks.ts","../src/createApp.ts","../src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport chalk from 'chalk';\n\nexport class CustomError extends Error {\n get name(): string {\n return this.constructor.name;\n }\n}\n\nexport class ExitCodeError extends CustomError {\n readonly code: number;\n\n constructor(code: number, command?: string) {\n if (command) {\n super(`Command '${command}' exited with code ${code}`);\n } else {\n super(`Child exited with code ${code}`);\n }\n this.code = code;\n }\n}\n\nexport function exitWithError(error: Error): never {\n if (error instanceof ExitCodeError) {\n process.stderr.write(`\\n${chalk.red(error.message)}\\n\\n`);\n process.exit(error.code);\n } else {\n process.stderr.write(`\\n${chalk.red(`${error}`)}\\n\\n`);\n process.exit(1);\n }\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* eslint-disable @backstage/no-relative-monorepo-imports */\n\n/*\nThis is a list of all packages used by the template. If dependencies are added or removed,\nthis list should be updated as well.\n\nThere is a release step that ensures that this package is always bumped with every\nrelease, meaning these version will always be up to date.\n\nThis does not create an actual dependency on these packages and does not bring in any code.\nRelative imports are used rather than package imports to make sure the packages aren't externalized.\nRollup will extract the value of the version field in each package at build time without\nleaving any imports in place.\n*/\n\nimport { version as root } from '../../../../package.json';\n\nimport { version as appDefaults } from '../../../app-defaults/package.json';\nimport { version as backendCommon } from '../../../backend-common/package.json';\nimport { version as backendTasks } from '../../../backend-tasks/package.json';\nimport { version as catalogClient } from '../../../catalog-client/package.json';\nimport { version as catalogModel } from '../../../catalog-model/package.json';\nimport { version as cli } from '../../../cli/package.json';\nimport { version as config } from '../../../config/package.json';\nimport { version as coreAppApi } from '../../../core-app-api/package.json';\nimport { version as coreComponents } from '../../../core-components/package.json';\nimport { version as corePluginApi } from '../../../core-plugin-api/package.json';\nimport { version as e2eTestUtils } from '../../../e2e-test-utils/package.json';\nimport { version as errors } from '../../../errors/package.json';\nimport { version as integrationReact } from '../../../integration-react/package.json';\nimport { version as testUtils } from '../../../test-utils/package.json';\nimport { version as theme } from '../../../theme/package.json';\n\nimport { version as pluginApiDocs } from '../../../../plugins/api-docs/package.json';\nimport { version as pluginAppBackend } from '../../../../plugins/app-backend/package.json';\nimport { version as pluginAuthBackend } from '../../../../plugins/auth-backend/package.json';\nimport { version as pluginAuthNode } from '../../../../plugins/auth-node/package.json';\nimport { version as pluginCatalog } from '../../../../plugins/catalog/package.json';\nimport { version as pluginCatalogCommon } from '../../../../plugins/catalog-common/package.json';\nimport { version as pluginCatalogReact } from '../../../../plugins/catalog-react/package.json';\nimport { version as pluginCatalogBackend } from '../../../../plugins/catalog-backend/package.json';\nimport { version as pluginCatalogBackendModuleScaffolderEntityModel } from '../../../../plugins/catalog-backend-module-scaffolder-entity-model/package.json';\nimport { version as pluginCatalogGraph } from '../../../../plugins/catalog-graph/package.json';\nimport { version as pluginCatalogImport } from '../../../../plugins/catalog-import/package.json';\nimport { version as pluginExplore } from '../../../../plugins/explore/package.json';\nimport { version as pluginGithubActions } from '../../../../plugins/github-actions/package.json';\nimport { version as pluginLighthouse } from '../../../../plugins/lighthouse/package.json';\nimport { version as pluginOrg } from '../../../../plugins/org/package.json';\nimport { version as pluginPermissionCommon } from '../../../../plugins/permission-common/package.json';\nimport { version as pluginPermissionReact } from '../../../../plugins/permission-react/package.json';\nimport { version as pluginPermissionNode } from '../../../../plugins/permission-node/package.json';\nimport { version as pluginProxyBackend } from '../../../../plugins/proxy-backend/package.json';\nimport { version as pluginRollbarBackend } from '../../../../plugins/rollbar-backend/package.json';\nimport { version as pluginScaffolder } from '../../../../plugins/scaffolder/package.json';\nimport { version as pluginScaffolderBackend } from '../../../../plugins/scaffolder-backend/package.json';\nimport { version as pluginSearch } from '../../../../plugins/search/package.json';\nimport { version as pluginSearchReact } from '../../../../plugins/search-react/package.json';\nimport { version as pluginSearchBackend } from '../../../../plugins/search-backend/package.json';\nimport { version as pluginSearchBackendModuleCatalog } from '../../../../plugins/search-backend-module-catalog/package.json';\nimport { version as pluginSearchBackendModulePg } from '../../../../plugins/search-backend-module-pg/package.json';\nimport { version as pluginSearchBackendModuleTechdocs } from '../../../../plugins/search-backend-module-techdocs/package.json';\nimport { version as pluginSearchBackendNode } from '../../../../plugins/search-backend-node/package.json';\nimport { version as pluginTechRadar } from '../../../../plugins/tech-radar/package.json';\nimport { version as pluginTechdocs } from '../../../../plugins/techdocs/package.json';\nimport { version as pluginTechdocsReact } from '../../../../plugins/techdocs-react/package.json';\nimport { version as pluginTechdocsModuleAddonsContrib } from '../../../../plugins/techdocs-module-addons-contrib/package.json';\nimport { version as pluginTechdocsBackend } from '../../../../plugins/techdocs-backend/package.json';\nimport { version as pluginUserSettings } from '../../../../plugins/user-settings/package.json';\n\nexport const packageVersions = {\n root,\n '@backstage/app-defaults': appDefaults,\n '@backstage/backend-common': backendCommon,\n '@backstage/backend-tasks': backendTasks,\n '@backstage/catalog-client': catalogClient,\n '@backstage/catalog-model': catalogModel,\n '@backstage/cli': cli,\n '@backstage/config': config,\n '@backstage/core-app-api': coreAppApi,\n '@backstage/core-components': coreComponents,\n '@backstage/core-plugin-api': corePluginApi,\n '@backstage/e2e-test-utils': e2eTestUtils,\n '@backstage/errors': errors,\n '@backstage/integration-react': integrationReact,\n '@backstage/plugin-api-docs': pluginApiDocs,\n '@backstage/plugin-app-backend': pluginAppBackend,\n '@backstage/plugin-auth-backend': pluginAuthBackend,\n '@backstage/plugin-auth-node': pluginAuthNode,\n '@backstage/plugin-catalog': pluginCatalog,\n '@backstage/plugin-catalog-common': pluginCatalogCommon,\n '@backstage/plugin-catalog-react': pluginCatalogReact,\n '@backstage/plugin-catalog-backend': pluginCatalogBackend,\n '@backstage/plugin-catalog-backend-module-scaffolder-entity-model':\n pluginCatalogBackendModuleScaffolderEntityModel,\n '@backstage/plugin-catalog-graph': pluginCatalogGraph,\n '@backstage/plugin-catalog-import': pluginCatalogImport,\n '@backstage/plugin-explore': pluginExplore,\n '@backstage/plugin-github-actions': pluginGithubActions,\n '@backstage/plugin-lighthouse': pluginLighthouse,\n '@backstage/plugin-org': pluginOrg,\n '@backstage/plugin-permission-common': pluginPermissionCommon,\n '@backstage/plugin-permission-node': pluginPermissionNode,\n '@backstage/plugin-permission-react': pluginPermissionReact,\n '@backstage/plugin-proxy-backend': pluginProxyBackend,\n '@backstage/plugin-rollbar-backend': pluginRollbarBackend,\n '@backstage/plugin-scaffolder': pluginScaffolder,\n '@backstage/plugin-scaffolder-backend': pluginScaffolderBackend,\n '@backstage/plugin-search': pluginSearch,\n '@backstage/plugin-search-react': pluginSearchReact,\n '@backstage/plugin-search-backend': pluginSearchBackend,\n '@backstage/plugin-search-backend-module-catalog':\n pluginSearchBackendModuleCatalog,\n '@backstage/plugin-search-backend-module-pg': pluginSearchBackendModulePg,\n '@backstage/plugin-search-backend-module-techdocs':\n pluginSearchBackendModuleTechdocs,\n '@backstage/plugin-search-backend-node': pluginSearchBackendNode,\n '@backstage/plugin-tech-radar': pluginTechRadar,\n '@backstage/plugin-techdocs': pluginTechdocs,\n '@backstage/plugin-techdocs-react': pluginTechdocsReact,\n '@backstage/plugin-techdocs-module-addons-contrib':\n pluginTechdocsModuleAddonsContrib,\n '@backstage/plugin-techdocs-backend': pluginTechdocsBackend,\n '@backstage/plugin-user-settings': pluginUserSettings,\n '@backstage/test-utils': testUtils,\n '@backstage/theme': theme,\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport chalk from 'chalk';\nimport fs from 'fs-extra';\nimport handlebars from 'handlebars';\nimport ora from 'ora';\nimport recursive from 'recursive-readdir';\nimport {\n basename,\n dirname,\n resolve as resolvePath,\n relative as relativePath,\n} from 'path';\nimport { exec as execCb } from 'child_process';\nimport { packageVersions } from './versions';\nimport { promisify } from 'util';\nimport os from 'os';\n\nconst TASK_NAME_MAX_LENGTH = 14;\nconst TEN_MINUTES_MS = 1000 * 60 * 10;\nconst exec = promisify(execCb);\n\nexport type GitConfig = {\n defaultBranch?: string;\n};\n\nexport class Task {\n static log(name: string = '') {\n process.stdout.write(`${chalk.green(name)}\\n`);\n }\n\n static error(message: string = '') {\n process.stdout.write(`\\n${chalk.red(message)}\\n\\n`);\n }\n\n static section(name: string) {\n const title = chalk.green(`${name}:`);\n process.stdout.write(`\\n ${title}\\n`);\n }\n\n static exit(code: number = 0) {\n process.exit(code);\n }\n\n static async forItem(\n task: string,\n item: string,\n taskFunc: () => Promise<void>,\n ): Promise<void> {\n const paddedTask = chalk.green(task.padEnd(TASK_NAME_MAX_LENGTH));\n\n const spinner = ora({\n prefixText: chalk.green(` ${paddedTask}${chalk.cyan(item)}`),\n spinner: 'arc',\n color: 'green',\n }).start();\n\n try {\n await taskFunc();\n spinner.succeed();\n } catch (error) {\n spinner.fail();\n throw error;\n }\n }\n}\n\n/**\n * Generate a templated backstage project\n *\n * @param templateDir - location containing template files\n * @param destinationDir - location to save templated project\n * @param context - template parameters\n */\nexport async function templatingTask(\n templateDir: string,\n destinationDir: string,\n context: any,\n) {\n const files = await recursive(templateDir).catch(error => {\n throw new Error(`Failed to read template directory: ${error.message}`);\n });\n\n for (const file of files) {\n const destinationFile = resolvePath(\n destinationDir,\n relativePath(templateDir, file),\n );\n await fs.ensureDir(dirname(destinationFile));\n\n if (file.endsWith('.hbs')) {\n await Task.forItem('templating', basename(file), async () => {\n const destination = destinationFile.replace(/\\.hbs$/, '');\n\n const template = await fs.readFile(file);\n const compiled = handlebars.compile(template.toString());\n const contents = compiled(\n { name: basename(destination), ...context },\n {\n helpers: {\n version(name: keyof typeof packageVersions) {\n if (name in packageVersions) {\n return packageVersions[name];\n }\n throw new Error(`No version available for package ${name}`);\n },\n },\n },\n );\n\n await fs.writeFile(destination, contents).catch(error => {\n throw new Error(\n `Failed to create file: ${destination}: ${error.message}`,\n );\n });\n });\n } else {\n await Task.forItem('copying', basename(file), async () => {\n await fs.copyFile(file, destinationFile).catch(error => {\n const destination = destinationFile;\n throw new Error(\n `Failed to copy file to ${destination} : ${error.message}`,\n );\n });\n });\n }\n }\n}\n\n/**\n * Verify that application target does not already exist\n *\n * @param rootDir - The directory to create application folder `name`\n * @param name - The specified name of the application\n * @Throws Error - If directory with name of `destination` already exists\n */\nexport async function checkAppExistsTask(rootDir: string, name: string) {\n await Task.forItem('checking', name, async () => {\n const destination = resolvePath(rootDir, name);\n\n if (await fs.pathExists(destination)) {\n const existing = chalk.cyan(destination.replace(`${rootDir}/`, ''));\n throw new Error(\n `A directory with the same name already exists: ${existing}\\nPlease try again with a different app name`,\n );\n }\n });\n}\n\n/**\n * Verify that application `path` exists, otherwise create the directory\n *\n * @param path - target to create directory\n * @throws if `path` is a file, or `fs.mkdir` fails\n */\nexport async function checkPathExistsTask(path: string) {\n await Task.forItem('checking', path, async () => {\n try {\n await fs.mkdirs(path);\n } catch (error) {\n // will fail if a file already exists at given `path`\n throw new Error(`Failed to create app directory: ${error.message}`);\n }\n });\n}\n\n/**\n * Run `yarn install` and `run tsc` in application directory\n *\n * @param appDir - location of application to build\n */\nexport async function buildAppTask(appDir: string) {\n process.chdir(appDir);\n\n await Task.forItem('determining', 'yarn version', async () => {\n const result = await exec('yarn --version');\n const yarnVersion = result.stdout?.trim();\n\n if (yarnVersion && !yarnVersion.startsWith('1.')) {\n throw new Error(\n `@backstage/create-app requires Yarn v1, found '${yarnVersion}'. You can migrate the project to Yarn 3 after creation using https://backstage.io/docs/tutorials/yarn-migration`,\n );\n }\n });\n\n const runCmd = async (cmd: string) => {\n await Task.forItem('executing', cmd, async () => {\n await exec(cmd).catch(error => {\n process.stdout.write(error.stderr);\n process.stdout.write(error.stdout);\n throw new Error(`Could not execute command ${chalk.cyan(cmd)}`);\n });\n });\n };\n\n const installTimeout = setTimeout(() => {\n Task.error(\n \"\\n⏱️ It's taking a long time to install dependencies, you may want to exit (Ctrl-C) and run 'yarn install' and 'yarn tsc' manually\",\n );\n }, TEN_MINUTES_MS);\n\n await runCmd('yarn install').finally(() => clearTimeout(installTimeout));\n await runCmd('yarn tsc');\n}\n\n/**\n * Move temporary directory to destination application folder\n *\n * @param tempDir - source path to copy files from\n * @param destination - target path to copy files\n * @param id - item ID\n * @throws if `fs.move` fails\n */\nexport async function moveAppTask(\n tempDir: string,\n destination: string,\n id: string,\n) {\n await Task.forItem('moving', id, async () => {\n await fs\n .move(tempDir, destination)\n .catch(error => {\n throw new Error(\n `Failed to move app from ${tempDir} to ${destination}: ${error.message}`,\n );\n })\n .finally(() => {\n // remove temporary files on both success and failure\n fs.removeSync(tempDir);\n });\n });\n}\n\n/**\n * Read git configs by creating a temp folder and initializing a repo\n *\n * @throws if `exec` fails\n */\nexport async function readGitConfig(): Promise<GitConfig | undefined> {\n const tempDir = await fs.mkdtemp(resolvePath(os.tmpdir(), 'git-temp-dir-'));\n\n try {\n await exec('git init', { cwd: tempDir });\n await exec('git commit --allow-empty -m \"Initial commit\"', {\n cwd: tempDir,\n });\n\n const getDefaultBranch = await exec(\n 'git branch --format=\"%(refname:short)\"',\n { cwd: tempDir },\n );\n\n return {\n defaultBranch: getDefaultBranch.stdout?.trim() || undefined,\n };\n } catch (error) {\n return undefined;\n } finally {\n await fs.rm(tempDir, { recursive: true });\n }\n}\n\n/**\n * Initializes a git repository in the destination folder if possible\n *\n * @param dir - source path to initialize git repository in\n * @returns true if git repository was initialized\n */\nexport async function tryInitGitRepository(dir: string) {\n try {\n // Check if we're already in a git repo\n await exec('git rev-parse --is-inside-work-tree', { cwd: dir });\n return false;\n } catch {\n /* ignored */\n }\n\n try {\n await exec('git init', { cwd: dir });\n await exec('git add .', { cwd: dir });\n await exec('git commit -m \"Initial commit\"', { cwd: dir });\n return true;\n } catch (error) {\n try {\n await fs.rm(resolvePath(dir, '.git'), { recursive: true, force: true });\n } catch {\n throw new Error('Failed to remove .git folder');\n }\n\n return false;\n }\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport chalk from 'chalk';\nimport { OptionValues } from 'commander';\nimport inquirer, { Answers } from 'inquirer';\nimport { resolve as resolvePath } from 'path';\nimport { findPaths } from '@backstage/cli-common';\nimport os from 'os';\nimport fs from 'fs-extra';\nimport {\n Task,\n buildAppTask,\n checkAppExistsTask,\n checkPathExistsTask,\n moveAppTask,\n templatingTask,\n tryInitGitRepository,\n readGitConfig,\n} from './lib/tasks';\n\nconst DEFAULT_BRANCH = 'master';\n\nexport default async (opts: OptionValues): Promise<void> => {\n /* eslint-disable-next-line no-restricted-syntax */\n const paths = findPaths(__dirname);\n const answers: Answers = await inquirer.prompt([\n {\n type: 'input',\n name: 'name',\n default: 'backstage',\n message: chalk.blue('Enter a name for the app [required]'),\n validate: (value: any) => {\n if (!value) {\n return chalk.red('Please enter a name for the app');\n } else if (!/^[a-z0-9]+(-[a-z0-9]+)*$/.test(value)) {\n return chalk.red(\n 'App name must be lowercase and contain only letters, digits, and dashes.',\n );\n }\n return true;\n },\n when: (a: Answers) => {\n const envName = process.env.BACKSTAGE_APP_NAME;\n if (envName) {\n a.name = envName;\n return false;\n }\n return true;\n },\n },\n ]);\n\n const templateDir = opts.templatePath\n ? paths.resolveTarget(opts.templatePath)\n : paths.resolveOwn('templates/default-app');\n\n // Use `--path` argument as application directory when specified, otherwise\n // create a directory using `answers.name`\n const appDir = opts.path\n ? resolvePath(paths.targetDir, opts.path)\n : resolvePath(paths.targetDir, answers.name);\n\n Task.log();\n Task.log('Creating the app...');\n\n try {\n const gitConfig = await readGitConfig();\n\n if (opts.path) {\n // Template directly to specified path\n\n Task.section('Checking that supplied path exists');\n await checkPathExistsTask(appDir);\n\n Task.section('Preparing files');\n await templatingTask(templateDir, opts.path, {\n ...answers,\n defaultBranch: gitConfig?.defaultBranch ?? DEFAULT_BRANCH,\n });\n } else {\n // Template to temporary location, and then move files\n\n Task.section('Checking if the directory is available');\n await checkAppExistsTask(paths.targetDir, answers.name);\n\n Task.section('Creating a temporary app directory');\n const tempDir = await fs.mkdtemp(resolvePath(os.tmpdir(), answers.name));\n\n Task.section('Preparing files');\n await templatingTask(templateDir, tempDir, {\n ...answers,\n defaultBranch: gitConfig?.defaultBranch ?? DEFAULT_BRANCH,\n });\n\n Task.section('Moving to final location');\n await moveAppTask(tempDir, appDir, answers.name);\n }\n\n if (gitConfig) {\n if (await tryInitGitRepository(appDir)) {\n // Since we don't know whether we were able to init git before we\n // try, we can't track the actual task execution\n Task.forItem('init', 'git repository', async () => {});\n }\n }\n\n if (!opts.skipInstall) {\n Task.section('Installing dependencies');\n await buildAppTask(appDir);\n }\n\n Task.log();\n Task.log(\n chalk.green(`🥇 Successfully created ${chalk.cyan(answers.name)}`),\n );\n Task.log();\n Task.section('All set! Now you might want to');\n if (opts.skipInstall) {\n Task.log(\n ` Install the dependencies: ${chalk.cyan(\n `cd ${opts.path ?? answers.name} && yarn install`,\n )}`,\n );\n }\n Task.log(\n ` Run the app: ${chalk.cyan(\n `cd ${opts.path ?? answers.name} && yarn dev`,\n )}`,\n );\n Task.log(\n ' Set up the software catalog: https://backstage.io/docs/features/software-catalog/configuration',\n );\n Task.log(' Add authentication: https://backstage.io/docs/auth/');\n Task.log();\n Task.exit();\n } catch (error) {\n Task.error(String(error));\n\n Task.log('It seems that something went wrong when creating the app 🤔');\n\n Task.error('🔥 Failed to create app!');\n Task.exit(1);\n }\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * A CLI that helps you create your own Backstage app\n *\n * @packageDocumentation\n */\n\nimport { program } from 'commander';\nimport { exitWithError } from './lib/errors';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { version } from '../../../package.json';\nimport createApp from './createApp';\n\nconst main = (argv: string[]) => {\n program\n .name('backstage-create-app')\n .version(version)\n .description('Creates a new app in a new directory or specified path')\n .option(\n '--path [directory]',\n 'Location to store the app defaulting to a new folder with the app name',\n )\n .option(\n '--skip-install',\n 'Skip the install and builds steps after creating the app',\n )\n .option(\n '--template-path [directory]',\n 'Use an external application template instead of the default template',\n )\n .action(cmd => createApp(cmd));\n\n program.parse(argv);\n};\n\nprocess.on('unhandledRejection', rejection => {\n if (rejection instanceof Error) {\n exitWithError(rejection);\n } else {\n exitWithError(new Error(`Unknown rejection: '${rejection}'`));\n }\n});\n\nmain(process.argv);\n"],"names":["chalk","root","appDefaults","backendCommon","backendTasks","catalogClient","catalogModel","cli","config","coreAppApi","coreComponents","corePluginApi","e2eTestUtils","errors","integrationReact","pluginApiDocs","pluginAppBackend","pluginAuthBackend","pluginAuthNode","pluginCatalog","pluginCatalogCommon","pluginCatalogReact","pluginCatalogBackend","pluginCatalogBackendModuleScaffolderEntityModel","pluginCatalogGraph","pluginCatalogImport","pluginExplore","pluginGithubActions","pluginLighthouse","pluginOrg","pluginPermissionCommon","pluginPermissionNode","pluginPermissionReact","pluginProxyBackend","pluginRollbarBackend","pluginScaffolder","pluginScaffolderBackend","pluginSearch","pluginSearchReact","pluginSearchBackend","pluginSearchBackendModuleCatalog","pluginSearchBackendModulePg","pluginSearchBackendModuleTechdocs","pluginSearchBackendNode","pluginTechRadar","pluginTechdocs","pluginTechdocsReact","pluginTechdocsModuleAddonsContrib","pluginTechdocsBackend","pluginUserSettings","testUtils","theme","promisify","execCb","ora","recursive","resolvePath","relativePath","fs","dirname","basename","handlebars","os","findPaths","inquirer","program","version"],"mappings":";;;;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AAAA,IACA,sEAAA;AAAA,GAED,CAAA,MAAA,CAAO,CAAO,GAAA,KAAA,SAAA,CAAU,GAAG,CAAC,CAAA,CAAA;AAE/B,EAAAD,iBAAA,CAAQ,MAAM,IAAI,CAAA,CAAA;AACpB,CAAA,CAAA;AAEA,OAAQ,CAAA,EAAA,CAAG,sBAAsB,CAAa,SAAA,KAAA;AAC5C,EAAA,IAAI,qBAAqB,KAAO,EAAA;AAC9B,IAAA,aAAA,CAAc,SAAS,CAAA,CAAA;AAAA,GAClB,MAAA;AACL,IAAA,aAAA,CAAc,IAAI,KAAA,CAAM,CAAuB,oBAAA,EAAA,SAAS,GAAG,CAAC,CAAA,CAAA;AAAA,GAC9D;AACF,CAAC,CAAA,CAAA;AAED,IAAA,CAAK,QAAQ,IAAI,CAAA;;"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../src/lib/errors.ts","../src/lib/versions.ts","../src/lib/tasks.ts","../src/createApp.ts","../src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport chalk from 'chalk';\n\nexport class CustomError extends Error {\n get name(): string {\n return this.constructor.name;\n }\n}\n\nexport class ExitCodeError extends CustomError {\n readonly code: number;\n\n constructor(code: number, command?: string) {\n if (command) {\n super(`Command '${command}' exited with code ${code}`);\n } else {\n super(`Child exited with code ${code}`);\n }\n this.code = code;\n }\n}\n\nexport function exitWithError(error: Error): never {\n if (error instanceof ExitCodeError) {\n process.stderr.write(`\\n${chalk.red(error.message)}\\n\\n`);\n process.exit(error.code);\n } else {\n process.stderr.write(`\\n${chalk.red(`${error}`)}\\n\\n`);\n process.exit(1);\n }\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* eslint-disable @backstage/no-relative-monorepo-imports */\n\n/*\nThis is a list of all packages used by the template. If dependencies are added or removed,\nthis list should be updated as well.\n\nThere is a release step that ensures that this package is always bumped with every\nrelease, meaning these version will always be up to date.\n\nThis does not create an actual dependency on these packages and does not bring in any code.\nRelative imports are used rather than package imports to make sure the packages aren't externalized.\nRollup will extract the value of the version field in each package at build time without\nleaving any imports in place.\n*/\n\nimport { version as root } from '../../../../package.json';\n\nimport { version as appDefaults } from '../../../app-defaults/package.json';\nimport { version as backendCommon } from '../../../backend-common/package.json';\nimport { version as backendTasks } from '../../../backend-tasks/package.json';\nimport { version as catalogClient } from '../../../catalog-client/package.json';\nimport { version as catalogModel } from '../../../catalog-model/package.json';\nimport { version as cli } from '../../../cli/package.json';\nimport { version as config } from '../../../config/package.json';\nimport { version as coreAppApi } from '../../../core-app-api/package.json';\nimport { version as coreComponents } from '../../../core-components/package.json';\nimport { version as corePluginApi } from '../../../core-plugin-api/package.json';\nimport { version as e2eTestUtils } from '../../../e2e-test-utils/package.json';\nimport { version as errors } from '../../../errors/package.json';\nimport { version as integrationReact } from '../../../integration-react/package.json';\nimport { version as testUtils } from '../../../test-utils/package.json';\nimport { version as theme } from '../../../theme/package.json';\n\nimport { version as pluginApiDocs } from '../../../../plugins/api-docs/package.json';\nimport { version as pluginAppBackend } from '../../../../plugins/app-backend/package.json';\nimport { version as pluginAuthBackend } from '../../../../plugins/auth-backend/package.json';\nimport { version as pluginAuthNode } from '../../../../plugins/auth-node/package.json';\nimport { version as pluginCatalog } from '../../../../plugins/catalog/package.json';\nimport { version as pluginCatalogCommon } from '../../../../plugins/catalog-common/package.json';\nimport { version as pluginCatalogReact } from '../../../../plugins/catalog-react/package.json';\nimport { version as pluginCatalogBackend } from '../../../../plugins/catalog-backend/package.json';\nimport { version as pluginCatalogBackendModuleScaffolderEntityModel } from '../../../../plugins/catalog-backend-module-scaffolder-entity-model/package.json';\nimport { version as pluginCatalogGraph } from '../../../../plugins/catalog-graph/package.json';\nimport { version as pluginCatalogImport } from '../../../../plugins/catalog-import/package.json';\nimport { version as pluginExplore } from '../../../../plugins/explore/package.json';\nimport { version as pluginGithubActions } from '../../../../plugins/github-actions/package.json';\nimport { version as pluginLighthouse } from '../../../../plugins/lighthouse/package.json';\nimport { version as pluginOrg } from '../../../../plugins/org/package.json';\nimport { version as pluginPermissionCommon } from '../../../../plugins/permission-common/package.json';\nimport { version as pluginPermissionReact } from '../../../../plugins/permission-react/package.json';\nimport { version as pluginPermissionNode } from '../../../../plugins/permission-node/package.json';\nimport { version as pluginProxyBackend } from '../../../../plugins/proxy-backend/package.json';\nimport { version as pluginRollbarBackend } from '../../../../plugins/rollbar-backend/package.json';\nimport { version as pluginScaffolder } from '../../../../plugins/scaffolder/package.json';\nimport { version as pluginScaffolderBackend } from '../../../../plugins/scaffolder-backend/package.json';\nimport { version as pluginSearch } from '../../../../plugins/search/package.json';\nimport { version as pluginSearchReact } from '../../../../plugins/search-react/package.json';\nimport { version as pluginSearchBackend } from '../../../../plugins/search-backend/package.json';\nimport { version as pluginSearchBackendModuleCatalog } from '../../../../plugins/search-backend-module-catalog/package.json';\nimport { version as pluginSearchBackendModulePg } from '../../../../plugins/search-backend-module-pg/package.json';\nimport { version as pluginSearchBackendModuleTechdocs } from '../../../../plugins/search-backend-module-techdocs/package.json';\nimport { version as pluginSearchBackendNode } from '../../../../plugins/search-backend-node/package.json';\nimport { version as pluginTechRadar } from '../../../../plugins/tech-radar/package.json';\nimport { version as pluginTechdocs } from '../../../../plugins/techdocs/package.json';\nimport { version as pluginTechdocsReact } from '../../../../plugins/techdocs-react/package.json';\nimport { version as pluginTechdocsModuleAddonsContrib } from '../../../../plugins/techdocs-module-addons-contrib/package.json';\nimport { version as pluginTechdocsBackend } from '../../../../plugins/techdocs-backend/package.json';\nimport { version as pluginUserSettings } from '../../../../plugins/user-settings/package.json';\n\nexport const packageVersions = {\n root,\n '@backstage/app-defaults': appDefaults,\n '@backstage/backend-common': backendCommon,\n '@backstage/backend-tasks': backendTasks,\n '@backstage/catalog-client': catalogClient,\n '@backstage/catalog-model': catalogModel,\n '@backstage/cli': cli,\n '@backstage/config': config,\n '@backstage/core-app-api': coreAppApi,\n '@backstage/core-components': coreComponents,\n '@backstage/core-plugin-api': corePluginApi,\n '@backstage/e2e-test-utils': e2eTestUtils,\n '@backstage/errors': errors,\n '@backstage/integration-react': integrationReact,\n '@backstage/plugin-api-docs': pluginApiDocs,\n '@backstage/plugin-app-backend': pluginAppBackend,\n '@backstage/plugin-auth-backend': pluginAuthBackend,\n '@backstage/plugin-auth-node': pluginAuthNode,\n '@backstage/plugin-catalog': pluginCatalog,\n '@backstage/plugin-catalog-common': pluginCatalogCommon,\n '@backstage/plugin-catalog-react': pluginCatalogReact,\n '@backstage/plugin-catalog-backend': pluginCatalogBackend,\n '@backstage/plugin-catalog-backend-module-scaffolder-entity-model':\n pluginCatalogBackendModuleScaffolderEntityModel,\n '@backstage/plugin-catalog-graph': pluginCatalogGraph,\n '@backstage/plugin-catalog-import': pluginCatalogImport,\n '@backstage/plugin-explore': pluginExplore,\n '@backstage/plugin-github-actions': pluginGithubActions,\n '@backstage/plugin-lighthouse': pluginLighthouse,\n '@backstage/plugin-org': pluginOrg,\n '@backstage/plugin-permission-common': pluginPermissionCommon,\n '@backstage/plugin-permission-node': pluginPermissionNode,\n '@backstage/plugin-permission-react': pluginPermissionReact,\n '@backstage/plugin-proxy-backend': pluginProxyBackend,\n '@backstage/plugin-rollbar-backend': pluginRollbarBackend,\n '@backstage/plugin-scaffolder': pluginScaffolder,\n '@backstage/plugin-scaffolder-backend': pluginScaffolderBackend,\n '@backstage/plugin-search': pluginSearch,\n '@backstage/plugin-search-react': pluginSearchReact,\n '@backstage/plugin-search-backend': pluginSearchBackend,\n '@backstage/plugin-search-backend-module-catalog':\n pluginSearchBackendModuleCatalog,\n '@backstage/plugin-search-backend-module-pg': pluginSearchBackendModulePg,\n '@backstage/plugin-search-backend-module-techdocs':\n pluginSearchBackendModuleTechdocs,\n '@backstage/plugin-search-backend-node': pluginSearchBackendNode,\n '@backstage/plugin-tech-radar': pluginTechRadar,\n '@backstage/plugin-techdocs': pluginTechdocs,\n '@backstage/plugin-techdocs-react': pluginTechdocsReact,\n '@backstage/plugin-techdocs-module-addons-contrib':\n pluginTechdocsModuleAddonsContrib,\n '@backstage/plugin-techdocs-backend': pluginTechdocsBackend,\n '@backstage/plugin-user-settings': pluginUserSettings,\n '@backstage/test-utils': testUtils,\n '@backstage/theme': theme,\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport chalk from 'chalk';\nimport fs from 'fs-extra';\nimport handlebars from 'handlebars';\nimport ora from 'ora';\nimport recursive from 'recursive-readdir';\nimport {\n basename,\n dirname,\n resolve as resolvePath,\n relative as relativePath,\n} from 'path';\nimport fetch from 'node-fetch';\nimport { exec as execCb } from 'child_process';\nimport { packageVersions } from './versions';\nimport { promisify } from 'util';\nimport os from 'os';\n\nconst TASK_NAME_MAX_LENGTH = 14;\nconst TEN_MINUTES_MS = 1000 * 60 * 10;\nconst exec = promisify(execCb);\n\nexport type GitConfig = {\n defaultBranch?: string;\n};\n\nexport class Task {\n static log(name: string = '') {\n process.stdout.write(`${chalk.green(name)}\\n`);\n }\n\n static error(message: string = '') {\n process.stdout.write(`\\n${chalk.red(message)}\\n\\n`);\n }\n\n static section(name: string) {\n const title = chalk.green(`${name}:`);\n process.stdout.write(`\\n ${title}\\n`);\n }\n\n static exit(code: number = 0) {\n process.exit(code);\n }\n\n static async forItem(\n task: string,\n item: string,\n taskFunc: () => Promise<void>,\n ): Promise<void> {\n const paddedTask = chalk.green(task.padEnd(TASK_NAME_MAX_LENGTH));\n\n const spinner = ora({\n prefixText: chalk.green(` ${paddedTask}${chalk.cyan(item)}`),\n spinner: 'arc',\n color: 'green',\n }).start();\n\n try {\n await taskFunc();\n spinner.succeed();\n } catch (error) {\n spinner.fail();\n throw error;\n }\n }\n}\n\n/**\n * Generate a templated backstage project\n *\n * @param templateDir - location containing template files\n * @param destinationDir - location to save templated project\n * @param context - template parameters\n */\nexport async function templatingTask(\n templateDir: string,\n destinationDir: string,\n context: any,\n) {\n const files = await recursive(templateDir).catch(error => {\n throw new Error(`Failed to read template directory: ${error.message}`);\n });\n\n for (const file of files) {\n const destinationFile = resolvePath(\n destinationDir,\n relativePath(templateDir, file),\n );\n await fs.ensureDir(dirname(destinationFile));\n\n if (file.endsWith('.hbs')) {\n await Task.forItem('templating', basename(file), async () => {\n const destination = destinationFile.replace(/\\.hbs$/, '');\n\n const template = await fs.readFile(file);\n const compiled = handlebars.compile(template.toString());\n const contents = compiled(\n { name: basename(destination), ...context },\n {\n helpers: {\n version(name: keyof typeof packageVersions) {\n if (name in packageVersions) {\n return packageVersions[name];\n }\n throw new Error(`No version available for package ${name}`);\n },\n },\n },\n );\n\n await fs.writeFile(destination, contents).catch(error => {\n throw new Error(\n `Failed to create file: ${destination}: ${error.message}`,\n );\n });\n });\n } else {\n await Task.forItem('copying', basename(file), async () => {\n await fs.copyFile(file, destinationFile).catch(error => {\n const destination = destinationFile;\n throw new Error(\n `Failed to copy file to ${destination} : ${error.message}`,\n );\n });\n });\n }\n }\n}\n\n/**\n * Verify that application target does not already exist\n *\n * @param rootDir - The directory to create application folder `name`\n * @param name - The specified name of the application\n * @Throws Error - If directory with name of `destination` already exists\n */\nexport async function checkAppExistsTask(rootDir: string, name: string) {\n await Task.forItem('checking', name, async () => {\n const destination = resolvePath(rootDir, name);\n\n if (await fs.pathExists(destination)) {\n const existing = chalk.cyan(destination.replace(`${rootDir}/`, ''));\n throw new Error(\n `A directory with the same name already exists: ${existing}\\nPlease try again with a different app name`,\n );\n }\n });\n}\n\n/**\n * Verify that application `path` exists, otherwise create the directory\n *\n * @param path - target to create directory\n * @throws if `path` is a file, or `fs.mkdir` fails\n */\nexport async function checkPathExistsTask(path: string) {\n await Task.forItem('checking', path, async () => {\n try {\n await fs.mkdirs(path);\n } catch (error) {\n // will fail if a file already exists at given `path`\n throw new Error(`Failed to create app directory: ${error.message}`);\n }\n });\n}\n\n/**\n * Run `yarn install` and `run tsc` in application directory\n *\n * @param appDir - location of application to build\n */\nexport async function buildAppTask(appDir: string) {\n process.chdir(appDir);\n\n await Task.forItem('determining', 'yarn version', async () => {\n const result = await exec('yarn --version');\n const yarnVersion = result.stdout?.trim();\n\n if (yarnVersion && !yarnVersion.startsWith('1.')) {\n throw new Error(\n `@backstage/create-app requires Yarn v1, found '${yarnVersion}'. You can migrate the project to Yarn 3 after creation using https://backstage.io/docs/tutorials/yarn-migration`,\n );\n }\n });\n\n const runCmd = async (cmd: string) => {\n await Task.forItem('executing', cmd, async () => {\n await exec(cmd).catch(error => {\n process.stdout.write(error.stderr);\n process.stdout.write(error.stdout);\n throw new Error(`Could not execute command ${chalk.cyan(cmd)}`);\n });\n });\n };\n\n const installTimeout = setTimeout(() => {\n Task.error(\n \"\\n⏱️ It's taking a long time to install dependencies, you may want to exit (Ctrl-C) and run 'yarn install' and 'yarn tsc' manually\",\n );\n }, TEN_MINUTES_MS);\n\n await runCmd('yarn install').finally(() => clearTimeout(installTimeout));\n await runCmd('yarn tsc');\n}\n\n/**\n * Move temporary directory to destination application folder\n *\n * @param tempDir - source path to copy files from\n * @param destination - target path to copy files\n * @param id - item ID\n * @throws if `fs.move` fails\n */\nexport async function moveAppTask(\n tempDir: string,\n destination: string,\n id: string,\n) {\n await Task.forItem('moving', id, async () => {\n await fs\n .move(tempDir, destination)\n .catch(error => {\n throw new Error(\n `Failed to move app from ${tempDir} to ${destination}: ${error.message}`,\n );\n })\n .finally(() => {\n // remove temporary files on both success and failure\n fs.removeSync(tempDir);\n });\n });\n}\n\n/**\n * Read git configs by creating a temp folder and initializing a repo\n *\n * @throws if `exec` fails\n */\nexport async function readGitConfig(): Promise<GitConfig | undefined> {\n const tempDir = await fs.mkdtemp(resolvePath(os.tmpdir(), 'git-temp-dir-'));\n\n try {\n await exec('git init', { cwd: tempDir });\n await exec('git commit --allow-empty -m \"Initial commit\"', {\n cwd: tempDir,\n });\n\n const getDefaultBranch = await exec(\n 'git branch --format=\"%(refname:short)\"',\n { cwd: tempDir },\n );\n\n return {\n defaultBranch: getDefaultBranch.stdout?.trim() || undefined,\n };\n } catch (error) {\n return undefined;\n } finally {\n await fs.rm(tempDir, { recursive: true });\n }\n}\n\n/**\n * Initializes a git repository in the destination folder if possible\n *\n * @param dir - source path to initialize git repository in\n * @returns true if git repository was initialized\n */\nexport async function tryInitGitRepository(dir: string) {\n try {\n // Check if we're already in a git repo\n await exec('git rev-parse --is-inside-work-tree', { cwd: dir });\n return false;\n } catch {\n /* ignored */\n }\n\n try {\n await exec('git init', { cwd: dir });\n await exec('git add .', { cwd: dir });\n await exec('git commit -m \"Initial commit\"', { cwd: dir });\n return true;\n } catch (error) {\n try {\n await fs.rm(resolvePath(dir, '.git'), { recursive: true, force: true });\n } catch {\n throw new Error('Failed to remove .git folder');\n }\n\n return false;\n }\n}\n\n/**\n * This fetches the yarn.lock seed file at https://github.com/backstage/backstage/blob/master/packages/create-app/seed-yarn.lock\n * Its purpose is to lock individual dependencies with broken releases to known working versions.\n * This flow is decoupled from the release of the create-app package in order to avoid\n * the need to re-publish the create-app package whenever we want to update the seed file.\n *\n * @returns true if the yarn.lock seed file was fetched successfully\n */\nexport async function fetchYarnLockSeedTask(dir: string) {\n try {\n await Task.forItem('fetching', 'yarn.lock seed', async () => {\n const controller = new AbortController();\n const timeout = setTimeout(() => controller.abort(), 3000);\n const res = await fetch(\n 'https://raw.githubusercontent.com/backstage/backstage/master/packages/create-app/seed-yarn.lock',\n {\n signal: controller.signal,\n },\n );\n clearTimeout(timeout);\n\n if (!res.ok) {\n throw new Error(\n `Request failed with status ${res.status} ${res.statusText}`,\n );\n }\n\n const initialYarnLockContent = await res.text();\n\n await fs.writeFile(\n resolvePath(dir, 'yarn.lock'),\n initialYarnLockContent\n .split('\\n')\n .filter(l => !l.startsWith('//'))\n .join('\\n'),\n 'utf8',\n );\n });\n return true;\n } catch {\n return false;\n }\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport chalk from 'chalk';\nimport { OptionValues } from 'commander';\nimport inquirer, { Answers } from 'inquirer';\nimport { resolve as resolvePath } from 'path';\nimport { findPaths } from '@backstage/cli-common';\nimport os from 'os';\nimport fs from 'fs-extra';\nimport {\n Task,\n buildAppTask,\n checkAppExistsTask,\n checkPathExistsTask,\n moveAppTask,\n templatingTask,\n tryInitGitRepository,\n readGitConfig,\n fetchYarnLockSeedTask,\n} from './lib/tasks';\n\nconst DEFAULT_BRANCH = 'master';\n\nexport default async (opts: OptionValues): Promise<void> => {\n /* eslint-disable-next-line no-restricted-syntax */\n const paths = findPaths(__dirname);\n const answers: Answers = await inquirer.prompt([\n {\n type: 'input',\n name: 'name',\n default: 'backstage',\n message: chalk.blue('Enter a name for the app [required]'),\n validate: (value: any) => {\n if (!value) {\n return chalk.red('Please enter a name for the app');\n } else if (!/^[a-z0-9]+(-[a-z0-9]+)*$/.test(value)) {\n return chalk.red(\n 'App name must be lowercase and contain only letters, digits, and dashes.',\n );\n }\n return true;\n },\n when: (a: Answers) => {\n const envName = process.env.BACKSTAGE_APP_NAME;\n if (envName) {\n a.name = envName;\n return false;\n }\n return true;\n },\n },\n ]);\n\n const templateDir = opts.templatePath\n ? paths.resolveTarget(opts.templatePath)\n : paths.resolveOwn('templates/default-app');\n\n // Use `--path` argument as application directory when specified, otherwise\n // create a directory using `answers.name`\n const appDir = opts.path\n ? resolvePath(paths.targetDir, opts.path)\n : resolvePath(paths.targetDir, answers.name);\n\n Task.log();\n Task.log('Creating the app...');\n\n try {\n const gitConfig = await readGitConfig();\n\n if (opts.path) {\n // Template directly to specified path\n\n Task.section('Checking that supplied path exists');\n await checkPathExistsTask(appDir);\n\n Task.section('Preparing files');\n await templatingTask(templateDir, opts.path, {\n ...answers,\n defaultBranch: gitConfig?.defaultBranch ?? DEFAULT_BRANCH,\n });\n } else {\n // Template to temporary location, and then move files\n\n Task.section('Checking if the directory is available');\n await checkAppExistsTask(paths.targetDir, answers.name);\n\n Task.section('Creating a temporary app directory');\n const tempDir = await fs.mkdtemp(resolvePath(os.tmpdir(), answers.name));\n\n Task.section('Preparing files');\n await templatingTask(templateDir, tempDir, {\n ...answers,\n defaultBranch: gitConfig?.defaultBranch ?? DEFAULT_BRANCH,\n });\n\n Task.section('Moving to final location');\n await moveAppTask(tempDir, appDir, answers.name);\n }\n\n const fetchedYarnLockSeed = await fetchYarnLockSeedTask(appDir);\n\n if (gitConfig) {\n if (await tryInitGitRepository(appDir)) {\n // Since we don't know whether we were able to init git before we\n // try, we can't track the actual task execution\n Task.forItem('init', 'git repository', async () => {});\n }\n }\n\n if (!opts.skipInstall) {\n Task.section('Installing dependencies');\n await buildAppTask(appDir);\n }\n\n Task.log();\n Task.log(\n chalk.green(`🥇 Successfully created ${chalk.cyan(answers.name)}`),\n );\n Task.log();\n\n if (!fetchedYarnLockSeed) {\n Task.log(\n chalk.yellow(\n [\n 'Warning: Failed to fetch the yarn.lock seed file.',\n ' You may end up with incompatible dependencies that break the app.',\n ' If you run into any errors, please search the issues at',\n ' https://github.com/backstage/backstage/issues for potential solutions',\n ].join('\\n'),\n ),\n );\n }\n\n Task.section('All set! Now you might want to');\n if (opts.skipInstall) {\n Task.log(\n ` Install the dependencies: ${chalk.cyan(\n `cd ${opts.path ?? answers.name} && yarn install`,\n )}`,\n );\n }\n Task.log(\n ` Run the app: ${chalk.cyan(\n `cd ${opts.path ?? answers.name} && yarn dev`,\n )}`,\n );\n Task.log(\n ' Set up the software catalog: https://backstage.io/docs/features/software-catalog/configuration',\n );\n Task.log(' Add authentication: https://backstage.io/docs/auth/');\n Task.log();\n Task.exit();\n } catch (error) {\n Task.error(String(error));\n\n Task.log('It seems that something went wrong when creating the app 🤔');\n\n Task.error('🔥 Failed to create app!');\n Task.exit(1);\n }\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * A CLI that helps you create your own Backstage app\n *\n * @packageDocumentation\n */\n\nimport { program } from 'commander';\nimport { exitWithError } from './lib/errors';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { version } from '../../../package.json';\nimport createApp from './createApp';\n\nconst main = (argv: string[]) => {\n program\n .name('backstage-create-app')\n .version(version)\n .description('Creates a new app in a new directory or specified path')\n .option(\n '--path [directory]',\n 'Location to store the app defaulting to a new folder with the app name',\n )\n .option(\n '--skip-install',\n 'Skip the install and builds steps after creating the app',\n )\n .option(\n '--template-path [directory]',\n 'Use an external application template instead of the default template',\n )\n .action(cmd => createApp(cmd));\n\n program.parse(argv);\n};\n\nprocess.on('unhandledRejection', rejection => {\n if (rejection instanceof Error) {\n exitWithError(rejection);\n } else {\n exitWithError(new Error(`Unknown rejection: '${rejection}'`));\n }\n});\n\nmain(process.argv);\n"],"names":["chalk","root","appDefaults","backendCommon","backendTasks","catalogClient","catalogModel","cli","config","coreAppApi","coreComponents","corePluginApi","e2eTestUtils","errors","integrationReact","pluginApiDocs","pluginAppBackend","pluginAuthBackend","pluginAuthNode","pluginCatalog","pluginCatalogCommon","pluginCatalogReact","pluginCatalogBackend","pluginCatalogBackendModuleScaffolderEntityModel","pluginCatalogGraph","pluginCatalogImport","pluginExplore","pluginGithubActions","pluginLighthouse","pluginOrg","pluginPermissionCommon","pluginPermissionNode","pluginPermissionReact","pluginProxyBackend","pluginRollbarBackend","pluginScaffolder","pluginScaffolderBackend","pluginSearch","pluginSearchReact","pluginSearchBackend","pluginSearchBackendModuleCatalog","pluginSearchBackendModulePg","pluginSearchBackendModuleTechdocs","pluginSearchBackendNode","pluginTechRadar","pluginTechdocs","pluginTechdocsReact","pluginTechdocsModuleAddonsContrib","pluginTechdocsBackend","pluginUserSettings","testUtils","theme","promisify","execCb","ora","recursive","resolvePath","relativePath","fs","dirname","basename","handlebars","os","fetch","findPaths","inquirer","program","version"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBO,MAAM,oBAAoB,KAAM,CAAA;AAAA,EACrC,IAAI,IAAe,GAAA;AACjB,IAAA,OAAO,KAAK,WAAY,CAAA,IAAA,CAAA;AAAA,GAC1B;AACF,CAAA;AAEO,MAAM,sBAAsB,WAAY,CAAA;AAAA,EAG7C,WAAA,CAAY,MAAc,OAAkB,EAAA;AAA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AO,GAAA,KAAA,SAAA,CAAU,GAAG,CAAC,CAAA,CAAA;AAE/B,EAAAD,iBAAA,CAAQ,MAAM,IAAI,CAAA,CAAA;AACpB,CAAA,CAAA;AAEA,OAAQ,CAAA,EAAA,CAAG,sBAAsB,CAAa,SAAA,KAAA;AAC5C,EAAA,IAAI,qBAAqB,KAAO,EAAA;AAC9B,IAAA,aAAA,CAAc,SAAS,CAAA,CAAA;AAAA,GAClB,MAAA;AACL,IAAA,aAAA,CAAc,IAAI,KAAA,CAAM,CAAuB,oBAAA,EAAA,SAAS,GAAG,CAAC,CAAA,CAAA;AAAA,GAC9D;AACF,CAAC,CAAA,CAAA;AAED,IAAA,CAAK,QAAQ,IAAI,CAAA;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@backstage/create-app",
3
3
  "description": "A CLI that helps you create your own Backstage app",
4
- "version": "0.5.11-next.1",
4
+ "version": "0.5.11-next.3",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -29,7 +29,8 @@
29
29
  "clean": "backstage-cli package clean",
30
30
  "prepack": "node scripts/prepack.js",
31
31
  "postpack": "node scripts/postpack.js",
32
- "start": "yarn nodemon --"
32
+ "start": "yarn nodemon --",
33
+ "add-lock-seed": "node scripts/add-lock-seed.js"
33
34
  },
34
35
  "dependencies": {
35
36
  "@backstage/cli-common": "^0.1.13",
@@ -38,17 +39,19 @@
38
39
  "fs-extra": "10.1.0",
39
40
  "handlebars": "^4.7.3",
40
41
  "inquirer": "^8.2.0",
42
+ "node-fetch": "^2.6.7",
41
43
  "ora": "^5.3.0",
42
44
  "recursive-readdir": "^2.2.2"
43
45
  },
44
46
  "devDependencies": {
45
- "@backstage/backend-test-utils": "^0.3.0-next.1",
46
- "@backstage/cli": "^0.25.2-next.1",
47
+ "@backstage/backend-test-utils": "^0.3.0-next.3",
48
+ "@backstage/cli": "^0.25.2-next.3",
47
49
  "@types/command-exists": "^1.2.0",
48
50
  "@types/fs-extra": "^9.0.1",
49
51
  "@types/inquirer": "^8.1.3",
50
52
  "@types/node": "^18.17.8",
51
53
  "@types/recursive-readdir": "^2.2.0",
54
+ "msw": "^1.0.0",
52
55
  "nodemon": "^3.0.1",
53
56
  "ts-node": "^10.0.0"
54
57
  },
@@ -39,7 +39,7 @@
39
39
  "lerna": "^7.3.0",
40
40
  "node-gyp": "^9.0.0",
41
41
  "prettier": "^2.3.2",
42
- "typescript": "~5.2.0"
42
+ "typescript": "~5.3.0"
43
43
  },
44
44
  "resolutions": {
45
45
  "@types/react": "^18",
@@ -41,7 +41,7 @@
41
41
  href="<%= publicPath %>/safari-pinned-tab.svg"
42
42
  color="#5bbad5"
43
43
  />
44
- <title><%= config.getString('app.title') %></title>
44
+ <title><%= config.getOptionalString('app.title') ?? 'Backstage' %></title>
45
45
  </head>
46
46
  <body>
47
47
  <noscript>You need to enable JavaScript to run this app.</noscript>