create-typescript-app 2.49.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 +0 -1
- 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 +0 -1
- package/lib/blocks/blockContributingDocs.d.ts.map +1 -1
- package/lib/blocks/blockContributingDocs.js.map +1 -1
- package/lib/blocks/blockContributorCovenant.d.ts +0 -1
- package/lib/blocks/blockContributorCovenant.d.ts.map +1 -1
- package/lib/blocks/blockContributorCovenant.js.map +1 -1
- package/lib/blocks/blockDevelopmentDocs.d.ts +2 -3
- package/lib/blocks/blockDevelopmentDocs.d.ts.map +1 -1
- package/lib/blocks/blockDevelopmentDocs.js.map +1 -1
- package/lib/blocks/blockESLint.d.ts +2 -3
- package/lib/blocks/blockESLint.d.ts.map +1 -1
- package/lib/blocks/blockESLint.js +2 -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 +2 -3
- 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 +2 -3
- 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 +2 -3
- 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 +2 -3
- 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 +0 -2
- 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 +50 -50
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blockTemplatedWith.js","names":[],"sources":["../../src/blocks/blockTemplatedWith.ts"],"sourcesContent":["import { base } from \"../base.js\";\nimport { blockREADME } from \"./blockREADME.js\";\n\nexport const blockTemplatedWith = base.createBlock({\n\tabout: {\n\t\tname: \"Templated With\",\n\t},\n\tproduce({ options }) {\n\t\treturn {\n\t\t\taddons: [\n\t\t\t\tblockREADME({\n\t\t\t\t\tnotices: [\n\t\t\t\t\t\toptions.owner !== \"JoshuaKGoldberg\" &&\n\t\t\t\t\t\t\t`\n<!-- You can remove this notice if you don't want it 🙂 no worries! -->`,\n\t\t\t\t\t\t`> 💝 This package was templated with [\\`create-typescript-app\\`](https://github.com/JoshuaKGoldberg/create-typescript-app) using the [Bingo framework](https://create.bingo).\n`,\n\t\t\t\t\t].filter((notice) => typeof notice === \"string\"),\n\t\t\t\t}),\n\t\t\t],\n\t\t};\n\t},\n});\n"],"mappings":";;;;AAGA,MAAa,qBAAqB,KAAK,YAAY;CAClD,OAAO,EACN,MAAM,
|
|
1
|
+
{"version":3,"file":"blockTemplatedWith.js","names":[],"sources":["../../src/blocks/blockTemplatedWith.ts"],"sourcesContent":["import { base } from \"../base.js\";\nimport { blockREADME } from \"./blockREADME.js\";\n\nexport const blockTemplatedWith = base.createBlock({\n\tabout: {\n\t\tname: \"Templated With\",\n\t},\n\tproduce({ options }) {\n\t\treturn {\n\t\t\taddons: [\n\t\t\t\tblockREADME({\n\t\t\t\t\tnotices: [\n\t\t\t\t\t\toptions.owner !== \"JoshuaKGoldberg\" &&\n\t\t\t\t\t\t\t`\n<!-- You can remove this notice if you don't want it 🙂 no worries! -->`,\n\t\t\t\t\t\t`> 💝 This package was templated with [\\`create-typescript-app\\`](https://github.com/JoshuaKGoldberg/create-typescript-app) using the [Bingo framework](https://create.bingo).\n`,\n\t\t\t\t\t].filter((notice) => typeof notice === \"string\"),\n\t\t\t\t}),\n\t\t\t],\n\t\t};\n\t},\n});\n"],"mappings":";;;;AAGA,MAAa,qBAAqB,KAAK,YAAY;CAClD,OAAO,EACN,MAAM,kBACN;CACD,QAAQ,EAAE,WAAW;AACpB,SAAO,EACN,QAAQ,CACP,YAAY,EACX,SAAS,CACR,QAAQ,UAAU,qBACjB;0EAED;EAEA,CAAC,QAAQ,WAAW,OAAO,WAAW,SAAS,EAChD,CAAC,CACF,EACD;;CAEF,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as bingo_stratum87 from "bingo-stratum";
|
|
2
2
|
|
|
3
3
|
//#region src/blocks/blockTypeScript.d.ts
|
|
4
|
-
declare const blockTypeScript:
|
|
4
|
+
declare const blockTypeScript: bingo_stratum87.BlockWithAddons<{
|
|
5
5
|
compilerOptions?: {
|
|
6
6
|
allowArbitraryExtensions?: boolean | undefined;
|
|
7
7
|
allowImportingTsExtensions?: boolean | undefined;
|
|
@@ -181,7 +181,6 @@ declare const blockTypeScript: bingo_stratum166.BlockWithAddons<{
|
|
|
181
181
|
hash?: string | undefined;
|
|
182
182
|
}>> | undefined;
|
|
183
183
|
}>;
|
|
184
|
-
//# sourceMappingURL=blockTypeScript.d.ts.map
|
|
185
184
|
//#endregion
|
|
186
185
|
export { blockTypeScript };
|
|
187
186
|
//# sourceMappingURL=blockTypeScript.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blockTypeScript.d.ts","names":[],"sources":["../../src/blocks/blockTypeScript.ts"],"sourcesContent":[],"mappings":";;;cAkBa,
|
|
1
|
+
{"version":3,"file":"blockTypeScript.d.ts","names":[],"sources":["../../src/blocks/blockTypeScript.ts"],"sourcesContent":[],"mappings":";;;cAkBa,iCAAe;;;IAAf,0BA+JX,CAAA,EAAA,OAAA,GAAA,SAAA;;;;;;;;;;oBA/J0B,CAAA,EAAA,MAAA,EAAA,GAAA,SAAA;IAAA,WAAA,CAAA,EAAA,OAAA,GAAA,SAAA"}
|
|
@@ -22,7 +22,7 @@ const blockTypeScript = base.createBlock({
|
|
|
22
22
|
intake({ files }) {
|
|
23
23
|
const raw = intakeFileAsJson(files, ["tsconfig.json"]);
|
|
24
24
|
const { data } = CompilerOptionsSchema.safeParse(raw?.compilerOptions);
|
|
25
|
-
if (!data) return
|
|
25
|
+
if (!data) return;
|
|
26
26
|
return { compilerOptions: data };
|
|
27
27
|
},
|
|
28
28
|
produce({ addons, options }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blockTypeScript.js","names":[],"sources":["../../src/blocks/blockTypeScript.ts"],"sourcesContent":["import sortKeys from \"sort-keys\";\nimport { CompilerOptionsSchema } from \"zod-tsconfig\";\n\nimport { base } from \"../base.js\";\nimport { getPackageDependencies } from \"../data/packageData.js\";\nimport { getPrimaryBin } from \"./bin/getPrimaryBin.js\";\nimport { blockDevelopmentDocs } from \"./blockDevelopmentDocs.js\";\nimport { blockExampleFiles } from \"./blockExampleFiles.js\";\nimport { blockGitHubActionsCI } from \"./blockGitHubActionsCI.js\";\nimport { blockGitignore } from \"./blockGitignore.js\";\nimport { blockKnip } from \"./blockKnip.js\";\nimport { blockMarkdownlint } from \"./blockMarkdownlint.js\";\nimport { blockPackageJson } from \"./blockPackageJson.js\";\nimport { blockRemoveWorkflows } from \"./blockRemoveWorkflows.js\";\nimport { blockVitest } from \"./blockVitest.js\";\nimport { blockVSCode } from \"./blockVSCode.js\";\nimport { intakeFileAsJson } from \"./intake/intakeFileAsJson.js\";\n\nexport const blockTypeScript = base.createBlock({\n\tabout: {\n\t\tname: \"TypeScript\",\n\t},\n\taddons: {\n\t\tcompilerOptions: CompilerOptionsSchema.optional(),\n\t},\n\tintake({ files }) {\n\t\tconst raw = intakeFileAsJson(files, [\"tsconfig.json\"]);\n\t\tconst { data } = CompilerOptionsSchema.safeParse(raw?.compilerOptions);\n\t\tif (!data) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn {\n\t\t\tcompilerOptions: data,\n\t\t};\n\t},\n\tproduce({ addons, options }) {\n\t\tconst { compilerOptions } = addons;\n\t\tconst primaryBin = getPrimaryBin(options.bin, options.repository);\n\n\t\treturn {\n\t\t\taddons: [\n\t\t\t\tblockDevelopmentDocs({\n\t\t\t\t\tsections: {\n\t\t\t\t\t\t\"Type Checking\": {\n\t\t\t\t\t\t\tcontents: `\nYou should be able to see suggestions from [TypeScript](https://typescriptlang.org) in your editor for all open files.\n\nHowever, it can be useful to run the TypeScript command-line (\\`tsc\\`) to type check all files in \\`src/\\`:\n\n\\`\\`\\`shell\npnpm tsc\n\\`\\`\\`\n\nAdd \\`--watch\\` to keep the type checker running in a watch mode that updates the display as you save files:\n\n\\`\\`\\`shell\npnpm tsc --watch\n\\`\\`\\`\n`,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t\tblockExampleFiles({\n\t\t\t\t\tfiles: {\n\t\t\t\t\t\t\"greet.ts\": `import { GreetOptions } from \"./types.js\";\n\t\n\texport function greet(options: GreetOptions | string) {\n\t\tconst {\n\t\t\tlogger = console.log.bind(console),\n\t\t\tmessage,\n\t\t\ttimes = 1,\n\t\t} = typeof options === \"string\" ? { message: options } : options;\n\t\n\t\tfor (let i = 0; i < times; i += 1) {\n\t\t\tlogger(message);\n\t\t}\n\t}\n\t`,\n\t\t\t\t\t\t\"index.ts\": `export * from \"./greet.js\";\nexport * from \"./types.js\";\n`,\n\t\t\t\t\t\t\"types.ts\": `export interface GreetOptions {\n\t\tlogger?: (message: string) => void;\n\t\tmessage: string;\n\t\ttimes?: number;\n\t}\n\t`,\n\t\t\t\t\t},\n\t\t\t\t\tusage: [\n\t\t\t\t\t\t`\\`\\`\\`shell\nnpm i ${options.repository}\n\\`\\`\\`\n\\`\\`\\`ts\nimport { greet } from \"${options.repository}\";\n\ngreet(\"Hello, world! ${options.emoji}\");\n\\`\\`\\``,\n\t\t\t\t\t],\n\t\t\t\t}),\n\t\t\t\tblockGitignore({\n\t\t\t\t\tignores: [\"/lib\"],\n\t\t\t\t}),\n\t\t\t\tblockGitHubActionsCI({\n\t\t\t\t\tjobs: [{ name: \"Type Check\", steps: [{ run: \"pnpm tsc\" }] }],\n\t\t\t\t}),\n\t\t\t\tblockKnip({\n\t\t\t\t\tproject: [\"src/**/*.ts\"],\n\t\t\t\t}),\n\t\t\t\tblockMarkdownlint({\n\t\t\t\t\tignores: [\"lib/\"],\n\t\t\t\t}),\n\t\t\t\tblockPackageJson({\n\t\t\t\t\tproperties: {\n\t\t\t\t\t\tdevDependencies: getPackageDependencies(\"typescript\"),\n\t\t\t\t\t\tfiles: [\"lib/\"],\n\t\t\t\t\t\tscripts: {\n\t\t\t\t\t\t\ttsc: \"tsc\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t\tblockVitest({ coverage: { include: [\"src\"] }, exclude: [\"lib\"] }),\n\t\t\t\tblockVSCode({\n\t\t\t\t\tdebuggers: primaryBin\n\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tname: \"Debug Program\",\n\t\t\t\t\t\t\t\t\tpreLaunchTask: \"build\",\n\t\t\t\t\t\t\t\t\tprogram: primaryBin,\n\t\t\t\t\t\t\t\t\trequest: \"launch\",\n\t\t\t\t\t\t\t\t\tskipFiles: [\"<node_internals>/**\"],\n\t\t\t\t\t\t\t\t\ttype: \"node\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t: [],\n\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\"typescript.tsdk\": \"node_modules/typescript/lib\",\n\t\t\t\t\t},\n\t\t\t\t\ttasks: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdetail: \"Build the project\",\n\t\t\t\t\t\t\tlabel: \"build\",\n\t\t\t\t\t\t\tscript: \"build\",\n\t\t\t\t\t\t\ttype: \"npm\",\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t}),\n\t\t\t],\n\t\t\tfiles: {\n\t\t\t\t\"tsconfig.json\": JSON.stringify({\n\t\t\t\t\tcompilerOptions: sortKeys({\n\t\t\t\t\t\tdeclaration: true,\n\t\t\t\t\t\tdeclarationMap: true,\n\t\t\t\t\t\tesModuleInterop: true,\n\t\t\t\t\t\tmodule: \"NodeNext\",\n\t\t\t\t\t\tmoduleResolution: \"NodeNext\",\n\t\t\t\t\t\tnoEmit: true,\n\t\t\t\t\t\tresolveJsonModule: true,\n\t\t\t\t\t\tskipLibCheck: true,\n\t\t\t\t\t\tstrict: true,\n\t\t\t\t\t\ttarget: \"ES2022\",\n\t\t\t\t\t\t...compilerOptions,\n\t\t\t\t\t}),\n\t\t\t\t\tinclude: [\"src\"],\n\t\t\t\t}),\n\t\t\t},\n\t\t};\n\t},\n\ttransition() {\n\t\treturn {\n\t\t\taddons: [\n\t\t\t\tblockRemoveWorkflows({\n\t\t\t\t\tworkflows: [\"tsc\"],\n\t\t\t\t}),\n\t\t\t],\n\t\t};\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAa,kBAAkB,KAAK,YAAY;CAC/C,OAAO,EACN,MAAM,
|
|
1
|
+
{"version":3,"file":"blockTypeScript.js","names":[],"sources":["../../src/blocks/blockTypeScript.ts"],"sourcesContent":["import sortKeys from \"sort-keys\";\nimport { CompilerOptionsSchema } from \"zod-tsconfig\";\n\nimport { base } from \"../base.js\";\nimport { getPackageDependencies } from \"../data/packageData.js\";\nimport { getPrimaryBin } from \"./bin/getPrimaryBin.js\";\nimport { blockDevelopmentDocs } from \"./blockDevelopmentDocs.js\";\nimport { blockExampleFiles } from \"./blockExampleFiles.js\";\nimport { blockGitHubActionsCI } from \"./blockGitHubActionsCI.js\";\nimport { blockGitignore } from \"./blockGitignore.js\";\nimport { blockKnip } from \"./blockKnip.js\";\nimport { blockMarkdownlint } from \"./blockMarkdownlint.js\";\nimport { blockPackageJson } from \"./blockPackageJson.js\";\nimport { blockRemoveWorkflows } from \"./blockRemoveWorkflows.js\";\nimport { blockVitest } from \"./blockVitest.js\";\nimport { blockVSCode } from \"./blockVSCode.js\";\nimport { intakeFileAsJson } from \"./intake/intakeFileAsJson.js\";\n\nexport const blockTypeScript = base.createBlock({\n\tabout: {\n\t\tname: \"TypeScript\",\n\t},\n\taddons: {\n\t\tcompilerOptions: CompilerOptionsSchema.optional(),\n\t},\n\tintake({ files }) {\n\t\tconst raw = intakeFileAsJson(files, [\"tsconfig.json\"]);\n\t\tconst { data } = CompilerOptionsSchema.safeParse(raw?.compilerOptions);\n\t\tif (!data) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn {\n\t\t\tcompilerOptions: data,\n\t\t};\n\t},\n\tproduce({ addons, options }) {\n\t\tconst { compilerOptions } = addons;\n\t\tconst primaryBin = getPrimaryBin(options.bin, options.repository);\n\n\t\treturn {\n\t\t\taddons: [\n\t\t\t\tblockDevelopmentDocs({\n\t\t\t\t\tsections: {\n\t\t\t\t\t\t\"Type Checking\": {\n\t\t\t\t\t\t\tcontents: `\nYou should be able to see suggestions from [TypeScript](https://typescriptlang.org) in your editor for all open files.\n\nHowever, it can be useful to run the TypeScript command-line (\\`tsc\\`) to type check all files in \\`src/\\`:\n\n\\`\\`\\`shell\npnpm tsc\n\\`\\`\\`\n\nAdd \\`--watch\\` to keep the type checker running in a watch mode that updates the display as you save files:\n\n\\`\\`\\`shell\npnpm tsc --watch\n\\`\\`\\`\n`,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t\tblockExampleFiles({\n\t\t\t\t\tfiles: {\n\t\t\t\t\t\t\"greet.ts\": `import { GreetOptions } from \"./types.js\";\n\t\n\texport function greet(options: GreetOptions | string) {\n\t\tconst {\n\t\t\tlogger = console.log.bind(console),\n\t\t\tmessage,\n\t\t\ttimes = 1,\n\t\t} = typeof options === \"string\" ? { message: options } : options;\n\t\n\t\tfor (let i = 0; i < times; i += 1) {\n\t\t\tlogger(message);\n\t\t}\n\t}\n\t`,\n\t\t\t\t\t\t\"index.ts\": `export * from \"./greet.js\";\nexport * from \"./types.js\";\n`,\n\t\t\t\t\t\t\"types.ts\": `export interface GreetOptions {\n\t\tlogger?: (message: string) => void;\n\t\tmessage: string;\n\t\ttimes?: number;\n\t}\n\t`,\n\t\t\t\t\t},\n\t\t\t\t\tusage: [\n\t\t\t\t\t\t`\\`\\`\\`shell\nnpm i ${options.repository}\n\\`\\`\\`\n\\`\\`\\`ts\nimport { greet } from \"${options.repository}\";\n\ngreet(\"Hello, world! ${options.emoji}\");\n\\`\\`\\``,\n\t\t\t\t\t],\n\t\t\t\t}),\n\t\t\t\tblockGitignore({\n\t\t\t\t\tignores: [\"/lib\"],\n\t\t\t\t}),\n\t\t\t\tblockGitHubActionsCI({\n\t\t\t\t\tjobs: [{ name: \"Type Check\", steps: [{ run: \"pnpm tsc\" }] }],\n\t\t\t\t}),\n\t\t\t\tblockKnip({\n\t\t\t\t\tproject: [\"src/**/*.ts\"],\n\t\t\t\t}),\n\t\t\t\tblockMarkdownlint({\n\t\t\t\t\tignores: [\"lib/\"],\n\t\t\t\t}),\n\t\t\t\tblockPackageJson({\n\t\t\t\t\tproperties: {\n\t\t\t\t\t\tdevDependencies: getPackageDependencies(\"typescript\"),\n\t\t\t\t\t\tfiles: [\"lib/\"],\n\t\t\t\t\t\tscripts: {\n\t\t\t\t\t\t\ttsc: \"tsc\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t\tblockVitest({ coverage: { include: [\"src\"] }, exclude: [\"lib\"] }),\n\t\t\t\tblockVSCode({\n\t\t\t\t\tdebuggers: primaryBin\n\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tname: \"Debug Program\",\n\t\t\t\t\t\t\t\t\tpreLaunchTask: \"build\",\n\t\t\t\t\t\t\t\t\tprogram: primaryBin,\n\t\t\t\t\t\t\t\t\trequest: \"launch\",\n\t\t\t\t\t\t\t\t\tskipFiles: [\"<node_internals>/**\"],\n\t\t\t\t\t\t\t\t\ttype: \"node\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t: [],\n\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\"typescript.tsdk\": \"node_modules/typescript/lib\",\n\t\t\t\t\t},\n\t\t\t\t\ttasks: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdetail: \"Build the project\",\n\t\t\t\t\t\t\tlabel: \"build\",\n\t\t\t\t\t\t\tscript: \"build\",\n\t\t\t\t\t\t\ttype: \"npm\",\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t}),\n\t\t\t],\n\t\t\tfiles: {\n\t\t\t\t\"tsconfig.json\": JSON.stringify({\n\t\t\t\t\tcompilerOptions: sortKeys({\n\t\t\t\t\t\tdeclaration: true,\n\t\t\t\t\t\tdeclarationMap: true,\n\t\t\t\t\t\tesModuleInterop: true,\n\t\t\t\t\t\tmodule: \"NodeNext\",\n\t\t\t\t\t\tmoduleResolution: \"NodeNext\",\n\t\t\t\t\t\tnoEmit: true,\n\t\t\t\t\t\tresolveJsonModule: true,\n\t\t\t\t\t\tskipLibCheck: true,\n\t\t\t\t\t\tstrict: true,\n\t\t\t\t\t\ttarget: \"ES2022\",\n\t\t\t\t\t\t...compilerOptions,\n\t\t\t\t\t}),\n\t\t\t\t\tinclude: [\"src\"],\n\t\t\t\t}),\n\t\t\t},\n\t\t};\n\t},\n\ttransition() {\n\t\treturn {\n\t\t\taddons: [\n\t\t\t\tblockRemoveWorkflows({\n\t\t\t\t\tworkflows: [\"tsc\"],\n\t\t\t\t}),\n\t\t\t],\n\t\t};\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAa,kBAAkB,KAAK,YAAY;CAC/C,OAAO,EACN,MAAM,cACN;CACD,QAAQ,EACP,iBAAiB,sBAAsB,UAAU,EACjD;CACD,OAAO,EAAE,SAAS;EACjB,MAAM,MAAM,iBAAiB,OAAO,CAAC,gBAAgB,CAAC;EACtD,MAAM,EAAE,SAAS,sBAAsB,UAAU,KAAK,gBAAgB;AACtE,MAAI,CAAC,KACJ;AAGD,SAAO,EACN,iBAAiB,MACjB;;CAEF,QAAQ,EAAE,QAAQ,WAAW;EAC5B,MAAM,EAAE,oBAAoB;EAC5B,MAAM,aAAa,cAAc,QAAQ,KAAK,QAAQ,WAAW;AAEjE,SAAO;GACN,QAAQ;IACP,qBAAqB,EACpB,UAAU,EACT,iBAAiB,EAChB,UAAU;;;;;;;;;;;;;;GAeV,EACD,EACD,CAAC;IACF,kBAAkB;KACjB,OAAO;MACN,YAAY;;;;;;;;;;;;;;MAcZ,YAAY;;;MAGZ,YAAY;;;;;;MAMZ;KACD,OAAO,CACN;QACE,QAAQ,WAAW;;;yBAGF,QAAQ,WAAW;;uBAErB,QAAQ,MAAM;QAE/B;KACD,CAAC;IACF,eAAe,EACd,SAAS,CAAC,OAAO,EACjB,CAAC;IACF,qBAAqB,EACpB,MAAM,CAAC;KAAE,MAAM;KAAc,OAAO,CAAC,EAAE,KAAK,YAAY,CAAC;KAAE,CAAC,EAC5D,CAAC;IACF,UAAU,EACT,SAAS,CAAC,cAAc,EACxB,CAAC;IACF,kBAAkB,EACjB,SAAS,CAAC,OAAO,EACjB,CAAC;IACF,iBAAiB,EAChB,YAAY;KACX,iBAAiB,uBAAuB,aAAa;KACrD,OAAO,CAAC,OAAO;KACf,SAAS,EACR,KAAK,OACL;KACD,EACD,CAAC;IACF,YAAY;KAAE,UAAU,EAAE,SAAS,CAAC,MAAM,EAAE;KAAE,SAAS,CAAC,MAAM;KAAE,CAAC;IACjE,YAAY;KACX,WAAW,aACR,CACA;MACC,MAAM;MACN,eAAe;MACf,SAAS;MACT,SAAS;MACT,WAAW,CAAC,sBAAsB;MAClC,MAAM;MACN,CACD,GACA,EAAE;KACL,UAAU,EACT,mBAAmB,+BACnB;KACD,OAAO,CACN;MACC,QAAQ;MACR,OAAO;MACP,QAAQ;MACR,MAAM;MACN,CACD;KACD,CAAC;IACF;GACD,OAAO,EACN,iBAAiB,KAAK,UAAU;IAC/B,iBAAiB,SAAS;KACzB,aAAa;KACb,gBAAgB;KAChB,iBAAiB;KACjB,QAAQ;KACR,kBAAkB;KAClB,QAAQ;KACR,mBAAmB;KACnB,cAAc;KACd,QAAQ;KACR,QAAQ;KACR,GAAG;KACH,CAAC;IACF,SAAS,CAAC,MAAM;IAChB,CAAC,EACF;GACD;;CAEF,aAAa;AACZ,SAAO,EACN,QAAQ,CACP,qBAAqB,EACpB,WAAW,CAAC,MAAM,EAClB,CAAC,CACF,EACD;;CAEF,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as bingo_stratum89 from "bingo-stratum";
|
|
2
2
|
|
|
3
3
|
//#region src/blocks/blockVSCode.d.ts
|
|
4
|
-
declare const blockVSCode:
|
|
4
|
+
declare const blockVSCode: bingo_stratum89.BlockWithAddons<{
|
|
5
5
|
settings: Record<string, unknown>;
|
|
6
6
|
debuggers?: (Record<string, unknown> & {
|
|
7
7
|
name: string;
|
|
@@ -78,7 +78,6 @@ declare const blockVSCode: bingo_stratum168.BlockWithAddons<{
|
|
|
78
78
|
hash?: string | undefined;
|
|
79
79
|
}>> | undefined;
|
|
80
80
|
}>;
|
|
81
|
-
//# sourceMappingURL=blockVSCode.d.ts.map
|
|
82
81
|
//#endregion
|
|
83
82
|
export { blockVSCode };
|
|
84
83
|
//# sourceMappingURL=blockVSCode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blockVSCode.d.ts","names":[],"sources":["../../src/blocks/blockVSCode.ts"],"sourcesContent":[],"mappings":";;;cAOa,
|
|
1
|
+
{"version":3,"file":"blockVSCode.d.ts","names":[],"sources":["../../src/blocks/blockVSCode.ts"],"sourcesContent":[],"mappings":";;;cAOa,6BAAW;;;IAAX,IAAA,EAAA,MAgGX;;;;;;;;;;;;gBAhGsB,CAAA,EAAA,MAAA,GAAA,SAAA;MAAA,SAAA,CAAA,EAAA,MAAA,GAAA,SAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blockVSCode.js","names":[],"sources":["../../src/blocks/blockVSCode.ts"],"sourcesContent":["import sortKeys from \"sort-keys\";\nimport { z } from \"zod\";\n\nimport { base } from \"../base.js\";\nimport { getPrimaryBin } from \"./bin/getPrimaryBin.js\";\nimport { blockDevelopmentDocs } from \"./blockDevelopmentDocs.js\";\n\nexport const blockVSCode = base.createBlock({\n\tabout: {\n\t\tname: \"VS Code\",\n\t},\n\taddons: {\n\t\tdebuggers: z\n\t\t\t.array(\n\t\t\t\tz.intersection(\n\t\t\t\t\tz.record(z.string(), z.unknown()),\n\t\t\t\t\tz.object({ name: z.string() }),\n\t\t\t\t),\n\t\t\t)\n\t\t\t.optional(),\n\t\textensions: z.array(z.string()).optional(),\n\t\tsettings: z.record(z.string(), z.unknown()).default({}),\n\t\ttasks: z\n\t\t\t.array(\n\t\t\t\tz.intersection(\n\t\t\t\t\tz.object({ detail: z.string() }),\n\t\t\t\t\tz.record(z.string(), z.unknown()),\n\t\t\t\t),\n\t\t\t)\n\t\t\t.optional(),\n\t},\n\tproduce({ addons, options }) {\n\t\tconst { debuggers, extensions, settings, tasks } = addons;\n\t\tconst primaryBin = getPrimaryBin(options.bin, options.repository);\n\n\t\treturn {\n\t\t\taddons: [\n\t\t\t\tblockDevelopmentDocs({\n\t\t\t\t\thints: [\n\t\t\t\t\t\t`> This repository includes a list of suggested VS Code extensions.`,\n\t\t\t\t\t\t`> It's a good idea to use [VS Code](https://code.visualstudio.com) and accept its suggestion to install them, as they'll help with development.`,\n\t\t\t\t\t],\n\t\t\t\t\tsections: {\n\t\t\t\t\t\tBuilding: {\n\t\t\t\t\t\t\tinnerSections: primaryBin\n\t\t\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcontents: `\nThis repository includes a [VS Code launch configuration](https://code.visualstudio.com/docs/editor/debugging) for debugging.\nTo debug a \\`bin\\` app, add a breakpoint to your code, then run _Debug Program_ from the VS Code Debug panel (or press F5).\nVS Code will automatically run the \\`build\\` task in the background before running \\`${primaryBin}\\`.\n`,\n\t\t\t\t\t\t\t\t\t\t\theading: \"Built App Debugging\",\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t: [],\n\t\t\t\t\t\t},\n\t\t\t\t\t\tTesting: {\n\t\t\t\t\t\t\tinnerSections: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcontents: `\nThis repository includes a [VS Code launch configuration](https://code.visualstudio.com/docs/editor/debugging) for debugging unit tests.\nTo launch it, open a test file, then run _Debug Current Test File_ from the VS Code Debug panel (or press F5).\n`,\n\t\t\t\t\t\t\t\t\theading: \"Debugging Tests\",\n\t\t\t\t\t\t\t\t},\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\t\t\tfiles: {\n\t\t\t\t\".vscode\": {\n\t\t\t\t\t\"extensions.json\": extensions?.length\n\t\t\t\t\t\t? JSON.stringify({\n\t\t\t\t\t\t\t\trecommendations: [...extensions].sort(),\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\"launch.json\": debuggers?.length\n\t\t\t\t\t\t? JSON.stringify({\n\t\t\t\t\t\t\t\tconfigurations: [...debuggers].sort((a, b) =>\n\t\t\t\t\t\t\t\t\ta.name.localeCompare(b.name),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tversion: \"0.2.0\",\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\"settings.json\": JSON.stringify(\n\t\t\t\t\t\tsortKeys({\n\t\t\t\t\t\t\t\"editor.formatOnSave\": true,\n\t\t\t\t\t\t\t\"editor.rulers\": [80],\n\t\t\t\t\t\t\t...settings,\n\t\t\t\t\t\t}),\n\t\t\t\t\t),\n\t\t\t\t\t\"tasks.json\": tasks?.length\n\t\t\t\t\t\t? JSON.stringify({\n\t\t\t\t\t\t\t\ttasks: tasks.sort((a, b) => a.detail.localeCompare(b.detail)),\n\t\t\t\t\t\t\t\tversion: \"2.0.0\",\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t: undefined,\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t},\n});\n"],"mappings":";;;;;;;AAOA,MAAa,cAAc,KAAK,YAAY;CAC3C,OAAO,EACN,MAAM,
|
|
1
|
+
{"version":3,"file":"blockVSCode.js","names":[],"sources":["../../src/blocks/blockVSCode.ts"],"sourcesContent":["import sortKeys from \"sort-keys\";\nimport { z } from \"zod\";\n\nimport { base } from \"../base.js\";\nimport { getPrimaryBin } from \"./bin/getPrimaryBin.js\";\nimport { blockDevelopmentDocs } from \"./blockDevelopmentDocs.js\";\n\nexport const blockVSCode = base.createBlock({\n\tabout: {\n\t\tname: \"VS Code\",\n\t},\n\taddons: {\n\t\tdebuggers: z\n\t\t\t.array(\n\t\t\t\tz.intersection(\n\t\t\t\t\tz.record(z.string(), z.unknown()),\n\t\t\t\t\tz.object({ name: z.string() }),\n\t\t\t\t),\n\t\t\t)\n\t\t\t.optional(),\n\t\textensions: z.array(z.string()).optional(),\n\t\tsettings: z.record(z.string(), z.unknown()).default({}),\n\t\ttasks: z\n\t\t\t.array(\n\t\t\t\tz.intersection(\n\t\t\t\t\tz.object({ detail: z.string() }),\n\t\t\t\t\tz.record(z.string(), z.unknown()),\n\t\t\t\t),\n\t\t\t)\n\t\t\t.optional(),\n\t},\n\tproduce({ addons, options }) {\n\t\tconst { debuggers, extensions, settings, tasks } = addons;\n\t\tconst primaryBin = getPrimaryBin(options.bin, options.repository);\n\n\t\treturn {\n\t\t\taddons: [\n\t\t\t\tblockDevelopmentDocs({\n\t\t\t\t\thints: [\n\t\t\t\t\t\t`> This repository includes a list of suggested VS Code extensions.`,\n\t\t\t\t\t\t`> It's a good idea to use [VS Code](https://code.visualstudio.com) and accept its suggestion to install them, as they'll help with development.`,\n\t\t\t\t\t],\n\t\t\t\t\tsections: {\n\t\t\t\t\t\tBuilding: {\n\t\t\t\t\t\t\tinnerSections: primaryBin\n\t\t\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcontents: `\nThis repository includes a [VS Code launch configuration](https://code.visualstudio.com/docs/editor/debugging) for debugging.\nTo debug a \\`bin\\` app, add a breakpoint to your code, then run _Debug Program_ from the VS Code Debug panel (or press F5).\nVS Code will automatically run the \\`build\\` task in the background before running \\`${primaryBin}\\`.\n`,\n\t\t\t\t\t\t\t\t\t\t\theading: \"Built App Debugging\",\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t: [],\n\t\t\t\t\t\t},\n\t\t\t\t\t\tTesting: {\n\t\t\t\t\t\t\tinnerSections: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcontents: `\nThis repository includes a [VS Code launch configuration](https://code.visualstudio.com/docs/editor/debugging) for debugging unit tests.\nTo launch it, open a test file, then run _Debug Current Test File_ from the VS Code Debug panel (or press F5).\n`,\n\t\t\t\t\t\t\t\t\theading: \"Debugging Tests\",\n\t\t\t\t\t\t\t\t},\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\t\t\tfiles: {\n\t\t\t\t\".vscode\": {\n\t\t\t\t\t\"extensions.json\": extensions?.length\n\t\t\t\t\t\t? JSON.stringify({\n\t\t\t\t\t\t\t\trecommendations: [...extensions].sort(),\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\"launch.json\": debuggers?.length\n\t\t\t\t\t\t? JSON.stringify({\n\t\t\t\t\t\t\t\tconfigurations: [...debuggers].sort((a, b) =>\n\t\t\t\t\t\t\t\t\ta.name.localeCompare(b.name),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tversion: \"0.2.0\",\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\"settings.json\": JSON.stringify(\n\t\t\t\t\t\tsortKeys({\n\t\t\t\t\t\t\t\"editor.formatOnSave\": true,\n\t\t\t\t\t\t\t\"editor.rulers\": [80],\n\t\t\t\t\t\t\t...settings,\n\t\t\t\t\t\t}),\n\t\t\t\t\t),\n\t\t\t\t\t\"tasks.json\": tasks?.length\n\t\t\t\t\t\t? JSON.stringify({\n\t\t\t\t\t\t\t\ttasks: tasks.sort((a, b) => a.detail.localeCompare(b.detail)),\n\t\t\t\t\t\t\t\tversion: \"2.0.0\",\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t: undefined,\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t},\n});\n"],"mappings":";;;;;;;AAOA,MAAa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AAuB;KACvB,iBAAiB,CAAC,GAAG;KACrB,GAAG;KACH,CAAC,CACF;IACD,cAAc,OAAO,SAClB,KAAK,UAAU;KACf,OAAO,MAAM,MAAM,GAAG,MAAM,EAAE,OAAO,cAAc,EAAE,OAAO,CAAC;KAC7D,SAAS;KACT,CAAC,GACD;IACH,EACD;GACD;;CAEF,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as bingo_stratum90 from "bingo-stratum";
|
|
2
2
|
|
|
3
3
|
//#region src/blocks/blockVitest.d.ts
|
|
4
|
-
declare const blockVitest:
|
|
4
|
+
declare const blockVitest: bingo_stratum90.BlockWithAddons<{
|
|
5
5
|
exclude: string[];
|
|
6
6
|
actionSteps: ({
|
|
7
7
|
env?: Record<string, string> | undefined;
|
|
@@ -86,7 +86,6 @@ declare const blockVitest: bingo_stratum170.BlockWithAddons<{
|
|
|
86
86
|
hash?: string | undefined;
|
|
87
87
|
}>> | undefined;
|
|
88
88
|
}>;
|
|
89
|
-
//# sourceMappingURL=blockVitest.d.ts.map
|
|
90
89
|
//#endregion
|
|
91
90
|
export { blockVitest };
|
|
92
91
|
//# sourceMappingURL=blockVitest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blockVitest.d.ts","names":[],"sources":["../../src/blocks/blockVitest.ts"],"sourcesContent":[],"mappings":";;;cAyDa,
|
|
1
|
+
{"version":3,"file":"blockVitest.d.ts","names":[],"sources":["../../src/blocks/blockVitest.ts"],"sourcesContent":[],"mappings":";;;cAyDa,6BAAW;;;IAAX,GAAA,CAAA,QAgOX,CAAA,MAAA,EAAA,MAAA,CAAA,GAAA,SAAA;;;;;;;;;;;;EAhOsB,KAAA,EAAA,MAAA,EAAA"}
|
|
@@ -32,9 +32,9 @@ const zTest = z.object({
|
|
|
32
32
|
}).partial();
|
|
33
33
|
function intakeFromConfig(files) {
|
|
34
34
|
const rawData = intakeFileDefineConfig(files, ["vitest.config.ts"]);
|
|
35
|
-
if (typeof rawData?.test !== "object") return
|
|
35
|
+
if (typeof rawData?.test !== "object") return;
|
|
36
36
|
const parsedData = zTest.safeParse(rawData.test).data;
|
|
37
|
-
if (!parsedData) return
|
|
37
|
+
if (!parsedData) return;
|
|
38
38
|
return {
|
|
39
39
|
coverage: parsedData.coverage,
|
|
40
40
|
environment: parsedData.environment,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blockVitest.js","names":["files: IntakeDirectory"],"sources":["../../src/blocks/blockVitest.ts"],"sourcesContent":["import { IntakeDirectory } from \"bingo-fs\";\nimport { z } from \"zod\";\n\nimport { base } from \"../base.js\";\nimport { getPackageDependencies } from \"../data/packageData.js\";\nimport { zActionStep } from \"./actions/steps.js\";\nimport { blockCSpell } from \"./blockCSpell.js\";\nimport { blockDevelopmentDocs } from \"./blockDevelopmentDocs.js\";\nimport { blockESLint } from \"./blockESLint.js\";\nimport { blockExampleFiles } from \"./blockExampleFiles.js\";\nimport { blockGitHubActionsCI } from \"./blockGitHubActionsCI.js\";\nimport { blockGitignore } from \"./blockGitignore.js\";\nimport { blockKnip } from \"./blockKnip.js\";\nimport { blockPackageJson } from \"./blockPackageJson.js\";\nimport { blockPrettier } from \"./blockPrettier.js\";\nimport { blockRemoveDependencies } from \"./blockRemoveDependencies.js\";\nimport { blockRemoveFiles } from \"./blockRemoveFiles.js\";\nimport { blockRemoveWorkflows } from \"./blockRemoveWorkflows.js\";\nimport { blockTSDown } from \"./blockTSDown.js\";\nimport { blockVSCode } from \"./blockVSCode.js\";\nimport { intakeFileDefineConfig } from \"./intake/intakeFileDefineConfig.js\";\n\nconst zCoverage = z.object({\n\texclude: z.array(z.string()).optional(),\n\tinclude: z.array(z.string()).optional(),\n});\n\nconst zEnvironment = z.string();\n\nconst zExclude = z.array(z.string());\n\nconst zTest = z\n\t.object({\n\t\tcoverage: zCoverage,\n\t\tenvironment: zEnvironment,\n\t\texclude: zExclude,\n\t})\n\t.partial();\n\nfunction intakeFromConfig(files: IntakeDirectory) {\n\tconst rawData = intakeFileDefineConfig(files, [\"vitest.config.ts\"]);\n\tif (typeof rawData?.test !== \"object\") {\n\t\treturn undefined;\n\t}\n\n\tconst parsedData = zTest.safeParse(rawData.test).data;\n\tif (!parsedData) {\n\t\treturn undefined;\n\t}\n\n\treturn {\n\t\tcoverage: parsedData.coverage,\n\t\tenvironment: parsedData.environment,\n\t\texclude: parsedData.exclude,\n\t};\n}\n\nexport const blockVitest = base.createBlock({\n\tabout: {\n\t\tname: \"Vitest\",\n\t},\n\taddons: {\n\t\tactionSteps: z.array(zActionStep).default([]),\n\t\tcoverage: zCoverage.default({}),\n\t\tenvironment: zEnvironment.optional(),\n\t\texclude: zExclude.default([]),\n\t\tflags: z.array(z.string()).default([]),\n\t},\n\tintake({ files, options }) {\n\t\treturn {\n\t\t\t...intakeFromConfig(files),\n\t\t\tflags: options.packageData?.scripts?.test\n\t\t\t\t?.match(/^vitest (.+)/)?.[1]\n\t\t\t\t.split(\" \"),\n\t\t};\n\t},\n\tproduce({ addons }) {\n\t\tconst { actionSteps, coverage, environment, exclude = [] } = addons;\n\t\tconst excludeText = JSON.stringify(\n\t\t\tArray.from(new Set([\"node_modules\", ...exclude])).sort(),\n\t\t);\n\n\t\treturn {\n\t\t\taddons: [\n\t\t\t\tblockCSpell({\n\t\t\t\t\tignorePaths: [\"coverage\"],\n\t\t\t\t}),\n\t\t\t\tblockDevelopmentDocs({\n\t\t\t\t\tsections: {\n\t\t\t\t\t\tTesting: {\n\t\t\t\t\t\t\tcontents: `\n[Vitest](https://vitest.dev) is used for tests.\nYou can run it locally on the command-line:\n\n\\`\\`\\`shell\npnpm run test\n\\`\\`\\`\n\nAdd the \\`--coverage\\` flag to compute test coverage and place reports in the \\`coverage/\\` directory:\n\n\\`\\`\\`shell\npnpm run test --coverage\n\\`\\`\\`\n\nNote that [console-fail-test](https://github.com/JoshuaKGoldberg/console-fail-test) is enabled for all test runs.\nCalls to \\`console.log\\`, \\`console.warn\\`, and other console methods will cause a test to fail.\n\n\n\t\t`,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t\tblockESLint({\n\t\t\t\t\textensions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\textends: [\"vitest.configs.recommended\"],\n\t\t\t\t\t\t\tfiles: [\"**/*.test.*\"],\n\t\t\t\t\t\t\trules: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tentries: {\n\t\t\t\t\t\t\t\t\t\t\"@typescript-eslint/no-unsafe-assignment\": \"off\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\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\tignores: [\"coverage\", \"**/*.snap\"],\n\t\t\t\t\timports: [{ source: \"@vitest/eslint-plugin\", specifier: \"vitest\" }],\n\t\t\t\t\tsettings: {\n\t\t\t\t\t\tvitest: { typecheck: true },\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t\tblockExampleFiles({\n\t\t\t\t\tfiles: {\n\t\t\t\t\t\t\"greet.test.ts\": `import { describe, expect, it, vi } from \"vitest\";\n\nimport { greet } from \"./greet.js\";\n\nconst message = \"Yay, testing!\";\n\ndescribe(greet, () => {\n\tit(\"logs to the console once when message is provided as a string\", () => {\n\t\tconst logger = vi.spyOn(console, \"log\").mockImplementation(() => undefined);\n\n\t\tgreet(message);\n\n\t\texpect(logger).toHaveBeenCalledWith(message);\n\t\texpect(logger).toHaveBeenCalledTimes(1);\n\t});\n\n\tit(\"logs to the console once when message is provided as an object\", () => {\n\t\tconst logger = vi.spyOn(console, \"log\").mockImplementation(() => undefined);\n\n\t\tgreet({ message });\n\n\t\texpect(logger).toHaveBeenCalledWith(message);\n\t\texpect(logger).toHaveBeenCalledTimes(1);\n\t});\n\n\tit(\"logs once when times is not provided in an object\", () => {\n\t\tconst logger = vi.fn();\n\n\t\tgreet({ logger, message });\n\n\t\texpect(logger).toHaveBeenCalledWith(message);\n\t\texpect(logger).toHaveBeenCalledTimes(1);\n\t});\n\n\tit(\"logs a specified number of times when times is provided\", () => {\n\t\tconst logger = vi.fn();\n\t\tconst times = 7;\n\n\t\tgreet({ logger, message, times });\n\n\t\texpect(logger).toHaveBeenCalledWith(message);\n\t\texpect(logger).toHaveBeenCalledTimes(7);\n\t});\n});\n`,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t\tblockGitignore({\n\t\t\t\t\tignores: [\"/coverage\"],\n\t\t\t\t}),\n\t\t\t\tblockGitHubActionsCI({\n\t\t\t\t\tjobs: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: \"Test\",\n\t\t\t\t\t\t\tsteps: [{ run: \"pnpm run test --coverage\" }, ...actionSteps],\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t}),\n\t\t\t\tblockKnip({\n\t\t\t\t\tentry: [\"src/**/*.test.*\"],\n\t\t\t\t}),\n\t\t\t\tblockPackageJson({\n\t\t\t\t\tproperties: {\n\t\t\t\t\t\tdevDependencies: getPackageDependencies(\n\t\t\t\t\t\t\t\"@vitest/coverage-v8\",\n\t\t\t\t\t\t\t\"@vitest/eslint-plugin\",\n\t\t\t\t\t\t\t\"console-fail-test\",\n\t\t\t\t\t\t\t\"vitest\",\n\t\t\t\t\t\t),\n\t\t\t\t\t\tscripts: {\n\t\t\t\t\t\t\ttest: `vitest ${addons.flags.join(\" \")}`.trim(),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t\tblockPrettier({\n\t\t\t\t\tignores: [\"/coverage\"],\n\t\t\t\t}),\n\t\t\t\tblockTSDown({\n\t\t\t\t\tentry: [\"!src/**/*.test.*\"],\n\t\t\t\t}),\n\t\t\t\tblockVSCode({\n\t\t\t\t\tdebuggers: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\targs: [\"run\", \"${relativeFile}\"],\n\t\t\t\t\t\t\tautoAttachChildProcesses: true,\n\t\t\t\t\t\t\tconsole: \"integratedTerminal\",\n\t\t\t\t\t\t\tname: \"Debug Current Test File\",\n\t\t\t\t\t\t\tprogram: \"${workspaceRoot}/node_modules/vitest/vitest.mjs\",\n\t\t\t\t\t\t\trequest: \"launch\",\n\t\t\t\t\t\t\tskipFiles: [\"<node_internals>/**\", \"**/node_modules/**\"],\n\t\t\t\t\t\t\tsmartStep: true,\n\t\t\t\t\t\t\ttype: \"node\",\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\textensions: [\"vitest.explorer\"],\n\t\t\t\t}),\n\t\t\t],\n\t\t\tfiles: {\n\t\t\t\t\"vitest.config.ts\": `import { defineConfig } from \"vitest/config\";\n\nexport default defineConfig({\n\ttest: {\n\t\tclearMocks: true,\n\t\tcoverage: {\n\t\t\tall: true,\n\t\t\t${\n\t\t\t\tcoverage.exclude?.length\n\t\t\t\t\t? `exclude: ${JSON.stringify(coverage.exclude)},\n\t\t\t`\n\t\t\t\t\t: \"\"\n\t\t\t}include: ${JSON.stringify(coverage.include)},\n\t\t\treporter: [\"html\", \"lcov\"],\n\t\t},${\n\t\t\tenvironment\n\t\t\t\t? `\n\t\tenvironment: \"${environment}\",`\n\t\t\t\t: \"\"\n\t\t}\n\t\texclude: [${excludeText.slice(1, excludeText.length - 1)}],\n\t\tsetupFiles: [\"console-fail-test/setup\"],\n\t},\n});\n\t`,\n\t\t\t},\n\t\t};\n\t},\n\ttransition() {\n\t\treturn {\n\t\t\taddons: [\n\t\t\t\tblockRemoveDependencies({\n\t\t\t\t\tdependencies: [\n\t\t\t\t\t\t\"@vitest/coverage-istanbul\",\n\t\t\t\t\t\t\"eslint-plugin-jest\",\n\t\t\t\t\t\t\"eslint-plugin-mocha\",\n\t\t\t\t\t\t\"eslint-plugin-vitest\",\n\t\t\t\t\t\t\"jest mocha\",\n\t\t\t\t\t],\n\t\t\t\t}),\n\t\t\t\tblockRemoveFiles({\n\t\t\t\t\tfiles: [\".m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F,YAAY;KACX,WAAW,CACV;MACC,MAAM,CAAC,OAAO,iBAAkB;MAChC,0BAA0B;MAC1B,SAAS;MACT,MAAM;MACN,SAAS;MACT,SAAS;MACT,WAAW,CAAC,uBAAuB,oBAAqB;MACxD,WAAW;MACX,MAAM;KACN,CACD;KACD,YAAY,CAAC,iBAAkB;IAC/B,EAAC;GACF;GACD,OAAO,EACN,qBAAqB;;;;;;;KAQrB,SAAS,SAAS,UACd,WAAW,KAAK,UAAU,SAAS,QAAQ,CAAC;OAE7C,GACH,WAAW,KAAK,UAAU,SAAS,QAAQ,CAAC;;MAG7C,eACI;kBACW,YAAY,MACxB,GACH;cACW,YAAY,MAAM,GAAG,YAAY,SAAS,EAAE,CAAC;;;;GAKvD;EACD;CACD;CACD,aAAa;AACZ,SAAO,EACN,QAAQ;GACP,wBAAwB,EACvB,cAAc;IACb;IACA;IACA;IACA;IACA;GACA,EACD,EAAC;GACF,iBAAiB,EAChB,OAAO;IAAC;IAAW;IAAiB;GAAyB,EAC7D,EAAC;GACF,qBAAqB,EACpB,WAAW,CAAC,MAAO,EACnB,EAAC;EACF,EACD;CACD;AACD,EAAC"}
|
|
1
|
+
{"version":3,"file":"blockVitest.js","names":[],"sources":["../../src/blocks/blockVitest.ts"],"sourcesContent":["import { IntakeDirectory } from \"bingo-fs\";\nimport { z } from \"zod\";\n\nimport { base } from \"../base.js\";\nimport { getPackageDependencies } from \"../data/packageData.js\";\nimport { zActionStep } from \"./actions/steps.js\";\nimport { blockCSpell } from \"./blockCSpell.js\";\nimport { blockDevelopmentDocs } from \"./blockDevelopmentDocs.js\";\nimport { blockESLint } from \"./blockESLint.js\";\nimport { blockExampleFiles } from \"./blockExampleFiles.js\";\nimport { blockGitHubActionsCI } from \"./blockGitHubActionsCI.js\";\nimport { blockGitignore } from \"./blockGitignore.js\";\nimport { blockKnip } from \"./blockKnip.js\";\nimport { blockPackageJson } from \"./blockPackageJson.js\";\nimport { blockPrettier } from \"./blockPrettier.js\";\nimport { blockRemoveDependencies } from \"./blockRemoveDependencies.js\";\nimport { blockRemoveFiles } from \"./blockRemoveFiles.js\";\nimport { blockRemoveWorkflows } from \"./blockRemoveWorkflows.js\";\nimport { blockTSDown } from \"./blockTSDown.js\";\nimport { blockVSCode } from \"./blockVSCode.js\";\nimport { intakeFileDefineConfig } from \"./intake/intakeFileDefineConfig.js\";\n\nconst zCoverage = z.object({\n\texclude: z.array(z.string()).optional(),\n\tinclude: z.array(z.string()).optional(),\n});\n\nconst zEnvironment = z.string();\n\nconst zExclude = z.array(z.string());\n\nconst zTest = z\n\t.object({\n\t\tcoverage: zCoverage,\n\t\tenvironment: zEnvironment,\n\t\texclude: zExclude,\n\t})\n\t.partial();\n\nfunction intakeFromConfig(files: IntakeDirectory) {\n\tconst rawData = intakeFileDefineConfig(files, [\"vitest.config.ts\"]);\n\tif (typeof rawData?.test !== \"object\") {\n\t\treturn undefined;\n\t}\n\n\tconst parsedData = zTest.safeParse(rawData.test).data;\n\tif (!parsedData) {\n\t\treturn undefined;\n\t}\n\n\treturn {\n\t\tcoverage: parsedData.coverage,\n\t\tenvironment: parsedData.environment,\n\t\texclude: parsedData.exclude,\n\t};\n}\n\nexport const blockVitest = base.createBlock({\n\tabout: {\n\t\tname: \"Vitest\",\n\t},\n\taddons: {\n\t\tactionSteps: z.array(zActionStep).default([]),\n\t\tcoverage: zCoverage.default({}),\n\t\tenvironment: zEnvironment.optional(),\n\t\texclude: zExclude.default([]),\n\t\tflags: z.array(z.string()).default([]),\n\t},\n\tintake({ files, options }) {\n\t\treturn {\n\t\t\t...intakeFromConfig(files),\n\t\t\tflags: options.packageData?.scripts?.test\n\t\t\t\t?.match(/^vitest (.+)/)?.[1]\n\t\t\t\t.split(\" \"),\n\t\t};\n\t},\n\tproduce({ addons }) {\n\t\tconst { actionSteps, coverage, environment, exclude = [] } = addons;\n\t\tconst excludeText = JSON.stringify(\n\t\t\tArray.from(new Set([\"node_modules\", ...exclude])).sort(),\n\t\t);\n\n\t\treturn {\n\t\t\taddons: [\n\t\t\t\tblockCSpell({\n\t\t\t\t\tignorePaths: [\"coverage\"],\n\t\t\t\t}),\n\t\t\t\tblockDevelopmentDocs({\n\t\t\t\t\tsections: {\n\t\t\t\t\t\tTesting: {\n\t\t\t\t\t\t\tcontents: `\n[Vitest](https://vitest.dev) is used for tests.\nYou can run it locally on the command-line:\n\n\\`\\`\\`shell\npnpm run test\n\\`\\`\\`\n\nAdd the \\`--coverage\\` flag to compute test coverage and place reports in the \\`coverage/\\` directory:\n\n\\`\\`\\`shell\npnpm run test --coverage\n\\`\\`\\`\n\nNote that [console-fail-test](https://github.com/JoshuaKGoldberg/console-fail-test) is enabled for all test runs.\nCalls to \\`console.log\\`, \\`console.warn\\`, and other console methods will cause a test to fail.\n\n\n\t\t`,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t\tblockESLint({\n\t\t\t\t\textensions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\textends: [\"vitest.configs.recommended\"],\n\t\t\t\t\t\t\tfiles: [\"**/*.test.*\"],\n\t\t\t\t\t\t\trules: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tentries: {\n\t\t\t\t\t\t\t\t\t\t\"@typescript-eslint/no-unsafe-assignment\": \"off\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\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\tignores: [\"coverage\", \"**/*.snap\"],\n\t\t\t\t\timports: [{ source: \"@vitest/eslint-plugin\", specifier: \"vitest\" }],\n\t\t\t\t\tsettings: {\n\t\t\t\t\t\tvitest: { typecheck: true },\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t\tblockExampleFiles({\n\t\t\t\t\tfiles: {\n\t\t\t\t\t\t\"greet.test.ts\": `import { describe, expect, it, vi } from \"vitest\";\n\nimport { greet } from \"./greet.js\";\n\nconst message = \"Yay, testing!\";\n\ndescribe(greet, () => {\n\tit(\"logs to the console once when message is provided as a string\", () => {\n\t\tconst logger = vi.spyOn(console, \"log\").mockImplementation(() => undefined);\n\n\t\tgreet(message);\n\n\t\texpect(logger).toHaveBeenCalledWith(message);\n\t\texpect(logger).toHaveBeenCalledTimes(1);\n\t});\n\n\tit(\"logs to the console once when message is provided as an object\", () => {\n\t\tconst logger = vi.spyOn(console, \"log\").mockImplementation(() => undefined);\n\n\t\tgreet({ message });\n\n\t\texpect(logger).toHaveBeenCalledWith(message);\n\t\texpect(logger).toHaveBeenCalledTimes(1);\n\t});\n\n\tit(\"logs once when times is not provided in an object\", () => {\n\t\tconst logger = vi.fn();\n\n\t\tgreet({ logger, message });\n\n\t\texpect(logger).toHaveBeenCalledWith(message);\n\t\texpect(logger).toHaveBeenCalledTimes(1);\n\t});\n\n\tit(\"logs a specified number of times when times is provided\", () => {\n\t\tconst logger = vi.fn();\n\t\tconst times = 7;\n\n\t\tgreet({ logger, message, times });\n\n\t\texpect(logger).toHaveBeenCalledWith(message);\n\t\texpect(logger).toHaveBeenCalledTimes(7);\n\t});\n});\n`,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t\tblockGitignore({\n\t\t\t\t\tignores: [\"/coverage\"],\n\t\t\t\t}),\n\t\t\t\tblockGitHubActionsCI({\n\t\t\t\t\tjobs: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: \"Test\",\n\t\t\t\t\t\t\tsteps: [{ run: \"pnpm run test --coverage\" }, ...actionSteps],\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t}),\n\t\t\t\tblockKnip({\n\t\t\t\t\tentry: [\"src/**/*.test.*\"],\n\t\t\t\t}),\n\t\t\t\tblockPackageJson({\n\t\t\t\t\tproperties: {\n\t\t\t\t\t\tdevDependencies: getPackageDependencies(\n\t\t\t\t\t\t\t\"@vitest/coverage-v8\",\n\t\t\t\t\t\t\t\"@vitest/eslint-plugin\",\n\t\t\t\t\t\t\t\"console-fail-test\",\n\t\t\t\t\t\t\t\"vitest\",\n\t\t\t\t\t\t),\n\t\t\t\t\t\tscripts: {\n\t\t\t\t\t\t\ttest: `vitest ${addons.flags.join(\" \")}`.trim(),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t\tblockPrettier({\n\t\t\t\t\tignores: [\"/coverage\"],\n\t\t\t\t}),\n\t\t\t\tblockTSDown({\n\t\t\t\t\tentry: [\"!src/**/*.test.*\"],\n\t\t\t\t}),\n\t\t\t\tblockVSCode({\n\t\t\t\t\tdebuggers: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\targs: [\"run\", \"${relativeFile}\"],\n\t\t\t\t\t\t\tautoAttachChildProcesses: true,\n\t\t\t\t\t\t\tconsole: \"integratedTerminal\",\n\t\t\t\t\t\t\tname: \"Debug Current Test File\",\n\t\t\t\t\t\t\tprogram: \"${workspaceRoot}/node_modules/vitest/vitest.mjs\",\n\t\t\t\t\t\t\trequest: \"launch\",\n\t\t\t\t\t\t\tskipFiles: [\"<node_internals>/**\", \"**/node_modules/**\"],\n\t\t\t\t\t\t\tsmartStep: true,\n\t\t\t\t\t\t\ttype: \"node\",\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\textensions: [\"vitest.explorer\"],\n\t\t\t\t}),\n\t\t\t],\n\t\t\tfiles: {\n\t\t\t\t\"vitest.config.ts\": `import { defineConfig } from \"vitest/config\";\n\nexport default defineConfig({\n\ttest: {\n\t\tclearMocks: true,\n\t\tcoverage: {\n\t\t\tall: true,\n\t\t\t${\n\t\t\t\tcoverage.exclude?.length\n\t\t\t\t\t? `exclude: ${JSON.stringify(coverage.exclude)},\n\t\t\t`\n\t\t\t\t\t: \"\"\n\t\t\t}include: ${JSON.stringify(coverage.include)},\n\t\t\treporter: [\"html\", \"lcov\"],\n\t\t},${\n\t\t\tenvironment\n\t\t\t\t? `\n\t\tenvironment: \"${environment}\",`\n\t\t\t\t: \"\"\n\t\t}\n\t\texclude: [${excludeText.slice(1, excludeText.length - 1)}],\n\t\tsetupFiles: [\"console-fail-test/setup\"],\n\t},\n});\n\t`,\n\t\t\t},\n\t\t};\n\t},\n\ttransition() {\n\t\treturn {\n\t\t\taddons: [\n\t\t\t\tblockRemoveDependencies({\n\t\t\t\t\tdependencies: [\n\t\t\t\t\t\t\"@vitest/coverage-istanbul\",\n\t\t\t\t\t\t\"eslint-plugin-jest\",\n\t\t\t\t\t\t\"eslint-plugin-mocha\",\n\t\t\t\t\t\t\"eslint-plugin-vitest\",\n\t\t\t\t\t\t\"jest mocha\",\n\t\t\t\t\t],\n\t\t\t\t}),\n\t\t\t\tblockRemoveFiles({\n\t\t\t\t\tfiles: [\".mocha*\", \"jest.config.*\", \"vitest.config.{c,j,m}*\"],\n\t\t\t\t}),\n\t\t\t\tblockRemoveWorkflows({\n\t\t\t\t\tworkflows: [\"test\"],\n\t\t\t\t}),\n\t\t\t],\n\t\t};\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsBA,MAAM,YAAY,EAAE,OAAO;CAC1B,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,UAAU;CACvC,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,UAAU;CACvC,CAAC;AAEF,MAAM,eAAe,EAAE,QAAQ;AAE/B,MAAM,WAAW,EAAE,MAAM,EAAE,QAAQ,CAAC;AAEpC,MAAM,QAAQ,EACZ,OAAO;CACP,UAAU;CACV,aAAa;CACb,SAAS;CACT,CAAC,CACD,SAAS;AAEX,SAAS,iBAAiB,OAAwB;CACjD,MAAM,UAAU,uBAAuB,OAAO,CAAC,mBAAmB,CAAC;AACnE,KAAI,OAAO,SAAS,SAAS,SAC5B;CAGD,MAAM,aAAa,MAAM,UAAU,QAAQ,KAAK,CAAC;AACjD,KAAI,CAAC,WACJ;AAGD,QAAO;EACN,UAAU,WAAW;EACrB,aAAa,WAAW;EACxB,SAAS,WAAW;EACpB;;AAGF,MAAa,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
3
|
//#region src/blocks/blockWebExt.d.ts
|
|
4
|
-
declare const blockWebExt:
|
|
4
|
+
declare const blockWebExt: bingo_stratum91.BlockWithoutAddons<{
|
|
5
5
|
access: "public" | "restricted";
|
|
6
6
|
description: string;
|
|
7
7
|
directory: string;
|
|
@@ -69,7 +69,6 @@ declare const blockWebExt: bingo_stratum172.BlockWithoutAddons<{
|
|
|
69
69
|
hash?: string | undefined;
|
|
70
70
|
}>> | undefined;
|
|
71
71
|
}>;
|
|
72
|
-
//# sourceMappingURL=blockWebExt.d.ts.map
|
|
73
72
|
//#endregion
|
|
74
73
|
export { blockWebExt };
|
|
75
74
|
//# sourceMappingURL=blockWebExt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blockWebExt.d.ts","names":[],"sources":["../../src/blocks/blockWebExt.ts"],"sourcesContent":[],"mappings":";;;cASa,
|
|
1
|
+
{"version":3,"file":"blockWebExt.d.ts","names":[],"sources":["../../src/blocks/blockWebExt.ts"],"sourcesContent":[],"mappings":";;;cASa,6BAAW;;;EAAX,SAAA,EAAA,MAgHX;;;;;;;;;;EAhHsB,KAAA,EAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blockWebExt.js","names":[],"sources":["../../src/blocks/blockWebExt.ts"],"sourcesContent":["import { base } from \"../base.js\";\nimport { blockCSpell } from \"./blockCSpell.js\";\nimport { blockDevelopmentDocs } from \"./blockDevelopmentDocs.js\";\nimport { blockGitHubActionsCI } from \"./blockGitHubActionsCI.js\";\nimport { blockGitignore } from \"./blockGitignore.js\";\nimport { blockMarkdownlint } from \"./blockMarkdownlint.js\";\nimport { blockPackageJson } from \"./blockPackageJson.js\";\nimport { blockPrettier } from \"./blockPrettier.js\";\n\nexport const blockWebExt = base.createBlock({\n\tabout: {\n\t\tname: \"Web-ext\",\n\t},\n\tproduce() {\n\t\treturn {\n\t\t\taddons: [\n\t\t\t\tblockCSpell({\n\t\t\t\t\tignorePaths: [\"assets\"],\n\t\t\t\t}),\n\t\t\t\tblockDevelopmentDocs({\n\t\t\t\t\tsections: {\n\t\t\t\t\t\tBuilding: {\n\t\t\t\t\t\t\tcontents: `\nRun [ESBuild](https://esbuild.github.io) locally to build source files:\n\n\\`\\`\\`shell\npnpm dev\n\\`\\`\\`\n\nAdd \\`--watch\\` to run the builder in a watch mode that continuously re-builds as you save files:\n\n\\`\\`\\`shell\npnpm dev --watch\n\\`\\`\\`\n`,\n\t\t\t\t\t\t\tinnerSections: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcontents: `\nFollow Google Chrome's _[Load an unpacked extension](https://developer.chrome.com/docs/extensions/mv3/getstarted/#unpacked)_ guide to load this repository's directory as an extension locally.\n\n> ♻️ Remember to reload the extension in \\`chrome://extensions\\` whenever you make changes locally!\n`,\n\t\t\t\t\t\t\t\t\theading: \"Local Development with Chrome\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcontents: `\nFollow Firefox's _[Temporary installation in Firefox](https://extensionworkshop.com/documentation/develop/temporary-installation-in-firefox/)_ guide to load this repository's directory as an extension locally.\n\nYou'll then need to authorize the extension to run on <https://github.com>:\n\n1. Find and select the _Extensions_ icon in the top right of Firefox\n2. Select the _\"Manage Extension\"_ gear icon next to _Refined Saved Replies_\n3. Select the _\"Always Allow on github.com\"_ option\n\n> ♻️ Remember to reload the extension in \\`about:debugging#/runtime/this-firefox\\` whenever you make changes locally!\n`,\n\t\t\t\t\t\t\t\t\theading: \"Local Development with Firefox\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcontents: `\nRun [\\`web-ext\\`](https://extensionworkshop.com) to build a production-ready \\`.zip\\` under \\`./web-ext-artifacts/\\`:\n\n\\`\\`\\`shell\npnpm build\n\\`\\`\\`\n\nThen upload that \\`./web-ext-artifacts/refined_saved_replies-*.zip\\` file to:\n\n- [Chrome Web Store Developer Dashboard](https://chrome.google.com/webstore/devconsole)\n- [Firefox Add-ons Developer Hub](https://addons.mozilla.org/en-US/developers/addon/submit/distribution)\n`,\n\t\t\t\t\t\t\t\t\theading: \"Production Builds\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t},\n\t\t\t\t\t\tLinting: {\n\t\t\t\t\t\t\tcontents: {\n\t\t\t\t\t\t\t\titems: [\n\t\t\t\t\t\t\t\t\t`- \\`pnpm lint:web-ext\\` ([web-ext](https://extensionworkshop.com)): Lints browser extension metadata after \\`pnpm dev\\` creates local files`,\n\t\t\t\t\t\t\t\t],\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\tblockGitHubActionsCI({\n\t\t\t\t\tjobs: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: \"Build\",\n\t\t\t\t\t\t\tsteps: [{ run: \"pnpm build\" }],\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: \"Lint Web-ext\",\n\t\t\t\t\t\t\tsteps: [{ run: \"pnpm dev\" }, { run: \"pnpm lint:web-ext\" }],\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t}),\n\t\t\t\tblockGitignore({\n\t\t\t\t\tignores: [\"*.zip\", \"web-ext-artifacts\"],\n\t\t\t\t}),\n\t\t\t\tblockMarkdownlint({\n\t\t\t\t\tignores: [\"assets/\"],\n\t\t\t\t}),\n\t\t\t\tblockPackageJson({\n\t\t\t\t\tproperties: {\n\t\t\t\t\t\tdevDependencies: {\n\t\t\t\t\t\t\tesbuild: \"^0.25.0\",\n\t\t\t\t\t\t\t\"web-ext\": \"^8.3.0\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\tscripts: {\n\t\t\t\t\t\t\tbuild: \"web-ext build --overwrite-dest\",\n\t\t\t\t\t\t\tdev: \"esbuild src/content-script.ts --bundle --minify --outfile=lib/content-script.js --sourcemap\",\n\t\t\t\t\t\t\t\"lint:web-ext\": \"web-ext lint\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t\tblockPrettier({\n\t\t\t\t\tignores: [\"assets/\"],\n\t\t\t\t}),\n\t\t\t],\n\t\t};\n\t},\n});\n"],"mappings":";;;;;;;;;;AASA,MAAa,cAAc,KAAK,YAAY;CAC3C,OAAO,EACN,MAAM,
|
|
1
|
+
{"version":3,"file":"blockWebExt.js","names":[],"sources":["../../src/blocks/blockWebExt.ts"],"sourcesContent":["import { base } from \"../base.js\";\nimport { blockCSpell } from \"./blockCSpell.js\";\nimport { blockDevelopmentDocs } from \"./blockDevelopmentDocs.js\";\nimport { blockGitHubActionsCI } from \"./blockGitHubActionsCI.js\";\nimport { blockGitignore } from \"./blockGitignore.js\";\nimport { blockMarkdownlint } from \"./blockMarkdownlint.js\";\nimport { blockPackageJson } from \"./blockPackageJson.js\";\nimport { blockPrettier } from \"./blockPrettier.js\";\n\nexport const blockWebExt = base.createBlock({\n\tabout: {\n\t\tname: \"Web-ext\",\n\t},\n\tproduce() {\n\t\treturn {\n\t\t\taddons: [\n\t\t\t\tblockCSpell({\n\t\t\t\t\tignorePaths: [\"assets\"],\n\t\t\t\t}),\n\t\t\t\tblockDevelopmentDocs({\n\t\t\t\t\tsections: {\n\t\t\t\t\t\tBuilding: {\n\t\t\t\t\t\t\tcontents: `\nRun [ESBuild](https://esbuild.github.io) locally to build source files:\n\n\\`\\`\\`shell\npnpm dev\n\\`\\`\\`\n\nAdd \\`--watch\\` to run the builder in a watch mode that continuously re-builds as you save files:\n\n\\`\\`\\`shell\npnpm dev --watch\n\\`\\`\\`\n`,\n\t\t\t\t\t\t\tinnerSections: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcontents: `\nFollow Google Chrome's _[Load an unpacked extension](https://developer.chrome.com/docs/extensions/mv3/getstarted/#unpacked)_ guide to load this repository's directory as an extension locally.\n\n> ♻️ Remember to reload the extension in \\`chrome://extensions\\` whenever you make changes locally!\n`,\n\t\t\t\t\t\t\t\t\theading: \"Local Development with Chrome\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcontents: `\nFollow Firefox's _[Temporary installation in Firefox](https://extensionworkshop.com/documentation/develop/temporary-installation-in-firefox/)_ guide to load this repository's directory as an extension locally.\n\nYou'll then need to authorize the extension to run on <https://github.com>:\n\n1. Find and select the _Extensions_ icon in the top right of Firefox\n2. Select the _\"Manage Extension\"_ gear icon next to _Refined Saved Replies_\n3. Select the _\"Always Allow on github.com\"_ option\n\n> ♻️ Remember to reload the extension in \\`about:debugging#/runtime/this-firefox\\` whenever you make changes locally!\n`,\n\t\t\t\t\t\t\t\t\theading: \"Local Development with Firefox\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcontents: `\nRun [\\`web-ext\\`](https://extensionworkshop.com) to build a production-ready \\`.zip\\` under \\`./web-ext-artifacts/\\`:\n\n\\`\\`\\`shell\npnpm build\n\\`\\`\\`\n\nThen upload that \\`./web-ext-artifacts/refined_saved_replies-*.zip\\` file to:\n\n- [Chrome Web Store Developer Dashboard](https://chrome.google.com/webstore/devconsole)\n- [Firefox Add-ons Developer Hub](https://addons.mozilla.org/en-US/developers/addon/submit/distribution)\n`,\n\t\t\t\t\t\t\t\t\theading: \"Production Builds\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t},\n\t\t\t\t\t\tLinting: {\n\t\t\t\t\t\t\tcontents: {\n\t\t\t\t\t\t\t\titems: [\n\t\t\t\t\t\t\t\t\t`- \\`pnpm lint:web-ext\\` ([web-ext](https://extensionworkshop.com)): Lints browser extension metadata after \\`pnpm dev\\` creates local files`,\n\t\t\t\t\t\t\t\t],\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\tblockGitHubActionsCI({\n\t\t\t\t\tjobs: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: \"Build\",\n\t\t\t\t\t\t\tsteps: [{ run: \"pnpm build\" }],\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: \"Lint Web-ext\",\n\t\t\t\t\t\t\tsteps: [{ run: \"pnpm dev\" }, { run: \"pnpm lint:web-ext\" }],\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t}),\n\t\t\t\tblockGitignore({\n\t\t\t\t\tignores: [\"*.zip\", \"web-ext-artifacts\"],\n\t\t\t\t}),\n\t\t\t\tblockMarkdownlint({\n\t\t\t\t\tignores: [\"assets/\"],\n\t\t\t\t}),\n\t\t\t\tblockPackageJson({\n\t\t\t\t\tproperties: {\n\t\t\t\t\t\tdevDependencies: {\n\t\t\t\t\t\t\tesbuild: \"^0.25.0\",\n\t\t\t\t\t\t\t\"web-ext\": \"^8.3.0\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\tscripts: {\n\t\t\t\t\t\t\tbuild: \"web-ext build --overwrite-dest\",\n\t\t\t\t\t\t\tdev: \"esbuild src/content-script.ts --bundle --minify --outfile=lib/content-script.js --sourcemap\",\n\t\t\t\t\t\t\t\"lint:web-ext\": \"web-ext lint\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t\tblockPrettier({\n\t\t\t\t\tignores: [\"assets/\"],\n\t\t\t\t}),\n\t\t\t],\n\t\t};\n\t},\n});\n"],"mappings":";;;;;;;;;;AASA,MAAa,cAAc,KAAK,YAAY;CAC3C,OAAO,EACN,MAAM,WACN;CACD,UAAU;AACT,SAAO,EACN,QAAQ;GACP,YAAY,EACX,aAAa,CAAC,SAAS,EACvB,CAAC;GACF,qBAAqB,EACpB,UAAU;IACT,UAAU;KACT,UAAU;;;;;;;;;;;;;KAaV,eAAe;MACd;OACC,UAAU;;;;;OAKV,SAAS;OACT;MACD;OACC,UAAU;;;;;;;;;;;OAWV,SAAS;OACT;MACD;OACC,UAAU;;;;;;;;;;;;OAYV,SAAS;OACT;MACD;KACD;IACD,SAAS,EACR,UAAU,EACT,OAAO,CACN,8IACA,EACD,EACD;IACD,EACD,CAAC;GACF,qBAAqB,EACpB,MAAM,CACL;IACC,MAAM;IACN,OAAO,CAAC,EAAE,KAAK,cAAc,CAAC;IAC9B,EACD;IACC,MAAM;IACN,OAAO,CAAC,EAAE,KAAK,YAAY,EAAE,EAAE,KAAK,qBAAqB,CAAC;IAC1D,CACD,EACD,CAAC;GACF,eAAe,EACd,SAAS,CAAC,SAAS,oBAAoB,EACvC,CAAC;GACF,kBAAkB,EACjB,SAAS,CAAC,UAAU,EACpB,CAAC;GACF,iBAAiB,EAChB,YAAY;IACX,iBAAiB;KAChB,SAAS;KACT,WAAW;KACX;IACD,SAAS;KACR,OAAO;KACP,KAAK;KACL,gBAAgB;KAChB;IACD,EACD,CAAC;GACF,cAAc,EACb,SAAS,CAAC,UAAU,EACpB,CAAC;GACF,EACD;;CAEF,CAAC"}
|
|
@@ -6,21 +6,20 @@ import { AST_NODE_TYPES, parse } from "@typescript-eslint/typescript-estree";
|
|
|
6
6
|
|
|
7
7
|
//#region src/blocks/eslint/blockESLintIntake.ts
|
|
8
8
|
function blockESLintIntake(sourceText) {
|
|
9
|
-
const
|
|
9
|
+
const configExport = tryCatch(() => parse(sourceText, {
|
|
10
10
|
comment: true,
|
|
11
11
|
loc: true,
|
|
12
12
|
range: true
|
|
13
|
-
}));
|
|
14
|
-
|
|
15
|
-
if (!configExport) return void 0;
|
|
13
|
+
}))?.body.find(nodeIsConfigExport);
|
|
14
|
+
if (!configExport) return;
|
|
16
15
|
const configArguments = configExport.declaration.arguments;
|
|
17
|
-
if (configArguments.length < 2) return
|
|
16
|
+
if (configArguments.length < 2) return;
|
|
18
17
|
const ignores = getConfigIgnores(configArguments[0]);
|
|
19
|
-
if (!ignores) return
|
|
18
|
+
if (!ignores) return;
|
|
20
19
|
const rulesObject = getConfigRulesObject(configArguments.slice(1));
|
|
21
|
-
if (!rulesObject) return
|
|
20
|
+
if (!rulesObject) return;
|
|
22
21
|
const rules = collectRulesObjectGroups(sourceText, rulesObject);
|
|
23
|
-
if (!rules) return
|
|
22
|
+
if (!rules) return;
|
|
24
23
|
return {
|
|
25
24
|
ignores,
|
|
26
25
|
rules
|
|
@@ -31,7 +30,7 @@ function blockESLintIntake(sourceText) {
|
|
|
31
30
|
return true;
|
|
32
31
|
}
|
|
33
32
|
function collectRuleFromProperty(property) {
|
|
34
|
-
if (property.type !== AST_NODE_TYPES.Property || property.key.type !== AST_NODE_TYPES.Literal || typeof property.key.value !== "string") return
|
|
33
|
+
if (property.type !== AST_NODE_TYPES.Property || property.key.type !== AST_NODE_TYPES.Literal || typeof property.key.value !== "string") return;
|
|
35
34
|
const name = property.key.value;
|
|
36
35
|
const { data } = zRuleOptions.safeParse(JSON5.parse(sourceText.slice(...property.value.range)));
|
|
37
36
|
return data && {
|
|
@@ -44,11 +43,10 @@ function blockESLintIntake(sourceText) {
|
|
|
44
43
|
let currentGroup;
|
|
45
44
|
const groups = [];
|
|
46
45
|
for (const property of rulesObject$1.properties) {
|
|
47
|
-
const
|
|
48
|
-
const comment = precedingText.replaceAll(/\/\/ ?|\t\s*/g, "").trim() || void 0;
|
|
46
|
+
const comment = sourceText$1.slice((previousNode?.range[1] ?? rulesObject$1.range[0]) + 1, property.range[0]).replaceAll(/\/\/ ?|\t\s*/g, "").trim() || void 0;
|
|
49
47
|
if (comment === stylisticComment) break;
|
|
50
48
|
const rule = collectRuleFromProperty(property);
|
|
51
|
-
if (!rule) return
|
|
49
|
+
if (!rule) return;
|
|
52
50
|
if (!currentGroup || comment) {
|
|
53
51
|
currentGroup = {
|
|
54
52
|
comment,
|
|
@@ -72,7 +70,7 @@ function blockESLintIntake(sourceText) {
|
|
|
72
70
|
"rules",
|
|
73
71
|
"settings"
|
|
74
72
|
]));
|
|
75
|
-
if (!configObject) return
|
|
73
|
+
if (!configObject) return;
|
|
76
74
|
const rulesObject$1 = configObject.properties[3];
|
|
77
75
|
return rulesObject$1.type === AST_NODE_TYPES.Property && rulesObject$1.value.type === AST_NODE_TYPES.ObjectExpression && rulesObject$1.value;
|
|
78
76
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blockESLintIntake.js","names":["
|
|
1
|
+
{"version":3,"file":"blockESLintIntake.js","names":["parseAST","previousNode: TSESTree.Node | undefined","currentGroup: ExtensionRuleGroup | undefined","groups: ExtensionRuleGroup[]","rulesObject","sourceText"],"sources":["../../../src/blocks/eslint/blockESLintIntake.ts"],"sourcesContent":["import {\n\tAST_NODE_TYPES,\n\tparse as parseAST,\n\tTSESTree,\n} from \"@typescript-eslint/typescript-estree\";\nimport JSON5 from \"json5\";\n\nimport { tryCatch } from \"../../utils/tryCatch.js\";\nimport { stylisticComment } from \"../blockESLintMoreStyling.js\";\nimport { type ExtensionRuleGroup, zRuleOptions } from \"./schemas.js\";\n\ntype ConfigExport = TSESTree.ExportDefaultDeclaration & {\n\tdeclaration: TSESTree.CallExpression;\n};\n\nexport function blockESLintIntake(sourceText: string) {\n\tconst ast = tryCatch(() =>\n\t\tparseAST(sourceText, {\n\t\t\tcomment: true,\n\t\t\tloc: true,\n\t\t\trange: true,\n\t\t}),\n\t);\n\tconst configExport = ast?.body.find(nodeIsConfigExport);\n\tif (!configExport) {\n\t\treturn undefined;\n\t}\n\n\tconst configArguments = configExport.declaration.arguments;\n\tif (configArguments.length < 2) {\n\t\treturn undefined;\n\t}\n\n\tconst ignores = getConfigIgnores(configArguments[0]);\n\tif (!ignores) {\n\t\treturn undefined;\n\t}\n\n\tconst rulesObject = getConfigRulesObject(configArguments.slice(1));\n\tif (!rulesObject) {\n\t\treturn undefined;\n\t}\n\n\tconst rules = collectRulesObjectGroups(sourceText, rulesObject);\n\tif (!rules) {\n\t\treturn undefined;\n\t}\n\n\treturn { ignores, rules };\n\n\tfunction areArraysEqual<T>(a: T[], b: T[]) {\n\t\tif (a.length !== b.length) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tif (a[i] !== b[i]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tfunction collectRuleFromProperty(property: TSESTree.ObjectLiteralElement) {\n\t\tif (\n\t\t\tproperty.type !== AST_NODE_TYPES.Property ||\n\t\t\tproperty.key.type !== AST_NODE_TYPES.Literal ||\n\t\t\ttypeof property.key.value !== \"string\"\n\t\t) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst name = property.key.value;\n\n\t\tconst { data } = zRuleOptions.safeParse(\n\t\t\tJSON5.parse(sourceText.slice(...property.value.range)),\n\t\t);\n\n\t\treturn data && { entry: data, name };\n\t}\n\n\tfunction collectRulesObjectGroups(\n\t\tsourceText: string,\n\t\trulesObject: TSESTree.ObjectExpression,\n\t) {\n\t\tlet previousNode: TSESTree.Node | undefined;\n\t\tlet currentGroup: ExtensionRuleGroup | undefined;\n\t\tconst groups: ExtensionRuleGroup[] = [];\n\n\t\tfor (const property of rulesObject.properties) {\n\t\t\tconst precedingText = sourceText.slice(\n\t\t\t\t(previousNode?.range[1] ?? rulesObject.range[0]) + 1,\n\t\t\t\tproperty.range[0],\n\t\t\t);\n\t\t\tconst comment =\n\t\t\t\tprecedingText.replaceAll(/\\/\\/ ?|\\t\\s*/g, \"\").trim() || undefined;\n\n\t\t\t// blockESLintMoreStyling's comment always gets pushed to the end.\n\t\t\tif (comment === stylisticComment) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst rule = collectRuleFromProperty(property);\n\t\t\tif (!rule) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tif (!currentGroup || comment) {\n\t\t\t\tcurrentGroup = { comment, entries: {} };\n\t\t\t\tgroups.push(currentGroup);\n\t\t\t}\n\n\t\t\tcurrentGroup.entries[rule.name] = rule.entry;\n\t\t\tpreviousNode = property;\n\t\t}\n\n\t\treturn groups;\n\t}\n\n\tfunction getConfigIgnores(node: TSESTree.Node) {\n\t\treturn (\n\t\t\tnode.type === AST_NODE_TYPES.ObjectExpression &&\n\t\t\tnode.properties.length === 1 &&\n\t\t\tnode.properties[0].type === AST_NODE_TYPES.Property &&\n\t\t\tnode.properties[0].key.type === AST_NODE_TYPES.Identifier &&\n\t\t\tnode.properties[0].key.name === \"ignores\" &&\n\t\t\tnode.properties[0].value.type === AST_NODE_TYPES.ArrayExpression &&\n\t\t\tnode.properties[0].value.elements.every(\n\t\t\t\t(element): element is TSESTree.Literal & { value: string } =>\n\t\t\t\t\telement?.type === AST_NODE_TYPES.Literal &&\n\t\t\t\t\ttypeof element.value === \"string\",\n\t\t\t) &&\n\t\t\tnode.properties[0].value.elements.map(\n\t\t\t\t(element) => element.value as string,\n\t\t\t)\n\t\t);\n\t}\n\n\tfunction getConfigRulesObject(nodes: TSESTree.Node[]) {\n\t\tconst configObject = nodes.find(\n\t\t\t(node): node is TSESTree.ObjectExpression =>\n\t\t\t\tnode.type === AST_NODE_TYPES.ObjectExpression &&\n\t\t\t\tareArraysEqual(\n\t\t\t\t\tnode.properties.map((property) =>\n\t\t\t\t\t\tproperty.type === AST_NODE_TYPES.Property &&\n\t\t\t\t\t\tproperty.key.type === AST_NODE_TYPES.Identifier\n\t\t\t\t\t\t\t? property.key.name\n\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t),\n\t\t\t\t\t[\"extends\", \"files\", \"languageOptions\", \"rules\", \"settings\"],\n\t\t\t\t),\n\t\t);\n\t\tif (!configObject) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst rulesObject = configObject.properties[3];\n\t\treturn (\n\t\t\trulesObject.type === AST_NODE_TYPES.Property &&\n\t\t\trulesObject.value.type === AST_NODE_TYPES.ObjectExpression &&\n\t\t\trulesObject.value\n\t\t);\n\t}\n\n\tfunction nodeIsConfigExport(node: TSESTree.Node): node is ConfigExport {\n\t\treturn (\n\t\t\tnode.type === AST_NODE_TYPES.ExportDefaultDeclaration &&\n\t\t\tnode.declaration.type === AST_NODE_TYPES.CallExpression &&\n\t\t\tnodeIsConfigFunction(node.declaration.callee)\n\t\t);\n\t}\n\n\tfunction nodeIsConfigFunction(node: TSESTree.Node) {\n\t\treturn (\n\t\t\tnode.type === AST_NODE_TYPES.MemberExpression &&\n\t\t\tnode.object.type === AST_NODE_TYPES.Identifier &&\n\t\t\tnode.object.name === \"tseslint\" &&\n\t\t\tnode.property.type === AST_NODE_TYPES.Identifier &&\n\t\t\tnode.property.name === \"config\"\n\t\t);\n\t}\n}\n"],"mappings":";;;;;;;AAeA,SAAgB,kBAAkB,YAAoB;CAQrD,MAAM,eAPM,eACXA,MAAS,YAAY;EACpB,SAAS;EACT,KAAK;EACL,OAAO;EACP,CAAC,CACF,EACyB,KAAK,KAAK,mBAAmB;AACvD,KAAI,CAAC,aACJ;CAGD,MAAM,kBAAkB,aAAa,YAAY;AACjD,KAAI,gBAAgB,SAAS,EAC5B;CAGD,MAAM,UAAU,iBAAiB,gBAAgB,GAAG;AACpD,KAAI,CAAC,QACJ;CAGD,MAAM,cAAc,qBAAqB,gBAAgB,MAAM,EAAE,CAAC;AAClE,KAAI,CAAC,YACJ;CAGD,MAAM,QAAQ,yBAAyB,YAAY,YAAY;AAC/D,KAAI,CAAC,MACJ;AAGD,QAAO;EAAE;EAAS;EAAO;CAEzB,SAAS,eAAkB,GAAQ,GAAQ;AAC1C,MAAI,EAAE,WAAW,EAAE,OAClB,QAAO;AAGR,OAAK,IAAI,IAAI,GAAG,IAAI,EAAE,QAAQ,IAC7B,KAAI,EAAE,OAAO,EAAE,GACd,QAAO;AAIT,SAAO;;CAGR,SAAS,wBAAwB,UAAyC;AACzE,MACC,SAAS,SAAS,eAAe,YACjC,SAAS,IAAI,SAAS,eAAe,WACrC,OAAO,SAAS,IAAI,UAAU,SAE9B;EAGD,MAAM,OAAO,SAAS,IAAI;EAE1B,MAAM,EAAE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ACH,EACD;GAAC;GAAW;GAAS;GAAmB;GAAS;GAAW,CAC5D,CACF;AACD,MAAI,CAAC,aACJ;EAGD,MAAMA,gBAAc,aAAa,WAAW;AAC5C,SACCA,cAAY,SAAS,eAAe,YACpCA,cAAY,MAAM,SAAS,eAAe,oBAC1CA,cAAY;;CAId,SAAS,mBAAmB,MAA2C;AACtE,SACC,KAAK,SAAS,eAAe,4BAC7B,KAAK,YAAY,SAAS,eAAe,kBACzC,qBAAqB,KAAK,YAAY,OAAO;;CAI/C,SAAS,qBAAqB,MAAqB;AAClD,SACC,KAAK,SAAS,eAAe,oBAC7B,KAAK,OAAO,SAAS,eAAe,cACpC,KAAK,OAAO,SAAS,cACrB,KAAK,SAAS,SAAS,eAAe,cACtC,KAAK,SAAS,SAAS"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
declare function blockESLintPluginIntake(sourceText: string): {
|
|
3
3
|
configEmoji: [string, string][];
|
|
4
4
|
} | undefined;
|
|
5
|
-
//# sourceMappingURL=blockESLintPluginIntake.d.ts.map
|
|
6
5
|
//#endregion
|
|
7
6
|
export { blockESLintPluginIntake };
|
|
8
7
|
//# sourceMappingURL=blockESLintPluginIntake.d.ts.map
|
|
@@ -10,11 +10,11 @@ function blockESLintPluginIntake(sourceText) {
|
|
|
10
10
|
loc: true,
|
|
11
11
|
range: true
|
|
12
12
|
}));
|
|
13
|
-
if (!ast) return
|
|
13
|
+
if (!ast) return;
|
|
14
14
|
const config = findConfig(ast.body);
|
|
15
|
-
if (!config) return
|
|
15
|
+
if (!config) return;
|
|
16
16
|
const configEmoji = findConfigEmoji(config.properties);
|
|
17
|
-
if (!configEmoji) return
|
|
17
|
+
if (!configEmoji) return;
|
|
18
18
|
const { data } = zConfigEmoji.safeParse(JSON5.parse(sourceText.slice(...configEmoji.range)));
|
|
19
19
|
return data && { configEmoji: data };
|
|
20
20
|
function findConfig(body) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blockESLintPluginIntake.js","names":["
|
|
1
|
+
{"version":3,"file":"blockESLintPluginIntake.js","names":["parseAST"],"sources":["../../../src/blocks/eslint/blockESLintPluginIntake.ts"],"sourcesContent":["import {\n\tAST_NODE_TYPES,\n\tparse as parseAST,\n\tTSESTree,\n} from \"@typescript-eslint/typescript-estree\";\nimport JSON5 from \"json5\";\n\nimport { tryCatch } from \"../../utils/tryCatch.js\";\nimport { zConfigEmoji } from \"./schemas.js\";\n\nexport function blockESLintPluginIntake(sourceText: string) {\n\tconst ast = tryCatch(() =>\n\t\tparseAST(sourceText, {\n\t\t\tcomment: true,\n\t\t\tloc: true,\n\t\t\trange: true,\n\t\t}),\n\t);\n\tif (!ast) {\n\t\treturn undefined;\n\t}\n\n\tconst config = findConfig(ast.body);\n\tif (!config) {\n\t\treturn undefined;\n\t}\n\n\tconst configEmoji = findConfigEmoji(config.properties);\n\tif (!configEmoji) {\n\t\treturn undefined;\n\t}\n\n\tconst { data } = zConfigEmoji.safeParse(\n\t\tJSON5.parse(sourceText.slice(...configEmoji.range)),\n\t);\n\n\treturn data && { configEmoji: data };\n\n\tfunction findConfig(body: TSESTree.ProgramStatement[]) {\n\t\tfor (const node of body) {\n\t\t\tif (\n\t\t\t\tnode.type === AST_NODE_TYPES.VariableDeclaration &&\n\t\t\t\tnode.declarations[0].id.type === AST_NODE_TYPES.Identifier &&\n\t\t\t\tnode.declarations[0].id.name === \"config\" &&\n\t\t\t\tnode.declarations[0].init?.type === AST_NODE_TYPES.ObjectExpression\n\t\t\t) {\n\t\t\t\treturn node.declarations[0].init;\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction findConfigEmoji(properties: TSESTree.ObjectLiteralElement[]) {\n\t\tfor (const node of properties) {\n\t\t\tif (\n\t\t\t\tnode.type === AST_NODE_TYPES.Property &&\n\t\t\t\tnode.key.type === AST_NODE_TYPES.Identifier &&\n\t\t\t\tnode.key.name === \"configEmoji\" &&\n\t\t\t\tnode.value.type === AST_NODE_TYPES.ArrayExpression\n\t\t\t) {\n\t\t\t\treturn node.value;\n\t\t\t}\n\t\t}\n\t}\n}\n"],"mappings":";;;;;;AAUA,SAAgB,wBAAwB,YAAoB;CAC3D,MAAM,MAAM,eACXA,MAAS,YAAY;EACpB,SAAS;EACT,KAAK;EACL,OAAO;EACP,CAAC,CACF;AACD,KAAI,CAAC,IACJ;CAGD,MAAM,SAAS,WAAW,IAAI,KAAK;AACnC,KAAI,CAAC,OACJ;CAGD,MAAM,cAAc,gBAAgB,OAAO,WAAW;AACtD,KAAI,CAAC,YACJ;CAGD,MAAM,EAAE,SAAS,aAAa,UAC7B,MAAM,MAAM,WAAW,MAAM,GAAG,YAAY,MAAM,CAAC,CACnD;AAED,QAAO,QAAQ,EAAE,aAAa,MAAM;CAEpC,SAAS,WAAW,MAAmC;AACtD,OAAK,MAAM,QAAQ,KAClB,KACC,KAAK,SAAS,eAAe,uBAC7B,KAAK,aAAa,GAAG,GAAG,SAAS,eAAe,cAChD,KAAK,aAAa,GAAG,GAAG,SAAS,YACjC,KAAK,aAAa,GAAG,MAAM,SAAS,eAAe,iBAEnD,QAAO,KAAK,aAAa,GAAG;;CAK/B,SAAS,gBAAgB,YAA6C;AACrE,OAAK,MAAM,QAAQ,WAClB,KACC,KAAK,SAAS,eAAe,YAC7B,KAAK,IAAI,SAAS,eAAe,cACjC,KAAK,IAAI,SAAS,iBAClB,KAAK,MAAM,SAAS,eAAe,gBAEnC,QAAO,KAAK"}
|
|
@@ -95,8 +95,6 @@ declare const zPackageImport: z.ZodObject<{
|
|
|
95
95
|
specifier: string;
|
|
96
96
|
types?: boolean | undefined;
|
|
97
97
|
}>;
|
|
98
|
-
//# sourceMappingURL=schemas.d.ts.map
|
|
99
|
-
|
|
100
98
|
//#endregion
|
|
101
99
|
export { Extension, ExtensionRuleGroup, ExtensionRules, RuleOptions, zConfigEmoji, zExtension, zExtensionRuleGroup, zExtensionRules, zPackageImport, zRuleOptions };
|
|
102
100
|
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","names":[],"sources":["../../../src/blocks/eslint/schemas.ts"],"sourcesContent":[],"mappings":";;;cAEa,cAAY,CAAA,CAAA,YAAA,CAAA,CAAA,SAAA,CAAA,CAAA,UAAA,CAAA,CAAA,WAAA,CAAA,CAAA;cAIZ,cAAY,CAAA,CAAA,UAAA,CAAA,CAAA,qBAAA,CAAA,CAAA,mBAAA,CAAA,CAAA,oBAAA,CAAA,CAAA,UAAA,CAAA,CAAA,UAAA,CAAA,CAAA,qBAAA,CAAA,CAAA,sBAAA,CAAA,CAAA,oBAAA,CAAA,CAAA,UAAA,CAAA,CAAA,UAAA,CAAA,CAAA,qBAAA,CAAA,CAAA,sBAAA,CAAA,CAAA,YAAA,CAAA,CAAA;AAJZ,KAgBD,WAAA,GAAc,CAAA,CAAE,KAdhB,CAAA,OAc6B,YAd7B,CAAA;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","names":[],"sources":["../../../src/blocks/eslint/schemas.ts"],"sourcesContent":[],"mappings":";;;cAEa,cAAY,CAAA,CAAA,YAAA,CAAA,CAAA,SAAA,CAAA,CAAA,UAAA,CAAA,CAAA,WAAA,CAAA,CAAA;cAIZ,cAAY,CAAA,CAAA,UAAA,CAAA,CAAA,qBAAA,CAAA,CAAA,mBAAA,CAAA,CAAA,oBAAA,CAAA,CAAA,UAAA,CAAA,CAAA,UAAA,CAAA,CAAA,qBAAA,CAAA,CAAA,sBAAA,CAAA,CAAA,oBAAA,CAAA,CAAA,UAAA,CAAA,CAAA,UAAA,CAAA,CAAA,qBAAA,CAAA,CAAA,sBAAA,CAAA,CAAA,YAAA,CAAA,CAAA;AAJZ,KAgBD,WAAA,GAAc,CAAA,CAAE,KAdhB,CAAA,OAc6B,YAd7B,CAAA;AAFa,cAkBZ,mBAlBY,EAkBO,CAAA,CAAA,SAlBP,CAAA;EAAA,OAAA,eAAA,YAAA,CAAA;EAAA,OAAA,aAAA,YAAA,YAAA,CAAA,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AA,CAAA,EAAA,OAAA;EAAA,aAAA,CAAA,EAAA,OAAA;CAAA,CAAA;AAAA,KAiBhB,SAAA,GAAY,CAAA,CAAE,KAjBE,CAAA,OAiBW,UAjBX,CAAA;AAAA,cAmBf,cAnBe,EAmBD,CAAA,CAAA,SAnBC,CAAA;EAAA,MAAA,YAAA,CAAA,YAAA,aAAA,CAAA;IAAA,WAAA,aAAA;IAAA,OAAA,aAAA;EAAA,CAAA,EAAA,OAAA,cAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;CAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.js","names":[],"sources":["../../../src/blocks/eslint/schemas.ts"],"sourcesContent":["import { z } from \"zod\";\n\nexport const zConfigEmoji = z\n\t.array(z.tuple([z.string(), z.string()]))\n\t.optional();\n\nexport const zRuleOptions = z.union([\n\tz.literal(\"error\"),\n\tz.literal(\"off\"),\n\tz.literal(\"warn\"),\n\tz.tuple([z.union([z.literal(\"error\"), z.literal(\"warn\")]), z.unknown()]),\n\tz.tuple([\n\t\tz.union([z.literal(\"error\"), z.literal(\"warn\")]),\n\t\tz.unknown(),\n\t\tz.unknown(),\n\t]),\n]);\n\nexport type RuleOptions = z.infer<typeof zRuleOptions>;\n\nexport const zExtensionRuleGroup = z.object({\n\tcomment: z.string().optional(),\n\tentries: z.record(z.string(), zRuleOptions),\n});\n\nexport type ExtensionRuleGroup = z.infer<typeof zExtensionRuleGroup>;\n\nexport const zExtensionRules = z.union([\n\tz.record(z.string(), zRuleOptions),\n\tz.array(zExtensionRuleGroup),\n]);\n\nexport type ExtensionRules = z.infer<typeof zExtensionRules>;\n\nexport const zExtension = z.object({\n\textends: z.array(z.string()).optional(),\n\tfiles: z.array(z.string()).optional(),\n\tlanguageOptions: z.unknown().optional(),\n\tlinterOptions: z.unknown().optional(),\n\tplugins: z.record(z.string(), z.string()).optional(),\n\trules: zExtensionRules.optional(),\n\tsettings: z.record(z.string(), z.unknown()).optional(),\n});\n\nexport type Extension = z.infer<typeof zExtension>;\n\nexport const zPackageImport = z.object({\n\tsource: z.union([\n\t\tz.string(),\n\t\tz.object({ packageName: z.string(), version: z.string() }),\n\t]),\n\tspecifier: z.string(),\n\ttypes: z.boolean().optional(),\n});\n"],"mappings":";;;AAEA,MAAa,eAAe,EAC1B,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"schemas.js","names":[],"sources":["../../../src/blocks/eslint/schemas.ts"],"sourcesContent":["import { z } from \"zod\";\n\nexport const zConfigEmoji = z\n\t.array(z.tuple([z.string(), z.string()]))\n\t.optional();\n\nexport const zRuleOptions = z.union([\n\tz.literal(\"error\"),\n\tz.literal(\"off\"),\n\tz.literal(\"warn\"),\n\tz.tuple([z.union([z.literal(\"error\"), z.literal(\"warn\")]), z.unknown()]),\n\tz.tuple([\n\t\tz.union([z.literal(\"error\"), z.literal(\"warn\")]),\n\t\tz.unknown(),\n\t\tz.unknown(),\n\t]),\n]);\n\nexport type RuleOptions = z.infer<typeof zRuleOptions>;\n\nexport const zExtensionRuleGroup = z.object({\n\tcomment: z.string().optional(),\n\tentries: z.record(z.string(), zRuleOptions),\n});\n\nexport type ExtensionRuleGroup = z.infer<typeof zExtensionRuleGroup>;\n\nexport const zExtensionRules = z.union([\n\tz.record(z.string(), zRuleOptions),\n\tz.array(zExtensionRuleGroup),\n]);\n\nexport type ExtensionRules = z.infer<typeof zExtensionRules>;\n\nexport const zExtension = z.object({\n\textends: z.array(z.string()).optional(),\n\tfiles: z.array(z.string()).optional(),\n\tlanguageOptions: z.unknown().optional(),\n\tlinterOptions: z.unknown().optional(),\n\tplugins: z.record(z.string(), z.string()).optional(),\n\trules: zExtensionRules.optional(),\n\tsettings: z.record(z.string(), z.unknown()).optional(),\n});\n\nexport type Extension = z.infer<typeof zExtension>;\n\nexport const zPackageImport = z.object({\n\tsource: z.union([\n\t\tz.string(),\n\t\tz.object({ packageName: z.string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;AAIF,MAAa,iBAAiB,EAAE,OAAO;CACtC,QAAQ,EAAE,MAAM,CACf,EAAE,QAAQ,EACV,EAAE,OAAO;EAAE,aAAa,EAAE,QAAQ;EAAE,SAAS,EAAE,QAAQ;EAAE,CAAC,CAC1D,CAAC;CACF,WAAW,EAAE,QAAQ;CACrB,OAAO,EAAE,SAAS,CAAC,UAAU;CAC7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createJobName.d.ts","names":[],"sources":["../../../src/blocks/files/createJobName.ts"],"sourcesContent":[],"mappings":";iBAAgB,aAAA
|
|
1
|
+
{"version":3,"file":"createJobName.d.ts","names":[],"sources":["../../../src/blocks/files/createJobName.ts"],"sourcesContent":[],"mappings":";iBAAgB,aAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createJobName.js","names":[
|
|
1
|
+
{"version":3,"file":"createJobName.js","names":[],"sources":["../../../src/blocks/files/createJobName.ts"],"sourcesContent":["export function createJobName(label: string) {\n\treturn label.replaceAll(/[?()]/g, \"\").replaceAll(\" \", \"_\").toLowerCase();\n}\n"],"mappings":";AAAA,SAAgB,cAAc,OAAe;AAC5C,QAAO,MAAM,WAAW,UAAU,GAAG,CAAC,WAAW,KAAK,IAAI,CAAC,aAAa"}
|
|
@@ -24,8 +24,6 @@ declare function createMultiWorkflowFile({
|
|
|
24
24
|
name,
|
|
25
25
|
workflowsVersions
|
|
26
26
|
}: MultiWorkflowFileOptions): string;
|
|
27
|
-
//# sourceMappingURL=createMultiWorkflowFile.d.ts.map
|
|
28
|
-
|
|
29
27
|
//#endregion
|
|
30
28
|
export { MultiWorkflowFileOptions, MultiWorkflowJobOptions, MultiWorkflowJobStep, createMultiWorkflowFile };
|
|
31
29
|
//# sourceMappingURL=createMultiWorkflowFile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createMultiWorkflowFile.d.ts","names":[],"sources":["../../../src/blocks/files/createMultiWorkflowFile.ts"],"sourcesContent":[],"mappings":";;;UAKiB,wBAAA;QACV;EADU,IAAA,EAAA,MAAA;
|
|
1
|
+
{"version":3,"file":"createMultiWorkflowFile.d.ts","names":[],"sources":["../../../src/blocks/files/createMultiWorkflowFile.ts"],"sourcesContent":[],"mappings":";;;UAKiB,wBAAA;QACV;EADU,IAAA,EAAA,MAAA;EAMA,iBAAA,EAAA,SAAuB,GAHR,iBAOxB;AAGR;AAKgB,UAZC,uBAAA,CAYsB;EACtC,YAAA,CAAA,EAZe,MAYf,CAAA,MAAA,EAAA,MAAA,CAAA;EACA,EAAA,CAAA,EAAA,MAAA;EACA,IAAA,EAAA,MAAA;EACE,KAAA,EAZK,oBAYL,EAAA;;KATS,oBAAA;;;;;;;iBAKI,uBAAA;;;;GAIb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createMultiWorkflowFile.js","names":[],"sources":["../../../src/blocks/files/createMultiWorkflowFile.ts"],"sourcesContent":["import { WorkflowsVersions } from \"../../schemas.js\";\nimport { resolveUses } from \"../actions/resolveUses.js\";\nimport { createJobName } from \"./createJobName.js\";\nimport { formatWorkflowYaml } from \"./formatWorkflowYaml.js\";\n\nexport interface MultiWorkflowFileOptions {\n\tjobs: MultiWorkflowJobOptions[];\n\tname: string;\n\tworkflowsVersions: undefined | WorkflowsVersions;\n}\n\nexport interface MultiWorkflowJobOptions {\n\tcheckoutWith?: Record<string, string>;\n\tif?: string;\n\tname: string;\n\tsteps: MultiWorkflowJobStep[];\n}\n\nexport type MultiWorkflowJobStep = { if?: string } & (\n\t| { run: string }\n\t| { uses: string }\n);\n\nexport function createMultiWorkflowFile({\n\tjobs,\n\tname,\n\tworkflowsVersions,\n}: MultiWorkflowFileOptions) {\n\treturn formatWorkflowYaml({\n\t\tjobs: Object.fromEntries(\n\t\t\tjobs.map((job) => [\n\t\t\t\tcreateJobName(job.name),\n\t\t\t\t{\n\t\t\t\t\tif: job.if,\n\t\t\t\t\tname: job.name,\n\t\t\t\t\t\"runs-on\": \"ubuntu-latest\",\n\t\t\t\t\tsteps: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tuses: resolveUses(\"actions/checkout\", \"v4\", workflowsVersions),\n\t\t\t\t\t\t\twith: job.checkoutWith,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{ uses: \"./.github/actions/prepare\" },\n\t\t\t\t\t\t...job.steps,\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t]),\n\t\t),\n\t\tname,\n\t\ton: {\n\t\t\tpull_request: null,\n\t\t\tpush: {\n\t\t\t\tbranches: [\"main\"],\n\t\t\t},\n\t\t},\n\t});\n}\n"],"mappings":";;;;;AAuBA,SAAgB,wBAAwB,EACvC,MACA,MACA,
|
|
1
|
+
{"version":3,"file":"createMultiWorkflowFile.js","names":[],"sources":["../../../src/blocks/files/createMultiWorkflowFile.ts"],"sourcesContent":["import { WorkflowsVersions } from \"../../schemas.js\";\nimport { resolveUses } from \"../actions/resolveUses.js\";\nimport { createJobName } from \"./createJobName.js\";\nimport { formatWorkflowYaml } from \"./formatWorkflowYaml.js\";\n\nexport interface MultiWorkflowFileOptions {\n\tjobs: MultiWorkflowJobOptions[];\n\tname: string;\n\tworkflowsVersions: undefined | WorkflowsVersions;\n}\n\nexport interface MultiWorkflowJobOptions {\n\tcheckoutWith?: Record<string, string>;\n\tif?: string;\n\tname: string;\n\tsteps: MultiWorkflowJobStep[];\n}\n\nexport type MultiWorkflowJobStep = { if?: string } & (\n\t| { run: string }\n\t| { uses: string }\n);\n\nexport function createMultiWorkflowFile({\n\tjobs,\n\tname,\n\tworkflowsVersions,\n}: MultiWorkflowFileOptions) {\n\treturn formatWorkflowYaml({\n\t\tjobs: Object.fromEntries(\n\t\t\tjobs.map((job) => [\n\t\t\t\tcreateJobName(job.name),\n\t\t\t\t{\n\t\t\t\t\tif: job.if,\n\t\t\t\t\tname: job.name,\n\t\t\t\t\t\"runs-on\": \"ubuntu-latest\",\n\t\t\t\t\tsteps: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tuses: resolveUses(\"actions/checkout\", \"v4\", workflowsVersions),\n\t\t\t\t\t\t\twith: job.checkoutWith,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{ uses: \"./.github/actions/prepare\" },\n\t\t\t\t\t\t...job.steps,\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t]),\n\t\t),\n\t\tname,\n\t\ton: {\n\t\t\tpull_request: null,\n\t\t\tpush: {\n\t\t\t\tbranches: [\"main\"],\n\t\t\t},\n\t\t},\n\t});\n}\n"],"mappings":";;;;;AAuBA,SAAgB,wBAAwB,EACvC,MACA,MACA,qBAC4B;AAC5B,QAAO,mBAAmB;EACzB,MAAM,OAAO,YACZ,KAAK,KAAK,QAAQ,CACjB,cAAc,IAAI,KAAK,EACvB;GACC,IAAI,IAAI;GACR,MAAM,IAAI;GACV,WAAW;GACX,OAAO;IACN;KACC,MAAM,YAAY,oBAAoB,MAAM,kBAAkB;KAC9D,MAAM,IAAI;KACV;IACD,EAAE,MAAM,6BAA6B;IACrC,GAAG,IAAI;IACP;GACD,CACD,CAAC,CACF;EACD;EACA,IAAI;GACH,cAAc;GACd,MAAM,EACL,UAAU,CAAC,OAAO,EAClB;GACD;EACD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSoloWorkflowFile.d.ts","names":[],"sources":["../../../src/blocks/files/createSoloWorkflowFile.ts"],"sourcesContent":[],"mappings":";UAGU,uBAAA;EAAA,oBAAA,CAAA,EAAA,OAAuB;EAKvB,KAAA,EAAA,MAAA;AAAc;UAAd,cAAA,
|
|
1
|
+
{"version":3,"file":"createSoloWorkflowFile.d.ts","names":[],"sources":["../../../src/blocks/files/createSoloWorkflowFile.ts"],"sourcesContent":[],"mappings":";UAGU,uBAAA;EAAA,oBAAA,CAAA,EAAA,OAAuB;EAKvB,KAAA,EAAA,MAAA;AAAc;UAAd,cAAA,CAmCK;EAIT,UAAA,CAAA,EAAA;IACS,KAAA,CAAA,EAAA,MAAA,EAAA;EACP,CAAA;EAAgB,kBAAA,CAAA,EAAA;IAGd,KAAA,CAAA,EAAA,MAAA,EAAA;EAQA,CAAA;EAUM,aAAA,CAAA,EAAA;IACf,KAAA,CAAA,EAAA,MAAA,EAAA;EACA,CAAA;EACA,MAAA,CAAA,EAAA;IACA,KAAA,CAAA,EAAA,MAAA,EAAA;EACA,CAAA;EAEE,YAAA,CAAA,EAAA,IAAA,GAAA,MAAA,GAAA;IAAmB,QAAA,CAAA,EAAA,MAAA,GAAA,MAAA,EAAA;;;;;;;;;;;;;;;;;UAnCZ,mBAAA;gBACK;;;;OAIT;gBACS;SACP;;UAGE,uBAAA;;;;;;;UAQA,gBAAA;QACH;;;;;;SAMC;;iBAGQ,sBAAA;;;;;;;GAOb"}
|
|
@@ -2,7 +2,7 @@ import { createJobName } from "./createJobName.js";
|
|
|
2
2
|
import { formatWorkflowYaml } from "./formatWorkflowYaml.js";
|
|
3
3
|
|
|
4
4
|
//#region src/blocks/files/createSoloWorkflowFile.ts
|
|
5
|
-
function createSoloWorkflowFile({ concurrency, jobName, name, on, permissions
|
|
5
|
+
function createSoloWorkflowFile({ concurrency, jobName, name, on, permissions, ...options }) {
|
|
6
6
|
return formatWorkflowYaml({
|
|
7
7
|
concurrency,
|
|
8
8
|
jobs: { [createJobName(jobName ?? name)]: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSoloWorkflowFile.js","names":[],"sources":["../../../src/blocks/files/createSoloWorkflowFile.ts"],"sourcesContent":["import { createJobName } from \"./createJobName.js\";\nimport { formatWorkflowYaml } from \"./formatWorkflowYaml.js\";\n\ninterface WorkflowFileConcurrency {\n\t\"cancel-in-progress\"?: boolean;\n\tgroup: string;\n}\n\ninterface WorkflowFileOn {\n\tdiscussion?: {\n\t\ttypes?: string[];\n\t};\n\tdiscussion_comment?: {\n\t\ttypes?: string[];\n\t};\n\tissue_comment?: {\n\t\ttypes?: string[];\n\t};\n\tissues?: {\n\t\ttypes?: string[];\n\t};\n\tpull_request?:\n\t\t| null\n\t\t| string\n\t\t| {\n\t\t\t\tbranches?: string | string[];\n\t\t\t\ttypes?: string[];\n\t\t };\n\tpull_request_review_comment?: {\n\t\ttypes: string[];\n\t};\n\tpull_request_target?: {\n\t\ttypes: string[];\n\t};\n\tpush?: {\n\t\tbranches: string[];\n\t};\n\trelease?: {\n\t\ttypes: string[];\n\t};\n\tworkflow_dispatch?: null | string;\n}\ninterface WorkflowFileOptions {\n\tconcurrency?: WorkflowFileConcurrency;\n\tif?: string;\n\tjobName?: string;\n\tname: string;\n\ton?: WorkflowFileOn;\n\tpermissions?: WorkflowFilePermissions;\n\tsteps: WorkflowFileStep[];\n}\n\ninterface WorkflowFilePermissions {\n\tcontents?: string;\n\tdiscussions?: string;\n\t\"id-token\"?: string;\n\tissues?: string;\n\t\"pull-requests\"?: string;\n}\n\ninterface WorkflowFileStep {\n\tenv?: Record<string, string>;\n\tid?: string;\n\tif?: string;\n\tname?: string;\n\trun?: string;\n\tuses?: string;\n\twith?: Record<string, unknown>;\n}\n\nexport function createSoloWorkflowFile({\n\tconcurrency,\n\tjobName,\n\tname,\n\ton,\n\tpermissions,\n\t...options\n}: WorkflowFileOptions) {\n\treturn formatWorkflowYaml({\n\t\tconcurrency,\n\t\tjobs: {\n\t\t\t[createJobName(jobName ?? name)]: {\n\t\t\t\t...(options.if && { if: options.if }),\n\t\t\t\t...(jobName && { name: jobName }),\n\t\t\t\t\"runs-on\": \"ubuntu-latest\",\n\t\t\t\tsteps: options.steps,\n\t\t\t},\n\t\t},\n\t\tname,\n\t\ton,\n\t\tpermissions,\n\t});\n}\n"],"mappings":";;;;AAsEA,SAAgB,uBAAuB,EACtC,aACA,SACA,MACA,IACA,
|
|
1
|
+
{"version":3,"file":"createSoloWorkflowFile.js","names":[],"sources":["../../../src/blocks/files/createSoloWorkflowFile.ts"],"sourcesContent":["import { createJobName } from \"./createJobName.js\";\nimport { formatWorkflowYaml } from \"./formatWorkflowYaml.js\";\n\ninterface WorkflowFileConcurrency {\n\t\"cancel-in-progress\"?: boolean;\n\tgroup: string;\n}\n\ninterface WorkflowFileOn {\n\tdiscussion?: {\n\t\ttypes?: string[];\n\t};\n\tdiscussion_comment?: {\n\t\ttypes?: string[];\n\t};\n\tissue_comment?: {\n\t\ttypes?: string[];\n\t};\n\tissues?: {\n\t\ttypes?: string[];\n\t};\n\tpull_request?:\n\t\t| null\n\t\t| string\n\t\t| {\n\t\t\t\tbranches?: string | string[];\n\t\t\t\ttypes?: string[];\n\t\t };\n\tpull_request_review_comment?: {\n\t\ttypes: string[];\n\t};\n\tpull_request_target?: {\n\t\ttypes: string[];\n\t};\n\tpush?: {\n\t\tbranches: string[];\n\t};\n\trelease?: {\n\t\ttypes: string[];\n\t};\n\tworkflow_dispatch?: null | string;\n}\ninterface WorkflowFileOptions {\n\tconcurrency?: WorkflowFileConcurrency;\n\tif?: string;\n\tjobName?: string;\n\tname: string;\n\ton?: WorkflowFileOn;\n\tpermissions?: WorkflowFilePermissions;\n\tsteps: WorkflowFileStep[];\n}\n\ninterface WorkflowFilePermissions {\n\tcontents?: string;\n\tdiscussions?: string;\n\t\"id-token\"?: string;\n\tissues?: string;\n\t\"pull-requests\"?: string;\n}\n\ninterface WorkflowFileStep {\n\tenv?: Record<string, string>;\n\tid?: string;\n\tif?: string;\n\tname?: string;\n\trun?: string;\n\tuses?: string;\n\twith?: Record<string, unknown>;\n}\n\nexport function createSoloWorkflowFile({\n\tconcurrency,\n\tjobName,\n\tname,\n\ton,\n\tpermissions,\n\t...options\n}: WorkflowFileOptions) {\n\treturn formatWorkflowYaml({\n\t\tconcurrency,\n\t\tjobs: {\n\t\t\t[createJobName(jobName ?? name)]: {\n\t\t\t\t...(options.if && { if: options.if }),\n\t\t\t\t...(jobName && { name: jobName }),\n\t\t\t\t\"runs-on\": \"ubuntu-latest\",\n\t\t\t\tsteps: options.steps,\n\t\t\t},\n\t\t},\n\t\tname,\n\t\ton,\n\t\tpermissions,\n\t});\n}\n"],"mappings":";;;;AAsEA,SAAgB,uBAAuB,EACtC,aACA,SACA,MACA,IACA,aACA,GAAG,WACoB;AACvB,QAAO,mBAAmB;EACzB;EACA,MAAM,GACJ,cAAc,WAAW,KAAK,GAAG;GACjC,GAAI,QAAQ,MAAM,EAAE,IAAI,QAAQ,IAAI;GACpC,GAAI,WAAW,EAAE,MAAM,SAAS;GAChC,WAAW;GACX,OAAO,QAAQ;GACf,EACD;EACD;EACA;EACA;EACA,CAAC"}
|