repopo 0.12.0 → 0.13.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/CHANGELOG.md +53 -0
- package/README.md +50 -90
- package/THIRD-PARTY-LICENSES.txt +169 -11
- package/bin/dev.js +0 -0
- package/esm/adapters/fluidFramework.d.ts +13 -9
- package/esm/adapters/fluidFramework.d.ts.map +1 -1
- package/esm/adapters/fluidFramework.js +20 -43
- package/esm/adapters/fluidFramework.js.map +1 -1
- package/esm/api.d.ts +64 -1
- package/esm/api.d.ts.map +1 -1
- package/esm/api.js +17 -1
- package/esm/api.js.map +1 -1
- package/esm/baseCommand.d.ts.map +1 -1
- package/esm/baseCommand.js +2 -2
- package/esm/baseCommand.js.map +1 -1
- package/esm/commands/check-native.d.ts +3 -3
- package/esm/commands/check-native.d.ts.map +1 -1
- package/esm/commands/check-native.js +26 -7
- package/esm/commands/check-native.js.map +1 -1
- package/esm/commands/check.d.ts +6 -21
- package/esm/commands/check.d.ts.map +1 -1
- package/esm/commands/check.js +73 -153
- package/esm/commands/check.js.map +1 -1
- package/esm/commands/list.d.ts.map +1 -1
- package/esm/commands/list.js +2 -1
- package/esm/commands/list.js.map +1 -1
- package/esm/concurrency.d.ts +3 -0
- package/esm/concurrency.d.ts.map +1 -0
- package/esm/concurrency.js +8 -0
- package/esm/concurrency.js.map +1 -0
- package/esm/config.d.ts +5 -39
- package/esm/config.d.ts.map +1 -1
- package/esm/config.js +3 -7
- package/esm/config.js.map +1 -1
- package/esm/context.d.ts +8 -1
- package/esm/context.d.ts.map +1 -1
- package/esm/context.js +8 -1
- package/esm/context.js.map +1 -1
- package/esm/executionContractError.d.ts +4 -0
- package/esm/executionContractError.d.ts.map +1 -0
- package/esm/executionContractError.js +4 -0
- package/esm/executionContractError.js.map +1 -0
- package/esm/fileCache.d.ts +12 -0
- package/esm/fileCache.d.ts.map +1 -0
- package/esm/fileCache.js +37 -0
- package/esm/fileCache.js.map +1 -0
- package/esm/filePaths.d.ts +2 -0
- package/esm/filePaths.d.ts.map +1 -0
- package/esm/filePaths.js +9 -0
- package/esm/filePaths.js.map +1 -0
- package/esm/generators.d.ts +0 -20
- package/esm/generators.d.ts.map +1 -1
- package/esm/generators.js.map +1 -1
- package/esm/index.d.ts +3 -16
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +3 -17
- package/esm/index.js.map +1 -1
- package/esm/makePolicy.d.ts +20 -100
- package/esm/makePolicy.d.ts.map +1 -1
- package/esm/makePolicy.js +44 -132
- package/esm/makePolicy.js.map +1 -1
- package/esm/perf.d.ts +5 -2
- package/esm/perf.d.ts.map +1 -1
- package/esm/perf.js +10 -9
- package/esm/perf.js.map +1 -1
- package/esm/policies/CargoLicenceValidated.d.ts +4 -4
- package/esm/policies/CargoLicenceValidated.d.ts.map +1 -1
- package/esm/policies/CargoLicenceValidated.js +9 -7
- package/esm/policies/CargoLicenceValidated.js.map +1 -1
- package/esm/policies/CargoLintsConfigured.d.ts +4 -4
- package/esm/policies/CargoLintsConfigured.d.ts.map +1 -1
- package/esm/policies/CargoLintsConfigured.js +19 -15
- package/esm/policies/CargoLintsConfigured.js.map +1 -1
- package/esm/policies/CargoLockPolicy.d.ts +4 -4
- package/esm/policies/CargoLockPolicy.d.ts.map +1 -1
- package/esm/policies/CargoLockPolicy.js +15 -11
- package/esm/policies/CargoLockPolicy.js.map +1 -1
- package/esm/policies/CargoTomlRequired.d.ts +5 -5
- package/esm/policies/CargoTomlRequired.d.ts.map +1 -1
- package/esm/policies/CargoTomlRequired.js +7 -7
- package/esm/policies/CargoTomlRequired.js.map +1 -1
- package/esm/policies/CargoTomlSorted.d.ts +4 -4
- package/esm/policies/CargoTomlSorted.d.ts.map +1 -1
- package/esm/policies/CargoTomlSorted.js +21 -17
- package/esm/policies/CargoTomlSorted.js.map +1 -1
- package/esm/policies/ConditionalScripts.d.ts +10 -8
- package/esm/policies/ConditionalScripts.d.ts.map +1 -1
- package/esm/policies/ConditionalScripts.js +24 -22
- package/esm/policies/ConditionalScripts.js.map +1 -1
- package/esm/policies/ExactScripts.d.ts +8 -6
- package/esm/policies/ExactScripts.d.ts.map +1 -1
- package/esm/policies/ExactScripts.js +15 -18
- package/esm/policies/ExactScripts.js.map +1 -1
- package/esm/policies/GleamDepVersions.d.ts +5 -5
- package/esm/policies/GleamDepVersions.d.ts.map +1 -1
- package/esm/policies/GleamDepVersions.js +5 -5
- package/esm/policies/GleamDepVersions.js.map +1 -1
- package/esm/policies/GleamDocExists.d.ts +4 -4
- package/esm/policies/GleamDocExists.d.ts.map +1 -1
- package/esm/policies/GleamDocExists.js +6 -6
- package/esm/policies/GleamDocExists.js.map +1 -1
- package/esm/policies/GleamInternalModulesConfigured.d.ts +4 -4
- package/esm/policies/GleamInternalModulesConfigured.d.ts.map +1 -1
- package/esm/policies/GleamInternalModulesConfigured.js +8 -6
- package/esm/policies/GleamInternalModulesConfigured.js.map +1 -1
- package/esm/policies/GleamLicenceConfigured.d.ts +4 -4
- package/esm/policies/GleamLicenceConfigured.d.ts.map +1 -1
- package/esm/policies/GleamLicenceConfigured.js +8 -6
- package/esm/policies/GleamLicenceConfigured.js.map +1 -1
- package/esm/policies/GleamManifestCommitted.d.ts +10 -3
- package/esm/policies/GleamManifestCommitted.d.ts.map +1 -1
- package/esm/policies/GleamManifestCommitted.js +10 -9
- package/esm/policies/GleamManifestCommitted.js.map +1 -1
- package/esm/policies/GleamMonorepoConsistency.d.ts +13 -5
- package/esm/policies/GleamMonorepoConsistency.d.ts.map +1 -1
- package/esm/policies/GleamMonorepoConsistency.js +10 -10
- package/esm/policies/GleamMonorepoConsistency.js.map +1 -1
- package/esm/policies/GleamNameRestrictions.d.ts +4 -4
- package/esm/policies/GleamNameRestrictions.d.ts.map +1 -1
- package/esm/policies/GleamNameRestrictions.js +6 -6
- package/esm/policies/GleamNameRestrictions.js.map +1 -1
- package/esm/policies/GleamNoPathDepsInPublished.d.ts +4 -4
- package/esm/policies/GleamNoPathDepsInPublished.d.ts.map +1 -1
- package/esm/policies/GleamNoPathDepsInPublished.js +6 -6
- package/esm/policies/GleamNoPathDepsInPublished.js.map +1 -1
- package/esm/policies/GleamPathDepsValid.d.ts +3 -3
- package/esm/policies/GleamPathDepsValid.d.ts.map +1 -1
- package/esm/policies/GleamPathDepsValid.js +5 -5
- package/esm/policies/GleamPathDepsValid.js.map +1 -1
- package/esm/policies/GleamProjectStructure.d.ts +11 -4
- package/esm/policies/GleamProjectStructure.d.ts.map +1 -1
- package/esm/policies/GleamProjectStructure.js +7 -8
- package/esm/policies/GleamProjectStructure.js.map +1 -1
- package/esm/policies/GleamSharedDependencyVersions.d.ts +12 -4
- package/esm/policies/GleamSharedDependencyVersions.d.ts.map +1 -1
- package/esm/policies/GleamSharedDependencyVersions.js +10 -10
- package/esm/policies/GleamSharedDependencyVersions.js.map +1 -1
- package/esm/policies/GleamTomlRequired.d.ts +4 -4
- package/esm/policies/GleamTomlRequired.d.ts.map +1 -1
- package/esm/policies/GleamTomlRequired.js +5 -5
- package/esm/policies/GleamTomlRequired.js.map +1 -1
- package/esm/policies/GleamTomlSorted.d.ts +4 -4
- package/esm/policies/GleamTomlSorted.d.ts.map +1 -1
- package/esm/policies/GleamTomlSorted.js +21 -17
- package/esm/policies/GleamTomlSorted.js.map +1 -1
- package/esm/policies/GleamVersionConstraint.d.ts +4 -4
- package/esm/policies/GleamVersionConstraint.d.ts.map +1 -1
- package/esm/policies/GleamVersionConstraint.js +14 -10
- package/esm/policies/GleamVersionConstraint.js.map +1 -1
- package/esm/policies/HtmlFileHeaders.d.ts +4 -2
- package/esm/policies/HtmlFileHeaders.d.ts.map +1 -1
- package/esm/policies/HtmlFileHeaders.js +1 -1
- package/esm/policies/HtmlFileHeaders.js.map +1 -1
- package/esm/policies/JsTsFileHeaders.d.ts +4 -2
- package/esm/policies/JsTsFileHeaders.d.ts.map +1 -1
- package/esm/policies/JsTsFileHeaders.js +1 -1
- package/esm/policies/JsTsFileHeaders.js.map +1 -1
- package/esm/policies/LicenseFileExists.d.ts +10 -4
- package/esm/policies/LicenseFileExists.d.ts.map +1 -1
- package/esm/policies/LicenseFileExists.js +27 -20
- package/esm/policies/LicenseFileExists.js.map +1 -1
- package/esm/policies/MutuallyExclusiveScripts.d.ts +8 -6
- package/esm/policies/MutuallyExclusiveScripts.d.ts.map +1 -1
- package/esm/policies/MutuallyExclusiveScripts.js +9 -13
- package/esm/policies/MutuallyExclusiveScripts.js.map +1 -1
- package/esm/policies/NoBuildDirectory.d.ts +9 -3
- package/esm/policies/NoBuildDirectory.d.ts.map +1 -1
- package/esm/policies/NoBuildDirectory.js +8 -13
- package/esm/policies/NoBuildDirectory.js.map +1 -1
- package/esm/policies/NoJsFileExtensions.d.ts +9 -3
- package/esm/policies/NoJsFileExtensions.d.ts.map +1 -1
- package/esm/policies/NoJsFileExtensions.js +9 -14
- package/esm/policies/NoJsFileExtensions.js.map +1 -1
- package/esm/policies/NoLargeBinaryFiles.d.ts +9 -4
- package/esm/policies/NoLargeBinaryFiles.d.ts.map +1 -1
- package/esm/policies/NoLargeBinaryFiles.js +10 -16
- package/esm/policies/NoLargeBinaryFiles.js.map +1 -1
- package/esm/policies/NoPrivateWorkspaceDependencies.d.ts +10 -6
- package/esm/policies/NoPrivateWorkspaceDependencies.d.ts.map +1 -1
- package/esm/policies/NoPrivateWorkspaceDependencies.js +12 -14
- package/esm/policies/NoPrivateWorkspaceDependencies.js.map +1 -1
- package/esm/policies/NoTargetArtifacts.d.ts +9 -3
- package/esm/policies/NoTargetArtifacts.d.ts.map +1 -1
- package/esm/policies/NoTargetArtifacts.js +9 -14
- package/esm/policies/NoTargetArtifacts.js.map +1 -1
- package/esm/policies/NoUnsafeWithoutJustification.d.ts +11 -4
- package/esm/policies/NoUnsafeWithoutJustification.d.ts.map +1 -1
- package/esm/policies/NoUnsafeWithoutJustification.js +8 -9
- package/esm/policies/NoUnsafeWithoutJustification.js.map +1 -1
- package/esm/policies/NoWildcardDependencies.d.ts +5 -5
- package/esm/policies/NoWildcardDependencies.d.ts.map +1 -1
- package/esm/policies/NoWildcardDependencies.js +6 -6
- package/esm/policies/NoWildcardDependencies.js.map +1 -1
- package/esm/policies/PackageAllowedScopes.d.ts +9 -5
- package/esm/policies/PackageAllowedScopes.d.ts.map +1 -1
- package/esm/policies/PackageAllowedScopes.js +15 -16
- package/esm/policies/PackageAllowedScopes.js.map +1 -1
- package/esm/policies/PackageEsmType.d.ts +7 -5
- package/esm/policies/PackageEsmType.d.ts.map +1 -1
- package/esm/policies/PackageEsmType.js +31 -31
- package/esm/policies/PackageEsmType.js.map +1 -1
- package/esm/policies/PackageFolderName.d.ts +8 -6
- package/esm/policies/PackageFolderName.d.ts.map +1 -1
- package/esm/policies/PackageFolderName.js +13 -16
- package/esm/policies/PackageFolderName.js.map +1 -1
- package/esm/policies/PackageJsonProperties.d.ts +5 -3
- package/esm/policies/PackageJsonProperties.d.ts.map +1 -1
- package/esm/policies/PackageJsonProperties.js +6 -17
- package/esm/policies/PackageJsonProperties.js.map +1 -1
- package/esm/policies/PackageJsonRepoDirectoryProperty.d.ts +2 -7
- package/esm/policies/PackageJsonRepoDirectoryProperty.d.ts.map +1 -1
- package/esm/policies/PackageJsonRepoDirectoryProperty.js +28 -42
- package/esm/policies/PackageJsonRepoDirectoryProperty.js.map +1 -1
- package/esm/policies/PackageJsonSorted.d.ts +2 -2
- package/esm/policies/PackageJsonSorted.d.ts.map +1 -1
- package/esm/policies/PackageJsonSorted.js +15 -30
- package/esm/policies/PackageJsonSorted.js.map +1 -1
- package/esm/policies/PackageLicense.d.ts +4 -4
- package/esm/policies/PackageLicense.d.ts.map +1 -1
- package/esm/policies/PackageLicense.js +31 -52
- package/esm/policies/PackageLicense.js.map +1 -1
- package/esm/policies/PackagePrivateField.d.ts +12 -8
- package/esm/policies/PackagePrivateField.d.ts.map +1 -1
- package/esm/policies/PackagePrivateField.js +31 -23
- package/esm/policies/PackagePrivateField.js.map +1 -1
- package/esm/policies/PackageReadme.d.ts +6 -5
- package/esm/policies/PackageReadme.d.ts.map +1 -1
- package/esm/policies/PackageReadme.js +22 -59
- package/esm/policies/PackageReadme.js.map +1 -1
- package/esm/policies/PackageScripts.d.ts +26 -22
- package/esm/policies/PackageScripts.d.ts.map +1 -1
- package/esm/policies/PackageScripts.js +39 -36
- package/esm/policies/PackageScripts.js.map +1 -1
- package/esm/policies/PackageTestScripts.d.ts +10 -6
- package/esm/policies/PackageTestScripts.d.ts.map +1 -1
- package/esm/policies/PackageTestScripts.js +14 -16
- package/esm/policies/PackageTestScripts.js.map +1 -1
- package/esm/policies/PublicApiDocumented.d.ts +4 -4
- package/esm/policies/PublicApiDocumented.d.ts.map +1 -1
- package/esm/policies/PublicApiDocumented.js +10 -8
- package/esm/policies/PublicApiDocumented.js.map +1 -1
- package/esm/policies/RequiredGitignorePatterns.d.ts +11 -4
- package/esm/policies/RequiredGitignorePatterns.d.ts.map +1 -1
- package/esm/policies/RequiredGitignorePatterns.js +29 -36
- package/esm/policies/RequiredGitignorePatterns.js.map +1 -1
- package/esm/policies/RequiredScripts.d.ts +9 -7
- package/esm/policies/RequiredScripts.d.ts.map +1 -1
- package/esm/policies/RequiredScripts.js +24 -24
- package/esm/policies/RequiredScripts.js.map +1 -1
- package/esm/policies/RustDocExists.d.ts +4 -4
- package/esm/policies/RustDocExists.d.ts.map +1 -1
- package/esm/policies/RustDocExists.js +6 -6
- package/esm/policies/RustDocExists.js.map +1 -1
- package/esm/policies/RustToolchainExists.d.ts +11 -4
- package/esm/policies/RustToolchainExists.d.ts.map +1 -1
- package/esm/policies/RustToolchainExists.js +10 -9
- package/esm/policies/RustToolchainExists.js.map +1 -1
- package/esm/policies/RustfmtConfigExists.d.ts +11 -4
- package/esm/policies/RustfmtConfigExists.d.ts.map +1 -1
- package/esm/policies/RustfmtConfigExists.js +10 -9
- package/esm/policies/RustfmtConfigExists.js.map +1 -1
- package/esm/policies/ScriptContains.d.ts +9 -7
- package/esm/policies/ScriptContains.d.ts.map +1 -1
- package/esm/policies/ScriptContains.js +9 -13
- package/esm/policies/ScriptContains.js.map +1 -1
- package/esm/policies/SharedDependencyVersions.d.ts +9 -4
- package/esm/policies/SharedDependencyVersions.d.ts.map +1 -1
- package/esm/policies/SharedDependencyVersions.js +28 -20
- package/esm/policies/SharedDependencyVersions.js.map +1 -1
- package/esm/policies/WorkspaceInheritance.d.ts +11 -4
- package/esm/policies/WorkspaceInheritance.d.ts.map +1 -1
- package/esm/policies/WorkspaceInheritance.js +10 -11
- package/esm/policies/WorkspaceInheritance.js.map +1 -1
- package/esm/policies/WorkspaceMembersValid.d.ts +11 -4
- package/esm/policies/WorkspaceMembersValid.d.ts.map +1 -1
- package/esm/policies/WorkspaceMembersValid.js +10 -11
- package/esm/policies/WorkspaceMembersValid.js.map +1 -1
- package/esm/policies/constants.d.ts.map +1 -1
- package/esm/policies/constants.js +1 -1
- package/esm/policies/constants.js.map +1 -1
- package/esm/policies.d.ts +13 -5
- package/esm/policies.d.ts.map +1 -1
- package/esm/policies.js +12 -5
- package/esm/policies.js.map +1 -1
- package/esm/policy.d.ts +61 -289
- package/esm/policy.d.ts.map +1 -1
- package/esm/policy.js +1 -122
- package/esm/policy.js.map +1 -1
- package/esm/policyDefiners/defineCargoPolicy.d.ts +25 -9
- package/esm/policyDefiners/defineCargoPolicy.d.ts.map +1 -1
- package/esm/policyDefiners/defineCargoPolicy.js +10 -28
- package/esm/policyDefiners/defineCargoPolicy.js.map +1 -1
- package/esm/policyDefiners/defineFileHeaderPolicy.d.ts +27 -14
- package/esm/policyDefiners/defineFileHeaderPolicy.d.ts.map +1 -1
- package/esm/policyDefiners/defineFileHeaderPolicy.js +16 -35
- package/esm/policyDefiners/defineFileHeaderPolicy.js.map +1 -1
- package/esm/policyDefiners/defineGleamPolicy.d.ts +25 -9
- package/esm/policyDefiners/defineGleamPolicy.d.ts.map +1 -1
- package/esm/policyDefiners/defineGleamPolicy.js +10 -27
- package/esm/policyDefiners/defineGleamPolicy.js.map +1 -1
- package/esm/policyDefiners/definePackagePolicy.d.ts +24 -13
- package/esm/policyDefiners/definePackagePolicy.d.ts.map +1 -1
- package/esm/policyDefiners/definePackagePolicy.js +9 -32
- package/esm/policyDefiners/definePackagePolicy.js.map +1 -1
- package/esm/policyDefiners/spdxValidator.d.ts +4 -12
- package/esm/policyDefiners/spdxValidator.d.ts.map +1 -1
- package/esm/policyDefiners/spdxValidator.js +26 -14
- package/esm/policyDefiners/spdxValidator.js.map +1 -1
- package/esm/policyExecution.d.ts +19 -0
- package/esm/policyExecution.d.ts.map +1 -0
- package/esm/policyExecution.js +224 -0
- package/esm/policyExecution.js.map +1 -0
- package/esm/repositoryFiles.d.ts +4 -0
- package/esm/repositoryFiles.d.ts.map +1 -0
- package/esm/repositoryFiles.js +8 -0
- package/esm/repositoryFiles.js.map +1 -0
- package/esm/runner.d.ts +72 -47
- package/esm/runner.d.ts.map +1 -1
- package/esm/runner.js +153 -138
- package/esm/runner.js.map +1 -1
- package/esm/settlePolicyPromise.d.ts +4 -0
- package/esm/settlePolicyPromise.d.ts.map +1 -0
- package/esm/settlePolicyPromise.js +10 -0
- package/esm/settlePolicyPromise.js.map +1 -0
- package/esm/tsdoc-metadata.json +1 -1
- package/esm/utils/safePaths.d.ts +9 -0
- package/esm/utils/safePaths.d.ts.map +1 -0
- package/esm/utils/safePaths.js +40 -0
- package/esm/utils/safePaths.js.map +1 -0
- package/oclif.manifest.json +19 -2
- package/package.json +42 -27
- package/scripts/benchmark.mjs +341 -0
- package/sidecar/sidecar.mjs +348 -417
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { existsSync, readdirSync } from "node:fs";
|
|
2
2
|
import { readFile } from "node:fs/promises";
|
|
3
3
|
import path from "pathe";
|
|
4
|
-
import { makePolicyDefinition } from "../makePolicy.js";
|
|
5
4
|
import { parseToml } from "../policyDefiners/tomlParser.js";
|
|
6
5
|
const GLOB_SUFFIX_REGEX = /\/?\*\*?$/;
|
|
7
6
|
/**
|
|
@@ -51,9 +50,9 @@ function validateMember(member, root, errors) {
|
|
|
51
50
|
/**
|
|
52
51
|
* A policy that validates Cargo workspace member paths exist.
|
|
53
52
|
*
|
|
54
|
-
* @
|
|
53
|
+
* @public
|
|
55
54
|
*/
|
|
56
|
-
export const WorkspaceMembersValid =
|
|
55
|
+
export const WorkspaceMembersValid = {
|
|
57
56
|
name: "WorkspaceMembersValid",
|
|
58
57
|
description: "Validates that all Cargo workspace member paths exist and contain Cargo.toml files.",
|
|
59
58
|
match: /^Cargo\.toml$/,
|
|
@@ -63,26 +62,26 @@ export const WorkspaceMembersValid = makePolicyDefinition({
|
|
|
63
62
|
const toml = await parseToml(content);
|
|
64
63
|
const workspace = toml.workspace;
|
|
65
64
|
if (!workspace) {
|
|
66
|
-
return
|
|
65
|
+
return [];
|
|
67
66
|
}
|
|
68
67
|
const members = workspace.members;
|
|
69
68
|
if (!members || members.length === 0) {
|
|
70
|
-
return
|
|
69
|
+
return [];
|
|
71
70
|
}
|
|
72
71
|
if (!validatePaths) {
|
|
73
|
-
return
|
|
72
|
+
return [];
|
|
74
73
|
}
|
|
75
74
|
const errors = [];
|
|
76
75
|
for (const member of members) {
|
|
77
76
|
validateMember(member, root, errors);
|
|
78
77
|
}
|
|
79
78
|
if (errors.length > 0) {
|
|
80
|
-
return {
|
|
81
|
-
|
|
79
|
+
return errors.map((message) => ({
|
|
80
|
+
message,
|
|
82
81
|
manualFix: "Fix the workspace.members paths in root Cargo.toml to point to valid crate directories.",
|
|
83
|
-
};
|
|
82
|
+
}));
|
|
84
83
|
}
|
|
85
|
-
return
|
|
84
|
+
return [];
|
|
86
85
|
},
|
|
87
|
-
}
|
|
86
|
+
};
|
|
88
87
|
//# sourceMappingURL=WorkspaceMembersValid.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkspaceMembersValid.js","sourceRoot":"","sources":["../../src/policies/WorkspaceMembersValid.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAA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AAM,OAAO,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC;QAClE,MAAM,IAAI,GAAG,MAAM,SAAS,CAAC,OAAO,CAAC,CAAC;QAEtC,MAAM,SAAS,GAAG,IAAI,CAAC,SAAgD,CAAC;QACxE,IAAI,CAAC,SAAS,EAAE,CAAC;YAChB,OAAO,EAAE,CAAC;QACX,CAAC;QAED,MAAM,OAAO,GAAG,SAAS,CAAC,OAA+B,CAAC;QAC1D,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACtC,OAAO,EAAE,CAAC;QACX,CAAC;QAED,IAAI,CAAC,aAAa,EAAE,CAAC;YACpB,OAAO,EAAE,CAAC;QACX,CAAC;QAED,MAAM,MAAM,GAAa,EAAE,CAAC;QAE5B,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;YAC9B,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QACtC,CAAC;QAED,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvB,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;gBAC/B,OAAO;gBACP,SAAS,EACR,yFAAyF;aAC1F,CAAC,CAAC,CAAC;QACL,CAAC;QACD,OAAO,EAAE,CAAC;IACX,CAAC;CAC2D,CAAC","sourcesContent":["import { existsSync, readdirSync } from \"node:fs\";\nimport { readFile } from \"node:fs/promises\";\nimport path from \"pathe\";\nimport type { FilePolicyDefinition } from \"../policy.js\";\nimport { parseToml } from \"../policyDefiners/tomlParser.js\";\n\n/**\n * Configuration for the WorkspaceMembersValid policy.\n *\n * @public\n */\nexport interface WorkspaceMembersValidConfig {\n\t/**\n\t * If true, validate that all member paths exist on disk.\n\t * @defaultValue true\n\t */\n\tvalidatePaths?: boolean;\n}\n\nconst GLOB_SUFFIX_REGEX = /\\/?\\*\\*?$/;\n\n/**\n * Expand a simple glob pattern (e.g., \"crates/*\") into matching directories.\n */\nfunction expandSimpleGlob(root: string, pattern: string): string[] {\n\tif (!pattern.includes(\"*\")) {\n\t\treturn [pattern];\n\t}\n\n\tconst base = pattern.replace(GLOB_SUFFIX_REGEX, \"\");\n\tconst baseDir = path.join(root, base);\n\n\tif (!existsSync(baseDir)) {\n\t\treturn [];\n\t}\n\n\ttry {\n\t\tconst entries = readdirSync(baseDir, { withFileTypes: true });\n\t\treturn entries\n\t\t\t.filter((e) => e.isDirectory())\n\t\t\t.filter((e) => existsSync(path.join(baseDir, e.name, \"Cargo.toml\")))\n\t\t\t.map((e) => path.join(base, e.name));\n\t} catch {\n\t\treturn [];\n\t}\n}\n\n/**\n * Validate a single workspace member entry.\n */\nfunction validateMember(member: string, root: string, errors: string[]): void {\n\tif (member.includes(\"*\")) {\n\t\t// Expand glob and check each result\n\t\tconst expanded = expandSimpleGlob(root, member);\n\t\tif (expanded.length === 0) {\n\t\t\terrors.push(\n\t\t\t\t`Workspace member glob \"${member}\" matches no directories with Cargo.toml`,\n\t\t\t);\n\t\t}\n\t} else {\n\t\tconst memberPath = path.join(root, member);\n\t\tif (!existsSync(memberPath)) {\n\t\t\terrors.push(`Workspace member \"${member}\" does not exist`);\n\t\t} else if (!existsSync(path.join(memberPath, \"Cargo.toml\"))) {\n\t\t\terrors.push(`Workspace member \"${member}\" exists but has no Cargo.toml`);\n\t\t}\n\t}\n}\n\n/**\n * A policy that validates Cargo workspace member paths exist.\n *\n * @public\n */\nexport const WorkspaceMembersValid = {\n\tname: \"WorkspaceMembersValid\",\n\tdescription:\n\t\t\"Validates that all Cargo workspace member paths exist and contain Cargo.toml files.\",\n\tmatch: /^Cargo\\.toml$/,\n\thandler: async ({ file, root, config }) => {\n\t\tconst validatePaths = config?.validatePaths ?? true;\n\n\t\tconst content = await readFile(path.resolve(root, file), \"utf-8\");\n\t\tconst toml = await parseToml(content);\n\n\t\tconst workspace = toml.workspace as Record<string, unknown> | undefined;\n\t\tif (!workspace) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst members = workspace.members as string[] | undefined;\n\t\tif (!members || members.length === 0) {\n\t\t\treturn [];\n\t\t}\n\n\t\tif (!validatePaths) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst errors: string[] = [];\n\n\t\tfor (const member of members) {\n\t\t\tvalidateMember(member, root, errors);\n\t\t}\n\n\t\tif (errors.length > 0) {\n\t\t\treturn errors.map((message) => ({\n\t\t\t\tmessage,\n\t\t\t\tmanualFix:\n\t\t\t\t\t\"Fix the workspace.members paths in root Cargo.toml to point to valid crate directories.\",\n\t\t\t}));\n\t\t}\n\t\treturn [];\n\t},\n} satisfies FilePolicyDefinition<WorkspaceMembersValidConfig>;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/policies/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/policies/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,qBAAqB,QAA0B,CAAC;AAC7D;;GAEG;AACH,eAAO,MAAM,mBAAmB,QAAuB,CAAC;AAExD;;GAEG;AACH,eAAO,MAAM,mBAAmB,QAAuB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A regular expression that matches package.json files in path strings.
|
|
3
3
|
*/
|
|
4
|
-
export const PackageJsonRegexMatch = /(^|\/)package\.json
|
|
4
|
+
export const PackageJsonRegexMatch = /(^|\/)package\.json$/i;
|
|
5
5
|
/**
|
|
6
6
|
* A regular expression that matches Cargo.toml files in path strings.
|
|
7
7
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/policies/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/policies/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AAC7D;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,oBAAoB,CAAC;AAExD;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,oBAAoB,CAAC","sourcesContent":["/**\n * A regular expression that matches package.json files in path strings.\n */\nexport const PackageJsonRegexMatch = /(^|\\/)package\\.json$/i;\n/**\n * A regular expression that matches Cargo.toml files in path strings.\n */\nexport const CargoTomlRegexMatch = /(^|\\/)Cargo\\.toml$/;\n\n/**\n * A regular expression that matches gleam.toml files in path strings.\n */\nexport const GleamTomlRegexMatch = /(^|\\/)gleam\\.toml$/;\n"]}
|
package/esm/policies.d.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Built-in file and repository policies and their configuration types.
|
|
3
|
+
*
|
|
4
|
+
* Use `makePolicy()` from `repopo` or `repopo/api` to configure these definitions.
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
*/
|
|
1
8
|
export { CargoLicenceValidated, type CargoLicenceValidatedConfig, } from "./policies/CargoLicenceValidated.js";
|
|
2
9
|
export { CargoLintsConfigured, type CargoLintsConfiguredConfig, } from "./policies/CargoLintsConfigured.js";
|
|
3
10
|
export { CargoLockPolicy, type CargoLockPolicyConfig, } from "./policies/CargoLockPolicy.js";
|
|
@@ -21,19 +28,19 @@ export { GleamTomlSorted, type GleamTomlSortedConfig, } from "./policies/GleamTo
|
|
|
21
28
|
export { GleamVersionConstraint, type GleamVersionConstraintConfig, } from "./policies/GleamVersionConstraint.js";
|
|
22
29
|
export { HtmlFileHeaders } from "./policies/HtmlFileHeaders.js";
|
|
23
30
|
export { JsTsFileHeaders } from "./policies/JsTsFileHeaders.js";
|
|
24
|
-
export { LicenseFileExists } from "./policies/LicenseFileExists.js";
|
|
31
|
+
export { LicenseFileExists, type LicenseFileExistsSettings, } from "./policies/LicenseFileExists.js";
|
|
25
32
|
export { MutuallyExclusiveScripts, type MutuallyExclusiveScriptsConfig, } from "./policies/MutuallyExclusiveScripts.js";
|
|
26
33
|
export { NoBuildDirectory } from "./policies/NoBuildDirectory.js";
|
|
27
34
|
export { NoJsFileExtensions } from "./policies/NoJsFileExtensions.js";
|
|
28
|
-
export { NoLargeBinaryFiles } from "./policies/NoLargeBinaryFiles.js";
|
|
29
|
-
export { NoPrivateWorkspaceDependencies } from "./policies/NoPrivateWorkspaceDependencies.js";
|
|
35
|
+
export { NoLargeBinaryFiles, type NoLargeBinaryFilesSettings, } from "./policies/NoLargeBinaryFiles.js";
|
|
36
|
+
export { NoPrivateWorkspaceDependencies, type NoPrivateWorkspaceDependenciesSettings, } from "./policies/NoPrivateWorkspaceDependencies.js";
|
|
30
37
|
export { NoTargetArtifacts } from "./policies/NoTargetArtifacts.js";
|
|
31
38
|
export { NoUnsafeWithoutJustification, type NoUnsafeWithoutJustificationConfig, } from "./policies/NoUnsafeWithoutJustification.js";
|
|
32
39
|
export { NoWildcardDependencies, type NoWildcardDependenciesConfig, } from "./policies/NoWildcardDependencies.js";
|
|
33
40
|
export { PackageAllowedScopes, type PackageAllowedScopesConfig, } from "./policies/PackageAllowedScopes.js";
|
|
34
41
|
export { PackageEsmType, type PackageEsmTypeConfig, } from "./policies/PackageEsmType.js";
|
|
35
42
|
export { PackageFolderName, type PackageFolderNameConfig, } from "./policies/PackageFolderName.js";
|
|
36
|
-
export { PackageJsonProperties } from "./policies/PackageJsonProperties.js";
|
|
43
|
+
export { PackageJsonProperties, type PackageJsonPropertiesSettings, } from "./policies/PackageJsonProperties.js";
|
|
37
44
|
export { PackageJsonRepoDirectoryProperty } from "./policies/PackageJsonRepoDirectoryProperty.js";
|
|
38
45
|
export { PackageJsonSorted } from "./policies/PackageJsonSorted.js";
|
|
39
46
|
export { PackageLicense, type PackageLicenseSettings, } from "./policies/PackageLicense.js";
|
|
@@ -42,7 +49,7 @@ export { PackageReadme, type PackageReadmeSettings, } from "./policies/PackageRe
|
|
|
42
49
|
export { type ConditionalScriptRule as LegacyConditionalScriptRule, PackageScripts, type PackageScriptsSettings, type RequiredScriptEntry as LegacyRequiredScriptEntry, type ScriptMustContainRule, } from "./policies/PackageScripts.js";
|
|
43
50
|
export { PackageTestScripts, type PackageTestScriptsConfig, } from "./policies/PackageTestScripts.js";
|
|
44
51
|
export { PublicApiDocumented, type PublicApiDocumentedConfig, } from "./policies/PublicApiDocumented.js";
|
|
45
|
-
export { RequiredGitignorePatterns } from "./policies/RequiredGitignorePatterns.js";
|
|
52
|
+
export { RequiredGitignorePatterns, type RequiredGitignorePatternsSettings, } from "./policies/RequiredGitignorePatterns.js";
|
|
46
53
|
export { type RequiredScriptEntry, RequiredScripts, type RequiredScriptsConfig, } from "./policies/RequiredScripts.js";
|
|
47
54
|
export { RustDocExists, type RustDocExistsConfig, } from "./policies/RustDocExists.js";
|
|
48
55
|
export { RustfmtConfigExists, type RustfmtConfigExistsConfig, } from "./policies/RustfmtConfigExists.js";
|
|
@@ -52,4 +59,5 @@ export { SharedDependencyVersions, type SharedDependencyVersionsConfig, } from "
|
|
|
52
59
|
export { WorkspaceInheritance, type WorkspaceInheritanceConfig, } from "./policies/WorkspaceInheritance.js";
|
|
53
60
|
export { WorkspaceMembersValid, type WorkspaceMembersValidConfig, } from "./policies/WorkspaceMembersValid.js";
|
|
54
61
|
export { DefaultPolicies } from "./policy.js";
|
|
62
|
+
export type { FileHeaderGeneratorConfig, FileHeaderPolicyConfig, } from "./policyDefiners/defineFileHeaderPolicy.js";
|
|
55
63
|
//# sourceMappingURL=policies.d.ts.map
|
package/esm/policies.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policies.d.ts","sourceRoot":"","sources":["../src/policies.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"policies.d.ts","sourceRoot":"","sources":["../src/policies.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EACN,qBAAqB,EACrB,KAAK,2BAA2B,GAChC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACN,oBAAoB,EACpB,KAAK,0BAA0B,GAC/B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACN,eAAe,EACf,KAAK,qBAAqB,GAC1B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACN,iBAAiB,EACjB,KAAK,uBAAuB,GAC5B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACN,eAAe,EACf,KAAK,qBAAqB,GAC1B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACN,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,kBAAkB,EAClB,KAAK,wBAAwB,GAC7B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACN,YAAY,EACZ,KAAK,kBAAkB,GACvB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACN,gBAAgB,EAChB,KAAK,sBAAsB,GAC3B,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACN,cAAc,EACd,KAAK,oBAAoB,GACzB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACN,8BAA8B,EAC9B,KAAK,oCAAoC,GACzC,MAAM,8CAA8C,CAAC;AAEtD,OAAO,EACN,sBAAsB,EACtB,KAAK,4BAA4B,GACjC,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAE9E,OAAO,EACN,wBAAwB,EACxB,KAAK,8BAA8B,GACnC,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EACN,qBAAqB,EACrB,KAAK,2BAA2B,GAChC,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EACN,0BAA0B,EAC1B,KAAK,gCAAgC,GACrC,MAAM,0CAA0C,CA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K,oBAAoB,EACzB,KAAK,kBAAkB,GACvB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACN,wBAAwB,EACxB,KAAK,8BAA8B,GACnC,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACN,oBAAoB,EACpB,KAAK,0BAA0B,GAC/B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACN,qBAAqB,EACrB,KAAK,2BAA2B,GAChC,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,YAAY,EACX,yBAAyB,EACzB,sBAAsB,GACtB,MAAM,4CAA4C,CAAC"}
|
package/esm/policies.js
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Built-in file and repository policies and their configuration types.
|
|
3
|
+
*
|
|
4
|
+
* Use `makePolicy()` from `repopo` or `repopo/api` to configure these definitions.
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
*/
|
|
1
8
|
// Cargo.toml / Rust policies
|
|
2
9
|
// biome-ignore lint/performance/noBarrelFile: intentional public API entry point for policies
|
|
3
10
|
export { CargoLicenceValidated, } from "./policies/CargoLicenceValidated.js";
|
|
@@ -37,16 +44,16 @@ export { GleamVersionConstraint, } from "./policies/GleamVersionConstraint.js";
|
|
|
37
44
|
export { HtmlFileHeaders } from "./policies/HtmlFileHeaders.js";
|
|
38
45
|
export { JsTsFileHeaders } from "./policies/JsTsFileHeaders.js";
|
|
39
46
|
// License policies
|
|
40
|
-
export { LicenseFileExists } from "./policies/LicenseFileExists.js";
|
|
47
|
+
export { LicenseFileExists, } from "./policies/LicenseFileExists.js";
|
|
41
48
|
export { MutuallyExclusiveScripts, } from "./policies/MutuallyExclusiveScripts.js";
|
|
42
49
|
// Build directory policies
|
|
43
50
|
export { NoBuildDirectory } from "./policies/NoBuildDirectory.js";
|
|
44
51
|
// File extension policies
|
|
45
52
|
export { NoJsFileExtensions } from "./policies/NoJsFileExtensions.js";
|
|
46
53
|
// File size policies
|
|
47
|
-
export { NoLargeBinaryFiles } from "./policies/NoLargeBinaryFiles.js";
|
|
54
|
+
export { NoLargeBinaryFiles, } from "./policies/NoLargeBinaryFiles.js";
|
|
48
55
|
// Dependency policies
|
|
49
|
-
export { NoPrivateWorkspaceDependencies } from "./policies/NoPrivateWorkspaceDependencies.js";
|
|
56
|
+
export { NoPrivateWorkspaceDependencies, } from "./policies/NoPrivateWorkspaceDependencies.js";
|
|
50
57
|
// Rust build artifact policies
|
|
51
58
|
export { NoTargetArtifacts } from "./policies/NoTargetArtifacts.js";
|
|
52
59
|
// Rust unsafe code policies
|
|
@@ -59,7 +66,7 @@ export { PackageAllowedScopes, } from "./policies/PackageAllowedScopes.js";
|
|
|
59
66
|
export { PackageEsmType, } from "./policies/PackageEsmType.js";
|
|
60
67
|
export { PackageFolderName, } from "./policies/PackageFolderName.js";
|
|
61
68
|
// Package.json field policies
|
|
62
|
-
export { PackageJsonProperties } from "./policies/PackageJsonProperties.js";
|
|
69
|
+
export { PackageJsonProperties, } from "./policies/PackageJsonProperties.js";
|
|
63
70
|
export { PackageJsonRepoDirectoryProperty } from "./policies/PackageJsonRepoDirectoryProperty.js";
|
|
64
71
|
export { PackageJsonSorted } from "./policies/PackageJsonSorted.js";
|
|
65
72
|
export { PackageLicense, } from "./policies/PackageLicense.js";
|
|
@@ -72,7 +79,7 @@ export { PackageTestScripts, } from "./policies/PackageTestScripts.js";
|
|
|
72
79
|
// Rust documentation policies
|
|
73
80
|
export { PublicApiDocumented, } from "./policies/PublicApiDocumented.js";
|
|
74
81
|
// Gitignore policies
|
|
75
|
-
export { RequiredGitignorePatterns } from "./policies/RequiredGitignorePatterns.js";
|
|
82
|
+
export { RequiredGitignorePatterns, } from "./policies/RequiredGitignorePatterns.js";
|
|
76
83
|
export { RequiredScripts, } from "./policies/RequiredScripts.js";
|
|
77
84
|
// Rust documentation file policies
|
|
78
85
|
export { RustDocExists, } from "./policies/RustDocExists.js";
|
package/esm/policies.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policies.js","sourceRoot":"","sources":["../src/policies.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,8FAA8F;AAC9F,OAAO,EACN,qBAAqB,GAErB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACN,oBAAoB,GAEpB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACN,eAAe,GAEf,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACN,iBAAiB,GAEjB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACN,eAAe,GAEf,MAAM,+BAA+B,CAAC;AACvC,gEAAgE;AAChE,OAAO,EAGN,kBAAkB,GAElB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACN,YAAY,GAEZ,MAAM,4BAA4B,CAAC;AACpC,4BAA4B;AAC5B,OAAO,EACN,gBAAgB,GAEhB,MAAM,gCAAgC,CAAC;AACxC,+BAA+B;AAC/B,OAAO,EACN,cAAc,GAEd,MAAM,8BAA8B,CAAC;AACtC,kCAAkC;AAClC,OAAO,EACN,8BAA8B,GAE9B,MAAM,8CAA8C,CAAC;AACtD,yBAAyB;AACzB,OAAO,EACN,sBAAsB,GAEtB,MAAM,sCAAsC,CAAC;AAC9C,mCAAmC;AACnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,0BAA0B;AAC1B,OAAO,EACN,wBAAwB,GAExB,MAAM,wCAAwC,CAAC;AAChD,wBAAwB;AACxB,OAAO,EACN,qBAAqB,GAErB,MAAM,qCAAqC,CAAC;AAC7C,iCAAiC;AACjC,OAAO,EACN,0BAA0B,GAE1B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EACN,qBAAqB,GAErB,MAAM,qCAAqC,CAAC;AAC7C,2CAA2C;AAC3C,OAAO,EACN,6BAA6B,GAE7B,MAAM,6CAA6C,CAA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BAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EACN,cAAc,GAEd,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACN,mBAAmB,GAEnB,MAAM,mCAAmC,CAAC;AAC3C,0BAA0B;AAC1B,OAAO,EACN,aAAa,GAEb,MAAM,6BAA6B,CAAC;AACrC,mEAAmE;AACnE,OAAO,EAEN,cAAc,GAId,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACN,kBAAkB,GAElB,MAAM,kCAAkC,CAAC;AAC1C,8BAA8B;AAC9B,OAAO,EACN,mBAAmB,GAEnB,MAAM,mCAAmC,CAAC;AAC3C,qBAAqB;AACrB,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAEN,eAAe,GAEf,MAAM,+BAA+B,CAAC;AACvC,mCAAmC;AACnC,OAAO,EACN,aAAa,GAEb,MAAM,6BAA6B,CAAC;AACrC,kCAAkC;AAClC,OAAO,EACN,mBAAmB,GAEnB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACN,mBAAmB,GAEnB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACN,cAAc,GAGd,MAAM,8BAA8B,CAAC;AACtC,2BAA2B;AAC3B,OAAO,EACN,wBAAwB,GAExB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACN,oBAAoB,GAEpB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACN,qBAAqB,GAErB,MAAM,qCAAqC,CAAC;AAC7C,mBAAmB;AACnB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC","sourcesContent":["// Cargo.toml / Rust policies\n// biome-ignore lint/performance/noBarrelFile: intentional public API entry point for policies\nexport {\n\tCargoLicenceValidated,\n\ttype CargoLicenceValidatedConfig,\n} from \"./policies/CargoLicenceValidated.js\";\nexport {\n\tCargoLintsConfigured,\n\ttype CargoLintsConfiguredConfig,\n} from \"./policies/CargoLintsConfigured.js\";\nexport {\n\tCargoLockPolicy,\n\ttype CargoLockPolicyConfig,\n} from \"./policies/CargoLockPolicy.js\";\nexport {\n\tCargoTomlRequired,\n\ttype CargoTomlRequiredConfig,\n} from \"./policies/CargoTomlRequired.js\";\nexport {\n\tCargoTomlSorted,\n\ttype CargoTomlSortedConfig,\n} from \"./policies/CargoTomlSorted.js\";\n// New focused script policies (replacements for PackageScripts)\nexport {\n\ttype ConditionalScriptEntry,\n\ttype ConditionalScriptRule,\n\tConditionalScripts,\n\ttype ConditionalScriptsConfig,\n} from \"./policies/ConditionalScripts.js\";\nexport {\n\tExactScripts,\n\ttype ExactScriptsConfig,\n} from \"./policies/ExactScripts.js\";\n// Gleam dependency policies\nexport {\n\tGleamDepVersions,\n\ttype GleamDepVersionsConfig,\n} from \"./policies/GleamDepVersions.js\";\n// Gleam documentation policies\nexport {\n\tGleamDocExists,\n\ttype GleamDocExistsConfig,\n} from \"./policies/GleamDocExists.js\";\n// Gleam internal modules policies\nexport {\n\tGleamInternalModulesConfigured,\n\ttype GleamInternalModulesConfiguredConfig,\n} from \"./policies/GleamInternalModulesConfigured.js\";\n// Gleam licence policies\nexport {\n\tGleamLicenceConfigured,\n\ttype GleamLicenceConfiguredConfig,\n} from \"./policies/GleamLicenceConfigured.js\";\n// Gleam project structure policies\nexport { GleamManifestCommitted } from \"./policies/GleamManifestCommitted.js\";\n// Gleam monorepo policies\nexport {\n\tGleamMonorepoConsistency,\n\ttype GleamMonorepoConsistencyConfig,\n} from \"./policies/GleamMonorepoConsistency.js\";\n// Gleam naming policies\nexport {\n\tGleamNameRestrictions,\n\ttype GleamNameRestrictionsConfig,\n} from \"./policies/GleamNameRestrictions.js\";\n// Gleam path dependency policies\nexport {\n\tGleamNoPathDepsInPublished,\n\ttype GleamNoPathDepsInPublishedConfig,\n} from \"./policies/GleamNoPathDepsInPublished.js\";\nexport { GleamPathDepsValid } from \"./policies/GleamPathDepsValid.js\";\nexport {\n\tGleamProjectStructure,\n\ttype GleamProjectStructureConfig,\n} from \"./policies/GleamProjectStructure.js\";\n// Gleam shared dependency version policies\nexport {\n\tGleamSharedDependencyVersions,\n\ttype GleamSharedDependencyVersionsConfig,\n} from \"./policies/GleamSharedDependencyVersions.js\";\n// Gleam toml field policies\nexport {\n\tGleamTomlRequired,\n\ttype GleamTomlRequiredConfig,\n} from \"./policies/GleamTomlRequired.js\";\nexport {\n\tGleamTomlSorted,\n\ttype GleamTomlSortedConfig,\n} from \"./policies/GleamTomlSorted.js\";\n// Gleam version constraint policies\nexport {\n\tGleamVersionConstraint,\n\ttype GleamVersionConstraintConfig,\n} from \"./policies/GleamVersionConstraint.js\";\n// File header policies\nexport { HtmlFileHeaders } from \"./policies/HtmlFileHeaders.js\";\nexport { JsTsFileHeaders } from \"./policies/JsTsFileHeaders.js\";\n// License policies\nexport { LicenseFileExists } from \"./policies/LicenseFileExists.js\";\nexport {\n\tMutuallyExclusiveScripts,\n\ttype MutuallyExclusiveScriptsConfig,\n} from \"./policies/MutuallyExclusiveScripts.js\";\n// Build directory policies\nexport { NoBuildDirectory } from \"./policies/NoBuildDirectory.js\";\n// File extension policies\nexport { NoJsFileExtensions } from \"./policies/NoJsFileExtensions.js\";\n// File size policies\nexport { NoLargeBinaryFiles } from \"./policies/NoLargeBinaryFiles.js\";\n// Dependency policies\nexport { NoPrivateWorkspaceDependencies } from \"./policies/NoPrivateWorkspaceDependencies.js\";\n// Rust build artifact policies\nexport { NoTargetArtifacts } from \"./policies/NoTargetArtifacts.js\";\n// Rust unsafe code policies\nexport {\n\tNoUnsafeWithoutJustification,\n\ttype NoUnsafeWithoutJustificationConfig,\n} from \"./policies/NoUnsafeWithoutJustification.js\";\n// Rust dependency policies\nexport {\n\tNoWildcardDependencies,\n\ttype NoWildcardDependenciesConfig,\n} from \"./policies/NoWildcardDependencies.js\";\n// Package naming policies\nexport {\n\tPackageAllowedScopes,\n\ttype PackageAllowedScopesConfig,\n} from \"./policies/PackageAllowedScopes.js\";\n// Package type policies\nexport {\n\tPackageEsmType,\n\ttype PackageEsmTypeConfig,\n} from \"./policies/PackageEsmType.js\";\nexport {\n\tPackageFolderName,\n\ttype PackageFolderNameConfig,\n} from \"./policies/PackageFolderName.js\";\n// Package.json field policies\nexport { PackageJsonProperties } from \"./policies/PackageJsonProperties.js\";\nexport { PackageJsonRepoDirectoryProperty } from \"./policies/PackageJsonRepoDirectoryProperty.js\";\nexport { PackageJsonSorted } from \"./policies/PackageJsonSorted.js\";\nexport {\n\tPackageLicense,\n\ttype PackageLicenseSettings,\n} from \"./policies/PackageLicense.js\";\nexport {\n\tPackagePrivateField,\n\ttype PackagePrivateFieldConfig,\n} from \"./policies/PackagePrivateField.js\";\n// Package readme policies\nexport {\n\tPackageReadme,\n\ttype PackageReadmeSettings,\n} from \"./policies/PackageReadme.js\";\n// Package script policies (legacy - prefer focused policies above)\nexport {\n\ttype ConditionalScriptRule as LegacyConditionalScriptRule,\n\tPackageScripts,\n\ttype PackageScriptsSettings,\n\ttype RequiredScriptEntry as LegacyRequiredScriptEntry,\n\ttype ScriptMustContainRule,\n} from \"./policies/PackageScripts.js\";\nexport {\n\tPackageTestScripts,\n\ttype PackageTestScriptsConfig,\n} from \"./policies/PackageTestScripts.js\";\n// Rust documentation policies\nexport {\n\tPublicApiDocumented,\n\ttype PublicApiDocumentedConfig,\n} from \"./policies/PublicApiDocumented.js\";\n// Gitignore policies\nexport { RequiredGitignorePatterns } from \"./policies/RequiredGitignorePatterns.js\";\nexport {\n\ttype RequiredScriptEntry,\n\tRequiredScripts,\n\ttype RequiredScriptsConfig,\n} from \"./policies/RequiredScripts.js\";\n// Rust documentation file policies\nexport {\n\tRustDocExists,\n\ttype RustDocExistsConfig,\n} from \"./policies/RustDocExists.js\";\n// Rust project structure policies\nexport {\n\tRustfmtConfigExists,\n\ttype RustfmtConfigExistsConfig,\n} from \"./policies/RustfmtConfigExists.js\";\nexport {\n\tRustToolchainExists,\n\ttype RustToolchainExistsConfig,\n} from \"./policies/RustToolchainExists.js\";\nexport {\n\tScriptContains,\n\ttype ScriptContainsConfig,\n\ttype ScriptContainsRule,\n} from \"./policies/ScriptContains.js\";\n// Cargo workspace policies\nexport {\n\tSharedDependencyVersions,\n\ttype SharedDependencyVersionsConfig,\n} from \"./policies/SharedDependencyVersions.js\";\nexport {\n\tWorkspaceInheritance,\n\ttype WorkspaceInheritanceConfig,\n} from \"./policies/WorkspaceInheritance.js\";\nexport {\n\tWorkspaceMembersValid,\n\ttype WorkspaceMembersValidConfig,\n} from \"./policies/WorkspaceMembersValid.js\";\n// Default policies\nexport { DefaultPolicies } from \"./policy.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"policies.js","sourceRoot":"","sources":["../src/policies.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,6BAA6B;AAC7B,8FAA8F;AAC9F,OAAO,EACN,qBAAqB,GAErB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACN,oBAAoB,GAEpB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACN,eAAe,GAEf,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACN,iBAAiB,GAEjB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACN,eAAe,GAEf,MAAM,+BAA+B,CAAC;AACvC,gEAAgE;AAChE,OAAO,EAGN,kBAAkB,GAElB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACN,YAAY,GAEZ,MAAM,4BAA4B,CAAC;AACpC,4BAA4B;AAC5B,OAAO,EACN,gBAAgB,GAEhB,MAAM,gCAAgC,CAAC;AACxC,+BAA+B;AAC/B,OAAO,EACN,cAAc,GAEd,MAAM,8BAA8B,CAAC;AACtC,kCAAkC;AAClC,OAAO,EACN,8BAA8B,GAE9B,MAAM,8CAA8C,CAAC;AACtD,yBAAyB;AACzB,OAAO,EACN,sBAAsB,GAEtB,MAAM,sCAAsC,CAAC;AAC9C,mCAAmC;AACnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,0BAA0B;AAC1B,OAAO,EACN,wBAAwB,GAExB,MAAM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AC;AAC7C,mBAAmB;AACnB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC","sourcesContent":["/**\n * Built-in file and repository policies and their configuration types.\n *\n * Use `makePolicy()` from `repopo` or `repopo/api` to configure these definitions.\n *\n * @packageDocumentation\n */\n\n// Cargo.toml / Rust policies\n// biome-ignore lint/performance/noBarrelFile: intentional public API entry point for policies\nexport {\n\tCargoLicenceValidated,\n\ttype CargoLicenceValidatedConfig,\n} from \"./policies/CargoLicenceValidated.js\";\nexport {\n\tCargoLintsConfigured,\n\ttype CargoLintsConfiguredConfig,\n} from \"./policies/CargoLintsConfigured.js\";\nexport {\n\tCargoLockPolicy,\n\ttype CargoLockPolicyConfig,\n} from \"./policies/CargoLockPolicy.js\";\nexport {\n\tCargoTomlRequired,\n\ttype CargoTomlRequiredConfig,\n} from \"./policies/CargoTomlRequired.js\";\nexport {\n\tCargoTomlSorted,\n\ttype CargoTomlSortedConfig,\n} from \"./policies/CargoTomlSorted.js\";\n// New focused script policies (replacements for PackageScripts)\nexport {\n\ttype ConditionalScriptEntry,\n\ttype ConditionalScriptRule,\n\tConditionalScripts,\n\ttype ConditionalScriptsConfig,\n} from \"./policies/ConditionalScripts.js\";\nexport {\n\tExactScripts,\n\ttype ExactScriptsConfig,\n} from \"./policies/ExactScripts.js\";\n// Gleam dependency policies\nexport {\n\tGleamDepVersions,\n\ttype GleamDepVersionsConfig,\n} from \"./policies/GleamDepVersions.js\";\n// Gleam documentation policies\nexport {\n\tGleamDocExists,\n\ttype GleamDocExistsConfig,\n} from \"./policies/GleamDocExists.js\";\n// Gleam internal modules policies\nexport {\n\tGleamInternalModulesConfigured,\n\ttype GleamInternalModulesConfiguredConfig,\n} from \"./policies/GleamInternalModulesConfigured.js\";\n// Gleam licence policies\nexport {\n\tGleamLicenceConfigured,\n\ttype GleamLicenceConfiguredConfig,\n} from \"./policies/GleamLicenceConfigured.js\";\n// Gleam project structure policies\nexport { GleamManifestCommitted } from \"./policies/GleamManifestCommitted.js\";\n// Gleam monorepo policies\nexport {\n\tGleamMonorepoConsistency,\n\ttype GleamMonorepoConsistencyConfig,\n} from \"./policies/GleamMonorepoConsistency.js\";\n// Gleam naming policies\nexport {\n\tGleamNameRestrictions,\n\ttype GleamNameRestrictionsConfig,\n} from \"./policies/GleamNameRestrictions.js\";\n// Gleam path dependency policies\nexport {\n\tGleamNoPathDepsInPublished,\n\ttype GleamNoPathDepsInPublishedConfig,\n} from \"./policies/GleamNoPathDepsInPublished.js\";\nexport { GleamPathDepsValid } from \"./policies/GleamPathDepsValid.js\";\nexport {\n\tGleamProjectStructure,\n\ttype GleamProjectStructureConfig,\n} from \"./policies/GleamProjectStructure.js\";\n// Gleam shared dependency version policies\nexport {\n\tGleamSharedDependencyVersions,\n\ttype GleamSharedDependencyVersionsConfig,\n} from \"./policies/GleamSharedDependencyVersions.js\";\n// Gleam toml field policies\nexport {\n\tGleamTomlRequired,\n\ttype GleamTomlRequiredConfig,\n} from \"./policies/GleamTomlRequired.js\";\nexport {\n\tGleamTomlSorted,\n\ttype GleamTomlSortedConfig,\n} from \"./policies/GleamTomlSorted.js\";\n// Gleam version constraint policies\nexport {\n\tGleamVersionConstraint,\n\ttype GleamVersionConstraintConfig,\n} from \"./policies/GleamVersionConstraint.js\";\n// File header policies\nexport { HtmlFileHeaders } from \"./policies/HtmlFileHeaders.js\";\nexport { JsTsFileHeaders } from \"./policies/JsTsFileHeaders.js\";\n// License policies\nexport {\n\tLicenseFileExists,\n\ttype LicenseFileExistsSettings,\n} from \"./policies/LicenseFileExists.js\";\nexport {\n\tMutuallyExclusiveScripts,\n\ttype MutuallyExclusiveScriptsConfig,\n} from \"./policies/MutuallyExclusiveScripts.js\";\n// Build directory policies\nexport { NoBuildDirectory } from \"./policies/NoBuildDirectory.js\";\n// File extension policies\nexport { NoJsFileExtensions } from \"./policies/NoJsFileExtensions.js\";\n// File size policies\nexport {\n\tNoLargeBinaryFiles,\n\ttype NoLargeBinaryFilesSettings,\n} from \"./policies/NoLargeBinaryFiles.js\";\n// Dependency policies\nexport {\n\tNoPrivateWorkspaceDependencies,\n\ttype NoPrivateWorkspaceDependenciesSettings,\n} from \"./policies/NoPrivateWorkspaceDependencies.js\";\n// Rust build artifact policies\nexport { NoTargetArtifacts } from \"./policies/NoTargetArtifacts.js\";\n// Rust unsafe code policies\nexport {\n\tNoUnsafeWithoutJustification,\n\ttype NoUnsafeWithoutJustificationConfig,\n} from \"./policies/NoUnsafeWithoutJustification.js\";\n// Rust dependency policies\nexport {\n\tNoWildcardDependencies,\n\ttype NoWildcardDependenciesConfig,\n} from \"./policies/NoWildcardDependencies.js\";\n// Package naming policies\nexport {\n\tPackageAllowedScopes,\n\ttype PackageAllowedScopesConfig,\n} from \"./policies/PackageAllowedScopes.js\";\n// Package type policies\nexport {\n\tPackageEsmType,\n\ttype PackageEsmTypeConfig,\n} from \"./policies/PackageEsmType.js\";\nexport {\n\tPackageFolderName,\n\ttype PackageFolderNameConfig,\n} from \"./policies/PackageFolderName.js\";\n// Package.json field policies\nexport {\n\tPackageJsonProperties,\n\ttype PackageJsonPropertiesSettings,\n} from \"./policies/PackageJsonProperties.js\";\nexport { PackageJsonRepoDirectoryProperty } from \"./policies/PackageJsonRepoDirectoryProperty.js\";\nexport { PackageJsonSorted } from \"./policies/PackageJsonSorted.js\";\nexport {\n\tPackageLicense,\n\ttype PackageLicenseSettings,\n} from \"./policies/PackageLicense.js\";\nexport {\n\tPackagePrivateField,\n\ttype PackagePrivateFieldConfig,\n} from \"./policies/PackagePrivateField.js\";\n// Package readme policies\nexport {\n\tPackageReadme,\n\ttype PackageReadmeSettings,\n} from \"./policies/PackageReadme.js\";\n// Package script policies (legacy - prefer focused policies above)\nexport {\n\ttype ConditionalScriptRule as LegacyConditionalScriptRule,\n\tPackageScripts,\n\ttype PackageScriptsSettings,\n\ttype RequiredScriptEntry as LegacyRequiredScriptEntry,\n\ttype ScriptMustContainRule,\n} from \"./policies/PackageScripts.js\";\nexport {\n\tPackageTestScripts,\n\ttype PackageTestScriptsConfig,\n} from \"./policies/PackageTestScripts.js\";\n// Rust documentation policies\nexport {\n\tPublicApiDocumented,\n\ttype PublicApiDocumentedConfig,\n} from \"./policies/PublicApiDocumented.js\";\n// Gitignore policies\nexport {\n\tRequiredGitignorePatterns,\n\ttype RequiredGitignorePatternsSettings,\n} from \"./policies/RequiredGitignorePatterns.js\";\nexport {\n\ttype RequiredScriptEntry,\n\tRequiredScripts,\n\ttype RequiredScriptsConfig,\n} from \"./policies/RequiredScripts.js\";\n// Rust documentation file policies\nexport {\n\tRustDocExists,\n\ttype RustDocExistsConfig,\n} from \"./policies/RustDocExists.js\";\n// Rust project structure policies\nexport {\n\tRustfmtConfigExists,\n\ttype RustfmtConfigExistsConfig,\n} from \"./policies/RustfmtConfigExists.js\";\nexport {\n\tRustToolchainExists,\n\ttype RustToolchainExistsConfig,\n} from \"./policies/RustToolchainExists.js\";\nexport {\n\tScriptContains,\n\ttype ScriptContainsConfig,\n\ttype ScriptContainsRule,\n} from \"./policies/ScriptContains.js\";\n// Cargo workspace policies\nexport {\n\tSharedDependencyVersions,\n\ttype SharedDependencyVersionsConfig,\n} from \"./policies/SharedDependencyVersions.js\";\nexport {\n\tWorkspaceInheritance,\n\ttype WorkspaceInheritanceConfig,\n} from \"./policies/WorkspaceInheritance.js\";\nexport {\n\tWorkspaceMembersValid,\n\ttype WorkspaceMembersValidConfig,\n} from \"./policies/WorkspaceMembersValid.js\";\n// Default policies\nexport { DefaultPolicies } from \"./policy.js\";\nexport type {\n\tFileHeaderGeneratorConfig,\n\tFileHeaderPolicyConfig,\n} from \"./policyDefiners/defineFileHeaderPolicy.js\";\n"]}
|