@stacksjs/shell 0.65.0 → 0.68.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.
package/dist/index.d.ts CHANGED
@@ -1 +1 @@
1
- export { $ } from "bun";
1
+ export { $ } from 'bun'
package/dist/index.js CHANGED
@@ -1,5 +1,2 @@
1
1
  // @bun
2
2
  var{$:e}=globalThis.Bun;export{e as $};
3
-
4
- //# debugId=AB5AFBC3CDF692C064756E2164756E21
5
- //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/shell",
3
3
  "type": "module",
4
- "version": "0.65.0",
4
+ "version": "0.68.0",
5
5
  "description": "A better Stacks shell experience. Currently only fully supporting Oh My Zsh. Stay tuned for more. Or request one!",
6
6
  "author": "Chris Breuer",
7
7
  "contributors": ["Chris Breuer <chris@stacksjs.org>"],
@@ -17,13 +17,13 @@
17
17
  "url": "https://github.com/stacksjs/stacks/issues"
18
18
  },
19
19
  "keywords": ["ohmyzsh", "zsh", "stacks"],
20
- "files": ["buddy.plugin.zsh", "dist", "src"],
20
+ "files": ["buddy.plugin.zsh", "dist"],
21
21
  "scripts": {
22
22
  "build": "bun build.ts",
23
23
  "typecheck": "bun tsc --noEmit",
24
24
  "prepublishOnly": "bun run build"
25
25
  },
26
26
  "devDependencies": {
27
- "@stacksjs/development": "0.64.6"
27
+ "@stacksjs/development": "0.67.0"
28
28
  }
29
29
  }
package/dist/index.js.map DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/index.ts"],
4
- "sourcesContent": [
5
- "export { $ } from 'bun'\n"
6
- ],
7
- "mappings": ";AAAA",
8
- "debugId": "AB5AFBC3CDF692C064756E2164756E21",
9
- "names": []
10
- }
@@ -1,120 +0,0 @@
1
- #--------------------------------------------------------------------------
2
- # Stacks buddy plugin for zsh
3
- #--------------------------------------------------------------------------
4
- #
5
- # This plugin adds an `buddy` shell command that will find and execute
6
- # Stacks's buddy command from anywhere within the project. It also
7
- # adds shell completions that work anywhere buddy can be located.
8
- #
9
- # Many thanks to Jess Archer for providing the initial scripts:
10
- # https://github.com/jessarcher/zsh-artisan
11
-
12
- function buddy() {
13
- local buddy_path=$(_buddy_find)
14
-
15
- if [ "$buddy_path" = "" ]; then
16
- echo >&2 "shell: buddy not found. Are you in a Stacks directory? This only happens if you are not within a Stacks project, and buddy is not installed globally."
17
- return 1
18
- fi
19
-
20
- local buddy_path=$(dirname $buddy_path)
21
- local buddy_cmd
22
-
23
- buddy_cmd="bun $buddy_path/buddy $*"
24
-
25
- local buddy_start_time=$(date +%s)
26
-
27
- eval $buddy_cmd $*
28
-
29
- local buddy_exit_status=$? # Store the exit status so we can return it later
30
-
31
- if [[ $1 = "make:"* && $BUDDY_OPEN_ON_MAKE_EDITOR != "" ]]; then
32
- # Find and open files created by buddy
33
- find \
34
- "$buddy_path/app" \
35
- "$buddy_path/tests" \
36
- -type f \
37
- -newermt "-$(($(date +%s) - $buddy_start_time + 1)) seconds" \
38
- -exec $BUDDY_OPEN_ON_MAKE_EDITOR {} \; 2>/dev/null
39
- fi
40
-
41
- return $buddy_exit_status
42
- }
43
-
44
- function bud() {
45
- buddy $*
46
- }
47
-
48
- function stacks() {
49
- buddy $*
50
- }
51
-
52
- function stx() {
53
- buddy $*
54
- }
55
-
56
- function b() {
57
- buddy $*
58
- }
59
-
60
- function bi() {
61
- buddy install
62
- }
63
-
64
- function ba() {
65
- buddy add "$@"
66
- }
67
-
68
- function bd() {
69
- buddy dev "$@"
70
- }
71
-
72
- function bb() {
73
- buddy build "$@"
74
- }
75
-
76
- function bt() {
77
- buddy test
78
- }
79
-
80
- function bu() {
81
- buddy upgrade
82
- }
83
-
84
- function brb() {
85
- bun run build
86
- }
87
-
88
- compdef _buddy_add_completion buddy
89
-
90
- function _buddy_find() {
91
- # First, try to find a globally installed buddy binary
92
- local global_buddy_path=$(which buddy)
93
- if [ -n "$global_buddy_path" ]; then
94
- echo "$global_buddy_path"
95
- return 0
96
- fi
97
-
98
- # If not found globally, look for buddy up the file tree until the root directory
99
- local dir=.
100
- until [ "$dir" -ef / ]; do
101
- if [ -f "$dir/buddy" ]; then
102
- echo "$dir/buddy"
103
- return 0
104
- fi
105
-
106
- dir+=/..
107
- done
108
-
109
- return 1
110
- }
111
-
112
- function _buddy_add_completion() {
113
- if [ "$(_buddy_find)" != "" ]; then
114
- compadd $(_buddy_get_command_list)
115
- fi
116
- }
117
-
118
- function _buddy_get_command_list() {
119
- buddy list | sed "s/[[:space:]].*//g"
120
- }
package/src/index.ts DELETED
@@ -1 +0,0 @@
1
- export { $ } from 'bun'