{"_id":"@codibri/vendure-product-feed-plugin","_rev":"4-bc4dbf21d62b5d55aaaac30ca32eeb30","name":"@codibri/vendure-product-feed-plugin","dist-tags":{"latest":"0.0.4"},"versions":{"0.0.1":{"name":"@codibri/vendure-product-feed-plugin","version":"0.0.1","author":{"name":"Toon Janssens","email":"toon@codibri.be"},"license":"MIT","_id":"@codibri/vendure-product-feed-plugin@0.0.1","maintainers":[{"name":"toonjanssens","email":"toon@codibri.be"}],"homepage":"https://github.com/Codibri-BV/vendure-product-feed-plugin#readme","bugs":{"url":"https://github.com/Codibri-BV/vendure-product-feed-plugin/issues"},"dist":{"shasum":"4f49c5e9b03471946d88f57e873105bb6196db27","tarball":"https://registry.npmjs.org/@codibri/vendure-product-feed-plugin/-/vendure-product-feed-plugin-0.0.1.tgz","fileCount":29,"integrity":"sha512-KRm/0I3e+Q4zLu4ZDSXTG9qEIcLDaw6JzJ+X5a0iUtquVmTsPgkwgb1Qd64XtddFUs01v1YP8S6xjYUY1WjIzQ==","signatures":[{"sig":"MEUCIQDSKs4omw3/0sww8qVXEIq9QVQN9E2EZs5D/9wX18vntAIgPpWOHxrDFbPrUoiEnz/XmpRYnd7aM8GXbh9vqvKNbLo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":50005},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.20.7"},"gitHead":"0aa6c449e930cea113f0593e0e1f8a235805378c","private":false,"scripts":{"lint":"tsc --noEmit","test":"jest --preset=\"ts-jest\"","build":"tsc && cp -r src/ui dist","start":"yarn ts-node test/dev-server.ts","release":"yarn build && changeset publish"},"_npmUser":{"name":"toonjanssens","email":"toon@codibri.be"},"repository":{"url":"git+https://github.com/Codibri-BV/vendure-product-feed-plugin.git","type":"git"},"_npmVersion":"10.8.2","description":"Vendure plugin to create product feed","directories":{},"_nodeVersion":"18.20.7","dependencies":{"mime-types":"^2.1.35","xmlbuilder2":"^3.1.1","ssh2-sftp-client":"^10.0.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"29.4.3","ts-jest":"29.0.5","ts-node":"10.9.1","typescript":"5.4.5","@types/jest":"29.4.0","@vendure/core":"2.3.3","@changesets/cli":"^2.28.1","@vendure/testing":"2.3.3","@vendure/ui-devkit":"2.3.3","@types/ssh2-sftp-client":"^9.0.3","@micham/sftp-mock-server":"^0.0.6","@vendure/admin-ui-plugin":"2.3.3","@vendure/asset-server-plugin":"2.3.3"},"_npmOperationalInternal":{"tmp":"tmp/vendure-product-feed-plugin_0.0.1_1742737195995_0.9903088893344305","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@codibri/vendure-product-feed-plugin","version":"0.0.2","author":{"name":"Toon Janssens","email":"toon@codibri.be"},"license":"MIT","_id":"@codibri/vendure-product-feed-plugin@0.0.2","maintainers":[{"name":"toonjanssens","email":"toon@codibri.be"}],"homepage":"https://github.com/Codibri-BV/vendure-product-feed-plugin#readme","bugs":{"url":"https://github.com/Codibri-BV/vendure-product-feed-plugin/issues"},"dist":{"shasum":"2e81eeebf6cb25505179ae5a08d53b0fb2783feb","tarball":"https://registry.npmjs.org/@codibri/vendure-product-feed-plugin/-/vendure-product-feed-plugin-0.0.2.tgz","fileCount":29,"integrity":"sha512-J2kYyREduFdw3io776R2IEtSvjKYBPIRdPXsFgW6siy2vuCVfRO3cdBoA7L3r02riOViKhKhkQysfBm6hgpIZw==","signatures":[{"sig":"MEQCIEpaqZPWMo4MijNBfC6ToEh1iJxd3YTTl6pw1CO0+IDaAiAm5hnMBl/nxwq3Lvb5S2zLgvhDRYvY7NLVs0Z5065IAw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":50074},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.20.7"},"gitHead":"6d4dc958fa476d99925dc95a5904f351dacc5725","private":false,"scripts":{"lint":"tsc --noEmit","test":"jest --preset=\"ts-jest\"","build":"tsc && cp -r src/ui dist","start":"yarn ts-node test/dev-server.ts","release":"yarn build && changeset publish"},"_npmUser":{"name":"toonjanssens","email":"toon@codibri.be"},"repository":{"url":"git+https://github.com/Codibri-BV/vendure-product-feed-plugin.git","type":"git"},"_npmVersion":"10.8.2","description":"Vendure plugin to create product feed","directories":{},"_nodeVersion":"18.20.7","dependencies":{"express":"^4.21.2","mime-types":"^3.0.1","xmlbuilder2":"^3.1.1","ssh2-sftp-client":"^12.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"29.4.3","ts-jest":"29.0.5","ts-node":"10.9.1","typescript":"5.4.5","@types/jest":"29.4.0","@types/node":"^22.13.14","@vendure/core":"3.1.7","@changesets/cli":"^2.28.1","@vendure/testing":"3.1.7","@vendure/ui-devkit":"3.1.7","@types/ssh2-sftp-client":"^9.0.3","@micham/sftp-mock-server":"^0.0.6","@vendure/admin-ui-plugin":"3.1.7","@vendure/asset-server-plugin":"3.1.7"},"_npmOperationalInternal":{"tmp":"tmp/vendure-product-feed-plugin_0.0.2_1743285163614_0.36464240767770084","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@codibri/vendure-product-feed-plugin","version":"0.0.3","author":{"name":"Toon Janssens","email":"toon@codibri.be"},"license":"MIT","_id":"@codibri/vendure-product-feed-plugin@0.0.3","maintainers":[{"name":"toonjanssens","email":"toon@codibri.be"}],"homepage":"https://github.com/Codibri-BV/vendure-product-feed-plugin#readme","bugs":{"url":"https://github.com/Codibri-BV/vendure-product-feed-plugin/issues"},"dist":{"shasum":"b1d6549a5eb88122651cf3a8686352d7b1627511","tarball":"https://registry.npmjs.org/@codibri/vendure-product-feed-plugin/-/vendure-product-feed-plugin-0.0.3.tgz","fileCount":31,"integrity":"sha512-EfwfTlmbxE8LGCjWQviPzzT5Txx/wuN7HpZzUTze/V8IO9gLynCg1NVtVTYTir7seV8qTCDtjJejgOGMtmJJCg==","signatures":[{"sig":"MEYCIQCPJz7jH0bBf1/H6I8EeXjOZMCFhqF2fIBB+Fay71avFAIhAO1HJswrP2gLwMsHO5PHcXJrcYvcuLB9Yhnl8y7qM/Pc","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":51046},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.20.7"},"gitHead":"f88575363fb65f99c42a7969ad92b2d97880894f","private":false,"scripts":{"lint":"tsc --noEmit","test":"jest --preset=\"ts-jest\"","build":"tsc && cp -r src/ui dist","start":"yarn ts-node test/dev-server.ts","release":"yarn build && changeset publish"},"_npmUser":{"name":"toonjanssens","email":"toon@codibri.be"},"repository":{"url":"git+https://github.com/Codibri-BV/vendure-product-feed-plugin.git","type":"git"},"_npmVersion":"10.8.2","description":"Vendure plugin to create product feed","directories":{},"_nodeVersion":"18.20.7","dependencies":{"express":"^4.21.2","mime-types":"^3.0.1","xmlbuilder2":"^3.1.1","ssh2-sftp-client":"^12.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"29.4.3","ts-jest":"29.0.5","ts-node":"10.9.1","typescript":"5.4.5","@types/jest":"29.4.0","@types/node":"^22.13.14","@vendure/core":"3.1.7","@changesets/cli":"^2.28.1","@vendure/testing":"3.1.7","@vendure/ui-devkit":"3.1.7","@types/ssh2-sftp-client":"^9.0.3","@micham/sftp-mock-server":"^0.0.6","@vendure/admin-ui-plugin":"3.1.7","@vendure/asset-server-plugin":"3.1.7"},"_npmOperationalInternal":{"tmp":"tmp/vendure-product-feed-plugin_0.0.3_1743286797993_0.00015464673515408478","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@codibri/vendure-product-feed-plugin","version":"0.0.4","description":"Vendure plugin to create product feed","author":{"name":"Toon Janssens","email":"toon@codibri.be"},"repository":{"type":"git","url":"git+https://github.com/Codibri-BV/vendure-product-feed-plugin.git"},"license":"MIT","private":false,"engines":{"node":">=18.20.7"},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"start":"yarn ts-node test/dev-server.ts","test":"jest --preset=\"ts-jest\"","build":"tsc && cp -r src/ui dist","release":"yarn build && changeset publish","lint":"tsc --noEmit"},"dependencies":{"express":"^4.21.2","mime-types":"^3.0.1","ssh2-sftp-client":"^12.0.0","xmlbuilder2":"^3.1.1"},"devDependencies":{"@changesets/cli":"^2.28.1","@micham/sftp-mock-server":"^0.0.6","@types/jest":"29.4.0","@types/node":"^22.13.14","@types/ssh2-sftp-client":"^9.0.3","@vendure/admin-ui-plugin":"3.1.7","@vendure/asset-server-plugin":"3.1.7","@vendure/core":"3.1.7","@vendure/testing":"3.1.7","@vendure/ui-devkit":"3.1.7","jest":"29.4.3","ts-jest":"29.0.5","ts-node":"10.9.1","typescript":"5.4.5"},"_id":"@codibri/vendure-product-feed-plugin@0.0.4","gitHead":"65dc11fffdb5a96734aaa80895d454f4afd385cc","bugs":{"url":"https://github.com/Codibri-BV/vendure-product-feed-plugin/issues"},"homepage":"https://github.com/Codibri-BV/vendure-product-feed-plugin#readme","_nodeVersion":"18.20.7","_npmVersion":"10.8.2","dist":{"integrity":"sha512-/7B4ZmrV9pjnYNudiRNtXHSBobJUp0lUVNiNpt3NIKEt/++MOUKBjei/5XlfmVIMzfKH149jCZxZ9opgzuOtUQ==","shasum":"34b7d5a3743443d39836b9e5fd4cad27a233433e","tarball":"https://registry.npmjs.org/@codibri/vendure-product-feed-plugin/-/vendure-product-feed-plugin-0.0.4.tgz","fileCount":31,"unpackedSize":51555,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDxV2je1wCu9UkUEiZk0CKwT2si1+AOsK0QnKzg+jNcSAiAZUu/TcFCdFHMakNaY7Dr9FW6ppuQnna4BvwttHaj6Ww=="}]},"_npmUser":{"name":"toonjanssens","email":"toon@codibri.be"},"directories":{},"maintainers":[{"name":"toonjanssens","email":"toon@codibri.be"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/vendure-product-feed-plugin_0.0.4_1744833777260_0.20558918365054124"},"_hasShrinkwrap":false}},"time":{"created":"2025-03-23T13:39:55.899Z","modified":"2025-04-16T20:02:57.633Z","0.0.1":"2025-03-23T13:39:56.269Z","0.0.2":"2025-03-29T21:52:43.815Z","0.0.3":"2025-03-29T22:19:58.201Z","0.0.4":"2025-04-16T20:02:57.451Z"},"bugs":{"url":"https://github.com/Codibri-BV/vendure-product-feed-plugin/issues"},"author":{"name":"Toon Janssens","email":"toon@codibri.be"},"license":"MIT","homepage":"https://github.com/Codibri-BV/vendure-product-feed-plugin#readme","repository":{"type":"git","url":"git+https://github.com/Codibri-BV/vendure-product-feed-plugin.git"},"description":"Vendure plugin to create product feed","maintainers":[{"name":"toonjanssens","email":"toon@codibri.be"}],"readme":"# Vendure product feed plugin\n\nThis plugin generates an product feed of all products. This file can be exposed on an endpoint or uploaded to an SFTP server.\n\nWhen a product or variant is changed, the channel will be marked as changed.\nOn the product overview page is a button to trigger the rebuild of the feed output.\nOr configure a cron that runs every night and rebuilds all the channels that are marked as changed.\n\n## Requirements\n\nInstall the Product feed plugin:\n\n```yarn add @codibri/vendure-product-feed-plugin```\nor\n```npm install @codibri/vendure-product-feed-plugin```\n\n## Setup\n\n1. Add the plugin to your VendureConfig plugins array and add `ProductFeedPlugin.ui` to the AdminUi plugin\n\n```typescript\nimport { ProductFeedPlugin, GoogleProductFeedStrategy } from \"@codibri/vendure-product-feed-plugin\";\n\n// ...\n\nplugins: [\n  AdminUiPlugin.init({\n    port: 3002,\n    route: \"admin\",\n    app: compileUiExtensions({\n      outputPath: path.join(__dirname, \"../admin-ui\"),\n      extensions: [ProductFeedPlugin.ui],\n      devMode: true,\n    }),\n  }),\n  ProductFeedPlugin.init({\n    assetUrlPrefix: \"https://<vendure-server>/assets\",\n    productUrl: (shopUrl, variant) => `${shopUrl}/product/${variant.product.slug}`,\n    folder: \"custom-product-feed\",\n    feedStrategy: {\n      getFileName: (channel) => `google-${channel.code}`,\n      strategy: GoogleProductFeedStrategy,\n    },\n  }),\n];\n```\n\n## Plugin options\n\n### Options\n\n| key            | required | default value   | description                                   |\n| -------------- | -------- | --------------- | --------------------------------------------- |\n| assetUrlPrefix | yes      |                 | The url to access the Vendure server          |\n| feedStrategy   | yes      |                 | Feed strategy config                          |\n| productUrl     | no       |                 | Function that returns the url for a variant.  |\n| folder         | no       | product-catalog | The folder in assets where the feed is stored |\n\n### Feed strategy config\n\n| key         | required | default value | description                        |\n| ----------- | -------- | ------------- | ---------------------------------- |\n| getFileName | yes      |               | Function that returns the filename |\n| strategy    | yes      |               | Prouct feed strategy               |\n\n## Config\n\nIn the Admin UI you can configure each channel individually.\nGo to the channel config in the Admin UI and fill in the Shop URL, Output and the SFTP fields in case you selected SFTP in the output.\n\n| Field           | Description                                                                                                                                                                                                                                |\n| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| Shop URL        | The url of the shop front end.                                                                                                                                                                                                             |\n| Product catalog | <ul><li>**Disabled**: No product feed will be generated for this channel</li><li></li>**URL**: The XML file will be build and availble via an url<li>**SFTP**: The XML file will be build and uploaded to configured SFTP server</li></ul> |\n| SFTP server     | Only when **SFTP** is selected as output                                                                                                                                                                                                   |\n| SFTP port       | Only when **SFTP** is selected as output. Must be between 1 and 65535                                                                                                                                                                      |\n| SFTP user       | Only when **SFTP** is selected as output                                                                                                                                                                                                   |\n| SFTP password   | Only when **SFTP** is selected as output                                                                                                                                                                                                   |\n\n## Strategies\n\nAt the moment we only provide one output strategy. You can create your own by extending `ProductFeedStrategy`.\n\n### Google product feed\n\nBuild an XML to upload your products to Google Merchant Center.\n\n## API endpoint\n\nWhen **URL** is selected in the channel config, the generated XML is available via the `/feed` endpoint on the server.\n\nIf you have multiple channel, you can provide the channel token in the header or as query parameter.\n`/feed?token=<channelToken>`\n\n## Building the feed\n\n### Run mannually\n\nOn the products overview page in the Admin UI you will find a new button \"Rebuild product catalog\" to trigger the build of the product catalog feed of the current selected channel.\n\nAn extra permission `ProductCatalogFeedRebuild` is added to control who can accees the manual trigger button on the products page.\nIf no product feed is configured for the channel, the button will not be visible.\n\n### Run automatically\n\nCreate a script to check all channels that needs to be rebuild. Use a job runner or cron job to run this script.\n\n```typescript\n// product-catalog-feed.ts\n\nimport { bootstrap } from \"@vendure/core\";\nimport { ProductCatalogFeedService } from \"@codibri/vendure-plugin-product-catalog-feed\";\nimport { config } from \"./vendure-config\";\n\nbootstrap(config)\n  .then((app) => app.get(ProductCatalogFeedService).buildAllFeeds())\n  .catch((err) => {\n    console.log(err);\n  });\n```\n","readmeFilename":"README.md"}