bunli 0.8.0 → 0.8.2

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.
@@ -1,5 +1,5 @@
1
- import { z } from 'zod';
2
1
  import type { PromptApi } from '@bunli/core';
2
+ import { z } from 'zod';
3
3
  interface PublishedPlatformPackage {
4
4
  platform: string;
5
5
  packageName: string;
@@ -20,6 +20,7 @@ declare const _default: import("@bunli/core").RunnableCommand<{
20
20
  tag: import("@bunli/core").CLIOption<z.ZodOptional<z.ZodString>>;
21
21
  npm: import("@bunli/core").CLIOption<z.ZodOptional<z.ZodBoolean>>;
22
22
  github: import("@bunli/core").CLIOption<z.ZodOptional<z.ZodBoolean>>;
23
+ resume: import("@bunli/core").CLIOption<z.ZodDefault<z.ZodBoolean>>;
23
24
  dry: import("@bunli/core").CLIOption<z.ZodDefault<z.ZodBoolean>>;
24
25
  all: import("@bunli/core").CLIOption<z.ZodDefault<z.ZodBoolean>>;
25
26
  }, {}, string> & {
@@ -0,0 +1,53 @@
1
+ export declare const RELEASE_STATE_PATH: string;
2
+ export type ReleaseStepId = 'run-tests' | 'update-version' | 'build-project' | 'publish-platform-packages' | 'update-main-package-for-binary' | 'generate-shim' | 'create-git-tag' | 'publish-npm' | 'create-github-release';
3
+ export interface ReleaseStatePlatformInfo {
4
+ packageName: string;
5
+ version: string;
6
+ }
7
+ export interface ReleaseState {
8
+ packageName: string;
9
+ targetVersion: string;
10
+ tag: string;
11
+ options: {
12
+ publishNpm: boolean;
13
+ publishGitHub: boolean;
14
+ binaryEnabled: boolean;
15
+ platforms: string[];
16
+ shimPath?: string;
17
+ };
18
+ status: 'in_progress' | 'failed';
19
+ currentStep?: ReleaseStepId;
20
+ completedSteps: ReleaseStepId[];
21
+ binary?: {
22
+ publishedPlatforms: Record<string, ReleaseStatePlatformInfo>;
23
+ };
24
+ lastError?: {
25
+ step: ReleaseStepId;
26
+ message: string;
27
+ at: string;
28
+ };
29
+ createdAt: string;
30
+ updatedAt: string;
31
+ }
32
+ export declare function createInitialReleaseState(input: {
33
+ packageName: string;
34
+ targetVersion: string;
35
+ tag: string;
36
+ publishNpm: boolean;
37
+ publishGitHub: boolean;
38
+ binaryEnabled: boolean;
39
+ platforms: string[];
40
+ shimPath?: string;
41
+ }): ReleaseState;
42
+ export declare function readReleaseState(): Promise<ReleaseState | null>;
43
+ export declare function writeReleaseState(state: ReleaseState): Promise<void>;
44
+ export declare function clearReleaseState(): Promise<void>;
45
+ export declare function markStepStarted(state: ReleaseState, step: ReleaseStepId): void;
46
+ export declare function markStepCompleted(state: ReleaseState, step: ReleaseStepId): void;
47
+ export declare function markStepFailed(state: ReleaseState, step: ReleaseStepId, message: string): void;
48
+ export declare function markPlatformPublished(state: ReleaseState, platform: string, packageName: string, version: string): void;
49
+ export declare function getPublishedPlatformsFromState(state: ReleaseState): Array<{
50
+ platform: string;
51
+ packageName: string;
52
+ version: string;
53
+ }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bunli",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "type": "module",
5
5
  "description": "The Bunli CLI toolchain for developing, building, and distributing CLIs",
6
6
  "bin": {
@@ -47,15 +47,15 @@
47
47
  "prepublishOnly": "bun run build"
48
48
  },
49
49
  "dependencies": {
50
- "@bunli/core": "^0.8.0",
50
+ "@bunli/core": "^0.8.2",
51
51
  "@bunli/generator": "^0.6.4",
52
52
  "@bunli/plugin-completions": "^0.3.4",
53
- "@bunli/utils": "^0.5.0",
53
+ "@bunli/utils": "^0.5.1",
54
54
  "better-result": "^2.7.0",
55
55
  "zod": "^4.3.6"
56
56
  },
57
57
  "devDependencies": {
58
- "@bunli/test": "^0.5.0",
58
+ "@bunli/test": "^0.5.2",
59
59
  "@types/bun": "1.3.9",
60
60
  "typescript": "^5.8.3"
61
61
  }