From c77d04c0747763aee872a7d246a872293c62c31d Mon Sep 17 00:00:00 2001 From: terwer Date: Tue, 13 Jun 2023 20:56:51 +0800 Subject: [PATCH 1/8] docs: update deps --- apps/zhi-cli/CHANGELOG.md | 6 + apps/zhi-cli/package.json | 2 +- libs/zhi-device/CHANGELOG.md | 6 + libs/zhi-device/package.json | 2 +- libs/zhi-device/src/lib/siyuanDevice.ts | 7 +- libs/zhi-fetch-middleware/CHANGELOG.md | 7 + libs/zhi-fetch-middleware/package.json | 2 +- libs/zhi-log/CHANGELOG.md | 7 + libs/zhi-log/package.json | 2 +- libs/zhi-xmlrpc-middleware/CHANGELOG.md | 7 + libs/zhi-xmlrpc-middleware/package.json | 2 +- package.json | 2 +- pnpm-lock.yaml | 182 ++++++++++++++---------- 13 files changed, 147 insertions(+), 87 deletions(-) diff --git a/apps/zhi-cli/CHANGELOG.md b/apps/zhi-cli/CHANGELOG.md index 01ddcb93..602c3d31 100644 --- a/apps/zhi-cli/CHANGELOG.md +++ b/apps/zhi-cli/CHANGELOG.md @@ -1,5 +1,11 @@ # zhi-cli +## 1.5.9 + +### Patch Changes + +- zhi-log@1.14.9 + ## 1.5.8 ### Patch Changes diff --git a/apps/zhi-cli/package.json b/apps/zhi-cli/package.json index e5f5e558..6610d1b8 100644 --- a/apps/zhi-cli/package.json +++ b/apps/zhi-cli/package.json @@ -1,6 +1,6 @@ { "name": "zhi-cli", - "version": "1.5.8", + "version": "1.5.9", "description": "a tool for generating zhi framework related projects", "type": "module", "bin": { diff --git a/libs/zhi-device/CHANGELOG.md b/libs/zhi-device/CHANGELOG.md index 35d09a37..348c0b25 100644 --- a/libs/zhi-device/CHANGELOG.md +++ b/libs/zhi-device/CHANGELOG.md @@ -1,5 +1,11 @@ # zhi-device +## 2.2.0 + +### Minor Changes + +- make a better check for widget + ## 2.1.0 ### Minor Changes diff --git a/libs/zhi-device/package.json b/libs/zhi-device/package.json index 98d96c36..e66964ff 100644 --- a/libs/zhi-device/package.json +++ b/libs/zhi-device/package.json @@ -1,6 +1,6 @@ { "name": "zhi-device", - "version": "2.1.0", + "version": "2.2.0", "type": "module", "main": "./dist/index.js", "typings": "./dist/index.d.ts", diff --git a/libs/zhi-device/src/lib/siyuanDevice.ts b/libs/zhi-device/src/lib/siyuanDevice.ts index 40766fa9..345ee0cb 100644 --- a/libs/zhi-device/src/lib/siyuanDevice.ts +++ b/libs/zhi-device/src/lib/siyuanDevice.ts @@ -43,10 +43,9 @@ class SiyuanDevice { return false } return ( - window.frameElement != null && - window.frameElement.parentElement != null && - window.frameElement.parentElement.parentElement != null && - window.frameElement.parentElement.parentElement.getAttribute("data-node-id") !== "" + typeof (window as any).parent.process !== "undefined" && + (window as any).parent.process.versions != null && + (window as any).parent.process.versions.electron != null ) } diff --git a/libs/zhi-fetch-middleware/CHANGELOG.md b/libs/zhi-fetch-middleware/CHANGELOG.md index 400fb0c4..16fd42a3 100644 --- a/libs/zhi-fetch-middleware/CHANGELOG.md +++ b/libs/zhi-fetch-middleware/CHANGELOG.md @@ -1,5 +1,12 @@ # zhi-fetch-middleware +## 0.1.9 + +### Patch Changes + +- Updated dependencies + - zhi-device@2.2.0 + ## 0.1.8 ### Patch Changes diff --git a/libs/zhi-fetch-middleware/package.json b/libs/zhi-fetch-middleware/package.json index eb3121ae..137d65a8 100644 --- a/libs/zhi-fetch-middleware/package.json +++ b/libs/zhi-fetch-middleware/package.json @@ -1,6 +1,6 @@ { "name": "zhi-fetch-middleware", - "version": "0.1.8", + "version": "0.1.9", "type": "module", "description": "an intermediate tier prepared for fetch requests", "main": "./dist/index.js", diff --git a/libs/zhi-log/CHANGELOG.md b/libs/zhi-log/CHANGELOG.md index f079dd7f..55e5c5a3 100644 --- a/libs/zhi-log/CHANGELOG.md +++ b/libs/zhi-log/CHANGELOG.md @@ -1,5 +1,12 @@ # zhi-log +## 1.14.9 + +### Patch Changes + +- Updated dependencies + - zhi-device@2.2.0 + ## 1.14.8 ### Patch Changes diff --git a/libs/zhi-log/package.json b/libs/zhi-log/package.json index a3a6f0fe..f5a4bd23 100644 --- a/libs/zhi-log/package.json +++ b/libs/zhi-log/package.json @@ -1,6 +1,6 @@ { "name": "zhi-log", - "version": "1.14.8", + "version": "1.14.9", "type": "module", "main": "./dist/index.js", "typings": "./dist/index.d.ts", diff --git a/libs/zhi-xmlrpc-middleware/CHANGELOG.md b/libs/zhi-xmlrpc-middleware/CHANGELOG.md index ceda113e..f6c7a43a 100644 --- a/libs/zhi-xmlrpc-middleware/CHANGELOG.md +++ b/libs/zhi-xmlrpc-middleware/CHANGELOG.md @@ -1,5 +1,12 @@ # zhi-xmlrpc-middleware +## 0.2.9 + +### Patch Changes + +- Updated dependencies + - zhi-device@2.2.0 + ## 0.2.8 ### Patch Changes diff --git a/libs/zhi-xmlrpc-middleware/package.json b/libs/zhi-xmlrpc-middleware/package.json index 40c0f9c3..c67b01dc 100644 --- a/libs/zhi-xmlrpc-middleware/package.json +++ b/libs/zhi-xmlrpc-middleware/package.json @@ -1,6 +1,6 @@ { "name": "zhi-xmlrpc-middleware", - "version": "0.2.8", + "version": "0.2.9", "type": "module", "description": "abstract xmlrpc middle layer", "main": "./dist/index.js", diff --git a/package.json b/package.json index a38eef3d..98130551 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,6 @@ "@changesets/cli": "^2.26.1", "@terwer/commit-config-custom": "workspace:*", "@terwer/eslint-config-custom": "workspace:*", - "turbo": "^1.10.1" + "turbo": "^1.10.3" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 23b31744..bb90088a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,8 +18,8 @@ importers: specifier: workspace:* version: link:tools/eslint-config-custom turbo: - specifier: ^1.10.1 - version: 1.10.1 + specifier: ^1.10.3 + version: 1.10.3 apps/zhi-cli: dependencies: @@ -311,7 +311,7 @@ importers: version: 0.1.1(eslint@8.38.0) '@typescript-eslint/eslint-plugin': specifier: ^5.57.1 - version: 5.57.1(@typescript-eslint/parser@5.59.8)(eslint@8.38.0)(typescript@5.0.4) + version: 5.57.1(@typescript-eslint/parser@5.59.11)(eslint@8.38.0)(typescript@5.0.4) astro-eslint-parser: specifier: ^0.13.3 version: 0.13.3 @@ -403,26 +403,26 @@ packages: resolution: {integrity: sha512-k04X/7nlMklU0HQUScxbCTf5n8/Vr+0U0bawb9QWulWxd6qJf3FmBrNATgTYiltjB4pc5HBqmmttAfFi7m4lLg==} dev: false - /@babel/code-frame@7.21.4: - resolution: {integrity: sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==} + /@babel/code-frame@7.22.5: + resolution: {integrity: sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/highlight': 7.18.6 + '@babel/highlight': 7.22.5 /@babel/helper-string-parser@7.21.5: resolution: {integrity: sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w==} engines: {node: '>=6.9.0'} dev: false - /@babel/helper-validator-identifier@7.19.1: - resolution: {integrity: sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==} + /@babel/helper-validator-identifier@7.22.5: + resolution: {integrity: sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==} engines: {node: '>=6.9.0'} - /@babel/highlight@7.18.6: - resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==} + /@babel/highlight@7.22.5: + resolution: {integrity: sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-validator-identifier': 7.19.1 + '@babel/helper-validator-identifier': 7.22.5 chalk: 2.4.2 js-tokens: 4.0.0 @@ -434,8 +434,8 @@ packages: '@babel/types': 7.22.4 dev: false - /@babel/runtime@7.22.3: - resolution: {integrity: sha512-XsDuspWKLUsxwCp6r7EhsExHtYfbe5oAGQ19kqngTdCPUoPQzOPdUbD/pB9PJiwb2ptYKQDjSJT3R6dC+EPqfQ==} + /@babel/runtime@7.22.5: + resolution: {integrity: sha512-ecjvYlnAaZ/KVneE/OdKYBYfgXV3Ptu6zQWmgEF7vwKhQnvVS6bjMD2XYgj+SNvQ1GfK/pjgokfPkC/2CO8CuA==} engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.13.11 @@ -446,14 +446,14 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/helper-string-parser': 7.21.5 - '@babel/helper-validator-identifier': 7.19.1 + '@babel/helper-validator-identifier': 7.22.5 to-fast-properties: 2.0.0 dev: false /@changesets/apply-release-plan@6.1.3: resolution: {integrity: sha512-ECDNeoc3nfeAe1jqJb5aFQX7CqzQhD2klXRez2JDb/aVpGUbX673HgKrnrgJRuQR/9f2TtLoYIzrGB9qwD77mg==} dependencies: - '@babel/runtime': 7.22.3 + '@babel/runtime': 7.22.5 '@changesets/config': 2.3.0 '@changesets/get-version-range-type': 0.3.2 '@changesets/git': 2.0.0 @@ -463,7 +463,7 @@ packages: fs-extra: 7.0.1 lodash.startcase: 4.4.0 outdent: 0.5.0 - prettier: 2.8.7 + prettier: 2.8.8 resolve-from: 5.0.0 semver: 5.7.1 dev: true @@ -471,7 +471,7 @@ packages: /@changesets/assemble-release-plan@5.2.3: resolution: {integrity: sha512-g7EVZCmnWz3zMBAdrcKhid4hkHT+Ft1n0mLussFMcB1dE2zCuwcvGoy9ec3yOgPGF4hoMtgHaMIk3T3TBdvU9g==} dependencies: - '@babel/runtime': 7.22.3 + '@babel/runtime': 7.22.5 '@changesets/errors': 0.1.4 '@changesets/get-dependents-graph': 1.3.5 '@changesets/types': 5.2.1 @@ -489,7 +489,7 @@ packages: resolution: {integrity: sha512-XnTa+b51vt057fyAudvDKGB0Sh72xutQZNAdXkCqPBKO2zvs2yYZx5hFZj1u9cbtpwM6Sxtcr02/FQJfZOzemQ==} hasBin: true dependencies: - '@babel/runtime': 7.22.3 + '@babel/runtime': 7.22.5 '@changesets/apply-release-plan': 6.1.3 '@changesets/assemble-release-plan': 5.2.3 '@changesets/changelog-git': 0.1.14 @@ -555,7 +555,7 @@ packages: /@changesets/get-release-plan@3.0.16: resolution: {integrity: sha512-OpP9QILpBp1bY2YNIKFzwigKh7Qe9KizRsZomzLe6pK8IUo8onkAAVUD8+JRKSr8R7d4+JRuQrfSSNlEwKyPYg==} dependencies: - '@babel/runtime': 7.22.3 + '@babel/runtime': 7.22.5 '@changesets/assemble-release-plan': 5.2.3 '@changesets/config': 2.3.0 '@changesets/pre': 1.0.14 @@ -571,7 +571,7 @@ packages: /@changesets/git@2.0.0: resolution: {integrity: sha512-enUVEWbiqUTxqSnmesyJGWfzd51PY4H7mH9yUw0hPVpZBJ6tQZFMU3F3mT/t9OJ/GjyiM4770i+sehAn6ymx6A==} dependencies: - '@babel/runtime': 7.22.3 + '@babel/runtime': 7.22.5 '@changesets/errors': 0.1.4 '@changesets/types': 5.2.1 '@manypkg/get-packages': 1.1.3 @@ -596,7 +596,7 @@ packages: /@changesets/pre@1.0.14: resolution: {integrity: sha512-dTsHmxQWEQekHYHbg+M1mDVYFvegDh9j/kySNuDKdylwfMEevTeDouR7IfHNyVodxZXu17sXoJuf2D0vi55FHQ==} dependencies: - '@babel/runtime': 7.22.3 + '@babel/runtime': 7.22.5 '@changesets/errors': 0.1.4 '@changesets/types': 5.2.1 '@manypkg/get-packages': 1.1.3 @@ -606,7 +606,7 @@ packages: /@changesets/read@0.5.9: resolution: {integrity: sha512-T8BJ6JS6j1gfO1HFq50kU3qawYxa4NTbI/ASNVVCBTsKquy2HYwM9r7ZnzkiMe8IEObAJtUVGSrePCOxAK2haQ==} dependencies: - '@babel/runtime': 7.22.3 + '@babel/runtime': 7.22.5 '@changesets/git': 2.0.0 '@changesets/logger': 0.0.5 '@changesets/parse': 0.3.16 @@ -627,11 +627,11 @@ packages: /@changesets/write@0.2.3: resolution: {integrity: sha512-Dbamr7AIMvslKnNYsLFafaVORx4H0pvCA2MHqgtNCySMe1blImEyAEOzDmcgKAkgz4+uwoLz7demIrX+JBr/Xw==} dependencies: - '@babel/runtime': 7.22.3 + '@babel/runtime': 7.22.5 '@changesets/types': 5.2.1 fs-extra: 7.0.1 human-id: 1.0.2 - prettier: 2.8.7 + prettier: 2.8.8 dev: true /@commitlint/cli@17.6.1: @@ -1368,7 +1368,7 @@ packages: /@manypkg/find-root@1.1.0: resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} dependencies: - '@babel/runtime': 7.22.3 + '@babel/runtime': 7.22.5 '@types/node': 12.20.55 find-up: 4.1.0 fs-extra: 8.1.0 @@ -1377,7 +1377,7 @@ packages: /@manypkg/get-packages@1.1.3: resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} dependencies: - '@babel/runtime': 7.22.3 + '@babel/runtime': 7.22.5 '@changesets/types': 4.1.0 '@manypkg/find-root': 1.1.0 fs-extra: 8.1.0 @@ -1687,7 +1687,7 @@ packages: '@types/node': 20.2.5 dev: false - /@typescript-eslint/eslint-plugin@5.57.1(@typescript-eslint/parser@5.59.8)(eslint@8.38.0)(typescript@4.9.5): + /@typescript-eslint/eslint-plugin@5.57.1(@typescript-eslint/parser@5.59.11)(eslint@8.38.0)(typescript@5.0.4): resolution: {integrity: sha512-1MeobQkQ9tztuleT3v72XmY0XuKXVXusAhryoLuU5YZ+mXoYKZP9SQ7Flulh1NX4DTjpGTc2b/eMu4u7M7dhnQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -1699,23 +1699,23 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.5.1 - '@typescript-eslint/parser': 5.59.8(eslint@8.38.0)(typescript@4.9.5) + '@typescript-eslint/parser': 5.59.11(eslint@8.38.0)(typescript@5.0.4) '@typescript-eslint/scope-manager': 5.57.1 - '@typescript-eslint/type-utils': 5.57.1(eslint@8.38.0)(typescript@4.9.5) - '@typescript-eslint/utils': 5.57.1(eslint@8.38.0)(typescript@4.9.5) + '@typescript-eslint/type-utils': 5.57.1(eslint@8.38.0)(typescript@5.0.4) + '@typescript-eslint/utils': 5.57.1(eslint@8.38.0)(typescript@5.0.4) debug: 4.3.4 eslint: 8.38.0 grapheme-splitter: 1.0.4 ignore: 5.2.4 natural-compare-lite: 1.4.0 semver: 7.5.1 - tsutils: 3.21.0(typescript@4.9.5) - typescript: 4.9.5 + tsutils: 3.21.0(typescript@5.0.4) + typescript: 5.0.4 transitivePeerDependencies: - supports-color dev: false - /@typescript-eslint/eslint-plugin@5.57.1(@typescript-eslint/parser@5.59.8)(eslint@8.38.0)(typescript@5.0.4): + /@typescript-eslint/eslint-plugin@5.57.1(@typescript-eslint/parser@5.59.8)(eslint@8.38.0)(typescript@4.9.5): resolution: {integrity: sha512-1MeobQkQ9tztuleT3v72XmY0XuKXVXusAhryoLuU5YZ+mXoYKZP9SQ7Flulh1NX4DTjpGTc2b/eMu4u7M7dhnQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -1727,24 +1727,24 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.5.1 - '@typescript-eslint/parser': 5.59.8(eslint@8.38.0)(typescript@5.0.4) + '@typescript-eslint/parser': 5.59.8(eslint@8.38.0)(typescript@4.9.5) '@typescript-eslint/scope-manager': 5.57.1 - '@typescript-eslint/type-utils': 5.57.1(eslint@8.38.0)(typescript@5.0.4) - '@typescript-eslint/utils': 5.57.1(eslint@8.38.0)(typescript@5.0.4) + '@typescript-eslint/type-utils': 5.57.1(eslint@8.38.0)(typescript@4.9.5) + '@typescript-eslint/utils': 5.57.1(eslint@8.38.0)(typescript@4.9.5) debug: 4.3.4 eslint: 8.38.0 grapheme-splitter: 1.0.4 ignore: 5.2.4 natural-compare-lite: 1.4.0 semver: 7.5.1 - tsutils: 3.21.0(typescript@5.0.4) - typescript: 5.0.4 + tsutils: 3.21.0(typescript@4.9.5) + typescript: 4.9.5 transitivePeerDependencies: - supports-color dev: false - /@typescript-eslint/parser@5.59.8(eslint@8.38.0)(typescript@4.9.5): - resolution: {integrity: sha512-AnR19RjJcpjoeGojmwZtCwBX/RidqDZtzcbG3xHrmz0aHHoOcbWnpDllenRDmDvsV0RQ6+tbb09/kyc+UT9Orw==} + /@typescript-eslint/parser@5.59.11(eslint@8.38.0)(typescript@5.0.4): + resolution: {integrity: sha512-s9ZF3M+Nym6CAZEkJJeO2TFHHDsKAM3ecNkLuH4i4s8/RCPnF5JRip2GyviYkeEAcwGMJxkqG9h2dAsnA1nZpA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -1753,17 +1753,17 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.59.8 - '@typescript-eslint/types': 5.59.8 - '@typescript-eslint/typescript-estree': 5.59.8(typescript@4.9.5) + '@typescript-eslint/scope-manager': 5.59.11 + '@typescript-eslint/types': 5.59.11 + '@typescript-eslint/typescript-estree': 5.59.11(typescript@5.0.4) debug: 4.3.4 eslint: 8.38.0 - typescript: 4.9.5 + typescript: 5.0.4 transitivePeerDependencies: - supports-color dev: false - /@typescript-eslint/parser@5.59.8(eslint@8.38.0)(typescript@5.0.4): + /@typescript-eslint/parser@5.59.8(eslint@8.38.0)(typescript@4.9.5): resolution: {integrity: sha512-AnR19RjJcpjoeGojmwZtCwBX/RidqDZtzcbG3xHrmz0aHHoOcbWnpDllenRDmDvsV0RQ6+tbb09/kyc+UT9Orw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -1775,10 +1775,10 @@ packages: dependencies: '@typescript-eslint/scope-manager': 5.59.8 '@typescript-eslint/types': 5.59.8 - '@typescript-eslint/typescript-estree': 5.59.8(typescript@5.0.4) + '@typescript-eslint/typescript-estree': 5.59.8(typescript@4.9.5) debug: 4.3.4 eslint: 8.38.0 - typescript: 5.0.4 + typescript: 4.9.5 transitivePeerDependencies: - supports-color dev: false @@ -1791,6 +1791,14 @@ packages: '@typescript-eslint/visitor-keys': 5.57.1 dev: false + /@typescript-eslint/scope-manager@5.59.11: + resolution: {integrity: sha512-dHFOsxoLFtrIcSj5h0QoBT/89hxQONwmn3FOQ0GOQcLOOXm+MIrS8zEAhs4tWl5MraxCY3ZJpaXQQdFMc2Tu+Q==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.59.11 + '@typescript-eslint/visitor-keys': 5.59.11 + dev: false + /@typescript-eslint/scope-manager@5.59.8: resolution: {integrity: sha512-/w08ndCYI8gxGf+9zKf1vtx/16y8MHrZs5/tnjHhMLNSixuNcJavSX4wAiPf4aS5x41Es9YPCn44MIe4cxIlig==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1844,6 +1852,11 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: false + /@typescript-eslint/types@5.59.11: + resolution: {integrity: sha512-epoN6R6tkvBYSc+cllrz+c2sOFWkbisJZWkOE+y3xHtvYaOE6Wk6B8e114McRJwFRjGvYdJwLXQH5c9osME/AA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: false + /@typescript-eslint/types@5.59.8: resolution: {integrity: sha512-+uWuOhBTj/L6awoWIg0BlWy0u9TyFpCHrAuQ5bNfxDaZ1Ppb3mx6tUigc74LHcbHpOHuOTOJrBoAnhdHdaea1w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1891,8 +1904,8 @@ packages: - supports-color dev: false - /@typescript-eslint/typescript-estree@5.59.8(typescript@4.9.5): - resolution: {integrity: sha512-Jy/lPSDJGNow14vYu6IrW790p7HIf/SOV1Bb6lZ7NUkLc2iB2Z9elESmsaUtLw8kVqogSbtLH9tut5GCX1RLDg==} + /@typescript-eslint/typescript-estree@5.59.11(typescript@5.0.4): + resolution: {integrity: sha512-YupOpot5hJO0maupJXixi6l5ETdrITxeo5eBOeuV7RSKgYdU3G5cxO49/9WRnJq9EMrB7AuTSLH/bqOsXi7wPA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -1900,19 +1913,19 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.59.8 - '@typescript-eslint/visitor-keys': 5.59.8 + '@typescript-eslint/types': 5.59.11 + '@typescript-eslint/visitor-keys': 5.59.11 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 semver: 7.5.1 - tsutils: 3.21.0(typescript@4.9.5) - typescript: 4.9.5 + tsutils: 3.21.0(typescript@5.0.4) + typescript: 5.0.4 transitivePeerDependencies: - supports-color dev: false - /@typescript-eslint/typescript-estree@5.59.8(typescript@5.0.4): + /@typescript-eslint/typescript-estree@5.59.8(typescript@4.9.5): resolution: {integrity: sha512-Jy/lPSDJGNow14vYu6IrW790p7HIf/SOV1Bb6lZ7NUkLc2iB2Z9elESmsaUtLw8kVqogSbtLH9tut5GCX1RLDg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -1927,8 +1940,8 @@ packages: globby: 11.1.0 is-glob: 4.0.3 semver: 7.5.1 - tsutils: 3.21.0(typescript@5.0.4) - typescript: 5.0.4 + tsutils: 3.21.0(typescript@4.9.5) + typescript: 4.9.5 transitivePeerDependencies: - supports-color dev: false @@ -1981,6 +1994,14 @@ packages: eslint-visitor-keys: 3.4.1 dev: false + /@typescript-eslint/visitor-keys@5.59.11: + resolution: {integrity: sha512-KGYniTGG3AMTuKF9QBD7EIrvufkB6O6uX3knP73xbKLMpH+QRPcgnCxjWXSHjMRuOxFLovljqQgQpR0c7GvjoA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.59.11 + eslint-visitor-keys: 3.4.1 + dev: false + /@typescript-eslint/visitor-keys@5.59.8: resolution: {integrity: sha512-pJhi2ms0x0xgloT7xYabil3SGGlojNNKjK/q6dB3Ey0uJLMjK2UDGJvHieiyJVW/7C3KI+Z4Q3pEHkm4ejA+xQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -5660,7 +5681,7 @@ packages: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} dependencies: - '@babel/code-frame': 7.21.4 + '@babel/code-frame': 7.22.5 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 @@ -5944,6 +5965,13 @@ packages: resolution: {integrity: sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==} engines: {node: '>=10.13.0'} hasBin: true + dev: false + + /prettier@2.8.8: + resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} + engines: {node: '>=10.13.0'} + hasBin: true + dev: true /pretty-format@27.5.1: resolution: {integrity: sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==} @@ -6962,65 +6990,65 @@ packages: yargs: 17.7.2 dev: true - /turbo-darwin-64@1.10.1: - resolution: {integrity: sha512-isLLoPuAOMNsYovOq9BhuQOZWQuU13zYsW988KkkaA4OJqOn7qwa9V/KBYCJL8uVQqtG+/Y42J37lO8RJjyXuA==} + /turbo-darwin-64@1.10.3: + resolution: {integrity: sha512-IIB9IomJGyD3EdpSscm7Ip1xVWtYb7D0x7oH3vad3gjFcjHJzDz9xZ/iw/qItFEW+wGFcLSRPd+1BNnuLM8AsA==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-darwin-arm64@1.10.1: - resolution: {integrity: sha512-x1nloPR10fLElNCv17BKr0kCx/O5gse/UXAcVscMZH2tvRUtXrdBmut62uw2YU3J9hli2fszYjUWXkulVpQvFA==} + /turbo-darwin-arm64@1.10.3: + resolution: {integrity: sha512-SBNmOZU9YEB0eyNIxeeQ+Wi0Ufd+nprEVp41rgUSRXEIpXjsDjyBnKnF+sQQj3+FLb4yyi/yZQckB+55qXWEsw==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-linux-64@1.10.1: - resolution: {integrity: sha512-abV+ODCeOlz0503OZlHhPWdy3VwJZc1jObf1VQj7uQM+JqJ/kXbMyqJIMQVz+m7QJUFdferYPRxGhYT/NbYK7Q==} + /turbo-linux-64@1.10.3: + resolution: {integrity: sha512-kvAisGKE7xHJdyMxZLvg53zvHxjqPK1UVj4757PQqtx9dnjYHSc8epmivE6niPgDHon5YqImzArCjVZJYpIGHQ==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-linux-arm64@1.10.1: - resolution: {integrity: sha512-zRC3nZbHQ63tofOmbuySzEn1ROISWTkemYYr1L98rpmT5aVa0kERlGiYcfDwZh3cBso/Ylg/wxexRAaPzcCJYQ==} + /turbo-linux-arm64@1.10.3: + resolution: {integrity: sha512-Qgaqln0IYRgyL0SowJOi+PNxejv1I2xhzXOI+D+z4YHbgSx87ox1IsALYBlK8VRVYY8VCXl+PN12r1ioV09j7A==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-windows-64@1.10.1: - resolution: {integrity: sha512-Irqz8IU+o7Q/5V44qatZBTunk+FQAOII1hZTsEU54ah62f9Y297K6/LSp+yncmVQOZlFVccXb6MDqcETExIQtA==} + /turbo-windows-64@1.10.3: + resolution: {integrity: sha512-rbH9wManURNN8mBnN/ZdkpUuTvyVVEMiUwFUX4GVE5qmV15iHtZfDLUSGGCP2UFBazHcpNHG1OJzgc55GFFrUw==} cpu: [x64] os: [win32] requiresBuild: true dev: true optional: true - /turbo-windows-arm64@1.10.1: - resolution: {integrity: sha512-124IT15d2gyjC+NEn11pHOaVFvZDRHpxfF+LDUzV7YxfNIfV0mGkR3R/IyVXtQHOgqOdtQTbC4y411sm31+SEw==} + /turbo-windows-arm64@1.10.3: + resolution: {integrity: sha512-ThlkqxhcGZX39CaTjsHqJnqVe+WImjX13pmjnpChz6q5HHbeRxaJSFzgrHIOt0sUUVx90W/WrNRyoIt/aafniw==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /turbo@1.10.1: - resolution: {integrity: sha512-wq0YeSv6P/eEDXOL42jkMUr+T4z34dM8mdHu5u6C6OOAq8JuLJ72F/v4EVR1JmY8icyTkFz10ICLV0haUUYhbQ==} + /turbo@1.10.3: + resolution: {integrity: sha512-U4gKCWcKgLcCjQd4Pl8KJdfEKumpyWbzRu75A6FCj6Ctea1PIm58W6Ltw1QXKqHrl2pF9e1raAskf/h6dlrPCA==} hasBin: true requiresBuild: true optionalDependencies: - turbo-darwin-64: 1.10.1 - turbo-darwin-arm64: 1.10.1 - turbo-linux-64: 1.10.1 - turbo-linux-arm64: 1.10.1 - turbo-windows-64: 1.10.1 - turbo-windows-arm64: 1.10.1 + turbo-darwin-64: 1.10.3 + turbo-darwin-arm64: 1.10.3 + turbo-linux-64: 1.10.3 + turbo-linux-arm64: 1.10.3 + turbo-windows-64: 1.10.3 + turbo-windows-arm64: 1.10.3 dev: true /type-check@0.3.2: From 6822830396268ffb9a6eb929bc4d3d0b7e852bd6 Mon Sep 17 00:00:00 2001 From: terwer Date: Tue, 13 Jun 2023 21:30:51 +0800 Subject: [PATCH 2/8] docs: update deps --- libs/zhi-blog-api/CHANGELOG.md | 7 +++ libs/zhi-blog-api/package.json | 2 +- libs/zhi-common/CHANGELOG.md | 7 +++ libs/zhi-common/package.json | 2 +- libs/zhi-fetch-middleware/CHANGELOG.md | 8 ++++ libs/zhi-fetch-middleware/package.json | 2 +- libs/zhi-lib-base/CHANGELOG.md | 6 +++ libs/zhi-lib-base/package.json | 2 +- libs/zhi-lib-base/src/logger/simpleLogger.ts | 46 +++++++------------- libs/zhi-siyuan-api/CHANGELOG.md | 9 ++++ libs/zhi-siyuan-api/package.json | 2 +- libs/zhi-xmlrpc-middleware/CHANGELOG.md | 8 ++++ libs/zhi-xmlrpc-middleware/package.json | 2 +- 13 files changed, 67 insertions(+), 36 deletions(-) diff --git a/libs/zhi-blog-api/CHANGELOG.md b/libs/zhi-blog-api/CHANGELOG.md index a74c31f6..573f92cb 100644 --- a/libs/zhi-blog-api/CHANGELOG.md +++ b/libs/zhi-blog-api/CHANGELOG.md @@ -1,5 +1,12 @@ # zhi-blog-api +## 1.6.7 + +### Patch Changes + +- Updated dependencies + - zhi-lib-base@0.3.0 + ## 1.6.6 ### Patch Changes diff --git a/libs/zhi-blog-api/package.json b/libs/zhi-blog-api/package.json index 0cb5d02e..cb238c96 100644 --- a/libs/zhi-blog-api/package.json +++ b/libs/zhi-blog-api/package.json @@ -1,6 +1,6 @@ { "name": "zhi-blog-api", - "version": "1.6.6", + "version": "1.6.7", "type": "module", "description": "a common blog interface", "main": "./dist/index.js", diff --git a/libs/zhi-common/CHANGELOG.md b/libs/zhi-common/CHANGELOG.md index a560a4f6..07c0d2cc 100644 --- a/libs/zhi-common/CHANGELOG.md +++ b/libs/zhi-common/CHANGELOG.md @@ -1,5 +1,12 @@ # zhi-common +## 1.9.7 + +### Patch Changes + +- Updated dependencies + - zhi-lib-base@0.3.0 + ## 1.9.6 ### Patch Changes diff --git a/libs/zhi-common/package.json b/libs/zhi-common/package.json index fea10450..f0b3504a 100644 --- a/libs/zhi-common/package.json +++ b/libs/zhi-common/package.json @@ -1,6 +1,6 @@ { "name": "zhi-common", - "version": "1.9.6", + "version": "1.9.7", "type": "module", "description": "a collection of util tools", "main": "./dist/index.js", diff --git a/libs/zhi-fetch-middleware/CHANGELOG.md b/libs/zhi-fetch-middleware/CHANGELOG.md index 16fd42a3..54e6c262 100644 --- a/libs/zhi-fetch-middleware/CHANGELOG.md +++ b/libs/zhi-fetch-middleware/CHANGELOG.md @@ -1,5 +1,13 @@ # zhi-fetch-middleware +## 0.1.10 + +### Patch Changes + +- Updated dependencies + - zhi-lib-base@0.3.0 + - zhi-common@1.9.7 + ## 0.1.9 ### Patch Changes diff --git a/libs/zhi-fetch-middleware/package.json b/libs/zhi-fetch-middleware/package.json index 137d65a8..f25deafa 100644 --- a/libs/zhi-fetch-middleware/package.json +++ b/libs/zhi-fetch-middleware/package.json @@ -1,6 +1,6 @@ { "name": "zhi-fetch-middleware", - "version": "0.1.9", + "version": "0.1.10", "type": "module", "description": "an intermediate tier prepared for fetch requests", "main": "./dist/index.js", diff --git a/libs/zhi-lib-base/CHANGELOG.md b/libs/zhi-lib-base/CHANGELOG.md index 09dcc539..4b7bedea 100644 --- a/libs/zhi-lib-base/CHANGELOG.md +++ b/libs/zhi-lib-base/CHANGELOG.md @@ -1,5 +1,11 @@ # zhi-lib-base +## 0.3.0 + +### Minor Changes + +- deal with boolean in log + ## 0.2.6 ### Patch Changes diff --git a/libs/zhi-lib-base/package.json b/libs/zhi-lib-base/package.json index e8924c29..d67a1c46 100644 --- a/libs/zhi-lib-base/package.json +++ b/libs/zhi-lib-base/package.json @@ -1,6 +1,6 @@ { "name": "zhi-lib-base", - "version": "0.2.6", + "version": "0.3.0", "type": "module", "description": "minimization dependencies for class library", "main": "./dist/index.js", diff --git a/libs/zhi-lib-base/src/logger/simpleLogger.ts b/libs/zhi-lib-base/src/logger/simpleLogger.ts index 97071bcb..e2402631 100644 --- a/libs/zhi-lib-base/src/logger/simpleLogger.ts +++ b/libs/zhi-lib-base/src/logger/simpleLogger.ts @@ -54,52 +54,38 @@ const simpleLogger = (name: string, customSign?: string, isDev?: boolean): ILogg return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}` } - const log = (level: string, msg: any, obj?: any) => { + const log = (msg: any, obj?: any) => { const time = formatDate(new Date()) - if (obj) { - console.log(`[${sign}] [${time}] [${level}] [${name}] ${msg}`, obj) - } else { - console.log(`[${sign}] [${time}] [${level}] [${name}] ${msg}`) - } + const formattedMsg = obj && typeof obj === "boolean" ? String(obj) : obj + + console.info(`[${sign}] [${time}] [INFO] [${name}] ${msg}`, formattedMsg) } const infoLog = (msg: any, obj?: any) => { const time = formatDate(new Date()) - if (obj) { - console.info(`[${sign}] [${time}] [INFO] [${name}] ${msg}`, obj) - } else { - console.info(`[${sign}] [${time}] [INFO] [${name}] ${msg}`) - } + const formattedMsg = obj && typeof obj === "boolean" ? String(obj) : obj + + console.info(`[${sign}] [${time}] [INFO] [${name}] ${msg}`, formattedMsg) } + const warnLog = (msg: any, obj?: any) => { const time = formatDate(new Date()) - if (obj) { - console.warn(`[${sign}] [${time}] [WARN] [${name}] ${msg}`, obj) - } else { - console.warn(`[${sign}] [${time}] [WARN] [${name}] ${msg}`) - } + const formattedMsg = obj && typeof obj === "boolean" ? String(obj) : obj + console.warn(`[${sign}] [${time}] [WARN] [${name}] ${msg}`, formattedMsg) } + const errorLog = (msg: string | Error, obj?: any) => { const time = formatDate(new Date()) - if (obj) { - if (typeof msg == "string") { - console.error(`[${sign}] [${time}] [ERROR] [${name}] ${msg}`, obj) - } else { - console.error(`[${sign}] [${time}] [ERROR] [${name}] ${msg.toString()}`, obj) - } - } else { - if (typeof msg == "string") { - console.error(`[${sign}] [${time}] [ERROR] [${name}] ${msg.toString()}`) - } else { - console.error(`[${sign}] [${time}] [ERROR] [${name}] an error occurred =>`, msg) - } - } + const message = msg instanceof Error ? "an error occurred =>" : `${msg}` + const formattedMsg = obj && typeof obj === "boolean" ? String(obj) : obj || `${msg}` + + console.error(`[${sign}] [${time}] [ERROR] [${name}] ${message}`, formattedMsg) } return { debug: (msg: string, obj?: any) => { if (isDev) { - log("DEBUG", msg, obj) + log(msg, obj) } }, info: (msg: string, obj?: any) => { diff --git a/libs/zhi-siyuan-api/CHANGELOG.md b/libs/zhi-siyuan-api/CHANGELOG.md index 0bf60d22..f21671d3 100644 --- a/libs/zhi-siyuan-api/CHANGELOG.md +++ b/libs/zhi-siyuan-api/CHANGELOG.md @@ -1,5 +1,14 @@ # zhi-siyuan-api +## 1.9.2 + +### Patch Changes + +- Updated dependencies + - zhi-lib-base@0.3.0 + - zhi-blog-api@1.6.7 + - zhi-common@1.9.7 + ## 1.9.1 ### Patch Changes diff --git a/libs/zhi-siyuan-api/package.json b/libs/zhi-siyuan-api/package.json index 8a315ec9..097b6195 100644 --- a/libs/zhi-siyuan-api/package.json +++ b/libs/zhi-siyuan-api/package.json @@ -1,6 +1,6 @@ { "name": "zhi-siyuan-api", - "version": "1.9.1", + "version": "1.9.2", "type": "module", "description": "a siyuan-note api including both kernel and client", "main": "./dist/index.js", diff --git a/libs/zhi-xmlrpc-middleware/CHANGELOG.md b/libs/zhi-xmlrpc-middleware/CHANGELOG.md index f6c7a43a..0460f062 100644 --- a/libs/zhi-xmlrpc-middleware/CHANGELOG.md +++ b/libs/zhi-xmlrpc-middleware/CHANGELOG.md @@ -1,5 +1,13 @@ # zhi-xmlrpc-middleware +## 0.2.10 + +### Patch Changes + +- Updated dependencies + - zhi-lib-base@0.3.0 + - zhi-common@1.9.7 + ## 0.2.9 ### Patch Changes diff --git a/libs/zhi-xmlrpc-middleware/package.json b/libs/zhi-xmlrpc-middleware/package.json index c67b01dc..86188648 100644 --- a/libs/zhi-xmlrpc-middleware/package.json +++ b/libs/zhi-xmlrpc-middleware/package.json @@ -1,6 +1,6 @@ { "name": "zhi-xmlrpc-middleware", - "version": "0.2.9", + "version": "0.2.10", "type": "module", "description": "abstract xmlrpc middle layer", "main": "./dist/index.js", From 8c73d0485914a5e271b2862e27f56614667c9510 Mon Sep 17 00:00:00 2001 From: terwer Date: Wed, 14 Jun 2023 00:32:23 +0800 Subject: [PATCH 3/8] docs: update deps --- libs/zhi-blog-api/CHANGELOG.md | 7 +++++++ libs/zhi-blog-api/package.json | 2 +- libs/zhi-common/CHANGELOG.md | 13 +++++++++++++ libs/zhi-common/package.json | 2 +- libs/zhi-common/src/lib/dateUtil.ts | 12 ++++++++++++ libs/zhi-fetch-middleware/CHANGELOG.md | 15 +++++++++++++++ libs/zhi-fetch-middleware/package.json | 2 +- libs/zhi-lib-base/CHANGELOG.md | 6 ++++++ libs/zhi-lib-base/package.json | 2 +- libs/zhi-lib-base/src/logger/simpleLogger.ts | 8 ++++---- libs/zhi-siyuan-api/CHANGELOG.md | 16 ++++++++++++++++ libs/zhi-siyuan-api/package.json | 2 +- libs/zhi-xmlrpc-middleware/CHANGELOG.md | 15 +++++++++++++++ libs/zhi-xmlrpc-middleware/package.json | 2 +- 14 files changed, 94 insertions(+), 10 deletions(-) diff --git a/libs/zhi-blog-api/CHANGELOG.md b/libs/zhi-blog-api/CHANGELOG.md index 573f92cb..7e603a7b 100644 --- a/libs/zhi-blog-api/CHANGELOG.md +++ b/libs/zhi-blog-api/CHANGELOG.md @@ -1,5 +1,12 @@ # zhi-blog-api +## 1.6.8 + +### Patch Changes + +- Updated dependencies + - zhi-lib-base@0.3.1 + ## 1.6.7 ### Patch Changes diff --git a/libs/zhi-blog-api/package.json b/libs/zhi-blog-api/package.json index cb238c96..e123a50c 100644 --- a/libs/zhi-blog-api/package.json +++ b/libs/zhi-blog-api/package.json @@ -1,6 +1,6 @@ { "name": "zhi-blog-api", - "version": "1.6.7", + "version": "1.6.8", "type": "module", "description": "a common blog interface", "main": "./dist/index.js", diff --git a/libs/zhi-common/CHANGELOG.md b/libs/zhi-common/CHANGELOG.md index 07c0d2cc..d6a6a4d3 100644 --- a/libs/zhi-common/CHANGELOG.md +++ b/libs/zhi-common/CHANGELOG.md @@ -1,5 +1,18 @@ # zhi-common +## 1.10.0 + +### Minor Changes + +- add formatTimestampToZhDate + +## 1.9.8 + +### Patch Changes + +- Updated dependencies + - zhi-lib-base@0.3.1 + ## 1.9.7 ### Patch Changes diff --git a/libs/zhi-common/package.json b/libs/zhi-common/package.json index f0b3504a..911ffacd 100644 --- a/libs/zhi-common/package.json +++ b/libs/zhi-common/package.json @@ -1,6 +1,6 @@ { "name": "zhi-common", - "version": "1.9.7", + "version": "1.10.0", "type": "module", "description": "a collection of util tools", "main": "./dist/index.js", diff --git a/libs/zhi-common/src/lib/dateUtil.ts b/libs/zhi-common/src/lib/dateUtil.ts index eb783e60..740be388 100644 --- a/libs/zhi-common/src/lib/dateUtil.ts +++ b/libs/zhi-common/src/lib/dateUtil.ts @@ -152,6 +152,18 @@ class DateUtil { public static nowYear(): number { return new Date().getFullYear() } + + /** + * 时间戳转时间 + * + * @param timestamp - 时间戳 + */ + public static formatTimestampToZhDate(timestamp: any) { + if (typeof timestamp == "string") { + timestamp = parseInt(timestamp) + } + return this.formatIsoToZhDate(new Date(timestamp).toISOString()) + } } export default DateUtil diff --git a/libs/zhi-fetch-middleware/CHANGELOG.md b/libs/zhi-fetch-middleware/CHANGELOG.md index 54e6c262..02c346b0 100644 --- a/libs/zhi-fetch-middleware/CHANGELOG.md +++ b/libs/zhi-fetch-middleware/CHANGELOG.md @@ -1,5 +1,20 @@ # zhi-fetch-middleware +## 0.1.12 + +### Patch Changes + +- Updated dependencies + - zhi-common@1.10.0 + +## 0.1.11 + +### Patch Changes + +- Updated dependencies + - zhi-lib-base@0.3.1 + - zhi-common@1.9.8 + ## 0.1.10 ### Patch Changes diff --git a/libs/zhi-fetch-middleware/package.json b/libs/zhi-fetch-middleware/package.json index f25deafa..04d2eb0f 100644 --- a/libs/zhi-fetch-middleware/package.json +++ b/libs/zhi-fetch-middleware/package.json @@ -1,6 +1,6 @@ { "name": "zhi-fetch-middleware", - "version": "0.1.10", + "version": "0.1.12", "type": "module", "description": "an intermediate tier prepared for fetch requests", "main": "./dist/index.js", diff --git a/libs/zhi-lib-base/CHANGELOG.md b/libs/zhi-lib-base/CHANGELOG.md index 4b7bedea..89b5ab73 100644 --- a/libs/zhi-lib-base/CHANGELOG.md +++ b/libs/zhi-lib-base/CHANGELOG.md @@ -1,5 +1,11 @@ # zhi-lib-base +## 0.3.1 + +### Patch Changes + +- fix boolean msg + ## 0.3.0 ### Minor Changes diff --git a/libs/zhi-lib-base/package.json b/libs/zhi-lib-base/package.json index d67a1c46..b3c11a99 100644 --- a/libs/zhi-lib-base/package.json +++ b/libs/zhi-lib-base/package.json @@ -1,6 +1,6 @@ { "name": "zhi-lib-base", - "version": "0.3.0", + "version": "0.3.1", "type": "module", "description": "minimization dependencies for class library", "main": "./dist/index.js", diff --git a/libs/zhi-lib-base/src/logger/simpleLogger.ts b/libs/zhi-lib-base/src/logger/simpleLogger.ts index e2402631..6c2dc601 100644 --- a/libs/zhi-lib-base/src/logger/simpleLogger.ts +++ b/libs/zhi-lib-base/src/logger/simpleLogger.ts @@ -56,28 +56,28 @@ const simpleLogger = (name: string, customSign?: string, isDev?: boolean): ILogg const log = (msg: any, obj?: any) => { const time = formatDate(new Date()) - const formattedMsg = obj && typeof obj === "boolean" ? String(obj) : obj + const formattedMsg = typeof obj === "boolean" ? String(obj) : obj console.info(`[${sign}] [${time}] [INFO] [${name}] ${msg}`, formattedMsg) } const infoLog = (msg: any, obj?: any) => { const time = formatDate(new Date()) - const formattedMsg = obj && typeof obj === "boolean" ? String(obj) : obj + const formattedMsg = typeof obj === "boolean" ? String(obj) : obj console.info(`[${sign}] [${time}] [INFO] [${name}] ${msg}`, formattedMsg) } const warnLog = (msg: any, obj?: any) => { const time = formatDate(new Date()) - const formattedMsg = obj && typeof obj === "boolean" ? String(obj) : obj + const formattedMsg = typeof obj === "boolean" ? String(obj) : obj console.warn(`[${sign}] [${time}] [WARN] [${name}] ${msg}`, formattedMsg) } const errorLog = (msg: string | Error, obj?: any) => { const time = formatDate(new Date()) const message = msg instanceof Error ? "an error occurred =>" : `${msg}` - const formattedMsg = obj && typeof obj === "boolean" ? String(obj) : obj || `${msg}` + const formattedMsg = typeof obj === "boolean" ? String(obj) : obj || `${msg}` console.error(`[${sign}] [${time}] [ERROR] [${name}] ${message}`, formattedMsg) } diff --git a/libs/zhi-siyuan-api/CHANGELOG.md b/libs/zhi-siyuan-api/CHANGELOG.md index f21671d3..490e936c 100644 --- a/libs/zhi-siyuan-api/CHANGELOG.md +++ b/libs/zhi-siyuan-api/CHANGELOG.md @@ -1,5 +1,21 @@ # zhi-siyuan-api +## 1.9.4 + +### Patch Changes + +- Updated dependencies + - zhi-common@1.10.0 + +## 1.9.3 + +### Patch Changes + +- Updated dependencies + - zhi-lib-base@0.3.1 + - zhi-blog-api@1.6.8 + - zhi-common@1.9.8 + ## 1.9.2 ### Patch Changes diff --git a/libs/zhi-siyuan-api/package.json b/libs/zhi-siyuan-api/package.json index 097b6195..17ae3ed2 100644 --- a/libs/zhi-siyuan-api/package.json +++ b/libs/zhi-siyuan-api/package.json @@ -1,6 +1,6 @@ { "name": "zhi-siyuan-api", - "version": "1.9.2", + "version": "1.9.4", "type": "module", "description": "a siyuan-note api including both kernel and client", "main": "./dist/index.js", diff --git a/libs/zhi-xmlrpc-middleware/CHANGELOG.md b/libs/zhi-xmlrpc-middleware/CHANGELOG.md index 0460f062..06106c28 100644 --- a/libs/zhi-xmlrpc-middleware/CHANGELOG.md +++ b/libs/zhi-xmlrpc-middleware/CHANGELOG.md @@ -1,5 +1,20 @@ # zhi-xmlrpc-middleware +## 0.2.12 + +### Patch Changes + +- Updated dependencies + - zhi-common@1.10.0 + +## 0.2.11 + +### Patch Changes + +- Updated dependencies + - zhi-lib-base@0.3.1 + - zhi-common@1.9.8 + ## 0.2.10 ### Patch Changes diff --git a/libs/zhi-xmlrpc-middleware/package.json b/libs/zhi-xmlrpc-middleware/package.json index 86188648..5c58c212 100644 --- a/libs/zhi-xmlrpc-middleware/package.json +++ b/libs/zhi-xmlrpc-middleware/package.json @@ -1,6 +1,6 @@ { "name": "zhi-xmlrpc-middleware", - "version": "0.2.10", + "version": "0.2.12", "type": "module", "description": "abstract xmlrpc middle layer", "main": "./dist/index.js", From 35776a831d53dd639f6b9fcc488030e920d2143a Mon Sep 17 00:00:00 2001 From: terwer Date: Wed, 14 Jun 2023 22:22:27 +0800 Subject: [PATCH 4/8] docs: update deps --- libs/zhi-common/CHANGELOG.md | 6 ++++++ libs/zhi-common/package.json | 2 +- libs/zhi-common/src/lib/jsonUtil.ts | 7 ++++++- libs/zhi-fetch-middleware/CHANGELOG.md | 7 +++++++ libs/zhi-fetch-middleware/package.json | 2 +- libs/zhi-siyuan-api/CHANGELOG.md | 7 +++++++ libs/zhi-siyuan-api/package.json | 2 +- libs/zhi-xmlrpc-middleware/CHANGELOG.md | 7 +++++++ libs/zhi-xmlrpc-middleware/package.json | 2 +- 9 files changed, 37 insertions(+), 5 deletions(-) diff --git a/libs/zhi-common/CHANGELOG.md b/libs/zhi-common/CHANGELOG.md index d6a6a4d3..052ff1e3 100644 --- a/libs/zhi-common/CHANGELOG.md +++ b/libs/zhi-common/CHANGELOG.md @@ -1,5 +1,11 @@ # zhi-common +## 1.11.0 + +### Minor Changes + +- change json safeParse + ## 1.10.0 ### Minor Changes diff --git a/libs/zhi-common/package.json b/libs/zhi-common/package.json index 911ffacd..a66bebb2 100644 --- a/libs/zhi-common/package.json +++ b/libs/zhi-common/package.json @@ -1,6 +1,6 @@ { "name": "zhi-common", - "version": "1.10.0", + "version": "1.11.0", "type": "module", "description": "a collection of util tools", "main": "./dist/index.js", diff --git a/libs/zhi-common/src/lib/jsonUtil.ts b/libs/zhi-common/src/lib/jsonUtil.ts index 3c4db824..d6d62f11 100644 --- a/libs/zhi-common/src/lib/jsonUtil.ts +++ b/libs/zhi-common/src/lib/jsonUtil.ts @@ -42,9 +42,14 @@ class JsonUtil { * @param str json字符串 * @param def 默认值 */ - public static safeParse(str: string, def: T): T { + public static safeParse(str: any, def: T): T { let ret + if (typeof str !== "string") { + this.logger.warn("not json string, ignore parse") + return str + } + // 如果字符创为空或者undefined等,返回默认json if (StrUtil.isEmptyString(str)) { ret = def diff --git a/libs/zhi-fetch-middleware/CHANGELOG.md b/libs/zhi-fetch-middleware/CHANGELOG.md index 02c346b0..f5d43bdb 100644 --- a/libs/zhi-fetch-middleware/CHANGELOG.md +++ b/libs/zhi-fetch-middleware/CHANGELOG.md @@ -1,5 +1,12 @@ # zhi-fetch-middleware +## 0.1.13 + +### Patch Changes + +- Updated dependencies + - zhi-common@1.11.0 + ## 0.1.12 ### Patch Changes diff --git a/libs/zhi-fetch-middleware/package.json b/libs/zhi-fetch-middleware/package.json index 04d2eb0f..65ae7d58 100644 --- a/libs/zhi-fetch-middleware/package.json +++ b/libs/zhi-fetch-middleware/package.json @@ -1,6 +1,6 @@ { "name": "zhi-fetch-middleware", - "version": "0.1.12", + "version": "0.1.13", "type": "module", "description": "an intermediate tier prepared for fetch requests", "main": "./dist/index.js", diff --git a/libs/zhi-siyuan-api/CHANGELOG.md b/libs/zhi-siyuan-api/CHANGELOG.md index 490e936c..6ca957d4 100644 --- a/libs/zhi-siyuan-api/CHANGELOG.md +++ b/libs/zhi-siyuan-api/CHANGELOG.md @@ -1,5 +1,12 @@ # zhi-siyuan-api +## 1.9.5 + +### Patch Changes + +- Updated dependencies + - zhi-common@1.11.0 + ## 1.9.4 ### Patch Changes diff --git a/libs/zhi-siyuan-api/package.json b/libs/zhi-siyuan-api/package.json index 17ae3ed2..1c7cbab2 100644 --- a/libs/zhi-siyuan-api/package.json +++ b/libs/zhi-siyuan-api/package.json @@ -1,6 +1,6 @@ { "name": "zhi-siyuan-api", - "version": "1.9.4", + "version": "1.9.5", "type": "module", "description": "a siyuan-note api including both kernel and client", "main": "./dist/index.js", diff --git a/libs/zhi-xmlrpc-middleware/CHANGELOG.md b/libs/zhi-xmlrpc-middleware/CHANGELOG.md index 06106c28..7263387d 100644 --- a/libs/zhi-xmlrpc-middleware/CHANGELOG.md +++ b/libs/zhi-xmlrpc-middleware/CHANGELOG.md @@ -1,5 +1,12 @@ # zhi-xmlrpc-middleware +## 0.2.13 + +### Patch Changes + +- Updated dependencies + - zhi-common@1.11.0 + ## 0.2.12 ### Patch Changes diff --git a/libs/zhi-xmlrpc-middleware/package.json b/libs/zhi-xmlrpc-middleware/package.json index 5c58c212..b91c2322 100644 --- a/libs/zhi-xmlrpc-middleware/package.json +++ b/libs/zhi-xmlrpc-middleware/package.json @@ -1,6 +1,6 @@ { "name": "zhi-xmlrpc-middleware", - "version": "0.2.12", + "version": "0.2.13", "type": "module", "description": "abstract xmlrpc middle layer", "main": "./dist/index.js", From bc16015602c8ee5a8169560aeaf9abbba86a89a9 Mon Sep 17 00:00:00 2001 From: terwer Date: Thu, 15 Jun 2023 01:30:43 +0800 Subject: [PATCH 5/8] docs: update deps --- .changeset/hungry-radios-sparkle.md | 6 + .npmrc | 2 + README.md | 2 + README_zh_CN.md | 2 + libs/zhi-picgo-core/.eslintrc.cjs | 4 + .../.github/workflows/alpha.yml | 22 + .../zhi-picgo-core/.github/workflows/main.yml | 22 + .../.github/workflows/manually.yml | 19 + libs/zhi-picgo-core/.gitignore | 8 + libs/zhi-picgo-core/.npmignore | 8 + libs/zhi-picgo-core/.travis.yml | 32 + libs/zhi-picgo-core/.vscode/launch.json | 23 + libs/zhi-picgo-core/.vscode/settings.json | 33 + libs/zhi-picgo-core/.vscode/tasks.json | 12 + libs/zhi-picgo-core/CHANGELOG.md | 549 ++ libs/zhi-picgo-core/License | 21 + libs/zhi-picgo-core/README.md | 115 + libs/zhi-picgo-core/logo.png | Bin 0 -> 9464 bytes libs/zhi-picgo-core/package.json | 131 + libs/zhi-picgo-core/rollup.config.js | 87 + libs/zhi-picgo-core/src/core/Lifecycle.ts | 132 + libs/zhi-picgo-core/src/core/PicGo.ts | 228 + libs/zhi-picgo-core/src/custom-env.d.ts | 19 + libs/zhi-picgo-core/src/i18n/en.ts | 108 + libs/zhi-picgo-core/src/i18n/index.ts | 103 + libs/zhi-picgo-core/src/i18n/zh-CN.ts | 109 + libs/zhi-picgo-core/src/i18n/zh-TW.ts | 108 + libs/zhi-picgo-core/src/index.ts | 11 + libs/zhi-picgo-core/src/lib/Commander.ts | 97 + .../src/lib/LifecyclePlugins.ts | 63 + libs/zhi-picgo-core/src/lib/Logger.ts | 141 + libs/zhi-picgo-core/src/lib/PluginHandler.ts | 293 + libs/zhi-picgo-core/src/lib/PluginLoader.ts | 153 + libs/zhi-picgo-core/src/lib/Request.ts | 239 + libs/zhi-picgo-core/src/libs.d.ts | 8 + .../src/plugins/commander/config.ts | 12 + .../src/plugins/commander/i18n.ts | 36 + .../src/plugins/commander/index.ts | 20 + .../src/plugins/commander/init.ts | 120 + .../src/plugins/commander/pluginHandler.ts | 44 + .../src/plugins/commander/proxy.ts | 15 + .../src/plugins/commander/setting.ts | 101 + .../src/plugins/commander/upload.ts | 33 + .../src/plugins/commander/use.ts | 85 + .../src/plugins/transformer/base64.ts | 9 + .../src/plugins/transformer/index.ts | 14 + .../src/plugins/transformer/path.ts | 47 + .../src/plugins/uploader/aliyun.ts | 215 + .../src/plugins/uploader/github.ts | 123 + .../src/plugins/uploader/imgur.ts | 91 + .../src/plugins/uploader/index.ts | 22 + .../src/plugins/uploader/qiniu.ts | 152 + .../src/plugins/uploader/smms.ts | 97 + .../src/plugins/uploader/tcyun.ts | 260 + .../src/plugins/uploader/upyun.ts | 254 + libs/zhi-picgo-core/src/types/index.ts | 597 ++ libs/zhi-picgo-core/src/types/oldRequest.ts | 29 + .../src/utils/clipboard/linux.sh | 49 + .../src/utils/clipboard/mac.applescript | 41 + .../src/utils/clipboard/windows.ps1 | 26 + .../src/utils/clipboard/windows10.ps1 | 47 + .../zhi-picgo-core/src/utils/clipboard/wsl.sh | 18 + libs/zhi-picgo-core/src/utils/common.ts | 380 + .../zhi-picgo-core/src/utils/createContext.ts | 45 + libs/zhi-picgo-core/src/utils/db.ts | 85 + libs/zhi-picgo-core/src/utils/enum.ts | 29 + libs/zhi-picgo-core/src/utils/eventBus.ts | 6 + .../src/utils/getClipboardImage.ts | 141 + libs/zhi-picgo-core/src/utils/initUtils.ts | 118 + libs/zhi-picgo-core/src/utils/interfaces.ts | 217 + libs/zhi-picgo-core/src/utils/static.ts | 1 + libs/zhi-picgo-core/src/utils/streamUtils.ts | 15 + libs/zhi-picgo-core/tsconfig.json | 34 + libs/zhi-picgo-core/yarn.lock | 6345 +++++++++++++++++ libs/zhi-siyuan-picgo/.eslintrc.cjs | 4 + libs/zhi-siyuan-picgo/.github/dependabot.yml | 32 + .../zhi-siyuan-picgo/.github/workflows/ci.yml | 49 + .../.github/workflows/release-please.yml | 37 + libs/zhi-siyuan-picgo/.gitignore | 7 + libs/zhi-siyuan-picgo/CHANGELOG.md | 123 + libs/zhi-siyuan-picgo/README.md | 23 + libs/zhi-siyuan-picgo/esbuild.mjs | 95 + libs/zhi-siyuan-picgo/package.json | 37 + libs/zhi-siyuan-picgo/scripts/build.py | 27 + libs/zhi-siyuan-picgo/scripts/scriptutils.py | 213 + libs/zhi-siyuan-picgo/src/events/IpcList.ts | 10 + .../src/events/enentHandler.ts | 57 + .../zhi-siyuan-picgo/src/events/syPicgoIpc.ts | 276 + libs/zhi-siyuan-picgo/src/syPicgo.ts | 220 + libs/zhi-siyuan-picgo/src/utils/common.ts | 118 + libs/zhi-siyuan-picgo/src/utils/enum.ts | 7 + libs/zhi-siyuan-picgo/src/utils/types.d.ts | 31 + libs/zhi-siyuan-picgo/test/test.ts | 44 + libs/zhi-siyuan-picgo/tsconfig.json | 30 + libs/zhi-siyuan-picgo/tsconfig.node.json | 9 + pnpm-lock.yaml | 4994 ++++++++++++- 96 files changed, 19009 insertions(+), 317 deletions(-) create mode 100644 .changeset/hungry-radios-sparkle.md create mode 100644 libs/zhi-picgo-core/.eslintrc.cjs create mode 100644 libs/zhi-picgo-core/.github/workflows/alpha.yml create mode 100644 libs/zhi-picgo-core/.github/workflows/main.yml create mode 100644 libs/zhi-picgo-core/.github/workflows/manually.yml create mode 100644 libs/zhi-picgo-core/.gitignore create mode 100644 libs/zhi-picgo-core/.npmignore create mode 100644 libs/zhi-picgo-core/.travis.yml create mode 100644 libs/zhi-picgo-core/.vscode/launch.json create mode 100644 libs/zhi-picgo-core/.vscode/settings.json create mode 100644 libs/zhi-picgo-core/.vscode/tasks.json create mode 100644 libs/zhi-picgo-core/CHANGELOG.md create mode 100644 libs/zhi-picgo-core/License create mode 100644 libs/zhi-picgo-core/README.md create mode 100644 libs/zhi-picgo-core/logo.png create mode 100644 libs/zhi-picgo-core/package.json create mode 100644 libs/zhi-picgo-core/rollup.config.js create mode 100644 libs/zhi-picgo-core/src/core/Lifecycle.ts create mode 100644 libs/zhi-picgo-core/src/core/PicGo.ts create mode 100644 libs/zhi-picgo-core/src/custom-env.d.ts create mode 100644 libs/zhi-picgo-core/src/i18n/en.ts create mode 100644 libs/zhi-picgo-core/src/i18n/index.ts create mode 100644 libs/zhi-picgo-core/src/i18n/zh-CN.ts create mode 100644 libs/zhi-picgo-core/src/i18n/zh-TW.ts create mode 100644 libs/zhi-picgo-core/src/index.ts create mode 100644 libs/zhi-picgo-core/src/lib/Commander.ts create mode 100644 libs/zhi-picgo-core/src/lib/LifecyclePlugins.ts create mode 100644 libs/zhi-picgo-core/src/lib/Logger.ts create mode 100644 libs/zhi-picgo-core/src/lib/PluginHandler.ts create mode 100644 libs/zhi-picgo-core/src/lib/PluginLoader.ts create mode 100644 libs/zhi-picgo-core/src/lib/Request.ts create mode 100644 libs/zhi-picgo-core/src/libs.d.ts create mode 100644 libs/zhi-picgo-core/src/plugins/commander/config.ts create mode 100644 libs/zhi-picgo-core/src/plugins/commander/i18n.ts create mode 100644 libs/zhi-picgo-core/src/plugins/commander/index.ts create mode 100644 libs/zhi-picgo-core/src/plugins/commander/init.ts create mode 100644 libs/zhi-picgo-core/src/plugins/commander/pluginHandler.ts create mode 100644 libs/zhi-picgo-core/src/plugins/commander/proxy.ts create mode 100644 libs/zhi-picgo-core/src/plugins/commander/setting.ts create mode 100644 libs/zhi-picgo-core/src/plugins/commander/upload.ts create mode 100644 libs/zhi-picgo-core/src/plugins/commander/use.ts create mode 100644 libs/zhi-picgo-core/src/plugins/transformer/base64.ts create mode 100644 libs/zhi-picgo-core/src/plugins/transformer/index.ts create mode 100644 libs/zhi-picgo-core/src/plugins/transformer/path.ts create mode 100644 libs/zhi-picgo-core/src/plugins/uploader/aliyun.ts create mode 100644 libs/zhi-picgo-core/src/plugins/uploader/github.ts create mode 100644 libs/zhi-picgo-core/src/plugins/uploader/imgur.ts create mode 100644 libs/zhi-picgo-core/src/plugins/uploader/index.ts create mode 100644 libs/zhi-picgo-core/src/plugins/uploader/qiniu.ts create mode 100644 libs/zhi-picgo-core/src/plugins/uploader/smms.ts create mode 100644 libs/zhi-picgo-core/src/plugins/uploader/tcyun.ts create mode 100644 libs/zhi-picgo-core/src/plugins/uploader/upyun.ts create mode 100644 libs/zhi-picgo-core/src/types/index.ts create mode 100644 libs/zhi-picgo-core/src/types/oldRequest.ts create mode 100644 libs/zhi-picgo-core/src/utils/clipboard/linux.sh create mode 100644 libs/zhi-picgo-core/src/utils/clipboard/mac.applescript create mode 100644 libs/zhi-picgo-core/src/utils/clipboard/windows.ps1 create mode 100644 libs/zhi-picgo-core/src/utils/clipboard/windows10.ps1 create mode 100644 libs/zhi-picgo-core/src/utils/clipboard/wsl.sh create mode 100644 libs/zhi-picgo-core/src/utils/common.ts create mode 100644 libs/zhi-picgo-core/src/utils/createContext.ts create mode 100644 libs/zhi-picgo-core/src/utils/db.ts create mode 100644 libs/zhi-picgo-core/src/utils/enum.ts create mode 100644 libs/zhi-picgo-core/src/utils/eventBus.ts create mode 100644 libs/zhi-picgo-core/src/utils/getClipboardImage.ts create mode 100644 libs/zhi-picgo-core/src/utils/initUtils.ts create mode 100644 libs/zhi-picgo-core/src/utils/interfaces.ts create mode 100644 libs/zhi-picgo-core/src/utils/static.ts create mode 100644 libs/zhi-picgo-core/src/utils/streamUtils.ts create mode 100644 libs/zhi-picgo-core/tsconfig.json create mode 100644 libs/zhi-picgo-core/yarn.lock create mode 100644 libs/zhi-siyuan-picgo/.eslintrc.cjs create mode 100644 libs/zhi-siyuan-picgo/.github/dependabot.yml create mode 100644 libs/zhi-siyuan-picgo/.github/workflows/ci.yml create mode 100644 libs/zhi-siyuan-picgo/.github/workflows/release-please.yml create mode 100644 libs/zhi-siyuan-picgo/.gitignore create mode 100644 libs/zhi-siyuan-picgo/CHANGELOG.md create mode 100644 libs/zhi-siyuan-picgo/README.md create mode 100644 libs/zhi-siyuan-picgo/esbuild.mjs create mode 100644 libs/zhi-siyuan-picgo/package.json create mode 100644 libs/zhi-siyuan-picgo/scripts/build.py create mode 100644 libs/zhi-siyuan-picgo/scripts/scriptutils.py create mode 100644 libs/zhi-siyuan-picgo/src/events/IpcList.ts create mode 100644 libs/zhi-siyuan-picgo/src/events/enentHandler.ts create mode 100644 libs/zhi-siyuan-picgo/src/events/syPicgoIpc.ts create mode 100644 libs/zhi-siyuan-picgo/src/syPicgo.ts create mode 100644 libs/zhi-siyuan-picgo/src/utils/common.ts create mode 100644 libs/zhi-siyuan-picgo/src/utils/enum.ts create mode 100644 libs/zhi-siyuan-picgo/src/utils/types.d.ts create mode 100644 libs/zhi-siyuan-picgo/test/test.ts create mode 100644 libs/zhi-siyuan-picgo/tsconfig.json create mode 100644 libs/zhi-siyuan-picgo/tsconfig.node.json diff --git a/.changeset/hungry-radios-sparkle.md b/.changeset/hungry-radios-sparkle.md new file mode 100644 index 00000000..762e7120 --- /dev/null +++ b/.changeset/hungry-radios-sparkle.md @@ -0,0 +1,6 @@ +--- +"zhi-siyuan-picgo": major +"zhi-picgo-core": major +--- + +add picgo libs for siyuan-note environment only diff --git a/.npmrc b/.npmrc index ded82e2f..11dd5e00 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1,3 @@ auto-install-peers = true +"electron_mirror="http://npm.taobao.org/mirrors/electron/\"=" +electron_custom_dir=16.0.6 \ No newline at end of file diff --git a/README.md b/README.md index 0f77992a..9862a7cc 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,8 @@ - [ ] [zhi-http-api](https://github.com/terwer/zhi/tree/main/libs/zhi-http-api) - [ ] [zhi-zhihu-api](https://github.com/terwer/zhi/tree/main/libs/zhi-zhihu-api) - [ ] [zhi-csdn-api](https://github.com/terwer/zhi/tree/main/libs/zhi-csdn-api) + - [ ] [zhi-picgo-core](https://github.com/terwer/zhi/tree/main/libs/zhi-picgo-core) + - [ ] [zhi-siyuan-picgo](https://github.com/terwer/zhi/tree/main/libs/zhi-siyuan-picgo) ### scaffold diff --git a/README_zh_CN.md b/README_zh_CN.md index 46853f09..89149719 100644 --- a/README_zh_CN.md +++ b/README_zh_CN.md @@ -39,6 +39,8 @@ - [ ] [zhi-http-api](https://github.com/terwer/zhi/tree/main/libs/zhi-http-api) - [ ] [zhi-zhihu-api](https://github.com/terwer/zhi/tree/main/libs/zhi-zhihu-api) - [ ] [zhi-csdn-api](https://github.com/terwer/zhi/tree/main/libs/zhi-csdn-api) + - [ ] [zhi-picgo-core](https://github.com/terwer/zhi/tree/main/libs/zhi-picgo-core) + - [ ] [zhi-siyuan-picgo](https://github.com/terwer/zhi/tree/main/libs/zhi-siyuan-picgo) ### 脚手架 diff --git a/libs/zhi-picgo-core/.eslintrc.cjs b/libs/zhi-picgo-core/.eslintrc.cjs new file mode 100644 index 00000000..a1993b7b --- /dev/null +++ b/libs/zhi-picgo-core/.eslintrc.cjs @@ -0,0 +1,4 @@ +module.exports = { + root: true, + extends: ["./node_modules/@terwer/eslint-config-custom/typescript/index.cjs"], +} diff --git a/libs/zhi-picgo-core/.github/workflows/alpha.yml b/libs/zhi-picgo-core/.github/workflows/alpha.yml new file mode 100644 index 00000000..dd4b3450 --- /dev/null +++ b/libs/zhi-picgo-core/.github/workflows/alpha.yml @@ -0,0 +1,22 @@ +name: publish +on: + push: + branches: + - alpha +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Clone repo + uses: actions/checkout@v1 + - name: Setup node + uses: actions/setup-node@v1 + with: + node-version: '16.x' + registry-url: 'https://registry.npmjs.org' + - name: Install modules + run: yarn + - run: npm run build + - run: npm publish --tag alpha --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/libs/zhi-picgo-core/.github/workflows/main.yml b/libs/zhi-picgo-core/.github/workflows/main.yml new file mode 100644 index 00000000..152eb9fc --- /dev/null +++ b/libs/zhi-picgo-core/.github/workflows/main.yml @@ -0,0 +1,22 @@ +name: publish +on: + push: + branches: + - master +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Clone repo + uses: actions/checkout@v1 + - name: Setup node + uses: actions/setup-node@v1 + with: + node-version: '16.x' + registry-url: 'https://registry.npmjs.org' + - name: Install modules + run: yarn + - run: npm run build + - run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/libs/zhi-picgo-core/.github/workflows/manually.yml b/libs/zhi-picgo-core/.github/workflows/manually.yml new file mode 100644 index 00000000..209ab3cc --- /dev/null +++ b/libs/zhi-picgo-core/.github/workflows/manually.yml @@ -0,0 +1,19 @@ +name: manually-trigger +on: workflow_dispatch +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Clone repo + uses: actions/checkout@v1 + - name: Setup node + uses: actions/setup-node@v1 + with: + node-version: '16.x' + registry-url: 'https://registry.npmjs.org' + - name: Install modules + run: yarn + - run: npm run build + - run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/libs/zhi-picgo-core/.gitignore b/libs/zhi-picgo-core/.gitignore new file mode 100644 index 00000000..40d57234 --- /dev/null +++ b/libs/zhi-picgo-core/.gitignore @@ -0,0 +1,8 @@ +node_modules/ +dist/ +.DS_Store +yarn-error.log +temp.js +package-lock.json +test.jpg +.idea \ No newline at end of file diff --git a/libs/zhi-picgo-core/.npmignore b/libs/zhi-picgo-core/.npmignore new file mode 100644 index 00000000..bdffc2ee --- /dev/null +++ b/libs/zhi-picgo-core/.npmignore @@ -0,0 +1,8 @@ +node_modules/ +yarn-error.log +temp.js +package-lock.json +tsconfig.json +.vscode/ +src/ +.travis.yml diff --git a/libs/zhi-picgo-core/.travis.yml b/libs/zhi-picgo-core/.travis.yml new file mode 100644 index 00000000..b9108617 --- /dev/null +++ b/libs/zhi-picgo-core/.travis.yml @@ -0,0 +1,32 @@ +language: node_js +node_js: stable + +# Travis-CI Caching +cache: + directories: + - node_modules + yarn: true + +# S: Build Lifecycle +install: + - yarn + +stages: + - name: deploy + +jobs: + include: + - stage: deploy + script: + - npm run build + deploy: + edge: true + provider: npm + email: "marksz@teamsz.xyz" + api_key: "${NPM_TOKEN}" + skip_cleanup: true + on: + branch: master +branches: + only: + - master diff --git a/libs/zhi-picgo-core/.vscode/launch.json b/libs/zhi-picgo-core/.vscode/launch.json new file mode 100644 index 00000000..3a84132e --- /dev/null +++ b/libs/zhi-picgo-core/.vscode/launch.json @@ -0,0 +1,23 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "pwa-node", + "request": "launch", + "name": "Launch Program", + "skipFiles": [ + "/**" + ], + "program": "${workspaceFolder}/bin/picgo", + "args": [ + "upload" + ], + "outFiles": [ + "${workspaceFolder}/**/*.js" + ] + } + ] +} diff --git a/libs/zhi-picgo-core/.vscode/settings.json b/libs/zhi-picgo-core/.vscode/settings.json new file mode 100644 index 00000000..95175e10 --- /dev/null +++ b/libs/zhi-picgo-core/.vscode/settings.json @@ -0,0 +1,33 @@ +{ + "files.trimTrailingWhitespace": true, + "editor.formatOnSave": false, + "eslint.validate": [ + "javascript", + "javascriptreact", + "typescript", + "typescriptreact" + ], + "editor.codeActionsOnSave": { + "source.fixAll.eslint": true + }, + "eslint.enable": true, + "eslint.alwaysShowStatus": true, + "editor.tabSize": 2, + "cSpell.words": [ + "aliyun", + "applescript", + "commitlint", + "copyfiles", + "imgur", + "Molunerfinn", + "picgo", + "qiniu", + "smms", + "tcyun", + "uploader", + "uploaders", + "upyun", + "weibo" + ], + "typescript.tsdk": "node_modules/typescript/lib" +} diff --git a/libs/zhi-picgo-core/.vscode/tasks.json b/libs/zhi-picgo-core/.vscode/tasks.json new file mode 100644 index 00000000..8e046345 --- /dev/null +++ b/libs/zhi-picgo-core/.vscode/tasks.json @@ -0,0 +1,12 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "type": "npm", + "script": "debug", + "problemMatcher": [], + "label": "npm: debug", + "detail": "tsc -p . --sourcemap && npm run copy", + } + ] +} \ No newline at end of file diff --git a/libs/zhi-picgo-core/CHANGELOG.md b/libs/zhi-picgo-core/CHANGELOG.md new file mode 100644 index 00000000..4ef84b37 --- /dev/null +++ b/libs/zhi-picgo-core/CHANGELOG.md @@ -0,0 +1,549 @@ +# :tada: 1.5.0 (2022-11-13) + + + +# :tada: 1.5.0-alpha.17 (2022-11-13) + + +### :sparkles: Features + +* update picgo.use ([e19bb6e](https://github.com/PicGo/PicGo-Core/commit/e19bb6e)) + + +### :bug: Bug Fixes + +* some case will cause proxy not work ([6272303](https://github.com/PicGo/PicGo-Core/commit/6272303)) + + + +# :tada: 1.5.0-alpha.16 (2022-11-09) + + +### :bug: Bug Fixes + +* upyun url-options is not required ([9736a11](https://github.com/PicGo/PicGo-Core/commit/9736a11)) + + + +# :tada: 1.5.0-alpha.15 (2022-10-24) + + +### :bug: Bug Fixes + +* tencent cos url encode bug ([eafb70f](https://github.com/PicGo/PicGo-Core/commit/eafb70f)) + + + +# :tada: 1.5.0-alpha.14 (2022-10-24) + + +### :bug: Bug Fixes + +* url encode bug ([4c70e9b](https://github.com/PicGo/PicGo-Core/commit/4c70e9b)) + + + +# :tada: 1.5.0-alpha.13 (2022-10-19) + + +### :bug: Bug Fixes + +* type error ([b934e8a](https://github.com/PicGo/PicGo-Core/commit/b934e8a)) + + +### :package: Chore + +* create oldRequest types ([749359a](https://github.com/PicGo/PicGo-Core/commit/749359a)) + + + +# :tada: 1.5.0-alpha.12 (2022-10-14) + + +### :bug: Bug Fixes + +* types bug ([d77e6f3](https://github.com/PicGo/PicGo-Core/commit/d77e6f3)) + + + +# :tada: 1.5.0-alpha.11 (2022-10-13) + + + +# :tada: 1.5.0-alpha.10 (2022-09-25) + + +### :sparkles: Features + +* add zh-TW ([#135](https://github.com/PicGo/PicGo-Core/issues/135)) ([d111d6a](https://github.com/PicGo/PicGo-Core/commit/d111d6a)) +* update linux.sh ([#134](https://github.com/PicGo/PicGo-Core/issues/134)) ([2910c20](https://github.com/PicGo/PicGo-Core/commit/2910c20)) + + +### :bug: Bug Fixes + +* some texts in zh-TW ([#136](https://github.com/PicGo/PicGo-Core/issues/136)) ([907e6c9](https://github.com/PicGo/PicGo-Core/commit/907e6c9)) +* url image download bug & tencent cos url encode bug ([53d54f8](https://github.com/PicGo/PicGo-Core/commit/53d54f8)) + + + +# :tada: 1.5.0-alpha.9 (2022-09-03) + + +### :sparkles: Features + +* finish request -> axios ([b89cf1e](https://github.com/PicGo/PicGo-Core/commit/b89cf1e)) + + +### :bug: Bug Fixes + +* qiniu error msg can't show ([0e4661b](https://github.com/PicGo/PicGo-Core/commit/0e4661b)) +* sm.ms backupDomain message text ([45424d1](https://github.com/PicGo/PicGo-Core/commit/45424d1)) +* when request-options resolveWithFullResponse is false bug ([eb8217a](https://github.com/PicGo/PicGo-Core/commit/eb8217a)) + + + +# :tada: 1.5.0-alpha.8 (2022-08-27) + + +### :sparkles: Features + +* add backupDomain for sm.ms ([c6d54f1](https://github.com/PicGo/PicGo-Core/commit/c6d54f1)) +* add debug logger type ([4342268](https://github.com/PicGo/PicGo-Core/commit/4342268)) +* add picgo.use for easily using plugin ([c0107f1](https://github.com/PicGo/PicGo-Core/commit/c0107f1)) + + +### :bug: Bug Fixes + +* sometime tencent-cloud error message is empty ([6355e1b](https://github.com/PicGo/PicGo-Core/commit/6355e1b)) + + + +# :tada: 1.5.0-alpha.7 (2022-08-20) + + +### :sparkles: Features + +* finish i18n text ([11b3197](https://github.com/PicGo/PicGo-Core/commit/11b3197)) + + +### :bug: Bug Fixes + +* aliyun content-type -> Content-Type ([a649fcc](https://github.com/PicGo/PicGo-Core/commit/a649fcc)) + + + +# :tada: 1.5.0-alpha.6 (2022-08-17) + + +### :bug: Bug Fixes + +* tencent cos upload error ([61df53a](https://github.com/PicGo/PicGo-Core/commit/61df53a)) + + + +# :tada: 1.5.0-alpha.5 (2022-07-31) + + +### :sparkles: Features + +* add log file size limit ([158be01](https://github.com/PicGo/PicGo-Core/commit/158be01)) +* change inner db to @picgo/store ([0e90af3](https://github.com/PicGo/PicGo-Core/commit/0e90af3)) + + +### :bug: Bug Fixes + +* build error ([674a6b5](https://github.com/PicGo/PicGo-Core/commit/674a6b5)) + + + +# :tada: 1.5.0-alpha.4 (2022-05-26) + + +### :sparkles: Features + +* add userAgent for tencent cloud COS ([acac59a](https://github.com/PicGo/PicGo-Core/commit/acac59a)) + + + +# :tada: 1.5.0-alpha.3 (2022-04-04) + + +### :bug: Bug Fixes + +* picgo-gui clipboard image uploading error ([1302f76](https://github.com/PicGo/PicGo-Core/commit/1302f76)) + + + +# :tada: 1.5.0-alpha.2 (2022-04-03) + + +### :sparkles: Features + +* add wayland support for linux ([#119](https://github.com/PicGo/PicGo-Core/issues/119)) ([28905f2](https://github.com/PicGo/PicGo-Core/commit/28905f2)) + + +### :bug: Bug Fixes + +* qiniu && upyun errors ([587dd3f](https://github.com/PicGo/PicGo-Core/commit/587dd3f)) + + + +# :tada: 1.5.0-alpha.1 (2022-03-08) + + +### :sparkles: Features + +* add options for tencent cos ([1fccdcc](https://github.com/PicGo/PicGo-Core/commit/1fccdcc)), closes [#117](https://github.com/PicGo/PicGo-Core/issues/117) +* **i18n:** add i18n for picgo ([4b93a76](https://github.com/PicGo/PicGo-Core/commit/4b93a76)) + + +### :bug: Bug Fixes + +* build error in windows ([5616fb9](https://github.com/PicGo/PicGo-Core/commit/5616fb9)) + + +### :package: Chore + +* add alpha branch for alpha version ([6882022](https://github.com/PicGo/PicGo-Core/commit/6882022)), closes [#106](https://github.com/PicGo/PicGo-Core/issues/106) + + + +# :tada: 1.5.0-alpha.0 (2021-10-26) + + +### :package: Chore + +* **build:** migrate to esbuild and change export assignment to esm export ([#102](https://github.com/PicGo/PicGo-Core/issues/102)) ([2a6cd18](https://github.com/PicGo/PicGo-Core/commit/2a6cd18)) + + + +## :tada: 1.4.26 (2021-08-23) + + +### :bug: Bug Fixes + +* engine bug in package.json ([1c65144](https://github.com/PicGo/PicGo-Core/commit/1c65144)) + + + +## :tada: 1.4.25 (2021-08-21) + + +### :bug: Bug Fixes + +* handle clipboard file path error ([ff4ec86](https://github.com/PicGo/PicGo-Core/commit/ff4ec86)), closes [#97](https://github.com/PicGo/PicGo-Core/issues/97) +* **error:** throw error when transform failed ([#96](https://github.com/PicGo/PicGo-Core/issues/96)) ([57fce75](https://github.com/PicGo/PicGo-Core/commit/57fce75)) +* clipboard path contains space ([#95](https://github.com/PicGo/PicGo-Core/issues/95)) ([d2b73c1](https://github.com/PicGo/PicGo-Core/commit/d2b73c1)) + + + +## :tada: 1.4.24 (2021-08-01) + + +### :sparkles: Features + +* uploaded now can be modified since picgo will not use this value ([b6a8b58](https://github.com/PicGo/PicGo-Core/commit/b6a8b58)) + + + +## :tada: 1.4.23 (2021-07-27) + + +### :bug: Bug Fixes + +* cases when clipboard of wsl contain image file ([#91](https://github.com/PicGo/PicGo-Core/issues/91)) ([adfc55e](https://github.com/PicGo/PicGo-Core/commit/adfc55e)) + + +### :package: Chore + +* add github actions for publishing ([caae80e](https://github.com/PicGo/PicGo-Core/commit/caae80e)) + + + +## :tada: 1.4.22 (2021-07-27) + + +### :sparkles: Features + +* **smms:** smms now supports image without token ([#89](https://github.com/PicGo/PicGo-Core/issues/89)) ([456b81c](https://github.com/PicGo/PicGo-Core/commit/456b81c)) +* add support for clipboard in wsl ([#87](https://github.com/PicGo/PicGo-Core/issues/87)) ([3e230de](https://github.com/PicGo/PicGo-Core/commit/3e230de)) + + + +## :tada: 1.4.21 (2021-05-09) + + +### :bug: Bug Fixes + +* output empty after uploading when using isolate context ([79c228b](https://github.com/PicGo/PicGo-Core/commit/79c228b)) + + + +## :tada: 1.4.20 (2021-05-09) + + +### :sparkles: Features + +* add createContext for each upload process ([ecde023](https://github.com/PicGo/PicGo-Core/commit/ecde023)) + + +### :package: Chore + +* add debug launch.json ([9950259](https://github.com/PicGo/PicGo-Core/commit/9950259)) + + + +## :tada: 1.4.19 (2021-04-04) + + +### :sparkles: Features + +* add current uploader && transformer log ([67b2bb1](https://github.com/PicGo/PicGo-Core/commit/67b2bb1)) +* limit some of config's capabilities ([f901505](https://github.com/PicGo/PicGo-Core/commit/f901505)) + + + +## :tada: 1.4.18 (2021-03-06) + + +### :bug: Bug Fixes + +* unregister plugin delete pluginMap ([85228d8](https://github.com/PicGo/PicGo-Core/commit/85228d8)) + + + +## :tada: 1.4.17 (2021-02-09) + + +### :bug: Bug Fixes + +* **type:** type error in index.d.ts ([f617658](https://github.com/PicGo/PicGo-Core/commit/f617658)), closes [#69](https://github.com/PicGo/PicGo-Core/issues/69) + + + +## :tada: 1.4.16 (2021-02-08) + + +### :sparkles: Features + +* add proxy & registry options for pluginHandler ([b10b963](https://github.com/PicGo/PicGo-Core/commit/b10b963)) +* dynamic proxy getter with ctx.Request.request ([687805f](https://github.com/PicGo/PicGo-Core/commit/687805f)), closes [#64](https://github.com/PicGo/PicGo-Core/issues/64) +* supporting install specific version of plugin ([35e15b0](https://github.com/PicGo/PicGo-Core/commit/35e15b0)) + + + +## :tada: 1.4.15 (2021-01-24) + + +### :sparkles: Features + +* add local plugin install/uninstall/update support & imporve plugin name handler ([f8ec464](https://github.com/PicGo/PicGo-Core/commit/f8ec464)) + + + +## :tada: 1.4.14 (2020-12-19) + + +### :bug: Bug Fixes + +* types error ([303a4ec](https://github.com/PicGo/PicGo-Core/commit/303a4ec)) + + + +## :tada: 1.4.13 (2020-12-19) + + +### :sparkles: Features + +* new addPlugin api for node projects ([5a18432](https://github.com/PicGo/PicGo-Core/commit/5a18432)) + + +### :bug: Bug Fixes + +* **type:** some type error ([233a6ca](https://github.com/PicGo/PicGo-Core/commit/233a6ca)) +* pluginLoader can't get the full plugin list ([83535b9](https://github.com/PicGo/PicGo-Core/commit/83535b9)), closes [#60](https://github.com/PicGo/PicGo-Core/issues/60) + + + +## :tada: 1.4.12 (2020-11-04) + + +### :bug: Bug Fixes + +* let tcyun error info more detail ([ddf645f](https://github.com/PicGo/PicGo-Core/commit/ddf645f)) +* not encode before uploading an image with url ([c0aee32](https://github.com/PicGo/PicGo-Core/commit/c0aee32)) +* qiniu error handler ([de94212](https://github.com/PicGo/PicGo-Core/commit/de94212)) + + + +## :tada: 1.4.11 (2020-07-12) + + +### :bug: Bug Fixes + +* initailize db function error ([df7d526](https://github.com/PicGo/PicGo-Core/commit/df7d526)) + + + +## :tada: 1.4.10 (2020-06-28) + + +### :bug: Bug Fixes + +* url image hash bug ([e405221](https://github.com/PicGo/PicGo-Core/commit/e405221)) + + + +## :tada: 1.4.9 (2020-06-27) + + +### :sparkles: Features + +* add plugin running && error logs ([6adc070](https://github.com/PicGo/PicGo-Core/commit/6adc070)) +* **transformer:** add fallback to support more image formats such as HEIC ([0f5d2a9](https://github.com/PicGo/PicGo-Core/commit/0f5d2a9)), closes [#13](https://github.com/PicGo/PicGo-Core/issues/13) + + +### :bug: Bug Fixes + +* multiline logs format ([444a42f](https://github.com/PicGo/PicGo-Core/commit/444a42f)) +* the issue of lost logs ([daa7508](https://github.com/PicGo/PicGo-Core/commit/daa7508)) +* the order of the uploaded list may not be the same as the order entered ([2bf1ed9](https://github.com/PicGo/PicGo-Core/commit/2bf1ed9)), closes [#40](https://github.com/PicGo/PicGo-Core/issues/40) +* unregisterPlugin's bug ([966bfd8](https://github.com/PicGo/PicGo-Core/commit/966bfd8)) + + +### :package: Chore + +* add vscode workspace settings & migrate tslint to eslint ([50a4842](https://github.com/PicGo/PicGo-Core/commit/50a4842)) + + + +## :tada: 1.4.8 (2020-04-04) + + +### :bug: Bug Fixes + +* encode url before finishing ([7a6b39c](https://github.com/PicGo/PicGo-Core/commit/7a6b39c)) +* return true if decodeURI throw error to avoid crash ([d09d77a](https://github.com/PicGo/PicGo-Core/commit/d09d77a)) +* win10 cmd crash bug when "picgo upload" ([#35](https://github.com/PicGo/PicGo-Core/issues/35)) ([deec252](https://github.com/PicGo/PicGo-Core/commit/deec252)) + + + +## :tada: 1.4.7 (2020-03-07) + + +### :sparkles: Features + +* add smms-v2 support ([7e10655](https://github.com/PicGo/PicGo-Core/commit/7e10655)) +* remove weibo support ([96b2b3a](https://github.com/PicGo/PicGo-Core/commit/96b2b3a)) + + +### :pencil: Documentation + +* update README ([aff6326](https://github.com/PicGo/PicGo-Core/commit/aff6326)) + + + +## :tada: 1.4.6 (2020-02-23) + + +### :bug: Bug Fixes + +* auto generate a local png bug ([c54ac67](https://github.com/PicGo/PicGo-Core/commit/c54ac67)) + + + +## :tada: 1.4.5 (2020-02-23) + + +### :sparkles: Features + +* add upload image from URL support ([0d87342](https://github.com/PicGo/PicGo-Core/commit/0d87342)) + + +### :package: Chore + +* travis-ci deploy option ([a2a89cd](https://github.com/PicGo/PicGo-Core/commit/a2a89cd)) + + + +## :tada: 1.4.4 (2019-12-30) + + +### :bug: Bug Fixes + +* image_repeated error from smms ([#28](https://github.com/PicGo/PicGo-Core/issues/28)) ([f246b8d](https://github.com/PicGo/PicGo-Core/commit/f246b8d)) + + + +## :tada: 1.4.3 (2019-12-27) + + +### :sparkles: Features + +* add aliyun optionUrl option ([0a3bdea](https://github.com/PicGo/PicGo-Core/commit/0a3bdea)) + + + +## :tada: 1.4.2 (2019-12-26) + + +### :bug: Bug Fixes + +* cli source ([be6cdcc](https://github.com/PicGo/PicGo-Core/commit/be6cdcc)) + + + +## :tada: 1.4.1 (2019-12-26) + + + +# :tada: 1.4.0 (2019-12-26) + + +### :sparkles: Features + +* add config methods && pluginHandler to ctx ([f9bb9fb](https://github.com/PicGo/PicGo-Core/commit/f9bb9fb)) +* **plugin:** passing environment variables ([50467c7](https://github.com/PicGo/PicGo-Core/commit/50467c7)) + + +### :bug: Bug Fixes + +* correct sm.ms err msg ([#18](https://github.com/PicGo/PicGo-Core/issues/18)) ([f0a4e8a](https://github.com/PicGo/PicGo-Core/commit/f0a4e8a)) +* pluginHandler args length error ([e15eac2](https://github.com/PicGo/PicGo-Core/commit/e15eac2)) + + +### :package: Chore + +* **types:** added typings field to export type inform… ([#23](https://github.com/PicGo/PicGo-Core/issues/23)) ([8bb16e7](https://github.com/PicGo/PicGo-Core/commit/8bb16e7)) + + + +## :tada: 1.3.7 (2019-05-12) + + +### :bug: Bug Fixes + +* **clipboard:** clipboard image getter error in macOS ([8314604](https://github.com/PicGo/PicGo-Core/commit/8314604)) + + + +## :tada: 1.3.6 (2019-04-20) + + +### :bug: Bug Fixes + +* clipboard image upload under win10 ([48b72ed](https://github.com/PicGo/PicGo-Core/commit/48b72ed)) + + + +## :tada: 1.3.5 (2019-04-15) + + +### :bug: Bug Fixes + +* writing log sometimes disappeared ([d36c0ae](https://github.com/PicGo/PicGo-Core/commit/d36c0ae)) + + +### :package: Chore + +* add picgo bump version ([c312302](https://github.com/PicGo/PicGo-Core/commit/c312302)) diff --git a/libs/zhi-picgo-core/License b/libs/zhi-picgo-core/License new file mode 100644 index 00000000..7aea1523 --- /dev/null +++ b/libs/zhi-picgo-core/License @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Molunerfinn + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/libs/zhi-picgo-core/README.md b/libs/zhi-picgo-core/README.md new file mode 100644 index 00000000..f4d32d76 --- /dev/null +++ b/libs/zhi-picgo-core/README.md @@ -0,0 +1,115 @@ +# PicGo-Core + +![standard](https://img.shields.io/badge/code%20style-standard-green.svg?style=flat-square) +![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat-square) +[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fpicgo%2Fpicgo-core%2Fbadge%3Fref%3Dmaster&style=flat-square)](https://actions-badge.atrox.dev/picgo/picgo-core/goto?ref=master) +![npm](https://img.shields.io/npm/v/electron-picgo.svg?style=flat-square) +![node](https://img.shields.io/badge/node-%3E%3D16.0.0-blue?style=flat-square) + +![picgo-core](https://cdn.jsdelivr.net/gh/Molunerfinn/test/picgo/picgo-core-fix.jpg) + +A tool for picture uploading. Both CLI & api supports. It also supports plugin system, please check [Awesome-PicGo](https://github.com/PicGo/Awesome-PicGo) to find powerful plugins. + +**Typora supports PicGo-Core natively**. If you like PicGo-Core and have time, welcome to help me translate the documentation of PicGo-Core into English. + +## Installation + +PicGo should be installed with node.js >= 12 (v1.5.0-alpha.4 and small) & node.js >= 16 (since v1.5.0-alpha.5). + +### Global install + +```bash +npm install picgo -g + +# or + +yarn global add picgo +``` + +### Local install + +```bash +npm install picgo -D + +# or + +yarn add picgo -D +``` + +## Usage + +### Use in CLI + +> PicGo uses `SM.MS` as the default upload pic-bed. + +Show help: + +```bash +$ picgo -h + + Usage: picgo [options] [command] + + Options: + + -v, --version output the version number + -d, --debug debug mode + -s, --silent silent mode + -c, --config set config path + -h, --help output usage information + + Commands: + + install|add install picgo plugin + uninstall|rm uninstall picgo plugin + update update picgo plugin + set|config [name] configure config of picgo modules + upload|u [input...] upload, go go go + use [module] use modules of picgo + init [options]