blockend-cli 1.5.0 → 2.0.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.
@@ -0,0 +1,44 @@
1
+ export interface AssetMapping {
2
+ source: string;
3
+ target: string;
4
+ }
5
+ export interface AdapterConfig {
6
+ dependencies?: string[];
7
+ devDependencies?: string[];
8
+ files: string[] | AssetMapping[];
9
+ }
10
+ export interface EnvironmentConfig {
11
+ core?: string;
12
+ dependencies?: string[];
13
+ devDependencies?: string[];
14
+ variants: Record<string, AdapterConfig>;
15
+ }
16
+ export interface BlockManifest {
17
+ name: string;
18
+ description: string;
19
+ version?: string;
20
+ frameworks?: Array<"express" | "fastify" | "hono" | "next" | "*">;
21
+ dependencies?: string[];
22
+ devDependencies?: string[];
23
+ baseFiles?: AssetMapping[];
24
+ adapters?: Record<string, EnvironmentConfig>;
25
+ environments?: Record<string, EnvironmentConfig>;
26
+ }
27
+ export interface RegistryManifest {
28
+ version?: string;
29
+ blocks?: Record<string, BlockManifest>;
30
+ [blockKey: string]: unknown;
31
+ }
32
+ export declare function parseDepSpec(dep: string): {
33
+ name: string;
34
+ versionRange: string | null;
35
+ };
36
+ export declare function semverSatisfies(installed: string, range: string): boolean;
37
+ export declare function getVersionConflicts(deps: string[], installed: Record<string, string>): string[];
38
+ export declare const getMissingDependencies: (deps: string[], installed: Record<string, string>, forceLatest?: boolean) => string[];
39
+ export declare function rewriteFileImports(fileContent: string, writtenFilePath: string, blocksRoot: string, aliasBase: string | undefined, strategy: "rewrite" | "remove", downloadedFiles?: Set<string>): string;
40
+ export declare function addCommand(blockName: string | undefined, options?: {
41
+ yes?: boolean;
42
+ json?: boolean;
43
+ multi?: boolean;
44
+ }): Promise<void>;
@@ -0,0 +1,3 @@
1
+ export declare function detectCommand(options?: {
2
+ json?: boolean;
3
+ }): Promise<void>;
@@ -0,0 +1,16 @@
1
+ export interface DiffFile {
2
+ name: string;
3
+ sourcePath: string;
4
+ targetPath: string;
5
+ existingContent: string | null;
6
+ newContent: string;
7
+ status: "new" | "modified" | "unchanged";
8
+ }
9
+ export interface DiffResult {
10
+ block: string;
11
+ files: DiffFile[];
12
+ error?: string;
13
+ }
14
+ export declare function diffCommand(blockName: string | undefined, options?: {
15
+ json?: boolean;
16
+ }): Promise<DiffResult>;
@@ -0,0 +1,13 @@
1
+ export interface DoctorCheck {
2
+ name: string;
3
+ status: "ok" | "warning" | "error";
4
+ message: string;
5
+ }
6
+ export interface DoctorResult {
7
+ checks: DoctorCheck[];
8
+ warnings: DoctorCheck[];
9
+ errors: DoctorCheck[];
10
+ }
11
+ export declare function doctorCommand(options?: {
12
+ json?: boolean;
13
+ }): Promise<DoctorResult>;
@@ -0,0 +1,26 @@
1
+ export declare function initCommand(options?: {
2
+ yes?: boolean;
3
+ json?: boolean;
4
+ }): Promise<void>;
5
+ export interface InstalledBlockRecord {
6
+ name: string;
7
+ version: string;
8
+ installedAt: string;
9
+ files: string[];
10
+ contentHash: string;
11
+ }
12
+ export type configPayloadType = {
13
+ $schema: string;
14
+ environment: "express" | "fastify" | "hono" | "next" | "none";
15
+ language: "typescript" | "javascript";
16
+ packageManager: string;
17
+ importRewriteStrategy: "rewrite" | "remove";
18
+ includeRedis: boolean;
19
+ aliases: {
20
+ blocks?: string;
21
+ };
22
+ paths: {
23
+ blocks: string;
24
+ };
25
+ installed?: InstalledBlockRecord[];
26
+ };
@@ -0,0 +1,3 @@
1
+ export declare function listCommand(options?: {
2
+ json?: boolean;
3
+ }): Promise<void>;
@@ -0,0 +1,8 @@
1
+ export type SupportedClient = "claude" | "codex" | "cursor" | "vscode" | "windsurf";
2
+ export declare function mcpStartCommand(): Promise<void>;
3
+ export declare function mcpInitCommand(options: {
4
+ client?: string;
5
+ force?: boolean;
6
+ dryRun?: boolean;
7
+ yes?: boolean;
8
+ }): Promise<void>;
@@ -0,0 +1,29 @@
1
+ export interface UpdateBlockInfo {
2
+ name: string;
3
+ localVersion: string;
4
+ remoteVersion: string;
5
+ status: "up-to-date" | "update-available" | "not-tracked";
6
+ }
7
+ export interface FileDiff {
8
+ name: string;
9
+ file: string;
10
+ status: "added" | "modified" | "removed" | "unchanged";
11
+ lines: DiffLine[];
12
+ }
13
+ export interface DiffLine {
14
+ type: "added" | "removed" | "context";
15
+ content: string;
16
+ oldLineNo?: number;
17
+ newLineNo?: number;
18
+ }
19
+ export interface UpdateResult {
20
+ blocks: UpdateBlockInfo[];
21
+ applied?: string[];
22
+ diffs?: Record<string, FileDiff[]>;
23
+ error?: string;
24
+ }
25
+ export declare function updateCommand(options?: {
26
+ json?: boolean;
27
+ diff?: boolean;
28
+ apply?: boolean;
29
+ }): Promise<UpdateResult>;
@@ -0,0 +1,2 @@
1
+ import { ProjectContext } from "../types/index.js";
2
+ export declare function detectFramework(deps: Record<string, string>): ProjectContext["framework"];
@@ -0,0 +1,2 @@
1
+ import type { ProjectContext } from "../types/index.js";
2
+ export declare function detectProject(cwd: string): Promise<ProjectContext>;
@@ -0,0 +1,2 @@
1
+ import type { ProjectContext } from "../types/index.js";
2
+ export declare function detectPackageManager(cwd: string): ProjectContext["packageManager"];
@@ -0,0 +1 @@
1
+ export declare function inferSrcDir(cwd: string): Promise<string>;
@@ -0,0 +1,10 @@
1
+ export interface PackageJson {
2
+ name?: string;
3
+ version?: string;
4
+ dependencies?: Record<string, string>;
5
+ devDependencies?: Record<string, string>;
6
+ peerDependencies?: Record<string, string>;
7
+ engines?: Record<string, string>;
8
+ type?: string;
9
+ }
10
+ export declare function readPackageJson(cwd: string): Promise<PackageJson>;
@@ -0,0 +1 @@
1
+ export declare function readTemplate(blockName: string): Promise<string>;
@@ -0,0 +1,10 @@
1
+ export interface TsConfig {
2
+ compilerOptions?: {
3
+ baseUrl?: string;
4
+ paths?: Record<string, string[]>;
5
+ outDir?: string;
6
+ module?: string;
7
+ moduleResolution?: string;
8
+ };
9
+ }
10
+ export declare function readTsConfig(cwd: string): Promise<TsConfig | null>;
@@ -0,0 +1,2 @@
1
+ import type { ProjectContext } from "../types/index.js";
2
+ export declare function detectRuntime(deps: Record<string, string>): ProjectContext["runtime"];
package/dist/index.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  #!/usr/bin/env node
2
+ export {};