piclist 2.0.3 → 2.0.5

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.
@@ -5,13 +5,23 @@ on:
5
5
  tags:
6
6
  - '*'
7
7
  workflow_dispatch:
8
+ inputs:
9
+ enable_push:
10
+ description: 'Enable push to Docker Hub'
11
+ required: true
12
+ type: choice
13
+ options:
14
+ - 'true'
15
+ - 'false'
16
+ default: 'false'
17
+
8
18
 
9
19
  jobs:
10
20
  build-and-push:
11
21
  runs-on: ubuntu-latest
12
22
  steps:
13
23
  - name: Checkout Repository
14
- uses: actions/checkout@v4
24
+ uses: actions/checkout@v6
15
25
 
16
26
  - name: Set up Docker Buildx
17
27
  uses: docker/setup-buildx-action@v3
@@ -27,7 +37,7 @@ jobs:
27
37
  with:
28
38
  context: .
29
39
  file: ./Dockerfile
30
- push: true
40
+ push: ${{ github.event.inputs.enable_push == 'true' }}
31
41
  tags: kuingsmile/piclist:latest
32
42
  platforms: linux/amd64,linux/arm64
33
43
 
package/.prettierrc CHANGED
@@ -12,6 +12,6 @@
12
12
  "semi": false,
13
13
  "singleQuote": true,
14
14
  "tabWidth": 2,
15
- "trailingComma": "none",
15
+ "trailingComma": "all",
16
16
  "useTabs": false
17
17
  }
package/CHANGELOG.md CHANGED
@@ -1,3 +1,29 @@
1
+ ## (2026-01-06)
2
+
3
+ * :arrow_up: Upgrade(custom): upgrade deps 95477a4
4
+ * :arrow_up: Upgrade(custom): upgrade deps 58be712
5
+ * :bug: Fix(custom): fix an issue where eslint not worked as expected 364ce95
6
+ * :package: Chore(custom): enable conditional push to Docker Hub based on workflow input 0212769
7
+ * :package: Chore(custom): update gitignore file fcb0674
8
+ * :pencil: Docs(custom): update docs b971986
9
+ * Add renovate.json (#22) 484bc1a, closes #22
10
+ * Update dependency @smithy/node-http-handler to v4.4.7 (#23) eb0e239, closes #23
11
+
12
+
13
+
14
+ ## (2025-11-14)
15
+
16
+ * :arrow_up: Upgrade(custom): upgrade deps dcb971f
17
+ * :arrow_up: Upgrade(custom): upgrade deps e25e7c7
18
+ * :arrow_up: Upgrade(custom): upgrade deps e0358be
19
+ * :arrow_up: Upgrade(custom): upgrade deps ebc991a
20
+ * :bug: Fix(custom): fix wayland image upload bug 41a9b96, closes #19
21
+ * :package: Chore(custom): update tseslint usage a0dc819
22
+ * :sparkles: Feature(custom): add webpath for github c7eb33c
23
+ * :sparkles: Feature(custom): optimize cli script 1e2792c
24
+
25
+
26
+
1
27
  ## (2025-09-25)
2
28
 
3
29
  * :arrow_up: Upgrade(custom): upgrade deps 7b29f04
package/README.md CHANGED
@@ -4,7 +4,6 @@
4
4
 
5
5
  ![standard](https://img.shields.io/badge/code%20style-standard-green.svg?style=flat-square)
6
6
  ![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat-square)
7
- ![node](https://img.shields.io/badge/node-%3E%3D16.0.0-blue?style=flat-square)
8
7
 
9
8
  ![picgo-core](https://cdn.jsdelivr.net/gh/Molunerfinn/test/picgo/picgo-core-fix.jpg)
10
9
 
package/bin/picgo-server CHANGED
@@ -81,11 +81,11 @@ const handleResponse = ({
81
81
  'Content-Type': 'application/json',
82
82
  'access-control-allow-headers': '*',
83
83
  'access-control-allow-methods': 'POST, GET, OPTIONS',
84
- 'access-control-allow-origin': '*'
84
+ 'access-control-allow-origin': '*',
85
85
  },
86
86
  body = {
87
- success: false
88
- }
87
+ success: false,
88
+ },
89
89
  }) => {
90
90
  if (body && body.success === false) {
91
91
  console.log('[PicList Server] upload failed, see log for more detail ↑')
@@ -148,28 +148,28 @@ const multerStorage = multer.diskStorage({
148
148
  file.originalname = Buffer.from(file.originalname, 'latin1').toString('utf8')
149
149
  }
150
150
  cb(null, file.originalname)
151
- }
151
+ },
152
152
  })
153
153
 
154
154
  const uploadMulter = multer({
155
- storage: multerStorage
155
+ storage: multerStorage,
156
156
  })
157
157
 
158
158
  const changeCurrentUploader = (type, config, id) => {
159
159
  if (!type) return
160
160
  if (id) {
161
161
  picgo.saveConfig({
162
- [`uploader.${type}.defaultId`]: id
162
+ [`uploader.${type}.defaultId`]: id,
163
163
  })
164
164
  }
165
165
  if (config) {
166
166
  picgo.saveConfig({
167
- [`picBed.${type}`]: config
167
+ [`picBed.${type}`]: config,
168
168
  })
169
169
  }
170
170
  picgo.saveConfig({
171
171
  'picBed.current': type,
172
- 'picBed.uploader': type
172
+ 'picBed.uploader': type,
173
173
  })
174
174
  }
175
175
 
@@ -186,8 +186,8 @@ router.post('/upload', async ({ response, list = [], urlparams }) => {
186
186
  response,
187
187
  body: {
188
188
  success: false,
189
- message: 'Unauthorized access'
190
- }
189
+ message: 'Unauthorized access',
190
+ },
191
191
  })
192
192
  }
193
193
 
@@ -209,7 +209,7 @@ router.post('/upload', async ({ response, list = [], urlparams }) => {
209
209
  needRestore = true
210
210
  picgo.saveConfig({
211
211
  'picBed.current': picbed,
212
- 'picBed.uploader': picbed
212
+ 'picBed.uploader': picbed,
213
213
  })
214
214
  }
215
215
  if (currentPicBed[picbed]?._configName) {
@@ -234,16 +234,16 @@ router.post('/upload', async ({ response, list = [], urlparams }) => {
234
234
  response,
235
235
  body: {
236
236
  success: true,
237
- result: [res]
238
- }
237
+ result: [res],
238
+ },
239
239
  })
240
240
  } else {
241
241
  handleResponse({
242
242
  response,
243
243
  body: {
244
244
  success: false,
245
- message: errorMessage
246
- }
245
+ message: errorMessage,
246
+ },
247
247
  })
248
248
  }
249
249
  } else {
@@ -259,16 +259,16 @@ router.post('/upload', async ({ response, list = [], urlparams }) => {
259
259
  response,
260
260
  body: {
261
261
  success: true,
262
- result: res
263
- }
262
+ result: res,
263
+ },
264
264
  })
265
265
  } else {
266
266
  handleResponse({
267
267
  response,
268
268
  body: {
269
269
  success: false,
270
- message: errorMessage
271
- }
270
+ message: errorMessage,
271
+ },
272
272
  })
273
273
  }
274
274
  }
@@ -276,7 +276,7 @@ router.post('/upload', async ({ response, list = [], urlparams }) => {
276
276
  if (needRestore) {
277
277
  picgo.saveConfig({
278
278
  'picBed.current': currentPicBedType,
279
- 'picBed.uploader': currentPicBedType
279
+ 'picBed.uploader': currentPicBedType,
280
280
  })
281
281
  if (currentPicBed[picbed]?._configName) {
282
282
  changeCurrentUploader(currentPicBedType, currentPicBedConfig, currentPicBedConfigId)
@@ -288,8 +288,8 @@ router.post('/upload', async ({ response, list = [], urlparams }) => {
288
288
  response,
289
289
  body: {
290
290
  success: false,
291
- message: errorMessage
292
- }
291
+ message: errorMessage,
292
+ },
293
293
  })
294
294
  }
295
295
  })
@@ -299,8 +299,8 @@ router.any('/heartbeat', async ({ response }) => {
299
299
  response,
300
300
  body: {
301
301
  success: true,
302
- result: 'alive'
303
- }
302
+ result: 'alive',
303
+ },
304
304
  })
305
305
  })
306
306
 
@@ -389,7 +389,7 @@ class Server {
389
389
  handleResponse({
390
390
  response,
391
391
  statusCode: method === 'POST' ? 404 : 404,
392
- body: { success: false }
392
+ body: { success: false },
393
393
  })
394
394
  } else {
395
395
  response.statusCode = 405
@@ -419,8 +419,8 @@ class Server {
419
419
  response,
420
420
  body: {
421
421
  success: false,
422
- message: 'Error processing formData'
423
- }
422
+ message: 'Error processing formData',
423
+ },
424
424
  })
425
425
  }
426
426
  const list = request.files.map(file => file.path)
@@ -428,7 +428,7 @@ class Server {
428
428
  handlerEntry.handler({
429
429
  list,
430
430
  response,
431
- urlparams: urlSP
431
+ urlparams: urlSP,
432
432
  })
433
433
  }
434
434
  })
@@ -446,7 +446,7 @@ class Server {
446
446
  handlerEntry.handler({
447
447
  ...postObj,
448
448
  response,
449
- urlparams: urlSP
449
+ urlparams: urlSP,
450
450
  })
451
451
  }
452
452
  } catch (err) {
@@ -455,8 +455,8 @@ class Server {
455
455
  response,
456
456
  body: {
457
457
  success: false,
458
- message: 'Not sending data in JSON format'
459
- }
458
+ message: 'Not sending data in JSON format',
459
+ },
460
460
  })
461
461
  }
462
462
  })
@@ -468,7 +468,7 @@ class Server {
468
468
  if (handlerEntry.handler) {
469
469
  handlerEntry.handler({
470
470
  response,
471
- urlparams: query ? new URLSearchParams(query) : undefined
471
+ urlparams: query ? new URLSearchParams(query) : undefined,
472
472
  })
473
473
  }
474
474
 
@@ -493,7 +493,7 @@ class Server {
493
493
  await axios.post(ensureHTTPLink(`${probeHost}:${port}/heartbeat`))
494
494
  console.log(`[PicList Server] server is already running at ${port}, no need to start again`)
495
495
  this.shutdown(true)
496
- } catch (e) {
496
+ } catch (_e) {
497
497
  console.log(`[PicList Server] ${port} is busy, trying with port ${port + 1}`)
498
498
  this.listen(port + 1)
499
499
  }
@@ -1,8 +1,6 @@
1
1
  import { II18nManager, IPicGo, IStringKeyMap } from '../types';
2
2
  import { ILocalesKey } from './zh-CN';
3
- interface ILocale {
4
- [key: string]: any;
5
- }
3
+ type ILocale = Record<string, any>;
6
4
  declare class I18nManager implements II18nManager {
7
5
  private readonly i18n;
8
6
  private readonly objectAdapter;
@@ -90,11 +90,13 @@ export declare const ZH_CN: {
90
90
  PICBED_GITHUB_TOKEN: string;
91
91
  PICBED_GITHUB_REPO: string;
92
92
  PICBED_GITHUB_PATH: string;
93
+ PICBED_GITHUB_WEBPATH: string;
93
94
  PICBED_GITHUB_BRANCH: string;
94
95
  PICBED_GITHUB_CUSTOMURL: string;
95
96
  PICBED_GITHUB_MESSAGE_REPO: string;
96
97
  PICBED_GITHUB_MESSAGE_BRANCH: string;
97
98
  PICBED_GITHUB_MESSAGE_PATH: string;
99
+ PICBED_GITHUB_MESSAGE_WEBPATH: string;
98
100
  PICBED_GITHUB_MESSAGE_CUSTOMURL: string;
99
101
  PICBED_QINIU: string;
100
102
  PICBED_QINIU_ACCESSKEY: string;