How nvasilev-cstk/publish-stack works
publish-everything provides two ways to publish all entries and assets across locales to a Contentstack environment: an embedded dashboard widget backed by resumable Cloud Function steps, and a standalone CLI. The dashboard sends state with each request; the function discovers locales, content types, entries, and assets, then publishes in bounded batches or reports a dry-run summary. The CLI performs the same discovery and publishing workflow interactively. Source excerpts establish the function and CLI orchestration; the widget loop and dashboard behavior are documented in the README, but its implementation was not sampled.
Main entry points: publish-step.js Step endpoint · publish-all.js CLI workflow · client.js CLI stack client · pipelineStep.js Resumable pipeline
Components 24
Dashboard app
- Publish widget
public/index.html
Cloud Function
- Step endpoint
functions/publish-step.js - Resumable pipeline
functions/lib/pipelineStep.js - Locale discovery
functions/lib/pipelineStep.js - Content type discovery
functions/lib/pipelineStep.js - Entry discovery
functions/lib/pipelineStep.js - Asset discovery
functions/lib/pipelineStep.js - Entry publishing
functions/lib/pipelineStep.js - Asset publishing
functions/lib/pipelineStep.js - Function config
functions/lib/config.js - Error details
functions/lib/errors.js
Standalone CLI
- CLI workflow
cli/publish-all.js - Locale discovery
cli/src/locales.js - Content type discovery
cli/src/contentTypes.js - Entry operations
cli/src/entries.js - Asset operations
cli/src/assets.js - CLI config
cli/src/config.js
Contentstack access
- Function stack client
functions/lib/stackClient.js - Function rate limiter
functions/lib/rateLimiter.js - CLI stack client
cli/src/client.js - CLI rate limiter
cli/src/rateLimiter.js
Other components
- Dashboard user
- Contentstack Management API
- CLI user
Connections 26
- Dashboard user → Publish widget: starts publish
README.md - Publish widget → Step endpoint: POSTs state
README.md - Step endpoint → Publish widget: returns state
README.md - Step endpoint → Function config: loads config
functions/publish-step.js - Step endpoint → Function stack client: creates stack
functions/publish-step.js - Step endpoint → Function rate limiter: creates limiter
functions/publish-step.js - Step endpoint → Resumable pipeline: runs step
functions/publish-step.js - Step endpoint → Error details: formats errors
functions/publish-step.js - Resumable pipeline → Function rate limiter: schedules and retries
functions/lib/pipelineStep.js - Resumable pipeline → Error details: describes failures
functions/lib/pipelineStep.js - Resumable pipeline → Contentstack Management API: queries and publishes
functions/lib/pipelineStep.js - CLI user → CLI workflow: runs command
cli/publish-all.js - CLI workflow → CLI config: reads settings
cli/publish-all.js - CLI workflow → CLI rate limiter: creates limiter
cli/publish-all.js - CLI workflow → Locale discovery: fetches locales
cli/publish-all.js - CLI workflow → Content type discovery: fetches content types
cli/publish-all.js - CLI workflow → Entry operations: discovers and publishes
cli/publish-all.js - CLI workflow → Asset operations: discovers and publishes
cli/publish-all.js - Locale discovery → CLI stack client: uses stack
cli/src/locales.js - Content type discovery → CLI stack client: uses stack
cli/src/contentTypes.js - Entry operations → CLI stack client: queries and publishes
cli/src/entries.js - Asset operations → CLI stack client: queries and publishes
cli/src/assets.js - Entry operations → CLI rate limiter: schedules requests
cli/src/entries.js - Asset operations → CLI rate limiter: schedules requests
cli/src/assets.js - Locale discovery → CLI rate limiter: schedules requests
cli/src/locales.js - CLI stack client → Contentstack Management API: creates SDK stack
cli/src/client.js