Files
ghost/changelog.md

7.0 KiB

Changelog

2025-10-11 - 2.2.1 - fix(syncedinstance)

Prevent same-instance syncs and sanitize post update payloads; update tests and docs

  • SyncedInstance now validates and normalizes source and target base URLs (trailing slashes and case) and throws a clear error when attempting to sync an instance to itself to prevent circular syncs.
  • Post.update signature changed to accept Partial. Update logic now builds a sanitized payload and removes read-only/computed fields (uuid, comment_id, url, excerpt, reading_time, created_at, primary_author, primary_tag, etc.) before calling the Admin API to avoid conflicts.
  • Added/updated integration tests (dates, syncedinstance validation) and adjusted tag tests to be resilient; README expanded with examples, usage notes, and multi-instance sync safety details.
  • Improved tag sync/update to preserve slug when updating tags on targets.

2025-10-10 - 2.2.0 - feat(apiclient)

Add native Admin & Content API clients, JWT generator, and tag visibility features; remove external @tryghost deps and update docs

  • Add native GhostAdminAPI and GhostContentAPI implementations (ts/apiclient/*) using global fetch with support for browse/read/add/edit/delete, webhooks, and image upload.
  • Add generateToken JWT implementation compatible with Ghost Admin API (ts/apiclient/ghost.jwt.ts) with Web Crypto and Node fallbacks.
  • Switch Ghost class to use built-in apiclient implementations and bump default API version to v6.0.
  • Use Admin API to fetch ALL tags (including zero-count) and add visibility filtering and minimatch filtering in getTags; add convenience methods getPublicTags and getInternalTags.
  • Add Tag methods getVisibility(), isInternal(), and isPublic() to expose visibility information.
  • Replace imports of @tryghost/* with local apiclient implementations in ts/ghost.plugins.ts and remove @tryghost dependencies from package.json.
  • Update README to document tag visibility, new tag-related APIs/examples, and other notes about using Admin API for tags.

2025-10-08 - 2.1.0 - feat(syncedinstance)

Add SyncedInstance for multi-instance content synchronization, export it, add tests, and expand README

  • Introduce SyncedInstance class (ts/classes.syncedinstance.ts) to synchronize tags, posts and pages across Ghost instances with mapping and history support. New APIs: syncTags, syncPosts, syncPages, syncAll, getSyncStatus, clearSyncHistory, clearMappings.
  • Export SyncedInstance from the package entry point (ts/index.ts).
  • Add integration tests for SyncedInstance (test/test.syncedinstance.node.ts).
  • Expand README (readme.md) with Quick Start, detailed Multi-Instance Synchronization docs, examples and updated API reference.

2025-10-08 - 2.0.0 - BREAKING CHANGE(classes.ghost)

Remove Settings and Webhooks browse/read APIs, remove noisy console.error logs, and update tests/docs

  • Removed Settings API methods from Ghost: getSettings and updateSettings (breaking change).
  • Removed Webhooks browsing/reading methods from Ghost: getWebhooks and getWebhookById. createWebhook, updateWebhook and deleteWebhook remain.
  • Removed test/test.settings.node.ts and simplified test/test.webhook.node.ts to only exercise create/update/delete webhook flows without feature-availability guarding.
  • Stripped console.error debug logging across multiple classes (Author, Ghost, Member, Page, Post, Tag) to reduce noisy runtime output.
  • Updated README: removed 'Site Settings' section and clarified webhook API limitations supported by the underlying Ghost Admin SDK.

2025-10-07 - 1.4.1 - fix(tests)

Remove updated_at from post and page update test payloads

  • Stop setting updated_at in test update payloads to avoid mutating server-managed timestamps
  • Changed test/test.post.node.ts: removed updated_at assignment when updating a post
  • Changed test/test.page.node.ts: removed updated_at assignment when updating a page

2025-10-07 - 1.4.0 - feat(classes.ghost)

Add members, settings and webhooks support; implement Member class and add tests

  • Introduce IMember and Member class (ts/classes.member.ts) with CRUD (update, delete) and JSON helpers
  • Add member management API to Ghost: getMembers (with minimatch filtering), getMemberById, getMemberByEmail, createMember
  • Add site settings API to Ghost: getSettings and updateSettings (admin API wrappers)
  • Add webhooks management to Ghost: getWebhooks, getWebhookById, createWebhook, updateWebhook, deleteWebhook
  • Wire smartmatch filtering for members using @push.rocks/smartmatch
  • Export Member from ts/index.ts so it's part of the public API
  • Add comprehensive node tests for Ghost, Author, Member, Page, Post, Tag, Settings and Webhooks (test/*.node.ts)
  • Fix Post construction usages in classes.ghost to pass the Ghost instance when creating Post objects

2025-10-07 - 1.3.0 - feat(core)

Add Ghost CMS API client classes and README documentation

  • Implemented core TypeScript classes: Ghost, Post, Tag, Author and Page with CRUD methods and helpers
  • Added TypeScript interfaces for posts, tags, authors and pages to provide typings
  • Included comprehensive README with installation, usage examples and API method documentation
  • Added unit test scaffold under test/test.ts
  • Updated package metadata and commitinfo (version 1.2.0)

2025-10-07 - 1.2.0 - feat(ghost)

Implement Tag, Author and Page models; add advanced filtering, search, bulk operations, image upload, related-posts, update tests and bump dependencies

  • Add fully implemented Author, Tag and Page classes with CRUD methods
  • Enhance Ghost class with: improved getPosts filtering (tag/author/featured/custom filters), getTags/getAuthors/getPages with minimatch filtering, getTag/getAuthor/getPage by id/slug, createTag/createPage, searchPosts, uploadImage, bulkUpdatePosts, bulkDeletePosts and getRelatedPosts
  • Refactor Post types (IPost) and update Post class to use the new type and consistent constructors/serialization
  • Export new modules (author, tag, page) from index.ts
  • Integrate @push.rocks/smartmatch for pattern filtering and expose it via ghost.plugins
  • Update tests to exercise tags, authors, pages, filtering, search and related posts; change test baseUrl to localhost and adjust imports
  • Bump devDependencies and dependencies versions, adjust test script, add packageManager metadata and add pnpm-workspace.yaml

2024-07-06 - 1.1.0 - feat(core)

Enhanced post fetching and creation with additional metadata and support for HTML source

  • Added support for fetching posts with included tags and authors.
  • Implemented helper method to create posts directly from HTML content.
  • Enhanced Post class to include additional metadata such as visibility, created_at, updated_at, published_at, etc.
  • Modified getPosts method in Ghost class to include tags and authors in the response.

2024-07-01 - 1.0.3 - fix(docs)

Updated the project keywords and readme content for better clarity and SEO

  • Improved the project description in package.json and npmextra.json.
  • Added comprehensive usage instructions and examples in readme.md.

2024-07-01 - 1.0.2 - fix(core)

No changes in the project files

2024-07-01 - 1.0.1 - Initial Release

Initial release of the project.