-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove sample plugin client files
- Loading branch information
Showing
11 changed files
with
37 additions
and
10 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
packages/presets/nocobase/src/migrations/2022-del-sample-plugins.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Migration } from '@nocobase/server'; | ||
|
||
export default class DelSamplePluginMigration extends Migration { | ||
async up() { | ||
const r1 = await this.app.version.satisfies('>=0.8.0-alpha.1'); | ||
const r2 = await this.app.version.satisfies('<=0.8.0-alpha.6'); | ||
if (r1 && r2) { | ||
const repository = this.context.db.getRepository('applicationPlugins'); | ||
await repository.destroy({ | ||
filter: { | ||
'name.$in': [ | ||
'sample-command', | ||
'sample-shop-modeling', | ||
'sample-hello', | ||
'sample-shop-events', | ||
'sample-shop-i18n', | ||
'sample-shop-actions', | ||
'sample-ratelimit', | ||
'sample-custom-signup-page', | ||
'sample-custom-block', | ||
'sample-custom-page', | ||
], | ||
}, | ||
}); | ||
} | ||
} | ||
} |