noupload 1.0.1 → 1.0.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.
- package/.github/workflows/release.yml +64 -24
- package/dist/index.cjs +205 -0
- package/dist/index.js +77795 -169
- package/package.json +24 -19
- package/src/commands/image/adjust.ts +13 -50
- package/src/commands/image/border.ts +22 -18
- package/src/commands/image/bulk-compress.ts +5 -23
- package/src/commands/image/bulk-convert.ts +8 -30
- package/src/commands/image/bulk-resize.ts +21 -12
- package/src/commands/image/compress.ts +4 -25
- package/src/commands/image/convert.ts +5 -32
- package/src/commands/image/crop.ts +7 -6
- package/src/commands/image/favicon.ts +17 -16
- package/src/commands/image/filters.ts +14 -21
- package/src/commands/image/resize.ts +20 -17
- package/src/commands/image/rotate.ts +7 -6
- package/src/commands/image/strip-metadata.ts +9 -5
- package/src/commands/image/to-base64.ts +8 -14
- package/src/commands/image/watermark.ts +62 -65
- package/src/commands/pdf/from-images.ts +10 -10
- package/src/commands/pdf/sign.ts +15 -10
- package/src/commands/qr/scan.ts +7 -9
- package/src/index.ts +1 -1
- package/src/utils/image.ts +46 -0
|
@@ -17,29 +17,24 @@ jobs:
|
|
|
17
17
|
include:
|
|
18
18
|
- os: ubuntu-latest
|
|
19
19
|
target: linux-x64
|
|
20
|
-
|
|
20
|
+
bun_target: bun-linux-x64
|
|
21
21
|
- os: ubuntu-latest
|
|
22
22
|
target: linux-arm64
|
|
23
|
-
|
|
23
|
+
bun_target: bun-linux-arm64
|
|
24
24
|
- os: macos-latest
|
|
25
25
|
target: darwin-x64
|
|
26
|
-
|
|
26
|
+
bun_target: bun-darwin-x64
|
|
27
27
|
- os: macos-latest
|
|
28
28
|
target: darwin-arm64
|
|
29
|
-
|
|
29
|
+
bun_target: bun-darwin-arm64
|
|
30
30
|
- os: windows-latest
|
|
31
31
|
target: windows-x64
|
|
32
|
-
|
|
32
|
+
bun_target: bun-windows-x64
|
|
33
33
|
|
|
34
34
|
steps:
|
|
35
35
|
- uses: actions/checkout@v4
|
|
36
36
|
|
|
37
|
-
- name: Setup
|
|
38
|
-
uses: actions/setup-node@v4
|
|
39
|
-
with:
|
|
40
|
-
node-version: '18'
|
|
41
|
-
|
|
42
|
-
- name: Setup Bun (for building dist)
|
|
37
|
+
- name: Setup Bun
|
|
43
38
|
uses: oven-sh/setup-bun@v1
|
|
44
39
|
with:
|
|
45
40
|
bun-version: latest
|
|
@@ -47,20 +42,27 @@ jobs:
|
|
|
47
42
|
- name: Install Dependencies
|
|
48
43
|
run: bun install
|
|
49
44
|
|
|
50
|
-
- name: Build
|
|
51
|
-
|
|
45
|
+
- name: Build Binary (Unix)
|
|
46
|
+
if: matrix.os != 'windows-latest'
|
|
47
|
+
run: bun build src/index.ts --compile --target ${{ matrix.bun_target }} --outfile noupload-${{ matrix.target }}
|
|
52
48
|
|
|
53
|
-
- name:
|
|
54
|
-
|
|
49
|
+
- name: Build Binary (Windows)
|
|
50
|
+
if: matrix.os == 'windows-latest'
|
|
51
|
+
run: bun build src/index.ts --compile --target ${{ matrix.bun_target }} --outfile noupload-${{ matrix.target }}.exe
|
|
55
52
|
|
|
56
|
-
- name:
|
|
57
|
-
|
|
53
|
+
- name: Upload Artifact (Unix)
|
|
54
|
+
if: matrix.os != 'windows-latest'
|
|
55
|
+
uses: actions/upload-artifact@v4
|
|
56
|
+
with:
|
|
57
|
+
name: noupload-${{ matrix.target }}
|
|
58
|
+
path: noupload-${{ matrix.target }}
|
|
58
59
|
|
|
59
|
-
- name: Upload Artifact
|
|
60
|
+
- name: Upload Artifact (Windows)
|
|
61
|
+
if: matrix.os == 'windows-latest'
|
|
60
62
|
uses: actions/upload-artifact@v4
|
|
61
63
|
with:
|
|
62
64
|
name: noupload-${{ matrix.target }}
|
|
63
|
-
path: noupload-${{ matrix.target }}
|
|
65
|
+
path: noupload-${{ matrix.target }}.exe
|
|
64
66
|
|
|
65
67
|
release:
|
|
66
68
|
needs: build
|
|
@@ -70,15 +72,53 @@ jobs:
|
|
|
70
72
|
|
|
71
73
|
- name: Download Artifacts
|
|
72
74
|
uses: actions/download-artifact@v4
|
|
75
|
+
with:
|
|
76
|
+
path: artifacts
|
|
77
|
+
|
|
78
|
+
- name: List artifacts
|
|
79
|
+
run: find artifacts -type f
|
|
73
80
|
|
|
74
81
|
- name: Create Release
|
|
75
82
|
uses: softprops/action-gh-release@v1
|
|
76
83
|
with:
|
|
77
84
|
files: |
|
|
78
|
-
noupload-linux-x64/noupload-linux-x64
|
|
79
|
-
noupload-linux-arm64/noupload-linux-arm64
|
|
80
|
-
noupload-darwin-x64/noupload-darwin-x64
|
|
81
|
-
noupload-darwin-arm64/noupload-darwin-arm64
|
|
82
|
-
noupload-windows-x64/noupload-windows-x64.exe
|
|
85
|
+
artifacts/noupload-linux-x64/noupload-linux-x64
|
|
86
|
+
artifacts/noupload-linux-arm64/noupload-linux-arm64
|
|
87
|
+
artifacts/noupload-darwin-x64/noupload-darwin-x64
|
|
88
|
+
artifacts/noupload-darwin-arm64/noupload-darwin-arm64
|
|
89
|
+
artifacts/noupload-windows-x64/noupload-windows-x64.exe
|
|
83
90
|
draft: false
|
|
84
91
|
prerelease: false
|
|
92
|
+
|
|
93
|
+
npm-publish:
|
|
94
|
+
needs: build
|
|
95
|
+
runs-on: ubuntu-latest
|
|
96
|
+
steps:
|
|
97
|
+
- uses: actions/checkout@v4
|
|
98
|
+
|
|
99
|
+
- name: Setup Bun
|
|
100
|
+
uses: oven-sh/setup-bun@v1
|
|
101
|
+
with:
|
|
102
|
+
bun-version: latest
|
|
103
|
+
|
|
104
|
+
- name: Setup Node.js
|
|
105
|
+
uses: actions/setup-node@v4
|
|
106
|
+
with:
|
|
107
|
+
node-version: '20'
|
|
108
|
+
registry-url: 'https://registry.npmjs.org'
|
|
109
|
+
|
|
110
|
+
- name: Install Dependencies
|
|
111
|
+
run: bun install
|
|
112
|
+
|
|
113
|
+
- name: Build for npm
|
|
114
|
+
run: bun run build
|
|
115
|
+
|
|
116
|
+
- name: Add shebang to dist
|
|
117
|
+
run: |
|
|
118
|
+
echo '#!/usr/bin/env node' | cat - dist/index.js > temp && mv temp dist/index.js
|
|
119
|
+
chmod +x dist/index.js
|
|
120
|
+
|
|
121
|
+
- name: Publish to npm
|
|
122
|
+
run: npm publish
|
|
123
|
+
env:
|
|
124
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|