piclist 2.3.3 → 2.3.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.
- package/dist/core/PicGo.d.ts +1 -0
- package/dist/i18n/zh-CN.d.ts +0 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -0
- package/dist/plugins/uploader/helper.d.ts +3 -0
- package/dist/types/index.d.ts +6 -1
- package/dist/utils/common.d.ts +2 -0
- package/dist/utils/eventBus.d.ts +1 -1
- package/package.json +88 -81
- package/.github/workflows/docker.yml +0 -52
- package/.prettierrc +0 -17
- package/CHANGELOG.md +0 -952
- package/Dockerfile +0 -15
- package/docker-compose.yaml +0 -12
- package/eslint.config.js +0 -134
- package/logo.png +0 -0
- package/renovate.json +0 -4
- package/rollup.config.js +0 -77
package/Dockerfile
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
FROM node:lts-alpine
|
|
2
|
-
ENV TZ=Asia/Shanghai
|
|
3
|
-
RUN apk update \
|
|
4
|
-
&& apk add --no-cache tzdata \
|
|
5
|
-
&& echo "${TZ}" > /etc/timezone \
|
|
6
|
-
&& ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \
|
|
7
|
-
&& rm /var/cache/apk/*
|
|
8
|
-
RUN yarn config set network-timeout 300000 && \
|
|
9
|
-
#apk add g++ make py3-pip && \
|
|
10
|
-
#yarn global add node-gyp && \
|
|
11
|
-
yarn global add piclist && \
|
|
12
|
-
yarn cache clean \
|
|
13
|
-
rm -rf /var/cache/apk/* /tmp/*
|
|
14
|
-
|
|
15
|
-
EXPOSE 36677
|
package/docker-compose.yaml
DELETED
package/eslint.config.js
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import js from '@eslint/js'
|
|
2
|
-
import { defineConfig } from 'eslint/config'
|
|
3
|
-
import configPrettier from 'eslint-config-prettier'
|
|
4
|
-
import jsonc from 'eslint-plugin-jsonc'
|
|
5
|
-
import pluginPrettier from 'eslint-plugin-prettier/recommended'
|
|
6
|
-
import simpleImportSort from 'eslint-plugin-simple-import-sort'
|
|
7
|
-
import eslintPluginUnicorn from 'eslint-plugin-unicorn'
|
|
8
|
-
import globals from 'globals'
|
|
9
|
-
import jsoncParser from 'jsonc-eslint-parser'
|
|
10
|
-
import tseslint from 'typescript-eslint'
|
|
11
|
-
export default defineConfig(
|
|
12
|
-
{
|
|
13
|
-
ignores: ['**/node_modules/**', '**/dist/**', 'vitest.workspace.mjs'],
|
|
14
|
-
},
|
|
15
|
-
js.configs.recommended,
|
|
16
|
-
...tseslint.configs.recommended,
|
|
17
|
-
...tseslint.configs.stylistic,
|
|
18
|
-
{
|
|
19
|
-
files: [
|
|
20
|
-
'src/**/*.{ts,tsx,cts,mts,js,cjs,mjs}',
|
|
21
|
-
'scripts/**/*.{ts,js,mjs}',
|
|
22
|
-
'test/**/*.{ts,js,mjs}',
|
|
23
|
-
'./bin/picgo',
|
|
24
|
-
'./bin/picgo-server',
|
|
25
|
-
'eslint.config.js',
|
|
26
|
-
'rollup.config.js',
|
|
27
|
-
],
|
|
28
|
-
languageOptions: {
|
|
29
|
-
parserOptions: {
|
|
30
|
-
warnOnUnsupportedTypeScriptVersion: false,
|
|
31
|
-
},
|
|
32
|
-
globals: globals.node,
|
|
33
|
-
},
|
|
34
|
-
plugins: {
|
|
35
|
-
'simple-import-sort': simpleImportSort,
|
|
36
|
-
unicorn: eslintPluginUnicorn,
|
|
37
|
-
},
|
|
38
|
-
rules: {
|
|
39
|
-
'unicorn/prefer-node-protocol': 'error',
|
|
40
|
-
'unicorn/prefer-module': 'error',
|
|
41
|
-
'simple-import-sort/imports': 'error',
|
|
42
|
-
'simple-import-sort/exports': 'error',
|
|
43
|
-
eqeqeq: 'error',
|
|
44
|
-
'no-caller': 'error',
|
|
45
|
-
'no-constant-condition': ['error', { checkLoops: false }],
|
|
46
|
-
'no-eval': 'error',
|
|
47
|
-
'no-extra-bind': 'error',
|
|
48
|
-
'no-new-func': 'error',
|
|
49
|
-
'no-new-wrappers': 'error',
|
|
50
|
-
'no-throw-literal': 'error',
|
|
51
|
-
'no-undef-init': 'error',
|
|
52
|
-
'no-var': 'error',
|
|
53
|
-
'object-shorthand': 'error',
|
|
54
|
-
'prefer-const': 'error',
|
|
55
|
-
'prefer-object-spread': 'error',
|
|
56
|
-
'unicode-bom': ['error', 'never'],
|
|
57
|
-
'no-console': 'off',
|
|
58
|
-
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
|
59
|
-
'no-unused-vars': 'off',
|
|
60
|
-
'no-extra-boolean-cast': 'off',
|
|
61
|
-
'no-case-declarations': 'off',
|
|
62
|
-
'no-cond-assign': 'off',
|
|
63
|
-
'no-control-regex': 'off',
|
|
64
|
-
'no-inner-declarations': 'off',
|
|
65
|
-
'no-empty': 'off',
|
|
66
|
-
// @typescript-eslint/eslint-plugin
|
|
67
|
-
'@typescript-eslint/no-unused-expressions': 'off',
|
|
68
|
-
'@typescript-eslint/ban-ts-comment': 'off',
|
|
69
|
-
'@typescript-eslint/no-empty-function': 'off',
|
|
70
|
-
'@typescript-eslint/no-namespace': 'off',
|
|
71
|
-
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
|
|
72
|
-
'@typescript-eslint/no-var-requires': 'off',
|
|
73
|
-
'@typescript-eslint/no-empty-interface': 'off',
|
|
74
|
-
'@typescript-eslint/no-explicit-any': 'off',
|
|
75
|
-
'@typescript-eslint/no-empty-object-type': 'off', // {} is a totally useful and valid type.
|
|
76
|
-
'@typescript-eslint/no-require-imports': 'off',
|
|
77
|
-
'@typescript-eslint/no-inferrable-types': 'off',
|
|
78
|
-
// Pending https://github.com/typescript-eslint/typescript-eslint/issues/4820
|
|
79
|
-
'@typescript-eslint/prefer-optional-chain': 'off',
|
|
80
|
-
'@typescript-eslint/no-unused-vars': [
|
|
81
|
-
'error',
|
|
82
|
-
{
|
|
83
|
-
args: 'all',
|
|
84
|
-
argsIgnorePattern: '^_',
|
|
85
|
-
caughtErrors: 'all',
|
|
86
|
-
caughtErrorsIgnorePattern: '^_',
|
|
87
|
-
},
|
|
88
|
-
],
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
...jsonc.configs['flat/recommended-with-jsonc'],
|
|
92
|
-
{
|
|
93
|
-
files: ['**/*.json', '**/*.jsonc', '**/*.json5'],
|
|
94
|
-
languageOptions: {
|
|
95
|
-
parser: jsoncParser,
|
|
96
|
-
},
|
|
97
|
-
rules: {
|
|
98
|
-
'jsonc/array-bracket-spacing': ['error', 'never'],
|
|
99
|
-
'jsonc/comma-dangle': ['error', 'never'],
|
|
100
|
-
'jsonc/indent': ['error', 2],
|
|
101
|
-
'jsonc/no-comments': 'off',
|
|
102
|
-
'jsonc/quotes': ['error', 'double'],
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
files: ['src/i18n/**/*.json'],
|
|
107
|
-
rules: {
|
|
108
|
-
'jsonc/sort-keys': [
|
|
109
|
-
'error',
|
|
110
|
-
'asc', // 升序排列
|
|
111
|
-
{
|
|
112
|
-
caseSensitive: false,
|
|
113
|
-
natural: true,
|
|
114
|
-
},
|
|
115
|
-
],
|
|
116
|
-
},
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
files: ['**/*.mjs', '**/*.mts'],
|
|
120
|
-
rules: {
|
|
121
|
-
// These globals don't exist outside of CJS files.
|
|
122
|
-
'no-restricted-globals': [
|
|
123
|
-
'error',
|
|
124
|
-
{ name: '__filename' },
|
|
125
|
-
{ name: '__dirname' },
|
|
126
|
-
{ name: 'require' },
|
|
127
|
-
{ name: 'module' },
|
|
128
|
-
{ name: 'exports' },
|
|
129
|
-
],
|
|
130
|
-
},
|
|
131
|
-
},
|
|
132
|
-
configPrettier,
|
|
133
|
-
pluginPrettier,
|
|
134
|
-
)
|
package/logo.png
DELETED
|
Binary file
|
package/renovate.json
DELETED
package/rollup.config.js
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { readFileSync } from 'node:fs'
|
|
2
|
-
import { builtinModules } from 'node:module'
|
|
3
|
-
|
|
4
|
-
import commonjs from '@rollup/plugin-commonjs'
|
|
5
|
-
import json from '@rollup/plugin-json'
|
|
6
|
-
import replace from '@rollup/plugin-replace'
|
|
7
|
-
import terser from '@rollup/plugin-terser'
|
|
8
|
-
import typescript from '@rollup/plugin-typescript'
|
|
9
|
-
import copy from 'rollup-plugin-copy'
|
|
10
|
-
import { string } from 'rollup-plugin-string'
|
|
11
|
-
|
|
12
|
-
const pkg = JSON.parse(readFileSync('./package.json', 'utf8'))
|
|
13
|
-
|
|
14
|
-
const version = process.env.VERSION || pkg.version
|
|
15
|
-
const sourcemap = 'inline'
|
|
16
|
-
const banner = `/*
|
|
17
|
-
* piclist@${version}, https://github.com/Kuingsmile/PicList-Core
|
|
18
|
-
* (c) 2022-${new Date().getFullYear()} Kuingsmile
|
|
19
|
-
* Released under the MIT License.
|
|
20
|
-
*/`
|
|
21
|
-
const input = './src/index.ts'
|
|
22
|
-
|
|
23
|
-
const commonOptions = {
|
|
24
|
-
// Creating regex of the packages to make sure sub-paths of the
|
|
25
|
-
// packages such as `lowdb/adapters/FileSync` are also treated as external
|
|
26
|
-
// See https://github.com/rollup/rollup/issues/3684#issuecomment-926558056
|
|
27
|
-
external: [
|
|
28
|
-
...Object.keys(pkg.dependencies).map(packageName => new RegExp(`^${packageName}(/.*)?`)),
|
|
29
|
-
...builtinModules.map(moduleName => new RegExp(`^(node:)?${moduleName}(/.*)?`)),
|
|
30
|
-
],
|
|
31
|
-
plugins: [
|
|
32
|
-
typescript({
|
|
33
|
-
tsconfig: './tsconfig.json',
|
|
34
|
-
}),
|
|
35
|
-
copy({
|
|
36
|
-
targets: [{ src: 'assets', dest: 'dist' }],
|
|
37
|
-
}),
|
|
38
|
-
// terser(),
|
|
39
|
-
commonjs(),
|
|
40
|
-
string({
|
|
41
|
-
// Required to be specified
|
|
42
|
-
include: ['**/*.applescript', '**/*.ps1', '**/*.sh'],
|
|
43
|
-
}),
|
|
44
|
-
json(),
|
|
45
|
-
replace({
|
|
46
|
-
'process.env.PICGO_VERSION': JSON.stringify(pkg.version),
|
|
47
|
-
preventAssignment: true,
|
|
48
|
-
}),
|
|
49
|
-
],
|
|
50
|
-
input,
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const isDev = process.env.NODE_ENV === 'development'
|
|
54
|
-
|
|
55
|
-
if (!isDev) {
|
|
56
|
-
commonOptions.plugins.push(terser())
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/** @type import('rollup').RollupOptions */
|
|
60
|
-
|
|
61
|
-
const nodeEsm = {
|
|
62
|
-
output: [
|
|
63
|
-
{
|
|
64
|
-
file: 'dist/index.js',
|
|
65
|
-
format: 'esm',
|
|
66
|
-
banner,
|
|
67
|
-
sourcemap,
|
|
68
|
-
},
|
|
69
|
-
],
|
|
70
|
-
...commonOptions,
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
const bundles = []
|
|
74
|
-
|
|
75
|
-
bundles.push(nodeEsm)
|
|
76
|
-
|
|
77
|
-
export default bundles
|