pinggy 0.3.0 → 0.3.1

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 (47) hide show
  1. package/.github/workflows/publish-binaries.yml +50 -54
  2. package/Makefile +2 -2
  3. package/dist/index.cjs +1060 -902
  4. package/dist/index.d.cts +1 -1
  5. package/dist/index.d.ts +1 -1
  6. package/dist/index.js +1039 -129
  7. package/ent.plist +14 -0
  8. package/package.json +30 -13
  9. package/scripts/pre_pkg_processing.js +74 -0
  10. package/src/cli/buildConfig.ts +10 -13
  11. package/src/cli/{starCli.tsx → starCli.ts} +51 -80
  12. package/src/index.ts +0 -6
  13. package/src/remote_management/remoteManagement.ts +0 -3
  14. package/src/remote_management/remote_schema.ts +2 -2
  15. package/src/tui/blessed/TunnelTui.ts +298 -0
  16. package/src/tui/blessed/components/DisplayUpdaters.ts +118 -0
  17. package/src/tui/blessed/components/KeyBindings.ts +134 -0
  18. package/src/tui/blessed/components/Modals.ts +216 -0
  19. package/src/tui/blessed/components/UIComponents.ts +306 -0
  20. package/src/tui/blessed/components/index.ts +4 -0
  21. package/src/tui/blessed/headerFetcher.ts +35 -0
  22. package/src/tui/blessed/index.ts +2 -0
  23. package/src/tui/blessed/qrCodeGenerator.ts +20 -0
  24. package/src/tui/blessed/webDebuggerConnection.ts +100 -0
  25. package/src/tui/{hooks → ink/hooks}/useReqResHeaders.ts +1 -1
  26. package/src/tui/{hooks → ink/hooks}/useWebDebugger.ts +2 -2
  27. package/src/tui/{index.tsx → ink/index.tsx} +12 -2
  28. package/src/tui/spinner/spinner.ts +64 -0
  29. package/src/tunnel_manager/TunnelManager.ts +9 -10
  30. package/src/types.ts +1 -1
  31. package/src/utils/printer.ts +15 -21
  32. package/src/utils/util.ts +5 -0
  33. package/tsconfig.json +1 -1
  34. package/dist/tui-AZUFY7T2.js +0 -584
  35. package/src/utils/esmOnlyPackageLoader.ts +0 -29
  36. /package/src/tui/{asciArt.ts → ink/asciArt.ts} +0 -0
  37. /package/src/tui/{hooks → ink/hooks}/useQrCodes.ts +0 -0
  38. /package/src/tui/{hooks → ink/hooks}/useTerminalSize.ts +0 -0
  39. /package/src/tui/{hooks → ink/hooks}/useTerminalStats.ts +0 -0
  40. /package/src/tui/{layout → ink/layout}/Borders.tsx +0 -0
  41. /package/src/tui/{layout → ink/layout}/Container.tsx +0 -0
  42. /package/src/tui/{sections → ink/sections}/DebuggerDetailModal.tsx +0 -0
  43. /package/src/tui/{sections → ink/sections}/KeyBindings.tsx +0 -0
  44. /package/src/tui/{sections → ink/sections}/QrCodeSection.tsx +0 -0
  45. /package/src/tui/{sections → ink/sections}/StatsSection.tsx +0 -0
  46. /package/src/tui/{sections → ink/sections}/URLsSection.tsx +0 -0
  47. /package/src/tui/{utils → ink/utils}/utils.ts +0 -0
@@ -4,6 +4,10 @@ on:
4
4
  release:
5
5
  types: [created]
6
6
 
7
+ env:
8
+ RELEASE_TAG: ${{ github.event.release.tag_name }}
9
+
10
+
7
11
  jobs:
8
12
  Ubuntu:
9
13
  name: Build on ${{ matrix.name }} and upload to GitHub Release
@@ -33,29 +37,26 @@ jobs:
33
37
  - name: Build (tsup)
34
38
  run: npm run build
35
39
 
36
- - name: Run caxa build to produce `bin/`
37
- run: make pack
40
+ - name: Run pkg build for x64
41
+ if: ${{ matrix.name == 'Ubuntu-x64' }}
42
+ run: npm run pack:linux-x64
38
43
 
39
- - name: Show bin directory
40
- run: ls -R ./bin
44
+ - name: Run pkg build for arm64
45
+ if: ${{ matrix.name == 'Ubuntu-arm64' }}
46
+ run: npm run pack:linux-arm64
47
+
48
+ - name: Show out directory
49
+ run: ls -R ./out
41
50
 
42
51
  - name: Upload artifact to GitHub Release
43
52
  env:
44
53
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45
54
  shell: bash
46
55
  run: |
47
- VERSION=$(git describe --tags --always)
48
-
49
- # Extract the single generated file (e.g., pinggy-linux-x64)
50
- FILE=$(ls bin)
51
-
52
- echo "Detected build artifact: $FILE"
53
-
54
- # Create release if not exists
55
- gh release create "$VERSION" --notes "Release $VERSION" --title "$VERSION" || true
56
-
57
- echo "Uploading $FILE to GitHub Release…"
58
- gh release upload "$VERSION" "bin/$FILE" --clobber
56
+ for FILE in out/*; do
57
+ echo "Uploading $FILE"
58
+ gh release upload "$RELEASE_TAG" "$FILE" --clobber
59
+ done
59
60
 
60
61
  Windows:
61
62
  name: Build on ${{ matrix.name }} and upload
@@ -89,29 +90,26 @@ jobs:
89
90
  - name: Build (tsup)
90
91
  run: npm run build
91
92
 
92
- - name: Run caxa build to produce `bin/`
93
- run: make pack
93
+ - name: Run pkg build for x64
94
+ if: ${{ matrix.name == 'Windows-x64' }}
95
+ run: npm run pack:win-x64
96
+
97
+ - name: Run pkg build for arm64
98
+ if: ${{ matrix.name == 'Windows-arm64' }}
99
+ run: npm run pack:win-arm64
94
100
 
95
- - name: See bin directory
96
- run: ls -R ./bin
101
+ - name: See out directory
102
+ run: ls -R ./out
97
103
 
98
104
  - name: Upload artifact to GitHub Release
99
105
  env:
100
106
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101
107
  shell: bash
102
108
  run: |
103
- VERSION=$(git describe --tags --always)
104
-
105
- # Extract the single generated file (e.g., pinggy-windows-x64)
106
- FILE=$(ls bin)
107
-
108
- echo "Detected build artifact: $FILE"
109
-
110
- # Create release if not exists
111
- gh release create "$VERSION" --notes "Release $VERSION" --title "$VERSION" || true
112
-
113
- echo "Uploading $FILE to GitHub Release…"
114
- gh release upload "$VERSION" "bin/$FILE" --clobber
109
+ for FILE in out/*; do
110
+ echo "Uploading $FILE"
111
+ gh release upload "$RELEASE_TAG" "$FILE" --clobber
112
+ done
115
113
 
116
114
 
117
115
  MacOS:
@@ -142,8 +140,13 @@ jobs:
142
140
  - name: Build (tsup)
143
141
  run: npm run build
144
142
 
145
- - name: Run caxa build to produce `bin/`
146
- run: make pack
143
+ - name: Run pkg build for x64
144
+ if: ${{ matrix.name == 'MacOS-x64' }}
145
+ run: npm run pack:macos-x64
146
+
147
+ - name: Run pkg build for arm64
148
+ if: ${{ matrix.name == 'MacOS-arm64' }}
149
+ run: npm run pack:macos-arm64
147
150
 
148
151
  - name: Import Code Signing Certificate
149
152
  env:
@@ -170,10 +173,10 @@ jobs:
170
173
  env:
171
174
  DEVELOPER_ID: ${{ secrets.MACOS_DEVELOPER_ID }}
172
175
  run: |
173
- FILE=$(ls bin)
176
+ FILE=$(ls out)
174
177
  echo "Code signing: $FILE"
175
- codesign --force --options runtime --sign "$DEVELOPER_ID" --timestamp "bin/$FILE"
176
- codesign --verify --verbose "bin/$FILE"
178
+ codesign --deep --force --options runtime --sign "$DEVELOPER_ID" --timestamp --entitlements ent.plist "out/$FILE"
179
+ codesign --verify --verbose "out/$FILE"
177
180
 
178
181
  - name: Notarize Binary (Optional)
179
182
  env:
@@ -181,42 +184,35 @@ jobs:
181
184
  APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
182
185
  APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
183
186
  run: |
184
- FILE=$(ls bin)
187
+ FILE=$(ls out)
185
188
 
186
189
  # Create a zip for notarization
187
- ditto -c -k --keepParent "bin/$FILE" "bin/$FILE.zip"
190
+ ditto -c -k --keepParent "out/$FILE" "out/$FILE.zip"
188
191
 
189
192
  # Submit for notarization
190
- xcrun notarytool submit "bin/$FILE.zip" \
193
+ xcrun notarytool submit "out/$FILE.zip" \
191
194
  --apple-id "$APPLE_ID" \
192
195
  --password "$APPLE_APP_SPECIFIC_PASSWORD" \
193
196
  --team-id "$APPLE_TEAM_ID" \
194
197
  --wait
195
198
 
196
199
  # Remove zip file
197
- rm "bin/$FILE.zip"
200
+ rm "out/$FILE.zip"
198
201
 
199
202
  echo "Notarization complete"
200
203
 
201
- - name: See bin directory
202
- run: ls -R ./bin
204
+ - name: See out directory
205
+ run: ls -R ./out
203
206
 
204
207
  - name: Upload artifact to GitHub Release
205
208
  env:
206
209
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
207
210
  shell: bash
208
211
  run: |
209
- VERSION=$(git describe --tags --always)
210
-
211
- # Get the file in bin/ (e.g., pinggy-macos-x64)
212
- FILE=$(ls bin)
213
- echo "Detected build artifact: $FILE"
214
-
215
- # Create release if it does not exist
216
- gh release create "$VERSION" --notes "Release $VERSION" --title "$VERSION" || true
217
-
218
- echo "Uploading $FILE to GitHub Release…"
219
- gh release upload "$VERSION" "bin/$FILE" --clobber
212
+ for FILE in out/*; do
213
+ echo "Uploading $FILE"
214
+ gh release upload "$RELEASE_TAG" "$FILE" --clobber
215
+ done
220
216
 
221
217
  - name: Cleanup Keychain
222
218
  if: always()
package/Makefile CHANGED
@@ -1,4 +1,4 @@
1
1
  pack:
2
- node caxa_build.js
2
+ npm run pack:all
3
3
  clean:
4
- rm -rf bin
4
+ rm -rf out