open-index/open-npm huggingface dataset:
npm package: @glpkg/cli
Description: GitLab Package Manager CLI
Latest version: 0.2.1

# @glpkg/cli

GitLab Package Manager CLI commands.

## Installation

```bash
npm install @glpkg/cli
```

## Usage

```typescript
import { configCommand, installCommand, publishCommand } from '@glpkg/cli';
```

## API

### Commands

| Command | Description |
|---------|-------------|
| `configCommand` | Configure GitLab token and scope mappings |
| `installCommand` | Install packages from GitLab registry |
| `publishCommand` | Publish packages to GitLab registry |

## CLI Usage

```bash
# Configure token
glpkg config save <token>

# Install package
glpkg install @scope/package-name

# Publish package
glpkg publish --bump patch
```

## License

MIT
npm package: @glpkg/config
Description: Configuration management for glpkg
Latest version: 0.1.0

# @glpkg/config

Configuration management for GitLab Package Manager.

## Installation

```bash
npm install @glpkg/config
```

## Usage

```typescript
import {
  saveToken, getToken, hasToken, removeToken,
  getPackageInfo, savePackageInfo,
  getScopeMapping, setScopeMapping
} from '@glpkg/config';
```

## API

### Token Management

| Function | Description |
|----------|-------------|
| `saveToken(token)` | Save GitLab token |
| `getToken()` | Get stored token |
| `hasToken()` | Check if token exists |
| `removeToken()` | Remove stored token |

### Package Registry

| Function | Description |
|----------|-------------|
| `getPackageInfo(name)` | Get package info |
| `savePackageInfo(info)` | Save package info |
| `getAllPackages()` | Get all packages |
| `removePackageInfo(name)` | Remove package |

### Scope Mapping

| Function | Description |
|----------|-------------|
| `getScopeMapping(scope)` | Get scope mapping |
| `setScopeMapping(scope, group)` | Set scope to group mapping |
| `getAllScopes()` | Get all scope mappings |

## License

MIT
npm package: @glpkg/core
Description: Core utilities for GitLab Package Manager
Latest version: 0.2.1

# @glpkg/core

Core utilities for GitLab Package Manager.

## Installation

```bash
npm install @glpkg/core
```

## Usage

```typescript
import {
  createClient, GitLabApiClient,
  createTokenManager, createConfigManager,
  parseVersion, parsePackageName, buildRegistryUrl
} from '@glpkg/core';
```

## API

### GitLab API Client

```typescript
const client = createClient({ host: 'gitlab.com', token: 'xxx' });
await client.getGroup('my-group');
await client.listPackages(123);
```

### Token Manager

```typescript
const tokenManager = createTokenManager();
tokenManager.save('glpat-xxx');
const token = tokenManager.get();
```

### Version Utils

| Function | Description |
|----------|-------------|
| `parseVersion(v)` | Parse semver string |
| `compareVersions(a, b)` | Compare two versions |
| `incrementVersion(v, type)` | Bump version |

### Package Utils

| Function | Description |
|----------|-------------|
| `parsePackageName(name)` | Parse package name |
| `extractScope(name)` | Extract @scope |
| `isScoped(name)` | Check if scoped |

### URL Utils

| Function | Description |
|----------|-------------|
| `buildRegistryUrl(opts)` | Build registry URL |
| `buildNpmrcAuthLine(...)` | Build .npmrc auth line |

## License

MIT
npm package: @glpkg/installer
Description: Package installation for GitLab registry (npm and generic)
Latest version: 0.1.0

# @glpkg/installer

Package installation for GitLab registry.

## Installation

```bash
npm install @glpkg/installer
```

## Usage

```typescript
import {
  NpmInstaller,
  NpmrcManager,
  GenericInstaller
} from '@glpkg/installer';
```

## API

### NpmInstaller

Install npm packages from GitLab registry.

```typescript
const installer = new NpmInstaller({ token: 'xxx' });
await installer.install('@scope/package', '1.0.0');
```

### NpmrcManager

Manage .npmrc configuration for GitLab registry.

```typescript
const manager = new NpmrcManager();
manager.addRegistry('@scope', 'https://gitlab.com/.../npm/');
manager.setAuthToken('gitlab.com', 'xxx');
```

### GenericInstaller

Install generic (tarball) packages from GitLab.

```typescript
const installer = new GenericInstaller({ token: 'xxx' });
await installer.install('package-name', '1.0.0', './dest');
```

### Types

- `InstallOptions` - Installation options
- `InstallResult` - Installation result
- `NpmrcEntry` - .npmrc entry structure

## License

MIT
npm package: @glpkg/publisher
Description: Publishing utilities for GitLab Package Registry (NPM & Generic)
Latest version: 0.1.0

# @glpkg/publisher

Publishing utilities for GitLab Package Registry.

## Installation

```bash
npm install @glpkg/publisher
```

## Usage

```typescript
import {
  NpmPublisher,
  GenericPublisher,
  VersionManager
} from '@glpkg/publisher';
```

## API

### NpmPublisher

Publish npm packages to GitLab registry.

```typescript
const publisher = new NpmPublisher({ token: 'xxx', projectId: 123 });
await publisher.publish({ tag: 'latest' });
```

### GenericPublisher

Publish generic (tarball) packages to GitLab.

```typescript
const publisher = new GenericPublisher({ token: 'xxx', projectId: 123 });
await publisher.publish('package-name', '1.0.0', './dist');
```

### VersionManager

Manage package versions with auto-bump.

```typescript
const vm = new VersionManager('./package.json');
await vm.bump('patch'); // 1.0.0 -> 1.0.1
await vm.bump('minor'); // 1.0.1 -> 1.1.0
await vm.bump('major'); // 1.1.0 -> 2.0.0
```

### Types

- `PublishOptions` - Publish options
- `PublishResult` - Publish result
- `BumpType` - 'major' | 'minor' | 'patch'

## License

MIT
npm package: @glpkg/registry
Description: Registry adapters and providers for GitLab Package Manager
Latest version: 0.1.0

# @glpkg/registry

Registry adapters and providers for GitLab Package Manager.

## Installation

```bash
npm install @glpkg/registry
```

## Usage

```typescript
import { BaseAdapter } from '@glpkg/registry';
import type {
  IPackageAdapter,
  IRegistryProvider,
  ProviderConfig
} from '@glpkg/registry';
```

## API

### BaseAdapter

Base class for implementing registry adapters.

```typescript
class MyAdapter extends BaseAdapter {
  async resolve(pkg: PackageIdentifier): Promise<PackageMetadata> {
    // Custom resolution logic
  }

  async exists(name: string, version: string): Promise<ExistsResult> {
    // Check if package exists
  }
}
```

### Types

| Type | Description |
|------|-------------|
| `IPackageAdapter` | Package adapter interface |
| `IExtendedPackageAdapter` | Extended adapter with more features |
| `IRegistryProvider` | Registry provider interface |
| `ProviderConfig` | Provider configuration |
| `AdapterOptions` | Adapter options |
| `ExistsResult` | Package existence check result |

### Re-exported Types

From `@glpkg/core`:
- `PackageIdentifier`, `PackageMetadata`
- `RegistryType`, `RegistryStatus`
- `InstallOptions`

## License

MIT
npm package: @glpkg/tarball
Description: Tarball creation and extraction utilities for glpkg
Latest version: 0.1.0

# @glpkg/tarball

Tarball utilities for GitLab Package Manager.

## Installation

```bash
npm install @glpkg/tarball
```

## Usage

```typescript
import {
  createTarball,
  extractTarball,
  listTarball,
  cleanupTarball,
  sanitizeName,
  collectFiles
} from '@glpkg/tarball';
```

## API

### createTarball

Create a tarball from files matching glob patterns.

```typescript
const result = await createTarball({
  name: '@scope/package',
  version: '1.0.0',
  files: ['dist/**/*', 'package.json'],
  exclude: ['**/*.test.js']
}, process.cwd());
// => { tarballPath, filename, size }
```

### extractTarball

Extract a tarball to a directory.

```typescript
await extractTarball('./package.tar.gz', './dest');
```

### listTarball

List contents of a tarball.

```typescript
const files = await listTarball('./package.tar.gz');
// => ['dist/index.js', 'package.json', ...]
```

### Utilities

| Function | Description |
|----------|-------------|
| `sanitizeName(name)` | `@scope/pkg` → `scope__pkg` |
| `collectFiles(patterns, exclude, dir)` | Collect files by glob |
| `cleanupTarball(path)` | Delete tarball file |

## License

MIT