bunli 0.8.1 → 0.9.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 (64) hide show
  1. package/README.md +11 -0
  2. package/dist/cli.d.ts +1 -0
  3. package/dist/cli.d.ts.map +1 -0
  4. package/dist/cli.js +759 -269
  5. package/dist/commands/build.d.ts +1 -0
  6. package/dist/commands/build.d.ts.map +1 -0
  7. package/dist/commands/dev.d.ts +1 -0
  8. package/dist/commands/dev.d.ts.map +1 -0
  9. package/dist/commands/doctor/completions.d.ts +1 -0
  10. package/dist/commands/doctor/completions.d.ts.map +1 -0
  11. package/dist/commands/doctor.d.ts +1 -0
  12. package/dist/commands/doctor.d.ts.map +1 -0
  13. package/dist/commands/generate.d.ts +1 -0
  14. package/dist/commands/generate.d.ts.map +1 -0
  15. package/dist/commands/init.d.ts +2 -1
  16. package/dist/commands/init.d.ts.map +1 -0
  17. package/dist/commands/prompt/choose.d.ts +11 -0
  18. package/dist/commands/prompt/choose.d.ts.map +1 -0
  19. package/dist/commands/prompt/confirm.d.ts +11 -0
  20. package/dist/commands/prompt/confirm.d.ts.map +1 -0
  21. package/dist/commands/prompt/file.d.ts +12 -0
  22. package/dist/commands/prompt/file.d.ts.map +1 -0
  23. package/dist/commands/prompt/filter.d.ts +10 -0
  24. package/dist/commands/prompt/filter.d.ts.map +1 -0
  25. package/dist/commands/prompt/format.d.ts +14 -0
  26. package/dist/commands/prompt/format.d.ts.map +1 -0
  27. package/dist/commands/prompt/input.d.ts +11 -0
  28. package/dist/commands/prompt/input.d.ts.map +1 -0
  29. package/dist/commands/prompt/join.d.ts +10 -0
  30. package/dist/commands/prompt/join.d.ts.map +1 -0
  31. package/dist/commands/prompt/log.d.ts +15 -0
  32. package/dist/commands/prompt/log.d.ts.map +1 -0
  33. package/dist/commands/prompt/pager.d.ts +8 -0
  34. package/dist/commands/prompt/pager.d.ts.map +1 -0
  35. package/dist/commands/prompt/spin.d.ts +8 -0
  36. package/dist/commands/prompt/spin.d.ts.map +1 -0
  37. package/dist/commands/prompt/style.d.ts +15 -0
  38. package/dist/commands/prompt/style.d.ts.map +1 -0
  39. package/dist/commands/prompt/write.d.ts +11 -0
  40. package/dist/commands/prompt/write.d.ts.map +1 -0
  41. package/dist/commands/release.d.ts +5 -3
  42. package/dist/commands/release.d.ts.map +1 -0
  43. package/dist/commands/shell.d.ts +3 -0
  44. package/dist/commands/shell.d.ts.map +1 -0
  45. package/dist/commands/test.d.ts +1 -0
  46. package/dist/commands/test.d.ts.map +1 -0
  47. package/dist/highlights-eq9cgrbb.scm +604 -0
  48. package/dist/highlights-ghv9g403.scm +205 -0
  49. package/dist/highlights-hk7bwhj4.scm +284 -0
  50. package/dist/highlights-r812a2qc.scm +150 -0
  51. package/dist/highlights-x6tmsnaa.scm +115 -0
  52. package/dist/index.d.ts +1 -0
  53. package/dist/index.d.ts.map +1 -0
  54. package/dist/injections-73j83es3.scm +27 -0
  55. package/dist/tree-sitter-javascript-nd0q4pe9.wasm +0 -0
  56. package/dist/tree-sitter-markdown-411r6y9b.wasm +0 -0
  57. package/dist/tree-sitter-markdown_inline-j5349f42.wasm +0 -0
  58. package/dist/tree-sitter-typescript-zxjzwt75.wasm +0 -0
  59. package/dist/tree-sitter-zig-e78zbjpm.wasm +0 -0
  60. package/dist/utils/find-entry.d.ts +1 -0
  61. package/dist/utils/find-entry.d.ts.map +1 -0
  62. package/dist/utils/release-state.d.ts +54 -0
  63. package/dist/utils/release-state.d.ts.map +1 -0
  64. package/package.json +12 -10
@@ -0,0 +1,115 @@
1
+ ; Query from: https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/99ddf573531c4dbe53f743ecbc1595af5eb1d32f/queries/markdown_inline/highlights.scm
2
+ ; From MDeiml/tree-sitter-markdown
3
+ (code_span) @markup.raw @nospell
4
+
5
+ (emphasis) @markup.italic
6
+
7
+ (strong_emphasis) @markup.strong
8
+
9
+ (strikethrough) @markup.strikethrough
10
+
11
+ (shortcut_link
12
+ (link_text) @nospell)
13
+
14
+ [
15
+ (backslash_escape)
16
+ (hard_line_break)
17
+ ] @string.escape
18
+
19
+ ; Conceal codeblock and text style markers
20
+ ([
21
+ (code_span_delimiter)
22
+ (emphasis_delimiter)
23
+ ] @conceal
24
+ (#set! conceal ""))
25
+
26
+ ; Inline links - style all parts
27
+ (inline_link
28
+ ["[" "(" ")"] @markup.link)
29
+
30
+ (inline_link
31
+ "]" @markup.link.bracket.close)
32
+
33
+ ; Conceal opening bracket
34
+ ((inline_link
35
+ "[" @conceal)
36
+ (#set! conceal ""))
37
+
38
+ ; Conceal closing bracket with space replacement
39
+ ((inline_link
40
+ "]" @conceal)
41
+ (#set! conceal " "))
42
+
43
+ ; Conceal image links
44
+ (image
45
+ [
46
+ "!"
47
+ "["
48
+ "]"
49
+ "("
50
+ (link_destination)
51
+ ")"
52
+ ] @markup.link
53
+ (#set! conceal ""))
54
+
55
+ ; Conceal full reference links
56
+ (full_reference_link
57
+ [
58
+ "["
59
+ "]"
60
+ (link_label)
61
+ ] @markup.link
62
+ (#set! conceal ""))
63
+
64
+ ; Conceal collapsed reference links
65
+ (collapsed_reference_link
66
+ [
67
+ "["
68
+ "]"
69
+ ] @markup.link
70
+ (#set! conceal ""))
71
+
72
+ ; Conceal shortcut links
73
+ (shortcut_link
74
+ [
75
+ "["
76
+ "]"
77
+ ] @markup.link
78
+ (#set! conceal ""))
79
+
80
+ [
81
+ (link_destination)
82
+ (uri_autolink)
83
+ ] @markup.link.url @nospell
84
+
85
+ [
86
+ (link_label)
87
+ (link_text)
88
+ (link_title)
89
+ (image_description)
90
+ ] @markup.link.label
91
+
92
+ ; Replace common HTML entities.
93
+ ((entity_reference) @character.special
94
+ (#eq? @character.special " ")
95
+ (#set! conceal ""))
96
+
97
+ ((entity_reference) @character.special
98
+ (#eq? @character.special "<")
99
+ (#set! conceal "<"))
100
+
101
+ ((entity_reference) @character.special
102
+ (#eq? @character.special "&gt;")
103
+ (#set! conceal ">"))
104
+
105
+ ((entity_reference) @character.special
106
+ (#eq? @character.special "&amp;")
107
+ (#set! conceal "&"))
108
+
109
+ ((entity_reference) @character.special
110
+ (#eq? @character.special "&quot;")
111
+ (#set! conceal "\""))
112
+
113
+ ((entity_reference) @character.special
114
+ (#any-of? @character.special "&ensp;" "&emsp;")
115
+ (#set! conceal " "))
package/dist/index.d.ts CHANGED
@@ -2,3 +2,4 @@ export { loadConfig } from '@bunli/core';
2
2
  export { defineConfig, type BunliConfig } from '@bunli/core';
3
3
  export { findEntry } from './utils/find-entry.js';
4
4
  export declare const version = "0.1.0";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAA;AAG5D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAGjD,eAAO,MAAM,OAAO,UAAU,CAAA"}
@@ -0,0 +1,27 @@
1
+ ; Query from: https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/refs/heads/master/queries/markdown/injections.scm
2
+ (fenced_code_block
3
+ (info_string
4
+ (language) @_lang)
5
+ (code_fence_content) @injection.content
6
+ (#set-lang-from-info-string! @_lang))
7
+
8
+ ((html_block) @injection.content
9
+ (#set! injection.language "html")
10
+ (#set! injection.combined)
11
+ (#set! injection.include-children))
12
+
13
+ ((minus_metadata) @injection.content
14
+ (#set! injection.language "yaml")
15
+ (#offset! @injection.content 1 0 -1 0)
16
+ (#set! injection.include-children))
17
+
18
+ ((plus_metadata) @injection.content
19
+ (#set! injection.language "toml")
20
+ (#offset! @injection.content 1 0 -1 0)
21
+ (#set! injection.include-children))
22
+
23
+ ([
24
+ (inline)
25
+ (pipe_table_cell)
26
+ ] @injection.content
27
+ (#set! injection.language "markdown_inline"))
@@ -1 +1,2 @@
1
1
  export declare function findEntry(cwd?: string): Promise<string | undefined>;
2
+ //# sourceMappingURL=find-entry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-entry.d.ts","sourceRoot":"","sources":["../../src/utils/find-entry.ts"],"names":[],"mappings":"AAkBA,wBAAsB,SAAS,CAAC,GAAG,SAAgB,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CA+BhF"}
@@ -0,0 +1,54 @@
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
+ }>;
54
+ //# sourceMappingURL=release-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"release-state.d.ts","sourceRoot":"","sources":["../../src/utils/release-state.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,QAA4C,CAAA;AAE3E,MAAM,MAAM,aAAa,GACrB,WAAW,GACX,gBAAgB,GAChB,eAAe,GACf,2BAA2B,GAC3B,gCAAgC,GAChC,eAAe,GACf,gBAAgB,GAChB,aAAa,GACb,uBAAuB,CAAA;AAE3B,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;IACrB,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE;QACP,UAAU,EAAE,OAAO,CAAA;QACnB,aAAa,EAAE,OAAO,CAAA;QACtB,aAAa,EAAE,OAAO,CAAA;QACtB,SAAS,EAAE,MAAM,EAAE,CAAA;QACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;KAClB,CAAA;IACD,MAAM,EAAE,aAAa,GAAG,QAAQ,CAAA;IAChC,WAAW,CAAC,EAAE,aAAa,CAAA;IAC3B,cAAc,EAAE,aAAa,EAAE,CAAA;IAC/B,MAAM,CAAC,EAAE;QACP,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAA;KAC7D,CAAA;IACD,SAAS,CAAC,EAAE;QACV,IAAI,EAAE,aAAa,CAAA;QACnB,OAAO,EAAE,MAAM,C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C,CAQD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bunli",
3
- "version": "0.8.1",
3
+ "version": "0.9.0",
4
4
  "type": "module",
5
5
  "description": "The Bunli CLI toolchain for developing, building, and distributing CLIs",
6
6
  "bin": {
@@ -39,24 +39,26 @@
39
39
  ],
40
40
  "scripts": {
41
41
  "dev": "bun run src/cli.ts",
42
- "build": "bun run scripts/build.ts && bun run tsc",
42
+ "build": "bun run scripts/build.ts && bun run tsgo",
43
43
  "build:standalone": "bun run scripts/build.ts --compile",
44
44
  "build:binaries": "bun run scripts/release-binaries.ts",
45
45
  "test": "bun test",
46
- "typecheck": "tsc --noEmit",
46
+ "typecheck": "tsgo --noEmit",
47
47
  "prepublishOnly": "bun run build"
48
48
  },
49
49
  "dependencies": {
50
- "@bunli/core": "^0.8.1",
51
- "@bunli/generator": "^0.6.4",
52
- "@bunli/plugin-completions": "^0.3.4",
53
- "@bunli/utils": "^0.5.1",
50
+ "@bunli/core": "^0.9.0",
51
+ "@bunli/generator": "^0.6.5",
52
+ "@bunli/plugin-completions": "^0.3.5",
53
+ "@bunli/tui": "^0.6.0",
54
+ "@bunli/utils": "^0.6.0",
54
55
  "better-result": "^2.7.0",
55
56
  "zod": "^4.3.6"
56
57
  },
57
58
  "devDependencies": {
58
- "@bunli/test": "^0.5.0",
59
- "@types/bun": "1.3.9",
60
- "typescript": "^5.8.3"
59
+ "@tsconfig/bun": "1.0.10",
60
+ "@bunli/test": "^0.6.0",
61
+ "@types/bun": "1.3.10",
62
+ "typescript": "^6.0.2"
61
63
  }
62
64
  }