create-typescript-app 2.0.0-beta.7 → 2.0.0-beta.9
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 +59 -55
- package/bin/index.js +14 -2
- package/lib/{next/base.d.ts → base.d.ts} +24 -4
- package/lib/{next/base.js → base.js} +19 -22
- package/lib/base.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockAllContributors.d.ts +1 -1
- package/lib/blocks/blockAllContributors.js +139 -0
- package/lib/blocks/blockAllContributors.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockAreTheTypesWrong.d.ts +1 -1
- package/lib/blocks/blockAreTheTypesWrong.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockCSpell.d.ts +1 -1
- package/lib/{next/blocks → blocks}/blockCSpell.js +1 -1
- package/lib/blocks/blockCSpell.js.map +1 -0
- package/lib/blocks/blockCodecov.d.ts +52 -0
- package/lib/blocks/blockCodecov.js +50 -0
- package/lib/blocks/blockCodecov.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockContributingDocs.d.ts +1 -1
- package/lib/{next/blocks → blocks}/blockContributingDocs.js +2 -1
- package/lib/blocks/blockContributingDocs.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockContributorCovenant.d.ts +1 -1
- package/lib/{next/blocks → blocks}/blockContributorCovenant.js +2 -1
- package/lib/blocks/blockContributorCovenant.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockDevelopmentDocs.d.ts +3 -3
- package/lib/{next/blocks → blocks}/blockDevelopmentDocs.js +3 -2
- package/lib/blocks/blockDevelopmentDocs.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockESLint.d.ts +8 -7
- package/lib/{next/blocks → blocks}/blockESLint.js +14 -5
- package/lib/blocks/blockESLint.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockESLintComments.d.ts +1 -1
- package/lib/blocks/blockESLintComments.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockESLintJSDoc.d.ts +1 -1
- package/lib/blocks/blockESLintJSDoc.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockESLintJSONC.d.ts +1 -1
- package/lib/blocks/blockESLintJSONC.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockESLintMarkdown.d.ts +1 -1
- package/lib/blocks/blockESLintMarkdown.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockESLintMoreStyling.d.ts +1 -1
- package/lib/blocks/blockESLintMoreStyling.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockESLintNode.d.ts +1 -1
- package/lib/{next/blocks → blocks}/blockESLintNode.js +7 -5
- package/lib/blocks/blockESLintNode.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockESLintPackageJson.d.ts +1 -1
- package/lib/blocks/blockESLintPackageJson.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockESLintPerfectionist.d.ts +1 -1
- package/lib/blocks/blockESLintPerfectionist.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockESLintRegexp.d.ts +1 -1
- package/lib/blocks/blockESLintRegexp.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockESLintYML.d.ts +1 -1
- package/lib/blocks/blockESLintYML.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockExampleFiles.d.ts +1 -1
- package/lib/blocks/blockExampleFiles.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockFunding.d.ts +1 -1
- package/lib/{next/blocks → blocks}/blockFunding.js +1 -1
- package/lib/blocks/blockFunding.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockGitHubActionsCI.d.ts +29 -3
- package/lib/{next/blocks → blocks}/blockGitHubActionsCI.js +21 -17
- package/lib/blocks/blockGitHubActionsCI.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockGitHubApps.d.ts +1 -1
- package/lib/blocks/blockGitHubApps.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockGitHubIssueTemplates.d.ts +1 -1
- package/lib/{next/blocks → blocks}/blockGitHubIssueTemplates.js +1 -1
- package/lib/blocks/blockGitHubIssueTemplates.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockGitHubPRTemplate.d.ts +1 -1
- package/lib/blocks/blockGitHubPRTemplate.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockGitignore.d.ts +1 -1
- package/lib/{next/blocks → blocks}/blockGitignore.js +1 -1
- package/lib/blocks/blockGitignore.js.map +1 -0
- package/lib/blocks/blockKnip.d.ts +52 -0
- package/lib/{next/blocks → blocks}/blockKnip.js +15 -5
- package/lib/blocks/blockKnip.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockMITLicense.d.ts +1 -1
- package/lib/blocks/blockMITLicense.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockMarkdownlint.d.ts +1 -1
- package/lib/{next/blocks → blocks}/blockMarkdownlint.js +10 -7
- package/lib/blocks/blockMarkdownlint.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockNvmrc.d.ts +1 -1
- package/lib/blocks/blockNvmrc.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockPRCompliance.d.ts +1 -1
- package/lib/{next/blocks → blocks}/blockPRCompliance.js +1 -1
- package/lib/blocks/blockPRCompliance.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockPackageJson.d.ts +2 -2
- package/lib/{next/blocks → blocks}/blockPackageJson.js +7 -4
- package/lib/blocks/blockPackageJson.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockPnpmDedupe.d.ts +1 -1
- package/lib/blocks/blockPnpmDedupe.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockPrettier.d.ts +2 -2
- package/lib/{next/blocks → blocks}/blockPrettier.js +6 -3
- package/lib/blocks/blockPrettier.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockPrettierPluginCurly.d.ts +1 -1
- package/lib/blocks/blockPrettierPluginCurly.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockPrettierPluginPackageJson.d.ts +1 -1
- package/lib/blocks/blockPrettierPluginPackageJson.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockPrettierPluginSh.d.ts +1 -1
- package/lib/blocks/blockPrettierPluginSh.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockREADME.d.ts +3 -1
- package/lib/{next/blocks → blocks}/blockREADME.js +16 -19
- package/lib/blocks/blockREADME.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockReleaseIt.d.ts +1 -1
- package/lib/{next/blocks → blocks}/blockReleaseIt.js +2 -2
- package/lib/blocks/blockReleaseIt.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockRenovate.d.ts +1 -1
- package/lib/{next/blocks → blocks}/blockRenovate.js +6 -1
- package/lib/blocks/blockRenovate.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockRepositoryBranchRuleset.d.ts +1 -1
- package/lib/{next/blocks → blocks}/blockRepositoryBranchRuleset.js +0 -1
- package/lib/blocks/blockRepositoryBranchRuleset.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockRepositoryLabels.d.ts +1 -1
- package/lib/{next/blocks → blocks}/blockRepositoryLabels.js +1 -1
- package/lib/blocks/blockRepositoryLabels.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockRepositorySecrets.d.ts +2 -2
- package/lib/blocks/blockRepositorySecrets.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockRepositorySettings.d.ts +1 -1
- package/lib/blocks/blockRepositorySettings.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockSecurityDocs.d.ts +1 -1
- package/lib/blocks/blockSecurityDocs.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockTSup.d.ts +2 -1
- package/lib/{next/blocks → blocks}/blockTSup.js +18 -4
- package/lib/blocks/blockTSup.js.map +1 -0
- package/lib/{next/blocks/blockKnip.d.ts → blocks/blockTemplatedWith.d.ts} +3 -3
- package/lib/{next/blocks/blockTemplatedBy.js → blocks/blockTemplatedWith.js} +3 -3
- package/lib/blocks/blockTemplatedWith.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockTypeScript.d.ts +1 -1
- package/lib/{next/blocks → blocks}/blockTypeScript.js +2 -2
- package/lib/blocks/blockTypeScript.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockVSCode.d.ts +1 -1
- package/lib/blocks/blockVSCode.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockVitest.d.ts +10 -5
- package/lib/{next/blocks → blocks}/blockVitest.js +19 -34
- package/lib/blocks/blockVitest.js.map +1 -0
- package/lib/blocks/files/createJobName.d.ts +3 -0
- package/lib/blocks/files/createJobName.js +7 -0
- package/lib/blocks/files/createJobName.js.map +1 -0
- package/lib/{steps/writing/creation/dotGitHub → blocks/files}/createMultiWorkflowFile.js +2 -1
- package/lib/blocks/files/createMultiWorkflowFile.js.map +1 -0
- package/lib/{steps/writing/creation/dotGitHub → blocks/files}/createSoloWorkflowFile.js +2 -1
- package/lib/blocks/files/createSoloWorkflowFile.js.map +1 -0
- package/lib/blocks/files/formatIgnoreFile.js.map +1 -0
- package/lib/{steps/writing/creation/dotGitHub → blocks/files}/formatWorkflowYaml.js +1 -1
- package/lib/blocks/files/formatWorkflowYaml.js.map +1 -0
- package/lib/{steps/writing/creation/formatters → blocks/files}/formatYaml.js +1 -3
- package/lib/blocks/files/formatYaml.js.map +1 -0
- package/lib/blocks/index.d.ts +2141 -0
- package/lib/blocks/index.js +178 -0
- package/lib/blocks/index.js.map +1 -0
- package/lib/blocks/options.fakes.js.map +1 -0
- package/lib/{steps/initializeGitHubRepository → blocks}/outcomeLabels.js +1 -0
- package/lib/blocks/outcomeLabels.js.map +1 -0
- package/lib/blocks/phases.js.map +1 -0
- package/lib/{next/blocks/sourcePackageJson.d.ts → data/packageData.d.ts} +45 -51
- package/lib/{next/blocks → data}/packageData.js +9 -3
- package/lib/data/packageData.js.map +1 -0
- package/lib/index.d.ts +50 -48
- package/lib/index.js +4 -5
- package/lib/index.js.map +1 -1
- package/lib/options/getUsageFromReadme.js.map +1 -0
- package/lib/{shared/options/createOptionDefaults → options}/parsePackageAuthor.d.ts +1 -3
- package/lib/options/parsePackageAuthor.js.map +1 -0
- package/lib/{shared/options/createOptionDefaults → options}/readDefaultsFromReadme.d.ts +1 -0
- package/lib/{shared/options/createOptionDefaults → options}/readDefaultsFromReadme.js +12 -3
- package/lib/options/readDefaultsFromReadme.js.map +1 -0
- package/lib/{next → options}/readDescription.d.ts +1 -3
- package/lib/{next → options}/readDescription.js +2 -2
- package/lib/options/readDescription.js.map +1 -0
- package/lib/options/readDescriptionFromReadme.js.map +1 -0
- package/lib/{next → options}/readDocumentation.js +1 -1
- package/lib/options/readDocumentation.js.map +1 -0
- package/lib/{shared/options/createOptionDefaults → options}/readEmails.js +1 -1
- package/lib/options/readEmails.js.map +1 -0
- package/lib/options/readFileAsJson.js.map +1 -0
- package/lib/options/readFileSafe.js.map +1 -0
- package/lib/{shared/options/createOptionDefaults → options}/readFunding.js +1 -1
- package/lib/options/readFunding.js.map +1 -0
- package/lib/{shared/options/createOptionDefaults → options}/readGitHubEmail.js +1 -1
- package/lib/options/readGitHubEmail.js.map +1 -0
- package/lib/{shared/options/createOptionDefaults → options}/readGuide.js +1 -1
- package/lib/options/readGuide.js.map +1 -0
- package/lib/{shared/options → options}/readLogoSizing.js +1 -1
- package/lib/options/readLogoSizing.js.map +1 -0
- package/lib/options/readPackageData.d.ts +5 -0
- package/lib/options/readPackageData.js +8 -0
- package/lib/options/readPackageData.js.map +1 -0
- package/lib/{next/presets/presetCommon.d.ts → presets/common.d.ts} +1 -1
- package/lib/{next/presets/presetCommon.js → presets/common.js} +6 -2
- package/lib/presets/common.js.map +1 -0
- package/lib/{next/presets/presetEverything.d.ts → presets/everything.d.ts} +1 -1
- package/lib/{next/presets/presetEverything.js → presets/everything.js} +2 -4
- package/lib/presets/everything.js.map +1 -0
- package/lib/presets/index.d.ts +310 -0
- package/lib/presets/index.js +18 -0
- package/lib/presets/index.js.map +1 -0
- package/lib/{next/presets/presetMinimal.d.ts → presets/minimal.d.ts} +1 -1
- package/lib/{next/presets/presetMinimal.js → presets/minimal.js} +5 -5
- package/lib/presets/minimal.js.map +1 -0
- package/lib/{next/template.d.ts → template.d.ts} +1 -1
- package/lib/{next/template.js → template.js} +3 -3
- package/lib/template.js.map +1 -0
- package/lib/types.d.ts +31 -5
- package/lib/utils/resolveBin.js.map +1 -0
- package/lib/utils/sortObject.js.map +1 -0
- package/lib/utils/swallowError.js.map +1 -0
- package/lib/utils/tryCatchAsync.js.map +1 -0
- package/lib/utils/tryCatchLazyValueAsync.js.map +1 -0
- package/package.json +22 -32
- package/lib/bin/help.d.ts +0 -3
- package/lib/bin/help.js +0 -117
- package/lib/bin/help.js.map +0 -1
- package/lib/bin/index.d.ts +0 -5
- package/lib/bin/index.js +0 -91
- package/lib/bin/index.js.map +0 -1
- package/lib/bin/packageJson.d.ts +0 -3
- package/lib/bin/packageJson.js +0 -13
- package/lib/bin/packageJson.js.map +0 -1
- package/lib/bin/promptForMode.d.ts +0 -11
- package/lib/bin/promptForMode.js +0 -108
- package/lib/bin/promptForMode.js.map +0 -1
- package/lib/create/createAndEnterGitDirectory.d.ts +0 -3
- package/lib/create/createAndEnterGitDirectory.js +0 -20
- package/lib/create/createAndEnterGitDirectory.js.map +0 -1
- package/lib/create/createRerunDirectorySuggestion.d.ts +0 -7
- package/lib/create/createRerunDirectorySuggestion.js +0 -8
- package/lib/create/createRerunDirectorySuggestion.js.map +0 -1
- package/lib/create/createRerunSuggestion.d.ts +0 -7
- package/lib/create/createRerunSuggestion.js +0 -56
- package/lib/create/createRerunSuggestion.js.map +0 -1
- package/lib/create/createWithOptions.d.ts +0 -11
- package/lib/create/createWithOptions.js +0 -68
- package/lib/create/createWithOptions.js.map +0 -1
- package/lib/create/index.d.ts +0 -7
- package/lib/create/index.js +0 -69
- package/lib/create/index.js.map +0 -1
- package/lib/greet.d.ts +0 -5
- package/lib/greet.js +0 -14
- package/lib/greet.js.map +0 -1
- package/lib/initialize/index.d.ts +0 -7
- package/lib/initialize/index.js +0 -43
- package/lib/initialize/index.js.map +0 -1
- package/lib/initialize/initializeWithOptions.d.ts +0 -9
- package/lib/initialize/initializeWithOptions.js +0 -66
- package/lib/initialize/initializeWithOptions.js.map +0 -1
- package/lib/migrate/index.d.ts +0 -7
- package/lib/migrate/index.js +0 -43
- package/lib/migrate/index.js.map +0 -1
- package/lib/migrate/migrateWithOptions.d.ts +0 -9
- package/lib/migrate/migrateWithOptions.js +0 -72
- package/lib/migrate/migrateWithOptions.js.map +0 -1
- package/lib/next/base.js.map +0 -1
- package/lib/next/blocks/blockAllContributors.js +0 -65
- package/lib/next/blocks/blockAllContributors.js.map +0 -1
- package/lib/next/blocks/blockAreTheTypesWrong.js.map +0 -1
- package/lib/next/blocks/blockCSpell.js.map +0 -1
- package/lib/next/blocks/blockContributingDocs.js.map +0 -1
- package/lib/next/blocks/blockContributorCovenant.js.map +0 -1
- package/lib/next/blocks/blockDevelopmentDocs.js.map +0 -1
- package/lib/next/blocks/blockESLint.js.map +0 -1
- package/lib/next/blocks/blockESLintComments.js.map +0 -1
- package/lib/next/blocks/blockESLintJSDoc.js.map +0 -1
- package/lib/next/blocks/blockESLintJSONC.js.map +0 -1
- package/lib/next/blocks/blockESLintMarkdown.js.map +0 -1
- package/lib/next/blocks/blockESLintMoreStyling.js.map +0 -1
- package/lib/next/blocks/blockESLintNode.js.map +0 -1
- package/lib/next/blocks/blockESLintPackageJson.js.map +0 -1
- package/lib/next/blocks/blockESLintPerfectionist.js.map +0 -1
- package/lib/next/blocks/blockESLintRegexp.js.map +0 -1
- package/lib/next/blocks/blockESLintYML.js.map +0 -1
- package/lib/next/blocks/blockExampleFiles.js.map +0 -1
- package/lib/next/blocks/blockFunding.js.map +0 -1
- package/lib/next/blocks/blockGitHubActionsCI.js.map +0 -1
- package/lib/next/blocks/blockGitHubApps.js.map +0 -1
- package/lib/next/blocks/blockGitHubIssueTemplates.js.map +0 -1
- package/lib/next/blocks/blockGitHubPRTemplate.js.map +0 -1
- package/lib/next/blocks/blockGitignore.js.map +0 -1
- package/lib/next/blocks/blockKnip.js.map +0 -1
- package/lib/next/blocks/blockMITLicense.js.map +0 -1
- package/lib/next/blocks/blockMarkdownlint.js.map +0 -1
- package/lib/next/blocks/blockNvmrc.js.map +0 -1
- package/lib/next/blocks/blockPRCompliance.js.map +0 -1
- package/lib/next/blocks/blockPackageJson.js.map +0 -1
- package/lib/next/blocks/blockPnpmDedupe.js.map +0 -1
- package/lib/next/blocks/blockPrettier.js.map +0 -1
- package/lib/next/blocks/blockPrettierPluginCurly.js.map +0 -1
- package/lib/next/blocks/blockPrettierPluginPackageJson.js.map +0 -1
- package/lib/next/blocks/blockPrettierPluginSh.js.map +0 -1
- package/lib/next/blocks/blockREADME.js.map +0 -1
- package/lib/next/blocks/blockReleaseIt.js.map +0 -1
- package/lib/next/blocks/blockRenovate.js.map +0 -1
- package/lib/next/blocks/blockRepositoryBranchRuleset.js.map +0 -1
- package/lib/next/blocks/blockRepositoryLabels.js.map +0 -1
- package/lib/next/blocks/blockRepositorySecrets.js.map +0 -1
- package/lib/next/blocks/blockRepositorySettings.js.map +0 -1
- package/lib/next/blocks/blockSecurityDocs.js.map +0 -1
- package/lib/next/blocks/blockTSup.js.map +0 -1
- package/lib/next/blocks/blockTemplatedBy.d.ts +0 -50
- package/lib/next/blocks/blockTemplatedBy.js.map +0 -1
- package/lib/next/blocks/blockTypeScript.js.map +0 -1
- package/lib/next/blocks/blockVSCode.js.map +0 -1
- package/lib/next/blocks/blockVitest.js.map +0 -1
- package/lib/next/blocks/index.d.ts +0 -43
- package/lib/next/blocks/index.js +0 -43
- package/lib/next/blocks/index.js.map +0 -1
- package/lib/next/blocks/options.fakes.js.map +0 -1
- package/lib/next/blocks/packageData.d.ts +0 -6
- package/lib/next/blocks/packageData.js.map +0 -1
- package/lib/next/blocks/phases.js.map +0 -1
- package/lib/next/blocks/sourcePackageJson.js +0 -10
- package/lib/next/blocks/sourcePackageJson.js.map +0 -1
- package/lib/next/presets/index.d.ts +0 -5
- package/lib/next/presets/index.js +0 -4
- package/lib/next/presets/index.js.map +0 -1
- package/lib/next/presets/presetCommon.js.map +0 -1
- package/lib/next/presets/presetEverything.js.map +0 -1
- package/lib/next/presets/presetMinimal.js.map +0 -1
- package/lib/next/readDescription.js.map +0 -1
- package/lib/next/readDescriptionFromReadme.js.map +0 -1
- package/lib/next/readDocumentation.js.map +0 -1
- package/lib/next/runCreateEnginePreset.d.ts +0 -7
- package/lib/next/runCreateEnginePreset.js +0 -20
- package/lib/next/runCreateEnginePreset.js.map +0 -1
- package/lib/next/template.js.map +0 -1
- package/lib/next/utils/resolveBin.js.map +0 -1
- package/lib/next/utils/sortObject.js.map +0 -1
- package/lib/next/utils/swallowError.js.map +0 -1
- package/lib/shared/cli/lines.d.ts +0 -5
- package/lib/shared/cli/lines.js +0 -17
- package/lib/shared/cli/lines.js.map +0 -1
- package/lib/shared/cli/lowerFirst.d.ts +0 -3
- package/lib/shared/cli/lowerFirst.js +0 -7
- package/lib/shared/cli/lowerFirst.js.map +0 -1
- package/lib/shared/cli/outro.d.ts +0 -8
- package/lib/shared/cli/outro.js +0 -21
- package/lib/shared/cli/outro.js.map +0 -1
- package/lib/shared/cli/spinners.d.ts +0 -6
- package/lib/shared/cli/spinners.js +0 -50
- package/lib/shared/cli/spinners.js.map +0 -1
- package/lib/shared/cli/startLineWithDots.d.ts +0 -3
- package/lib/shared/cli/startLineWithDots.js +0 -32
- package/lib/shared/cli/startLineWithDots.js.map +0 -1
- package/lib/shared/codes.d.ts +0 -8
- package/lib/shared/codes.js +0 -9
- package/lib/shared/codes.js.map +0 -1
- package/lib/shared/createCleanupCommands.d.ts +0 -3
- package/lib/shared/createCleanupCommands.js +0 -13
- package/lib/shared/createCleanupCommands.js.map +0 -1
- package/lib/shared/doesRepositoryExist.d.ts +0 -9
- package/lib/shared/doesRepositoryExist.js +0 -18
- package/lib/shared/doesRepositoryExist.js.map +0 -1
- package/lib/shared/ensureGitRepository.d.ts +0 -3
- package/lib/shared/ensureGitRepository.js +0 -12
- package/lib/shared/ensureGitRepository.js.map +0 -1
- package/lib/shared/generateNextSteps.d.ts +0 -8
- package/lib/shared/generateNextSteps.js +0 -60
- package/lib/shared/generateNextSteps.js.map +0 -1
- package/lib/shared/getGitHubUserAsAllContributor.d.ts +0 -8
- package/lib/shared/getGitHubUserAsAllContributor.js +0 -43
- package/lib/shared/getGitHubUserAsAllContributor.js.map +0 -1
- package/lib/shared/isUsingCreateEngine.d.ts +0 -3
- package/lib/shared/isUsingCreateEngine.js +0 -7
- package/lib/shared/isUsingCreateEngine.js.map +0 -1
- package/lib/shared/options/args.d.ts +0 -273
- package/lib/shared/options/args.js +0 -335
- package/lib/shared/options/args.js.map +0 -1
- package/lib/shared/options/augmentOptionsWithExcludes.d.ts +0 -7
- package/lib/shared/options/augmentOptionsWithExcludes.js +0 -94
- package/lib/shared/options/augmentOptionsWithExcludes.js.map +0 -1
- package/lib/shared/options/createOptionDefaults/getUsageFromReadme.js.map +0 -1
- package/lib/shared/options/createOptionDefaults/index.d.ts +0 -28
- package/lib/shared/options/createOptionDefaults/index.js +0 -49
- package/lib/shared/options/createOptionDefaults/index.js.map +0 -1
- package/lib/shared/options/createOptionDefaults/parsePackageAuthor.js.map +0 -1
- package/lib/shared/options/createOptionDefaults/readDefaultsFromReadme.js.map +0 -1
- package/lib/shared/options/createOptionDefaults/readEmails.js.map +0 -1
- package/lib/shared/options/createOptionDefaults/readFunding.js.map +0 -1
- package/lib/shared/options/createOptionDefaults/readGitHubEmail.js.map +0 -1
- package/lib/shared/options/createOptionDefaults/readGuide.js.map +0 -1
- package/lib/shared/options/createRepositoryWithApi.d.ts +0 -10
- package/lib/shared/options/createRepositoryWithApi.js +0 -32
- package/lib/shared/options/createRepositoryWithApi.js.map +0 -1
- package/lib/shared/options/detectEmailRedundancy.d.ts +0 -8
- package/lib/shared/options/detectEmailRedundancy.js +0 -16
- package/lib/shared/options/detectEmailRedundancy.js.map +0 -1
- package/lib/shared/options/ensureRepositoryExists.d.ts +0 -13
- package/lib/shared/options/ensureRepositoryExists.js +0 -64
- package/lib/shared/options/ensureRepositoryExists.js.map +0 -1
- package/lib/shared/options/exclusionKeys.d.ts +0 -15
- package/lib/shared/options/exclusionKeys.js +0 -129
- package/lib/shared/options/exclusionKeys.js.map +0 -1
- package/lib/shared/options/getBase.d.ts +0 -7
- package/lib/shared/options/getBase.js +0 -27
- package/lib/shared/options/getBase.js.map +0 -1
- package/lib/shared/options/getPrefillOrPromptedOption.d.ts +0 -16
- package/lib/shared/options/getPrefillOrPromptedOption.js +0 -37
- package/lib/shared/options/getPrefillOrPromptedOption.js.map +0 -1
- package/lib/shared/options/logInferredOptions.d.ts +0 -8
- package/lib/shared/options/logInferredOptions.js +0 -30
- package/lib/shared/options/logInferredOptions.js.map +0 -1
- package/lib/shared/options/optionsSchema.d.ts +0 -218
- package/lib/shared/options/optionsSchema.js +0 -63
- package/lib/shared/options/optionsSchema.js.map +0 -1
- package/lib/shared/options/readLogoSizing.js.map +0 -1
- package/lib/shared/options/readOptions.d.ts +0 -21
- package/lib/shared/options/readOptions.js +0 -235
- package/lib/shared/options/readOptions.js.map +0 -1
- package/lib/shared/packages.d.ts +0 -8
- package/lib/shared/packages.js +0 -18
- package/lib/shared/packages.js.map +0 -1
- package/lib/shared/prompts.d.ts +0 -3
- package/lib/shared/prompts.js +0 -8
- package/lib/shared/prompts.js.map +0 -1
- package/lib/shared/readFileAsJson.js.map +0 -1
- package/lib/shared/readFileSafe.js.map +0 -1
- package/lib/shared/readFileSafeAsJson.d.ts +0 -3
- package/lib/shared/readFileSafeAsJson.js +0 -8
- package/lib/shared/readFileSafeAsJson.js.map +0 -1
- package/lib/shared/runOrRestore.d.ts +0 -7
- package/lib/shared/runOrRestore.js +0 -37
- package/lib/shared/runOrRestore.js.map +0 -1
- package/lib/shared/tryCatchAsync.js.map +0 -1
- package/lib/shared/tryCatchLazyValueAsync.js.map +0 -1
- package/lib/shared/types.d.ts +0 -120
- package/lib/shared/types.js +0 -1
- package/lib/shared/types.js.map +0 -1
- package/lib/steps/addOwnerAsAllContributor.d.ts +0 -8
- package/lib/steps/addOwnerAsAllContributor.js +0 -43
- package/lib/steps/addOwnerAsAllContributor.js.map +0 -1
- package/lib/steps/addToolAllContributors.d.ts +0 -8
- package/lib/steps/addToolAllContributors.js +0 -12
- package/lib/steps/addToolAllContributors.js.map +0 -1
- package/lib/steps/clearChangelog.d.ts +0 -3
- package/lib/steps/clearChangelog.js +0 -12
- package/lib/steps/clearChangelog.js.map +0 -1
- package/lib/steps/clearLocalGitTags.d.ts +0 -3
- package/lib/steps/clearLocalGitTags.js +0 -9
- package/lib/steps/clearLocalGitTags.js.map +0 -1
- package/lib/steps/clearUnnecessaryFiles.d.ts +0 -3
- package/lib/steps/clearUnnecessaryFiles.js +0 -38
- package/lib/steps/clearUnnecessaryFiles.js.map +0 -1
- package/lib/steps/createJoshuaKGoldbergReplacement.d.ts +0 -11
- package/lib/steps/createJoshuaKGoldbergReplacement.js +0 -16
- package/lib/steps/createJoshuaKGoldbergReplacement.js.map +0 -1
- package/lib/steps/finalizeDependencies.d.ts +0 -7
- package/lib/steps/finalizeDependencies.js +0 -59
- package/lib/steps/finalizeDependencies.js.map +0 -1
- package/lib/steps/initializeGitHubRepository/index.d.ts +0 -8
- package/lib/steps/initializeGitHubRepository/index.js +0 -19
- package/lib/steps/initializeGitHubRepository/index.js.map +0 -1
- package/lib/steps/initializeGitHubRepository/initializeBranchProtectionSettings.d.ts +0 -8
- package/lib/steps/initializeGitHubRepository/initializeBranchProtectionSettings.js +0 -67
- package/lib/steps/initializeGitHubRepository/initializeBranchProtectionSettings.js.map +0 -1
- package/lib/steps/initializeGitHubRepository/outcomeLabels.js.map +0 -1
- package/lib/steps/initializeGitRemote.d.ts +0 -8
- package/lib/steps/initializeGitRemote.js +0 -15
- package/lib/steps/initializeGitRemote.js.map +0 -1
- package/lib/steps/initializeRepositorySettings.d.ts +0 -9
- package/lib/steps/initializeRepositorySettings.js +0 -27
- package/lib/steps/initializeRepositorySettings.js.map +0 -1
- package/lib/steps/populateCSpellDictionary.d.ts +0 -3
- package/lib/steps/populateCSpellDictionary.js +0 -36
- package/lib/steps/populateCSpellDictionary.js.map +0 -1
- package/lib/steps/removeSetupScripts.d.ts +0 -3
- package/lib/steps/removeSetupScripts.js +0 -29
- package/lib/steps/removeSetupScripts.js.map +0 -1
- package/lib/steps/resetGitTags.d.ts +0 -3
- package/lib/steps/resetGitTags.js +0 -12
- package/lib/steps/resetGitTags.js.map +0 -1
- package/lib/steps/runCleanup.d.ts +0 -7
- package/lib/steps/runCleanup.js +0 -37
- package/lib/steps/runCleanup.js.map +0 -1
- package/lib/steps/uninstallPackages.d.ts +0 -3
- package/lib/steps/uninstallPackages.js +0 -64
- package/lib/steps/uninstallPackages.js.map +0 -1
- package/lib/steps/updateAllContributorsTable.d.ts +0 -7
- package/lib/steps/updateAllContributorsTable.js +0 -24
- package/lib/steps/updateAllContributorsTable.js.map +0 -1
- package/lib/steps/updateLocalFiles.d.ts +0 -7
- package/lib/steps/updateLocalFiles.js +0 -84
- package/lib/steps/updateLocalFiles.js.map +0 -1
- package/lib/steps/updateReadme.d.ts +0 -10
- package/lib/steps/updateReadme.js +0 -27
- package/lib/steps/updateReadme.js.map +0 -1
- package/lib/steps/writeReadme/findExistingBadges.d.ts +0 -4
- package/lib/steps/writeReadme/findExistingBadges.js +0 -28
- package/lib/steps/writeReadme/findExistingBadges.js.map +0 -1
- package/lib/steps/writeReadme/findIntroSectionClose.d.ts +0 -3
- package/lib/steps/writeReadme/findIntroSectionClose.js +0 -22
- package/lib/steps/writeReadme/findIntroSectionClose.js.map +0 -1
- package/lib/steps/writeReadme/generateTopContent.d.ts +0 -7
- package/lib/steps/writeReadme/generateTopContent.js +0 -70
- package/lib/steps/writeReadme/generateTopContent.js.map +0 -1
- package/lib/steps/writeReadme/index.d.ts +0 -7
- package/lib/steps/writeReadme/index.js +0 -57
- package/lib/steps/writeReadme/index.js.map +0 -1
- package/lib/steps/writing/creation/createCSpellConfig.d.ts +0 -7
- package/lib/steps/writing/creation/createCSpellConfig.js +0 -27
- package/lib/steps/writing/creation/createCSpellConfig.js.map +0 -1
- package/lib/steps/writing/creation/createDotGitignore.d.ts +0 -7
- package/lib/steps/writing/creation/createDotGitignore.js +0 -14
- package/lib/steps/writing/creation/createDotGitignore.js.map +0 -1
- package/lib/steps/writing/creation/createESLintConfig.d.ts +0 -7
- package/lib/steps/writing/creation/createESLintConfig.js +0 -105
- package/lib/steps/writing/creation/createESLintConfig.js.map +0 -1
- package/lib/steps/writing/creation/createKnipConfig.d.ts +0 -3
- package/lib/steps/writing/creation/createKnipConfig.js +0 -20
- package/lib/steps/writing/creation/createKnipConfig.js.map +0 -1
- package/lib/steps/writing/creation/createTsupConfig.d.ts +0 -7
- package/lib/steps/writing/creation/createTsupConfig.js +0 -19
- package/lib/steps/writing/creation/createTsupConfig.js.map +0 -1
- package/lib/steps/writing/creation/dotGitHub/actions.d.ts +0 -7
- package/lib/steps/writing/creation/dotGitHub/actions.js +0 -32
- package/lib/steps/writing/creation/dotGitHub/actions.js.map +0 -1
- package/lib/steps/writing/creation/dotGitHub/createDevelopment/index.d.ts +0 -7
- package/lib/steps/writing/creation/dotGitHub/createDevelopment/index.js +0 -154
- package/lib/steps/writing/creation/dotGitHub/createDevelopment/index.js.map +0 -1
- package/lib/steps/writing/creation/dotGitHub/createDevelopment/splitIntoSections.d.ts +0 -3
- package/lib/steps/writing/creation/dotGitHub/createDevelopment/splitIntoSections.js +0 -24
- package/lib/steps/writing/creation/dotGitHub/createDevelopment/splitIntoSections.js.map +0 -1
- package/lib/steps/writing/creation/dotGitHub/createDotGitHubFiles.d.ts +0 -16
- package/lib/steps/writing/creation/dotGitHub/createDotGitHubFiles.js +0 -292
- package/lib/steps/writing/creation/dotGitHub/createDotGitHubFiles.js.map +0 -1
- package/lib/steps/writing/creation/dotGitHub/createMultiWorkflowFile.js.map +0 -1
- package/lib/steps/writing/creation/dotGitHub/createSoloWorkflowFile.js.map +0 -1
- package/lib/steps/writing/creation/dotGitHub/createWorkflows.d.ts +0 -15
- package/lib/steps/writing/creation/dotGitHub/createWorkflows.js +0 -237
- package/lib/steps/writing/creation/dotGitHub/createWorkflows.js.map +0 -1
- package/lib/steps/writing/creation/dotGitHub/formatWorkflowYaml.js.map +0 -1
- package/lib/steps/writing/creation/dotGitHub/index.d.ts +0 -36
- package/lib/steps/writing/creation/dotGitHub/index.js +0 -16
- package/lib/steps/writing/creation/dotGitHub/index.js.map +0 -1
- package/lib/steps/writing/creation/dotGitHub/issueTemplate.d.ts +0 -12
- package/lib/steps/writing/creation/dotGitHub/issueTemplate.js +0 -198
- package/lib/steps/writing/creation/dotGitHub/issueTemplate.js.map +0 -1
- package/lib/steps/writing/creation/dotHusky.d.ts +0 -6
- package/lib/steps/writing/creation/dotHusky.js +0 -11
- package/lib/steps/writing/creation/dotHusky.js.map +0 -1
- package/lib/steps/writing/creation/dotVSCode.d.ts +0 -12
- package/lib/steps/writing/creation/dotVSCode.js +0 -79
- package/lib/steps/writing/creation/dotVSCode.js.map +0 -1
- package/lib/steps/writing/creation/formatters/formatIgnoreFile.js.map +0 -1
- package/lib/steps/writing/creation/formatters/formatJson.d.ts +0 -3
- package/lib/steps/writing/creation/formatters/formatJson.js +0 -18
- package/lib/steps/writing/creation/formatters/formatJson.js.map +0 -1
- package/lib/steps/writing/creation/formatters/formatTypeScript.d.ts +0 -3
- package/lib/steps/writing/creation/formatters/formatTypeScript.js +0 -8
- package/lib/steps/writing/creation/formatters/formatTypeScript.js.map +0 -1
- package/lib/steps/writing/creation/formatters/formatYaml.js.map +0 -1
- package/lib/steps/writing/creation/index.d.ts +0 -9
- package/lib/steps/writing/creation/index.js +0 -78
- package/lib/steps/writing/creation/index.js.map +0 -1
- package/lib/steps/writing/creation/rootFiles.d.ts +0 -24
- package/lib/steps/writing/creation/rootFiles.js +0 -152
- package/lib/steps/writing/creation/rootFiles.js.map +0 -1
- package/lib/steps/writing/creation/src.d.ts +0 -12
- package/lib/steps/writing/creation/src.js +0 -90
- package/lib/steps/writing/creation/src.js.map +0 -1
- package/lib/steps/writing/creation/writeAllContributorsRC.d.ts +0 -7
- package/lib/steps/writing/creation/writeAllContributorsRC.js +0 -18
- package/lib/steps/writing/creation/writeAllContributorsRC.js.map +0 -1
- package/lib/steps/writing/creation/writePackageJson.d.ts +0 -7
- package/lib/steps/writing/creation/writePackageJson.js +0 -118
- package/lib/steps/writing/creation/writePackageJson.js.map +0 -1
- package/lib/steps/writing/types.d.ts +0 -5
- package/lib/steps/writing/types.js +0 -1
- package/lib/steps/writing/types.js.map +0 -1
- package/lib/steps/writing/writeStructure.d.ts +0 -7
- package/lib/steps/writing/writeStructure.js +0 -22
- package/lib/steps/writing/writeStructure.js.map +0 -1
- package/lib/steps/writing/writeStructureWorker.d.ts +0 -5
- package/lib/steps/writing/writeStructureWorker.js +0 -47
- package/lib/steps/writing/writeStructureWorker.js.map +0 -1
- /package/lib/{next/blocks → blocks}/blockAreTheTypesWrong.js +0 -0
- /package/lib/{next/blocks → blocks}/blockESLintComments.js +0 -0
- /package/lib/{next/blocks → blocks}/blockESLintJSDoc.js +0 -0
- /package/lib/{next/blocks → blocks}/blockESLintJSONC.js +0 -0
- /package/lib/{next/blocks → blocks}/blockESLintMarkdown.js +0 -0
- /package/lib/{next/blocks → blocks}/blockESLintMoreStyling.js +0 -0
- /package/lib/{next/blocks → blocks}/blockESLintPackageJson.js +0 -0
- /package/lib/{next/blocks → blocks}/blockESLintPerfectionist.js +0 -0
- /package/lib/{next/blocks → blocks}/blockESLintRegexp.js +0 -0
- /package/lib/{next/blocks → blocks}/blockESLintYML.js +0 -0
- /package/lib/{next/blocks → blocks}/blockExampleFiles.js +0 -0
- /package/lib/{next/blocks → blocks}/blockGitHubApps.js +0 -0
- /package/lib/{next/blocks → blocks}/blockGitHubPRTemplate.js +0 -0
- /package/lib/{next/blocks → blocks}/blockMITLicense.js +0 -0
- /package/lib/{next/blocks → blocks}/blockNvmrc.js +0 -0
- /package/lib/{next/blocks → blocks}/blockPnpmDedupe.js +0 -0
- /package/lib/{next/blocks → blocks}/blockPrettierPluginCurly.js +0 -0
- /package/lib/{next/blocks → blocks}/blockPrettierPluginPackageJson.js +0 -0
- /package/lib/{next/blocks → blocks}/blockPrettierPluginSh.js +0 -0
- /package/lib/{next/blocks → blocks}/blockRepositorySecrets.js +0 -0
- /package/lib/{next/blocks → blocks}/blockRepositorySettings.js +0 -0
- /package/lib/{next/blocks → blocks}/blockSecurityDocs.js +0 -0
- /package/lib/{next/blocks → blocks}/blockVSCode.js +0 -0
- /package/lib/{steps/writing/creation/dotGitHub → blocks/files}/createMultiWorkflowFile.d.ts +0 -0
- /package/lib/{steps/writing/creation/dotGitHub → blocks/files}/createSoloWorkflowFile.d.ts +0 -0
- /package/lib/{steps/writing/creation/formatters → blocks/files}/formatIgnoreFile.d.ts +0 -0
- /package/lib/{steps/writing/creation/formatters → blocks/files}/formatIgnoreFile.js +0 -0
- /package/lib/{steps/writing/creation/dotGitHub → blocks/files}/formatWorkflowYaml.d.ts +0 -0
- /package/lib/{steps/writing/creation/formatters → blocks/files}/formatYaml.d.ts +0 -0
- /package/lib/{next/blocks → blocks}/options.fakes.d.ts +0 -0
- /package/lib/{next/blocks → blocks}/options.fakes.js +0 -0
- /package/lib/{steps/initializeGitHubRepository → blocks}/outcomeLabels.d.ts +0 -0
- /package/lib/{next/blocks → blocks}/phases.d.ts +0 -0
- /package/lib/{next/blocks → blocks}/phases.js +0 -0
- /package/lib/{shared/options/createOptionDefaults → options}/getUsageFromReadme.d.ts +0 -0
- /package/lib/{shared/options/createOptionDefaults → options}/getUsageFromReadme.js +0 -0
- /package/lib/{shared/options/createOptionDefaults → options}/parsePackageAuthor.js +0 -0
- /package/lib/{next → options}/readDescriptionFromReadme.d.ts +0 -0
- /package/lib/{next → options}/readDescriptionFromReadme.js +0 -0
- /package/lib/{next → options}/readDocumentation.d.ts +0 -0
- /package/lib/{shared/options/createOptionDefaults → options}/readEmails.d.ts +0 -0
- /package/lib/{shared → options}/readFileAsJson.d.ts +0 -0
- /package/lib/{shared → options}/readFileAsJson.js +0 -0
- /package/lib/{shared → options}/readFileSafe.d.ts +0 -0
- /package/lib/{shared → options}/readFileSafe.js +0 -0
- /package/lib/{shared/options/createOptionDefaults → options}/readFunding.d.ts +0 -0
- /package/lib/{shared/options/createOptionDefaults → options}/readGitHubEmail.d.ts +0 -0
- /package/lib/{shared/options/createOptionDefaults → options}/readGuide.d.ts +0 -0
- /package/lib/{shared/options → options}/readLogoSizing.d.ts +0 -0
- /package/lib/{next/utils → utils}/resolveBin.d.ts +0 -0
- /package/lib/{next/utils → utils}/resolveBin.js +0 -0
- /package/lib/{next/utils → utils}/sortObject.d.ts +0 -0
- /package/lib/{next/utils → utils}/sortObject.js +0 -0
- /package/lib/{next/utils → utils}/swallowError.d.ts +0 -0
- /package/lib/{next/utils → utils}/swallowError.js +0 -0
- /package/lib/{shared → utils}/tryCatchAsync.d.ts +0 -0
- /package/lib/{shared → utils}/tryCatchAsync.js +0 -0
- /package/lib/{shared → utils}/tryCatchLazyValueAsync.d.ts +0 -0
- /package/lib/{shared → utils}/tryCatchLazyValueAsync.js +0 -0
|
@@ -1,335 +0,0 @@
|
|
|
1
|
-
import chalk from "chalk";
|
|
2
|
-
const allArgOptions = {
|
|
3
|
-
access: {
|
|
4
|
-
description: `(${chalk.cyanBright(
|
|
5
|
-
'"public" | "restricted"'
|
|
6
|
-
)}): Which ${chalk.cyanBright("npm publish --access")} to
|
|
7
|
-
release npm packages with (by default, "public")`,
|
|
8
|
-
docsSection: "optional",
|
|
9
|
-
type: "string"
|
|
10
|
-
},
|
|
11
|
-
author: {
|
|
12
|
-
description: `Username on npm to publish packages under (by
|
|
13
|
-
default, an existing npm author, or the currently logged in npm user, or
|
|
14
|
-
${chalk.cyanBright("owner.toLowerCase()")})`,
|
|
15
|
-
docsSection: "optional",
|
|
16
|
-
type: "string"
|
|
17
|
-
},
|
|
18
|
-
auto: {
|
|
19
|
-
description: `Whether to infer all options from files on disk.`,
|
|
20
|
-
docsSection: "optional",
|
|
21
|
-
type: "boolean"
|
|
22
|
-
},
|
|
23
|
-
base: {
|
|
24
|
-
description: `Whether to scaffold the repository with:
|
|
25
|
-
\u2022 everything: that comes with the template (${chalk.cyanBright.bold(
|
|
26
|
-
"recommended"
|
|
27
|
-
)})
|
|
28
|
-
\u2022 common: additions to the minimal starters such as releases and tests
|
|
29
|
-
\u2022 minimal: amounts of tooling, essentially opting out of everything
|
|
30
|
-
\u2022 prompt: for which portions to exclude`,
|
|
31
|
-
docsSection: "core",
|
|
32
|
-
type: "string"
|
|
33
|
-
},
|
|
34
|
-
bin: {
|
|
35
|
-
description: `package.json bin value to include for npx-style running.`,
|
|
36
|
-
docsSection: "optional",
|
|
37
|
-
type: "string"
|
|
38
|
-
},
|
|
39
|
-
"create-repository": {
|
|
40
|
-
description: `Whether to create a corresponding repository on github.com
|
|
41
|
-
(if it doesn't yet exist)`,
|
|
42
|
-
docsSection: "core",
|
|
43
|
-
type: "boolean"
|
|
44
|
-
},
|
|
45
|
-
description: {
|
|
46
|
-
description: `Sentence case description of the repository
|
|
47
|
-
(e.g. A quickstart-friendly TypeScript package with lots of great
|
|
48
|
-
repository tooling. \u2728)`,
|
|
49
|
-
docsSection: "core",
|
|
50
|
-
type: "string"
|
|
51
|
-
},
|
|
52
|
-
directory: {
|
|
53
|
-
description: `Directory to create the repository in (by default, the same
|
|
54
|
-
name as the repository)`,
|
|
55
|
-
docsSection: "optional",
|
|
56
|
-
type: "string"
|
|
57
|
-
},
|
|
58
|
-
email: {
|
|
59
|
-
description: `Email address to be listed as the point of contact in docs
|
|
60
|
-
and packages (e.g. example@joshuakgoldberg.com)`,
|
|
61
|
-
docsSection: "optional",
|
|
62
|
-
type: "string"
|
|
63
|
-
},
|
|
64
|
-
"email-github": {
|
|
65
|
-
description: `Optionally, may be provided to use different emails in ${chalk.cyanBright(
|
|
66
|
-
".md"
|
|
67
|
-
)}
|
|
68
|
-
files`,
|
|
69
|
-
docsSection: "optional",
|
|
70
|
-
type: "string"
|
|
71
|
-
},
|
|
72
|
-
"email-npm": {
|
|
73
|
-
description: `Optionally, may be provided to use different emails in
|
|
74
|
-
${chalk.cyanBright("package.json")}`,
|
|
75
|
-
docsSection: "optional",
|
|
76
|
-
type: "string"
|
|
77
|
-
},
|
|
78
|
-
"exclude-all-contributors": {
|
|
79
|
-
description: `Don't add all-contributors to track contributions
|
|
80
|
-
and display them in a README.md table.`,
|
|
81
|
-
docsSection: "opt-out",
|
|
82
|
-
type: "boolean"
|
|
83
|
-
},
|
|
84
|
-
"exclude-compliance": {
|
|
85
|
-
description: `Don't add a GitHub Actions workflow to verify that PRs match
|
|
86
|
-
an expected format.`,
|
|
87
|
-
docsSection: "opt-out",
|
|
88
|
-
type: "boolean"
|
|
89
|
-
},
|
|
90
|
-
"exclude-lint-jsdoc": {
|
|
91
|
-
description: `Don't use eslint-plugin-jsdoc to enforce good practices around
|
|
92
|
-
JSDoc comments.`,
|
|
93
|
-
docsSection: "opt-out",
|
|
94
|
-
type: "boolean"
|
|
95
|
-
},
|
|
96
|
-
"exclude-lint-json": {
|
|
97
|
-
description: `Don't apply linting and sorting to ${chalk.cyanBright(
|
|
98
|
-
"*.json"
|
|
99
|
-
)}, and
|
|
100
|
-
${chalk.cyanBright("*.jsonc")} files.`,
|
|
101
|
-
docsSection: "opt-out",
|
|
102
|
-
type: "boolean"
|
|
103
|
-
},
|
|
104
|
-
"exclude-lint-knip": {
|
|
105
|
-
description: `Don't add Knip to detect unused files, dependencies, and code
|
|
106
|
-
exports.`,
|
|
107
|
-
docsSection: "opt-out",
|
|
108
|
-
type: "boolean"
|
|
109
|
-
},
|
|
110
|
-
"exclude-lint-md": {
|
|
111
|
-
description: `Don't apply linting to ${chalk.cyanBright("*.md")} files.`,
|
|
112
|
-
docsSection: "opt-out",
|
|
113
|
-
type: "boolean"
|
|
114
|
-
},
|
|
115
|
-
"exclude-lint-package-json": {
|
|
116
|
-
description: `Don't add eslint-plugin-package-json to lint for
|
|
117
|
-
package.json correctness.`,
|
|
118
|
-
docsSection: "opt-out",
|
|
119
|
-
type: "boolean"
|
|
120
|
-
},
|
|
121
|
-
"exclude-lint-packages": {
|
|
122
|
-
description: `Don't add a pnpm dedupe workflow to ensure packages
|
|
123
|
-
aren't duplicated unnecessarily.`,
|
|
124
|
-
docsSection: "opt-out",
|
|
125
|
-
type: "boolean"
|
|
126
|
-
},
|
|
127
|
-
"exclude-lint-perfectionist": {
|
|
128
|
-
description: `Don't apply eslint-plugin-perfectionist to ensure
|
|
129
|
-
imports, keys, and so on are in sorted order.`,
|
|
130
|
-
docsSection: "opt-out",
|
|
131
|
-
type: "boolean"
|
|
132
|
-
},
|
|
133
|
-
"exclude-lint-regexp": {
|
|
134
|
-
description: `Don't add eslint-plugin-regexp to enforce good practices around
|
|
135
|
-
regular expressions.`,
|
|
136
|
-
docsSection: "opt-out",
|
|
137
|
-
type: "boolean"
|
|
138
|
-
},
|
|
139
|
-
"exclude-lint-spelling": {
|
|
140
|
-
description: `Don't add cspell to spell check against dictionaries
|
|
141
|
-
of known words.`,
|
|
142
|
-
docsSection: "opt-out",
|
|
143
|
-
type: "boolean"
|
|
144
|
-
},
|
|
145
|
-
"exclude-lint-strict": {
|
|
146
|
-
description: `Don't augment the recommended logical lint rules with
|
|
147
|
-
typescript-eslint's strict config.`,
|
|
148
|
-
docsSection: "opt-out",
|
|
149
|
-
type: "boolean"
|
|
150
|
-
},
|
|
151
|
-
"exclude-lint-stylistic": {
|
|
152
|
-
description: `Don't add stylistic rules such as typescript-eslint's
|
|
153
|
-
stylistic config.`,
|
|
154
|
-
docsSection: "opt-out",
|
|
155
|
-
type: "boolean"
|
|
156
|
-
},
|
|
157
|
-
"exclude-lint-yml": {
|
|
158
|
-
description: `Don't apply linting and sorting to ${chalk.cyanBright(
|
|
159
|
-
"*.yaml"
|
|
160
|
-
)} and ${chalk.cyanBright("*.yml")} files.`,
|
|
161
|
-
docsSection: "opt-out",
|
|
162
|
-
type: "boolean"
|
|
163
|
-
},
|
|
164
|
-
"exclude-releases": {
|
|
165
|
-
description: `Don't add release-it to generate changelogs, package bumps,
|
|
166
|
-
and publishes based on conventional commits.`,
|
|
167
|
-
docsSection: "opt-out",
|
|
168
|
-
type: "boolean"
|
|
169
|
-
},
|
|
170
|
-
"exclude-renovate": {
|
|
171
|
-
description: `Don't add a Renovate config to dependencies up-to-date with
|
|
172
|
-
PRs.`,
|
|
173
|
-
docsSection: "opt-out",
|
|
174
|
-
type: "boolean"
|
|
175
|
-
},
|
|
176
|
-
"exclude-templated-by": {
|
|
177
|
-
description: `Don't add a _"This package was templated with create-typescript-app"_ notice at the end of the README.md.`,
|
|
178
|
-
docsSection: "opt-out",
|
|
179
|
-
type: "boolean"
|
|
180
|
-
},
|
|
181
|
-
"exclude-tests": {
|
|
182
|
-
description: `Don't add Vitest tooling for fast unit tests, configured
|
|
183
|
-
with coverage tracking.`,
|
|
184
|
-
docsSection: "opt-out",
|
|
185
|
-
type: "boolean"
|
|
186
|
-
},
|
|
187
|
-
funding: {
|
|
188
|
-
description: `GitHub organization or username to mention in ${chalk.cyanBright(
|
|
189
|
-
"funding.yml"
|
|
190
|
-
)}
|
|
191
|
-
(by default, owner)`,
|
|
192
|
-
docsSection: "optional",
|
|
193
|
-
type: "string"
|
|
194
|
-
},
|
|
195
|
-
guide: {
|
|
196
|
-
description: `Link to a contribution guide to place at the top of the
|
|
197
|
-
development docs`,
|
|
198
|
-
docsSection: "optional",
|
|
199
|
-
type: "string"
|
|
200
|
-
},
|
|
201
|
-
"guide-title": {
|
|
202
|
-
description: `If ${chalk.cyanBright(
|
|
203
|
-
"--guide"
|
|
204
|
-
)} is provided or detected from an existing
|
|
205
|
-
DEVELOPMENT.md, the text title to place in the guide link`,
|
|
206
|
-
docsSection: "optional",
|
|
207
|
-
type: "string"
|
|
208
|
-
},
|
|
209
|
-
keywords: {
|
|
210
|
-
description: `Any number of keywords to include in ${chalk.cyanBright(
|
|
211
|
-
"package.json"
|
|
212
|
-
)} (by default,
|
|
213
|
-
none). This can be specified any number of times, like
|
|
214
|
-
${chalk.cyanBright('--keywords apple --keywords "banana cherry"')}`,
|
|
215
|
-
docsSection: "optional",
|
|
216
|
-
multiple: true,
|
|
217
|
-
type: "string"
|
|
218
|
-
},
|
|
219
|
-
logo: {
|
|
220
|
-
description: `Local image file in the repository to display near the top of
|
|
221
|
-
the README.md as a logo`,
|
|
222
|
-
docsSection: "optional",
|
|
223
|
-
type: "string"
|
|
224
|
-
},
|
|
225
|
-
"logo-alt": {
|
|
226
|
-
description: `If ${chalk.cyanBright(
|
|
227
|
-
"--logo"
|
|
228
|
-
)} is provided or detected from an existing README.md,
|
|
229
|
-
alt text that describes the image will be prompted for if not provided`,
|
|
230
|
-
docsSection: "optional",
|
|
231
|
-
type: "string"
|
|
232
|
-
},
|
|
233
|
-
"logo-height": {
|
|
234
|
-
description: `If ${chalk.cyanBright(
|
|
235
|
-
"--logo"
|
|
236
|
-
)} is provided or detected from an existing README.md,
|
|
237
|
-
an explicit height style`,
|
|
238
|
-
docsSection: "optional",
|
|
239
|
-
type: "string"
|
|
240
|
-
},
|
|
241
|
-
"logo-width": {
|
|
242
|
-
description: `If ${chalk.cyanBright(
|
|
243
|
-
"--logo"
|
|
244
|
-
)} is provided or detected from an existing README.md,
|
|
245
|
-
an explicit width style`,
|
|
246
|
-
docsSection: "optional",
|
|
247
|
-
type: "string"
|
|
248
|
-
},
|
|
249
|
-
mode: {
|
|
250
|
-
description: `Whether to:
|
|
251
|
-
\u2022 create: a new repository in a child directory
|
|
252
|
-
\u2022 initialize: a freshly repository in the current directory
|
|
253
|
-
\u2022 migrate: an existing repository in the current directory`,
|
|
254
|
-
docsSection: "core",
|
|
255
|
-
type: "string"
|
|
256
|
-
},
|
|
257
|
-
offline: {
|
|
258
|
-
description: `You can run ${chalk.cyanBright(
|
|
259
|
-
"create-typescript-app"
|
|
260
|
-
)} in an "offline" mode.
|
|
261
|
-
Doing so will:
|
|
262
|
-
\u2022 Enable ${chalk.cyanBright(
|
|
263
|
-
"--exclude-all-contributors-api"
|
|
264
|
-
)} and ${chalk.cyanBright("--skip-github-api")}
|
|
265
|
-
\u2022 Skip network calls when setting up contributors
|
|
266
|
-
\u2022 Run pnpm commands with pnpm's ${chalk.cyanBright("--offline")} mode`,
|
|
267
|
-
docsSection: "offline",
|
|
268
|
-
type: "boolean"
|
|
269
|
-
},
|
|
270
|
-
owner: {
|
|
271
|
-
description: `GitHub organization or user the repository is underneath
|
|
272
|
-
(e.g. JoshuaKGoldberg)`,
|
|
273
|
-
docsSection: "core",
|
|
274
|
-
type: "string"
|
|
275
|
-
},
|
|
276
|
-
"preserve-generated-from": {
|
|
277
|
-
description: `Whether to keep the GitHub repository generated from
|
|
278
|
-
notice (by default, false)`,
|
|
279
|
-
docsSection: "optional",
|
|
280
|
-
type: "boolean"
|
|
281
|
-
},
|
|
282
|
-
repository: {
|
|
283
|
-
description: `The kebab-case name of the repository
|
|
284
|
-
(e.g. create-typescript-app)`,
|
|
285
|
-
docsSection: "core",
|
|
286
|
-
type: "string"
|
|
287
|
-
},
|
|
288
|
-
"skip-all-contributors-api": {
|
|
289
|
-
description: `Skips network calls that fetch all-contributors data from
|
|
290
|
-
GitHub. This flag does nothing if ${chalk.cyanBright(
|
|
291
|
-
"--exclude-all-contributors"
|
|
292
|
-
)} was specified.`,
|
|
293
|
-
docsSection: "skip-net",
|
|
294
|
-
type: "boolean"
|
|
295
|
-
},
|
|
296
|
-
"skip-github-api": {
|
|
297
|
-
description: `Skips calling to GitHub APIs.`,
|
|
298
|
-
docsSection: "skip-net",
|
|
299
|
-
type: "boolean"
|
|
300
|
-
},
|
|
301
|
-
"skip-install": {
|
|
302
|
-
description: `Skips installing all the new template packages with pnpm.`,
|
|
303
|
-
docsSection: "skip-net",
|
|
304
|
-
type: "boolean"
|
|
305
|
-
},
|
|
306
|
-
"skip-removal": {
|
|
307
|
-
description: `Skips removing setup docs and scripts, including this ${chalk.cyanBright(
|
|
308
|
-
"docs/"
|
|
309
|
-
)}
|
|
310
|
-
directory`,
|
|
311
|
-
docsSection: "skip-disk",
|
|
312
|
-
type: "boolean"
|
|
313
|
-
},
|
|
314
|
-
"skip-restore": {
|
|
315
|
-
description: `Skips the prompt offering to restore the repository if an
|
|
316
|
-
error occurs during setup`,
|
|
317
|
-
docsSection: "skip-disk",
|
|
318
|
-
type: "boolean"
|
|
319
|
-
},
|
|
320
|
-
"skip-uninstall": {
|
|
321
|
-
description: `Skips uninstalling packages only used for setup scripts`,
|
|
322
|
-
docsSection: "skip-disk",
|
|
323
|
-
type: "boolean"
|
|
324
|
-
},
|
|
325
|
-
title: {
|
|
326
|
-
description: `Title Case title for the repository to be used in
|
|
327
|
-
documentation (e.g. Create TypeScript App)`,
|
|
328
|
-
docsSection: "core",
|
|
329
|
-
type: "string"
|
|
330
|
-
}
|
|
331
|
-
};
|
|
332
|
-
export {
|
|
333
|
-
allArgOptions
|
|
334
|
-
};
|
|
335
|
-
//# sourceMappingURL=args.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/shared/options/args.ts"],"sourcesContent":["import chalk from \"chalk\";\n\nexport const allArgOptions = {\n\taccess: {\n\t\tdescription: `(${chalk.cyanBright(\n\t\t\t'\"public\" | \"restricted\"',\n\t\t)}): Which ${chalk.cyanBright(\"npm publish --access\")} to \n release npm packages with (by default, \"public\")`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\tauthor: {\n\t\tdescription: `Username on npm to publish packages under (by \n default, an existing npm author, or the currently logged in npm user, or \n ${chalk.cyanBright(\"owner.toLowerCase()\")})`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\tauto: {\n\t\tdescription: `Whether to infer all options from files on disk.`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"boolean\",\n\t},\n\tbase: {\n\t\tdescription: `Whether to scaffold the repository with:\n • everything: that comes with the template (${chalk.cyanBright.bold(\n\t\t\"recommended\",\n\t)})\n • common: additions to the minimal starters such as releases and tests\n • minimal: amounts of tooling, essentially opting out of everything\n • prompt: for which portions to exclude`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"string\",\n\t},\n\tbin: {\n\t\tdescription: `package.json bin value to include for npx-style running.`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"create-repository\": {\n\t\tdescription: `Whether to create a corresponding repository on github.com \n (if it doesn't yet exist)`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"boolean\",\n\t},\n\tdescription: {\n\t\tdescription: `Sentence case description of the repository \n (e.g. A quickstart-friendly TypeScript package with lots of great \n repository tooling. ✨)`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"string\",\n\t},\n\tdirectory: {\n\t\tdescription: `Directory to create the repository in (by default, the same \n name as the repository)`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\temail: {\n\t\tdescription: `Email address to be listed as the point of contact in docs \n and packages (e.g. example@joshuakgoldberg.com)`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"email-github\": {\n\t\tdescription: `Optionally, may be provided to use different emails in ${chalk.cyanBright(\n\t\t\t\".md\",\n\t\t)} \n files`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"email-npm\": {\n\t\tdescription: `Optionally, may be provided to use different emails in \n ${chalk.cyanBright(\"package.json\")}`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"exclude-all-contributors\": {\n\t\tdescription: `Don't add all-contributors to track contributions \n and display them in a README.md table.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-compliance\": {\n\t\tdescription: `Don't add a GitHub Actions workflow to verify that PRs match \n an expected format.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-jsdoc\": {\n\t\tdescription: `Don't use eslint-plugin-jsdoc to enforce good practices around \n JSDoc comments.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-json\": {\n\t\tdescription: `Don't apply linting and sorting to ${chalk.cyanBright(\n\t\t\t\"*.json\",\n\t\t)}, and \n ${chalk.cyanBright(\"*.jsonc\")} files.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-knip\": {\n\t\tdescription: `Don't add Knip to detect unused files, dependencies, and code \n exports.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-md\": {\n\t\tdescription: `Don't apply linting to ${chalk.cyanBright(\"*.md\")} files.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-package-json\": {\n\t\tdescription: `Don't add eslint-plugin-package-json to lint for \n package.json correctness.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-packages\": {\n\t\tdescription: `Don't add a pnpm dedupe workflow to ensure packages \n aren't duplicated unnecessarily.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-perfectionist\": {\n\t\tdescription: `Don't apply eslint-plugin-perfectionist to ensure \n imports, keys, and so on are in sorted order.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-regexp\": {\n\t\tdescription: `Don't add eslint-plugin-regexp to enforce good practices around \n regular expressions.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-spelling\": {\n\t\tdescription: `Don't add cspell to spell check against dictionaries \n of known words.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-strict\": {\n\t\tdescription: `Don't augment the recommended logical lint rules with \n typescript-eslint's strict config.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-stylistic\": {\n\t\tdescription: `Don't add stylistic rules such as typescript-eslint's \n stylistic config.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-lint-yml\": {\n\t\tdescription: `Don't apply linting and sorting to ${chalk.cyanBright(\n\t\t\t\"*.yaml\",\n\t\t)} and ${chalk.cyanBright(\"*.yml\")} files.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-releases\": {\n\t\tdescription: `Don't add release-it to generate changelogs, package bumps, \n and publishes based on conventional commits.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-renovate\": {\n\t\tdescription: `Don't add a Renovate config to dependencies up-to-date with \n PRs.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-templated-by\": {\n\t\tdescription: `Don't add a _\"This package was templated with create-typescript-app\"_ notice at the end of the README.md.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\t\"exclude-tests\": {\n\t\tdescription: `Don't add Vitest tooling for fast unit tests, configured \n with coverage tracking.`,\n\t\tdocsSection: \"opt-out\",\n\t\ttype: \"boolean\",\n\t},\n\tfunding: {\n\t\tdescription: `GitHub organization or username to mention in ${chalk.cyanBright(\n\t\t\t\"funding.yml\",\n\t\t)} \n (by default, owner)`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\tguide: {\n\t\tdescription: `Link to a contribution guide to place at the top of the \n development docs`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"guide-title\": {\n\t\tdescription: `If ${chalk.cyanBright(\n\t\t\t\"--guide\",\n\t\t)} is provided or detected from an existing \n DEVELOPMENT.md, the text title to place in the guide link`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\tkeywords: {\n\t\tdescription: `Any number of keywords to include in ${chalk.cyanBright(\n\t\t\t\"package.json\",\n\t\t)} (by default, \n none). This can be specified any number of times, like \n ${chalk.cyanBright('--keywords apple --keywords \"banana cherry\"')}`,\n\t\tdocsSection: \"optional\",\n\t\tmultiple: true,\n\t\ttype: \"string\",\n\t},\n\tlogo: {\n\t\tdescription: `Local image file in the repository to display near the top of \n the README.md as a logo`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"logo-alt\": {\n\t\tdescription: `If ${chalk.cyanBright(\n\t\t\t\"--logo\",\n\t\t)} is provided or detected from an existing README.md, \n alt text that describes the image will be prompted for if not provided`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"logo-height\": {\n\t\tdescription: `If ${chalk.cyanBright(\n\t\t\t\"--logo\",\n\t\t)} is provided or detected from an existing README.md, \n an explicit height style`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\t\"logo-width\": {\n\t\tdescription: `If ${chalk.cyanBright(\n\t\t\t\"--logo\",\n\t\t)} is provided or detected from an existing README.md, \n an explicit width style`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"string\",\n\t},\n\tmode: {\n\t\tdescription: `Whether to:\n • create: a new repository in a child directory\n • initialize: a freshly repository in the current directory\n • migrate: an existing repository in the current directory`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"string\",\n\t},\n\toffline: {\n\t\tdescription: `You can run ${chalk.cyanBright(\n\t\t\t\"create-typescript-app\",\n\t\t)} in an \"offline\" mode. \n Doing so will:\n • Enable ${chalk.cyanBright(\n\t\t\"--exclude-all-contributors-api\",\n\t)} and ${chalk.cyanBright(\"--skip-github-api\")}\n • Skip network calls when setting up contributors\n • Run pnpm commands with pnpm's ${chalk.cyanBright(\"--offline\")} mode`,\n\t\tdocsSection: \"offline\",\n\t\ttype: \"boolean\",\n\t},\n\towner: {\n\t\tdescription: `GitHub organization or user the repository is underneath \n (e.g. JoshuaKGoldberg)`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"string\",\n\t},\n\t\"preserve-generated-from\": {\n\t\tdescription: `Whether to keep the GitHub repository generated from \n notice (by default, false)`,\n\t\tdocsSection: \"optional\",\n\t\ttype: \"boolean\",\n\t},\n\trepository: {\n\t\tdescription: `The kebab-case name of the repository \n (e.g. create-typescript-app)`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"string\",\n\t},\n\t\"skip-all-contributors-api\": {\n\t\tdescription: `Skips network calls that fetch all-contributors data from\n GitHub. This flag does nothing if ${chalk.cyanBright(\n\t\t\"--exclude-all-contributors\",\n\t)} was specified.`,\n\t\tdocsSection: \"skip-net\",\n\t\ttype: \"boolean\",\n\t},\n\t\"skip-github-api\": {\n\t\tdescription: `Skips calling to GitHub APIs.`,\n\t\tdocsSection: \"skip-net\",\n\t\ttype: \"boolean\",\n\t},\n\t\"skip-install\": {\n\t\tdescription: `Skips installing all the new template packages with pnpm.`,\n\t\tdocsSection: \"skip-net\",\n\t\ttype: \"boolean\",\n\t},\n\t\"skip-removal\": {\n\t\tdescription: `Skips removing setup docs and scripts, including this ${chalk.cyanBright(\n\t\t\t\"docs/\",\n\t\t)} \n directory`,\n\t\tdocsSection: \"skip-disk\",\n\t\ttype: \"boolean\",\n\t},\n\t\"skip-restore\": {\n\t\tdescription: `Skips the prompt offering to restore the repository if an \n error occurs during setup`,\n\t\tdocsSection: \"skip-disk\",\n\t\ttype: \"boolean\",\n\t},\n\t\"skip-uninstall\": {\n\t\tdescription: `Skips uninstalling packages only used for setup scripts`,\n\t\tdocsSection: \"skip-disk\",\n\t\ttype: \"boolean\",\n\t},\n\ttitle: {\n\t\tdescription: `Title Case title for the repository to be used in \n documentation (e.g. Create TypeScript App)`,\n\t\tdocsSection: \"core\",\n\t\ttype: \"string\",\n\t},\n} as const;\n"],"mappings":"AAAA,OAAO,WAAW;AAEX,MAAM,gBAAgB;AAAA,EAC5B,QAAQ;AAAA,IACP,aAAa,IAAI,MAAM;AAAA,MACtB;AAAA,IACD,CAAC,YAAY,MAAM,WAAW,sB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A;AAAA,IAEb,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,kBAAkB;AAAA,IACjB,aAAa;AAAA,IACb,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AAAA,EACA,OAAO;AAAA,IACN,aAAa;AAAA;AAAA,IAEb,aAAa;AAAA,IACb,MAAM;AAAA,EACP;AACD;","names":[]}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import * as prompts from "@clack/prompts";
|
|
2
|
-
import chalk from "chalk";
|
|
3
|
-
import { filterPromptCancel } from "../prompts.js";
|
|
4
|
-
import {
|
|
5
|
-
exclusionDescriptions,
|
|
6
|
-
exclusionKeys,
|
|
7
|
-
getExclusions
|
|
8
|
-
} from "./exclusionKeys.js";
|
|
9
|
-
async function augmentOptionsWithExcludes(options) {
|
|
10
|
-
if (Object.keys(options).some(
|
|
11
|
-
(key) => key in exclusionDescriptions && options[key] !== void 0
|
|
12
|
-
)) {
|
|
13
|
-
return options;
|
|
14
|
-
}
|
|
15
|
-
const base = options.base ?? filterPromptCancel(
|
|
16
|
-
await prompts.select({
|
|
17
|
-
initialValue: "common",
|
|
18
|
-
message: `How much tooling would you like the template to set up for you?`,
|
|
19
|
-
options: [
|
|
20
|
-
{
|
|
21
|
-
label: makeLabel(
|
|
22
|
-
"everything",
|
|
23
|
-
"The most comprehensive tooling imaginable: sorting, spellchecking, and more!"
|
|
24
|
-
),
|
|
25
|
-
value: "everything"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
hint: "recommended",
|
|
29
|
-
label: makeLabel(
|
|
30
|
-
"common",
|
|
31
|
-
"Bare starters plus testing and automation for all-contributors and releases."
|
|
32
|
-
),
|
|
33
|
-
value: "common"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
label: makeLabel(
|
|
37
|
-
"minimal",
|
|
38
|
-
"Just bare starter tooling: building, formatting, linting, and type checking."
|
|
39
|
-
),
|
|
40
|
-
value: "minimal"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
label: makeLabel("prompt", "(allow me to customize)"),
|
|
44
|
-
value: "prompt"
|
|
45
|
-
}
|
|
46
|
-
]
|
|
47
|
-
})
|
|
48
|
-
);
|
|
49
|
-
switch (base) {
|
|
50
|
-
case "common":
|
|
51
|
-
case "everything":
|
|
52
|
-
case "minimal":
|
|
53
|
-
return {
|
|
54
|
-
...options,
|
|
55
|
-
base,
|
|
56
|
-
...getExclusions(options, base)
|
|
57
|
-
};
|
|
58
|
-
case "prompt": {
|
|
59
|
-
const exclusionsNotEnabled = new Set(
|
|
60
|
-
filterPromptCancel(
|
|
61
|
-
await prompts.multiselect({
|
|
62
|
-
initialValues: exclusionKeys,
|
|
63
|
-
message: "Select the tooling portions you'd like to remove. All are enabled by default. Press \u2191 or \u2193 to change the selected item, then space to select.",
|
|
64
|
-
options: Object.entries(exclusionDescriptions).map(
|
|
65
|
-
([value, { hint, label }]) => ({
|
|
66
|
-
hint,
|
|
67
|
-
label,
|
|
68
|
-
value
|
|
69
|
-
})
|
|
70
|
-
)
|
|
71
|
-
})
|
|
72
|
-
)
|
|
73
|
-
);
|
|
74
|
-
return {
|
|
75
|
-
...options,
|
|
76
|
-
base,
|
|
77
|
-
...Object.fromEntries(
|
|
78
|
-
exclusionKeys.map(
|
|
79
|
-
(exclusionKey) => [exclusionKey, !exclusionsNotEnabled.has(exclusionKey)]
|
|
80
|
-
)
|
|
81
|
-
)
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
case void 0:
|
|
85
|
-
return void 0;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
function makeLabel(label, message) {
|
|
89
|
-
return [chalk.bold(label), message].join(" ");
|
|
90
|
-
}
|
|
91
|
-
export {
|
|
92
|
-
augmentOptionsWithExcludes
|
|
93
|
-
};
|
|
94
|
-
//# sourceMappingURL=augmentOptionsWithExcludes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/shared/options/augmentOptionsWithExcludes.ts"],"sourcesContent":["import * as prompts from \"@clack/prompts\";\nimport chalk from \"chalk\";\n\nimport { filterPromptCancel } from \"../prompts.js\";\nimport { Options, OptionsBase } from \"../types.js\";\nimport {\n\texclusionDescriptions,\n\tExclusionKey,\n\texclusionKeys,\n\tgetExclusions,\n} from \"./exclusionKeys.js\";\n\nexport async function augmentOptionsWithExcludes(\n\toptions: Options,\n): Promise<Options | undefined> {\n\tif (\n\t\tObject.keys(options).some(\n\t\t\t(key) =>\n\t\t\t\tkey in exclusionDescriptions &&\n\t\t\t\toptions[key as keyof typeof options] !== undefined,\n\t\t)\n\t) {\n\t\treturn options;\n\t}\n\n\tconst base =\n\t\toptions.base ??\n\t\tfilterPromptCancel<OptionsBase | symbol>(\n\t\t\tawait prompts.select({\n\t\t\t\tinitialValue: \"common\" as OptionsBase,\n\t\t\t\tmessage: `How much tooling would you like the template to set up for you?`,\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: makeLabel(\n\t\t\t\t\t\t\t\"everything\",\n\t\t\t\t\t\t\t\"The most comprehensive tooling imaginable: sorting, spellchecking, and more!\",\n\t\t\t\t\t\t),\n\t\t\t\t\t\tvalue: \"everything\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\thint: \"recommended\",\n\t\t\t\t\t\tlabel: makeLabel(\n\t\t\t\t\t\t\t\"common\",\n\t\t\t\t\t\t\t\"Bare starters plus testing and automation for all-contributors and releases.\",\n\t\t\t\t\t\t),\n\t\t\t\t\t\tvalue: \"common\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: makeLabel(\n\t\t\t\t\t\t\t\"minimal\",\n\t\t\t\t\t\t\t\"Just bare starter tooling: building, formatting, linting, and type checking.\",\n\t\t\t\t\t\t),\n\t\t\t\t\t\tvalue: \"minimal\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: makeLabel(\"prompt\", \"(allow me to customize)\"),\n\t\t\t\t\t\tvalue: \"prompt\",\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t);\n\n\tswitch (base) {\n\t\tcase \"common\":\n\t\tcase \"everything\":\n\t\tcase \"minimal\":\n\t\t\treturn {\n\t\t\t\t...options,\n\t\t\t\tbase,\n\t\t\t\t...getExclusions(options, base),\n\t\t\t};\n\t\tcase \"prompt\": {\n\t\t\tconst exclusionsNotEnabled = new Set(\n\t\t\t\tfilterPromptCancel(\n\t\t\t\t\tawait prompts.multiselect({\n\t\t\t\t\t\tinitialValues: exclusionKeys,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t\"Select the tooling portions you'd like to remove. All are enabled by default. Press ↑ or ↓ to change the selected item, then space to select.\",\n\t\t\t\t\t\toptions: Object.entries(exclusionDescriptions).map(\n\t\t\t\t\t\t\t([value, { hint, label }]) => ({\n\t\t\t\t\t\t\t\thint,\n\t\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\t\tvalue: value as ExclusionKey,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\t...options,\n\t\t\t\tbase,\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\texclusionKeys.map(\n\t\t\t\t\t\t(exclusionKey) =>\n\t\t\t\t\t\t\t[exclusionKey, !exclusionsNotEnabled.has(exclusionKey)] as const,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\t\tcase undefined:\n\t\t\treturn undefined;\n\t}\n}\n\nfunction makeLabel(label: string, message: string) {\n\treturn [chalk.bold(label), message].join(\"\\t \");\n}\n"],"mappings":"AAAA,YAAY,aAAa;AACzB,OAAO,WAAW;AAElB,SAAS,0BAA0B;AAEnC;AAAA,EACC;AAAA,EAEA;AAAA,EACA;AAAA,OACM;AAEP,eAAsB,2BACrB,SAC+B;AAC/B,MACC,OAAO,KAAK,OAAO,EAAE;A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AAAA,UACxD;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA,IACA,KAAK;AACJ,aAAO;AAAA,EACT;AACD;AAEA,SAAS,UAAU,OAAe,SAAiB;AAClD,SAAO,CAAC,MAAM,KAAK,KAAK,GAAG,OAAO,EAAE,KAAK,IAAK;AAC/C;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/shared/options/createOptionDefaults/getUsageFromReadme.ts"],"sourcesContent":["const startDevelopment = \"## Development\";\nconst startUsage = \"## Usage\";\n\nexport function getUsageFromReadme(readme: string) {\n\tconst indexOfUsage = readme.indexOf(startUsage);\n\tif (indexOfUsage === -1) {\n\t\treturn undefined;\n\t}\n\n\tconst indexOfDevelopment = readme.indexOf(\n\t\tstartDevelopment,\n\t\tindexOfUsage + startUsage.length,\n\t);\n\tif (indexOfDevelopment === -1) {\n\t\treturn undefined;\n\t}\n\n\tconst usage = readme\n\t\t.slice(indexOfUsage + startUsage.length, indexOfDevelopment)\n\t\t.trim();\n\n\treturn usage ? usage : undefined;\n}\n"],"mappings":"AAAA,MAAM,mBAAmB;AACzB,MAAM,aAAa;AAEZ,SAAS,mBAAmB,QAAgB;AAClD,QAAM,eAAe,OAAO,QAAQ,UAAU;AAC9C,MAAI,iBAAiB,IAAI;AACxB,WAAO;AAAA,EACR;AAEA,QAAM,qBAAqB,OAAO;AAAA,IACjC;AAAA,IACA,eAAe,WAAW;AAAA,EAC3B;AACA,MAAI,uBAAuB,IAAI;AAC9B,WAAO;AAAA,EACR;AAEA,QAAM,QAAQ,OACZ,MAAM,eAAe,WAAW,QAAQ,kBAAkB,EAC1D,KAAK;AAEP,SAAO,QAAQ,QAAQ;AACxB;","names":[]}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { PromptedOptions } from '../../types.js';
|
|
2
|
-
import { readGuide } from './readGuide.js';
|
|
3
|
-
import 'zod';
|
|
4
|
-
import '../../codes.js';
|
|
5
|
-
|
|
6
|
-
declare function createOptionDefaults(promptedOptions?: PromptedOptions): {
|
|
7
|
-
logo: () => Promise<{
|
|
8
|
-
height?: number;
|
|
9
|
-
width?: number;
|
|
10
|
-
alt: string;
|
|
11
|
-
src: string;
|
|
12
|
-
} | undefined>;
|
|
13
|
-
title: () => Promise<string | undefined>;
|
|
14
|
-
usage: () => Promise<string>;
|
|
15
|
-
author: () => Promise<string | undefined>;
|
|
16
|
-
bin: () => Promise<string | undefined>;
|
|
17
|
-
description: () => Promise<string | undefined>;
|
|
18
|
-
email: () => Promise<{
|
|
19
|
-
github: string;
|
|
20
|
-
npm: string;
|
|
21
|
-
} | undefined>;
|
|
22
|
-
funding: () => Promise<string | undefined>;
|
|
23
|
-
guide: typeof readGuide;
|
|
24
|
-
owner: () => Promise<string | undefined>;
|
|
25
|
-
repository: () => Promise<string | undefined>;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export { createOptionDefaults };
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { $ } from "execa";
|
|
2
|
-
import gitRemoteOriginUrl from "git-remote-origin-url";
|
|
3
|
-
import gitUrlParse from "git-url-parse";
|
|
4
|
-
import lazyValue from "lazy-value";
|
|
5
|
-
import * as fs from "node:fs/promises";
|
|
6
|
-
import npmUser from "npm-user";
|
|
7
|
-
import { readDescription } from "../../../next/readDescription.js";
|
|
8
|
-
import { readPackageData } from "../../packages.js";
|
|
9
|
-
import { readFileSafe } from "../../readFileSafe.js";
|
|
10
|
-
import { tryCatchAsync } from "../../tryCatchAsync.js";
|
|
11
|
-
import { tryCatchLazyValueAsync } from "../../tryCatchLazyValueAsync.js";
|
|
12
|
-
import { parsePackageAuthor } from "./parsePackageAuthor.js";
|
|
13
|
-
import { readDefaultsFromReadme } from "./readDefaultsFromReadme.js";
|
|
14
|
-
import { readEmails } from "./readEmails.js";
|
|
15
|
-
import { readGuide } from "./readGuide.js";
|
|
16
|
-
function createOptionDefaults(promptedOptions) {
|
|
17
|
-
const gitDefaults = tryCatchLazyValueAsync(
|
|
18
|
-
async () => gitUrlParse(await gitRemoteOriginUrl())
|
|
19
|
-
);
|
|
20
|
-
const npmDefaults = tryCatchLazyValueAsync(async () => {
|
|
21
|
-
const whoami = (await $`npm whoami`).stdout;
|
|
22
|
-
return whoami ? await npmUser(whoami) : void 0;
|
|
23
|
-
});
|
|
24
|
-
const packageData = lazyValue(readPackageData);
|
|
25
|
-
const packageAuthor = lazyValue(
|
|
26
|
-
async () => parsePackageAuthor(await packageData())
|
|
27
|
-
);
|
|
28
|
-
const readme = lazyValue(async () => await readFileSafe("README.md", ""));
|
|
29
|
-
return {
|
|
30
|
-
author: async () => (await packageAuthor()).author ?? (await npmDefaults())?.name,
|
|
31
|
-
bin: async () => (await packageData()).bin,
|
|
32
|
-
description: async () => await readDescription(packageData, readme),
|
|
33
|
-
email: async () => readEmails(npmDefaults, packageAuthor),
|
|
34
|
-
funding: async () => await tryCatchAsync(
|
|
35
|
-
async () => (await fs.readFile(".github/FUNDING.yml")).toString().split(":")[1]?.trim()
|
|
36
|
-
),
|
|
37
|
-
guide: readGuide,
|
|
38
|
-
owner: async () => (await gitDefaults())?.organization ?? (await packageAuthor()).author,
|
|
39
|
-
repository: async () => promptedOptions?.repository ?? (await gitDefaults())?.name ?? (await packageData()).name ?? promptedOptions?.directory,
|
|
40
|
-
...readDefaultsFromReadme(
|
|
41
|
-
readme,
|
|
42
|
-
() => Promise.resolve(promptedOptions?.repository)
|
|
43
|
-
)
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
export {
|
|
47
|
-
createOptionDefaults
|
|
48
|
-
};
|
|
49
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/shared/options/createOptionDefaults/index.ts"],"sourcesContent":["import { $ } from \"execa\";\nimport gitRemoteOriginUrl from \"git-remote-origin-url\";\nimport gitUrlParse from \"git-url-parse\";\nimport lazyValue from \"lazy-value\";\nimport * as fs from \"node:fs/promises\";\nimport npmUser from \"npm-user\";\n\nimport { readDescription } from \"../../../next/readDescription.js\";\nimport { readPackageData } from \"../../packages.js\";\nimport { readFileSafe } from \"../../readFileSafe.js\";\nimport { tryCatchAsync } from \"../../tryCatchAsync.js\";\nimport { tryCatchLazyValueAsync } from \"../../tryCatchLazyValueAsync.js\";\nimport { PromptedOptions } from \"../../types.js\";\nimport { parsePackageAuthor } from \"./parsePackageAuthor.js\";\nimport { readDefaultsFromReadme } from \"./readDefaultsFromReadme.js\";\nimport { readEmails } from \"./readEmails.js\";\nimport { readGuide } from \"./readGuide.js\";\n\nexport function createOptionDefaults(promptedOptions?: PromptedOptions) {\n\tconst gitDefaults = tryCatchLazyValueAsync(async () =>\n\t\tgitUrlParse(await gitRemoteOriginUrl()),\n\t);\n\n\tconst npmDefaults = tryCatchLazyValueAsync(async () => {\n\t\tconst whoami = (await $`npm whoami`).stdout;\n\t\treturn whoami ? await npmUser(whoami) : undefined;\n\t});\n\n\tconst packageData = lazyValue(readPackageData);\n\tconst packageAuthor = lazyValue(async () =>\n\t\tparsePackageAuthor(await packageData()),\n\t);\n\n\tconst readme = lazyValue(async () => await readFileSafe(\"README.md\", \"\"));\n\n\treturn {\n\t\tauthor: async () =>\n\t\t\t(await packageAuthor()).author ?? (await npmDefaults())?.name,\n\t\tbin: async () => (await packageData()).bin,\n\t\tdescription: async () => await readDescription(packageData, readme),\n\t\temail: async () => readEmails(npmDefaults, packageAuthor),\n\t\tfunding: async () =>\n\t\t\tawait tryCatchAsync(async () =>\n\t\t\t\t(await fs.readFile(\".github/FUNDING.yml\"))\n\t\t\t\t\t.toString()\n\t\t\t\t\t.split(\":\")[1]\n\t\t\t\t\t?.trim(),\n\t\t\t),\n\t\tguide: readGuide,\n\t\towner: async () =>\n\t\t\t(await gitDefaults())?.organization ?? (await packageAuthor()).author,\n\t\trepository: async () =>\n\t\t\tpromptedOptions?.repository ??\n\t\t\t(await gitDefaults())?.name ??\n\t\t\t(await packageData()).name ??\n\t\t\tprom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Ac,GAAG;AAAA,IAChE,YAAY,YACX,iBAAiB,eAChB,MAAM,YAAY,IAAI,SACtB,MAAM,YAAY,GAAG,QACtB,iBAAiB;AAAA,IAClB,GAAG;AAAA,MAAuB;AAAA,MAAQ,MACjC,QAAQ,QAAQ,iBAAiB,UAAU;AAAA,IAC5C;AAAA,EACD;AACD;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/shared/options/createOptionDefaults/parsePackageAuthor.ts"],"sourcesContent":["import parse from \"parse-author\";\n\nimport { PartialPackageData } from \"../../types.js\";\n\nexport function parsePackageAuthor(packageData: PartialPackageData) {\n\tlet packageAuthor: string | undefined;\n\tlet packageEmail: string | undefined;\n\n\tif (typeof packageData.author === \"string\") {\n\t\tconst parsedAuthor = parse(packageData.author);\n\t\tpackageAuthor = parsedAuthor.name;\n\t\tpackageEmail = parsedAuthor.email;\n\t} else if (packageData.author) {\n\t\tpackageAuthor = packageData.author.name;\n\t\tpackageEmail = packageData.author.email;\n\t}\n\n\treturn {\n\t\tauthor: packageAuthor,\n\t\temail: packageEmail,\n\t};\n}\n"],"mappings":"AAAA,OAAO,WAAW;AAIX,SAAS,mBAAmB,aAAiC;AACnE,MAAI;AACJ,MAAI;AAEJ,MAAI,OAAO,YAAY,WAAW,UAAU;AAC3C,UAAM,eAAe,MAAM,YAAY,MAAM;AAC7C,oBAAgB,aAAa;AAC7B,mBAAe,aAAa;AAAA,EAC7B,WAAW,YAAY,QAAQ;AAC9B,oBAAgB,YAAY,OAAO;AACnC,mBAAe,YAAY,OAAO;AAAA,EACnC;AAEA,SAAO;AAAA,IACN,QAAQ;AAAA,IACR,OAAO;AAAA,EACR;AACD;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/shared/options/createOptionDefaults/readDefaultsFromReadme.ts"],"sourcesContent":["import lazyValue from \"lazy-value\";\nimport { titleCase } from \"title-case\";\n\nimport { readLogoSizing } from \"../readLogoSizing.js\";\nimport { getUsageFromReadme } from \"./getUsageFromReadme.js\";\n\nexport function readDefaultsFromReadme(\n\treadme: () => Promise<string>,\n\trepository: () => Promise<string | undefined>,\n) {\n\tconst imageTag = lazyValue(\n\t\tasync () => /\\n<img.+src=.+>/.exec(await readme())?.[0],\n\t);\n\n\treturn {\n\t\tlogo: async () => {\n\t\t\tconst tag = await imageTag();\n\n\t\t\tif (!tag) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tconst src = /src\\s*=(.+)['\"/]>/\n\t\t\t\t.exec(tag)?.[1]\n\t\t\t\t?.replaceAll(/^['\"]|['\"]$/g, \"\");\n\n\t\t\tif (!src) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\talt: /alt=['\"](.+)['\"]\\s*src=/.exec(tag)?.[1] ?? \"Project logo\",\n\t\t\t\tsrc,\n\t\t\t\t...readLogoSizing(src),\n\t\t\t};\n\t\t},\n\t\ttitle: async () => {\n\t\t\tconst text = await readme();\n\t\t\tconst fromText = (/^<h1\\s+align=\"center\">(.+)<\\/h1>/.exec(text) ??\n\t\t\t\t/^# (.+)/.exec(text))?.[1];\n\t\t\tif (fromText) {\n\t\t\t\treturn fromText;\n\t\t\t}\n\n\t\t\tconst repositoryValue = await repository();\n\n\t\t\treturn (\n\t\t\t\trepositoryValue &&\n\t\t\t\ttitleCase(repositoryValue)\n\t\t\t\t\t.replaceAll(\"Typescript\", \"TypeScript\")\n\t\t\t\t\t.replaceAll(\"-\", \" \")\n\t\t\t);\n\t\t},\n\n\t\tusage: async () => {\n\t\t\treturn (\n\t\t\t\tgetUsageFromReadme(await readme()) ??\n\t\t\t\t`\\`\\`\\`shell\nnpm i ${await repository()}\n\\`\\`\\`\n\\`\\`\\`ts\nimport { greet } from \"${await repository()}\";\n\ngreet(\"Hello, world! 💖\");\n\\`\\`\\``\n\t\t\t);\n\t\t},\n\t};\n}\n"],"mappings":"AAAA,OAAO,eAAe;AACtB,SAAS,iBAAiB;AAE1B,SAAS,sBAAsB;AAC/B,SAAS,0BAA0B;AAE5B,SAAS,uBACf,QACA,YACC;AACD,QAAM,WAAW;AAAA,IAChB,YAAY,kBAAkB,KAAK,MAAM,OAAO,CAAC,IAAI,CAAC;AAAA,EACvD;AAEA,SAAO;AAAA,IACN,MAAM,YAAY;AACjB,YAAM,MAAM,MAAM,SAAS;AAE3B,UAAI,CAAC,KAAK;AACT,eAAO;AAAA,MACR;AAEA,YAAM,MAAM,oBACV,KAAK,GAAG,IAAI,CAAC,GACZ,WAAW,gBAAgB,EAAE;AAEhC,UAAI,CAAC,KAAK;AACT,eAAO;AAAA,MACR;AAEA,aAAO;AAAA,QACN,KAAK,0BAA0B,KAAK,GAAG,IAAI,CAAC,KAAK;AAAA,QACjD;AAAA,QACA,GAAG,eAAe,GAAG;AAAA,MACtB;AAAA,IACD;AAAA,IACA,OAAO,YAAY;AAClB,YAAM,OAAO,MAAM,OAAO;AAC1B,YAAM,YAAY,mCAAmC,KAAK,IAAI,KAC7D,UAAU,KAAK,IAAI,KAAK,CAAC;AAC1B,UAAI,UAAU;AACb,eAAO;AAAA,MACR;AAEA,YAAM,kBAAkB,MAAM,WAAW;AAEzC,aACC,mBACA,UAAU,eAAe,EACvB,WAAW,cAAc,YAAY,EACrC,WAAW,KAAK,GAAG;AAAA,IAEvB;AAAA,IAEA,OAAO,YAAY;AAClB,aACC,mBAAmB,MAAM,OAAO,CAAC,KACjC;AAAA,QACI,MAAM,WAAW,CAAC;AAAA;AAAA;AAAA,yBAGD,MAAM,WAAW,CAAC;AAAA;AAAA;AAAA;AAAA,IAKzC;AAAA,EACD;AACD;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/shared/options/createOptionDefaults/readEmails.ts"],"sourcesContent":["import { $ } from \"execa\";\nimport { UserInfo } from \"npm-user\";\n\nimport { tryCatchAsync } from \"../../tryCatchAsync.js\";\nimport { readGitHubEmail } from \"./readGitHubEmail.js\";\n\nexport async function readEmails(\n\tnpmDefaults: () => Promise<undefined | UserInfo>,\n\tpackageAuthor: () => Promise<{\n\t\tauthor: string | undefined;\n\t\temail: string | undefined;\n\t}>,\n) {\n\tconst github =\n\t\t(await readGitHubEmail()) ??\n\t\t(await tryCatchAsync(\n\t\t\tasync () => (await $`git config --get user.email`).stdout,\n\t\t));\n\n\tconst npm =\n\t\t((await npmDefaults())?.email ?? (await packageAuthor()).email) || github;\n\n\treturn npm ? { github: github || npm, npm } : undefined;\n}\n"],"mappings":"AAAA,SAAS,SAAS;AAGlB,SAAS,qBAAqB;AAC9B,SAAS,uBAAuB;AAEhC,eAAsB,WACrB,aACA,eAIC;AACD,QAAM,SACJ,MAAM,gBAAgB,KACtB,MAAM;AAAA,IACN,aAAa,MAAM,gCAAgC;AAAA,EACpD;AAED,QAAM,QACH,MAAM,YAAY,IAAI,UAAU,MAAM,cAAc,GAAG,UAAU;AAEpE,SAAO,MAAM,EAAE,QAAQ,UAAU,KAAK,IAAI,IAAI;AAC/C;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/shared/options/createOptionDefaults/readFunding.ts"],"sourcesContent":["import fs from \"node:fs/promises\";\n\nimport { tryCatchAsync } from \"../../tryCatchAsync.js\";\n\nexport async function readFunding() {\n\treturn await tryCatchAsync(async () =>\n\t\t(await fs.readFile(\".github/FUNDING.yml\")).toString().split(\":\")[1]?.trim(),\n\t);\n}\n"],"mappings":"AAAA,OAAO,QAAQ;AAEf,SAAS,qBAAqB;AAE9B,eAAsB,cAAc;AACnC,SAAO,MAAM;AAAA,IAAc,aACzB,MAAM,GAAG,SAAS,qBAAqB,GAAG,SAAS,EAAE,MAAM,GAAG,EAAE,CAAC,GAAG,KAAK;AAAA,EAC3E;AACD;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/shared/options/createOptionDefaults/readGitHubEmail.ts"],"sourcesContent":["import { readFileSafe } from \"../../readFileSafe.js\";\n\nexport async function readGitHubEmail() {\n\t// The create-typescript-app template puts the GitHub email in the CoC.\n\t// If they seem to be using the template, we can go with that.\n\tconst codeOfConduct = await readFileSafe(\".github/CODE_OF_CONDUCT.md\", \"\");\n\tif (!codeOfConduct.includes(\"Contributor Covenant Code of Conduct\")) {\n\t\treturn undefined;\n\t}\n\n\treturn /for enforcement at[\\r\\n]+(.+)\\.[\\r\\n]+All/.exec(codeOfConduct)?.[1];\n}\n"],"mappings":"AAAA,SAAS,oBAAoB;AAE7B,eAAsB,kBAAkB;AAGvC,QAAM,gBAAgB,MAAM,aAAa,8BAA8B,EAAE;AACzE,MAAI,CAAC,cAAc,SAAS,sCAAsC,GAAG;AACpE,WAAO;AAAA,EACR;AAEA,SAAO,4CAA4C,KAAK,aAAa,IAAI,CAAC;AAC3E;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/shared/options/createOptionDefaults/readGuide.ts"],"sourcesContent":["import { readFileSafe } from \"../../readFileSafe.js\";\n\nexport async function readGuide() {\n\tconst development = await readFileSafe(\".github/DEVELOPMENT.md\", \"\");\n\tconst tag = /> .*guided walkthrough, see \\[((?!\\[).+)\\]\\((.+)\\)/i.exec(\n\t\tdevelopment,\n\t);\n\n\tif (!tag) {\n\t\treturn undefined;\n\t}\n\n\treturn {\n\t\thref: tag[2],\n\t\ttitle: tag[1],\n\t};\n}\n"],"mappings":"AAAA,SAAS,oBAAoB;AAE7B,eAAsB,YAAY;AACjC,QAAM,cAAc,MAAM,aAAa,0BAA0B,EAAE;AACnE,QAAM,MAAM,sDAAsD;AAAA,IACjE;AAAA,EACD;AAEA,MAAI,CAAC,KAAK;AACT,WAAO;AAAA,EACR;AAEA,SAAO;AAAA,IACN,MAAM,IAAI,CAAC;AAAA,IACX,OAAO,IAAI,CAAC;AAAA,EACb;AACD;","names":[]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Octokit } from 'octokit';
|
|
2
|
-
|
|
3
|
-
interface CreateRepositoryWithApiOptions {
|
|
4
|
-
owner: string;
|
|
5
|
-
preserveGeneratedFrom?: boolean;
|
|
6
|
-
repository: string;
|
|
7
|
-
}
|
|
8
|
-
declare function createRepositoryWithApi(octokit: Octokit, options: CreateRepositoryWithApiOptions): Promise<void>;
|
|
9
|
-
|
|
10
|
-
export { type CreateRepositoryWithApiOptions, createRepositoryWithApi };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
async function createRepositoryWithApi(octokit, options) {
|
|
2
|
-
if (options.preserveGeneratedFrom) {
|
|
3
|
-
await octokit.rest.repos.createUsingTemplate({
|
|
4
|
-
name: options.repository,
|
|
5
|
-
owner: options.owner,
|
|
6
|
-
template_owner: "JoshuaKGoldberg",
|
|
7
|
-
template_repo: "create-typescript-app"
|
|
8
|
-
});
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
const currentUser = await octokit.rest.users.getAuthenticated();
|
|
12
|
-
try {
|
|
13
|
-
if (currentUser.data.login === options.owner) {
|
|
14
|
-
await octokit.rest.repos.createForAuthenticatedUser({
|
|
15
|
-
name: options.repository
|
|
16
|
-
});
|
|
17
|
-
} else {
|
|
18
|
-
await octokit.rest.repos.createInOrg({
|
|
19
|
-
name: options.repository,
|
|
20
|
-
org: options.owner
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
} catch (error) {
|
|
24
|
-
throw new Error("Failed to create new repository on GitHub.", {
|
|
25
|
-
cause: error
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
export {
|
|
30
|
-
createRepositoryWithApi
|
|
31
|
-
};
|
|
32
|
-
//# sourceMappingURL=createRepositoryWithApi.js.map
|