@lpm-registry/cli 0.57.0 → 0.59.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.
Files changed (62) hide show
  1. package/README.md +21 -45
  2. package/bin/lpm.js +2 -354
  3. package/bin/lpx.js +4 -0
  4. package/bin/native.js +154 -0
  5. package/package.json +40 -82
  6. package/CHANGELOG.md +0 -197
  7. package/LICENSE +0 -15
  8. package/index.d.ts +0 -131
  9. package/index.js +0 -31
  10. package/lib/api.js +0 -398
  11. package/lib/commands/add.js +0 -1217
  12. package/lib/commands/audit.js +0 -283
  13. package/lib/commands/cache.js +0 -209
  14. package/lib/commands/check-name.js +0 -112
  15. package/lib/commands/config.js +0 -186
  16. package/lib/commands/doctor.js +0 -140
  17. package/lib/commands/info.js +0 -215
  18. package/lib/commands/init.js +0 -146
  19. package/lib/commands/install.js +0 -264
  20. package/lib/commands/login.js +0 -595
  21. package/lib/commands/logout.js +0 -94
  22. package/lib/commands/marketplace-compare.js +0 -164
  23. package/lib/commands/marketplace-earnings.js +0 -89
  24. package/lib/commands/mcp-setup.js +0 -363
  25. package/lib/commands/npmrc.js +0 -178
  26. package/lib/commands/open.js +0 -82
  27. package/lib/commands/outdated.js +0 -291
  28. package/lib/commands/pool-stats.js +0 -100
  29. package/lib/commands/publish.js +0 -949
  30. package/lib/commands/quality.js +0 -211
  31. package/lib/commands/remove.js +0 -82
  32. package/lib/commands/run.js +0 -14
  33. package/lib/commands/search.js +0 -143
  34. package/lib/commands/setup.js +0 -221
  35. package/lib/commands/skills.js +0 -898
  36. package/lib/commands/token-rotate.js +0 -25
  37. package/lib/commands/uninstall.js +0 -107
  38. package/lib/commands/whoami.js +0 -129
  39. package/lib/config.js +0 -328
  40. package/lib/constants.js +0 -190
  41. package/lib/ecosystem.js +0 -501
  42. package/lib/editor-skills.js +0 -321
  43. package/lib/editors.js +0 -215
  44. package/lib/import-rewriter.js +0 -364
  45. package/lib/install-targets/mcp-server.js +0 -245
  46. package/lib/install-targets/vscode-extension.js +0 -178
  47. package/lib/install-targets.js +0 -82
  48. package/lib/integrity.js +0 -179
  49. package/lib/lpm-config-prompts.js +0 -102
  50. package/lib/lpm-config.js +0 -408
  51. package/lib/oidc.js +0 -166
  52. package/lib/project-utils.js +0 -152
  53. package/lib/quality/checks.js +0 -687
  54. package/lib/quality/display.js +0 -155
  55. package/lib/quality/score.js +0 -118
  56. package/lib/quality/swift-checks.js +0 -447
  57. package/lib/safe-path.js +0 -180
  58. package/lib/secure-store.js +0 -321
  59. package/lib/swift-project.js +0 -637
  60. package/lib/ui.js +0 -40
  61. package/scripts/__tests__/install-binary.test.js +0 -346
  62. package/scripts/install-binary.js +0 -571
package/package.json CHANGED
@@ -1,84 +1,42 @@
1
1
  {
2
- "name": "@lpm-registry/cli",
3
- "version": "0.57.0",
4
- "description": "CLI for Licensed Package Manager",
5
- "author": "LPM <hello@lpm.dev> (https://lpm.dev)",
6
- "repository": {
7
- "type": "git",
8
- "url": "https://github.com/lpm-dev/rust-client"
9
- },
10
- "homepage": "https://cli.lpm.dev",
11
- "license": "ISC",
12
- "keywords": [
13
- "lpm",
14
- "package-manager",
15
- "registry",
16
- "cli",
17
- "npm",
18
- "private-packages"
19
- ],
20
- "main": "index.js",
21
- "bin": {
22
- "lpm": "./bin/lpm.js",
23
- "lpx": "./bin/lpm.js"
24
- },
25
- "exports": {
26
- ".": "./index.js",
27
- "./lib/*": "./lib/*"
28
- },
29
- "types": "./index.d.ts",
30
- "sideEffects": false,
31
- "files": [
32
- "bin",
33
- "lib",
34
- "scripts",
35
- "!lib/__tests__",
36
- "index.js",
37
- "index.d.ts",
38
- "README.md",
39
- "CHANGELOG.md",
40
- "LICENSE"
41
- ],
42
- "scripts": {
43
- "prepare": "husky",
44
- "postinstall": "node scripts/install-binary.js",
45
- "test": "vitest run",
46
- "test:watch": "vitest",
47
- "lint": "biome check .",
48
- "lint:fix": "biome check --write ."
49
- },
50
- "dependencies": {
51
- "@clack/prompts": "^0.11.0",
52
- "boxen": "^8.0.1",
53
- "chalk": "^5.6.2",
54
- "commander": "^11.1.0",
55
- "conf": "^12.0.0",
56
- "diff": "^8.0.2",
57
- "inquirer": "^9.2.12",
58
- "open": "^11.0.0",
59
- "ora": "^8.2.0",
60
- "semver": "^7.7.3",
61
- "tar": "^7.5.2",
62
- "update-notifier": "^7.3.1",
63
- "xcode": "^3.0.1"
64
- },
65
- "optionalDependencies": {
66
- "@lpm-registry/cli-darwin-arm64": "0.57.0",
67
- "@lpm-registry/cli-darwin-x64": "0.57.0",
68
- "@lpm-registry/cli-linux-x64": "0.57.0",
69
- "@lpm-registry/cli-linux-arm64": "0.57.0",
70
- "@lpm-registry/cli-win32-x64": "0.57.0",
71
- "keytar": "^7.9.0",
72
- "sigstore": "^3.0.0"
73
- },
74
- "type": "module",
75
- "engines": {
76
- "node": ">=18.0.0"
77
- },
78
- "devDependencies": {
79
- "@biomejs/biome": "^2.3.10",
80
- "@types/node": "^22.0.0",
81
- "husky": "^9.1.7",
82
- "vitest": "^4.0.18"
83
- }
2
+ "name": "@lpm-registry/cli",
3
+ "version": "0.59.0",
4
+ "description": "LPM CLI native binary installer for npm",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/lpm-dev/rust-client"
8
+ },
9
+ "homepage": "https://cli.lpm.dev",
10
+ "license": "MIT OR Apache-2.0",
11
+ "keywords": [
12
+ "lpm",
13
+ "package-manager",
14
+ "registry",
15
+ "cli",
16
+ "npm",
17
+ "private-packages"
18
+ ],
19
+ "bin": {
20
+ "lpm": "bin/lpm.js",
21
+ "lpx": "bin/lpx.js"
22
+ },
23
+ "files": [
24
+ "bin",
25
+ "README.md"
26
+ ],
27
+ "optionalDependencies": {
28
+ "@lpm-registry/cli-darwin-arm64": "0.59.0",
29
+ "@lpm-registry/cli-darwin-x64": "0.59.0",
30
+ "@lpm-registry/cli-linux-arm64": "0.59.0",
31
+ "@lpm-registry/cli-linux-x64": "0.59.0",
32
+ "@lpm-registry/cli-win32-x64": "0.59.0"
33
+ },
34
+ "type": "module",
35
+ "engines": {
36
+ "node": ">=18.0.0"
37
+ },
38
+ "scripts": {
39
+ "test": "node --test tests/*.test.mjs",
40
+ "pack:check": "npm pack --dry-run --json"
41
+ }
84
42
  }
package/CHANGELOG.md DELETED
@@ -1,197 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- ## [0.8.0] - 2026-04-01
6
-
7
- ### Changed
8
-
9
- - **Rust binary v0.8.0** — Install hash fast-exit (82ms → 26ms up-to-date), NDJSON streaming batch metadata, resolver carries tarball URLs (eliminates double metadata fetch), up-to-date benchmark added.
10
- - **Scoped registry default** — `lpm setup` and `lpm npmrc` now write scoped config (`@lpm.dev:registry=`) by default. npm packages go direct to npmjs.org (faster, $0 proxy cost). Use `--proxy` to opt into full proxy mode (Pro/Org feature).
11
- - **Global config defaults** — `lpm config set allowNew true`, `lpm config set autoBuild true`, etc. CLI flags merge with `~/.lpm/config.toml` defaults.
12
- - **Migrate fix** — Corrected stale registry URL in `lpm migrate` (.npmrc now writes `/api/registry/` instead of `/api/packages/`).
13
- - Version bump to stay in sync with Rust binary releases.
14
-
15
- ## [0.7.0] - 2026-04-01
16
-
17
- ### Changed
18
-
19
- - **Rust binary v0.7.0** — Cold install 15.8s → 2.1s (7.5x faster). Abbreviated npm packuments, deep server-side transitive resolution, edge npm metadata proxy, connection pool sharing, hash-during-download.
20
- - **Unpublished package handling** — On tarball 404, metadata cache is invalidated and lockfile cleared so the next install re-resolves with fresh metadata.
21
- - Version bump to stay in sync with Rust binary releases.
22
-
23
- ## [0.6.0] - 2026-04-01
24
-
25
- ### Added
26
-
27
- - **Platform optionalDependencies (esbuild pattern)** — Native Rust binary now delivered via platform-specific npm packages (`@lpm-registry/cli-darwin-arm64`, etc.) instead of postinstall download. npm automatically installs only the matching platform package.
28
- - **Hard-link optimization** — Postinstall hard-links the native binary over `bin/lpm.js`, so `lpm` on PATH executes the Rust binary directly with zero Node.js overhead.
29
- - **3-tier binary resolution** — Entry point tries: (1) platform package binary, (2) GitHub Releases download fallback, (3) JS CLI fallback. Covers `--no-optional`, cross-device mounts, and offline scenarios.
30
- - **`LPM_BINARY_PATH` env override** — Point to a custom binary for debugging or local development.
31
-
32
- ### Changed
33
-
34
- - **Rust binary v0.6.0** — Sigstore provenance signing, behavioral + supply-chain security tags, `lpm self-update`, `lpm tunnel`, `lpm vault`, `lpm migrate`, `lpm graph`, TUI dashboard, Xcode project editing, import rewriting enhancements, and more.
35
- - Quality check field renamed `maxPoints` → `max_points` for consistency with registry API responses.
36
- - `bin/lpm.js` rewritten from simple lpm-bin delegate to full 3-tier resolver with platform package support.
37
- - `scripts/install-binary.js` rewritten with esbuild-pattern hard-link optimization.
38
-
39
- ## [0.5.0] - 2026-03-25
40
-
41
- ### Changed
42
-
43
- - **Rust binary v0.5.0** — Updated binary with install/add separation (Swift via `lpm install`), script runner (`lpm dev`), npmrc command, update notifier, binary lockfile, and more.
44
- - Version bump to stay in sync with Rust binary releases.
45
-
46
- ## [0.4.0] - 2026-03-24
47
-
48
- ### Added
49
-
50
- - **Rust binary drop-in replacement** — `lpm` now automatically downloads and runs the native Rust binary on postinstall. 9x faster warm installs than pnpm, 24x faster than npm. Falls back to JS CLI if binary is unavailable.
51
- - **GitHub Releases distribution** — Platform-specific binaries (macOS arm64/x64, Linux arm64/x64, Windows x64) hosted on GitHub Releases, downloaded automatically during `npm install -g @lpm-registry/cli`.
52
- - **Auto-integrate Agent Skills with AI editors** — After `lpm skills install`, skills are automatically wired into detected AI editor configs (Claude Code `CLAUDE.md`, Cursor `.cursorrules`, etc.). Use `--no-editor-setup` to skip.
53
- - **`--no-editor-setup` flag** for `lpm install` and `lpm skills install` — Skip auto-configuring AI editor integration for skills.
54
-
55
- ### Changed
56
-
57
- - Binary download URL updated from `lpm.dev/releases` to GitHub Releases (`github.com/lpm-dev/rust-client/releases`)
58
- - Skills install now passes `editorSetup` option through from `lpm install` to `lpm skills install`
59
- - Fixed unused variable lint warning in `bin/lpm.js`
60
-
61
- ## [0.3.0] - 2026-03-22
62
-
63
- ### Added
64
-
65
- - **Upstream npm proxy mode (default)** — `lpm npmrc` and `lpm setup` now configure LPM as the default registry. All packages (LPM + npm) are fetched through LPM for faster, edge-cached installs via Cloudflare R2.
66
- - **`--scoped` flag** — Use `lpm npmrc --scoped` or `lpm setup --scoped` to only route `@lpm.dev` packages through LPM (old behavior).
67
- - **Custom registry detection** — If `.npmrc` already has a custom default registry (e.g., Artifactory), the CLI warns and automatically falls back to `--scoped` mode to avoid overriding it.
68
- - **Pre-publish skills staleness warning** — When Agent Skills haven't changed since the previous version, the warning now appears before the publish confirmation prompt (instead of after), so you can cancel and update skills before publishing.
69
-
70
- ### Changed
71
-
72
- - `lpm npmrc` default output changed from `@lpm.dev:registry=...` (scoped) to `registry=...` (proxy mode)
73
- - `lpm setup` and `lpm setup --oidc` default output changed to proxy mode
74
- - Updated CLI output messaging to indicate proxy vs scoped mode
75
- - Updated README with new default behavior and `--scoped` flag
76
-
77
- ## [0.2.6] - 2026-03-21
78
-
79
- ### Added
80
-
81
- - **`lpm uninstall` command** — Mirrors `npm uninstall` with automatic registry auth. Aliases: `lpm un`, `lpm unlink`.
82
- - **`--pm` flag for install/uninstall** — Choose package manager: `lpm install --pm pnpm`. Supports npm (default), pnpm, yarn, bun.
83
- - **`lpm config set packageManager`** — Set default package manager globally. Also available via `LPM_PACKAGE_MANAGER` env var.
84
-
85
- ### Changed
86
-
87
- - `lpm install` now shows package list before install: "Found 15 LPM packages in package.json"
88
- - Skills install now scoped to explicit packages when specified (`lpm install @lpm.dev/pkg` only fetches skills for that package)
89
- - Skills install skips `file:`, `link:`, `workspace:` dependencies (local packages)
90
- - `lpm doctor` registry check fixed — uses `/-/whoami` endpoint instead of non-existent `/health`
91
- - Publish script updated with version bumping, git commit/tag/push, and `--dry-run` support
92
-
93
- ### Fixed
94
-
95
- - pnpm/yarn/bun compatibility — no longer passes npm-specific `--userconfig` flag. Uses project `.npmrc` with backup/restore for non-npm package managers.
96
-
97
- ## [0.2.5] - 2026-03-19
98
-
99
- ### Added
100
-
101
- - **`lpm npmrc` command** — Generates a 30-day read-only token and writes it to `.npmrc` for local development. Auto-adds `.npmrc` to `.gitignore`. Makes `npm install` work without env vars or manual token setup.
102
- - **`lpm setup --oidc` flag** — Exchanges CI OIDC token (GitHub Actions, GitLab CI) for a short-lived read-only install token. Eliminates static `LPM_TOKEN` secrets in CI. Falls back to `${LPM_TOKEN}` placeholder if OIDC is unavailable.
103
- - **OIDC read scope support** — Server-side OIDC token exchange now accepts `?scope=read` for install-only tokens (30 min TTL). Uses Supabase OAuth identity linking instead of trusted publisher config.
104
-
105
- ### Changed
106
-
107
- - OIDC module refactored for reuse — `exchangeOidcInstallToken()` auto-detects CI environment and exchanges for read-only tokens
108
- - `lpm setup` default mode now mentions `lpm npmrc` and `--oidc` in help output
109
-
110
- ## [0.2.4] - 2026-03-18
111
-
112
- ### Added
113
-
114
- - **2FA support for publish** — CLI prompts for TOTP code before uploading when user or org has 2FA enabled. OIDC (CI/CD) tokens are exempt.
115
- - **Lifecycle scripts quality check** — New `no-lifecycle-scripts` check (2pts) flags packages with `preinstall`, `install`, `postinstall`, `preuninstall`, `uninstall`, or `postuninstall` scripts
116
-
117
- ### Changed
118
-
119
- - Quality scoring rebalanced: `small-deps` 4pts→3pts, `has-exports-map` 4pts→3pts to accommodate the new lifecycle scripts check (total remains 100)
120
- - API client now passes through OTP-related 401/403 responses to callers instead of throwing generic auth errors
121
-
122
- ## [0.2.2] - 2026-03-16
123
-
124
- ### Added
125
-
126
- - `publish.sh` script for automated linting, testing, and publishing to npm
127
- - Local project scanning for test files during quality checks — authors no longer need to ship test files in the tarball to earn quality points
128
- - Registry-scoped token storage — dev and production tokens no longer overwrite each other
129
-
130
- ### Changed
131
-
132
- - Token storage is now scoped per registry URL with automatic migration from legacy un-scoped keys
133
- - Quality check "Has test files" now scans the local project directory instead of only the tarball contents
134
-
135
- ## [0.2.1] - 2026-03-12
136
-
137
- ### Added
138
-
139
- - **Swift & XCFramework ecosystem support** — quality checks, packaging, framework detection, and local package management for Apple platforms
140
- - **OIDC token exchange** for secret-free publishing from CI/CD (GitHub Actions, GitLab CI)
141
- - **Agent Skills management** — `lpm skills` commands for creating and managing `.lpm/skills/` packages
142
- - `lpm remove` command for uninstalling packages
143
- - `lpm install --json` output mode for programmatic usage
144
- - `lpm search` now supports semantic queries
145
- - Intellisense coverage and XCFramework size checks in quality scoring
146
- - Node.js type definitions check in quality scoring
147
- - Graceful HTTP server shutdown after login callback
148
-
149
- ### Changed
150
-
151
- - Updated quality scoring metrics (28 checks for JS, 25 for Swift, 21 for XCFramework)
152
- - Removed CI config references from quality checks
153
- - Simplified `getDefaultPath` internals
154
- - Removed `applyTemplateVariables` logic from config and commands
155
- - Improved MCP setup command with server config resolution
156
- - General code structure refactoring for readability
157
-
158
- ### Fixed
159
-
160
- - Error handling for invalid JSON in `package.json`
161
- - API request handling improvements
162
-
163
- ## [0.2.0] - 2025-02-14
164
-
165
- ### Added
166
-
167
- - Quality scoring system with 27 checks across 4 categories
168
- - `lpm publish --check` and `--min-score` flags for quality gating
169
- - `lpm add` command for source code delivery
170
- - `lpm.config.json` support for configurable source packages
171
- - Secure credential storage (OS keychain with encrypted file fallback)
172
- - SRI integrity verification for package tarballs
173
- - Path traversal protection for tarball extraction
174
- - Exponential backoff retry with rate-limit handling
175
-
176
- ### Changed
177
-
178
- - Migrated from `node-fetch` to native `fetch` (Node 18+)
179
- - Removed unused `figlet` and `form-data` dependencies
180
-
181
- ### Fixed
182
-
183
- - Missing `await` on `setToken()` in token-rotate command
184
- - URL construction for `@lpm.dev/owner.pkg` format in open command
185
- - Inconsistent limit field names in doctor command
186
-
187
- ## [0.1.0] - 2024-12-01
188
-
189
- ### Added
190
-
191
- - Initial CLI release
192
- - `lpm login`, `lpm logout`, `lpm whoami` authentication commands
193
- - `lpm publish`, `lpm install` package management
194
- - `lpm search`, `lpm info` package discovery
195
- - `lpm audit`, `lpm outdated` security and maintenance checks
196
- - `lpm doctor` health checks
197
- - `lpm config`, `lpm cache` configuration management
package/LICENSE DELETED
@@ -1,15 +0,0 @@
1
- ISC License
2
-
3
- Copyright (c) 2024-2025 LPM
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted, provided that the above
7
- copyright notice and this permission notice appear in all copies.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
12
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
14
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15
- PERFORMANCE OF THIS SOFTWARE.
package/index.d.ts DELETED
@@ -1,131 +0,0 @@
1
- /// <reference types="node" />
2
-
3
- // Type declarations for @lpm-registry/cli
4
-
5
- // --- integrity.js ---
6
-
7
- export interface IntegrityHash {
8
- algorithm: string
9
- digest: string
10
- }
11
-
12
- export interface IntegrityResult {
13
- valid: boolean
14
- algorithm?: string
15
- error?: string
16
- actual?: string
17
- }
18
-
19
- export function generateIntegrity(buffer: Buffer, algorithm?: string): string
20
- export function verifyIntegrity(
21
- buffer: Buffer,
22
- expectedIntegrity: string,
23
- ): IntegrityResult
24
- export function verifyIntegrityMultiple(
25
- buffer: Buffer,
26
- integrities: string[],
27
- ): IntegrityResult
28
- export function parseIntegrity(integrity: string): IntegrityHash
29
-
30
- // --- safe-path.js ---
31
-
32
- export interface PathValidation {
33
- valid: boolean
34
- resolvedPath?: string
35
- error?: string
36
- }
37
-
38
- export interface TarballPathValidation {
39
- valid: boolean
40
- invalidPaths?: string[]
41
- }
42
-
43
- export function validateComponentPath(
44
- projectRoot: string,
45
- componentPath: string,
46
- ): PathValidation
47
- export function validateTarballPaths(
48
- extractDir: string,
49
- filePaths: string[],
50
- ): TarballPathValidation
51
- export function resolveSafePath(
52
- basePath: string,
53
- userPath: string,
54
- ): PathValidation
55
- export function sanitizeFilename(filename: string): string
56
-
57
- // --- quality/score.js ---
58
-
59
- export interface QualityCheck {
60
- id: string
61
- category: "documentation" | "code" | "testing" | "health"
62
- label: string
63
- passed: boolean
64
- points: number
65
- max_points: number
66
- server_only?: boolean
67
- }
68
-
69
- export interface QualityMeta {
70
- tier: "excellent" | "good" | "fair" | "needs-work"
71
- score: number
72
- maxScore: number
73
- categories: Record<string, { score: number; max: number }>
74
- }
75
-
76
- export interface QualityResult {
77
- score: number
78
- checks: QualityCheck[]
79
- meta: QualityMeta
80
- }
81
-
82
- export interface QualityInput {
83
- packageJson: Record<string, unknown>
84
- readme: string | null
85
- lpmConfig: Record<string, unknown> | null
86
- files: Array<{ path: string }>
87
- unpackedSize: number
88
- }
89
-
90
- export function runQualityChecks(input: QualityInput): QualityResult
91
-
92
- // --- lpm-config.js ---
93
-
94
- export interface PackageReference {
95
- name: string
96
- version: string
97
- inlineConfig: Record<string, string>
98
- providedParams: Set<string>
99
- }
100
-
101
- export interface LpmConfig {
102
- files?: Array<{
103
- src: string
104
- dest?: string
105
- when?: string
106
- }>
107
- configSchema?: Record<string, unknown>
108
- defaultConfig?: Record<string, string>
109
- dependencies?: Record<string, unknown>
110
- }
111
-
112
- export interface LpmConfigValidation {
113
- valid: boolean
114
- errors?: string[]
115
- }
116
-
117
- export function parseLpmPackageReference(ref: string): PackageReference
118
- export function readLpmConfig(extractDir: string): LpmConfig | null
119
- export function validateLpmConfig(config: unknown): LpmConfigValidation
120
- export function filterFiles(
121
- files: LpmConfig["files"],
122
- mergedConfig: Record<string, string>,
123
- providedParams: Set<string>,
124
- ): NonNullable<LpmConfig["files"]>
125
- // --- project-utils.js ---
126
-
127
- export type Framework = "nextjs" | "vite" | "remix" | "astro" | "unknown"
128
-
129
- export function detectFramework(): Framework
130
- export function getDefaultPath(framework: Framework): string
131
- export function getUserImportPrefix(): string
package/index.js DELETED
@@ -1,31 +0,0 @@
1
- /**
2
- * @lpm-registry/cli - CLI for Licensed Package Manager
3
- *
4
- * This module re-exports key utilities for programmatic use.
5
- * For CLI usage, run `lpm` directly.
6
- */
7
-
8
- export {
9
- generateIntegrity,
10
- parseIntegrity,
11
- verifyIntegrity,
12
- verifyIntegrityMultiple,
13
- } from "./lib/integrity.js"
14
- export {
15
- filterFiles,
16
- parseLpmPackageReference,
17
- readLpmConfig,
18
- validateLpmConfig,
19
- } from "./lib/lpm-config.js"
20
- export {
21
- detectFramework,
22
- getDefaultPath,
23
- getUserImportPrefix,
24
- } from "./lib/project-utils.js"
25
- export { runQualityChecks } from "./lib/quality/score.js"
26
- export {
27
- resolveSafePath,
28
- sanitizeFilename,
29
- validateComponentPath,
30
- validateTarballPaths,
31
- } from "./lib/safe-path.js"