Просмотр исходного кода

Merge branch 'master' into minor

Michael Bromley 11 месяцев назад
Родитель
Сommit
f1d4904154

+ 2 - 0
CHANGELOG.md

@@ -3,6 +3,7 @@
 
 #### Fixes
 
+* **admin-ui** Add support for mac command key for selection manager (#3315) ([c1cfb737](https://github.com/vendure-ecommerce/vendure/commit/c1cfb737))
 * **admin-ui** Add ProductVariantPrice custom fields ui inputs (#3327) ([0d22b25](https://github.com/vendure-ecommerce/vendure/commit/0d22b25)), closes [#3327](https://github.com/vendure-ecommerce/vendure/issues/3327)
 * **admin-ui** Update Polish localization (#3309) ([82787cf](https://github.com/vendure-ecommerce/vendure/commit/82787cf)), closes [#3309](https://github.com/vendure-ecommerce/vendure/issues/3309)
 * **common** Contract multiple sequential replacers to just one in normalizeString (#3289) ([f362a4b](https://github.com/vendure-ecommerce/vendure/commit/f362a4b)), closes [#3289](https://github.com/vendure-ecommerce/vendure/issues/3289)
@@ -11,6 +12,7 @@
 * **core** Improvements to Redis cache plugin (#3303) ([b631781](https://github.com/vendure-ecommerce/vendure/commit/b631781)), closes [#3303](https://github.com/vendure-ecommerce/vendure/issues/3303)
 * **core** Include variant custom fields when duplicating a product (#3203) ([69a1de0](https://github.com/vendure-ecommerce/vendure/commit/69a1de0)), closes [#3203](https://github.com/vendure-ecommerce/vendure/issues/3203)
 * **create** Specify Typesense Docker image version ([fd6a9fd](https://github.com/vendure-ecommerce/vendure/commit/fd6a9fd))
+* **elasticsearch-plugin** Improve search results (#3284) ([b8112be0](https://github.com/vendure-ecommerce/vendure/commit/b8112be0))
 * **payments-plugin** Fix null access error in BraintreePlugin ([627d930](https://github.com/vendure-ecommerce/vendure/commit/627d930))
 * **payments-plugin** Stripe plugin supports correct languageCode (#3298) ([4349ef8](https://github.com/vendure-ecommerce/vendure/commit/4349ef8)), closes [#3298](https://github.com/vendure-ecommerce/vendure/issues/3298)
 

+ 1 - 1
docs/docs/guides/developer-guide/dataloaders/index.md

@@ -51,7 +51,7 @@ npm install dataloader
 
 **Dataloader skeleton**
 
-```ts title="src/plugins/my-plugin/api/datalaoder.ts"
+```ts title="src/plugins/my-plugin/api/dataloader.ts"
 import DataLoader from 'dataloader'
 
 const LoggerCtx = 'SubscriptionDataloaderService'

+ 20 - 7
docs/docs/guides/developer-guide/plugins/index.mdx

@@ -149,7 +149,7 @@ This is the recommended way of creating a new plugin.
 Although the [Vendure CLI](/guides/developer-guide/cli/) is the recommended way to create a new plugin, it can be useful to understand the process of creating
 a plugin manually.
 
-In Vendure **plugins** are used to extend the core functionality of the server. Plugins can be pre-made functionality that you can install via npm, or they can be custom plugins that you write yourself.
+Vendure **plugins** are used to extend the core functionality of the server. Plugins can be pre-made functionality that you can install via npm, or they can be custom plugins that you write yourself.
 
 For any unit of functionality that you need to add to your project, you'll be creating a Vendure plugin. By convention, plugins are stored in the `plugins` directory of your project. However, this is not a requirement, and you are free to arrange your plugin files in any way you like.
 
@@ -519,7 +519,6 @@ Now that we have defined the GraphQL schema extensions, we need to create a reso
 import { Args, Mutation, Query, Resolver } from '@nestjs/graphql';
 import { Allow, Ctx, Permission, RequestContext, Transaction } from '@vendure/core';
 
-import { WishlistItem } from '../entities/wishlist-item.entity';
 import { WishlistService } from '../services/wishlist.service';
 
 @Resolver()
@@ -621,13 +620,27 @@ export const config: VendureConfig = {
 };
 ```
 
-### Test the plugin
+### Test the Plugin
 
-Now that the plugin is installed, we can test it out. Since we have defined a custom field, we'll need to generate and run a migration to add the new column to the database:
+Now that the plugin is installed, we can test it out. Since we have defined a custom field, we'll need to generate and run a migration to add the new column to the database.
 
-```bash
-npm run migration:generate wishlist-plugin
-```
+1. **Generate the Migration File**
+
+   Run the following command to generate a migration file for the `wishlist-plugin`:
+
+   ```bash
+   npx vendure migrate wishlist-plugin
+   ```
+
+When prompted, select the "Generate a new migration" option. This will create a new migration file in the `src/migrations` folder.
+
+2. **Run the Migration**
+
+After generating the migration file, apply the changes to the database by running the same command again:
+
+   ```bash
+   npx vendure migrate wishlist-plugin
+   ```
 
 Then start the server:
 

+ 10 - 5
docs/docs/guides/how-to/digital-products/index.mdx

@@ -20,7 +20,7 @@ The complete source of the following example plugin can be found here: [example-
 
 If some products are digital and some are physical, we can distinguish between them by adding a customField to the ProductVariant entity.
 
-```ts title="src/plugins/digital-products/digital-products-plugin.ts"
+```ts title="src/plugins/digital-products/digital-products.plugin.ts"
 import { LanguageCode, PluginCommonModule, VendurePlugin } from '@vendure/core';
 
 @VendurePlugin({
@@ -41,9 +41,14 @@ import { LanguageCode, PluginCommonModule, VendurePlugin } from '@vendure/core';
 export class DigitalProductsPlugin {}
 ```
 
+:::note
+You will need to **create a migration** after adding this custom field.
+See the [Migrations](/guides/developer-guide/migrations/) guide for more information.
+:::
+
 We will also define a custom field on the `ShippingMethod` entity to indicate that this shipping method is only available for digital products:
 
-```ts title="src/plugins/digital-products/digital-products-plugin.ts"
+```ts title="src/plugins/digital-products/digital-products.plugin.ts"
 import { LanguageCode, PluginCommonModule, VendurePlugin } from '@vendure/core';
 
 @VendurePlugin({
@@ -67,7 +72,7 @@ import { LanguageCode, PluginCommonModule, VendurePlugin } from '@vendure/core';
 Lastly we will define a custom field on the `Fulfillment` entity where we can store download links for the digital products. If your own implementation you may
 wish to handle this part differently, e.g. storing download links on the `Order` entity or in a custom entity.
 
-```ts title="src/plugins/digital-products/digital-products-plugin.ts"
+```ts title="src/plugins/digital-products/digital-products.plugin.ts"
 import { LanguageCode, PluginCommonModule, VendurePlugin } from '@vendure/core';
 
 @VendurePlugin({
@@ -159,7 +164,7 @@ function generateDownloadUrl(orderLine: OrderLine) {
 
 This fulfillment handler should then be added to the `fulfillmentHandlers` array the config ShippingOptions:
 
-```ts title="src/plugins/digital-products/digital-products-plugin.ts"
+```ts title="src/plugins/digital-products/digital-products.plugin.ts"
 
 import { LanguageCode, PluginCommonModule, VendurePlugin } from '@vendure/core';
 import { digitalFulfillmentHandler } from './config/digital-fulfillment-handler';
@@ -283,7 +288,7 @@ We can now add the plugin to the VendureConfig:
 
 ```ts title="src/vendure-config.ts"
 import { VendureConfig } from '@vendure/core';
-import { DigitalProductsPlugin } from './plugins/digital-products/digital-products-plugin';
+import { DigitalProductsPlugin } from './plugins/digital-products/digital-products.plugin';
 
 const config: VendureConfig = {
     // ... other config omitted

+ 0 - 4
docs/docs/user-guide/settings/index.md

@@ -1,4 +0,0 @@
----
-title: "Settings"
-weight: 5
----

+ 16 - 0
license/signatures/version1/cla.json

@@ -463,6 +463,22 @@
       "created_at": "2025-01-22T01:21:31Z",
       "repoId": 136938012,
       "pullRequestNo": 3315
+    },
+    {
+      "name": "c4nzin",
+      "id": 38213551,
+      "comment_id": 2629336898,
+      "created_at": "2025-02-02T10:33:14Z",
+      "repoId": 136938012,
+      "pullRequestNo": 3343
+    },
+    {
+      "name": "jhmen",
+      "id": 69339775,
+      "comment_id": 2642778019,
+      "created_at": "2025-02-07T12:21:59Z",
+      "repoId": 136938012,
+      "pullRequestNo": 3351
     }
   ]
 }