@form8ion/project 22.0.0-beta.22 → 22.0.0-beta.23
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/README.md +5 -0
- package/lib/index.js +19 -13
- package/lib/index.js.map +1 -1
- package/package.json +5 -6
- package/src/ci-provider/prompt.js +4 -2
- package/src/ci-provider/prompt.test.js +4 -3
- package/src/ci-provider/scaffolder.js +14 -11
- package/src/ci-provider/scaffolder.test.js +7 -7
package/README.md
CHANGED
|
@@ -8,6 +8,7 @@ opinionated scaffolder for new projects
|
|
|
8
8
|
[](https://securityscorecards.dev/viewer/?uri=github.com/form8ion/project)
|
|
9
9
|
[![Codecov][coverage-badge]][coverage-link]
|
|
10
10
|
![SLSA Level 2][slsa-badge]
|
|
11
|
+
[![Socket][socket-badge]][socket-link]
|
|
11
12
|
|
|
12
13
|
<!--status-badges end -->
|
|
13
14
|
|
|
@@ -324,3 +325,7 @@ $ npm test
|
|
|
324
325
|
[semantic-release-link]: https://github.com/semantic-release/semantic-release
|
|
325
326
|
|
|
326
327
|
[semantic-release-badge]: https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release
|
|
328
|
+
|
|
329
|
+
[socket-badge]: https://badge.socket.dev/npm/package/@form8ion/project/latest
|
|
330
|
+
|
|
331
|
+
[socket-link]: https://socket.dev/npm/package/@form8ion/project/overview/21.2.0
|
package/lib/index.js
CHANGED
|
@@ -272,28 +272,24 @@ async function scaffoldDependencyUpdater(plugins, options, {prompt}) {
|
|
|
272
272
|
|
|
273
273
|
const CI_PROVIDER_PROMPT_ID = 'CI_PROVIDER';
|
|
274
274
|
|
|
275
|
-
const {CI_PROVIDER
|
|
275
|
+
const {CI_PROVIDER} = questionNames.CI_PROVIDER;
|
|
276
276
|
|
|
277
|
-
function
|
|
278
|
-
|
|
277
|
+
async function chooseCiProvider(providers, {prompt}) {
|
|
278
|
+
const {[CI_PROVIDER]: provider} = await prompt({
|
|
279
279
|
id: CI_PROVIDER_PROMPT_ID,
|
|
280
280
|
questions: [{
|
|
281
|
-
name: CI_PROVIDER
|
|
281
|
+
name: CI_PROVIDER,
|
|
282
282
|
type: 'list',
|
|
283
283
|
message: 'Which CI service do you want use with this project?',
|
|
284
284
|
choices: [...Object.keys(providers), 'Other']
|
|
285
285
|
}]
|
|
286
286
|
});
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
const {CI_PROVIDER} = questionNames.CI_PROVIDER;
|
|
290
287
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
const {projectRoot} = options;
|
|
288
|
+
return provider;
|
|
289
|
+
}
|
|
295
290
|
|
|
296
|
-
|
|
291
|
+
async function filterToQualifiedPlugins(plugins, projectRoot) {
|
|
292
|
+
return Object.fromEntries(
|
|
297
293
|
(await Promise.all(
|
|
298
294
|
Object.entries(plugins).map(async ([name, plugin]) => [
|
|
299
295
|
name,
|
|
@@ -302,8 +298,14 @@ async function scaffoldCiProvider(plugins, options, {prompt}) {
|
|
|
302
298
|
])
|
|
303
299
|
)).filter(([, , qualified]) => qualified).map(([name, plugin]) => [name, plugin])
|
|
304
300
|
);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
async function scaffoldChoiceFromOptions(plugins, options, promptToChooseFromOptions, {prompt}) {
|
|
304
|
+
if (!Object.keys(plugins).length) return undefined;
|
|
305
305
|
|
|
306
|
-
const
|
|
306
|
+
const {projectRoot} = options;
|
|
307
|
+
const qualifiedPlugins = await filterToQualifiedPlugins(plugins, projectRoot);
|
|
308
|
+
const chosen = await promptToChooseFromOptions(qualifiedPlugins, {prompt});
|
|
307
309
|
const plugin = qualifiedPlugins[chosen];
|
|
308
310
|
|
|
309
311
|
if (plugin) return plugin.scaffold(options);
|
|
@@ -311,6 +313,10 @@ async function scaffoldCiProvider(plugins, options, {prompt}) {
|
|
|
311
313
|
return {};
|
|
312
314
|
}
|
|
313
315
|
|
|
316
|
+
async function scaffoldCiProvider(plugins, options, {prompt}) {
|
|
317
|
+
return scaffoldChoiceFromOptions(plugins, options, chooseCiProvider, {prompt});
|
|
318
|
+
}
|
|
319
|
+
|
|
314
320
|
const BASE_DETAILS_PROMPT_ID = 'BASE_DETAILS';
|
|
315
321
|
|
|
316
322
|
function promptForBaseDetails(projectRoot, {prompt}) {
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/prompts/question-names.js","../src/language/prompt.js","../src/language/scaffolder.js","../src/vcs/prompt.js","../src/vcs/git/remotes.js","../src/vcs/host/prompt.js","../src/vcs/host/scaffolder.js","../src/vcs/scaffolder.js","../src/license/scaffolder.js","../src/license/tester.js","../src/license/lifter.js","../src/dependency-updater/prompt.js","../src/dependency-updater/scaffolder.js","../src/ci-provider/prompt.js","../src/ci-provider/scaffolder.js","../src/prompts/questions.js","../src/language/schema.js","../src/vcs/host/schema.js","../src/dependency-updater/schema.js","../src/ci-provider/schema.js","../src/options-validator.js","../src/template-path.js","../src/editorconfig/scaffolder.js","../src/editorconfig/tester.js","../src/contributing/scaffolder.js","../src/lift.js","../src/scaffolder.js","../src/prompts/index.js"],"sourcesContent":["import {questionNames as coreQuestionNames} from '@form8ion/core';\n\nexport const questionNames = {\n BASE_DETAILS: coreQuestionNames,\n GIT_REPOSITORY: {\n GIT_REPO: 'gitRepo'\n },\n REPOSITORY_HOST: {\n REPO_HOST: 'repoHost',\n REPO_OWNER: 'repoOwner'\n },\n PROJECT_LANGUAGE: {\n PROJECT_LANGUAGE: 'projectLanguage'\n },\n DEPENDENCY_UPDATER: {\n DEPENDENCY_UPDATER: 'dependencyUpdater'\n },\n CI_PROVIDER: {\n CI_PROVIDER: 'ciProvider'\n }\n};\n","import {questionNames} from '../prompts/question-names.js';\n\nexport const PROJECT_LANGUAGE_PROMPT_ID = 'PROJECT_LANGUAGE';\n\nconst {PROJECT_LANGUAGE} = questionNames.PROJECT_LANGUAGE;\n\nexport default function promptForProjectLanguage(languages, {prompt}) {\n return prompt({\n id: PROJECT_LANGUAGE_PROMPT_ID,\n questions: [{\n name: PROJECT_LANGUAGE,\n type: 'list',\n message: 'What type of project is this?',\n choices: [...Object.keys(languages), 'Other']\n }]\n });\n}\n","import {questionNames} from '../prompts/question-names.js';\nimport promptForLanguageDetails from './prompt.js';\n\nconst {PROJECT_LANGUAGE} = questionNames.PROJECT_LANGUAGE;\n\nexport default async function scaffoldLanguage(languagePlugins, options, {prompt}) {\n const {[PROJECT_LANGUAGE]: chosenLanguage} = await promptForLanguageDetails(languagePlugins, {prompt});\n\n const plugin = languagePlugins[chosenLanguage];\n\n if (plugin) return plugin.scaffold(options);\n\n return undefined;\n}\n","import {questionNames} from '../prompts/question-names.js';\n\nexport const GIT_REPOSITORY_PROMPT_ID = 'GIT_REPOSITORY';\n\nconst {GIT_REPO} = questionNames.GIT_REPOSITORY;\n\nexport default async function promptForRepoCreation({prompt}) {\n const {[GIT_REPO]: gitRepoShouldBeCreated} = await prompt({\n id: GIT_REPOSITORY_PROMPT_ID,\n questions: [{\n name: GIT_REPO,\n type: 'confirm',\n default: true,\n message: 'Should a git repository be initialized?'\n }]\n });\n\n return gitRepoShouldBeCreated;\n}\n","import {simpleGit} from 'simple-git';\nimport parseGitUrl from 'git-url-parse';\n\nasync function getExistingRemotes(git) {\n try {\n return await git.listRemote();\n } catch (e) {\n if ('fatal: No remote configured to list refs from.\\n' === e.message) {\n return [];\n }\n\n throw e;\n }\n}\n\nexport async function determineExistingVcsDetails({projectRoot}) {\n const git = simpleGit({baseDir: projectRoot});\n const remoteOrigin = await git.remote(['get-url', 'origin']);\n const {owner, name, host} = parseGitUrl(remoteOrigin.trimEnd());\n\n return {vcs: {owner, name, host}};\n}\n\nexport async function defineRemoteOrigin(projectRoot, sshUrl, {logger}) {\n if (!sshUrl) {\n logger.warn('URL not available to configure remote `origin`');\n\n return {nextSteps: []};\n }\n\n const git = simpleGit({baseDir: projectRoot});\n const existingRemotes = await getExistingRemotes(git);\n\n if (existingRemotes.includes('origin')) {\n logger.warn('The `origin` remote is already defined for this repository');\n\n return {nextSteps: []};\n }\n\n // info('Setting the local `master` branch to track `origin/master`');\n //\n // await gitBranch.setUpstream(\n // await gitBranch.lookup(repository, 'master', gitBranch.BRANCH.LOCAL),\n // 'origin/master'\n // );\n\n await git.addRemote('origin', sshUrl);\n\n return {nextSteps: [{summary: 'Set local `master` branch to track upstream `origin/master`'}]};\n}\n","import {questionNames} from '../../prompts/question-names.js';\n\nexport const REPOSITORY_HOST_PROMPT_ID = 'REPOSITORY_HOST';\n\nconst {REPO_HOST} = questionNames.REPOSITORY_HOST;\n\nexport default async function promptForVcsHostChoice(hosts, {prompt}) {\n const answers = await prompt({\n id: REPOSITORY_HOST_PROMPT_ID,\n questions: [{\n name: REPO_HOST,\n type: 'list',\n message: 'Where will the repository be hosted?',\n choices: Object.keys(hosts)\n }]\n });\n const host = hosts[answers[REPO_HOST]];\n\n return {...answers, ...host};\n}\n","import {questionNames} from '../../prompts/question-names.js';\nimport promptForVcsHostDetails from './prompt.js';\n\nconst {REPO_HOST} = questionNames.REPOSITORY_HOST;\n\nexport default async function scaffoldVcsHost(hosts, options, {prompt}) {\n const {[REPO_HOST]: chosenHost} = await promptForVcsHostDetails(hosts, {prompt});\n\n const lowercasedHosts = Object.fromEntries(\n Object.entries(hosts).map(([name, details]) => [name.toLowerCase(), details])\n );\n const host = lowercasedHosts[chosenHost.toLowerCase()];\n\n if (host) return host.scaffold(options);\n\n return {vcs: {}};\n}\n","import {scaffold as scaffoldGit, test as alreadyVersionedByGit} from '@form8ion/git';\n\nimport repositoryShouldBeCreated from './prompt.js';\nimport {determineExistingVcsDetails, defineRemoteOrigin} from './git/index.js';\nimport {scaffold as scaffoldVcsHost} from './host/index.js';\n\nexport default async function scaffoldVcs(\n {projectRoot, projectName, vcsHosts, visibility, description},\n {prompt, logger}\n) {\n if (await repositoryShouldBeCreated({prompt})) {\n if (await alreadyVersionedByGit({projectRoot})) {\n logger.info('Git repository already exists');\n\n return determineExistingVcsDetails({projectRoot});\n }\n\n const [{vcs: {host, owner, name, sshUrl}}] = await Promise.all([\n scaffoldVcsHost(vcsHosts, {projectName, projectRoot, description, visibility}, {prompt}),\n scaffoldGit({projectRoot})\n ]);\n\n const remoteOriginResults = await defineRemoteOrigin(projectRoot, sshUrl, {logger});\n\n return {\n vcs: {host, owner, name},\n nextSteps: [{summary: 'Commit scaffolded files'}, ...remoteOriginResults.nextSteps]\n };\n }\n\n return {};\n}\n","import {promises as fs} from 'fs';\nimport wrap from 'word-wrap';\nimport mustache from 'mustache';\n// eslint-disable-next-line import/extensions\nimport spdxLicenseList from 'spdx-license-list/full.js';\n\nexport default async function scaffoldLicense({projectRoot, license, copyright}, {logger}) {\n if (license) {\n logger.info('Generating License');\n\n const licenseContent = spdxLicenseList[license].licenseText;\n\n await fs.writeFile(\n `${projectRoot}/LICENSE`,\n `${wrap(\n mustache.render(licenseContent, {year: copyright.year, 'copyright holders': copyright.holder}, {}, ['<', '>']),\n {width: 80, indent: ''}\n )}\\n`\n );\n }\n\n return {};\n}\n","import {fileExists} from '@form8ion/core';\n\nexport default function licenseDefined({projectRoot}) {\n return fileExists(`${projectRoot}/LICENSE`);\n}\n","function repositoryIsHostedOnGithub(vcs) {\n return vcs && 'github' === vcs.host;\n}\n\nexport default function liftLicense({vcs}) {\n return {\n ...repositoryIsHostedOnGithub(vcs) && {\n badges: {\n consumer: {\n license: {\n link: 'LICENSE',\n img: `https://img.shields.io/github/license/${vcs.owner}/${vcs.name}.svg?logo=opensourceinitiative`,\n text: 'license'\n }\n }\n }\n }\n };\n}\n","import {questionNames} from '../prompts/question-names.js';\n\nexport const DEPENDENCY_UPDATER_PROMPT_ID = 'DEPENDENCY_UPDATER';\n\nconst {DEPENDENCY_UPDATER} = questionNames.DEPENDENCY_UPDATER;\n\nexport async function promptForDependencyUpdaterChoice(updaters, {prompt}) {\n return prompt({\n id: DEPENDENCY_UPDATER_PROMPT_ID,\n questions: [{\n name: DEPENDENCY_UPDATER,\n type: 'list',\n message: 'Which dependency-update service do you want to manage this project?',\n choices: [...Object.keys(updaters), 'Other']\n }]\n });\n}\n","import {questionNames} from '../prompts/question-names.js';\nimport {promptForDependencyUpdaterChoice} from './prompt.js';\n\nconst {DEPENDENCY_UPDATER} = questionNames.DEPENDENCY_UPDATER;\n\nexport default async function scaffoldDependencyUpdater(plugins, options, {prompt}) {\n if (!Object.keys(plugins).length) return undefined;\n\n const plugin = plugins[\n (await promptForDependencyUpdaterChoice(plugins, {prompt}))[DEPENDENCY_UPDATER]\n ];\n\n if (plugin) return plugin.scaffold(options);\n\n return undefined;\n}\n","import {questionNames} from '../prompts/question-names.js';\n\nexport const CI_PROVIDER_PROMPT_ID = 'CI_PROVIDER';\n\nconst {CI_PROVIDER} = questionNames.CI_PROVIDER;\n\nexport default function promptForCiProvider(providers, {prompt}) {\n return prompt({\n id: CI_PROVIDER_PROMPT_ID,\n questions: [{\n name: CI_PROVIDER,\n type: 'list',\n message: 'Which CI service do you want use with this project?',\n choices: [...Object.keys(providers), 'Other']\n }]\n });\n}\n","import {questionNames} from '../prompts/question-names.js';\nimport promptForCiProvider from './prompt.js';\n\nconst {CI_PROVIDER} = questionNames.CI_PROVIDER;\n\nexport default async function scaffoldCiProvider(plugins, options, {prompt}) {\n if (!Object.keys(plugins).length) return undefined;\n\n const {projectRoot} = options;\n\n const qualifiedPlugins = Object.fromEntries(\n (await Promise.all(\n Object.entries(plugins).map(async ([name, plugin]) => [\n name,\n plugin,\n plugin.qualify ? await plugin.qualify({projectRoot}) : true\n ])\n )).filter(([, , qualified]) => qualified).map(([name, plugin]) => [name, plugin])\n );\n\n const chosen = (await promptForCiProvider(qualifiedPlugins, {prompt}))[CI_PROVIDER];\n const plugin = qualifiedPlugins[chosen];\n\n if (plugin) return plugin.scaffold(options);\n\n return {};\n}\n","import {questionsForBaseDetails} from '@form8ion/core';\n\nexport const BASE_DETAILS_PROMPT_ID = 'BASE_DETAILS';\n\nexport function promptForBaseDetails(projectRoot, {prompt}) {\n return prompt({\n id: BASE_DETAILS_PROMPT_ID,\n questions: questionsForBaseDetails(projectRoot)\n });\n}\n","import joi from 'joi';\nimport {optionsSchemas} from '@form8ion/core';\n\nexport default joi.object().pattern(/^/, optionsSchemas.form8ionPlugin).default({});\n","import joi from 'joi';\nimport {optionsSchemas} from '@form8ion/core';\n\nexport default joi.object().pattern(/^/, optionsSchemas.form8ionPlugin);\n","import joi from 'joi';\nimport {optionsSchemas} from '@form8ion/core';\n\nexport default joi.object().pattern(joi.string(), optionsSchemas.form8ionPlugin).default({});\n","import joi from 'joi';\nimport {optionsSchemas} from '@form8ion/core';\n\nexport default joi.object().pattern(joi.string(), optionsSchemas.form8ionPlugin).default({});\n","import {validateOptions} from '@form8ion/core';\nimport joi from 'joi';\n\nimport languagePluginsSchema from './language/schema.js';\nimport vcsHostPluginsSchema from './vcs/host/schema.js';\nimport dependencyUpdaterPluginsSchema from './dependency-updater/schema.js';\nimport ciProviderPluginsSchema from './ci-provider/schema.js';\n\nexport function validate(options) {\n return validateOptions(joi.object({\n plugins: joi.object({\n dependencyUpdaters: dependencyUpdaterPluginsSchema,\n languages: languagePluginsSchema,\n vcsHosts: vcsHostPluginsSchema,\n ciProviders: ciProviderPluginsSchema\n })\n }), options) || {};\n}\n","import {resolve} from 'path';\nimport filedirname from 'filedirname';\n\nexport default function determinePathToTemplate(fileName) {\n const [, __dirname] = filedirname();\n\n return resolve(__dirname, '..', 'templates', fileName);\n}\n","import {promises as fs} from 'node:fs';\n\nimport determinePathToTemplateFile from '../template-path.js';\n\nexport default function scaffoldEditorConfig({projectRoot}) {\n return fs.copyFile(determinePathToTemplateFile('editorconfig.ini'), `${projectRoot}/.editorconfig`);\n}\n","import {fileExists} from '@form8ion/core';\n\nexport default function editorconfigInUse({projectRoot}) {\n return fileExists(`${projectRoot}/.editorconfig`);\n}\n","export default function scaffoldContribution({visibility}) {\n if (['OSS', 'ISS'].includes(visibility)) {\n return {\n badges: {\n contribution: {\n PRs: {\n text: 'PRs Welcome',\n link: 'https://makeapullrequest.com',\n img: 'https://img.shields.io/badge/PRs-welcome-brightgreen.svg'\n }\n }\n }\n };\n }\n\n return {};\n}\n","import {applyEnhancers} from '@form8ion/core';\nimport {lift as liftReadme} from '@form8ion/readme';\nimport * as gitPlugin from '@form8ion/git';\nimport * as misePlugin from '@form8ion/mise';\n\nimport {scaffold as scaffoldEditorconfig, test as editorconfigInUse} from './editorconfig/index.js';\nimport * as licensePlugin from './license/index.js';\n\nexport default async function lift({projectRoot, results, enhancers, vcs}, dependencies) {\n if (!await editorconfigInUse({projectRoot})) {\n await scaffoldEditorconfig({projectRoot});\n }\n\n const enhancerResults = await applyEnhancers({\n results,\n enhancers: {...enhancers, gitPlugin, licensePlugin, misePlugin},\n options: {projectRoot, vcs},\n dependencies\n });\n\n await liftReadme({projectRoot, results: enhancerResults}, dependencies);\n\n return enhancerResults;\n}\n","import deepmerge from 'deepmerge';\nimport {execa} from 'execa';\nimport {questionNames as coreQuestionNames} from '@form8ion/core';\nimport {scaffold as scaffoldReadme} from '@form8ion/readme';\n\nimport {scaffold as scaffoldLanguage} from './language/index.js';\nimport {scaffold as scaffoldVcs} from './vcs/index.js';\nimport {scaffold as scaffoldLicense} from './license/index.js';\nimport scaffoldDependencyUpdater from './dependency-updater/scaffolder.js';\nimport {scaffold as scaffoldCiProvider} from './ci-provider/index.js';\nimport {promptForBaseDetails} from './prompts/questions.js';\nimport {validate} from './options-validator.js';\nimport {scaffold as scaffoldEditorConfig} from './editorconfig/index.js';\nimport {scaffold as scaffoldContributing} from './contributing/index.js';\nimport lift from './lift.js';\n\nexport async function scaffold(options, dependencies) {\n const projectRoot = process.cwd();\n const {plugins: {dependencyUpdaters, ciProviders, languages, vcsHosts = {}}} = validate(options);\n const {prompt, logger} = dependencies;\n\n const {\n [coreQuestionNames.PROJECT_NAME]: projectName,\n [coreQuestionNames.LICENSE]: chosenLicense,\n [coreQuestionNames.VISIBILITY]: visibility,\n [coreQuestionNames.DESCRIPTION]: description,\n [coreQuestionNames.COPYRIGHT_YEAR]: copyrightYear,\n [coreQuestionNames.COPYRIGHT_HOLDER]: copyHolder\n } = await promptForBaseDetails(projectRoot, {prompt});\n const copyright = {year: copyrightYear, holder: copyHolder};\n\n const [vcsResults, contributing, license] = await Promise.all([\n scaffoldVcs({projectRoot, projectName, vcsHosts, visibility, description}, {prompt, logger}),\n scaffoldContributing({visibility}),\n scaffoldLicense({projectRoot, license: chosenLicense, copyright}, {logger}),\n scaffoldReadme({projectName, projectRoot, description}, {logger}),\n scaffoldEditorConfig({projectRoot})\n ]);\n\n const [dependencyUpdaterResults] = vcsResults.vcs\n ? await Promise.all([\n scaffoldDependencyUpdater(dependencyUpdaters, {projectRoot}, {prompt}),\n scaffoldCiProvider(ciProviders, {projectRoot}, {prompt})\n ])\n : [];\n\n const language = await scaffoldLanguage(\n languages,\n {projectRoot, projectName, vcs: vcsResults.vcs, visibility, license: chosenLicense || 'UNLICENSED', description},\n {prompt}\n );\n\n const mergedResults = deepmerge.all([\n license,\n language,\n dependencyUpdaterResults,\n contributing,\n vcsResults\n ].filter(Boolean));\n\n await lift({\n projectRoot,\n vcs: vcsResults.vcs,\n results: mergedResults,\n enhancers: {...dependencyUpdaters, ...languages, ...vcsHosts}\n }, dependencies);\n\n if (language && language.verificationCommand) {\n logger.info('Verifying the generated project');\n\n const subprocess = execa(language.verificationCommand, {shell: true});\n subprocess.stdout.pipe(process.stdout);\n await subprocess;\n }\n\n return mergedResults;\n}\n","import {BASE_DETAILS_PROMPT_ID} from './questions.js';\nimport {GIT_REPOSITORY_PROMPT_ID} from '../vcs/prompt.js';\nimport {PROJECT_LANGUAGE_PROMPT_ID} from '../language/prompt.js';\nimport {REPOSITORY_HOST_PROMPT_ID} from '../vcs/host/prompt.js';\nimport {DEPENDENCY_UPDATER_PROMPT_ID} from '../dependency-updater/prompt.js';\nimport {CI_PROVIDER_PROMPT_ID} from '../ci-provider/prompt.js';\nimport {questionNames} from './question-names.js';\n\nexport const ids = {\n BASE_DETAILS: BASE_DETAILS_PROMPT_ID,\n GIT_REPOSITORY: GIT_REPOSITORY_PROMPT_ID,\n REPOSITORY_HOST: REPOSITORY_HOST_PROMPT_ID,\n PROJECT_LANGUAGE: PROJECT_LANGUAGE_PROMPT_ID,\n DEPENDENCY_UPDATER: DEPENDENCY_UPDATER_PROMPT_ID,\n CI_PROVIDER: CI_PROVIDER_PROMPT_ID\n};\n\nexport {questionNames};\n\nexport const constants = {ids, questionNames};\n"],"names":["coreQuestionNames","PROJECT_LANGUAGE","promptForLanguageDetails","REPO_HOST","promptForVcsHostDetails","repositoryShouldBeCreated","alreadyVersionedByGit","scaffoldGit","fs","DEPENDENCY_UPDATER","CI_PROVIDER","determinePathToTemplateFile","scaffoldEditorconfig","liftReadme","scaffoldContributing","scaffoldReadme"],"mappings":";;;;;;;;;;;;;;;;;;AAEO,MAAM,aAAa,GAAG;AAC7B,EAAE,YAAY,EAAEA,eAAiB;AACjC,EAAE,cAAc,EAAE;AAClB,IAAI,QAAQ,EAAE;AACd,GAAG;AACH,EAAE,eAAe,EAAE;AACnB,IAAI,SAAS,EAAE,UAAU;AACzB,IAAI,UAAU,EAAE;AAChB,GAAG;AACH,EAAE,gBAAgB,EAAE;AACpB,IAAI,gBAAgB,EAAE;AACtB,GAAG;AACH,EAAE,kBAAkB,EAAE;AACtB,IAAI,kBAAkB,EAAE;AACxB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,WAAW,EAAE;AACjB;AACA,CAAC;;AClBM,MAAM,0BAA0B,GAAG,kBAAkB;;AAE5D,MAAM,mBAACC,kBAAgB,CAAC,GAAG,aAAa,CAAC,gBAAgB;;AAE1C,SAAS,wBAAwB,CAAC,SAAS,EAAE,CAAC,MAAM,CAAC,EAAE;AACtE,EAAE,OAAO,MAAM,CAAC;AAChB,IAAI,EAAE,EAAE,0BAA0B;AAClC,IAAI,SAAS,EAAE,CAAC;AAChB,MAAM,IAAI,EAAEA,kBAAgB;AAC5B,MAAM,IAA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,QAAQ,CAAC,mBAAmB,EAAE;AAChD,IAAI,MAAM,CAAC,IAAI,CAAC,iCAAiC,CAAC;;AAElD,IAAI,MAAM,UAAU,GAAG,KAAK,CAAC,QAAQ,CAAC,mBAAmB,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AACzE,IAAI,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;AAC1C,IAAI,MAAM,UAAU;AACpB,EAAE;;AAEF,EAAE,OAAO,aAAa;AACtB;;ACpEO,MAAM,GAAG,GAAG;AACnB,EAAE,YAAY,EAAE,sBAAsB;AACtC,EAAE,cAAc,EAAE,wBAAwB;AAC1C,EAAE,eAAe,EAAE,yBAAyB;AAC5C,EAAE,gBAAgB,EAAE,0BAA0B;AAC9C,EAAE,kBAAkB,EAAE,4BAA4B;AAClD,EAAE,WAAW,EAAE;AACf,CAAC;;AAIW,MAAC,SAAS,GAAG,CAAC,GAAG,EAAE,aAAa;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/prompts/question-names.js","../src/language/prompt.js","../src/language/scaffolder.js","../src/vcs/prompt.js","../src/vcs/git/remotes.js","../src/vcs/host/prompt.js","../src/vcs/host/scaffolder.js","../src/vcs/scaffolder.js","../src/license/scaffolder.js","../src/license/tester.js","../src/license/lifter.js","../src/dependency-updater/prompt.js","../src/dependency-updater/scaffolder.js","../src/ci-provider/prompt.js","../src/ci-provider/scaffolder.js","../src/prompts/questions.js","../src/language/schema.js","../src/vcs/host/schema.js","../src/dependency-updater/schema.js","../src/ci-provider/schema.js","../src/options-validator.js","../src/template-path.js","../src/editorconfig/scaffolder.js","../src/editorconfig/tester.js","../src/contributing/scaffolder.js","../src/lift.js","../src/scaffolder.js","../src/prompts/index.js"],"sourcesContent":["import {questionNames as coreQuestionNames} from '@form8ion/core';\n\nexport const questionNames = {\n BASE_DETAILS: coreQuestionNames,\n GIT_REPOSITORY: {\n GIT_REPO: 'gitRepo'\n },\n REPOSITORY_HOST: {\n REPO_HOST: 'repoHost',\n REPO_OWNER: 'repoOwner'\n },\n PROJECT_LANGUAGE: {\n PROJECT_LANGUAGE: 'projectLanguage'\n },\n DEPENDENCY_UPDATER: {\n DEPENDENCY_UPDATER: 'dependencyUpdater'\n },\n CI_PROVIDER: {\n CI_PROVIDER: 'ciProvider'\n }\n};\n","import {questionNames} from '../prompts/question-names.js';\n\nexport const PROJECT_LANGUAGE_PROMPT_ID = 'PROJECT_LANGUAGE';\n\nconst {PROJECT_LANGUAGE} = questionNames.PROJECT_LANGUAGE;\n\nexport default function promptForProjectLanguage(languages, {prompt}) {\n return prompt({\n id: PROJECT_LANGUAGE_PROMPT_ID,\n questions: [{\n name: PROJECT_LANGUAGE,\n type: 'list',\n message: 'What type of project is this?',\n choices: [...Object.keys(languages), 'Other']\n }]\n });\n}\n","import {questionNames} from '../prompts/question-names.js';\nimport promptForLanguageDetails from './prompt.js';\n\nconst {PROJECT_LANGUAGE} = questionNames.PROJECT_LANGUAGE;\n\nexport default async function scaffoldLanguage(languagePlugins, options, {prompt}) {\n const {[PROJECT_LANGUAGE]: chosenLanguage} = await promptForLanguageDetails(languagePlugins, {prompt});\n\n const plugin = languagePlugins[chosenLanguage];\n\n if (plugin) return plugin.scaffold(options);\n\n return undefined;\n}\n","import {questionNames} from '../prompts/question-names.js';\n\nexport const GIT_REPOSITORY_PROMPT_ID = 'GIT_REPOSITORY';\n\nconst {GIT_REPO} = questionNames.GIT_REPOSITORY;\n\nexport default async function promptForRepoCreation({prompt}) {\n const {[GIT_REPO]: gitRepoShouldBeCreated} = await prompt({\n id: GIT_REPOSITORY_PROMPT_ID,\n questions: [{\n name: GIT_REPO,\n type: 'confirm',\n default: true,\n message: 'Should a git repository be initialized?'\n }]\n });\n\n return gitRepoShouldBeCreated;\n}\n","import {simpleGit} from 'simple-git';\nimport parseGitUrl from 'git-url-parse';\n\nasync function getExistingRemotes(git) {\n try {\n return await git.listRemote();\n } catch (e) {\n if ('fatal: No remote configured to list refs from.\\n' === e.message) {\n return [];\n }\n\n throw e;\n }\n}\n\nexport async function determineExistingVcsDetails({projectRoot}) {\n const git = simpleGit({baseDir: projectRoot});\n const remoteOrigin = await git.remote(['get-url', 'origin']);\n const {owner, name, host} = parseGitUrl(remoteOrigin.trimEnd());\n\n return {vcs: {owner, name, host}};\n}\n\nexport async function defineRemoteOrigin(projectRoot, sshUrl, {logger}) {\n if (!sshUrl) {\n logger.warn('URL not available to configure remote `origin`');\n\n return {nextSteps: []};\n }\n\n const git = simpleGit({baseDir: projectRoot});\n const existingRemotes = await getExistingRemotes(git);\n\n if (existingRemotes.includes('origin')) {\n logger.warn('The `origin` remote is already defined for this repository');\n\n return {nextSteps: []};\n }\n\n // info('Setting the local `master` branch to track `origin/master`');\n //\n // await gitBranch.setUpstream(\n // await gitBranch.lookup(repository, 'master', gitBranch.BRANCH.LOCAL),\n // 'origin/master'\n // );\n\n await git.addRemote('origin', sshUrl);\n\n return {nextSteps: [{summary: 'Set local `master` branch to track upstream `origin/master`'}]};\n}\n","import {questionNames} from '../../prompts/question-names.js';\n\nexport const REPOSITORY_HOST_PROMPT_ID = 'REPOSITORY_HOST';\n\nconst {REPO_HOST} = questionNames.REPOSITORY_HOST;\n\nexport default async function promptForVcsHostChoice(hosts, {prompt}) {\n const answers = await prompt({\n id: REPOSITORY_HOST_PROMPT_ID,\n questions: [{\n name: REPO_HOST,\n type: 'list',\n message: 'Where will the repository be hosted?',\n choices: Object.keys(hosts)\n }]\n });\n const host = hosts[answers[REPO_HOST]];\n\n return {...answers, ...host};\n}\n","import {questionNames} from '../../prompts/question-names.js';\nimport promptForVcsHostDetails from './prompt.js';\n\nconst {REPO_HOST} = questionNames.REPOSITORY_HOST;\n\nexport default async function scaffoldVcsHost(hosts, options, {prompt}) {\n const {[REPO_HOST]: chosenHost} = await promptForVcsHostDetails(hosts, {prompt});\n\n const lowercasedHosts = Object.fromEntries(\n Object.entries(hosts).map(([name, details]) => [name.toLowerCase(), details])\n );\n const host = lowercasedHosts[chosenHost.toLowerCase()];\n\n if (host) return host.scaffold(options);\n\n return {vcs: {}};\n}\n","import {scaffold as scaffoldGit, test as alreadyVersionedByGit} from '@form8ion/git';\n\nimport repositoryShouldBeCreated from './prompt.js';\nimport {determineExistingVcsDetails, defineRemoteOrigin} from './git/index.js';\nimport {scaffold as scaffoldVcsHost} from './host/index.js';\n\nexport default async function scaffoldVcs(\n {projectRoot, projectName, vcsHosts, visibility, description},\n {prompt, logger}\n) {\n if (await repositoryShouldBeCreated({prompt})) {\n if (await alreadyVersionedByGit({projectRoot})) {\n logger.info('Git repository already exists');\n\n return determineExistingVcsDetails({projectRoot});\n }\n\n const [{vcs: {host, owner, name, sshUrl}}] = await Promise.all([\n scaffoldVcsHost(vcsHosts, {projectName, projectRoot, description, visibility}, {prompt}),\n scaffoldGit({projectRoot})\n ]);\n\n const remoteOriginResults = await defineRemoteOrigin(projectRoot, sshUrl, {logger});\n\n return {\n vcs: {host, owner, name},\n nextSteps: [{summary: 'Commit scaffolded files'}, ...remoteOriginResults.nextSteps]\n };\n }\n\n return {};\n}\n","import {promises as fs} from 'fs';\nimport wrap from 'word-wrap';\nimport mustache from 'mustache';\n// eslint-disable-next-line import/extensions\nimport spdxLicenseList from 'spdx-license-list/full.js';\n\nexport default async function scaffoldLicense({projectRoot, license, copyright}, {logger}) {\n if (license) {\n logger.info('Generating License');\n\n const licenseContent = spdxLicenseList[license].licenseText;\n\n await fs.writeFile(\n `${projectRoot}/LICENSE`,\n `${wrap(\n mustache.render(licenseContent, {year: copyright.year, 'copyright holders': copyright.holder}, {}, ['<', '>']),\n {width: 80, indent: ''}\n )}\\n`\n );\n }\n\n return {};\n}\n","import {fileExists} from '@form8ion/core';\n\nexport default function licenseDefined({projectRoot}) {\n return fileExists(`${projectRoot}/LICENSE`);\n}\n","function repositoryIsHostedOnGithub(vcs) {\n return vcs && 'github' === vcs.host;\n}\n\nexport default function liftLicense({vcs}) {\n return {\n ...repositoryIsHostedOnGithub(vcs) && {\n badges: {\n consumer: {\n license: {\n link: 'LICENSE',\n img: `https://img.shields.io/github/license/${vcs.owner}/${vcs.name}.svg?logo=opensourceinitiative`,\n text: 'license'\n }\n }\n }\n }\n };\n}\n","import {questionNames} from '../prompts/question-names.js';\n\nexport const DEPENDENCY_UPDATER_PROMPT_ID = 'DEPENDENCY_UPDATER';\n\nconst {DEPENDENCY_UPDATER} = questionNames.DEPENDENCY_UPDATER;\n\nexport async function promptForDependencyUpdaterChoice(updaters, {prompt}) {\n return prompt({\n id: DEPENDENCY_UPDATER_PROMPT_ID,\n questions: [{\n name: DEPENDENCY_UPDATER,\n type: 'list',\n message: 'Which dependency-update service do you want to manage this project?',\n choices: [...Object.keys(updaters), 'Other']\n }]\n });\n}\n","import {questionNames} from '../prompts/question-names.js';\nimport {promptForDependencyUpdaterChoice} from './prompt.js';\n\nconst {DEPENDENCY_UPDATER} = questionNames.DEPENDENCY_UPDATER;\n\nexport default async function scaffoldDependencyUpdater(plugins, options, {prompt}) {\n if (!Object.keys(plugins).length) return undefined;\n\n const plugin = plugins[\n (await promptForDependencyUpdaterChoice(plugins, {prompt}))[DEPENDENCY_UPDATER]\n ];\n\n if (plugin) return plugin.scaffold(options);\n\n return undefined;\n}\n","import {questionNames} from '../prompts/question-names.js';\n\nexport const CI_PROVIDER_PROMPT_ID = 'CI_PROVIDER';\n\nconst {CI_PROVIDER} = questionNames.CI_PROVIDER;\n\nexport default async function chooseCiProvider(providers, {prompt}) {\n const {[CI_PROVIDER]: provider} = await prompt({\n id: CI_PROVIDER_PROMPT_ID,\n questions: [{\n name: CI_PROVIDER,\n type: 'list',\n message: 'Which CI service do you want use with this project?',\n choices: [...Object.keys(providers), 'Other']\n }]\n });\n\n return provider;\n}\n","import chooseCiProvider from './prompt.js';\n\nasync function filterToQualifiedPlugins(plugins, projectRoot) {\n return Object.fromEntries(\n (await Promise.all(\n Object.entries(plugins).map(async ([name, plugin]) => [\n name,\n plugin,\n plugin.qualify ? await plugin.qualify({projectRoot}) : true\n ])\n )).filter(([, , qualified]) => qualified).map(([name, plugin]) => [name, plugin])\n );\n}\n\nasync function scaffoldChoiceFromOptions(plugins, options, promptToChooseFromOptions, {prompt}) {\n if (!Object.keys(plugins).length) return undefined;\n\n const {projectRoot} = options;\n const qualifiedPlugins = await filterToQualifiedPlugins(plugins, projectRoot);\n const chosen = await promptToChooseFromOptions(qualifiedPlugins, {prompt});\n const plugin = qualifiedPlugins[chosen];\n\n if (plugin) return plugin.scaffold(options);\n\n return {};\n}\n\nexport default async function scaffoldCiProvider(plugins, options, {prompt}) {\n return scaffoldChoiceFromOptions(plugins, options, chooseCiProvider, {prompt});\n}\n","import {questionsForBaseDetails} from '@form8ion/core';\n\nexport const BASE_DETAILS_PROMPT_ID = 'BASE_DETAILS';\n\nexport function promptForBaseDetails(projectRoot, {prompt}) {\n return prompt({\n id: BASE_DETAILS_PROMPT_ID,\n questions: questionsForBaseDetails(projectRoot)\n });\n}\n","import joi from 'joi';\nimport {optionsSchemas} from '@form8ion/core';\n\nexport default joi.object().pattern(/^/, optionsSchemas.form8ionPlugin).default({});\n","import joi from 'joi';\nimport {optionsSchemas} from '@form8ion/core';\n\nexport default joi.object().pattern(/^/, optionsSchemas.form8ionPlugin);\n","import joi from 'joi';\nimport {optionsSchemas} from '@form8ion/core';\n\nexport default joi.object().pattern(joi.string(), optionsSchemas.form8ionPlugin).default({});\n","import joi from 'joi';\nimport {optionsSchemas} from '@form8ion/core';\n\nexport default joi.object().pattern(joi.string(), optionsSchemas.form8ionPlugin).default({});\n","import {validateOptions} from '@form8ion/core';\nimport joi from 'joi';\n\nimport languagePluginsSchema from './language/schema.js';\nimport vcsHostPluginsSchema from './vcs/host/schema.js';\nimport dependencyUpdaterPluginsSchema from './dependency-updater/schema.js';\nimport ciProviderPluginsSchema from './ci-provider/schema.js';\n\nexport function validate(options) {\n return validateOptions(joi.object({\n plugins: joi.object({\n dependencyUpdaters: dependencyUpdaterPluginsSchema,\n languages: languagePluginsSchema,\n vcsHosts: vcsHostPluginsSchema,\n ciProviders: ciProviderPluginsSchema\n })\n }), options) || {};\n}\n","import {resolve} from 'path';\nimport filedirname from 'filedirname';\n\nexport default function determinePathToTemplate(fileName) {\n const [, __dirname] = filedirname();\n\n return resolve(__dirname, '..', 'templates', fileName);\n}\n","import {promises as fs} from 'node:fs';\n\nimport determinePathToTemplateFile from '../template-path.js';\n\nexport default function scaffoldEditorConfig({projectRoot}) {\n return fs.copyFile(determinePathToTemplateFile('editorconfig.ini'), `${projectRoot}/.editorconfig`);\n}\n","import {fileExists} from '@form8ion/core';\n\nexport default function editorconfigInUse({projectRoot}) {\n return fileExists(`${projectRoot}/.editorconfig`);\n}\n","export default function scaffoldContribution({visibility}) {\n if (['OSS', 'ISS'].includes(visibility)) {\n return {\n badges: {\n contribution: {\n PRs: {\n text: 'PRs Welcome',\n link: 'https://makeapullrequest.com',\n img: 'https://img.shields.io/badge/PRs-welcome-brightgreen.svg'\n }\n }\n }\n };\n }\n\n return {};\n}\n","import {applyEnhancers} from '@form8ion/core';\nimport {lift as liftReadme} from '@form8ion/readme';\nimport * as gitPlugin from '@form8ion/git';\nimport * as misePlugin from '@form8ion/mise';\n\nimport {scaffold as scaffoldEditorconfig, test as editorconfigInUse} from './editorconfig/index.js';\nimport * as licensePlugin from './license/index.js';\n\nexport default async function lift({projectRoot, results, enhancers, vcs}, dependencies) {\n if (!await editorconfigInUse({projectRoot})) {\n await scaffoldEditorconfig({projectRoot});\n }\n\n const enhancerResults = await applyEnhancers({\n results,\n enhancers: {...enhancers, gitPlugin, licensePlugin, misePlugin},\n options: {projectRoot, vcs},\n dependencies\n });\n\n await liftReadme({projectRoot, results: enhancerResults}, dependencies);\n\n return enhancerResults;\n}\n","import deepmerge from 'deepmerge';\nimport {execa} from 'execa';\nimport {questionNames as coreQuestionNames} from '@form8ion/core';\nimport {scaffold as scaffoldReadme} from '@form8ion/readme';\n\nimport {scaffold as scaffoldLanguage} from './language/index.js';\nimport {scaffold as scaffoldVcs} from './vcs/index.js';\nimport {scaffold as scaffoldLicense} from './license/index.js';\nimport scaffoldDependencyUpdater from './dependency-updater/scaffolder.js';\nimport {scaffold as scaffoldCiProvider} from './ci-provider/index.js';\nimport {promptForBaseDetails} from './prompts/questions.js';\nimport {validate} from './options-validator.js';\nimport {scaffold as scaffoldEditorConfig} from './editorconfig/index.js';\nimport {scaffold as scaffoldContributing} from './contributing/index.js';\nimport lift from './lift.js';\n\nexport async function scaffold(options, dependencies) {\n const projectRoot = process.cwd();\n const {plugins: {dependencyUpdaters, ciProviders, languages, vcsHosts = {}}} = validate(options);\n const {prompt, logger} = dependencies;\n\n const {\n [coreQuestionNames.PROJECT_NAME]: projectName,\n [coreQuestionNames.LICENSE]: chosenLicense,\n [coreQuestionNames.VISIBILITY]: visibility,\n [coreQuestionNames.DESCRIPTION]: description,\n [coreQuestionNames.COPYRIGHT_YEAR]: copyrightYear,\n [coreQuestionNames.COPYRIGHT_HOLDER]: copyHolder\n } = await promptForBaseDetails(projectRoot, {prompt});\n const copyright = {year: copyrightYear, holder: copyHolder};\n\n const [vcsResults, contributing, license] = await Promise.all([\n scaffoldVcs({projectRoot, projectName, vcsHosts, visibility, description}, {prompt, logger}),\n scaffoldContributing({visibility}),\n scaffoldLicense({projectRoot, license: chosenLicense, copyright}, {logger}),\n scaffoldReadme({projectName, projectRoot, description}, {logger}),\n scaffoldEditorConfig({projectRoot})\n ]);\n\n const [dependencyUpdaterResults] = vcsResults.vcs\n ? await Promise.all([\n scaffoldDependencyUpdater(dependencyUpdaters, {projectRoot}, {prompt}),\n scaffoldCiProvider(ciProviders, {projectRoot}, {prompt})\n ])\n : [];\n\n const language = await scaffoldLanguage(\n languages,\n {projectRoot, projectName, vcs: vcsResults.vcs, visibility, license: chosenLicense || 'UNLICENSED', description},\n {prompt}\n );\n\n const mergedResults = deepmerge.all([\n license,\n language,\n dependencyUpdaterResults,\n contributing,\n vcsResults\n ].filter(Boolean));\n\n await lift({\n projectRoot,\n vcs: vcsResults.vcs,\n results: mergedResults,\n enhancers: {...dependencyUpdaters, ...languages, ...vcsHosts}\n }, dependencies);\n\n if (language && language.verificationCommand) {\n logger.info('Verifying the generated project');\n\n const subprocess = execa(language.verificationCommand, {shell: true});\n subprocess.stdout.pipe(process.stdout);\n await subprocess;\n }\n\n return mergedResults;\n}\n","import {BASE_DETAILS_PROMPT_ID} from './questions.js';\nimport {GIT_REPOSITORY_PROMPT_ID} from '../vcs/prompt.js';\nimport {PROJECT_LANGUAGE_PROMPT_ID} from '../language/prompt.js';\nimport {REPOSITORY_HOST_PROMPT_ID} from '../vcs/host/prompt.js';\nimport {DEPENDENCY_UPDATER_PROMPT_ID} from '../dependency-updater/prompt.js';\nimport {CI_PROVIDER_PROMPT_ID} from '../ci-provider/prompt.js';\nimport {questionNames} from './question-names.js';\n\nexport const ids = {\n BASE_DETAILS: BASE_DETAILS_PROMPT_ID,\n GIT_REPOSITORY: GIT_REPOSITORY_PROMPT_ID,\n REPOSITORY_HOST: REPOSITORY_HOST_PROMPT_ID,\n PROJECT_LANGUAGE: PROJECT_LANGUAGE_PROMPT_ID,\n DEPENDENCY_UPDATER: DEPENDENCY_UPDATER_PROMPT_ID,\n CI_PROVIDER: CI_PROVIDER_PROMPT_ID\n};\n\nexport {questionNames};\n\nexport const constants = {ids, questionNames};\n"],"names":["coreQuestionNames","PROJECT_LANGUAGE","promptForLanguageDetails","REPO_HOST","promptForVcsHostDetails","repositoryShouldBeCreated","alreadyVersionedByGit","scaffoldGit","fs","DEPENDENCY_UPDATER","determinePathToTemplateFile","scaffoldEditorconfig","liftReadme","scaffoldContributing","scaffoldReadme"],"mappings":";;;;;;;;;;;;;;;;;;AAEO,MAAM,aAAa,GAAG;AAC7B,EAAE,YAAY,EAAEA,eAAiB;AACjC,EAAE,cAAc,EAAE;AAClB,IAAI,QAAQ,EAAE;AACd,GAAG;AACH,EAAE,eAAe,EAAE;AACnB,IAAI,SAAS,EAAE,UAAU;AACzB,IAAI,UAAU,EAAE;AAChB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AC1C,EAAE,eAAe,EAAE,yBAAyB;AAC5C,EAAE,gBAAgB,EAAE,0BAA0B;AAC9C,EAAE,kBAAkB,EAAE,4BAA4B;AAClD,EAAE,WAAW,EAAE;AACf,CAAC;;AAIW,MAAC,SAAS,GAAG,CAAC,GAAG,EAAE,aAAa;;;;"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@form8ion/project",
|
|
3
3
|
"description": "opinionated scaffolder for new projects",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "22.0.0-beta.
|
|
5
|
+
"version": "22.0.0-beta.23",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": "^22.22.2 || >=24.15"
|
|
@@ -75,12 +75,11 @@
|
|
|
75
75
|
"mustache": "4.2.0",
|
|
76
76
|
"simple-git": "^3.16.0",
|
|
77
77
|
"spdx-license-list": "6.11.0",
|
|
78
|
-
"word-wrap": "^1.2.3"
|
|
79
|
-
"write-yaml": "1.0.0"
|
|
78
|
+
"word-wrap": "^1.2.3"
|
|
80
79
|
},
|
|
81
80
|
"devDependencies": {
|
|
82
81
|
"@cucumber/cucumber": "13.0.0",
|
|
83
|
-
"@form8ion/commitlint-config": "2.0.
|
|
82
|
+
"@form8ion/commitlint-config": "2.0.17",
|
|
84
83
|
"@form8ion/eslint-config": "7.1.0-beta.1",
|
|
85
84
|
"@form8ion/eslint-config-cucumber": "1.4.1",
|
|
86
85
|
"@form8ion/eslint-config-vitest": "1.1.0",
|
|
@@ -95,7 +94,7 @@
|
|
|
95
94
|
"gherkin-lint": "4.2.4",
|
|
96
95
|
"husky": "9.1.7",
|
|
97
96
|
"lockfile-lint": "5.0.0",
|
|
98
|
-
"ls-engines": "0.10.
|
|
97
|
+
"ls-engines": "0.10.1",
|
|
99
98
|
"mdast-util-from-markdown": "2.0.3",
|
|
100
99
|
"mdast-util-heading-range": "4.0.0",
|
|
101
100
|
"mdast-zone": "6.1.0",
|
|
@@ -106,7 +105,7 @@
|
|
|
106
105
|
"remark-toc": "9.0.0",
|
|
107
106
|
"remark-usage": "11.0.1",
|
|
108
107
|
"rimraf": "6.1.3",
|
|
109
|
-
"rollup": "4.62.
|
|
108
|
+
"rollup": "4.62.2",
|
|
110
109
|
"rollup-plugin-auto-external": "2.0.0",
|
|
111
110
|
"sinon": "22.0.0",
|
|
112
111
|
"testdouble": "3.20.2",
|
|
@@ -4,8 +4,8 @@ export const CI_PROVIDER_PROMPT_ID = 'CI_PROVIDER';
|
|
|
4
4
|
|
|
5
5
|
const {CI_PROVIDER} = questionNames.CI_PROVIDER;
|
|
6
6
|
|
|
7
|
-
export default function
|
|
8
|
-
|
|
7
|
+
export default async function chooseCiProvider(providers, {prompt}) {
|
|
8
|
+
const {[CI_PROVIDER]: provider} = await prompt({
|
|
9
9
|
id: CI_PROVIDER_PROMPT_ID,
|
|
10
10
|
questions: [{
|
|
11
11
|
name: CI_PROVIDER,
|
|
@@ -14,4 +14,6 @@ export default function promptForCiProvider(providers, {prompt}) {
|
|
|
14
14
|
choices: [...Object.keys(providers), 'Other']
|
|
15
15
|
}]
|
|
16
16
|
});
|
|
17
|
+
|
|
18
|
+
return provider;
|
|
17
19
|
}
|
|
@@ -2,7 +2,7 @@ import {describe, it, expect, vi} from 'vitest';
|
|
|
2
2
|
import any from '@travi/any';
|
|
3
3
|
import {when} from 'vitest-when';
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import chooseCiProvider, {CI_PROVIDER_PROMPT_ID} from './prompt.js';
|
|
6
6
|
import {questionNames} from '../prompts/index.js';
|
|
7
7
|
|
|
8
8
|
const {CI_PROVIDER} = questionNames.CI_PROVIDER;
|
|
@@ -10,7 +10,8 @@ const {CI_PROVIDER} = questionNames.CI_PROVIDER;
|
|
|
10
10
|
describe('ci-provider-prompt', () => {
|
|
11
11
|
it('should prompt for the provider choice', async () => {
|
|
12
12
|
const prompt = vi.fn();
|
|
13
|
-
const
|
|
13
|
+
const chosenProvider = any.word();
|
|
14
|
+
const answers = {...any.simpleObject(), [CI_PROVIDER]: chosenProvider};
|
|
14
15
|
const providers = any.simpleObject();
|
|
15
16
|
when(prompt).calledWith({
|
|
16
17
|
id: CI_PROVIDER_PROMPT_ID,
|
|
@@ -22,6 +23,6 @@ describe('ci-provider-prompt', () => {
|
|
|
22
23
|
}]
|
|
23
24
|
}).thenResolve(answers);
|
|
24
25
|
|
|
25
|
-
expect(await
|
|
26
|
+
expect(await chooseCiProvider(providers, {prompt})).toEqual(chosenProvider);
|
|
26
27
|
});
|
|
27
28
|
});
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import promptForCiProvider from './prompt.js';
|
|
1
|
+
import chooseCiProvider from './prompt.js';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export default async function scaffoldCiProvider(plugins, options, {prompt}) {
|
|
7
|
-
if (!Object.keys(plugins).length) return undefined;
|
|
8
|
-
|
|
9
|
-
const {projectRoot} = options;
|
|
10
|
-
|
|
11
|
-
const qualifiedPlugins = Object.fromEntries(
|
|
3
|
+
async function filterToQualifiedPlugins(plugins, projectRoot) {
|
|
4
|
+
return Object.fromEntries(
|
|
12
5
|
(await Promise.all(
|
|
13
6
|
Object.entries(plugins).map(async ([name, plugin]) => [
|
|
14
7
|
name,
|
|
@@ -17,11 +10,21 @@ export default async function scaffoldCiProvider(plugins, options, {prompt}) {
|
|
|
17
10
|
])
|
|
18
11
|
)).filter(([, , qualified]) => qualified).map(([name, plugin]) => [name, plugin])
|
|
19
12
|
);
|
|
13
|
+
}
|
|
20
14
|
|
|
21
|
-
|
|
15
|
+
async function scaffoldChoiceFromOptions(plugins, options, promptToChooseFromOptions, {prompt}) {
|
|
16
|
+
if (!Object.keys(plugins).length) return undefined;
|
|
17
|
+
|
|
18
|
+
const {projectRoot} = options;
|
|
19
|
+
const qualifiedPlugins = await filterToQualifiedPlugins(plugins, projectRoot);
|
|
20
|
+
const chosen = await promptToChooseFromOptions(qualifiedPlugins, {prompt});
|
|
22
21
|
const plugin = qualifiedPlugins[chosen];
|
|
23
22
|
|
|
24
23
|
if (plugin) return plugin.scaffold(options);
|
|
25
24
|
|
|
26
25
|
return {};
|
|
27
26
|
}
|
|
27
|
+
|
|
28
|
+
export default async function scaffoldCiProvider(plugins, options, {prompt}) {
|
|
29
|
+
return scaffoldChoiceFromOptions(plugins, options, chooseCiProvider, {prompt});
|
|
30
|
+
}
|
|
@@ -2,7 +2,7 @@ import {describe, expect, it, vi} from 'vitest';
|
|
|
2
2
|
import any from '@travi/any';
|
|
3
3
|
import {when} from 'vitest-when';
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import chooseCiProvider from './prompt.js';
|
|
6
6
|
import scaffoldCiProvider from './scaffolder.js';
|
|
7
7
|
import {questionNames} from '../prompts/index.js';
|
|
8
8
|
|
|
@@ -24,9 +24,9 @@ describe('ci-provider scaffolder', () => {
|
|
|
24
24
|
const scaffolderResult = any.simpleObject();
|
|
25
25
|
when(qualifiedPlugin.qualify).calledWith({projectRoot}).thenResolve(true);
|
|
26
26
|
when(unqualifiedPlugin.qualify).calledWith({projectRoot}).thenResolve(false);
|
|
27
|
-
when(
|
|
27
|
+
when(chooseCiProvider)
|
|
28
28
|
.calledWith({[qualifiedProviderName]: qualifiedPlugin}, {prompt})
|
|
29
|
-
.thenResolve(
|
|
29
|
+
.thenResolve(qualifiedProviderName);
|
|
30
30
|
when(qualifiedScaffolder).calledWith(options).thenResolve(scaffolderResult);
|
|
31
31
|
|
|
32
32
|
expect(await scaffoldCiProvider(
|
|
@@ -41,9 +41,9 @@ describe('ci-provider scaffolder', () => {
|
|
|
41
41
|
const pluginScaffolder = vi.fn();
|
|
42
42
|
const plugin = {scaffold: pluginScaffolder};
|
|
43
43
|
const scaffolderResult = any.simpleObject();
|
|
44
|
-
when(
|
|
44
|
+
when(chooseCiProvider)
|
|
45
45
|
.calledWith({[providerName]: plugin}, {prompt})
|
|
46
|
-
.thenResolve(
|
|
46
|
+
.thenResolve(providerName);
|
|
47
47
|
when(pluginScaffolder).calledWith(options).thenResolve(scaffolderResult);
|
|
48
48
|
|
|
49
49
|
expect(await scaffoldCiProvider({[providerName]: plugin}, options, {prompt})).toEqual(scaffolderResult);
|
|
@@ -51,14 +51,14 @@ describe('ci-provider scaffolder', () => {
|
|
|
51
51
|
|
|
52
52
|
it('should not present a prompt when no plugins are registered', async () => {
|
|
53
53
|
expect(await scaffoldCiProvider({}, options, {prompt})).toBe(undefined);
|
|
54
|
-
expect(
|
|
54
|
+
expect(chooseCiProvider).not.toHaveBeenCalled();
|
|
55
55
|
});
|
|
56
56
|
|
|
57
57
|
it('should return undefined when Other is chosen', async () => {
|
|
58
58
|
const providerName = any.word();
|
|
59
59
|
const plugin = {qualify: vi.fn(), scaffold: vi.fn()};
|
|
60
60
|
when(plugin.qualify).calledWith({projectRoot}).thenResolve(true);
|
|
61
|
-
when(
|
|
61
|
+
when(chooseCiProvider)
|
|
62
62
|
.calledWith({[providerName]: plugin}, {prompt})
|
|
63
63
|
.thenResolve({[CI_PROVIDER]: 'Other'});
|
|
64
64
|
|