@ecomweb/cli 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +119 -2
- package/dist/base-command.d.ts +4 -3
- package/dist/base-command.js +20 -14
- package/dist/base-command.js.map +1 -1
- package/dist/commands/analytics/ga4/all.d.ts +1 -1
- package/dist/commands/analytics/ga4/all.js +2 -2
- package/dist/commands/analytics/ga4/all.js.map +1 -1
- package/dist/commands/analytics/ga4/overview.d.ts +1 -1
- package/dist/commands/analytics/ga4/overview.js +2 -2
- package/dist/commands/analytics/ga4/overview.js.map +1 -1
- package/dist/commands/analytics/ga4/sessions-by-channel.d.ts +1 -1
- package/dist/commands/analytics/ga4/sessions-by-channel.js +2 -2
- package/dist/commands/analytics/ga4/sessions-by-channel.js.map +1 -1
- package/dist/commands/analytics/ga4/trends.d.ts +1 -1
- package/dist/commands/analytics/ga4/trends.js +2 -2
- package/dist/commands/analytics/ga4/trends.js.map +1 -1
- package/dist/commands/analytics/ga4/users-by-country.d.ts +1 -1
- package/dist/commands/analytics/ga4/users-by-country.js +2 -2
- package/dist/commands/analytics/ga4/users-by-country.js.map +1 -1
- package/dist/commands/analytics/ga4/views-by-page.d.ts +1 -1
- package/dist/commands/analytics/ga4/views-by-page.js +2 -2
- package/dist/commands/analytics/ga4/views-by-page.js.map +1 -1
- package/dist/commands/analytics/gsc/all.d.ts +1 -1
- package/dist/commands/analytics/gsc/all.js +2 -2
- package/dist/commands/analytics/gsc/all.js.map +1 -1
- package/dist/commands/analytics/gsc/search-console.d.ts +1 -1
- package/dist/commands/analytics/gsc/search-console.js +2 -2
- package/dist/commands/analytics/gsc/search-console.js.map +1 -1
- package/dist/commands/analytics/sales/all.d.ts +1 -1
- package/dist/commands/analytics/sales/all.js +2 -2
- package/dist/commands/analytics/sales/all.js.map +1 -1
- package/dist/commands/analytics/sales/summary.d.ts +1 -1
- package/dist/commands/analytics/sales/summary.js +2 -2
- package/dist/commands/analytics/sales/summary.js.map +1 -1
- package/dist/commands/analytics/sales/time-series.d.ts +1 -1
- package/dist/commands/analytics/sales/time-series.js +2 -2
- package/dist/commands/analytics/sales/time-series.js.map +1 -1
- package/dist/commands/assets/bulk-delete.d.ts +1 -1
- package/dist/commands/assets/bulk-delete.js +3 -3
- package/dist/commands/assets/bulk-delete.js.map +1 -1
- package/dist/commands/assets/delete.d.ts +1 -1
- package/dist/commands/assets/delete.js +3 -3
- package/dist/commands/assets/delete.js.map +1 -1
- package/dist/commands/assets/get-by-entity.d.ts +1 -1
- package/dist/commands/assets/get-by-entity.js +2 -2
- package/dist/commands/assets/get-by-entity.js.map +1 -1
- package/dist/commands/assets/get.d.ts +1 -1
- package/dist/commands/assets/get.js +2 -2
- package/dist/commands/assets/get.js.map +1 -1
- package/dist/commands/assets/link.d.ts +1 -1
- package/dist/commands/assets/link.js +3 -3
- package/dist/commands/assets/link.js.map +1 -1
- package/dist/commands/assets/list.d.ts +1 -1
- package/dist/commands/assets/list.js +2 -2
- package/dist/commands/assets/list.js.map +1 -1
- package/dist/commands/assets/replace.d.ts +1 -1
- package/dist/commands/assets/replace.js +3 -3
- package/dist/commands/assets/replace.js.map +1 -1
- package/dist/commands/assets/unlink.d.ts +1 -1
- package/dist/commands/assets/unlink.js +3 -3
- package/dist/commands/assets/unlink.js.map +1 -1
- package/dist/commands/assets/update.d.ts +1 -1
- package/dist/commands/assets/update.js +3 -3
- package/dist/commands/assets/update.js.map +1 -1
- package/dist/commands/assets/upload-and-link.d.ts +1 -1
- package/dist/commands/assets/upload-and-link.js +3 -3
- package/dist/commands/assets/upload-and-link.js.map +1 -1
- package/dist/commands/assets/upload-video.d.ts +1 -1
- package/dist/commands/assets/upload-video.js +3 -3
- package/dist/commands/assets/upload-video.js.map +1 -1
- package/dist/commands/assets/upload.d.ts +1 -1
- package/dist/commands/assets/upload.js +3 -3
- package/dist/commands/assets/upload.js.map +1 -1
- package/dist/commands/attributes/create.d.ts +21 -0
- package/dist/commands/attributes/create.js +37 -0
- package/dist/commands/attributes/create.js.map +1 -0
- package/dist/commands/{shipping-programs → attributes}/delete.d.ts +3 -2
- package/dist/commands/attributes/delete.js +45 -0
- package/dist/commands/attributes/delete.js.map +1 -0
- package/dist/commands/attributes/list.d.ts +20 -0
- package/dist/commands/attributes/list.js +36 -0
- package/dist/commands/attributes/list.js.map +1 -0
- package/dist/commands/{shipping-methods → attributes}/update.d.ts +4 -7
- package/dist/commands/attributes/update.js +41 -0
- package/dist/commands/attributes/update.js.map +1 -0
- package/dist/commands/attributes/values/create.d.ts +28 -0
- package/dist/commands/attributes/values/create.js +45 -0
- package/dist/commands/attributes/values/create.js.map +1 -0
- package/dist/commands/{shipping-programs/get-rule.d.ts → attributes/values/delete.d.ts} +6 -5
- package/dist/commands/attributes/values/delete.js +48 -0
- package/dist/commands/attributes/values/delete.js.map +1 -0
- package/dist/commands/attributes/values/list.d.ts +24 -0
- package/dist/commands/attributes/values/list.js +29 -0
- package/dist/commands/attributes/values/list.js.map +1 -0
- package/dist/commands/{shipping-programs/calculate.d.ts → attributes/values/update.d.ts} +18 -11
- package/dist/commands/attributes/values/update.js +50 -0
- package/dist/commands/attributes/values/update.js.map +1 -0
- package/dist/commands/auth/login.d.ts +5 -1
- package/dist/commands/auth/login.js +61 -3
- package/dist/commands/auth/login.js.map +1 -1
- package/dist/commands/auth/logout.d.ts +1 -1
- package/dist/commands/auth/profiles/delete.d.ts +1 -1
- package/dist/commands/auth/profiles/list.d.ts +1 -1
- package/dist/commands/auth/profiles/list.js +1 -1
- package/dist/commands/auth/profiles/list.js.map +1 -1
- package/dist/commands/auth/profiles/use.d.ts +1 -1
- package/dist/commands/auth/register.d.ts +1 -1
- package/dist/commands/auth/status.d.ts +1 -1
- package/dist/commands/auth/status.js +2 -2
- package/dist/commands/auth/status.js.map +1 -1
- package/dist/commands/auth/verify.d.ts +1 -1
- package/dist/commands/banners/create.d.ts +1 -1
- package/dist/commands/banners/create.js +3 -3
- package/dist/commands/banners/create.js.map +1 -1
- package/dist/commands/banners/delete.d.ts +1 -1
- package/dist/commands/banners/delete.js +3 -3
- package/dist/commands/banners/delete.js.map +1 -1
- package/dist/commands/banners/get.d.ts +1 -1
- package/dist/commands/banners/get.js +2 -2
- package/dist/commands/banners/get.js.map +1 -1
- package/dist/commands/banners/list.d.ts +1 -1
- package/dist/commands/banners/list.js +2 -2
- package/dist/commands/banners/list.js.map +1 -1
- package/dist/commands/banners/update.d.ts +1 -1
- package/dist/commands/banners/update.js +3 -3
- package/dist/commands/banners/update.js.map +1 -1
- package/dist/commands/blog-categories/all.d.ts +1 -1
- package/dist/commands/blog-categories/all.js +2 -2
- package/dist/commands/blog-categories/all.js.map +1 -1
- package/dist/commands/blog-categories/create.d.ts +1 -1
- package/dist/commands/blog-categories/create.js +3 -4
- package/dist/commands/blog-categories/create.js.map +1 -1
- package/dist/commands/blog-categories/delete.d.ts +1 -1
- package/dist/commands/blog-categories/delete.js +3 -3
- package/dist/commands/blog-categories/delete.js.map +1 -1
- package/dist/commands/blog-categories/list.d.ts +1 -1
- package/dist/commands/blog-categories/list.js +2 -2
- package/dist/commands/blog-categories/list.js.map +1 -1
- package/dist/commands/blog-categories/update.d.ts +1 -1
- package/dist/commands/blog-categories/update.js +3 -3
- package/dist/commands/blog-categories/update.js.map +1 -1
- package/dist/commands/blog-posts/all.d.ts +1 -1
- package/dist/commands/blog-posts/all.js +2 -2
- package/dist/commands/blog-posts/all.js.map +1 -1
- package/dist/commands/blog-posts/batch-create.d.ts +1 -1
- package/dist/commands/blog-posts/batch-create.js +3 -3
- package/dist/commands/blog-posts/batch-create.js.map +1 -1
- package/dist/commands/blog-posts/batch-delete.d.ts +1 -1
- package/dist/commands/blog-posts/batch-delete.js +2 -2
- package/dist/commands/blog-posts/batch-delete.js.map +1 -1
- package/dist/commands/blog-posts/batch-update.d.ts +1 -1
- package/dist/commands/blog-posts/batch-update.js +3 -3
- package/dist/commands/blog-posts/batch-update.js.map +1 -1
- package/dist/commands/blog-posts/create.d.ts +1 -1
- package/dist/commands/blog-posts/create.js +3 -4
- package/dist/commands/blog-posts/create.js.map +1 -1
- package/dist/commands/blog-posts/delete.d.ts +1 -1
- package/dist/commands/blog-posts/delete.js +3 -3
- package/dist/commands/blog-posts/delete.js.map +1 -1
- package/dist/commands/blog-posts/get.d.ts +1 -1
- package/dist/commands/blog-posts/get.js +2 -2
- package/dist/commands/blog-posts/get.js.map +1 -1
- package/dist/commands/blog-posts/import.d.ts +1 -1
- package/dist/commands/blog-posts/import.js +3 -3
- package/dist/commands/blog-posts/import.js.map +1 -1
- package/dist/commands/blog-posts/list.d.ts +1 -1
- package/dist/commands/blog-posts/list.js +2 -2
- package/dist/commands/blog-posts/list.js.map +1 -1
- package/dist/commands/blog-posts/stats.d.ts +1 -1
- package/dist/commands/blog-posts/stats.js +2 -2
- package/dist/commands/blog-posts/stats.js.map +1 -1
- package/dist/commands/blog-posts/update.d.ts +1 -1
- package/dist/commands/blog-posts/update.js +3 -3
- package/dist/commands/blog-posts/update.js.map +1 -1
- package/dist/commands/blog-settings/get.d.ts +1 -1
- package/dist/commands/blog-settings/get.js +2 -2
- package/dist/commands/blog-settings/get.js.map +1 -1
- package/dist/commands/blog-settings/update.d.ts +1 -1
- package/dist/commands/blog-settings/update.js +3 -3
- package/dist/commands/blog-settings/update.js.map +1 -1
- package/dist/commands/blog-tags/all.d.ts +1 -1
- package/dist/commands/blog-tags/all.js +2 -2
- package/dist/commands/blog-tags/all.js.map +1 -1
- package/dist/commands/blog-tags/create.d.ts +1 -1
- package/dist/commands/blog-tags/create.js +3 -4
- package/dist/commands/blog-tags/create.js.map +1 -1
- package/dist/commands/blog-tags/delete.d.ts +1 -1
- package/dist/commands/blog-tags/delete.js +3 -3
- package/dist/commands/blog-tags/delete.js.map +1 -1
- package/dist/commands/blog-tags/list.d.ts +1 -1
- package/dist/commands/blog-tags/list.js +2 -2
- package/dist/commands/blog-tags/list.js.map +1 -1
- package/dist/commands/categories/all.d.ts +1 -1
- package/dist/commands/categories/all.js +2 -2
- package/dist/commands/categories/all.js.map +1 -1
- package/dist/commands/categories/create.d.ts +1 -1
- package/dist/commands/categories/create.js +3 -3
- package/dist/commands/categories/create.js.map +1 -1
- package/dist/commands/categories/delete.d.ts +1 -1
- package/dist/commands/categories/delete.js +3 -3
- package/dist/commands/categories/delete.js.map +1 -1
- package/dist/commands/categories/get.d.ts +1 -1
- package/dist/commands/categories/get.js +2 -2
- package/dist/commands/categories/get.js.map +1 -1
- package/dist/commands/categories/list.d.ts +1 -1
- package/dist/commands/categories/list.js +2 -2
- package/dist/commands/categories/list.js.map +1 -1
- package/dist/commands/categories/update.d.ts +1 -1
- package/dist/commands/categories/update.js +3 -3
- package/dist/commands/categories/update.js.map +1 -1
- package/dist/commands/collections/all.d.ts +1 -1
- package/dist/commands/collections/all.js +2 -2
- package/dist/commands/collections/all.js.map +1 -1
- package/dist/commands/collections/create.d.ts +1 -1
- package/dist/commands/collections/create.js +3 -3
- package/dist/commands/collections/create.js.map +1 -1
- package/dist/commands/collections/delete.d.ts +1 -1
- package/dist/commands/collections/delete.js +3 -3
- package/dist/commands/collections/delete.js.map +1 -1
- package/dist/commands/collections/get.d.ts +1 -1
- package/dist/commands/collections/get.js +2 -2
- package/dist/commands/collections/get.js.map +1 -1
- package/dist/commands/collections/list.d.ts +1 -1
- package/dist/commands/collections/list.js +2 -2
- package/dist/commands/collections/list.js.map +1 -1
- package/dist/commands/collections/update.d.ts +1 -1
- package/dist/commands/collections/update.js +3 -3
- package/dist/commands/collections/update.js.map +1 -1
- package/dist/commands/customers/addresses.d.ts +5 -2
- package/dist/commands/customers/addresses.js +8 -7
- package/dist/commands/customers/addresses.js.map +1 -1
- package/dist/commands/customers/create.d.ts +1 -1
- package/dist/commands/customers/create.js +4 -5
- package/dist/commands/customers/create.js.map +1 -1
- package/dist/commands/customers/delete.d.ts +1 -1
- package/dist/commands/customers/delete.js +3 -3
- package/dist/commands/customers/delete.js.map +1 -1
- package/dist/commands/customers/get.d.ts +5 -2
- package/dist/commands/customers/get.js +9 -7
- package/dist/commands/customers/get.js.map +1 -1
- package/dist/commands/{shipping-methods/get.d.ts → customers/insights.d.ts} +2 -2
- package/dist/commands/customers/insights.js +30 -0
- package/dist/commands/customers/insights.js.map +1 -0
- package/dist/commands/customers/list.d.ts +1 -1
- package/dist/commands/customers/list.js +3 -3
- package/dist/commands/customers/list.js.map +1 -1
- package/dist/commands/customers/stats.d.ts +1 -1
- package/dist/commands/customers/stats.js +2 -2
- package/dist/commands/customers/stats.js.map +1 -1
- package/dist/commands/customers/timeline.d.ts +26 -0
- package/dist/commands/customers/timeline.js +66 -0
- package/dist/commands/customers/timeline.js.map +1 -0
- package/dist/commands/customers/update.d.ts +1 -1
- package/dist/commands/customers/update.js +4 -4
- package/dist/commands/customers/update.js.map +1 -1
- package/dist/commands/deploy.d.ts +22 -0
- package/dist/commands/deploy.js +72 -0
- package/dist/commands/deploy.js.map +1 -0
- package/dist/commands/{shipping-zones/location-data.d.ts → deployments/index.d.ts} +2 -2
- package/dist/commands/deployments/index.js +17 -0
- package/dist/commands/deployments/index.js.map +1 -0
- package/dist/commands/deployments/promote.d.ts +22 -0
- package/dist/commands/deployments/promote.js +39 -0
- package/dist/commands/deployments/promote.js.map +1 -0
- package/dist/commands/deployments/rollback.d.ts +5 -0
- package/dist/commands/deployments/rollback.js +12 -0
- package/dist/commands/deployments/rollback.js.map +1 -0
- package/dist/commands/deployments/unpublish.d.ts +18 -0
- package/dist/commands/deployments/unpublish.js +21 -0
- package/dist/commands/deployments/unpublish.js.map +1 -0
- package/dist/commands/describe.d.ts +1 -1
- package/dist/commands/env/index.d.ts +18 -0
- package/dist/commands/env/index.js +17 -0
- package/dist/commands/env/index.js.map +1 -0
- package/dist/commands/env/set.d.ts +23 -0
- package/dist/commands/env/set.js +44 -0
- package/dist/commands/env/set.js.map +1 -0
- package/dist/commands/env/unset.d.ts +21 -0
- package/dist/commands/env/unset.js +26 -0
- package/dist/commands/env/unset.js.map +1 -0
- package/dist/commands/health/check.d.ts +1 -1
- package/dist/commands/init.d.ts +1 -1
- package/dist/commands/init.js +3 -3
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/logs.d.ts +21 -0
- package/dist/commands/logs.js +23 -0
- package/dist/commands/logs.js.map +1 -0
- package/dist/commands/orders/batch-cancel.d.ts +1 -1
- package/dist/commands/orders/batch-cancel.js +2 -2
- package/dist/commands/orders/batch-cancel.js.map +1 -1
- package/dist/commands/orders/batch-fulfill.d.ts +1 -1
- package/dist/commands/orders/batch-fulfill.js +2 -2
- package/dist/commands/orders/batch-fulfill.js.map +1 -1
- package/dist/commands/orders/batch-update.d.ts +1 -1
- package/dist/commands/orders/batch-update.js +3 -3
- package/dist/commands/orders/batch-update.js.map +1 -1
- package/dist/commands/orders/cancel.d.ts +1 -1
- package/dist/commands/orders/cancel.js +3 -3
- package/dist/commands/orders/cancel.js.map +1 -1
- package/dist/commands/orders/create.d.ts +1 -1
- package/dist/commands/orders/create.js +4 -5
- package/dist/commands/orders/create.js.map +1 -1
- package/dist/commands/orders/deliver.d.ts +1 -1
- package/dist/commands/orders/deliver.js +3 -3
- package/dist/commands/orders/deliver.js.map +1 -1
- package/dist/commands/orders/fulfill.d.ts +1 -1
- package/dist/commands/orders/fulfill.js +3 -3
- package/dist/commands/orders/fulfill.js.map +1 -1
- package/dist/commands/orders/get.d.ts +1 -1
- package/dist/commands/orders/get.js +2 -2
- package/dist/commands/orders/get.js.map +1 -1
- package/dist/commands/orders/list.d.ts +1 -1
- package/dist/commands/orders/list.js +2 -2
- package/dist/commands/orders/list.js.map +1 -1
- package/dist/commands/orders/resume.d.ts +1 -1
- package/dist/commands/orders/resume.js +3 -3
- package/dist/commands/orders/resume.js.map +1 -1
- package/dist/commands/orders/ship.d.ts +1 -1
- package/dist/commands/orders/ship.js +3 -3
- package/dist/commands/orders/ship.js.map +1 -1
- package/dist/commands/orders/stats.d.ts +1 -1
- package/dist/commands/orders/stats.js +2 -2
- package/dist/commands/orders/stats.js.map +1 -1
- package/dist/commands/orders/transitions.d.ts +1 -1
- package/dist/commands/orders/transitions.js +2 -2
- package/dist/commands/orders/transitions.js.map +1 -1
- package/dist/commands/orders/update.d.ts +1 -1
- package/dist/commands/orders/update.js +3 -3
- package/dist/commands/orders/update.js.map +1 -1
- package/dist/commands/{shipping-methods → product-tags}/create.d.ts +2 -5
- package/dist/commands/product-tags/create.js +52 -0
- package/dist/commands/product-tags/create.js.map +1 -0
- package/dist/commands/product-tags/delete.d.ts +21 -0
- package/dist/commands/product-tags/delete.js +35 -0
- package/dist/commands/product-tags/delete.js.map +1 -0
- package/dist/commands/product-tags/list.d.ts +18 -0
- package/dist/commands/product-tags/list.js +27 -0
- package/dist/commands/product-tags/list.js.map +1 -0
- package/dist/commands/product-tags/merge.d.ts +22 -0
- package/dist/commands/product-tags/merge.js +45 -0
- package/dist/commands/product-tags/merge.js.map +1 -0
- package/dist/commands/product-tags/rename.d.ts +22 -0
- package/dist/commands/product-tags/rename.js +36 -0
- package/dist/commands/product-tags/rename.js.map +1 -0
- package/dist/commands/products/all.d.ts +1 -1
- package/dist/commands/products/all.js +2 -2
- package/dist/commands/products/all.js.map +1 -1
- package/dist/commands/products/batch-create.d.ts +1 -1
- package/dist/commands/products/batch-create.js +3 -3
- package/dist/commands/products/batch-create.js.map +1 -1
- package/dist/commands/products/batch-delete.d.ts +1 -1
- package/dist/commands/products/batch-delete.js +2 -2
- package/dist/commands/products/batch-delete.js.map +1 -1
- package/dist/commands/products/batch-update.d.ts +1 -1
- package/dist/commands/products/batch-update.js +3 -3
- package/dist/commands/products/batch-update.js.map +1 -1
- package/dist/commands/products/create.d.ts +1 -1
- package/dist/commands/products/create.js +3 -4
- package/dist/commands/products/create.js.map +1 -1
- package/dist/commands/products/delete.d.ts +1 -1
- package/dist/commands/products/delete.js +3 -3
- package/dist/commands/products/delete.js.map +1 -1
- package/dist/commands/products/get.d.ts +1 -1
- package/dist/commands/products/get.js +2 -2
- package/dist/commands/products/get.js.map +1 -1
- package/dist/commands/products/list.d.ts +2 -2
- package/dist/commands/products/list.js +9 -5
- package/dist/commands/products/list.js.map +1 -1
- package/dist/commands/products/search.d.ts +2 -2
- package/dist/commands/products/search.js +11 -6
- package/dist/commands/products/search.js.map +1 -1
- package/dist/commands/products/stats.d.ts +1 -1
- package/dist/commands/products/stats.js +2 -2
- package/dist/commands/products/stats.js.map +1 -1
- package/dist/commands/products/update.d.ts +1 -1
- package/dist/commands/products/update.js +3 -3
- package/dist/commands/products/update.js.map +1 -1
- package/dist/commands/products/variant-options.d.ts +1 -1
- package/dist/commands/products/variant-options.js +12 -10
- package/dist/commands/products/variant-options.js.map +1 -1
- package/dist/commands/promotions/batch-delete.d.ts +1 -1
- package/dist/commands/promotions/batch-delete.js +2 -2
- package/dist/commands/promotions/batch-delete.js.map +1 -1
- package/dist/commands/promotions/create.d.ts +1 -1
- package/dist/commands/promotions/create.js +3 -4
- package/dist/commands/promotions/create.js.map +1 -1
- package/dist/commands/promotions/delete.d.ts +1 -1
- package/dist/commands/promotions/delete.js +3 -3
- package/dist/commands/promotions/delete.js.map +1 -1
- package/dist/commands/promotions/get-by-code.d.ts +1 -1
- package/dist/commands/promotions/get-by-code.js +2 -2
- package/dist/commands/promotions/get-by-code.js.map +1 -1
- package/dist/commands/promotions/get.d.ts +1 -1
- package/dist/commands/promotions/get.js +2 -2
- package/dist/commands/promotions/get.js.map +1 -1
- package/dist/commands/promotions/list.d.ts +1 -1
- package/dist/commands/promotions/list.js +2 -2
- package/dist/commands/promotions/list.js.map +1 -1
- package/dist/commands/promotions/stats.d.ts +1 -1
- package/dist/commands/promotions/stats.js +2 -2
- package/dist/commands/promotions/stats.js.map +1 -1
- package/dist/commands/promotions/update.d.ts +1 -1
- package/dist/commands/promotions/update.js +3 -3
- package/dist/commands/promotions/update.js.map +1 -1
- package/dist/commands/reviews/bulk-import.d.ts +1 -1
- package/dist/commands/reviews/bulk-import.js +3 -3
- package/dist/commands/reviews/bulk-import.js.map +1 -1
- package/dist/commands/reviews/bulk-moderate.d.ts +1 -1
- package/dist/commands/reviews/bulk-moderate.js +3 -3
- package/dist/commands/reviews/bulk-moderate.js.map +1 -1
- package/dist/commands/reviews/create.d.ts +1 -1
- package/dist/commands/reviews/create.js +3 -3
- package/dist/commands/reviews/create.js.map +1 -1
- package/dist/commands/reviews/delete-reply.d.ts +1 -1
- package/dist/commands/reviews/delete-reply.js +3 -3
- package/dist/commands/reviews/delete-reply.js.map +1 -1
- package/dist/commands/reviews/delete.d.ts +1 -1
- package/dist/commands/reviews/delete.js +3 -3
- package/dist/commands/reviews/delete.js.map +1 -1
- package/dist/commands/reviews/get.d.ts +1 -1
- package/dist/commands/reviews/get.js +2 -2
- package/dist/commands/reviews/get.js.map +1 -1
- package/dist/commands/reviews/list.d.ts +1 -1
- package/dist/commands/reviews/list.js +2 -2
- package/dist/commands/reviews/list.js.map +1 -1
- package/dist/commands/reviews/reply.d.ts +1 -1
- package/dist/commands/reviews/reply.js +3 -3
- package/dist/commands/reviews/reply.js.map +1 -1
- package/dist/commands/reviews/stats.d.ts +1 -1
- package/dist/commands/reviews/stats.js +2 -2
- package/dist/commands/reviews/stats.js.map +1 -1
- package/dist/commands/reviews/update-reply.d.ts +1 -1
- package/dist/commands/reviews/update-reply.js +3 -3
- package/dist/commands/reviews/update-reply.js.map +1 -1
- package/dist/commands/reviews/update.d.ts +1 -1
- package/dist/commands/reviews/update.js +3 -3
- package/dist/commands/reviews/update.js.map +1 -1
- package/dist/commands/setup.d.ts +1 -1
- package/dist/commands/setup.js +4 -4
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/shipping/locations.d.ts +20 -0
- package/dist/commands/shipping/locations.js +42 -0
- package/dist/commands/shipping/locations.js.map +1 -0
- package/dist/commands/{shipping-programs → shipping-rates}/create.d.ts +14 -9
- package/dist/commands/shipping-rates/create.js +89 -0
- package/dist/commands/shipping-rates/create.js.map +1 -0
- package/dist/commands/{shipping-methods → shipping-rates}/delete.d.ts +3 -2
- package/dist/commands/shipping-rates/delete.js +32 -0
- package/dist/commands/shipping-rates/delete.js.map +1 -0
- package/dist/commands/{shipping-programs → shipping-rates}/get.d.ts +3 -2
- package/dist/commands/shipping-rates/get.js +36 -0
- package/dist/commands/shipping-rates/get.js.map +1 -0
- package/dist/commands/{shipping-programs/delete-rule.d.ts → shipping-rates/list.d.ts} +5 -12
- package/dist/commands/shipping-rates/list.js +47 -0
- package/dist/commands/shipping-rates/list.js.map +1 -0
- package/dist/commands/{shipping-programs → shipping-rates}/update.d.ts +14 -9
- package/dist/commands/shipping-rates/update.js +94 -0
- package/dist/commands/shipping-rates/update.js.map +1 -0
- package/dist/commands/shipping-zones/create.d.ts +1 -1
- package/dist/commands/shipping-zones/create.js +4 -4
- package/dist/commands/shipping-zones/create.js.map +1 -1
- package/dist/commands/shipping-zones/delete.d.ts +1 -1
- package/dist/commands/shipping-zones/delete.js +4 -4
- package/dist/commands/shipping-zones/delete.js.map +1 -1
- package/dist/commands/shipping-zones/get.d.ts +1 -1
- package/dist/commands/shipping-zones/get.js +3 -3
- package/dist/commands/shipping-zones/get.js.map +1 -1
- package/dist/commands/shipping-zones/list.d.ts +2 -2
- package/dist/commands/shipping-zones/list.js +6 -6
- package/dist/commands/shipping-zones/list.js.map +1 -1
- package/dist/commands/shipping-zones/update.d.ts +1 -1
- package/dist/commands/shipping-zones/update.js +4 -4
- package/dist/commands/shipping-zones/update.js.map +1 -1
- package/dist/commands/skills/install.d.ts +20 -0
- package/dist/commands/skills/install.js +26 -0
- package/dist/commands/skills/install.js.map +1 -0
- package/dist/commands/store-menus/create.d.ts +1 -1
- package/dist/commands/store-menus/create.js +3 -4
- package/dist/commands/store-menus/create.js.map +1 -1
- package/dist/commands/store-menus/delete.d.ts +1 -1
- package/dist/commands/store-menus/delete.js +3 -3
- package/dist/commands/store-menus/delete.js.map +1 -1
- package/dist/commands/store-menus/get-by-ref.d.ts +1 -1
- package/dist/commands/store-menus/get-by-ref.js +2 -2
- package/dist/commands/store-menus/get-by-ref.js.map +1 -1
- package/dist/commands/store-menus/get.d.ts +1 -1
- package/dist/commands/store-menus/get.js +2 -2
- package/dist/commands/store-menus/get.js.map +1 -1
- package/dist/commands/store-menus/list.d.ts +1 -1
- package/dist/commands/store-menus/list.js +2 -2
- package/dist/commands/store-menus/list.js.map +1 -1
- package/dist/commands/store-menus/update.d.ts +1 -1
- package/dist/commands/store-menus/update.js +3 -3
- package/dist/commands/store-menus/update.js.map +1 -1
- package/dist/commands/store-pages/all.d.ts +1 -1
- package/dist/commands/store-pages/all.js +2 -2
- package/dist/commands/store-pages/all.js.map +1 -1
- package/dist/commands/store-pages/create.d.ts +1 -1
- package/dist/commands/store-pages/create.js +3 -4
- package/dist/commands/store-pages/create.js.map +1 -1
- package/dist/commands/store-pages/delete.d.ts +1 -1
- package/dist/commands/store-pages/delete.js +3 -3
- package/dist/commands/store-pages/delete.js.map +1 -1
- package/dist/commands/store-pages/duplicate.d.ts +1 -1
- package/dist/commands/store-pages/duplicate.js +3 -3
- package/dist/commands/store-pages/duplicate.js.map +1 -1
- package/dist/commands/store-pages/get.d.ts +1 -1
- package/dist/commands/store-pages/get.js +2 -2
- package/dist/commands/store-pages/get.js.map +1 -1
- package/dist/commands/store-pages/list.d.ts +1 -1
- package/dist/commands/store-pages/list.js +2 -2
- package/dist/commands/store-pages/list.js.map +1 -1
- package/dist/commands/store-pages/stats.d.ts +1 -1
- package/dist/commands/store-pages/stats.js +2 -2
- package/dist/commands/store-pages/stats.js.map +1 -1
- package/dist/commands/store-pages/update.d.ts +1 -1
- package/dist/commands/store-pages/update.js +3 -3
- package/dist/commands/store-pages/update.js.map +1 -1
- package/dist/commands/store-settings/get.d.ts +1 -1
- package/dist/commands/store-settings/get.js +2 -2
- package/dist/commands/store-settings/get.js.map +1 -1
- package/dist/commands/store-settings/update.d.ts +1 -1
- package/dist/commands/store-settings/update.js +3 -3
- package/dist/commands/store-settings/update.js.map +1 -1
- package/dist/commands/storefront/init.d.ts +43 -0
- package/dist/commands/storefront/init.js +137 -0
- package/dist/commands/storefront/init.js.map +1 -0
- package/dist/commands/storefront/key.d.ts +20 -0
- package/dist/commands/storefront/key.js +42 -0
- package/dist/commands/storefront/key.js.map +1 -0
- package/dist/commands/storefront/skill.d.ts +20 -0
- package/dist/commands/storefront/skill.js +54 -0
- package/dist/commands/storefront/skill.js.map +1 -0
- package/dist/commands/stores/current.d.ts +1 -1
- package/dist/commands/stores/current.js +5 -5
- package/dist/commands/stores/current.js.map +1 -1
- package/dist/commands/stores/info.d.ts +2 -5
- package/dist/commands/stores/info.js +4 -4
- package/dist/commands/stores/info.js.map +1 -1
- package/dist/commands/stores/list.d.ts +1 -1
- package/dist/commands/stores/switch.d.ts +2 -5
- package/dist/commands/stores/switch.js +8 -8
- package/dist/commands/stores/switch.js.map +1 -1
- package/dist/lib/api-client.d.ts +5 -3
- package/dist/lib/api-client.js +20 -6
- package/dist/lib/api-client.js.map +1 -1
- package/dist/lib/attribute-errors.d.ts +12 -0
- package/dist/lib/attribute-errors.js +20 -0
- package/dist/lib/attribute-errors.js.map +1 -0
- package/dist/lib/codex-skill.d.ts +9 -0
- package/dist/lib/codex-skill.js +70 -0
- package/dist/lib/codex-skill.js.map +1 -0
- package/dist/lib/config.d.ts +4 -4
- package/dist/lib/config.js +8 -8
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/deployments.d.ts +59 -0
- package/dist/lib/deployments.js +212 -0
- package/dist/lib/deployments.js.map +1 -0
- package/dist/lib/email-login.d.ts +28 -0
- package/dist/lib/email-login.js +69 -0
- package/dist/lib/email-login.js.map +1 -0
- package/dist/lib/env-vars.d.ts +16 -0
- package/dist/lib/env-vars.js +33 -0
- package/dist/lib/env-vars.js.map +1 -0
- package/dist/lib/errors.d.ts +3 -1
- package/dist/lib/errors.js +2 -0
- package/dist/lib/errors.js.map +1 -1
- package/dist/lib/github-flow.d.ts +7 -0
- package/dist/lib/github-flow.js +34 -0
- package/dist/lib/github-flow.js.map +1 -0
- package/dist/lib/output.d.ts +6 -6
- package/dist/lib/output.js +10 -10
- package/dist/lib/output.js.map +1 -1
- package/dist/lib/pack-prebuilt.d.ts +12 -0
- package/dist/lib/pack-prebuilt.js +138 -0
- package/dist/lib/pack-prebuilt.js.map +1 -0
- package/dist/lib/pack-source.d.ts +10 -0
- package/dist/lib/pack-source.js +119 -0
- package/dist/lib/pack-source.js.map +1 -0
- package/dist/lib/project-setup.d.ts +15 -0
- package/dist/lib/project-setup.js +65 -0
- package/dist/lib/project-setup.js.map +1 -0
- package/dist/lib/publishable-key.d.ts +18 -0
- package/dist/lib/publishable-key.js +10 -0
- package/dist/lib/publishable-key.js.map +1 -0
- package/dist/lib/skill-update.d.ts +11 -0
- package/dist/lib/skill-update.js +74 -0
- package/dist/lib/skill-update.js.map +1 -0
- package/dist/lib/sse.d.ts +5 -0
- package/dist/lib/sse.js +36 -0
- package/dist/lib/sse.js.map +1 -0
- package/dist/lib/template-download.d.ts +9 -0
- package/dist/lib/template-download.js +15 -0
- package/dist/lib/template-download.js.map +1 -0
- package/dist/lib/template-scaffold.d.ts +18 -0
- package/dist/lib/template-scaffold.js +91 -0
- package/dist/lib/template-scaffold.js.map +1 -0
- package/dist/lib/validators.js +48 -65
- package/dist/lib/validators.js.map +1 -1
- package/oclif.manifest.json +7321 -5958
- package/package.json +23 -12
- package/dist/commands/analytics/summary.js.map +0 -1
- package/dist/commands/analytics/time-series.js.map +0 -1
- package/dist/commands/blog-posts/generate.d.ts +0 -22
- package/dist/commands/blog-posts/generate.js +0 -42
- package/dist/commands/blog-posts/generate.js.map +0 -1
- package/dist/commands/blog-posts/search.d.ts +0 -27
- package/dist/commands/blog-posts/search.js +0 -55
- package/dist/commands/blog-posts/search.js.map +0 -1
- package/dist/commands/shipping-methods/create.js +0 -63
- package/dist/commands/shipping-methods/create.js.map +0 -1
- package/dist/commands/shipping-methods/delete.js +0 -30
- package/dist/commands/shipping-methods/delete.js.map +0 -1
- package/dist/commands/shipping-methods/get.js +0 -31
- package/dist/commands/shipping-methods/get.js.map +0 -1
- package/dist/commands/shipping-methods/list.d.ts +0 -26
- package/dist/commands/shipping-methods/list.js +0 -63
- package/dist/commands/shipping-methods/list.js.map +0 -1
- package/dist/commands/shipping-methods/update.js +0 -69
- package/dist/commands/shipping-methods/update.js.map +0 -1
- package/dist/commands/shipping-programs/calculate.js +0 -72
- package/dist/commands/shipping-programs/calculate.js.map +0 -1
- package/dist/commands/shipping-programs/create-rule.d.ts +0 -40
- package/dist/commands/shipping-programs/create-rule.js +0 -110
- package/dist/commands/shipping-programs/create-rule.js.map +0 -1
- package/dist/commands/shipping-programs/create.js +0 -75
- package/dist/commands/shipping-programs/create.js.map +0 -1
- package/dist/commands/shipping-programs/delete-rule.js +0 -42
- package/dist/commands/shipping-programs/delete-rule.js.map +0 -1
- package/dist/commands/shipping-programs/delete.js +0 -30
- package/dist/commands/shipping-programs/delete.js.map +0 -1
- package/dist/commands/shipping-programs/get-rule.js +0 -38
- package/dist/commands/shipping-programs/get-rule.js.map +0 -1
- package/dist/commands/shipping-programs/get.js +0 -32
- package/dist/commands/shipping-programs/get.js.map +0 -1
- package/dist/commands/shipping-programs/list-rules.d.ts +0 -34
- package/dist/commands/shipping-programs/list-rules.js +0 -86
- package/dist/commands/shipping-programs/list-rules.js.map +0 -1
- package/dist/commands/shipping-programs/list.d.ts +0 -30
- package/dist/commands/shipping-programs/list.js +0 -74
- package/dist/commands/shipping-programs/list.js.map +0 -1
- package/dist/commands/shipping-programs/update-rule.d.ts +0 -44
- package/dist/commands/shipping-programs/update-rule.js +0 -120
- package/dist/commands/shipping-programs/update-rule.js.map +0 -1
- package/dist/commands/shipping-programs/update.js +0 -81
- package/dist/commands/shipping-programs/update.js.map +0 -1
- package/dist/commands/shipping-zones/location-data.js +0 -25
- package/dist/commands/shipping-zones/location-data.js.map +0 -1
|
@@ -5,22 +5,22 @@ const base_command_1 = require("../../base-command");
|
|
|
5
5
|
class StoresInfo extends base_command_1.BaseCommand {
|
|
6
6
|
async run() {
|
|
7
7
|
const { args } = await this.parse(StoresInfo);
|
|
8
|
-
const store = await this.apiClient.getStore(args.
|
|
8
|
+
const store = await this.apiClient.getStore(args.ref);
|
|
9
9
|
this.outputResult({
|
|
10
10
|
resource: "stores",
|
|
11
11
|
action: "info",
|
|
12
12
|
data: store,
|
|
13
13
|
available_actions: ["switch"],
|
|
14
14
|
hints: {
|
|
15
|
-
switch: `ecomweb stores switch ${args.
|
|
15
|
+
switch: `ecomweb stores switch ${args.ref}`,
|
|
16
16
|
},
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
StoresInfo.description = "Show details for a specific store";
|
|
21
|
-
StoresInfo.examples = ["ecomweb stores info
|
|
21
|
+
StoresInfo.examples = ["ecomweb stores info abc123def456"];
|
|
22
22
|
StoresInfo.args = {
|
|
23
|
-
|
|
23
|
+
ref: core_1.Args.string({ description: "Store ref", required: true }),
|
|
24
24
|
};
|
|
25
25
|
StoresInfo.flags = {
|
|
26
26
|
...base_command_1.BaseCommand.baseFlags,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"info.js","sourceRoot":"","sources":["../../../src/commands/stores/info.ts"],"names":[],"mappings":";;AAAA,sCAAmC;AACnC,qDAAiD;AAEjD,MAAqB,UAAW,SAAQ,0BAAW;IAajD,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAC9C,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"info.js","sourceRoot":"","sources":["../../../src/commands/stores/info.ts"],"names":[],"mappings":";;AAAA,sCAAmC;AACnC,qDAAiD;AAEjD,MAAqB,UAAW,SAAQ,0BAAW;IAajD,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAC9C,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAEtD,IAAI,CAAC,YAAY,CAAC;YAChB,QAAQ,EAAE,QAAQ;YAClB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,KAAK;YACX,iBAAiB,EAAE,CAAC,QAAQ,CAAC;YAC7B,KAAK,EAAE;gBACL,MAAM,EAAE,yBAAyB,IAAI,CAAC,GAAG,EAAE;aAC5C;SACF,CAAC,CAAC;IACL,CAAC;;AAzBM,sBAAW,GAAG,mCAAmC,CAAC;AAElD,mBAAQ,GAAG,CAAC,kCAAkC,CAAC,CAAC;AAEhD,eAAI,GAAG;IACZ,GAAG,EAAE,WAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;CAC/D,CAAC;AAEK,gBAAK,GAAG;IACb,GAAG,0BAAW,CAAC,SAAS;CACzB,CAAC;kBAXiB,UAAU"}
|
|
@@ -3,7 +3,7 @@ export default class StoresList extends BaseCommand {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
"store-
|
|
6
|
+
"store-ref": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
7
|
"api-key": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
8
|
"api-url": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
9
|
output: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
@@ -3,13 +3,10 @@ export default class StoresSwitch extends BaseCommand {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static args: {
|
|
6
|
-
|
|
7
|
-
max?: number;
|
|
8
|
-
min?: number;
|
|
9
|
-
}>;
|
|
6
|
+
ref: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
10
7
|
};
|
|
11
8
|
static flags: {
|
|
12
|
-
"store-
|
|
9
|
+
"store-ref": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
10
|
"api-key": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
11
|
"api-url": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
12
|
output: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
@@ -5,30 +5,30 @@ const base_command_1 = require("../../base-command");
|
|
|
5
5
|
class StoresSwitch extends base_command_1.BaseCommand {
|
|
6
6
|
async run() {
|
|
7
7
|
const { args } = await this.parse(StoresSwitch);
|
|
8
|
-
const
|
|
8
|
+
const storeRef = args.ref;
|
|
9
9
|
let storeName;
|
|
10
10
|
try {
|
|
11
|
-
const store = await this.apiClient.getStore(
|
|
11
|
+
const store = await this.apiClient.getStore(storeRef);
|
|
12
12
|
storeName = store.name || store.store_name;
|
|
13
13
|
}
|
|
14
14
|
catch {
|
|
15
15
|
}
|
|
16
|
-
this.configManager.
|
|
16
|
+
this.configManager.setStoreRef(storeRef, storeName);
|
|
17
17
|
this.outputJson({
|
|
18
|
-
|
|
18
|
+
store_ref: storeRef,
|
|
19
19
|
store_name: storeName || null,
|
|
20
|
-
message: `Switched to store ${
|
|
20
|
+
message: `Switched to store ${storeRef}`,
|
|
21
21
|
profile: this.configManager.getActiveProfileName(),
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
StoresSwitch.description = "Switch the active store (persists to profile)";
|
|
26
26
|
StoresSwitch.examples = [
|
|
27
|
-
"ecomweb stores switch
|
|
28
|
-
"ecomweb stores switch
|
|
27
|
+
"ecomweb stores switch abc123def456",
|
|
28
|
+
"ecomweb stores switch abc123def456 --profile production",
|
|
29
29
|
];
|
|
30
30
|
StoresSwitch.args = {
|
|
31
|
-
|
|
31
|
+
ref: core_1.Args.string({ description: "Store ref to switch to", required: true }),
|
|
32
32
|
};
|
|
33
33
|
StoresSwitch.flags = {
|
|
34
34
|
...base_command_1.BaseCommand.baseFlags,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.js","sourceRoot":"","sources":["../../../src/commands/stores/switch.ts"],"names":[],"mappings":";;AAAA,sCAAmC;AACnC,qDAAiD;AAEjD,MAAqB,YAAa,SAAQ,0BAAW;IAgBnD,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAChD,MAAM,
|
|
1
|
+
{"version":3,"file":"switch.js","sourceRoot":"","sources":["../../../src/commands/stores/switch.ts"],"names":[],"mappings":";;AAAA,sCAAmC;AACnC,qDAAiD;AAEjD,MAAqB,YAAa,SAAQ,0BAAW;IAgBnD,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAChD,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC;QAE1B,IAAI,SAA6B,CAAC;QAClC,IAAI,CAAC;YACH,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YACtD,SAAS,GAAG,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,UAAU,CAAC;QAC7C,CAAC;QAAC,MAAM,CAAC;QAET,CAAC;QAED,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;QAEpD,IAAI,CAAC,UAAU,CAAC;YACd,SAAS,EAAE,QAAQ;YACnB,UAAU,EAAE,SAAS,IAAI,IAAI;YAC7B,OAAO,EAAE,qBAAqB,QAAQ,EAAE;YACxC,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,oBAAoB,EAAE;SACnD,CAAC,CAAC;IACL,CAAC;;AAnCM,wBAAW,GAAG,+CAA+C,CAAC;AAE9D,qBAAQ,GAAG;IAChB,oCAAoC;IACpC,yDAAyD;CAC1D,CAAC;AAEK,iBAAI,GAAG;IACZ,GAAG,EAAE,WAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,wBAAwB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;CAC5E,CAAC;AAEK,kBAAK,GAAG;IACb,GAAG,0BAAW,CAAC,SAAS;CACzB,CAAC;kBAdiB,YAAY"}
|
package/dist/lib/api-client.d.ts
CHANGED
|
@@ -20,11 +20,11 @@ export interface PaginatedResponse<T> {
|
|
|
20
20
|
}
|
|
21
21
|
export declare class ApiClient {
|
|
22
22
|
private client;
|
|
23
|
-
private
|
|
23
|
+
private storeRef?;
|
|
24
24
|
constructor(options: ApiClientOptions);
|
|
25
25
|
setJwtToken(token: string): void;
|
|
26
26
|
clearAuth(): void;
|
|
27
|
-
|
|
27
|
+
setStoreRef(storeRef: string): void;
|
|
28
28
|
private storePath;
|
|
29
29
|
get<T = any>(path: string, params?: Record<string, any>): Promise<T>;
|
|
30
30
|
post<T = any>(path: string, body?: any, config?: AxiosRequestConfig): Promise<T>;
|
|
@@ -36,11 +36,13 @@ export declare class ApiClient {
|
|
|
36
36
|
storePut<T = any>(path: string, body?: any): Promise<T>;
|
|
37
37
|
storePatch<T = any>(path: string, body?: any): Promise<T>;
|
|
38
38
|
storeDelete<T = any>(path: string, body?: any): Promise<T>;
|
|
39
|
+
storeDownload(path: string): Promise<Buffer>;
|
|
40
|
+
storeEventStream(path: string): Promise<AsyncIterable<Buffer>>;
|
|
39
41
|
storeUpload<T = any>(path: string, formData: FormData): Promise<T>;
|
|
40
42
|
listPaginated<T = any>(path: string, params?: Record<string, any>): Promise<PaginatedResponse<T>>;
|
|
41
43
|
listAll<T = any>(path: string, params?: Record<string, any>): Promise<T[]>;
|
|
42
44
|
private paginateAll;
|
|
43
45
|
health(): Promise<any>;
|
|
44
46
|
listStores(): Promise<any[]>;
|
|
45
|
-
getStore(
|
|
47
|
+
getStore(ref: string): Promise<any>;
|
|
46
48
|
}
|
package/dist/lib/api-client.js
CHANGED
|
@@ -35,13 +35,13 @@ class ApiClient {
|
|
|
35
35
|
delete this.client.defaults.headers.common["Authorization"];
|
|
36
36
|
delete this.client.defaults.headers.common["x-api-key"];
|
|
37
37
|
}
|
|
38
|
-
|
|
39
|
-
this.
|
|
38
|
+
setStoreRef(storeRef) {
|
|
39
|
+
this.storeRef = storeRef;
|
|
40
40
|
}
|
|
41
41
|
storePath(path) {
|
|
42
|
-
if (!this.
|
|
42
|
+
if (!this.storeRef)
|
|
43
43
|
throw new Error("No store selected");
|
|
44
|
-
return `/stores/${this.
|
|
44
|
+
return `/stores/${this.storeRef}${path}`;
|
|
45
45
|
}
|
|
46
46
|
async get(path, params) {
|
|
47
47
|
const { data } = await this.client.get(path, { params });
|
|
@@ -78,6 +78,20 @@ class ApiClient {
|
|
|
78
78
|
async storeDelete(path, body) {
|
|
79
79
|
return this.delete(this.storePath(path), body);
|
|
80
80
|
}
|
|
81
|
+
async storeDownload(path) {
|
|
82
|
+
const { data } = await this.client.get(this.storePath(path), {
|
|
83
|
+
responseType: "arraybuffer",
|
|
84
|
+
});
|
|
85
|
+
return Buffer.from(data);
|
|
86
|
+
}
|
|
87
|
+
async storeEventStream(path) {
|
|
88
|
+
const { data } = await this.client.get(this.storePath(path), {
|
|
89
|
+
responseType: "stream",
|
|
90
|
+
headers: { Accept: "text/event-stream" },
|
|
91
|
+
timeout: 0,
|
|
92
|
+
});
|
|
93
|
+
return data;
|
|
94
|
+
}
|
|
81
95
|
async storeUpload(path, formData) {
|
|
82
96
|
return this.post(this.storePath(path), formData, {
|
|
83
97
|
headers: formData.getHeaders(),
|
|
@@ -118,8 +132,8 @@ class ApiClient {
|
|
|
118
132
|
const result = await this.get("/stores");
|
|
119
133
|
return Array.isArray(result) ? result : result.data || [];
|
|
120
134
|
}
|
|
121
|
-
async getStore(
|
|
122
|
-
return this.get(`/stores/${
|
|
135
|
+
async getStore(ref) {
|
|
136
|
+
return this.get(`/stores/${ref}`);
|
|
123
137
|
}
|
|
124
138
|
}
|
|
125
139
|
exports.ApiClient = ApiClient;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-client.js","sourceRoot":"","sources":["../../src/lib/api-client.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAiE;AAuBjE,MAAa,SAAS;IAIpB,YAAY,OAAyB;QACnC,IAAI,CAAC,MAAM,GAAG,eAAK,CAAC,MAAM,CAAC;YACzB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,MAAM;YAClC,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,GAAG,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC;gBACtD,GAAG,CAAC,OAAO,CAAC,QAAQ,IAAI,EAAE,aAAa,EAAE,UAAU,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;aACzE;SACF,CAAC,CAAC;QAGH,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;YAC/D,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;YAC5B,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,WAAW,IAAI,CAAC,EAAE,CAAC;gBAChF,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAC/B,CAA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ked";
|
|
7
|
+
count: number;
|
|
8
|
+
code: string;
|
|
9
|
+
} | {
|
|
10
|
+
kind: "other";
|
|
11
|
+
};
|
|
12
|
+
export declare function describeAttributeApiError(error: any): AttributeApiError;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.describeAttributeApiError = describeAttributeApiError;
|
|
4
|
+
function describeAttributeApiError(error) {
|
|
5
|
+
const data = error?.response?.data;
|
|
6
|
+
const code = data?.code;
|
|
7
|
+
if (code !== "ATTRIBUTE_IN_USE" && code !== "ATTRIBUTE_VALUE_IN_USE") {
|
|
8
|
+
return { kind: "other" };
|
|
9
|
+
}
|
|
10
|
+
const count = Number(data?.details?.value ?? 0);
|
|
11
|
+
const constraint = data?.details?.constraint;
|
|
12
|
+
if (constraint === "variant_combinations") {
|
|
13
|
+
return { kind: "blocked", count, code };
|
|
14
|
+
}
|
|
15
|
+
if (constraint === "product_links") {
|
|
16
|
+
return { kind: "forceable", count, code };
|
|
17
|
+
}
|
|
18
|
+
return { kind: "other" };
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=attribute-errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attribute-errors.js","sourceRoot":"","sources":["../../src/lib/attribute-errors.ts"],"names":[],"mappings":";;AAWA,8DAkBC;AAlBD,SAAgB,yBAAyB,CAAC,KAAU;IAClD,MAAM,IAAI,GAAG,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC;IACnC,MAAM,IAAI,GAAG,IAAI,EAAE,IAAI,CAAC;IACxB,IAAI,IAAI,KAAK,kBAAkB,IAAI,IAAI,KAAK,wBAAwB,EAAE,CAAC;QACrE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;IAC3B,CAAC;IACD,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC;IAChD,MAAM,UAAU,GAAG,IAAI,EAAE,OAAO,EAAE,UAAU,CAAC;IAC7C,IAAI,UAAU,KAAK,sBAAsB,EAAE,CAAC;QAC1C,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAC1C,CAAC;IACD,IAAI,UAAU,KAAK,eAAe,EAAE,CAAC;QACnC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAC5C,CAAC;IAID,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAC3B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const CODEX_SKILL = "---\nname: ecomweb\ndescription: Use when someone wants to start building an ecomweb storefront, or asks how to build their ecomweb store's website with Codex, outside an existing storefront project.\n---\n\n# Starting an ecomweb storefront\n\nAn ecomweb storefront is a Next.js project for one ecomweb store: products,\ncart, checkout and accounts come from ecomweb; the merchant (with Codex) owns\nthe pages and the design.\n\n## Inside a storefront project\n\nIf the current folder has an `.ecomweb.json` file, it already is a storefront\nproject. Follow its `AGENTS.md`, which points to the project's own skill.\n\n## Starting one\n\n1. Check the prerequisites: `node --version` (24 or newer), `pnpm --version`,\n `git --version`. If one is missing, stop and give the install links:\n https://nodejs.org, https://pnpm.io/installation, https://git-scm.com/downloads.\n2. Check the login: `npx @ecomweb/cli auth status`. If not logged in, ask for\n the user's ecomweb email, run `npx @ecomweb/cli auth login --email <email>`\n (it emails them a 6-digit code), ask them for the code, then run\n `npx @ecomweb/cli auth login --email <email> --code <code> [--store-ref <ref>]`.\n (If they have several stores, it lists them: ask which one.)\n3. The login picked the store; `npx @ecomweb/cli stores current` shows it.\n4. Ask whether to create the project on this machine or as a new GitHub\n repository (add `--github`).\n5. Create it: `npx @ecomweb/cli storefront init`. It\n installs dependencies and prints the next steps.\n6. Tell the user to start `codex` inside the new folder and describe the\n storefront they want; `pnpm dev` shows it at http://localhost:3002.\n\nThe emailed code is fine to type into the chat (it works once, for a few\nminutes); never paste API keys or tokens into the chat or into files.\n";
|
|
2
|
+
export declare function codexSkillPath(home: string): string;
|
|
3
|
+
export declare function installCodexSkill(home: string, opts?: {
|
|
4
|
+
force?: boolean;
|
|
5
|
+
dryRun?: boolean;
|
|
6
|
+
}): {
|
|
7
|
+
path: string;
|
|
8
|
+
status: "installed" | "unchanged" | "would-install";
|
|
9
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CODEX_SKILL = void 0;
|
|
7
|
+
exports.codexSkillPath = codexSkillPath;
|
|
8
|
+
exports.installCodexSkill = installCodexSkill;
|
|
9
|
+
const node_fs_1 = require("node:fs");
|
|
10
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
11
|
+
const errors_1 = require("./errors");
|
|
12
|
+
exports.CODEX_SKILL = `---
|
|
13
|
+
name: ecomweb
|
|
14
|
+
description: Use when someone wants to start building an ecomweb storefront, or asks how to build their ecomweb store's website with Codex, outside an existing storefront project.
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Starting an ecomweb storefront
|
|
18
|
+
|
|
19
|
+
An ecomweb storefront is a Next.js project for one ecomweb store: products,
|
|
20
|
+
cart, checkout and accounts come from ecomweb; the merchant (with Codex) owns
|
|
21
|
+
the pages and the design.
|
|
22
|
+
|
|
23
|
+
## Inside a storefront project
|
|
24
|
+
|
|
25
|
+
If the current folder has an \`.ecomweb.json\` file, it already is a storefront
|
|
26
|
+
project. Follow its \`AGENTS.md\`, which points to the project's own skill.
|
|
27
|
+
|
|
28
|
+
## Starting one
|
|
29
|
+
|
|
30
|
+
1. Check the prerequisites: \`node --version\` (24 or newer), \`pnpm --version\`,
|
|
31
|
+
\`git --version\`. If one is missing, stop and give the install links:
|
|
32
|
+
https://nodejs.org, https://pnpm.io/installation, https://git-scm.com/downloads.
|
|
33
|
+
2. Check the login: \`npx @ecomweb/cli auth status\`. If not logged in, ask for
|
|
34
|
+
the user's ecomweb email, run \`npx @ecomweb/cli auth login --email <email>\`
|
|
35
|
+
(it emails them a 6-digit code), ask them for the code, then run
|
|
36
|
+
\`npx @ecomweb/cli auth login --email <email> --code <code> [--store-ref <ref>]\`.
|
|
37
|
+
(If they have several stores, it lists them: ask which one.)
|
|
38
|
+
3. The login picked the store; \`npx @ecomweb/cli stores current\` shows it.
|
|
39
|
+
4. Ask whether to create the project on this machine or as a new GitHub
|
|
40
|
+
repository (add \`--github\`).
|
|
41
|
+
5. Create it: \`npx @ecomweb/cli storefront init\`. It
|
|
42
|
+
installs dependencies and prints the next steps.
|
|
43
|
+
6. Tell the user to start \`codex\` inside the new folder and describe the
|
|
44
|
+
storefront they want; \`pnpm dev\` shows it at http://localhost:3002.
|
|
45
|
+
|
|
46
|
+
The emailed code is fine to type into the chat (it works once, for a few
|
|
47
|
+
minutes); never paste API keys or tokens into the chat or into files.
|
|
48
|
+
`;
|
|
49
|
+
function codexSkillPath(home) {
|
|
50
|
+
return node_path_1.default.join(home, ".agents/skills/ecomweb/SKILL.md");
|
|
51
|
+
}
|
|
52
|
+
function installCodexSkill(home, opts = {}) {
|
|
53
|
+
const file = codexSkillPath(home);
|
|
54
|
+
if ((0, node_fs_1.existsSync)(file)) {
|
|
55
|
+
const current = (0, node_fs_1.readFileSync)(file, "utf8");
|
|
56
|
+
if (current === exports.CODEX_SKILL)
|
|
57
|
+
return { path: file, status: "unchanged" };
|
|
58
|
+
if (!opts.force) {
|
|
59
|
+
throw new errors_1.CliError("SKILL_EXISTS", `A different skill already exists at ${file}`, errors_1.ExitCode.VALIDATION, {
|
|
60
|
+
hint: "Pass --force to replace it.",
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
if (opts.dryRun)
|
|
65
|
+
return { path: file, status: "would-install" };
|
|
66
|
+
(0, node_fs_1.mkdirSync)(node_path_1.default.dirname(file), { recursive: true });
|
|
67
|
+
(0, node_fs_1.writeFileSync)(file, exports.CODEX_SKILL);
|
|
68
|
+
return { path: file, status: "installed" };
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=codex-skill.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex-skill.js","sourceRoot":"","sources":["../../src/lib/codex-skill.ts"],"names":[],"mappings":";;;;;;AA+CA,wCAEC;AAED,8CAkBC;AArED,qCAA6E;AAC7E,0DAA6B;AAC7B,qCAA8C;AAOjC,QAAA,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoC1B,CAAC;AAEF,SAAgB,cAAc,CAAC,IAAY;IACzC,OAAO,mBAAI,CAAC,IAAI,CAAC,IAAI,EAAE,iCAAiC,CAAC,CAAC;AAC5D,CAAC;AAED,SAAgB,iBAAiB,CAC/B,IAAY,EACZ,OAA8C,EAAE;IAEhD,MAAM,IAAI,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IAClC,IAAI,IAAA,oBAAU,EAAC,IAAI,CAAC,EAAE,CAAC;QACrB,MAAM,OAAO,GAAG,IAAA,sBAAY,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAC3C,IAAI,OAAO,KAAK,mBAAW;YAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;QACxE,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;YAChB,MAAM,IAAI,iBAAQ,CAAC,cAAc,EAAE,uCAAuC,IAAI,EAAE,EAAE,iBAAQ,CAAC,UAAU,EAAE;gBACrG,IAAI,EAAE,6BAA6B;aACpC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IACD,IAAI,IAAI,CAAC,MAAM;QAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC;IAChE,IAAA,mBAAS,EAAC,mBAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACnD,IAAA,uBAAa,EAAC,IAAI,EAAE,mBAAW,CAAC,CAAC;IACjC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;AAC7C,CAAC"}
|
package/dist/lib/config.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export interface ProfileConfig {
|
|
2
2
|
api_url: string;
|
|
3
|
-
|
|
3
|
+
store_ref?: string;
|
|
4
4
|
store_name?: string;
|
|
5
5
|
default_output: "json" | "table" | "csv";
|
|
6
6
|
}
|
|
@@ -18,8 +18,8 @@ export declare class ConfigManager {
|
|
|
18
18
|
getProfile(name?: string): ProfileConfig;
|
|
19
19
|
setProfile(name: string, profile: Partial<ProfileConfig>): void;
|
|
20
20
|
setActiveProfile(name: string): void;
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
setStoreRef(storeRef: string, storeName?: string): void;
|
|
22
|
+
getStoreRef(): string | undefined;
|
|
23
23
|
getApiKey(profileName?: string): string | undefined;
|
|
24
24
|
setApiKey(key: string, profileName?: string): void;
|
|
25
25
|
removeApiKey(profileName?: string): void;
|
|
@@ -40,5 +40,5 @@ export declare class ConfigManager {
|
|
|
40
40
|
resolve<T>(flag: T | undefined, envVar: string, profileValue: T | undefined, defaultValue: T): T;
|
|
41
41
|
resolveApiUrl(flag?: string): string;
|
|
42
42
|
resolveApiKey(flag?: string): string | undefined;
|
|
43
|
-
|
|
43
|
+
resolveStoreRef(flag?: string): string | undefined;
|
|
44
44
|
}
|
package/dist/lib/config.js
CHANGED
|
@@ -93,16 +93,16 @@ class ConfigManager {
|
|
|
93
93
|
this.config.active_profile = name;
|
|
94
94
|
this.save();
|
|
95
95
|
}
|
|
96
|
-
|
|
96
|
+
setStoreRef(storeRef, storeName) {
|
|
97
97
|
const profile = this.getProfile();
|
|
98
|
-
profile.
|
|
98
|
+
profile.store_ref = storeRef;
|
|
99
99
|
if (storeName)
|
|
100
100
|
profile.store_name = storeName;
|
|
101
101
|
this.config.profiles[this.config.active_profile] = profile;
|
|
102
102
|
this.save();
|
|
103
103
|
}
|
|
104
|
-
|
|
105
|
-
return this.getProfile().
|
|
104
|
+
getStoreRef() {
|
|
105
|
+
return this.getProfile().store_ref;
|
|
106
106
|
}
|
|
107
107
|
getApiKey(profileName) {
|
|
108
108
|
const name = profileName || this.config.active_profile;
|
|
@@ -187,13 +187,13 @@ class ConfigManager {
|
|
|
187
187
|
resolveApiKey(flag) {
|
|
188
188
|
return this.resolve(flag, "ECOMWEB_API_KEY", this.getApiKey(), undefined);
|
|
189
189
|
}
|
|
190
|
-
|
|
191
|
-
const envVal = process.env["
|
|
190
|
+
resolveStoreRef(flag) {
|
|
191
|
+
const envVal = process.env["ECOMWEB_STORE_REF"];
|
|
192
192
|
if (flag !== undefined)
|
|
193
193
|
return flag;
|
|
194
194
|
if (envVal !== undefined)
|
|
195
|
-
return
|
|
196
|
-
return this.
|
|
195
|
+
return envVal;
|
|
196
|
+
return this.getStoreRef();
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
exports.ConfigManager = ConfigManager;
|
package/dist/lib/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAC7B,uCAAyB;AAczB,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;AACjE,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;AACzD,MAAM,eAAe,GAA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AAC,YAAY,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAKD,OAAO,CAAI,IAAmB,EAAE,MAAc,EAAE,YAA2B,EAAE,YAAe;QAC1F,IAAI,IAAI,KAAK,SAAS;YAAE,OAAO,IAAI,CAAC;QACpC,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACnC,IAAI,MAAM,KAAK,SAAS;YAAE,OAAO,MAAsB,CAAC;QACxD,IAAI,YAAY,KAAK,SAAS;YAAE,OAAO,YAAY,CAAC;QACpD,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,aAAa,CAAC,IAAa;QACzB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,iBAAiB,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,OAAO,EAAE,oCAAoC,CAAC,CAAC;IAChH,CAAC;IAED,aAAa,CAAC,IAAa;QACzB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,iBAAiB,EAAE,IAAI,CAAC,SAAS,EAAE,EAAE,SAAS,CAAC,CAAC;IAC5E,CAAC;IAED,eAAe,CAAC,IAAa;QAC3B,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;QAChD,IAAI,IAAI,KAAK,SAAS;YAAE,OAAO,IAAI,CAAC;QACpC,IAAI,MAAM,KAAK,SAAS;YAAE,OAAO,MAAM,CAAC;QACxC,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC;IAC5B,CAAC;CACF;AAxKD,sCAwKC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { PackedSource } from "./pack-source";
|
|
2
|
+
export type DeploymentStatus = "uploading" | "queued" | "building" | "built" | "running" | "stopped" | "failed";
|
|
3
|
+
export interface DeploymentView {
|
|
4
|
+
id: string;
|
|
5
|
+
kind: string;
|
|
6
|
+
status: DeploymentStatus;
|
|
7
|
+
error: string | null;
|
|
8
|
+
preview_url: string | null;
|
|
9
|
+
}
|
|
10
|
+
export interface HostingClient {
|
|
11
|
+
storePost<T = any>(path: string, body?: unknown): Promise<T>;
|
|
12
|
+
storeGet<T = any>(path: string): Promise<T>;
|
|
13
|
+
storeDelete<T = any>(path: string): Promise<T>;
|
|
14
|
+
storeEventStream(path: string): Promise<AsyncIterable<Buffer | string>>;
|
|
15
|
+
}
|
|
16
|
+
export interface DeployResult {
|
|
17
|
+
id: string;
|
|
18
|
+
status: DeploymentStatus;
|
|
19
|
+
preview_url: string | null;
|
|
20
|
+
production_urls?: string[];
|
|
21
|
+
}
|
|
22
|
+
export interface ProductionView {
|
|
23
|
+
deployment_id: string | null;
|
|
24
|
+
state: "none" | "rolling_out" | "running" | "degraded";
|
|
25
|
+
rollout_error: string | null;
|
|
26
|
+
urls: string[];
|
|
27
|
+
}
|
|
28
|
+
export interface DeployDeps {
|
|
29
|
+
client: HostingClient;
|
|
30
|
+
pack: (dir: string) => Promise<PackedSource>;
|
|
31
|
+
upload: (url: string, packed: PackedSource) => Promise<void>;
|
|
32
|
+
stderr: (text: string) => void;
|
|
33
|
+
liveLogs: boolean;
|
|
34
|
+
sleep?: (ms: number) => Promise<void>;
|
|
35
|
+
now?: () => number;
|
|
36
|
+
previewTimeoutMs?: number;
|
|
37
|
+
prod?: boolean;
|
|
38
|
+
artifact?: "source" | "prebuilt";
|
|
39
|
+
}
|
|
40
|
+
export declare function hostingError(error: unknown): unknown;
|
|
41
|
+
export declare function uploadSource(url: string, packed: PackedSource): Promise<void>;
|
|
42
|
+
export declare function streamLogs(client: HostingClient, id: string, onText: (text: string) => void, opts?: {
|
|
43
|
+
sleep?: (ms: number) => Promise<void>;
|
|
44
|
+
maxRetries?: number;
|
|
45
|
+
}): Promise<DeploymentStatus>;
|
|
46
|
+
export declare function followLogs(client: HostingClient, id: string, onText: (text: string) => void, opts?: {
|
|
47
|
+
sleep?: (ms: number) => Promise<void>;
|
|
48
|
+
maxRetries?: number;
|
|
49
|
+
}): Promise<DeploymentStatus>;
|
|
50
|
+
export declare function deploy(dir: string, deps: DeployDeps): Promise<DeployResult>;
|
|
51
|
+
export declare function promote(client: HostingClient, id: string, opts: {
|
|
52
|
+
wait: boolean;
|
|
53
|
+
sleep?: (ms: number) => Promise<void>;
|
|
54
|
+
now?: () => number;
|
|
55
|
+
timeoutMs?: number;
|
|
56
|
+
stderr?: (text: string) => void;
|
|
57
|
+
}): Promise<ProductionView>;
|
|
58
|
+
export declare function listDeployments(client: HostingClient): Promise<DeploymentView[]>;
|
|
59
|
+
export declare function unpublish(client: HostingClient): Promise<ProductionView>;
|