"use strict";
/* Socket Lib - Built with rolldown */
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const require_runtime = require('../_virtual/_rolldown/runtime.js');
const require_primordials_string = require('../primordials/string.js');
let src_external_validate_npm_package_name = require("../external/validate-npm-package-name");
src_external_validate_npm_package_name = require_runtime.__toESM(src_external_validate_npm_package_name);

//#region src/packages/validation.ts
/**
* @file Package name validation utilities.
*/
/**
* Check if package name is a blessed Socket.dev package.
*
* @example
*   ;```typescript
*   isBlessedPackageName('@socketregistry/is-number') // true
*   isBlessedPackageName('lodash') // false
*   ```
*/
/*@__NO_SIDE_EFFECTS__*/
function isBlessedPackageName(name) {
	return typeof name === "string" && (name === "sfw" || name === "socket" || require_primordials_string.StringPrototypeStartsWith(name, "@socketoverride/") || require_primordials_string.StringPrototypeStartsWith(name, "@socketregistry/") || require_primordials_string.StringPrototypeStartsWith(name, "@socketsecurity/"));
}
/**
* Check if a type string represents a registry fetcher type.
*
* @example
*   ;```typescript
*   isRegistryFetcherType('range') // true
*   isRegistryFetcherType('git') // false
*   ```
*/
/*@__NO_SIDE_EFFECTS__*/
function isRegistryFetcherType(type) {
	return type === "alias" || type === "range" || type === "tag" || type === "version";
}
/**
* Check if a package name is valid according to npm naming rules.
*
* @example
*   ;```typescript
*   isValidPackageName('my-package') // true
*   isValidPackageName('.invalid') // false
*   ```
*/
/*@__NO_SIDE_EFFECTS__*/
function isValidPackageName(name) {
	return (0, src_external_validate_npm_package_name.default)(name).validForOldPackages;
}

//#endregion
exports.isBlessedPackageName = isBlessedPackageName;
exports.isRegistryFetcherType = isRegistryFetcherType;
exports.isValidPackageName = isValidPackageName;