create-typescript-app 2.50.0 → 2.51.0
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/lib/_virtual/rolldown_runtime.js +20 -0
- package/lib/base.d.ts +2 -3
- package/lib/base.d.ts.map +1 -1
- package/lib/base.js +6 -12
- package/lib/base.js.map +1 -1
- package/lib/blocks/actions/resolveUses.d.ts +0 -2
- package/lib/blocks/actions/resolveUses.js.map +1 -1
- package/lib/blocks/actions/steps.d.ts +0 -2
- package/lib/blocks/actions/steps.d.ts.map +1 -1
- package/lib/blocks/actions/steps.js +2 -2
- package/lib/blocks/actions/steps.js.map +1 -1
- package/lib/blocks/bin/getPrimaryBin.d.ts +0 -2
- package/lib/blocks/bin/getPrimaryBin.d.ts.map +1 -1
- package/lib/blocks/bin/getPrimaryBin.js.map +1 -1
- package/lib/blocks/blockAllContributors.d.ts +2 -3
- package/lib/blocks/blockAllContributors.d.ts.map +1 -1
- package/lib/blocks/blockAllContributors.js.map +1 -1
- package/lib/blocks/blockAreTheTypesWrong.d.ts +2 -3
- package/lib/blocks/blockAreTheTypesWrong.d.ts.map +1 -1
- package/lib/blocks/blockAreTheTypesWrong.js.map +1 -1
- package/lib/blocks/blockCSpell.d.ts +2 -3
- package/lib/blocks/blockCSpell.d.ts.map +1 -1
- package/lib/blocks/blockCSpell.js +2 -2
- package/lib/blocks/blockCSpell.js.map +1 -1
- package/lib/blocks/blockCTATransitions.d.ts +2 -3
- package/lib/blocks/blockCTATransitions.d.ts.map +1 -1
- package/lib/blocks/blockCTATransitions.js.map +1 -1
- package/lib/blocks/blockCodecov.d.ts +2 -3
- package/lib/blocks/blockCodecov.d.ts.map +1 -1
- package/lib/blocks/blockCodecov.js +2 -2
- package/lib/blocks/blockCodecov.js.map +1 -1
- package/lib/blocks/blockContributingDocs.d.ts +2 -3
- package/lib/blocks/blockContributingDocs.d.ts.map +1 -1
- package/lib/blocks/blockContributingDocs.js.map +1 -1
- package/lib/blocks/blockContributorCovenant.d.ts +2 -3
- package/lib/blocks/blockContributorCovenant.d.ts.map +1 -1
- package/lib/blocks/blockContributorCovenant.js.map +1 -1
- package/lib/blocks/blockDevelopmentDocs.d.ts +3 -4
- package/lib/blocks/blockDevelopmentDocs.d.ts.map +1 -1
- package/lib/blocks/blockDevelopmentDocs.js.map +1 -1
- package/lib/blocks/blockESLint.d.ts +13 -14
- package/lib/blocks/blockESLint.d.ts.map +1 -1
- package/lib/blocks/blockESLint.js.map +1 -1
- package/lib/blocks/blockESLintComments.d.ts +2 -3
- package/lib/blocks/blockESLintComments.d.ts.map +1 -1
- package/lib/blocks/blockESLintComments.js.map +1 -1
- package/lib/blocks/blockESLintJSDoc.d.ts +2 -3
- package/lib/blocks/blockESLintJSDoc.d.ts.map +1 -1
- package/lib/blocks/blockESLintJSDoc.js.map +1 -1
- package/lib/blocks/blockESLintJSONC.d.ts +2 -3
- package/lib/blocks/blockESLintJSONC.d.ts.map +1 -1
- package/lib/blocks/blockESLintJSONC.js.map +1 -1
- package/lib/blocks/blockESLintMarkdown.d.ts +2 -3
- package/lib/blocks/blockESLintMarkdown.d.ts.map +1 -1
- package/lib/blocks/blockESLintMarkdown.js.map +1 -1
- package/lib/blocks/blockESLintMoreStyling.d.ts +2 -3
- package/lib/blocks/blockESLintMoreStyling.d.ts.map +1 -1
- package/lib/blocks/blockESLintMoreStyling.js.map +1 -1
- package/lib/blocks/blockESLintNode.d.ts +2 -3
- package/lib/blocks/blockESLintNode.d.ts.map +1 -1
- package/lib/blocks/blockESLintNode.js.map +1 -1
- package/lib/blocks/blockESLintPackageJson.d.ts +2 -3
- package/lib/blocks/blockESLintPackageJson.d.ts.map +1 -1
- package/lib/blocks/blockESLintPackageJson.js.map +1 -1
- package/lib/blocks/blockESLintPerfectionist.d.ts +2 -3
- package/lib/blocks/blockESLintPerfectionist.d.ts.map +1 -1
- package/lib/blocks/blockESLintPerfectionist.js.map +1 -1
- package/lib/blocks/blockESLintPlugin.d.ts +2 -3
- package/lib/blocks/blockESLintPlugin.d.ts.map +1 -1
- package/lib/blocks/blockESLintPlugin.js.map +1 -1
- package/lib/blocks/blockESLintRegexp.d.ts +2 -3
- package/lib/blocks/blockESLintRegexp.d.ts.map +1 -1
- package/lib/blocks/blockESLintRegexp.js.map +1 -1
- package/lib/blocks/blockESLintYML.d.ts +2 -3
- package/lib/blocks/blockESLintYML.d.ts.map +1 -1
- package/lib/blocks/blockESLintYML.js.map +1 -1
- package/lib/blocks/blockExampleFiles.d.ts +2 -3
- package/lib/blocks/blockExampleFiles.d.ts.map +1 -1
- package/lib/blocks/blockExampleFiles.js.map +1 -1
- package/lib/blocks/blockFunding.d.ts +2 -3
- package/lib/blocks/blockFunding.d.ts.map +1 -1
- package/lib/blocks/blockFunding.js.map +1 -1
- package/lib/blocks/blockGitHubActionsCI.d.ts +3 -4
- package/lib/blocks/blockGitHubActionsCI.d.ts.map +1 -1
- package/lib/blocks/blockGitHubActionsCI.js +3 -3
- package/lib/blocks/blockGitHubActionsCI.js.map +1 -1
- package/lib/blocks/blockGitHubApps.d.ts +2 -3
- package/lib/blocks/blockGitHubApps.d.ts.map +1 -1
- package/lib/blocks/blockGitHubApps.js.map +1 -1
- package/lib/blocks/blockGitHubIssueTemplates.d.ts +2 -3
- package/lib/blocks/blockGitHubIssueTemplates.d.ts.map +1 -1
- package/lib/blocks/blockGitHubIssueTemplates.js.map +1 -1
- package/lib/blocks/blockGitHubPRTemplate.d.ts +2 -3
- package/lib/blocks/blockGitHubPRTemplate.d.ts.map +1 -1
- package/lib/blocks/blockGitHubPRTemplate.js.map +1 -1
- package/lib/blocks/blockGitignore.d.ts +2 -3
- package/lib/blocks/blockGitignore.d.ts.map +1 -1
- package/lib/blocks/blockGitignore.js.map +1 -1
- package/lib/blocks/blockKnip.d.ts +2 -3
- package/lib/blocks/blockKnip.d.ts.map +1 -1
- package/lib/blocks/blockKnip.js +1 -1
- package/lib/blocks/blockKnip.js.map +1 -1
- package/lib/blocks/blockMITLicense.d.ts +2 -3
- package/lib/blocks/blockMITLicense.d.ts.map +1 -1
- package/lib/blocks/blockMITLicense.js +1 -4
- package/lib/blocks/blockMITLicense.js.map +1 -1
- package/lib/blocks/blockMain.d.ts +2 -3
- package/lib/blocks/blockMain.d.ts.map +1 -1
- package/lib/blocks/blockMain.js.map +1 -1
- package/lib/blocks/blockMarkdownlint.d.ts +2 -3
- package/lib/blocks/blockMarkdownlint.d.ts.map +1 -1
- package/lib/blocks/blockMarkdownlint.js +3 -2
- package/lib/blocks/blockMarkdownlint.js.map +1 -1
- package/lib/blocks/blockNcc.d.ts +2 -3
- package/lib/blocks/blockNcc.d.ts.map +1 -1
- package/lib/blocks/blockNcc.js.map +1 -1
- package/lib/blocks/blockNvmrc.d.ts +2 -3
- package/lib/blocks/blockNvmrc.d.ts.map +1 -1
- package/lib/blocks/blockNvmrc.js.map +1 -1
- package/lib/blocks/blockOctoGuide.d.ts +2 -3
- package/lib/blocks/blockOctoGuide.d.ts.map +1 -1
- package/lib/blocks/blockOctoGuide.js +2 -2
- package/lib/blocks/blockOctoGuide.js.map +1 -1
- package/lib/blocks/blockOctoGuideStrict.d.ts +2 -3
- package/lib/blocks/blockOctoGuideStrict.d.ts.map +1 -1
- package/lib/blocks/blockOctoGuideStrict.js.map +1 -1
- package/lib/blocks/blockPackageJson.d.ts +10 -11
- package/lib/blocks/blockPackageJson.d.ts.map +1 -1
- package/lib/blocks/blockPackageJson.js +2 -8
- package/lib/blocks/blockPackageJson.js.map +1 -1
- package/lib/blocks/blockPnpmDedupe.d.ts +2 -3
- package/lib/blocks/blockPnpmDedupe.d.ts.map +1 -1
- package/lib/blocks/blockPnpmDedupe.js.map +1 -1
- package/lib/blocks/blockPrettier.d.ts +2 -3
- package/lib/blocks/blockPrettier.d.ts.map +1 -1
- package/lib/blocks/blockPrettier.js.map +1 -1
- package/lib/blocks/blockPrettierPluginCurly.d.ts +2 -3
- package/lib/blocks/blockPrettierPluginCurly.d.ts.map +1 -1
- package/lib/blocks/blockPrettierPluginCurly.js.map +1 -1
- package/lib/blocks/blockPrettierPluginPackageJson.d.ts +2 -3
- package/lib/blocks/blockPrettierPluginPackageJson.d.ts.map +1 -1
- package/lib/blocks/blockPrettierPluginPackageJson.js.map +1 -1
- package/lib/blocks/blockPrettierPluginSentencesPerLine.d.ts +2 -3
- package/lib/blocks/blockPrettierPluginSentencesPerLine.d.ts.map +1 -1
- package/lib/blocks/blockPrettierPluginSentencesPerLine.js.map +1 -1
- package/lib/blocks/blockPrettierPluginSh.d.ts +2 -3
- package/lib/blocks/blockPrettierPluginSh.d.ts.map +1 -1
- package/lib/blocks/blockPrettierPluginSh.js.map +1 -1
- package/lib/blocks/blockREADME.d.ts +3 -4
- package/lib/blocks/blockREADME.d.ts.map +1 -1
- package/lib/blocks/blockREADME.js +1 -2
- package/lib/blocks/blockREADME.js.map +1 -1
- package/lib/blocks/blockReleaseIt.d.ts +3 -4
- package/lib/blocks/blockReleaseIt.d.ts.map +1 -1
- package/lib/blocks/blockReleaseIt.js.map +1 -1
- package/lib/blocks/blockRemoveDependencies.d.ts +2 -3
- package/lib/blocks/blockRemoveDependencies.d.ts.map +1 -1
- package/lib/blocks/blockRemoveDependencies.js.map +1 -1
- package/lib/blocks/blockRemoveFiles.d.ts +2 -3
- package/lib/blocks/blockRemoveFiles.d.ts.map +1 -1
- package/lib/blocks/blockRemoveFiles.js.map +1 -1
- package/lib/blocks/blockRemoveWorkflows.d.ts +2 -3
- package/lib/blocks/blockRemoveWorkflows.d.ts.map +1 -1
- package/lib/blocks/blockRemoveWorkflows.js.map +1 -1
- package/lib/blocks/blockRenovate.d.ts +2 -3
- package/lib/blocks/blockRenovate.d.ts.map +1 -1
- package/lib/blocks/blockRenovate.js.map +1 -1
- package/lib/blocks/blockRepositoryBranchRuleset.d.ts +2 -3
- package/lib/blocks/blockRepositoryBranchRuleset.d.ts.map +1 -1
- package/lib/blocks/blockRepositoryBranchRuleset.js.map +1 -1
- package/lib/blocks/blockRepositoryLabels.d.ts +2 -3
- package/lib/blocks/blockRepositoryLabels.d.ts.map +1 -1
- package/lib/blocks/blockRepositoryLabels.js.map +1 -1
- package/lib/blocks/blockRepositorySecrets.d.ts +2 -3
- package/lib/blocks/blockRepositorySecrets.d.ts.map +1 -1
- package/lib/blocks/blockRepositorySecrets.js.map +1 -1
- package/lib/blocks/blockRepositorySettings.d.ts +2 -3
- package/lib/blocks/blockRepositorySettings.d.ts.map +1 -1
- package/lib/blocks/blockRepositorySettings.js +1 -2
- package/lib/blocks/blockRepositorySettings.js.map +1 -1
- package/lib/blocks/blockSecurityDocs.d.ts +2 -3
- package/lib/blocks/blockSecurityDocs.d.ts.map +1 -1
- package/lib/blocks/blockSecurityDocs.js.map +1 -1
- package/lib/blocks/blockTSDown.d.ts +2 -3
- package/lib/blocks/blockTSDown.d.ts.map +1 -1
- package/lib/blocks/blockTSDown.js +3 -2
- package/lib/blocks/blockTSDown.js.map +1 -1
- package/lib/blocks/blockTemplatedWith.d.ts +2 -3
- package/lib/blocks/blockTemplatedWith.d.ts.map +1 -1
- package/lib/blocks/blockTemplatedWith.js.map +1 -1
- package/lib/blocks/blockTypeScript.d.ts +2 -3
- package/lib/blocks/blockTypeScript.d.ts.map +1 -1
- package/lib/blocks/blockTypeScript.js +1 -1
- package/lib/blocks/blockTypeScript.js.map +1 -1
- package/lib/blocks/blockVSCode.d.ts +2 -3
- package/lib/blocks/blockVSCode.d.ts.map +1 -1
- package/lib/blocks/blockVSCode.js.map +1 -1
- package/lib/blocks/blockVitest.d.ts +2 -3
- package/lib/blocks/blockVitest.d.ts.map +1 -1
- package/lib/blocks/blockVitest.js +2 -2
- package/lib/blocks/blockVitest.js.map +1 -1
- package/lib/blocks/blockWebExt.d.ts +2 -3
- package/lib/blocks/blockWebExt.d.ts.map +1 -1
- package/lib/blocks/blockWebExt.js.map +1 -1
- package/lib/blocks/eslint/blockESLintIntake.d.ts +0 -1
- package/lib/blocks/eslint/blockESLintIntake.js +11 -13
- package/lib/blocks/eslint/blockESLintIntake.js.map +1 -1
- package/lib/blocks/eslint/blockESLintPluginIntake.d.ts +0 -1
- package/lib/blocks/eslint/blockESLintPluginIntake.js +3 -3
- package/lib/blocks/eslint/blockESLintPluginIntake.js.map +1 -1
- package/lib/blocks/eslint/schemas.d.ts +2 -4
- package/lib/blocks/eslint/schemas.d.ts.map +1 -1
- package/lib/blocks/eslint/schemas.js.map +1 -1
- package/lib/blocks/files/createJobName.d.ts +0 -2
- package/lib/blocks/files/createJobName.d.ts.map +1 -1
- package/lib/blocks/files/createJobName.js.map +1 -1
- package/lib/blocks/files/createMultiWorkflowFile.d.ts +0 -2
- package/lib/blocks/files/createMultiWorkflowFile.d.ts.map +1 -1
- package/lib/blocks/files/createMultiWorkflowFile.js.map +1 -1
- package/lib/blocks/files/createSoloWorkflowFile.d.ts.map +1 -1
- package/lib/blocks/files/createSoloWorkflowFile.js +1 -1
- package/lib/blocks/files/createSoloWorkflowFile.js.map +1 -1
- package/lib/blocks/files/formatIgnoreFile.d.ts +0 -2
- package/lib/blocks/files/formatIgnoreFile.d.ts.map +1 -1
- package/lib/blocks/files/formatIgnoreFile.js.map +1 -1
- package/lib/blocks/files/formatWorkflowYaml.d.ts +0 -2
- package/lib/blocks/files/formatWorkflowYaml.d.ts.map +1 -1
- package/lib/blocks/files/formatWorkflowYaml.js.map +1 -1
- package/lib/blocks/files/formatYaml.d.ts +0 -2
- package/lib/blocks/files/formatYaml.d.ts.map +1 -1
- package/lib/blocks/files/formatYaml.js.map +1 -1
- package/lib/blocks/files/removeUsesQuotes.d.ts +0 -2
- package/lib/blocks/files/removeUsesQuotes.d.ts.map +1 -1
- package/lib/blocks/files/removeUsesQuotes.js.map +1 -1
- package/lib/blocks/getInstallationSuggestions.d.ts +0 -2
- package/lib/blocks/getInstallationSuggestions.d.ts.map +1 -1
- package/lib/blocks/getInstallationSuggestions.js.map +1 -1
- package/lib/blocks/index.d.ts +73 -73
- package/lib/blocks/index.d.ts.map +1 -1
- package/lib/blocks/index.js.map +1 -1
- package/lib/blocks/intake/intakeFile.d.ts +0 -2
- package/lib/blocks/intake/intakeFile.js +3 -4
- package/lib/blocks/intake/intakeFile.js.map +1 -1
- package/lib/blocks/intake/intakeFileAsJson.d.ts +0 -2
- package/lib/blocks/intake/intakeFileAsJson.js +1 -1
- package/lib/blocks/intake/intakeFileAsJson.js.map +1 -1
- package/lib/blocks/intake/intakeFileAsYaml.d.ts +0 -2
- package/lib/blocks/intake/intakeFileAsYaml.js +1 -1
- package/lib/blocks/intake/intakeFileAsYaml.js.map +1 -1
- package/lib/blocks/intake/intakeFileDefineConfig.d.ts +0 -2
- package/lib/blocks/intake/intakeFileDefineConfig.js +4 -4
- package/lib/blocks/intake/intakeFileDefineConfig.js.map +1 -1
- package/lib/blocks/options.fakes.d.ts +0 -1
- package/lib/blocks/options.fakes.js.map +1 -1
- package/lib/blocks/outcomeLabels.d.ts +0 -1
- package/lib/blocks/outcomeLabels.js.map +1 -1
- package/lib/blocks/phases.d.ts +0 -1
- package/lib/blocks/phases.js.map +1 -1
- package/lib/constants.d.ts +0 -1
- package/lib/constants.js.map +1 -1
- package/lib/data/contributions.d.ts +0 -2
- package/lib/data/contributions.d.ts.map +1 -1
- package/lib/data/contributions.js.map +1 -1
- package/lib/data/packageData.d.ts +2 -4
- package/lib/data/packageData.d.ts.map +1 -1
- package/lib/data/packageData.js +1 -2
- package/lib/data/packageData.js.map +1 -1
- package/lib/index.d.ts +72 -72
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/inputs/inputFromDirectory.d.ts +2 -4
- package/lib/inputs/inputFromDirectory.d.ts.map +1 -1
- package/lib/inputs/inputFromDirectory.js.map +1 -1
- package/lib/inputs/inputFromOctokit.d.ts +2 -4
- package/lib/inputs/inputFromOctokit.d.ts.map +1 -1
- package/lib/inputs/inputFromOctokit.js +4 -4
- package/lib/inputs/inputFromOctokit.js.map +1 -1
- package/lib/options/readAccess.d.ts +0 -2
- package/lib/options/readAccess.js.map +1 -1
- package/lib/options/readAllContributors.d.ts +0 -2
- package/lib/options/readAllContributors.js.map +1 -1
- package/lib/options/readAuthor.d.ts +0 -2
- package/lib/options/readAuthor.js.map +1 -1
- package/lib/options/readBin.d.ts +0 -2
- package/lib/options/readBin.js.map +1 -1
- package/lib/options/readDescription.d.ts +0 -2
- package/lib/options/readDescription.js +3 -4
- package/lib/options/readDescription.js.map +1 -1
- package/lib/options/readDescriptionFromReadme.d.ts +0 -2
- package/lib/options/readDescriptionFromReadme.d.ts.map +1 -1
- package/lib/options/readDescriptionFromReadme.js +2 -2
- package/lib/options/readDescriptionFromReadme.js.map +1 -1
- package/lib/options/readDevelopmentDocumentation.d.ts +0 -2
- package/lib/options/readDevelopmentDocumentation.js +1 -1
- package/lib/options/readDevelopmentDocumentation.js.map +1 -1
- package/lib/options/readDocumentation.d.ts +0 -2
- package/lib/options/readDocumentation.js.map +1 -1
- package/lib/options/readEmailFromCodeOfConduct.d.ts +0 -2
- package/lib/options/readEmailFromCodeOfConduct.js.map +1 -1
- package/lib/options/readEmailFromGit.d.ts +0 -2
- package/lib/options/readEmailFromGit.js.map +1 -1
- package/lib/options/readEmailFromNpm.d.ts +0 -2
- package/lib/options/readEmailFromNpm.js.map +1 -1
- package/lib/options/readEmails.d.ts +0 -2
- package/lib/options/readEmails.d.ts.map +1 -1
- package/lib/options/readEmails.js.map +1 -1
- package/lib/options/readEmoji.d.ts +0 -2
- package/lib/options/readEmoji.d.ts.map +1 -1
- package/lib/options/readEmoji.js.map +1 -1
- package/lib/options/readExistingLabels.d.ts +0 -2
- package/lib/options/readExistingLabels.d.ts.map +1 -1
- package/lib/options/readExistingLabels.js.map +1 -1
- package/lib/options/readFileAsJson.d.ts +0 -2
- package/lib/options/readFileAsJson.d.ts.map +1 -1
- package/lib/options/readFileAsJson.js.map +1 -1
- package/lib/options/readFileSafe.d.ts +0 -2
- package/lib/options/readFileSafe.d.ts.map +1 -1
- package/lib/options/readFileSafe.js.map +1 -1
- package/lib/options/readFunding.d.ts +0 -2
- package/lib/options/readFunding.js.map +1 -1
- package/lib/options/readGitDefaults.d.ts +0 -2
- package/lib/options/readGitDefaults.js.map +1 -1
- package/lib/options/readGuide.d.ts +0 -2
- package/lib/options/readGuide.d.ts.map +1 -1
- package/lib/options/readGuide.js +2 -2
- package/lib/options/readGuide.js.map +1 -1
- package/lib/options/readKeywords.d.ts +0 -2
- package/lib/options/readKeywords.js.map +1 -1
- package/lib/options/readLogo.d.ts +0 -2
- package/lib/options/readLogo.d.ts.map +1 -1
- package/lib/options/readLogo.js +4 -5
- package/lib/options/readLogo.js.map +1 -1
- package/lib/options/readLogoSizing.d.ts +0 -2
- package/lib/options/readLogoSizing.d.ts.map +1 -1
- package/lib/options/readLogoSizing.js +2 -2
- package/lib/options/readLogoSizing.js.map +1 -1
- package/lib/options/readNode.d.ts +0 -2
- package/lib/options/readNode.d.ts.map +1 -1
- package/lib/options/readNode.js.map +1 -1
- package/lib/options/readNpmDefaults.d.ts +2 -4
- package/lib/options/readNpmDefaults.d.ts.map +1 -1
- package/lib/options/readNpmDefaults.js.map +1 -1
- package/lib/options/readOwner.d.ts +0 -2
- package/lib/options/readOwner.js.map +1 -1
- package/lib/options/readPackageAuthor.d.ts +0 -2
- package/lib/options/readPackageAuthor.d.ts.map +1 -1
- package/lib/options/readPackageAuthor.js.map +1 -1
- package/lib/options/readPackageData.d.ts +0 -2
- package/lib/options/readPackageData.js.map +1 -1
- package/lib/options/readPnpm.d.ts +0 -2
- package/lib/options/readPnpm.js.map +1 -1
- package/lib/options/readReadmeAdditional.d.ts +0 -2
- package/lib/options/readReadmeAdditional.d.ts.map +1 -1
- package/lib/options/readReadmeAdditional.js +2 -2
- package/lib/options/readReadmeAdditional.js.map +1 -1
- package/lib/options/readReadmeExplainer.d.ts +0 -2
- package/lib/options/readReadmeExplainer.d.ts.map +1 -1
- package/lib/options/readReadmeExplainer.js +2 -3
- package/lib/options/readReadmeExplainer.js.map +1 -1
- package/lib/options/readReadmeFootnotes.d.ts +0 -2
- package/lib/options/readReadmeFootnotes.d.ts.map +1 -1
- package/lib/options/readReadmeFootnotes.js +2 -2
- package/lib/options/readReadmeFootnotes.js.map +1 -1
- package/lib/options/readReadmeUsage.d.ts +0 -2
- package/lib/options/readReadmeUsage.d.ts.map +1 -1
- package/lib/options/readReadmeUsage.js +3 -4
- package/lib/options/readReadmeUsage.js.map +1 -1
- package/lib/options/readRepository.d.ts +0 -2
- package/lib/options/readRepository.d.ts.map +1 -1
- package/lib/options/readRepository.js.map +1 -1
- package/lib/options/readRulesetId.d.ts +0 -2
- package/lib/options/readRulesetId.js +2 -3
- package/lib/options/readRulesetId.js.map +1 -1
- package/lib/options/readTitle.d.ts +0 -2
- package/lib/options/readTitle.d.ts.map +1 -1
- package/lib/options/readTitle.js.map +1 -1
- package/lib/options/readWords.d.ts +0 -2
- package/lib/options/readWords.js +1 -2
- package/lib/options/readWords.js.map +1 -1
- package/lib/options/readWorkflowsVersions.d.ts +0 -2
- package/lib/options/readWorkflowsVersions.js.map +1 -1
- package/lib/package.d.ts +144 -0
- package/lib/package.d.ts.map +1 -0
- package/lib/presets/common.d.ts +69 -70
- package/lib/presets/common.d.ts.map +1 -1
- package/lib/presets/common.js.map +1 -1
- package/lib/presets/everything.d.ts +69 -70
- package/lib/presets/everything.d.ts.map +1 -1
- package/lib/presets/everything.js.map +1 -1
- package/lib/presets/index.d.ts +203 -203
- package/lib/presets/index.d.ts.map +1 -1
- package/lib/presets/index.js.map +1 -1
- package/lib/presets/minimal.d.ts +69 -70
- package/lib/presets/minimal.d.ts.map +1 -1
- package/lib/presets/minimal.js.map +1 -1
- package/lib/schemas.d.ts +0 -2
- package/lib/schemas.d.ts.map +1 -1
- package/lib/schemas.js.map +1 -1
- package/lib/template.d.ts +69 -70
- package/lib/template.d.ts.map +1 -1
- package/lib/template.js.map +1 -1
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js +1 -0
- package/lib/utils/htmlToTextSafe.d.ts +0 -2
- package/lib/utils/htmlToTextSafe.d.ts.map +1 -1
- package/lib/utils/htmlToTextSafe.js.map +1 -1
- package/lib/utils/resolveBin.d.ts +0 -2
- package/lib/utils/resolveBin.d.ts.map +1 -1
- package/lib/utils/resolveBin.js.map +1 -1
- package/lib/utils/swallowError.d.ts +0 -2
- package/lib/utils/swallowError.d.ts.map +1 -1
- package/lib/utils/swallowError.js.map +1 -1
- package/lib/utils/swallowErrorAsync.d.ts +0 -2
- package/lib/utils/swallowErrorAsync.d.ts.map +1 -1
- package/lib/utils/swallowErrorAsync.js +1 -1
- package/lib/utils/swallowErrorAsync.js.map +1 -1
- package/lib/utils/trimPrecedingSlash.d.ts +0 -2
- package/lib/utils/trimPrecedingSlash.d.ts.map +1 -1
- package/lib/utils/trimPrecedingSlash.js.map +1 -1
- package/lib/utils/tryCatch.d.ts +0 -2
- package/lib/utils/tryCatch.d.ts.map +1 -1
- package/lib/utils/tryCatch.js +1 -1
- package/lib/utils/tryCatch.js.map +1 -1
- package/package.json +51 -55
|
@@ -6,13 +6,12 @@ import { marked } from "marked";
|
|
|
6
6
|
//#region src/options/readDescription.ts
|
|
7
7
|
async function readDescription(getPackageData, getReadme, getRepository) {
|
|
8
8
|
const { description: fromPackageJson } = await getPackageData();
|
|
9
|
-
if (!fromPackageJson) return
|
|
9
|
+
if (!fromPackageJson) return;
|
|
10
10
|
const fromReadme = await readDescriptionFromReadme(getReadme);
|
|
11
11
|
if (!fromReadme) return marked.parseInline(fromPackageJson);
|
|
12
|
-
if (await getRepository() !== "create-typescript-app" && fromPackageJson === packageData.description) return
|
|
12
|
+
if (await getRepository() !== "create-typescript-app" && fromPackageJson === packageData.description) return;
|
|
13
13
|
const fromPackageJsonNormalized = htmlToTextSafe(await marked.parseInline(fromPackageJson));
|
|
14
|
-
|
|
15
|
-
if (fromReadmeNormalized !== fromPackageJsonNormalized) return await marked.parseInline(fromPackageJson);
|
|
14
|
+
if (htmlToTextSafe(fromReadme) !== fromPackageJsonNormalized) return await marked.parseInline(fromPackageJson);
|
|
16
15
|
return fromReadme;
|
|
17
16
|
}
|
|
18
17
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readDescription.js","names":[
|
|
1
|
+
{"version":3,"file":"readDescription.js","names":[],"sources":["../../src/options/readDescription.ts"],"sourcesContent":["import { marked } from \"marked\";\n\nimport { packageData } from \"../data/packageData.js\";\nimport { PartialPackageData } from \"../types.js\";\nimport { htmlToTextSafe } from \"../utils/htmlToTextSafe.js\";\nimport { readDescriptionFromReadme } from \"./readDescriptionFromReadme.js\";\n\nexport async function readDescription(\n\tgetPackageData: () => Promise<PartialPackageData>,\n\tgetReadme: () => Promise<string>,\n\tgetRepository: () => Promise<string | undefined>,\n) {\n\t// If we there is no package.json yet, this is probably setup mode.\n\tconst { description: fromPackageJson } = await getPackageData();\n\tif (!fromPackageJson) {\n\t\treturn undefined;\n\t}\n\n\t// If only a a package.json exists, this is probably transition mode.\n\t// We can use the package.json's description as the only source of truth.\n\tconst fromReadme = await readDescriptionFromReadme(getReadme);\n\tif (!fromReadme) {\n\t\treturn marked.parseInline(fromPackageJson);\n\t}\n\n\t// If the package.json is create-typescript-app's but the repository isn't,\n\t// we're almost certainly in transition mode after cloning the template.\n\tif (\n\t\t(await getRepository()) !== \"create-typescript-app\" &&\n\t\tfromPackageJson === packageData.description\n\t) {\n\t\treturn undefined;\n\t}\n\n\tconst fromPackageJsonNormalized = htmlToTextSafe(\n\t\tawait marked.parseInline(fromPackageJson),\n\t);\n\tconst fromReadmeNormalized = htmlToTextSafe(fromReadme);\n\n\t// If the package.json and README.md don't match, we prefer the package.json,\n\t// as it's what is used in publishing to npm.\n\tif (fromReadmeNormalized !== fromPackageJsonNormalized) {\n\t\treturn await marked.parseInline(fromPackageJson);\n\t}\n\n\t// Otherwise, if they do match, the README.md may have more rich HTML text.\n\treturn fromReadme;\n}\n"],"mappings":";;;;;;AAOA,eAAsB,gBACrB,gBACA,WACA,eACC;CAED,MAAM,EAAE,aAAa,oBAAoB,MAAM,gBAAgB;AAC/D,KAAI,CAAC,gBACJ;CAKD,MAAM,aAAa,MAAM,0BAA0B,UAAU;AAC7D,KAAI,CAAC,WACJ,QAAO,OAAO,YAAY,gBAAgB;AAK3C,KACE,MAAM,eAAe,KAAM,2BAC5B,oBAAoB,YAAY,YAEhC;CAGD,MAAM,4BAA4B,eACjC,MAAM,OAAO,YAAY,gBAAgB,CACzC;AAKD,KAJ6B,eAAe,WAAW,KAI1B,0BAC5B,QAAO,MAAM,OAAO,YAAY,gBAAgB;AAIjD,QAAO"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
//#region src/options/readDescriptionFromReadme.d.ts
|
|
2
2
|
declare function readDescriptionFromReadme(getReadme: () => Promise<string>): Promise<string | undefined>;
|
|
3
|
-
//# sourceMappingURL=readDescriptionFromReadme.d.ts.map
|
|
4
|
-
|
|
5
3
|
//#endregion
|
|
6
4
|
export { readDescriptionFromReadme };
|
|
7
5
|
//# sourceMappingURL=readDescriptionFromReadme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readDescriptionFromReadme.d.ts","names":[],"sources":["../../src/options/readDescriptionFromReadme.ts"],"sourcesContent":[],"mappings":";iBAGsB,yBAAA,kBACJ,kBAAe
|
|
1
|
+
{"version":3,"file":"readDescriptionFromReadme.d.ts","names":[],"sources":["../../src/options/readDescriptionFromReadme.ts"],"sourcesContent":[],"mappings":";iBAGsB,yBAAA,kBACJ,kBAAe"}
|
|
@@ -4,9 +4,9 @@ const paragraphStarter = `<p align="center">`;
|
|
|
4
4
|
async function readDescriptionFromReadme(getReadme) {
|
|
5
5
|
const readme = await getReadme();
|
|
6
6
|
const paragraphStart = readme.indexOf(paragraphStarter);
|
|
7
|
-
if (paragraphStart === -1) return
|
|
7
|
+
if (paragraphStart === -1) return;
|
|
8
8
|
const paragraphEnd = readme.indexOf(paragraphCloser);
|
|
9
|
-
if (paragraphEnd < paragraphStart + paragraphStarter.length + 2) return
|
|
9
|
+
if (paragraphEnd < paragraphStart + paragraphStarter.length + 2) return;
|
|
10
10
|
return readme.slice(paragraphStart + paragraphStarter.length, paragraphEnd).replaceAll(/\s+/gu, " ").trim();
|
|
11
11
|
}
|
|
12
12
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readDescriptionFromReadme.js","names":[
|
|
1
|
+
{"version":3,"file":"readDescriptionFromReadme.js","names":[],"sources":["../../src/options/readDescriptionFromReadme.ts"],"sourcesContent":["const paragraphCloser = \"</p>\";\nconst paragraphStarter = `<p align=\"center\">`;\n\nexport async function readDescriptionFromReadme(\n\tgetReadme: () => Promise<string>,\n) {\n\tconst readme = await getReadme();\n\n\tconst paragraphStart = readme.indexOf(paragraphStarter);\n\tif (paragraphStart === -1) {\n\t\treturn undefined;\n\t}\n\n\tconst paragraphEnd = readme.indexOf(paragraphCloser);\n\tif (paragraphEnd < paragraphStart + paragraphStarter.length + 2) {\n\t\treturn undefined;\n\t}\n\n\treturn readme\n\t\t.slice(paragraphStart + paragraphStarter.length, paragraphEnd)\n\t\t.replaceAll(/\\s+/gu, \" \")\n\t\t.trim();\n}\n"],"mappings":";AAAA,MAAM,kBAAkB;AACxB,MAAM,mBAAmB;AAEzB,eAAsB,0BACrB,WACC;CACD,MAAM,SAAS,MAAM,WAAW;CAEhC,MAAM,iBAAiB,OAAO,QAAQ,iBAAiB;AACvD,KAAI,mBAAmB,GACtB;CAGD,MAAM,eAAe,OAAO,QAAQ,gBAAgB;AACpD,KAAI,eAAe,iBAAiB,iBAAiB,SAAS,EAC7D;AAGD,QAAO,OACL,MAAM,iBAAiB,iBAAiB,QAAQ,aAAa,CAC7D,WAAW,SAAS,IAAI,CACxB,MAAM"}
|
|
@@ -2,8 +2,6 @@ import { TakeInput } from "bingo";
|
|
|
2
2
|
|
|
3
3
|
//#region src/options/readDevelopmentDocumentation.d.ts
|
|
4
4
|
declare function readDevelopmentDocumentation(take: TakeInput): Promise<string | undefined>;
|
|
5
|
-
//# sourceMappingURL=readDevelopmentDocumentation.d.ts.map
|
|
6
|
-
|
|
7
5
|
//#endregion
|
|
8
6
|
export { readDevelopmentDocumentation };
|
|
9
7
|
//# sourceMappingURL=readDevelopmentDocumentation.d.ts.map
|
|
@@ -12,7 +12,7 @@ const knownHeadings = new Set([
|
|
|
12
12
|
]);
|
|
13
13
|
async function readDevelopmentDocumentation(take) {
|
|
14
14
|
const existing = swallowError(await take(inputFromFile, { filePath: ".github/DEVELOPMENT.md" }));
|
|
15
|
-
if (!existing) return
|
|
15
|
+
if (!existing) return;
|
|
16
16
|
return existing.split(/\n\n(?=##\s)/).filter((section) => !knownHeadings.has(parseHeading(section))).join("\n\n");
|
|
17
17
|
}
|
|
18
18
|
function parseHeading(section) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readDevelopmentDocumentation.js","names":[
|
|
1
|
+
{"version":3,"file":"readDevelopmentDocumentation.js","names":[],"sources":["../../src/options/readDevelopmentDocumentation.ts"],"sourcesContent":["import { TakeInput } from \"bingo\";\nimport { inputFromFile } from \"input-from-file\";\n\nimport { swallowError } from \"../utils/swallowError.js\";\n\nconst knownHeadings = new Set([\n\t\"building\",\n\t\"development\",\n\t\"formatting\",\n\t\"linting\",\n\t\"testing\",\n\t\"type checking\",\n]);\n\nexport async function readDevelopmentDocumentation(take: TakeInput) {\n\tconst existing = swallowError(\n\t\tawait take(inputFromFile, {\n\t\t\tfilePath: \".github/DEVELOPMENT.md\",\n\t\t}),\n\t);\n\tif (!existing) {\n\t\treturn undefined;\n\t}\n\n\treturn existing\n\t\t.split(/\\n\\n(?=##\\s)/)\n\t\t.filter((section) => !knownHeadings.has(parseHeading(section)))\n\t\t.join(\"\\n\\n\");\n}\n\nfunction parseHeading(section: string) {\n\treturn section\n\t\t.split(\"\\n\")[0]\n\t\t.replace(/^#+\\s+/, \"\")\n\t\t.trim()\n\t\t.toLowerCase();\n}\n"],"mappings":";;;;AAKA,MAAM,gBAAgB,IAAI,IAAI;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA,CAAC;AAEF,eAAsB,6BAA6B,MAAiB;CACnE,MAAM,WAAW,aAChB,MAAM,KAAK,eAAe,EACzB,UAAU,0BACV,CAAC,CACF;AACD,KAAI,CAAC,SACJ;AAGD,QAAO,SACL,MAAM,eAAe,CACrB,QAAQ,YAAY,CAAC,cAAc,IAAI,aAAa,QAAQ,CAAC,CAAC,CAC9D,KAAK,OAAO;;AAGf,SAAS,aAAa,SAAiB;AACtC,QAAO,QACL,MAAM,KAAK,CAAC,GACZ,QAAQ,UAAU,GAAG,CACrB,MAAM,CACN,aAAa"}
|
|
@@ -2,8 +2,6 @@ import { Documentation } from "../schemas.js";
|
|
|
2
2
|
|
|
3
3
|
//#region src/options/readDocumentation.d.ts
|
|
4
4
|
declare function readDocumentation(getDevelopmentDocumentation: () => Promise<string | undefined>, getReadmeAdditional: () => Promise<string | undefined>, getReadmeExplainer: () => Promise<string | undefined>, getReadmeFootnotes: () => Promise<string | undefined>, getReadmeUsage: () => Promise<string | undefined>): Promise<Documentation>;
|
|
5
|
-
//# sourceMappingURL=readDocumentation.d.ts.map
|
|
6
|
-
|
|
7
5
|
//#endregion
|
|
8
6
|
export { readDocumentation };
|
|
9
7
|
//# sourceMappingURL=readDocumentation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readDocumentation.js","names":[
|
|
1
|
+
{"version":3,"file":"readDocumentation.js","names":[],"sources":["../../src/options/readDocumentation.ts"],"sourcesContent":["import { Documentation } from \"../schemas.js\";\n\nexport async function readDocumentation(\n\tgetDevelopmentDocumentation: () => Promise<string | undefined>,\n\tgetReadmeAdditional: () => Promise<string | undefined>,\n\tgetReadmeExplainer: () => Promise<string | undefined>,\n\tgetReadmeFootnotes: () => Promise<string | undefined>,\n\tgetReadmeUsage: () => Promise<string | undefined>,\n): Promise<Documentation> {\n\tconst [additional, explainer, footnotes, development, usage] =\n\t\tawait Promise.all([\n\t\t\tgetReadmeAdditional(),\n\t\t\tgetReadmeExplainer(),\n\t\t\tgetReadmeFootnotes(),\n\t\t\tgetDevelopmentDocumentation(),\n\t\t\tgetReadmeUsage(),\n\t\t]);\n\n\treturn {\n\t\tdevelopment,\n\t\treadme: {\n\t\t\tadditional,\n\t\t\texplainer,\n\t\t\tfootnotes,\n\t\t\tusage,\n\t\t},\n\t};\n}\n"],"mappings":";AAEA,eAAsB,kBACrB,6BACA,qBACA,oBACA,oBACA,gBACyB;CACzB,MAAM,CAAC,YAAY,WAAW,WAAW,aAAa,SACrD,MAAM,QAAQ,IAAI;EACjB,qBAAqB;EACrB,oBAAoB;EACpB,oBAAoB;EACpB,6BAA6B;EAC7B,gBAAgB;EAChB,CAAC;AAEH,QAAO;EACN;EACA,QAAQ;GACP;GACA;GACA;GACA;GACA;EACD"}
|
|
@@ -2,8 +2,6 @@ import { TakeInput } from "bingo";
|
|
|
2
2
|
|
|
3
3
|
//#region src/options/readEmailFromCodeOfConduct.d.ts
|
|
4
4
|
declare function readEmailFromCodeOfConduct(take: TakeInput): Promise<string | undefined>;
|
|
5
|
-
//# sourceMappingURL=readEmailFromCodeOfConduct.d.ts.map
|
|
6
|
-
|
|
7
5
|
//#endregion
|
|
8
6
|
export { readEmailFromCodeOfConduct };
|
|
9
7
|
//# sourceMappingURL=readEmailFromCodeOfConduct.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readEmailFromCodeOfConduct.js","names":[
|
|
1
|
+
{"version":3,"file":"readEmailFromCodeOfConduct.js","names":[],"sources":["../../src/options/readEmailFromCodeOfConduct.ts"],"sourcesContent":["import { TakeInput } from \"bingo\";\nimport { inputFromFile } from \"input-from-file\";\n\nexport async function readEmailFromCodeOfConduct(take: TakeInput) {\n\tconst codeOfConduct = await take(inputFromFile, {\n\t\tfilePath: \".github/CODE_OF_CONDUCT.md\",\n\t});\n\n\treturn typeof codeOfConduct === \"string\" &&\n\t\tcodeOfConduct.includes(\"Contributor Covenant Code of Conduct\")\n\t\t? /for enforcement at[\\r\\n]+(.+)\\.[\\r\\n]+All/.exec(codeOfConduct)?.[1]\n\t\t: undefined;\n}\n"],"mappings":";;;AAGA,eAAsB,2BAA2B,MAAiB;CACjE,MAAM,gBAAgB,MAAM,KAAK,eAAe,EAC/C,UAAU,8BACV,CAAC;AAEF,QAAO,OAAO,kBAAkB,YAC/B,cAAc,SAAS,uCAAuC,GAC5D,4CAA4C,KAAK,cAAc,GAAG,KAClE"}
|
|
@@ -2,8 +2,6 @@ import { TakeInput } from "bingo";
|
|
|
2
2
|
|
|
3
3
|
//#region src/options/readEmailFromGit.d.ts
|
|
4
4
|
declare function readEmailFromGit(take: TakeInput): Promise<string | undefined>;
|
|
5
|
-
//# sourceMappingURL=readEmailFromGit.d.ts.map
|
|
6
|
-
|
|
7
5
|
//#endregion
|
|
8
6
|
export { readEmailFromGit };
|
|
9
7
|
//# sourceMappingURL=readEmailFromGit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readEmailFromGit.js","names":[
|
|
1
|
+
{"version":3,"file":"readEmailFromGit.js","names":[],"sources":["../../src/options/readEmailFromGit.ts"],"sourcesContent":["import { TakeInput } from \"bingo\";\nimport { inputFromScript } from \"input-from-script\";\n\nexport async function readEmailFromGit(take: TakeInput) {\n\treturn (\n\t\tawait take(inputFromScript, { command: \"git config --get user.email\" })\n\t).stdout?.toString();\n}\n"],"mappings":";;;AAGA,eAAsB,iBAAiB,MAAiB;AACvD,SACC,MAAM,KAAK,iBAAiB,EAAE,SAAS,+BAA+B,CAAC,EACtE,QAAQ,UAAU"}
|
|
@@ -3,8 +3,6 @@ import { UserInfo } from "npm-user";
|
|
|
3
3
|
|
|
4
4
|
//#region src/options/readEmailFromNpm.d.ts
|
|
5
5
|
declare function readEmailFromNpm(getNpmDefaults: () => Promise<undefined | UserInfo>, getPackageAuthor: () => Promise<PackageAuthor>): Promise<string | undefined>;
|
|
6
|
-
//# sourceMappingURL=readEmailFromNpm.d.ts.map
|
|
7
|
-
|
|
8
6
|
//#endregion
|
|
9
7
|
export { readEmailFromNpm };
|
|
10
8
|
//# sourceMappingURL=readEmailFromNpm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readEmailFromNpm.js","names":[
|
|
1
|
+
{"version":3,"file":"readEmailFromNpm.js","names":[],"sources":["../../src/options/readEmailFromNpm.ts"],"sourcesContent":["import { UserInfo } from \"npm-user\";\n\nimport { PackageAuthor } from \"./readPackageAuthor.js\";\n\nexport async function readEmailFromNpm(\n\tgetNpmDefaults: () => Promise<undefined | UserInfo>,\n\tgetPackageAuthor: () => Promise<PackageAuthor>,\n) {\n\treturn (await getNpmDefaults())?.email ?? (await getPackageAuthor()).email;\n}\n"],"mappings":";AAIA,eAAsB,iBACrB,gBACA,kBACC;AACD,SAAQ,MAAM,gBAAgB,GAAG,UAAU,MAAM,kBAAkB,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readEmails.d.ts","names":[],"sources":["../../src/options/readEmails.ts"],"sourcesContent":[],"mappings":";;;iBAEsB,UAAA,kCACY,oDACV,oDACA,qDACC,QAAQ,iBAAc;;EAJzB,GAAA,EAAA,MAAA;
|
|
1
|
+
{"version":3,"file":"readEmails.d.ts","names":[],"sources":["../../src/options/readEmails.ts"],"sourcesContent":[],"mappings":";;;iBAEsB,UAAA,kCACY,oDACV,oDACA,qDACC,QAAQ,iBAAc;;EAJzB,GAAA,EAAA,MAAA;CACY,GAAA,SAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readEmails.js","names":[
|
|
1
|
+
{"version":3,"file":"readEmails.js","names":[],"sources":["../../src/options/readEmails.ts"],"sourcesContent":["import { PackageAuthor } from \"./readPackageAuthor.js\";\n\nexport async function readEmails(\n\tgetEmailFromCodeOfConduct: () => Promise<string | undefined>,\n\tgetEmailFromGit: () => Promise<string | undefined>,\n\tgetEmailFromNpm: () => Promise<string | undefined>,\n\tgetPackageAuthor: () => Promise<PackageAuthor>,\n) {\n\tconst github =\n\t\t(await getEmailFromCodeOfConduct()) ?? (await getEmailFromGit());\n\tconst npm =\n\t\t(await getPackageAuthor()).email ?? (await getEmailFromNpm()) ?? github;\n\n\treturn npm ? { github: github || npm, npm } : undefined;\n}\n"],"mappings":";AAEA,eAAsB,WACrB,2BACA,iBACA,iBACA,kBACC;CACD,MAAM,SACJ,MAAM,2BAA2B,IAAM,MAAM,iBAAiB;CAChE,MAAM,OACJ,MAAM,kBAAkB,EAAE,SAAU,MAAM,iBAAiB,IAAK;AAElE,QAAO,MAAM;EAAE,QAAQ,UAAU;EAAK;EAAK,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readEmoji.d.ts","names":[],"sources":["../../src/options/readEmoji.ts"],"sourcesContent":[],"mappings":";iBAAsB,SAAA,uBACC,8BAA2B
|
|
1
|
+
{"version":3,"file":"readEmoji.d.ts","names":[],"sources":["../../src/options/readEmoji.ts"],"sourcesContent":[],"mappings":";iBAAsB,SAAA,uBACC,8BAA2B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readEmoji.js","names":[
|
|
1
|
+
{"version":3,"file":"readEmoji.js","names":[],"sources":["../../src/options/readEmoji.ts"],"sourcesContent":["export async function readEmoji(\n\tgetDescription: () => Promise<string | undefined>,\n) {\n\treturn (\n\t\t(await getDescription())?.match(/\\p{Extended_Pictographic}/gu)?.at(-1) ??\n\t\t\"💖\"\n\t);\n}\n"],"mappings":";AAAA,eAAsB,UACrB,gBACC;AACD,SACE,MAAM,gBAAgB,GAAG,MAAM,8BAA8B,EAAE,GAAG,GAAG,IACtE"}
|
|
@@ -6,8 +6,6 @@ declare function readExistingLabels(take: TakeInput, getOwner: () => Promise<str
|
|
|
6
6
|
description: string;
|
|
7
7
|
name: string;
|
|
8
8
|
}[]>;
|
|
9
|
-
//# sourceMappingURL=readExistingLabels.d.ts.map
|
|
10
|
-
|
|
11
9
|
//#endregion
|
|
12
10
|
export { readExistingLabels };
|
|
13
11
|
//# sourceMappingURL=readExistingLabels.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readExistingLabels.d.ts","names":[],"sources":["../../src/options/readExistingLabels.ts"],"sourcesContent":[],"mappings":";;;iBAMsB,kBAAA,OACf,2BACU,kDACK,8BAA2B;;EAH3B,WAAA,EAAA,MAAA;
|
|
1
|
+
{"version":3,"file":"readExistingLabels.d.ts","names":[],"sources":["../../src/options/readExistingLabels.ts"],"sourcesContent":[],"mappings":";;;iBAMsB,kBAAA,OACf,2BACU,kDACK,8BAA2B;;EAH3B,WAAA,EAAA,MAAA;EACf,IAAA,EAAA,MAAA;CACU,EAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readExistingLabels.js","names":[
|
|
1
|
+
{"version":3,"file":"readExistingLabels.js","names":[],"sources":["../../src/options/readExistingLabels.ts"],"sourcesContent":["import { TakeInput } from \"bingo\";\nimport { githubDefaultLabels } from \"github-default-labels\";\nimport { OutcomeLabel } from \"set-github-repository-labels\";\n\nimport { inputFromOctokit } from \"../inputs/inputFromOctokit.js\";\n\nexport async function readExistingLabels(\n\ttake: TakeInput,\n\tgetOwner: () => Promise<string | undefined>,\n\tgetRepository: () => Promise<string | undefined>,\n) {\n\tconst [owner, repository] = await Promise.all([getOwner(), getRepository()]);\n\n\t// When transitioning an existing repo, it should already have labels\n\tconst existingLabelsActual =\n\t\towner &&\n\t\trepository &&\n\t\t((await take(inputFromOctokit, {\n\t\t\tendpoint: \"GET /repos/{owner}/{repo}/labels\",\n\t\t\toptions: {\n\t\t\t\towner,\n\t\t\t\trepo: repository,\n\t\t\t},\n\t\t})) as OutcomeLabel[] | undefined);\n\n\tif (existingLabelsActual) {\n\t\t// The labels API includes more properties than we use\n\t\treturn existingLabelsActual.map((label) => ({\n\t\t\tcolor: label.color,\n\t\t\tdescription: label.description,\n\t\t\tname: label.name,\n\t\t}));\n\t}\n\n\t// In setup mode, options evaluate before creating the repository.\n\t// We'd want the owner's defaults in case they've customized them...\n\t// ...except, GitHub doesn't have an API for this 🙁.\n\t// We instead go with the known default labels:\n\treturn githubDefaultLabels;\n}\n"],"mappings":";;;;AAMA,eAAsB,mBACrB,MACA,UACA,eACC;CACD,MAAM,CAAC,OAAO,cAAc,MAAM,QAAQ,IAAI,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC;CAG5E,MAAM,uBACL,SACA,cACE,MAAM,KAAK,kBAAkB;EAC9B,UAAU;EACV,SAAS;GACR;GACA,MAAM;GACN;EACD,CAAC;AAEH,KAAI,qBAEH,QAAO,qBAAqB,KAAK,WAAW;EAC3C,OAAO,MAAM;EACb,aAAa,MAAM;EACnB,MAAM,MAAM;EACZ,EAAE;AAOJ,QAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readFileAsJson.d.ts","names":[],"sources":["../../src/options/readFileAsJson.ts"],"sourcesContent":[],"mappings":";iBAEsB,cAAA,oBAA+B
|
|
1
|
+
{"version":3,"file":"readFileAsJson.d.ts","names":[],"sources":["../../src/options/readFileAsJson.ts"],"sourcesContent":[],"mappings":";iBAEsB,cAAA,oBAA+B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readFileAsJson.js","names":[
|
|
1
|
+
{"version":3,"file":"readFileAsJson.js","names":[],"sources":["../../src/options/readFileAsJson.ts"],"sourcesContent":["import * as fs from \"node:fs/promises\";\n\nexport async function readFileAsJson(filePath: string) {\n\ttry {\n\t\treturn JSON.parse((await fs.readFile(filePath)).toString()) as unknown;\n\t} catch (error) {\n\t\tthrow new Error(\n\t\t\t`Could not read file from ${filePath} as JSON. Please ensure the file exists and is valid JSON.`,\n\t\t\t{ cause: error },\n\t\t);\n\t}\n}\n"],"mappings":";;;AAEA,eAAsB,eAAe,UAAkB;AACtD,KAAI;AACH,SAAO,KAAK,OAAO,MAAM,GAAG,SAAS,SAAS,EAAE,UAAU,CAAC;UACnD,OAAO;AACf,QAAM,IAAI,MACT,4BAA4B,SAAS,6DACrC,EAAE,OAAO,OAAO,CAChB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readFileSafe.d.ts","names":[],"sources":["../../src/options/readFileSafe.ts"],"sourcesContent":[],"mappings":";iBAEsB,YAAA,oBAAgC,wBAAqB
|
|
1
|
+
{"version":3,"file":"readFileSafe.d.ts","names":[],"sources":["../../src/options/readFileSafe.ts"],"sourcesContent":[],"mappings":";iBAEsB,YAAA,oBAAgC,wBAAqB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readFileSafe.js","names":[
|
|
1
|
+
{"version":3,"file":"readFileSafe.js","names":[],"sources":["../../src/options/readFileSafe.ts"],"sourcesContent":["import * as fs from \"node:fs/promises\";\n\nexport async function readFileSafe(filePath: string | URL, fallback: string) {\n\ttry {\n\t\treturn (await fs.readFile(filePath)).toString();\n\t} catch {\n\t\treturn fallback;\n\t}\n}\n"],"mappings":";;;AAEA,eAAsB,aAAa,UAAwB,UAAkB;AAC5E,KAAI;AACH,UAAQ,MAAM,GAAG,SAAS,SAAS,EAAE,UAAU;SACxC;AACP,SAAO"}
|
|
@@ -2,8 +2,6 @@ import { TakeInput } from "bingo";
|
|
|
2
2
|
|
|
3
3
|
//#region src/options/readFunding.d.ts
|
|
4
4
|
declare function readFunding(take: TakeInput): Promise<string | undefined>;
|
|
5
|
-
//# sourceMappingURL=readFunding.d.ts.map
|
|
6
|
-
|
|
7
5
|
//#endregion
|
|
8
6
|
export { readFunding };
|
|
9
7
|
//# sourceMappingURL=readFunding.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readFunding.js","names":[
|
|
1
|
+
{"version":3,"file":"readFunding.js","names":[],"sources":["../../src/options/readFunding.ts"],"sourcesContent":["import { TakeInput } from \"bingo\";\nimport { inputFromFile } from \"input-from-file\";\n\nimport { swallowError } from \"../utils/swallowError.js\";\n\nexport async function readFunding(take: TakeInput) {\n\treturn swallowError(\n\t\tawait take(inputFromFile, { filePath: \".github/FUNDING.yml\" }),\n\t)\n\t\t?.split(\":\")[1]\n\t\t?.trim();\n}\n"],"mappings":";;;;AAKA,eAAsB,YAAY,MAAiB;AAClD,QAAO,aACN,MAAM,KAAK,eAAe,EAAE,UAAU,uBAAuB,CAAC,CAC9D,EACE,MAAM,IAAI,CAAC,IACX,MAAM"}
|
|
@@ -3,8 +3,6 @@ import gitUrlParse from "git-url-parse";
|
|
|
3
3
|
|
|
4
4
|
//#region src/options/readGitDefaults.d.ts
|
|
5
5
|
declare function readGitDefaults(take: TakeInput): Promise<gitUrlParse.GitUrl | undefined>;
|
|
6
|
-
//# sourceMappingURL=readGitDefaults.d.ts.map
|
|
7
|
-
|
|
8
6
|
//#endregion
|
|
9
7
|
export { readGitDefaults };
|
|
10
8
|
//# sourceMappingURL=readGitDefaults.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readGitDefaults.js","names":[
|
|
1
|
+
{"version":3,"file":"readGitDefaults.js","names":[],"sources":["../../src/options/readGitDefaults.ts"],"sourcesContent":["import { TakeInput } from \"bingo\";\nimport gitUrlParse from \"git-url-parse\";\nimport { inputFromScript } from \"input-from-script\";\n\nexport async function readGitDefaults(take: TakeInput) {\n\tconst url = await take(inputFromScript, {\n\t\tcommand: \"git remote get-url origin\",\n\t});\n\n\treturn url.stdout ? gitUrlParse(url.stdout.toString()) : undefined;\n}\n"],"mappings":";;;;AAIA,eAAsB,gBAAgB,MAAiB;CACtD,MAAM,MAAM,MAAM,KAAK,iBAAiB,EACvC,SAAS,6BACT,CAAC;AAEF,QAAO,IAAI,SAAS,YAAY,IAAI,OAAO,UAAU,CAAC,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readGuide.d.ts","names":[],"sources":["../../src/options/readGuide.ts"],"sourcesContent":[],"mappings":";;;iBAGsB,SAAA,OAAgB,YAAS;;EAAzB,KAAA,EAAA,MAAS
|
|
1
|
+
{"version":3,"file":"readGuide.d.ts","names":[],"sources":["../../src/options/readGuide.ts"],"sourcesContent":[],"mappings":";;;iBAGsB,SAAA,OAAgB,YAAS;;EAAzB,KAAA,EAAA,MAAS"}
|
package/lib/options/readGuide.js
CHANGED
|
@@ -3,9 +3,9 @@ import { inputFromFile } from "input-from-file";
|
|
|
3
3
|
//#region src/options/readGuide.ts
|
|
4
4
|
async function readGuide(take) {
|
|
5
5
|
const development = await take(inputFromFile, { filePath: ".github/DEVELOPMENT.md" });
|
|
6
|
-
if (development instanceof Error) return
|
|
6
|
+
if (development instanceof Error) return;
|
|
7
7
|
const tag = /> .*guided walkthrough, see \[((?!\[).+)\]\((.+)\)/i.exec(development);
|
|
8
|
-
if (!tag) return
|
|
8
|
+
if (!tag) return;
|
|
9
9
|
return {
|
|
10
10
|
href: tag[2],
|
|
11
11
|
title: tag[1]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readGuide.js","names":[
|
|
1
|
+
{"version":3,"file":"readGuide.js","names":[],"sources":["../../src/options/readGuide.ts"],"sourcesContent":["import { TakeInput } from \"bingo\";\nimport { inputFromFile } from \"input-from-file\";\n\nexport async function readGuide(take: TakeInput) {\n\tconst development = await take(inputFromFile, {\n\t\tfilePath: \".github/DEVELOPMENT.md\",\n\t});\n\n\tif (development instanceof Error) {\n\t\treturn undefined;\n\t}\n\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":";;;AAGA,eAAsB,UAAU,MAAiB;CAChD,MAAM,cAAc,MAAM,KAAK,eAAe,EAC7C,UAAU,0BACV,CAAC;AAEF,KAAI,uBAAuB,MAC1B;CAGD,MAAM,MAAM,sDAAsD,KACjE,YACA;AAED,KAAI,CAAC,IACJ;AAGD,QAAO;EACN,MAAM,IAAI;EACV,OAAO,IAAI;EACX"}
|
|
@@ -2,8 +2,6 @@ import { PartialPackageData } from "../types.js";
|
|
|
2
2
|
|
|
3
3
|
//#region src/options/readKeywords.d.ts
|
|
4
4
|
declare function readKeywords(getPackageData: () => Promise<PartialPackageData>): Promise<string[] | undefined>;
|
|
5
|
-
//# sourceMappingURL=readKeywords.d.ts.map
|
|
6
|
-
|
|
7
5
|
//#endregion
|
|
8
6
|
export { readKeywords };
|
|
9
7
|
//# sourceMappingURL=readKeywords.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readKeywords.js","names":[
|
|
1
|
+
{"version":3,"file":"readKeywords.js","names":[],"sources":["../../src/options/readKeywords.ts"],"sourcesContent":["import { PartialPackageData } from \"../types.js\";\n\nexport async function readKeywords(\n\tgetPackageData: () => Promise<PartialPackageData>,\n) {\n\tconst { keywords } = await getPackageData();\n\n\treturn (\n\t\tkeywords && Array.from(new Set((await getPackageData()).keywords)).sort()\n\t);\n}\n"],"mappings":";AAEA,eAAsB,aACrB,gBACC;CACD,MAAM,EAAE,aAAa,MAAM,gBAAgB;AAE3C,QACC,YAAY,MAAM,KAAK,IAAI,KAAK,MAAM,gBAAgB,EAAE,SAAS,CAAC,CAAC,MAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readLogo.d.ts","names":[],"sources":["../../src/options/readLogo.ts"],"sourcesContent":[],"mappings":";iBAIsB,QAAA,kBAA0B,kBAAe;EAAzC,MAAA,CAAA,EAAA,MAAQ
|
|
1
|
+
{"version":3,"file":"readLogo.d.ts","names":[],"sources":["../../src/options/readLogo.ts"],"sourcesContent":[],"mappings":";iBAIsB,QAAA,kBAA0B,kBAAe;EAAzC,MAAA,CAAA,EAAA,MAAQ"}
|
package/lib/options/readLogo.js
CHANGED
|
@@ -4,16 +4,15 @@ import * as fs from "node:fs/promises";
|
|
|
4
4
|
//#region src/options/readLogo.ts
|
|
5
5
|
async function readLogo(getReadme) {
|
|
6
6
|
const tag = /\n<img.+src=.+>/.exec(await getReadme())?.[0];
|
|
7
|
-
if (!tag) return
|
|
7
|
+
if (!tag) return;
|
|
8
8
|
const alt = /alt=['"](.+)['"]\s*src=/.exec(tag)?.[1].split(/['"]?\s*\w+=/)[0] ?? "Project logo";
|
|
9
|
-
if (/All Contributors: \d+/.test(alt)) return
|
|
9
|
+
if (/All Contributors: \d+/.test(alt)) return;
|
|
10
10
|
const src = /src\s*=(.+)['"/]>/.exec(tag)?.[1]?.split(/\s*\w+=/)[0].replaceAll(/^['"]|['"]$/g, "");
|
|
11
|
-
if (!src || src.includes("//img.shields.io")) return
|
|
12
|
-
const bufferData = await fs.readFile(src);
|
|
11
|
+
if (!src || src.includes("//img.shields.io")) return;
|
|
13
12
|
return {
|
|
14
13
|
alt,
|
|
15
14
|
src,
|
|
16
|
-
...readLogoSizing(
|
|
15
|
+
...readLogoSizing(await fs.readFile(src))
|
|
17
16
|
};
|
|
18
17
|
}
|
|
19
18
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readLogo.js","names":[
|
|
1
|
+
{"version":3,"file":"readLogo.js","names":[],"sources":["../../src/options/readLogo.ts"],"sourcesContent":["import * as fs from \"node:fs/promises\";\n\nimport { readLogoSizing } from \"./readLogoSizing.js\";\n\nexport async function readLogo(getReadme: () => Promise<string>) {\n\tconst tag = /\\n<img.+src=.+>/.exec(await getReadme())?.[0];\n\n\tif (!tag) {\n\t\treturn undefined;\n\t}\n\n\tconst alt =\n\t\t/alt=['\"](.+)['\"]\\s*src=/.exec(tag)?.[1].split(/['\"]?\\s*\\w+=/)[0] ??\n\t\t\"Project logo\";\n\n\tif (/All Contributors: \\d+/.test(alt)) {\n\t\treturn undefined;\n\t}\n\n\tconst src = /src\\s*=(.+)['\"/]>/\n\t\t.exec(tag)?.[1]\n\t\t?.split(/\\s*\\w+=/)[0]\n\t\t.replaceAll(/^['\"]|['\"]$/g, \"\");\n\n\tif (!src || src.includes(\"//img.shields.io\")) {\n\t\treturn undefined;\n\t}\n\n\t// TODO: imageSize does not go through take(input*), making it harder to test.\n\t// It takes either a string (fs access) or buffer data (not in bingo-fs).\n\t// https://github.com/JoshuaKGoldberg/create-typescript-app/issues/1993\n\tconst bufferData = await fs.readFile(src);\n\n\treturn {\n\t\talt,\n\t\tsrc,\n\t\t...readLogoSizing(bufferData),\n\t};\n}\n"],"mappings":";;;;AAIA,eAAsB,SAAS,WAAkC;CAChE,MAAM,MAAM,kBAAkB,KAAK,MAAM,WAAW,CAAC,GAAG;AAExD,KAAI,CAAC,IACJ;CAGD,MAAM,MACL,0BAA0B,KAAK,IAAI,GAAG,GAAG,MAAM,eAAe,CAAC,MAC/D;AAED,KAAI,wBAAwB,KAAK,IAAI,CACpC;CAGD,MAAM,MAAM,oBACV,KAAK,IAAI,GAAG,IACX,MAAM,UAAU,CAAC,GAClB,WAAW,gBAAgB,GAAG;AAEhC,KAAI,CAAC,OAAO,IAAI,SAAS,mBAAmB,CAC3C;AAQD,QAAO;EACN;EACA;EACA,GAAG,eALe,MAAM,GAAG,SAAS,IAAI,CAKX;EAC7B"}
|
|
@@ -4,8 +4,6 @@ interface OptionsLogoSizing {
|
|
|
4
4
|
width?: number;
|
|
5
5
|
}
|
|
6
6
|
declare function readLogoSizing(src: Uint8Array): OptionsLogoSizing | undefined;
|
|
7
|
-
//# sourceMappingURL=readLogoSizing.d.ts.map
|
|
8
|
-
|
|
9
7
|
//#endregion
|
|
10
8
|
export { OptionsLogoSizing, readLogoSizing };
|
|
11
9
|
//# sourceMappingURL=readLogoSizing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readLogoSizing.d.ts","names":[],"sources":["../../src/options/readLogoSizing.ts"],"sourcesContent":[],"mappings":";UAIiB,iBAAA;EAAA,MAAA,CAAA,EAAA,MAAA;EAKD,KAAA,CAAA,EAAA,MAAA;;
|
|
1
|
+
{"version":3,"file":"readLogoSizing.d.ts","names":[],"sources":["../../src/options/readLogoSizing.ts"],"sourcesContent":[],"mappings":";UAIiB,iBAAA;EAAA,MAAA,CAAA,EAAA,MAAA;EAKD,KAAA,CAAA,EAAA,MAAA;;iBAAA,cAAA,MAAoB,aAAa"}
|
|
@@ -4,7 +4,7 @@ import { imageSize } from "image-size";
|
|
|
4
4
|
const maximum = 128;
|
|
5
5
|
function readLogoSizing(src) {
|
|
6
6
|
const size = imageSizeSafe(src);
|
|
7
|
-
if (!size) return
|
|
7
|
+
if (!size) return;
|
|
8
8
|
if (!size.height) return size.width ? { width: Math.min(size.width, maximum) } : void 0;
|
|
9
9
|
if (!size.width) return { height: Math.min(size.height, maximum) };
|
|
10
10
|
if (size.height <= maximum && size.width <= maximum) return {
|
|
@@ -23,7 +23,7 @@ function imageSizeSafe(src) {
|
|
|
23
23
|
try {
|
|
24
24
|
return imageSize(src);
|
|
25
25
|
} catch {
|
|
26
|
-
return
|
|
26
|
+
return;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readLogoSizing.js","names":[
|
|
1
|
+
{"version":3,"file":"readLogoSizing.js","names":[],"sources":["../../src/options/readLogoSizing.ts"],"sourcesContent":["import { imageSize } from \"image-size\";\n\nconst maximum = 128;\n\nexport interface OptionsLogoSizing {\n\theight?: number;\n\twidth?: number;\n}\n\nexport function readLogoSizing(src: Uint8Array): OptionsLogoSizing | undefined {\n\tconst size = imageSizeSafe(src);\n\tif (!size) {\n\t\treturn undefined;\n\t}\n\n\tif (!size.height) {\n\t\treturn size.width ? { width: Math.min(size.width, maximum) } : undefined;\n\t}\n\n\tif (!size.width) {\n\t\treturn { height: Math.min(size.height, maximum) };\n\t}\n\n\tif (size.height <= maximum && size.width <= maximum) {\n\t\treturn { height: size.height, width: size.width };\n\t}\n\n\treturn size.height > size.width\n\t\t? { height: maximum, width: (size.width / size.height) * maximum }\n\t\t: { height: (size.height / size.width) * maximum, width: maximum };\n}\n\nfunction imageSizeSafe(src: Uint8Array) {\n\ttry {\n\t\t// TODO: imageSize does not go through take(input*), making it harder to test.\n\t\t// It takes either a string (fs access) or buffer data (not in bingo-fs).\n\t\t// https://github.com/JoshuaKGoldberg/create-typescript-app/issues/1993\n\t\treturn imageSize(src);\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n"],"mappings":";;;AAEA,MAAM,UAAU;AAOhB,SAAgB,eAAe,KAAgD;CAC9E,MAAM,OAAO,cAAc,IAAI;AAC/B,KAAI,CAAC,KACJ;AAGD,KAAI,CAAC,KAAK,OACT,QAAO,KAAK,QAAQ,EAAE,OAAO,KAAK,IAAI,KAAK,OAAO,QAAQ,EAAE,GAAG;AAGhE,KAAI,CAAC,KAAK,MACT,QAAO,EAAE,QAAQ,KAAK,IAAI,KAAK,QAAQ,QAAQ,EAAE;AAGlD,KAAI,KAAK,UAAU,WAAW,KAAK,SAAS,QAC3C,QAAO;EAAE,QAAQ,KAAK;EAAQ,OAAO,KAAK;EAAO;AAGlD,QAAO,KAAK,SAAS,KAAK,QACvB;EAAE,QAAQ;EAAS,OAAQ,KAAK,QAAQ,KAAK,SAAU;EAAS,GAChE;EAAE,QAAS,KAAK,SAAS,KAAK,QAAS;EAAS,OAAO;EAAS;;AAGpE,SAAS,cAAc,KAAiB;AACvC,KAAI;AAIH,SAAO,UAAU,IAAI;SACd;AACP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readNode.d.ts","names":[],"sources":["../../src/options/readNode.ts"],"sourcesContent":[],"mappings":";;;iBAIsB,QAAA,iBACL,QAAQ,2CACE,QAAQ,sBAAmB;;EAFhC,MAAA,EAAA,MAAQ;
|
|
1
|
+
{"version":3,"file":"readNode.d.ts","names":[],"sources":["../../src/options/readNode.ts"],"sourcesContent":[],"mappings":";;;iBAIsB,QAAA,iBACL,QAAQ,2CACE,QAAQ,sBAAmB;;EAFhC,MAAA,EAAA,MAAQ;CACL,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readNode.js","names":[
|
|
1
|
+
{"version":3,"file":"readNode.js","names":[],"sources":["../../src/options/readNode.ts"],"sourcesContent":["import { defaults } from \"../constants.js\";\nimport { PartialPackageData } from \"../types.js\";\nimport { swallowError } from \"../utils/swallowError.js\";\n\nexport async function readNode(\n\tgetNvmrc: () => Promise<Error | string>,\n\tgetPackageDataFull: () => Promise<PartialPackageData>,\n) {\n\tconst { engines } = await getPackageDataFull();\n\n\treturn {\n\t\tminimum:\n\t\t\t(engines?.node && /[\\d+.]+/.exec(engines.node))?.[0] ??\n\t\t\tdefaults.node.minimum,\n\t\tpinned: swallowError(await getNvmrc())?.trim() || defaults.node.pinned,\n\t};\n}\n"],"mappings":";;;;AAIA,eAAsB,SACrB,UACA,oBACC;CACD,MAAM,EAAE,YAAY,MAAM,oBAAoB;AAE9C,QAAO;EACN,UACE,SAAS,QAAQ,UAAU,KAAK,QAAQ,KAAK,IAAI,MAClD,SAAS,KAAK;EACf,QAAQ,aAAa,MAAM,UAAU,CAAC,EAAE,MAAM,IAAI,SAAS,KAAK;EAChE"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as npm_user0 from "npm-user";
|
|
2
2
|
import { ExecaError, Result } from "execa";
|
|
3
3
|
|
|
4
4
|
//#region src/options/readNpmDefaults.d.ts
|
|
5
|
-
declare function readNpmDefaults(getNpmWhoami: () => Promise<ExecaError | Result | undefined>): Promise<
|
|
6
|
-
//# sourceMappingURL=readNpmDefaults.d.ts.map
|
|
7
|
-
|
|
5
|
+
declare function readNpmDefaults(getNpmWhoami: () => Promise<ExecaError | Result | undefined>): Promise<npm_user0.UserInfo | undefined>;
|
|
8
6
|
//#endregion
|
|
9
7
|
export { readNpmDefaults };
|
|
10
8
|
//# sourceMappingURL=readNpmDefaults.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readNpmDefaults.d.ts","names":[],"sources":["../../src/options/readNpmDefaults.ts"],"sourcesContent":[],"mappings":";;;;iBAOsB,eAAA,qBACD,QAAQ,aAAa,sBAAmB,QAAjC,
|
|
1
|
+
{"version":3,"file":"readNpmDefaults.d.ts","names":[],"sources":["../../src/options/readNpmDefaults.ts"],"sourcesContent":[],"mappings":";;;;iBAOsB,eAAA,qBACD,QAAQ,aAAa,sBAAmB,QAAjC,SAAA,CAAiC,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readNpmDefaults.js","names":[
|
|
1
|
+
{"version":3,"file":"readNpmDefaults.js","names":[],"sources":["../../src/options/readNpmDefaults.ts"],"sourcesContent":["import { ExecaError, Result } from \"execa\";\nimport npmUser from \"npm-user\";\n\nimport { swallowErrorAsync } from \"../utils/swallowErrorAsync.js\";\n\n// TODO: npmUser does not go through take(input*), making it harder to test.\n// https://github.com/JoshuaKGoldberg/create-typescript-app/issues/1990\nexport async function readNpmDefaults(\n\tgetNpmWhoami: () => Promise<ExecaError | Result | undefined>,\n) {\n\tconst whoami = await getNpmWhoami();\n\treturn typeof whoami?.stdout === \"string\"\n\t\t? await swallowErrorAsync(npmUser(whoami.stdout))\n\t\t: undefined;\n}\n"],"mappings":";;;;AAOA,eAAsB,gBACrB,cACC;CACD,MAAM,SAAS,MAAM,cAAc;AACnC,QAAO,OAAO,QAAQ,WAAW,WAC9B,MAAM,kBAAkB,QAAQ,OAAO,OAAO,CAAC,GAC/C"}
|
|
@@ -4,8 +4,6 @@ import { GitUrl } from "git-url-parse";
|
|
|
4
4
|
|
|
5
5
|
//#region src/options/readOwner.d.ts
|
|
6
6
|
declare function readOwner(take: TakeInput, getGitDefaults: () => Promise<GitUrl | undefined>, getPackageAuthor: () => Promise<PackageAuthor>): Promise<string | undefined>;
|
|
7
|
-
//# sourceMappingURL=readOwner.d.ts.map
|
|
8
|
-
|
|
9
7
|
//#endregion
|
|
10
8
|
export { readOwner };
|
|
11
9
|
//# sourceMappingURL=readOwner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readOwner.js","names":[
|
|
1
|
+
{"version":3,"file":"readOwner.js","names":[],"sources":["../../src/options/readOwner.ts"],"sourcesContent":["import { TakeInput } from \"bingo\";\nimport { GitUrl } from \"git-url-parse\";\nimport { inputFromScript } from \"input-from-script\";\n\nimport { PackageAuthor } from \"./readPackageAuthor.js\";\n\nexport async function readOwner(\n\ttake: TakeInput,\n\tgetGitDefaults: () => Promise<GitUrl | undefined>,\n\tgetPackageAuthor: () => Promise<PackageAuthor>,\n) {\n\treturn (\n\t\t(await getGitDefaults())?.organization ??\n\t\t(await getPackageAuthor()).name ??\n\t\t(\n\t\t\tawait take(inputFromScript, {\n\t\t\t\tcommand: \"gh config get user -h github.com\",\n\t\t\t})\n\t\t).stdout?.toString()\n\t);\n}\n"],"mappings":";;;AAMA,eAAsB,UACrB,MACA,gBACA,kBACC;AACD,SACE,MAAM,gBAAgB,GAAG,iBACzB,MAAM,kBAAkB,EAAE,SAE1B,MAAM,KAAK,iBAAiB,EAC3B,SAAS,oCACT,CAAC,EACD,QAAQ,UAAU"}
|
|
@@ -6,8 +6,6 @@ interface PackageAuthor {
|
|
|
6
6
|
name?: string | undefined;
|
|
7
7
|
}
|
|
8
8
|
declare function readPackageAuthor(getPackageDataFull: () => Promise<PartialPackageData>): Promise<PackageAuthor>;
|
|
9
|
-
//# sourceMappingURL=readPackageAuthor.d.ts.map
|
|
10
|
-
|
|
11
9
|
//#endregion
|
|
12
10
|
export { PackageAuthor, readPackageAuthor };
|
|
13
11
|
//# sourceMappingURL=readPackageAuthor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readPackageAuthor.d.ts","names":[],"sources":["../../src/options/readPackageAuthor.ts"],"sourcesContent":[],"mappings":";;;UAIiB,aAAA;;EAAA,IAAA,CAAA,EAAA,MAAA,GAAa,SAAA;AAK9B;
|
|
1
|
+
{"version":3,"file":"readPackageAuthor.d.ts","names":[],"sources":["../../src/options/readPackageAuthor.ts"],"sourcesContent":[],"mappings":";;;UAIiB,aAAA;;EAAA,IAAA,CAAA,EAAA,MAAA,GAAa,SAAA;AAK9B;AACmC,iBADb,iBAAA,CACa,kBAAA,EAAA,GAAA,GAAR,OAAQ,CAAA,kBAAA,CAAA,CAAA,EAChC,OADgC,CACxB,aADwB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readPackageAuthor.js","names":[
|
|
1
|
+
{"version":3,"file":"readPackageAuthor.js","names":[],"sources":["../../src/options/readPackageAuthor.ts"],"sourcesContent":["import parse from \"parse-author\";\n\nimport { PartialPackageData } from \"../types.js\";\n\nexport interface PackageAuthor {\n\temail?: string | undefined;\n\tname?: string | undefined;\n}\n\nexport async function readPackageAuthor(\n\tgetPackageDataFull: () => Promise<PartialPackageData>,\n): Promise<PackageAuthor> {\n\tconst packageData = await getPackageDataFull();\n\n\tswitch (typeof packageData.author) {\n\t\tcase \"object\":\n\t\t\treturn packageData.author;\n\n\t\tcase \"string\":\n\t\t\treturn parse(packageData.author);\n\n\t\tdefault:\n\t\t\treturn {};\n\t}\n}\n"],"mappings":";;;AASA,eAAsB,kBACrB,oBACyB;CACzB,MAAM,cAAc,MAAM,oBAAoB;AAE9C,SAAQ,OAAO,YAAY,QAA3B;EACC,KAAK,SACJ,QAAO,YAAY;EAEpB,KAAK,SACJ,QAAO,MAAM,YAAY,OAAO;EAEjC,QACC,QAAO,EAAE"}
|
|
@@ -3,8 +3,6 @@ import { TakeInput } from "bingo";
|
|
|
3
3
|
|
|
4
4
|
//#region src/options/readPackageData.d.ts
|
|
5
5
|
declare function readPackageData(take: TakeInput): Promise<PartialPackageData>;
|
|
6
|
-
//# sourceMappingURL=readPackageData.d.ts.map
|
|
7
|
-
|
|
8
6
|
//#endregion
|
|
9
7
|
export { readPackageData };
|
|
10
8
|
//# sourceMappingURL=readPackageData.d.ts.map
|