From f9eb2699f2fdfd9d1c3594ad0301017e46cd98f0 Mon Sep 17 00:00:00 2001 From: YANG QIA <2013xile@gmail.com> Date: Thu, 7 Mar 2024 19:59:51 +0800 Subject: [PATCH] chore(pm): set plugin-sms-auth as local plugin, close T-3323 (#3652) --- packages/presets/nocobase/src/server/index.ts | 2 +- .../20240307184120-set-sms-local.ts | 17 ++++++++++++ yarn.lock | 27 ++++++++++++------- 3 files changed, 36 insertions(+), 10 deletions(-) create mode 100644 packages/presets/nocobase/src/server/migrations/20240307184120-set-sms-local.ts diff --git a/packages/presets/nocobase/src/server/index.ts b/packages/presets/nocobase/src/server/index.ts index 8057908cc0..c4b62b3733 100644 --- a/packages/presets/nocobase/src/server/index.ts +++ b/packages/presets/nocobase/src/server/index.ts @@ -33,7 +33,6 @@ export class PresetNocoBase extends Plugin { 'formula-field', 'data-visualization', 'auth', - 'sms-auth', 'logger', 'custom-request', 'calendar', @@ -60,6 +59,7 @@ export class PresetNocoBase extends Plugin { 'theme-editor>=0.11.1-alpha.1', 'api-doc>=0.13.0-alpha.1', 'cas>=0.13.0-alpha.5', + 'sms-auth>=0.10.0-alpha.2', ]; splitNames(name: string) { diff --git a/packages/presets/nocobase/src/server/migrations/20240307184120-set-sms-local.ts b/packages/presets/nocobase/src/server/migrations/20240307184120-set-sms-local.ts new file mode 100644 index 0000000000..21df38adf0 --- /dev/null +++ b/packages/presets/nocobase/src/server/migrations/20240307184120-set-sms-local.ts @@ -0,0 +1,17 @@ +import { Migration } from '@nocobase/server'; + +export default class extends Migration { + on = 'afterLoad'; // 'beforeLoad' or 'afterLoad' + appVersion = '<0.20.0-alpha.6'; + + async up() { + await this.pm.repository.update({ + values: { + builtIn: false, + }, + filter: { + name: 'sms-auth', + }, + }); + } +} diff --git a/yarn.lock b/yarn.lock index b30f4c4e0d..486e00c98e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4251,11 +4251,6 @@ dependencies: eslint-scope "5.1.1" -"@nocobase/plugin-workflow-test@>= 0.19.0-alpha.3": - version "0.19.0-alpha.9" - resolved "https://registry.npmjs.org/@nocobase/plugin-workflow-test/-/plugin-workflow-test-0.19.0-alpha.9.tgz#c074e8b3389f4d856bcbdba6c34756b386973f2b" - integrity sha512-jiNdq7hZzlivXv73rMdM+zZtxShsILcX+Fx0kOmopamXvTPCbAfjtMoqUndwpHGkhGomGzWfIwvuSXa3D0NRCA== - "@node-saml/node-saml@^4.0.2": version "4.0.5" resolved "https://registry.npmmirror.com/@node-saml/node-saml/-/node-saml-4.0.5.tgz#039e387095b54639b06df62b1b4a6d8941c6d907" @@ -11398,7 +11393,7 @@ delegates@^1.0.0: resolved "https://registry.npmmirror.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ== -denque@^2.0.1: +denque@^2.0.1, denque@^2.1.0: version "2.1.0" resolved "https://registry.npmmirror.com/denque/-/denque-2.1.0.tgz#e93e1a6569fb5e66f16a3c2a2964617d349d6ab1" integrity sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw== @@ -16947,7 +16942,7 @@ long@^4.0.0: resolved "https://registry.npmmirror.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== -long@^5.2.0: +long@^5.2.0, long@^5.2.1: version "5.2.3" resolved "https://registry.npmmirror.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1" integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== @@ -16993,7 +16988,7 @@ lowercase-keys@^2.0.0: resolved "https://registry.npmmirror.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== -lru-cache@8.0.5: +lru-cache@8.0.5, lru-cache@^8.0.0: version "8.0.5" resolved "https://registry.npmmirror.com/lru-cache/-/lru-cache-8.0.5.tgz#983fe337f3e176667f8e567cfcce7cb064ea214e" integrity sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA== @@ -18367,6 +18362,20 @@ mysql2@^2.3.3: seq-queue "^0.0.5" sqlstring "^2.3.2" +mysql2@^3.9.1: + version "3.9.2" + resolved "https://registry.npmjs.org/mysql2/-/mysql2-3.9.2.tgz#567343581f9742032598b6c15bd7aa65d2f7d4af" + integrity sha512-3Cwg/UuRkAv/wm6RhtPE5L7JlPB877vwSF6gfLAS68H+zhH+u5oa3AieqEd0D0/kC3W7qIhYbH419f7O9i/5nw== + dependencies: + denque "^2.1.0" + generate-function "^2.3.1" + iconv-lite "^0.6.3" + long "^5.2.1" + lru-cache "^8.0.0" + named-placeholders "^1.1.3" + seq-queue "^0.0.5" + sqlstring "^2.3.2" + mz@^2.7.0: version "2.7.0" resolved "https://registry.npmmirror.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" @@ -18376,7 +18385,7 @@ mz@^2.7.0: object-assign "^4.0.1" thenify-all "^1.0.0" -named-placeholders@^1.1.2: +named-placeholders@^1.1.2, named-placeholders@^1.1.3: version "1.1.3" resolved "https://registry.npmmirror.com/named-placeholders/-/named-placeholders-1.1.3.tgz#df595799a36654da55dda6152ba7a137ad1d9351" integrity sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w==